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
Display the specified resource.
public function show($id) { $locations_data = []; $event = Event::where('id', $id)->with('eventLocations')->first(); $event->event_date = Carbon::parse($event->datetime)->format('d/M/Y'); $event->event_hour = Carbon::parse($event->datetime)->format('h:i a'); foreach ($event->eventLocations AS $event_location) { $locations_data[$event_location->id] = (object)[ 'id' => $event_location->id, 'name' => $event_location->name, 'event_id' => $event_location->event_id, 'total_tickets' => $event_location->total_tickets, 'price' => number_format($event_location->price, 0, '.', '.'), 'price_value' => $event_location->price, ]; } $event->locations = $locations_data; unset($event->eventLocations); return response()->json($event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Return a value for the field.
public function resolve($rootValue, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) { $batch_id = $args['batch_id']; $mentor_ids = $args['mentor_ids']; $batch = new BatchController; $request_dummy = new Request; $response = $batch->assignMentors($request_dummy, $batch_id, $mentor_ids); // Controller returns JSON Response - parse it, read the json to see if the call succeded. list($headers, $content) = explode("\r\n\r\n", $response, 2); $data = json_decode($content); if ($data->status == "success") { return 1; } else { // Shows validation error. throw new GraphQLException($data->status, $data->{$data->status}); return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFieldValue()\n {\n return $this->value;\n }", "public function getValue(): mixed\n {\n return $this->field?->getValue();\n }", "function getFieldValue($field);", "public function getValue()\n {\n return $this->_fields['Value']['FieldValue'];\n }", "public function get_value() {\n return $this->value;\n }", "public function get_value()\n {\n return $this->value;\n }", "protected function getValue() {\r\n return $this->_value;\r\n }", "public function get_value()\n\t{\n\t\treturn $this->value;\n\t}", "function getValueFromField()\n {\n return $this->current_row[ key( $this->mapping ) ];\n }", "function getValue() {\n return $this->value;\n }", "public function get_value() {\n\t\treturn $this->_value;\n\t}", "function getValue(){\r\n\t\treturn $this->value;\r\n\t}", "public function value(): string\n {\n return $this->get('value');\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "public function getValue()\n {\n return $this->get(self::_VALUE);\n }", "public function getValue()\n {\n return $this->get(self::_VALUE);\n }", "public function value() { return $this->_m_value; }", "public function get_field_value($field)\n\t{\n\t\t//$field = strtoupper($field);\t\t\n\t\tif ($this->is_bound($field))\n\t\t{\n\t\t\treturn $this->get_bound_value($field);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_fields[$field];\n\t\t}\n\t}", "function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}", "public function getValue(){\n return $this->_value;\n }", "public function getValue()\r\n {\r\n return $this->value;\r\n }", "public function getValue()\n {\n return $this->_value;\n }", "public function getValue()\n {\n return $this->_value;\n }", "public function getValue()\n {\n return $this->_value;\n }", "public function getValue() {\n return $this->_value;\n }", "public function getValue()\n {\n return isset($this->value) ? $this->value : '';\n }", "public function getValue()\n {\n return isset($this->value) ? $this->value : '';\n }", "public function getValue() {\n\t\treturn $this -> value;\n\t}", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\n {\n return $this->value;\n }", "public function getValue()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n return $this->value;\n }", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue(){\n return $this->value;\n }", "public function getValue(){\n return $this->value;\n }", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n {\n return $this->value instanceof CustomFieldEnumValueBuilder ? $this->value->build() : $this->value;\n }", "public function getValue()\n {\n\t\treturn $this->value;\n\t}", "public function getValue(){\n \treturn $this->value;\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}" ]
[ "0.8479756", "0.8379301", "0.8064348", "0.79448414", "0.77689815", "0.77620524", "0.7700596", "0.7662676", "0.7641532", "0.76380265", "0.76324326", "0.7620745", "0.7607805", "0.7595676", "0.7595676", "0.7595676", "0.7579862", "0.7579862", "0.75784016", "0.75784016", "0.7574977", "0.7570436", "0.7568916", "0.755542", "0.75492287", "0.75457656", "0.75457656", "0.75457656", "0.75359535", "0.75315356", "0.75315356", "0.75246304", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7488932", "0.7482732", "0.7463622", "0.7463622", "0.7463622", "0.7463622", "0.7463622", "0.7463622", "0.7459058", "0.7459058", "0.7459058", "0.7459058", "0.7459058", "0.7459058", "0.74555546", "0.74555546", "0.7451619", "0.7451619", "0.74435806", "0.74404496", "0.74381", "0.7434099", "0.7434099", "0.7434099", "0.7434099" ]
0.0
-1
Form validation handler for mongo_node_type_create_form().
function mongo_node_type_create_form_validate($form, $form_state) { $set = mongo_node_settings(); $machine_name = $form_state['values']['name']; if (isset($set[$machine_name])) { form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name))); return FALSE; } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "function mongo_node_bundle_create_form_validate($form, $form_state) {\n if (empty($form_state['values']['name'])) {\n form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name)));\n return FALSE;\n }\n\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if (isset($set[$entity_type]['bundles'][$machine_name])) {\n form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name)));\n return FALSE;\n }\n return TRUE;\n}", "function mongo_node_type_create_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n\n $set = mongo_node_settings();\n $set += mongo_node_type_default_settings($label, $machine_name);\n\n // @todo - redirect to entity type page\n mongo_node_settings_save($set);\n}", "protected function type_validation()\n {\n if (is_superadmin_loggedin()) {\n $this->form_validation->set_rules('branch_id', translate('branch'), 'required');\n }\n $this->form_validation->set_rules('type_name', translate('name'), 'trim|required|callback_unique_type');\n }", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "function mongo_node_operation_validate($form, &$form_state) {\n if (!is_array($form_state['values']['entities']) || !count(array_filter($form_state['values']['entities']))) {\n form_set_error('', t('No items selected.'));\n }\n}", "function mongo_node_add($entity_type, $bundle) {\n global $user;\n $set = mongo_node_settings();\n\n $entity = entity_create($entity_type, array(\n 'uid' => $user->uid,\n 'name' => (isset($user->name) ? $user->name : ''),\n 'type' => $bundle,\n 'language' => LANGUAGE_NONE,\n )\n );\n $form_id = $entity_type . '_' . $bundle . '_mongo_node_form';\n $output = drupal_get_form($form_id, $entity, $entity_type);\n\n return $output;\n}", "function mongo_node_type_edit_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $old_entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_entity_type) {\n $set += mongo_node_type_default_settings($label, $machine_name);\n $set[$machine_name] = $set[$old_entity_type];\n unset($set[$old_entity_type]);\n\n // Update existing mongo entities with new entity type.\n _mongo_node_update_type($old_entity_type, $machine_name);\n }\n else {\n $set[$machine_name]['label'] = $label;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function ting_visual_relation_slide_form_validate($form, &$form_state) {\n if (empty($form_state['values']['name'])) {\n form_set_error('name', t('Please enter a name for the slide'));\n }\n $type = $form_state['values']['type'];\n switch ($type) {\n case 'external':\n case 'circular':\n $datawell_pid = $form_state['values']['datawell_pid'];\n // TODO: use a regex to validate the datawell-PID.\n if (empty($datawell_pid)) {\n form_set_error('datawell_pid', t('Please enter a valid datawell-PID'));\n }\n break;\n case 'structural':\n if (empty($form_state['values']['search_query'])) {\n form_set_error('search_query', t('Please enter a search query'));\n }\n }\n}", "function node_form(&$form_state, $node) {\n global $user;\n\n if (isset($form_state['node'])) {\n $node = $form_state['node'] + (array)$node;\n }\n if (isset($form_state['node_preview'])) {\n $form['#prefix'] = $form_state['node_preview'];\n }\n $node = (object)$node;\n foreach (array('body', 'title', 'format') as $key) {\n if (!isset($node->$key)) {\n $node->$key = NULL;\n }\n }\n if (!isset($form_state['node_preview'])) {\n node_object_prepare($node);\n }\n else {\n $node->build_mode = NODE_BUILD_PREVIEW;\n }\n\n // Set the id of the top-level form tag\n $form['#id'] = 'node-form';\n\n // Basic node information.\n // These elements are just values so they are not even sent to the client.\n foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => isset($node->$key) ? $node->$key : NULL,\n );\n }\n\n // Changed must be sent to the client, for later overwrite error checking.\n $form['changed'] = array(\n '#type' => 'hidden',\n '#default_value' => isset($node->changed) ? $node->changed : NULL,\n );\n // Get the node-specific bits.\n if ($extra = node_invoke($node, 'form', $form_state)) {\n $form = array_merge_recursive($form, $extra);\n }\n if (!isset($form['title']['#weight'])) {\n $form['title']['#weight'] = -5;\n }\n\n $form['#node'] = $node;\n\n // Add a log field if the \"Create new revision\" option is checked, or if the\n // current user has the ability to check that option.\n if (!empty($node->revision) || user_access('administer nodes')) {\n $form['revision_information'] = array(\n '#type' => 'fieldset',\n '#title' => t('Revision information'),\n '#collapsible' => TRUE,\n // Collapsed by default when \"Create new revision\" is unchecked\n '#collapsed' => !$node->revision,\n '#weight' => 20,\n );\n $form['revision_information']['revision'] = array(\n '#access' => user_access('administer nodes'),\n '#type' => 'checkbox',\n '#title' => t('Create new revision'),\n '#default_value' => $node->revision,\n );\n $form['revision_information']['log'] = array(\n '#type' => 'textarea',\n '#title' => t('Log message'),\n '#default_value' => (isset($node->log) ? $node->log : ''),\n '#rows' => 2,\n '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),\n );\n }\n\n // Node author information for administrators\n $form['author'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Authoring information'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 20,\n );\n $form['author']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored by'),\n '#maxlength' => 60,\n '#autocomplete_path' => 'user/autocomplete',\n '#default_value' => $node->name ? $node->name : '',\n '#weight' => -1,\n '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', t('Anonymous')))),\n );\n $form['author']['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored on'),\n '#maxlength' => 25,\n '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? $node->date : format_date($node->created, 'custom', 'Y-m-d H:i:s O'))),\n );\n\n if (isset($node->date)) {\n $form['author']['date']['#default_value'] = $node->date;\n }\n\n // Node options for administrators\n $form['options'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Publishing options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 25,\n );\n $form['options']['status'] = array(\n '#type' => 'checkbox',\n '#title' => t('Published'),\n '#default_value' => $node->status,\n );\n $form['options']['promote'] = array(\n '#type' => 'checkbox',\n '#title' => t('Promoted to front page'),\n '#default_value' => $node->promote,\n );\n $form['options']['sticky'] = array(\n '#type' => 'checkbox',\n '#title' => t('Sticky at top of lists'),\n '#default_value' => $node->sticky,\n );\n\n // These values are used when the user has no administrator access.\n foreach (array('uid', 'created') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => $node->$key,\n );\n }\n\n // Add the buttons.\n $form['buttons'] = array();\n $form['buttons']['submit'] = array(\n '#type' => 'submit',\n '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])),\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('node_form_submit'),\n );\n $form['buttons']['preview'] = array(\n '#type' => 'submit',\n '#value' => t('Preview'),\n '#weight' => 10,\n '#submit' => array('node_form_build_preview'),\n );\n if (!empty($node->nid) && node_access('delete', $node)) {\n $form['buttons']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 15,\n '#submit' => array('node_form_delete_submit'),\n );\n }\n $form['#validate'][] = 'node_form_validate';\n $form['#theme'] = array($node->type .'_node_form', 'node_form');\n return $form;\n}", "public function ajax_create_field() {\n\t\tglobal $wpdb;\n\n\t\t$data = array();\n\t\t$field_options = $field_validation = $parent = $previous = '';\n\n\t\tforeach ( $_REQUEST['data'] as $k ) {\n\t\t\t$data[ $k['name'] ] = $k['value'];\n\t\t}\n\n\t\tcheck_ajax_referer( 'create-field-' . $data['form_id'], 'nonce' );\n\n\t\t$form_id = absint( $data['form_id'] );\n\t\t$field_key = sanitize_title( $_REQUEST['field_type'] );\n\t\t$field_type = strtolower( sanitize_title( $_REQUEST['field_type'] ) );\n\n\t\t$parent = ( isset( $_REQUEST['parent'] ) && $_REQUEST['parent'] > 0 ) ? $_REQUEST['parent'] : 0;\n\t\t$previous = ( isset( $_REQUEST['previous'] ) && $_REQUEST['previous'] > 0 ) ? $_REQUEST['previous'] : 0;\n\n\t\t// If a Page Break, the default name is Next, otherwise use the field type\n\t\t$field_name = ( 'page-break' == $field_type ) ? 'Next' : $_REQUEST['field_type'];\n\n\t\t// Set defaults for validation\n\t\tswitch ( $field_type ) :\n\t\t\tcase 'select' :\n\t\t\tcase 'radio' :\n\t\t\tcase 'checkbox' :\n\t\t\t\t$field_options = serialize( array( 'Option 1', 'Option 2', 'Option 3' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'email' :\n\t\t\tcase 'url' :\n\t\t\tcase 'phone' :\n\t\t\t\t$field_validation = $field_type;\n\t\t\t\tbreak;\n\n\t\t\tcase 'currency' :\n\t\t\t\t$field_validation = 'number';\n\t\t\t\tbreak;\n\n\t\t\tcase 'number' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\tbreak;\n\n\t\t\tcase 'min' :\n\t\t\tcase 'max' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\t$field_options = serialize( array( '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'range' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\t$field_options = serialize( array( '1', '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'time' :\n\t\t\t\t$field_validation = 'time-12';\n\t\t\t\tbreak;\n\n\t\t\tcase 'file-upload' :\n\t\t\t\t$field_options = serialize( array( 'png|jpe?g|gif' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ip-address' :\n\t\t\t\t$field_validation = 'ipv6';\n\t\t\t\tbreak;\n\n\t\t\tcase 'hidden' :\n\t\t\tcase 'custom-field' :\n\t\t\t\t$field_options = serialize( array( '' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'autocomplete' :\n\t\t\t\t$field_validation = 'auto';\n\t\t\t\t$field_options = serialize( array( 'Option 1', 'Option 2', 'Option 3' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'name' :\n\t\t\t\t$field_options = serialize( array( 'normal' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'date' :\n\t\t\t\t$field_options = serialize( array( 'dateFormat' => 'mm/dd/yy' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'rating' :\n\t\t\t\t$field_options = serialize( array( 'negative' => 'Disagree', 'positive' => 'Agree', 'scale' => '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'likert' :\n\t\t\t\t$field_options = serialize( array( 'rows' => \"Ease of Use\\nPortability\\nOverall\", 'cols' => \"Strongly Disagree\\nDisagree\\nUndecided\\nAgree\\nStrongly Agree\" ) );\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\n\n\t\t// Get fields info\n\t\t$all_fields = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE form_id = %d ORDER BY field_sequence ASC\", $form_id ) );\n\t\t$field_sequence = 0;\n\n\t\t// We only want the fields that FOLLOW our parent or previous item\n\t\tif ( $parent > 0 || $previous > 0 ) {\n\t\t\t$cut_off = ( $previous > 0 ) ? $previous : $parent;\n\n\t\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\t\tif ( $field->field_id == $cut_off ) {\n\t\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t\t}\n\t\t\tarray_shift( $all_fields );\n\n\t\t\t// If the previous had children, we need to remove them so our item is placed correctly\n\t\t\tif ( !$parent && $previous > 0 ) {\n\t\t\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\t\t\tif ( !$field->field_parent )\n\t\t\t\t\t\tbreak;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Create the new field's data\n\t\t$newdata = array(\n\t\t\t'form_id' \t\t\t=> absint( $data['form_id'] ),\n\t\t\t'field_key' \t\t=> $field_key,\n\t\t\t'field_name' \t\t=> $field_name,\n\t\t\t'field_type' \t\t=> $field_type,\n\t\t\t'field_options' \t=> $field_options,\n\t\t\t'field_sequence' \t=> $field_sequence,\n\t\t\t'field_validation' \t=> $field_validation,\n\t\t\t'field_parent' \t\t=> $parent\n\t\t);\n\n\t\t// Create the field\n\t\t$wpdb->insert( $this->field_table_name, $newdata );\n\t\t$insert_id = $wpdb->insert_id;\n\n\t\t// VIP fields\n\t\t$vip_fields = array( 'verification', 'secret', 'submit' );\n\n\t\t// Rearrange the fields that follow our new data\n\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\tif ( !in_array( $field->field_type, $vip_fields ) ) {\n\t\t\t\t$field_sequence++;\n\t\t\t\t// Update each field with it's new sequence and parent ID\n\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), array( 'field_id' => $field->field_id ) );\n\t\t\t}\n\t\t}\n\n\t\t// Move the VIPs\n\t\tforeach ( $vip_fields as $update ) {\n\t\t\t$field_sequence++;\n\t\t\t$where = array(\n\t\t\t\t'form_id' \t\t=> absint( $data['form_id'] ),\n\t\t\t\t'field_type' \t=> $update\n\t\t\t);\n\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), $where );\n\n\t\t}\n\n\t\techo $this->field_output( $data['form_id'], $insert_id );\n\n\t\tdie(1);\n\t}", "function node_add($type) {\n global $user;\n\n $types = node_get_types();\n $type = isset($type) ? str_replace('-', '_', $type) : NULL;\n // If a node type has been specified, validate its existence.\n if (isset($types[$type]) && node_access('create', $type)) {\n // Initialize settings:\n $node = array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');\n\n drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));\n $output = drupal_get_form($type .'_node_form', $node);\n }\n\n return $output;\n}", "function main() {\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tprint_r($_POST);\n\t\t\techo \"<br />\";\n\t\t\t\n\t\t\t// Required Fields in the POST data //\t\t\t\n\t\t\tif ( !isset($_POST['_type']) ) return;\n\t\t\tif ( !isset($_POST['_subtype']) ) return;\n\t\t\tif ( !isset($_POST['_name']) ) return;\n\t\t\tif ( !isset($_POST['_mail']) ) return;\n\t\t\tif ( !isset($_POST['_password']) ) return;\n\t\t\tif ( !isset($_POST['_publish']) ) return;\n\t\n\t\t\t// Node Type //\n\t\t\t$type = sanitize_NodeType($_POST['_type']);\n\t\t\tif ( empty($type) ) return;\t\n\n\t\t\t$subtype = sanitize_NodeType($_POST['_subtype']);\n\t\n\t\t\t// Name/Title //\n\t\t\t$name = $_POST['_name'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Slug //\n\t\t\tif ( empty($_POST['_slug']) )\n\t\t\t\t$slug = $_POST['_name'];\n\t\t\telse\n\t\t\t\t$slug = $_POST['_slug'];\n\t\t\t$slug = sanitize_Slug($slug);\n\t\t\tif ( empty($slug) ) return;\n\t\t\t\n\t\t\t// TODO: Confirm slug is legal\n\t\t\t\t\n\t\t\t// Body //\n\t\t\t$body = $_POST['_body'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Do we publish? //\n\t\t\t$publish = mb_strtolower($_POST['_publish']) == \"true\";\n\t\t\t\n\t\t\t// Email //\n\t\t\t$mail = sanitize_Email($_POST['_mail']);\n\t\t\tif ( empty($mail) ) return;\n\n\t\t\t// Password //\n\t\t\t$password = $_POST['_password'];\n\t\t\tif ( empty($password) ) return;\n\n\t\n\t\t\t$id = node_Add(\n\t\t\t\t$type,$subtype,$slug,$name,$body,\n\t\t\t\t0,2,\n\t\t\t\t$publish\n\t\t\t);\n\t\t\t\n\t\t\tuser_Add($id,$mail,$password);\n\t\n\t\t\techo \"Added \" . $id . \".<br />\";\n\t\t\techo \"<br />\";\n\t\t}\n\t}", "function validate_taxonomy_field($field)\n {\n }", "function validate_blog_form()\n {\n }", "public function createForm();", "public function createForm();", "function validate() {\n\t\t// If it's not required, there's nothing to validate\n\t\tif ( !$this->get_attribute( 'required' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$field_id = $this->get_attribute( 'id' );\n\t\t$field_type = $this->get_attribute( 'type' );\n\t\t$field_label = $this->get_attribute( 'label' );\n\n\t\t$field_value = isset( $_POST[$field_id] ) ? stripslashes( $_POST[$field_id] ) : '';\n\n\t\tswitch ( $field_type ) {\n\t\tcase 'email' :\n\t\t\t// Make sure the email address is valid\n\t\t\tif ( !is_email( $field_value ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s requires a valid email address', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t// Just check for presence of any text\n\t\t\tif ( !strlen( trim( $field_value ) ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s is required', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t}\n\t}", "abstract public function createForm();", "abstract public function createForm();", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "protected function createFormFields() {\n\t}", "public function createAction()\n {\n $entity = new Node();\n $request = $this->getRequest();\n $form = $this->createForm(new NodeType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n $this->get('session')->setFlash('notice', 'Los cambios se realizaron correctamente.');\n return $this->redirect($this->generateUrl('node_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('HegesAppNodeBundle:Node:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function validate()\n {\n $this->validateNode($this->tree);\n }", "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "function thumbwhere_contentcollection_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_actor\n $value = $form['fk_actor']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_actor'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_actor']);\n if (twCanDebug()) debug('fk_actor = ' . $value);\n // Validate fk fk_actor\n if (empty($value)) {\n form_set_error('fk_actor', t('Validation error, \\'fk_actor\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_actor\\' in is mandatory');\n }\n\n // Validate normaltitle\n $value = $form['title']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_contentcollection = $form_state['thumbwhere_contentcollection'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_contentcollection', $thumbwhere_contentcollection, $form, $form_state);\n \n \n \n}", "function nobookoutline_nodetypes_settings_form() {\n $nodetypesobj = node_get_types();\n $options = array();\n foreach($nodetypesobj as $nodetype) {\n $options[$nodetype->type] = $nodetype->type;\n \n }\n \n\t$form['form_nobookoutline_nodetypes'] = array(\n\t\t'#type' => 'select',\n '#title' => t('Select Node Types'),\n '#default_value' => variable_get('form_nobookoutline_nodetypes', \"book\"),\n '#options' => $options,\n\t '#multiple' => TRUE,\n '#description' => t('<b>Select the node types to show book outline.</b>'),\n\t);\n\n\n return system_settings_form($form);\n}", "function guifi_domain_create_form($form_state, $node) {\n\n $ip = guifi_main_ip($node->device_id);\n if (guifi_domain_access('create',$node->sid)) {\n $form['text_add'] = array(\n '#type' => 'item',\n '#value' => t('You are not allowed to create a domain on this service.'),\n '#weight' => 0\n );\n return $form;\n }\n if (empty($ip['ipv4'])) {\n $device = db_fetch_object(db_query('SELECT nick FROM {guifi_devices} WHERE id = %d', $node->device_id));\n $url = url('guifi/device/'.$node->device_id);\n $form['text'] = array(\n '#type' => 'item',\n '#value' => t('The server <a href='.$url.'>'.$device->nick.'</a> does not have an IPv4 address, can not create a domain.')\n );\n return $form;\n} \n $form['domain_type'] = array(\n '#type' => 'select',\n '#title' => t('Select new domain type'),\n '#default_value' => 'none',\n '#options' => array('NULL' => 'none', 'master' => 'Master, ex: newdomain.net','delegation' => 'Delegation, ex: newdomain.guifi.net'),\n '#ahah' => array(\n 'path' => 'guifi/js/add-domain',\n 'wrapper' => 'select_type',\n 'effect' => 'fade',\n )\n );\n $form['domain_type_form'] = array(\n '#prefix' => '<div id=\"select_type\">',\n '#suffix' => '</div>',\n '#type' => 'fieldset',\n );\n\n if ($form_state['values']['domain_type'] == 'master') {\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#size' => 64,\n '#maxlength' => 32,\n '#title' => t('Add a new domain'),\n '#description' => t('Insert domain name'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'master',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['mname'] = array(\n '#type' => 'hidden',\n '#value' => '0',\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n\n if ($form_state['values']['domain_type'] == 'delegation') {\n $ip = guifi_main_ip($node->device_id);\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Add a new delegated Domain Name'),\n '#description' => t('Just the hostname (HOSTNAME.domain.com) will be added before master domain.'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $domqry= db_query(\"\n SELECT *\n FROM {guifi_dns_domains}\n WHERE type = 'master'\n AND public = 'yes'\n ORDER BY name\"\n );\n $values = array();\n while ($type = db_fetch_object($domqry)) {\n $values[$type->name] = $type->name;\n }\n $form['domain_type_form']['mname'] = array(\n '#type' => 'select',\n '#options' => $values,\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'delegation',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n return $form;\n}", "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}", "public function createForm()\n {\n }", "function mongo_node_bundle_create_form_submit($form, $form_state) {\n $entity_type = $form_state['values']['entity_type'];\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n\n // @todo - redirect to bundle type page.\n mongo_node_settings_save($set);\n}", "function gwt_drupal_form_node_form_alter(&$form, &$form_state, $form_id) {\n // Remove if #1245218 is backported to D7 core.\n foreach (array_keys($form) as $item) {\n if (strpos($item, 'field_') === 0) {\n if (!empty($form[$item]['#attributes']['class'])) {\n foreach ($form[$item]['#attributes']['class'] as &$class) {\n // Core bug: the field-type-text-with-summary class is used as a JS hook.\n if ($class != 'field-type-text-with-summary' && strpos($class, 'field-type-') === 0 || strpos($class, 'field-name-') === 0) {\n // Make the class different from that used in theme_field().\n $class = 'form-' . $class;\n }\n }\n }\n }\n }\n}", "function store_post_type(){\n $rules = array(\n array('field'=>'name', 'label'=>'lang:post_type_name', 'rules'=>'trim|required|htmlspecialchars'),\n array('field'=>'description', 'label'=>'lang:post_type_description', 'rules'=>'trim|required|htmlspecialchars'),\n array('field'=>'avatar', 'label'=>'lang:avatar', 'rules'=>'trim|required')\n );\n $this->form_validation->set_rules($rules);\n\n /*Check if the form passed its validation */\n if ($this->form_validation->run() == FALSE) {\n $this->create_post_type();\n }\n else{\n $isCreate = $this->ad_config_model->createPostType();\n if($isCreate){\n redirect(base_url('admin/config/post_types'));\n }else{\n $this->create_post_type();\n }\n }\n }", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function CreateForm();", "public function getSetupForm() {\n\n /**\n * @todo find a beter way to do this\n */\n\n if(!empty($_POST['nodeId'])){\n $this->id = $_POST['nodeId'];\n }\n\n if (empty($this->id)) {\n $table = new HomeNet_Model_DbTable_Nodes();\n $this->id = $table->fetchNextId($this->house);\n }\n // $this->id = 50;\n\n $form = new HomeNet_Form_Node();\n $sub = $form->getSubForm('node');\n $id = $sub->getElement('node');\n $id->setValue($this->id);\n \n $table = new HomeNet_Model_DbTable_Nodes();\n $rows = $table->fetchAllInternetNodes();\n\n $uplink = $sub->getElement('uplink');\n\n foreach($rows as $value){\n $uplink->addMultiOption($value->id, $value->id);\n }\n\n\n return $form;\n }", "function bookcrossing_add_new_book_form() {\n global $user;\n\n $types = node_type_get_types();\n $node = (object) array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => 'bookcrossing', 'language' => LANGUAGE_NONE);\n //drupal_set_title(t('Create @name', array('@name' => $types['bookcrossing']->name)), PASS_THROUGH);\n return drupal_get_form('bookcrossing_node_form', $node, 'add-new-book');\n}", "private function loadNewNodeFormForTestContentType() {\n $this->drupalLogin($this->user);\n $this->drupalGet(self::CONTENT_ADD_PREFIX\n . self::TEST_CONTENT_TYPE_ID);\n $this->assertResponse(200);\n }", "function _or_chart_admin_url_form_validate($form, &$form_state) { \n $nodes = array_filter($form_state['values']['nodes']);\n if (count($nodes) == 0) {\n form_set_error('', t('No items selected.'));\n }\n}", "public abstract function validation();", "public function test_formNodeAdded() : void\n {\n $form = $this->createForm();\n $form->onFormNodeAdded(array($this, 'callback_formNodeAdded'));\n $form->onNodeAdded(array($this, 'callback_nodeAdded'));\n\n $form->addText('foo');\n\n $this->assertTrue($this->formEventCalled);\n $this->assertTrue($this->containerEventCalled);\n }", "function multisite_aggregate_type_form($form, &$form_state, $aggregate_type, $op = 'edit') {\n if ($op == 'clone') {\n $aggregate_type->label .= ' (cloned)';\n $aggregate_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $aggregate_type->label,\n '#description' => t('The human-readable name of this multisite aggregate type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($aggregate_type->type) ? $aggregate_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'multisite_aggregate_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this multisite aggregate type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n $form['source'] = array(\n '#type' => 'fieldset',\n '#title' => t('Source'),\n );\n // Only nodes are allowed for now\n $form['source']['source_type'] = array(\n '#type' => 'hidden',\n '#value' => 'node',\n );\n $form['source']['source_bundle'] = array(\n '#type' => 'select',\n '#title' => t('Node bundle'),\n '#options' => node_type_get_names(),\n '#default_value' => !empty($aggregate_type->source_bundle),\n );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save aggregate type'),\n '#weight' => 40,\n );\n return $form;\n}", "public function create()\n {\n return view('nodes.form')\n ->with('types', NodeType::orderBy('display_name')->get())\n ->with('scripts', ['vendor/unisharp/laravel-ckeditor/ckeditor.js'])\n ->with('action', 'Add');\n }", "function validate_on_create() {}", "function travel_type_form($form, &$form_state, $entity_type, $op = 'edit') {\n // Handle the case when cloning is performed.\n if ($op == 'clone') {\n $entity_type->label .= ' (cloned)';\n $entity_type->type = '';\n }\n\n // Describe all properties of the entity which shall be shown on the form.\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $entity_type->label,\n '#description' => t('The human-readable name of this entity type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($entity_type->type) ? $entity_type->type : '',\n '#maxlength' => 32,\n //'#disabled' => $entity_type->isLocked() && $op != 'clone',\n '#machine_name' => array(\n 'exists' => 'travel_type_load_multiple',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this entity type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n $form['description'] = array(\n '#type' => 'textarea',\n '#default_value' => isset($entity_type->description) ? $entity_type->description : '',\n '#description' => t('Description about the entity type.'),\n );\n\n // Add some buttons.\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save entity type'),\n '#weight' => 40,\n );\n //if (!$entity_type->isLocked() && $op != 'add' && $op != 'clone') {\n $entity_id = entity_id('travel', $entity);\n if (!empty($entity_id)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete entity type'),\n '#weight' => 45,\n '#limit_validation_errors' => array(),\n '#submit' => array('travel_type_form_submit_delete'),\n );\n }\n\n return $form;\n}", "public function postCreate()\n {\n\n // Declare the rules for the form validation\n $rules = array(\n 'name' => 'required'\n );\n\n // Validate the inputs\n $validator = Validator::make(Input::all(), $rules);\n // Check if the form validates with success\n if ($validator->passes())\n {\n // Get the inputs, with some exceptions\n $inputs = Input::except('csrf_token');\n\n $this->type->name = $inputs['name'];\n $this->type->save();\n\n // Was the type created?\n if ($this->type->id)\n {\n // Redirect to the new type page\n return Redirect::to('admin/types/' . $this->type->id . '/edit')->with('success', Lang::get('admin/types/messages.create.success'));\n }\n\n // Redirect to the new type page\n return Redirect::to('admin/types/create')->with('error', Lang::get('admin/types/messages.create.error'));\n\n // Redirect to the type create page\n return Redirect::to('admin/types/create')->withInput()->with('error', Lang::get('admin/types/messages.' . $error));\n }\n\n // Form validation failed\n return Redirect::to('admin/types/create')->withInput()->withErrors($validator);\n }", "function inscription_jesa_manage_validate($form, &$form_state) {\n \n}", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "function validarFormulario()\n\t\t{\n\t\t}", "function validate_relationship_field($field)\n {\n }", "function worx_commerce_term_pricing_node_option_form($form, &$form_id, $node) {\n $form = $possible_fields = $list_fields = $term_fields = $text_fields = $image_fields = array();\n\n // @TODO: This needs to be a var set somewhere.\n $product_field = 'field_product_display_product';\n\n $info = field_info_instances('node', $node->type);\n $line_item_type = $info[$product_field]['display']['default']['settings']['line_item_type'];\n $line_item_info = field_info_instances('commerce_line_item', $line_item_type);\n\n foreach ($line_item_info as $field => $properties) {\n // Setup filter arrays.\n $no_options = array(\n 'commerce_display_path',\n );\n $optionable_types = array(\n 'list_default',\n 'taxonomy_term_reference_link',\n 'text_default',\n 'image',\n );\n\n // This will handle default fields which are the same type as fields we\n // want to create options for.\n if (in_array($field, $no_options)) {\n continue;\n }\n\n // Now we check to make sure we can handle the field type.\n if (in_array($properties['display']['default']['type'], $optionable_types)\n && $properties['commerce_cart_settings']['field_access']) {\n //dsm(field_info_field($field));\n $possible_fields[$field] = $properties['label'];\n\n switch ($properties['display']['default']['type']) {\n case 'list_default':\n $list_fields[$field] = $properties['label'];\n break;\n case 'taxonomy_term_reference_link':\n $term_fields[$field] = $properties['label'];\n break;\n case 'text_default':\n $text_fields[$field] = $properties['label'];\n break;\n case 'image':\n $image_fields[$field] = $properties['label'];\n break;\n }\n }\n }\n $defaults = db_select('commerce_term_pricing_node_options', 'ctpno')\n ->fields('ctpno')\n ->condition('nid', $node->nid)\n ->execute()\n ->fetchAssoc();\n $defaults = unserialize($defaults['options_data']);\n isset($defaults['available_fields']) ? $set_lists = $defaults['available_fields'] : $set_lists = array();\n\n // Now that we have all the pieces we actually create the form!\n // Need the nid for saving into the DB.\n $form['nid'] = array(\n '#type' => 'textfield',\n '#title' => t('Node'),\n '#default_value' => $node->nid,\n '#size' => 25,\n '#maxlength' => 100,\n '#required' => TRUE,\n '#access' => FALSE,\n );\n // Allow the user to select which attributes are available whne adding to cart\n $form['available_fields'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Available Attribute Fields'),\n '#description' => t('Select a field if it should be available as an attribute when adding a product to the cart.'),\n '#options' => $possible_fields,\n '#empty_option' => t('-None-'),\n '#default_value' => $set_lists,\n );\n\n // Each field type has specific fields, so we loop through the active ones\n // and create them.\n foreach ($list_fields as $list_field => $list_label) {\n if (array_key_exists($list_field, $set_lists)) {\n $form[$list_field] = array(\n '#type' => 'fieldset',\n '#title' => t($list_label . ' Setting'),\n '#collapsible' => TRUE, // Added\n '#collapsed' => TRUE, // Added\n );\n $form[$list_field][$list_field . '_required'] = array(\n '#type' => 'checkbox',\n '#title' => t($list_label . ' Field Required?.'),\n '#default_value' => isset($defaults[$list_field . '_required']) ? $defaults[$list_field . '_required'] : FALSE,\n );\n $form[$list_field][$list_field . '_label'] = array(\n '#type' => 'textfield',\n '#title' => t($list_label . ' field Label'),\n '#default_value' => isset($defaults[$list_field . '_label']) ? $defaults[$list_field . '_label'] : $list_label,\n '#description' => t('Change the field label if desired.'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n );\n //Get list options and allow users to select availability\n $list_options = field_info_field($list_field)['settings']['allowed_values'];\n $form[$list_field][$list_field . '_options'] = array(\n '#type' => 'checkboxes',\n '#title' => t($list_label . ' Options'),\n '#options' => $list_options,\n '#default_value' => isset($defaults[$list_field . '_options']) ? $defaults[$list_field . '_options'] : array(),\n '#description' => t('Select which options are available for this attribute on this product.'),\n );\n }\n }\n\n foreach ($term_fields as $term_field => $term_label) {\n if (array_key_exists($term_field, $set_lists)) {\n $form[$term_field] = array(\n '#type' => 'fieldset',\n '#title' => t($term_label . ' Setting'),\n '#collapsible' => TRUE, // Added\n '#collapsed' => TRUE, // Added\n );\n $form[$term_field][$term_field . '_required'] = array(\n '#type' => 'checkbox',\n '#title' => t($term_label . ' Field Required?.'),\n '#default_value' => isset($defaults[$term_field . '_required']) ? $defaults[$term_field . '_required'] : FALSE,\n );\n $form[$term_field][$term_field . '_label'] = array(\n '#type' => 'textfield',\n '#title' => t($term_label . ' field Label'),\n '#default_value' => isset($defaults[$term_field . '_label']) ? $defaults[$term_field . '_label'] : $term_label,\n '#description' => t('Change the field label if desired.'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n );\n $term_options = array();\n $term_vocab = taxonomy_vocabulary_machine_name_load(field_info_field($term_field)['settings']['allowed_values'][0]['vocabulary']);\n $vocab_tree = taxonomy_get_tree($term_vocab->vid);\n foreach ($vocab_tree as $term) {\n $term_options[$term->tid] = $term->name;\n }\n $form[$term_field][$term_field . '_options'] = array(\n '#type' => 'checkboxes',\n '#title' => t($term_label . ' Options'),\n '#options' => $term_options,\n '#default_value' => isset($defaults[$term_field . '_options']) ? $defaults[$term_field . '_options'] : array(),\n '#description' => t('Select which options are available for this attribute on this product.'),\n );\n }\n }\n \n foreach ($text_fields as $text_field => $text_label) {\n if (array_key_exists($text_field, $set_lists)) {\n $form[$text_field] = array(\n '#type' => 'fieldset',\n '#title' => t($text_label . ' Setting'),\n '#collapsible' => TRUE, // Added\n '#collapsed' => TRUE, // Added\n );\n $form[$text_field][$text_field . '_required'] = array(\n '#type' => 'checkbox',\n '#title' => t($text_label . ' Field Required?.'),\n '#default_value' => isset($defaults[$text_field . '_required']) ? $defaults[$text_field . '_required'] : FALSE,\n );\n $form[$text_field][$text_field . '_label'] = array(\n '#type' => 'textfield',\n '#title' => t($text_label . ' field Label'),\n '#default_value' => isset($defaults[$text_field . '_label']) ? $defaults[$text_field . '_label'] : $text_label,\n '#description' => t('Change the field label if desired.'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n );\n }\n }\n \n foreach ($image_fields as $image_field => $image_label) {\n if (array_key_exists($image_field, $set_lists)) {\n $form[$image_field] = array(\n '#type' => 'fieldset',\n '#title' => t($image_label . ' Setting'),\n '#collapsible' => TRUE, // Added\n '#collapsed' => TRUE, // Added\n );\n $form[$image_field][$image_field . '_required'] = array(\n '#type' => 'checkbox',\n '#title' => t($image_label . ' Field Required?.'),\n '#default_value' => isset($defaults[$image_field . '_required']) ? $defaults[$image_field . '_required'] : FALSE,\n );\n $form[$image_field][$image_field . '_label'] = array(\n '#type' => 'textfield',\n '#title' => t($image_label . ' field Label'),\n '#default_value' => isset($defaults[$image_field . '_label']) ? $defaults[$image_field . '_label'] : $image_label,\n '#description' => t('Change the field label if desired.'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n );\n $form[$image_field][$image_field . '_max'] = array(\n '#type' => 'select',\n '#title' => t('Maximum Number of Images'),\n '#options' => range(0, 1),\n '#empty_option' => t('-none-'),\n '#required' => FALSE,\n '#default_value' => isset($defaults[$image_field . '_max']) ? $defaults[$image_field . '_max'] : array(),\n );\n }\n }\n\n $form['#validate'][] = 'worx_commerce_term_pricing_options_validate';\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save')\n );\n\n return $form;\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}", "public function postEdit(NodeFormRequest $request)\n { \n // first we save the node model\n $node = $this->nodeModel->find($request->input('id'));\n \n // save the node model\n $node->type = $request->input('type');\n $node->title = $request->input('title');\n $node->save();\n \n $nodeType = $node->nodeType;\n if($nodeType) {\n // instantiate nodeType model\n $nodeType->nid = $request->input('id');\n $nodeType->body = $request->input('body');\n // save model\n $nodeType->save();\n } else{\n \n $this->nodeTypeModel->create($request->input());\n }\n // we will flash a notification\n Notification::success($request->input('type') . ' page has been updated');\n return redirect()->route('admin.home');\n }", "public function validate_fields() {\n \n\t\t//...\n \n }", "function simple_rtmp_node_form_validate($form, &$form_state) {\n //Add JS for effects\n $js_path = drupal_get_path('module','simple_rtmp') . '/simple_rtmp.js';\n drupal_add_js($js_path);\n \n //Validate stream type\n if($form['stream_type']) {\n if($form['stream_type']['#value'] != 1 && $form['stream_type']['#value'] != 2) {\n form_set_error('stream_type', t('Invalid stream type specified.'));\n } \n }\n \n //Validate rtmp_url\n if($form['rtmp_url'][\"#value\"]) {\n $stream = strtolower($form['rtmp_url']['#value']);\n if(substr($stream,0,4) != 'rtmp' && substr($stream,0,4) != 'http') {\n form_set_error('rtmp_url', t('Invalid url specified for RTMP Stream URL.'));\n }\n } \n \n //Handle conditional playlist type validation\n \n //Ensure an rtmp url is specified if stream type is rtmp\n if($form['stream_type']['#value'] == 1 && empty($form['rtmp_url'][\"#value\"])) {\n form_set_error('rtmp_url', t('RTMP URL required for specified stream type.'));\n }\n \n //Handle uploading of playlist file\n if(!empty($_FILES['files']['tmp_name']['playlist_file_upload'])) {\n $validators = array(\n 'file_validate_extensions' => array('xml')\n );\n \n //Handle path creation\n $path = SIMPLE_RTMP_DIR . '/playlists';\n if(!file_exists($path)) {\n mkdir($path,0775,TRUE);\n } \n $playlist_file = file_save_upload('playlist_file_upload', $validators, $path);\n \n if (!$playlist_file)\n form_set_error('playlist_file_upload', 'Invalid playlist file uploaded.');\n else {\n $form_state['values']['playlist_file'] = $playlist_file;\n }\n }\n \n //Handle uploading of icon file\n if(!empty($_FILES['files']['tmp_name']['icon_file_upload'])) {\n $validators = array(\n 'file_validate_is_image' => array(),\n );\n \n //Handle path creation\n $path = SIMPLE_RTMP_DIR . '/icons';\n if(!file_exists($path)) {\n mkdir($path,0775,TRUE);\n } \n \n $icon_file = file_save_upload('icon_file_upload', $validators, $path);\n \n if (!$icon_file)\n form_set_error('icon_file_upload', 'Invalid icon file uploaded.');\n else {\n $form_state['values']['icon_file'] = $icon_file;\n }\n }\n}", "function restapi_admin_form_validate($form, &$form_state) {\n\n $class = isset($form_state['values']['restapi_default_auth_class']) ? $form_state['values']['restapi_default_auth_class'] : NULL;\n $prefix = isset($form_state['values']['restapi_url_prefix']) ? $form_state['values']['restapi_url_prefix'] : NULL;\n\n if ($class && !class_exists($class)) {\n form_set_error('restapi_default_auth_class', t('The class \"@class\" does not seem to exist, or is not callable.', [\n '@class' => $class,\n ]));\n }\n\n if ($prefix != variable_get('restapi_url_prefix')) {\n $form_state['storage']['restapi_url_prefix_changed'] = TRUE;\n\n $prefix = trim($prefix);\n $prefix = rtrim($prefix, '/');\n $prefix = ltrim($prefix, '/');\n $form_state['values']['restapi_url_prefix'] = $prefix;\n }\n\n}", "function pdfbulletin_settings_form_validate(&$form, &$form_state) {\n // @todo SERIOUSLY\n}", "function _mongo_node_type_exists($entity_type) {\n $set = mongo_node_settings();\n if (isset($set[$entity_type])) {\n return TRUE;\n }\n\n return FALSE;\n}", "public function ajax_create_field() {\n global $wpdb;\n\n $data = array();\n $field_options = $field_validation = '';\n\n foreach ($_REQUEST['data'] as $k) {\n $data[$k['name']] = $k['value'];\n }\n\n check_ajax_referer('create-field-' . $data['form_id'], 'nonce');\n\n $form_id = absint($data['form_id']);\n $field_key = esc_html($_REQUEST['field_key']);\n $field_name = ucwords(esc_html(str_replace('_', ' ', $field_key)));\n $field_type = strtolower(sanitize_title($_REQUEST['field_type']));\n $field_description = ucwords(str_replace('_', ' ', $field_key));\n\n // Set defaults for validation\n switch ($field_type) {\n case 'select' :\n if ($field_key == 'gender') {\n $field_options = serialize(array('male' => 'Male', 'female' => 'Female', 'not specified' => 'Not Specified'));\n } else if ($field_key == 'title') {\n $field_options = serialize(array('mr' => 'Mr', 'mrs' => 'Mrs', 'ms' => 'Ms', 'dr' => 'Dr', 'not specified' => 'Not Specified'));\n } else {\n $field_options = serialize(array('Option 1', 'Option 2', 'Option 3'));\n }\n break;\n case 'radio' :\n case 'checkbox' :\n $field_options = serialize(array('Option 1', 'Option 2', 'Option 3'));\n break;\n case 'email' :\n case 'url' :\n case 'phone' :\n $field_validation = $field_type;\n break;\n\n case 'currency' :\n $field_validation = 'number';\n break;\n\n case 'number' :\n $field_validation = 'digits';\n break;\n\n case 'time' :\n $field_validation = 'time-12';\n break;\n\n case 'file-upload' :\n $field_options = ($field_key == 'profile_image') ? serialize(array('png|jpe?g|gif')) : '';\n break;\n }\n\n $newdata = array(\n 'form_id' => $form_id,\n 'field_key' => $field_key,\n 'field_name' => $field_name,\n 'field_type' => $field_type,\n 'field_options' => $field_options,\n 'field_validation' => $field_validation,\n 'field_description' => $field_description\n );\n\n $insert_id = $this->create_field($newdata);\n\n $query = $wpdb->prepare(\"SELECT form_id FROM $this->form_table_name WHERE form_type= 1 AND `form_membership_level` = \"\n . \" (SELECT `form_membership_level` FROM $this->form_table_name WHERE form_type= 0 AND `form_id` = %d)\", $form_id);\n $edit_form = $wpdb->get_var($query);\n if (!empty($edit_form)) {\n $newdata['form_id'] = $edit_form;\n $this->create_field($newdata, $insert_id);\n }\n\n echo $this->field_output($form_id, $insert_id);\n\n die(1);\n }", "private function validateForm(): void\n { if ($this->form->isSubmitted()) {\n // get the status\n $status = $this->getRequest()->request->has('saveAsDraft') ? 'draft' : 'active';\n\n // cleanup the submitted fields, ignore fields that were added by hackers\n $this->form->cleanupFields();\n\n // validate fields\n $this->form->getField('title')->isFilled(BL::err('TitleIsRequired'));\n $this->form->getField('text')->isFilled(BL::err('FieldIsRequired'));\n $this->form->getField('publish_on_date')->isValid(BL::err('DateIsInvalid'));\n $this->form->getField('publish_on_time')->isValid(BL::err('TimeIsInvalid'));\n $this->form->getField('category_id')->isFilled(BL::err('FieldIsRequired'));\n if ($this->form->getField('category_id')->getValue() == 'new_category') {\n $this->form->getField('category_id')->addError(BL::err('FieldIsRequired'));\n }\n\n // validate meta\n $this->meta->validate();\n\n if ($this->form->isCorrect()) {\n // build item\n $item = [\n 'id' => (int) BackendBlogModel::getMaximumId() + 1,\n 'meta_id' => $this->meta->save(),\n 'category_id' => (int) $this->form->getField('category_id')->getValue(),\n 'user_id' => $this->form->getField('user_id')->getValue(),\n 'language' => BL::getWorkingLanguage(),\n 'title' => $this->form->getField('title')->getValue(),\n 'introduction' => $this->form->getField('introduction')->getValue(),\n 'text' => $this->form->getField('text')->getValue(),\n 'publish_on' => BackendModel::getUTCDate(\n null,\n BackendModel::getUTCTimestamp(\n $this->form->getField('publish_on_date'),\n $this->form->getField('publish_on_time')\n )\n ),\n 'created_on' => BackendModel::getUTCDate(),\n 'hidden' => $this->form->getField('hidden')->getValue(),\n 'allow_comments' => $this->form->getField('allow_comments')->getChecked(),\n 'num_comments' => 0,\n 'status' => $status,\n ];\n $item['edited_on'] = $item['created_on'];\n\n // insert the item\n $item['revision_id'] = BackendBlogModel::insert($item);\n\n if ($this->imageIsAllowed) {\n // the image path\n $imagePath = FRONTEND_FILES_PATH . '/Blog/images';\n\n // create folders if needed\n $filesystem = new Filesystem();\n $filesystem->mkdir([$imagePath . '/source', $imagePath . '/128x128']);\n\n // image provided?\n if ($this->form->getField('image')->isFilled()) {\n // build the image name\n $item['image'] = $this->meta->getUrl()\n . '-' . BL::getWorkingLanguage()\n . '-' . $item['revision_id']\n . '.' . $this->form->getField('image')->getExtension();\n\n // upload the image & generate thumbnails\n $this->form->getField('image')->generateThumbnails($imagePath, $item['image']);\n\n // add the image to the database without changing the revision id\n BackendBlogModel::updateRevision($item['revision_id'], ['image' => $item['image']]);\n }\n }\n\n // save the tags\n BackendTagsModel::saveTags($item['id'], $this->form->getField('tags')->getValue(), $this->url->getModule());\n\n // active\n if ($item['status'] == 'active') {\n // add search index\n BackendSearchModel::saveIndex($this->getModule(), $item['id'], ['title' => $item['title'], 'text' => $item['text']]);\n\n // everything is saved, so redirect to the overview\n $this->redirect(BackendModel::createUrlForAction('Index') . '&report=added&var=' . rawurlencode($item['title']) . '&highlight=row-' . $item['revision_id']);\n } elseif ($item['status'] == 'draft') {\n // draft: everything is saved, so redirect to the edit action\n $this->redirect(BackendModel::createUrlForAction('Edit') . '&report=saved-as-draft&var=' . rawurlencode($item['title']) . '&id=' . $item['id'] . '&draft=' . $item['revision_id'] . '&highlight=row-' . $item['revision_id']);\n }\n }\n }\n }", "abstract protected function fieldValidation($submittedData);", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function mongo_node_bundle_edit_form_submit($form, $form_state) {\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['bundle_type']['entity_type'];\n $old_bundle_type = $form_state['values']['bundle_type']['bundle'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_bundle_type) {\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n $set[$entity_type]['bundles'][$machine_name] = $set[$entity_type]['bundles'][$old_bundle_type];\n unset($set[$entity_type]['bundles'][$old_bundle_type]);\n\n // Update existing mongo entities with new bundle.\n //_mongo_node_update_bundle($entity_type, $old_bundle_type, $machine_name);\n }\n else {\n $set[$entity_type]['bundles'][$machine_name]['label'] = $label;\n $set[$entity_type]['bundles'][$machine_name]['description'] = $description;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function form_backend_validation()\r\n {\r\n return true ;\r\n }", "abstract protected function getFormType(): string;", "function process(&$dom, &$formnode) {\n\t\t$formerrors = $this->readform();\n\t\tif(count($formerrors) > 0) {\n\t\t\tforeach($formerrors as $error) {\n\t\t\t\t$node = $formnode->appendChild($dom->createElement(\"formerror\"));\n\t\t\t\t$node->setAttribute(\"type\", $error);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Attempt MySQL add\n\t\t$result = $this->ftpmirror->addmirror();\n\t\tif(PEAR::isError($result)) {\n\t\t\t$node = $formnode->appendChild($dom->createElement(\"error\"));\n\t\t\t$node->appendChild($dom->createTextNode($result->getMessage()));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Report success\n\t\tif($result) {\n\t\t\t$node = $formnode->appendChild($dom->createElement(\"added\"));\n\t\t\t$this->ftpmirror->add_to_node($dom, $node);\n\t\t\t$this->ftpmirror = new FTPMirror();\n\t\t}\n\n\t\treturn;\n\t}", "function thumbwhere_contentcollectionitem_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_contentcollection\n $value = $form['fk_contentcollection']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_contentcollection'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_contentcollection']);\n if (twCanDebug()) debug('fk_contentcollection = ' . $value);\n // Validate fk fk_contentcollection\n if (empty($value)) {\n form_set_error('fk_contentcollection', t('Validation error, \\'fk_contentcollection\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_contentcollection\\' in is mandatory');\n }\n\n // Convert fk autocomplete for fk_content\n $value = $form['fk_content']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_content'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_content']);\n if (twCanDebug()) debug('fk_content = ' . $value);\n // Validate fk fk_content\n if (empty($value)) {\n form_set_error('fk_content', t('Validation error, \\'fk_content\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_content\\' in is mandatory');\n }\n\n // Validate normalweight\n $value = $form['weight']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_contentcollectionitem = $form_state['thumbwhere_contentcollectionitem'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_contentcollectionitem', $thumbwhere_contentcollectionitem, $form, $form_state);\n \n \n \n}", "public function testNewEntityType(): void {\n\n $res = FormFactory::newEntityType(NavigationNode::class, $this->entities);\n $this->assertCount(3, $res);\n $this->assertArrayHasKey(\"class\", $res);\n $this->assertArrayHasKey(\"choice_label\", $res);\n $this->assertArrayHasKey(\"choices\", $res);\n\n $this->assertEquals(NavigationNode::class, $res[\"class\"]);\n\n $this->assertCount(3, $res[\"choices\"]);\n $this->assertSame($this->entities[0], $res[\"choices\"][0]);\n $this->assertSame($this->entities[1], $res[\"choices\"][1]);\n $this->assertSame($this->entities[2], $res[\"choices\"][2]);\n\n $this->assertIsCallable($res[\"choice_label\"]);\n $this->assertEquals(\"─ This option must implements [Translated]ChoiceLabelInterface\", $res[\"choice_label\"]($res[\"choices\"][0]));\n $this->assertEquals(\"─ This option must implements [Translated]ChoiceLabelInterface\", $res[\"choice_label\"]($res[\"choices\"][1]));\n $this->assertEquals(\"─ This option must implements [Translated]ChoiceLabelInterface\", $res[\"choice_label\"]($res[\"choices\"][2]));\n }", "public function isValidNode();", "public function createAction($type)\n {\n if (!$type) {\n return $this->redirect($this->generateUrl('resymf_admin_dashboard'), 301);\n }\n $em = $this->getDoctrine()->getManager();\n\n $request = $this->container->get('request');\n $routeName = $request->get('_route');\n\n $adminConfigurator = $this->get('resymfcms.configurator.admin');\n $objectConfigurator = $this->get('resymfcms.configurator.object');\n\n $objectMapper = $this->get('resymfcms.object.mapper');\n\n $objectType = $objectMapper->getMappedObject($type);\n $annotationReader = $this->get('resymfcms.annotation.reader');\n\n $formConfig = $annotationReader->readFormAnnotation($objectType);\n\n if ($request->isMethod('POST')) {\n $object = new $objectType();\n\n// echo '<pre>';\n// print_r($formConfig->fields);\n// die();\n foreach ($formConfig->fields as $field) {\n $fieldType = $field['type'];\n $fieldRelationType = $field['relationType'];\n $methodName = 'set' . $field['name'];\n\n// if()\n switch ($fieldType) {\n case 'relation':\n $class = $field['class'];\n $targetEntityField = $field['targetEntityField'];\n $relationObjects = $em->getRepository($class)\n ->createQueryBuilder('q')\n ->where('q.id IN(:id)')\n ->setParameter('id', $request->get($field['name']))\n// ->setMaxResults()\n ->getQuery()\n ->getResult();\n// print_r($relationObject);\n $addMethodName2 = 'set' . $field['name'];\n if($fieldRelationType == 'manyToOne' || $fieldRelationType == 'oneToOne') {\n $object->$addMethodName2($relationObjects[0]);\n }else {\n $object->$addMethodName2($relationObjects);\n }\n foreach ($relationObjects as $relationObject) {\n\n if ($relationObject) {\n\n $addMethodName = 'set' . $type;\n $addMethodName2 = 'set' . $field['name'];\n\n if ($fieldRelationType == 'oneToMany') {\n $addMethodName2 = 'add' . $field['name'];\n\n }\n if ($fieldRelationType = 'manyToMany' || $fieldRelationType = 'multiselect') {\n $addMethodName2 = 'add' . $targetEntityField;\n } else { ///toOne\n $relationObject->$addMethodName($object);\n }\n\n }\n }\n\n \n break;\n case 'date':\n $object->$methodName(new \\DateTime($request->get($field['name'])));\n break;\n case 'file':\n// echo $field['name'];\n// print_r($request->get($field['name']));\n// die();\n $object->$methodName(json_encode($request->get($field['name'])));\n break;\n default:\n $object->$methodName($request->get($field['name']));\n }\n\n }\n\n $objectConfigurator->setInitialValuesFromAnnotations($objectType, $object, $type);\n $em->persist($object);\n $em->flush();\n return $this->redirect($this->generateUrl('object_edit', array('type' => $type, 'id' => $object->getId())), 301);\n }\n\n if (!isset($object)) {\n $object = false;\n }\n $multiSelectValues = $objectConfigurator->generateMultiSelectOptions($objectType, $object);\n\n return $this->render('ReSymfCmsBundle:adminmenu:create.html.twig', array('menu' => $adminConfigurator->getAdminConfig(), 'site_config' => $adminConfigurator->getSiteConfig(), 'form_config' => $formConfig, 'route' => $routeName, 'multi_select' => $multiSelectValues));\n }", "public function validFormAdd(Application $app, Request $req) {\n $date = new Helper_Date();\n\n if (isset($_POST['descriptif']) && isset($_POST['type_id']) and isset($_POST['descriptif']) and isset($_POST['photo'])) {\n $donnees = [\n 'descriptif' => htmlspecialchars($_POST['descriptif']), // echapper les entrées\n 'type_id' => htmlspecialchars($req->get('type_id')), //$app['request']-> ne focntionne plus\n 'prixDeBase' => htmlspecialchars($req->get('prixDeBase')),\n 'taille' => htmlspecialchars($req->get('taille')),\n 'photo' => $app->escape($req->get('photo')), //$req->query->get('photo')-> ne focntionne plus\n 'dateAchat'=> htmlspecialchars($req->get('dateAchat'))\n ];\n if ((! preg_match(\"/^[A-Za-z ]{2,}/\",$donnees['descriptif']))) $erreurs['descriptif']='nom composé de 2 lettres minimum';\n if(! is_numeric($donnees['type_id']))$erreurs['type_id']='veuillez saisir une valeur';\n if(! is_numeric($donnees['prixDeBase']))$erreurs['prixDeBase']='saisir une valeur numérique';\n if(! is_numeric($donnees['taille']))$erreurs['taille']='saisir une valeur numérique';\n if(! preg_match(\"/[A-Za-z0-9]{2,}.(jpeg|jpg|png)/\",$donnees['photo'])) $erreurs['photo']='nom de fichier incorrect (extension jpeg , jpg ou png)';\n\n if(! $date->isValidDate($donnees['dateAchat'])) {\n\n $erreurs['dateAchat']='Date Invalide';\n }\n else\n {\n $donnees['dateAchat'] = $date->convertFRtoUS($donnees['dateAchat']);\n }\n\n if(! empty($erreurs))\n {\n $this->typeModel = new TypeModel($app);\n $types = $this->typeModel->getAllType();\n return $app[\"twig\"]->render('backOffice/Vetement/1add.html.twig',['donnees'=>$donnees,'erreurs'=>$erreurs,'types'=>$types]);\n }\n else\n {\n $this->VetementModel = new VetementModel($app);\n $this->VetementModel->insertVetement($donnees);\n return $app->redirect($app[\"url_generator\"]->generate(\"vetement.index\"));\n }\n\n }\n else\n return $app->abort(404, 'error Pb data form Add');\n }", "function mongo_node_admin_content($form, $form_state, $entity_type) {\n $settings = mongo_node_settings();\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n );\n\n $filters = mongo_node_filters($entity_type);\n $applied_filters = isset($_SESSION[$entity_type . '_filters']) ? $_SESSION[$entity_type . '_filters'] : array();\n\n foreach ($filters as $f_type_name => $f_type) {\n $form['filters'][$f_type_name] = array('#type' => 'select', '#title' => $f_type_name);\n foreach ($f_type as $f_name => $f_val) {\n $form['filters'][$f_type_name]['#options'][$f_name] = $f_val['label'];\n }\n }\n\n $items = array();\n $remaining_filters = array();\n foreach ($applied_filters as $app_filter) {\n $items[] = t('where %f_name is %f_val', array('%f_name' => $app_filter['#type'], '%f_val' => $app_filter['#value']));\n $conditions = $filters[$app_filter['#type']][$app_filter['#value']]['filters'];\n foreach ($conditions as $condition) {\n $remaining_filters[$condition['#type']]['#callback'] = $condition['#callback'];\n $remaining_filters[$condition['#type']]['#value'][] = $condition['#value'];\n }\n }\n\n $form['filters']['#description'] = theme('item_list', array('items' => $items));\n\n if (empty($applied_filters)) {\n $form['filters']['filter'] = array(\n '#type' => 'submit',\n '#value' => 'Filter',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n else {\n $form['filters']['refine'] = array(\n '#type' => 'submit',\n '#value' => 'Refine',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['undo'] = array(\n '#type' => 'submit',\n '#value' => 'Undo',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => 'Reset',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Update options'),\n );\n\n $operations = mongo_node_operations();\n foreach ($operations as $op => $op_set) {\n $options[$op] = $op_set['label'];\n }\n $form['options']['operation'] = array(\n '#type' => 'select',\n '#options' => $options,\n );\n\n $form['options']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Update'),\n '#validate' => array('mongo_node_operation_validate'),\n '#submit' => array('mongo_node_operation_submit'),\n );\n\n $query = new EntityFieldQuery();\n\n $query->entityCondition('entity_type', $entity_type)\n ->propertyOrderBy('created', 'DESC')\n ->pager(10);\n\n // Actually apply filters.\n foreach ($remaining_filters as $r_name => $r_values) {\n $query->{$r_values['#callback']}($r_name, $r_values['#value'], 'IN');\n }\n\n $result = $query->execute();\n\n $languages = language_list();\n $destination = drupal_get_destination();\n $header = array(\n 'title' => array('data' => t('Title'), 'field' => 'title'),\n 'type' => t('Type'),\n 'author' => t('Author'),\n 'status' => t('Status'),\n 'changed' => t('Updated'),\n 'language' => t('Language'),\n 'operations' => t('Operations'),\n );\n $options = array();\n\n if (isset($result[$entity_type])) {\n $ids = array_keys($result[$entity_type]);\n $entities = entity_load($entity_type, $ids);\n\n foreach ($result[$entity_type] as $id => $efq_entity) {\n $entity = entity_load($entity_type, array($id));\n $entity = reset($entity);\n\n $entity_uri = entity_uri($entity_type, $entity);\n\n $options[$id] = array(\n 'title' => array(\n 'data' => array(\n '#type' => 'link',\n '#title' => $entity->title,\n '#href' => $entity_uri['path'],\n ),\n ),\n 'type' => check_plain($settings[$entity_type]['bundles'][$entity->type]['label']),\n 'author' => theme('username', array('account' => $entity)),\n 'status' => $entity->status ? t('published') : t('not published'),\n 'changed' => format_date($entity->changed, 'short'),\n 'language' => ($entity->language == LANGUAGE_NONE) ? t('Language neutral') : $languages[$entity->language]->name,\n );\n\n $operations = array();\n $operations[] = l(t('edit'), $entity_uri['path'] . '/edit', array('query' => $destination));\n $operations[] = l(t('delete'), $entity_uri['path'] . '/delete', array('query' => $destination));\n\n $options[$id]['operations'] = theme('item_list', array('items' => $operations, 'attributes' => array('class' => 'inline')));\n }\n }\n\n $form['entities'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n '#empty' => t('No content available'),\n );\n\n $form['pager'] = array(\n '#theme' => 'pager',\n );\n\n return $form;\n}", "function os2dagsorden_create_agenda_meeting_create_user_form($form, &$form_state) {\r\n $form_state['meeting_data'] = json_encode($form_state['values']);\r\n $form[] = array(\r\n '#markup' => '<h1 class=\"title\">' . t('External user') . '</h1>',\r\n );\r\n\r\n $form[] = array(\r\n '#markup' => '<div class=\"node\">',\r\n );\r\n $form['firstname'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Firstname'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n );\r\n $form['lastname'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Lastname'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n );\r\n $form['email'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Email'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n '#element_validate' => array('_os2dagsorden_create_agenda_meeting_create_user_form_email_validate'),\r\n );\r\n $form['save_bullet_point'] = array(\r\n '#type' => 'submit',\r\n '#value' => t('Save'),\r\n '#submit' => array('_os2dagsorden_create_agenda_meeting_create_user_form_submit'),\r\n );\r\n $form[] = array(\r\n '#markup' => '</div>',\r\n );\r\n $form['#attached']['css'] = array(\r\n drupal_get_path('module', 'os2dagsorden_create_agenda') . '/css/form_theme.css',\r\n );\r\n return $form;\r\n}", "public function options_form_validate($form, &$form_state) {\n // Context module doesn't allow for validation of reaction fields.\n // @todo: Raise bug for context module.\n }", "function osa_form_alter_group_class_node_form(&$form, &$form_state) {\r\n \r\n // hide fields that are auto populated\r\n hide($form['field_event_summary']);\r\n hide($form['body']);\r\n}", "function onlinepdf_node_validate($node, $form, &$form_state)\r\n{\r\n $load = sys_getloadavg();\r\n if ($load[0] > variable_get('onlinepdf_max_load', 16) || $load[1] > variable_get('onlinepdf_max_5min_load', 8)) {\r\n form_set_error(\"submit\", t('The pdfjpg service is currently overloaded! Please wait a few minutes before submitting again.', array()));\r\n watchdog('load', 'The systemload is %load! Conversion process on hold.', array('%load' => $load[0]), WATCHDOG_WARNING);\r\n };\r\n //$form_state['submit_handlers'][] = '_custom_request_node_disable_msg';\r\n}", "function acf_validate_save_post()\n {\n }", "function acf_validate_save_post()\n {\n }", "function acf_validate_save_post()\n {\n }", "function acf_validate_save_post()\n {\n }", "public function createValidator();", "function helper_import_add_form(&$form_state) {\n global $user;\n $form = array();\n\n //drupal_set_message(print_r($form_state));\n\n // Check if the user can create something.\n $types = node_import_types();\n if (empty($types)) {\n form_set_error('', t('No tiene permisos para crear contenidos. <a href=\"!permissions\">Asigne correctamente los permisos</a> en la página de administración.', array('!permissions' => url('admin/user/permissions'))));\n }\n\n // ------------------------------------------------------------\n // Get the currently filled in values of the form.\n $form_state['storage'] = isset($form_state['storage']) ? $form_state['storage'] : array();\n $form_state['values'] = isset($form_state['values']) ? $form_state['values'] : array();\n $values = array_merge($form_state['storage'], $form_state['values']);\n\n // ------------------------------------------------------------\n // Check and store the page we are on.\n $pages = array(\n 'file' => array(\n 'title' => t('Select file'),\n 'description' => t('Seleccione el archivo <a href=\"http://es.wikipedia.org/wiki/CSV\" target=\"_blank\">CSV</a> que contiene los datos a importar.<br>Un archivo CSV, es un archivo donde los datos se encuentran separados por coma. Cada dato contenido entre comas se denomina campo, el cual debe estar entre comillas dobles.<br>Puede descargar un ejemplo de archivo CSV <a href=\"http://localhost/nuevo_sistema_mp/sites/default/files/ejemplo.csv\">aqui</a>.'),\n ),\n 'preview' => array(\n 'title' => t('Vista Previa'),\n 'description' => t('Aquí pueda visualizar previamente los datos a importar. Si encuentra errores puede hacer volver %back o comenzar de nuevo. También puede recargar solo esta página por si ocurrió un error al cargarla %reload.', array('%reload' => t('Recargar'), '%back' => t('Atrás'))),\n ),\n 'start' => array(\n 'title' => t('Iniciar Importación'),\n 'description' => t('Si todo está correcto, clic %start.', array('%start' => t('Start import'))),\n ),\n );\n\n $page_keys = array_keys($pages);\n $first_page = $page_keys[0];\n $last_page = $page_keys[count($page_keys) - 1];\n\n $page = isset($values['page']) ? $values['page'] : $first_page;\n $form['#pages'] = $pages;\n $form_state['storage']['page'] = $page;\n\n // ------------------------------------------------------------\n // Set title and description for the current page.\n $steps = count($pages);\n $step = array_search($page, $page_keys) + 1;\n\n if ($page !== 'intro') {\n drupal_set_title(t('@title (Paso @step de @steps)', array('@title' => $pages[$page]['title'], '@step' => $step, '@steps' => $steps)));\n }\n\n $form['help'] = array(\n '#value' => '<div class=\"help\">'. $pages[$page]['description'] .'</div>',\n '#weight' => -50,\n );\n\n // ------------------------------------------------------------\n // Select or upload a file.\n if ($page == 'file') {\n $files = node_import_list_files(TRUE);\n\n $form['file_select'] = array(\n '#type' => 'item',\n '#title' => t('Seleccione el archivo'),\n '#theme' => 'node_import_file_select',\n );\n\n if (isset($values['fid'])) {\n foreach ($files as $fid => $file) {\n if ($fid == $values['fid']) {\n $file_owner = user_load(array('uid' => $file->uid));\n $form['file_select'][$fid] = array(\n 'filename' => array('#value' => $file->filename),\n 'filepath' => array('#value' => $file->filepath),\n 'filesize' => array('#value' => format_size($file->filesize)),\n 'timestamp' => array('#value' => format_date($file->timestamp, 'small')),\n 'uid' => array('#value' => ($file->uid == 0 ? t('Public FTPd file') : theme('username', $file_owner))),\n );\n $aux_files = node_import_extract_property($files, 'filename'); \n $form['file_select']['fid'] = array(\n '#type' => 'radios',\n '#options' => $aux_files['fid'],\n '#default_value' => isset($values['fid']) ? $values['fid'] : 0,\n );\n }\n }\n set_content_type($form_state);\n set_file_options($form_state);\n map_fields($form_state);\n }\n else {\n $form['file_select']['fid'] = array(\n '#type' => 'item',\n '#value' => t('No files available.'),\n );\n }\n\n $form['#attributes'] = array('enctype' => 'multipart/form-data');\n\n $form['upload'] = array(\n '#type' => 'fieldset',\n '#title' => t('Upload file'),\n '#description' => t(''),\n '#collapsible' => FALSE,\n '#collapsed' => FALSE,\n );\n $form['upload']['file_upload'] = array(\n '#type' => 'file',\n );\n $form['upload']['file_upload_button'] = array(\n '#type' => 'submit',\n '#value' => t('Upload'),\n '#submit' => array('node_import_add_form_submit_upload_file'),\n );\n }\n\n // ------------------------------------------------------------\n // Preview.\n if ($page == 'preview') {\n $form['preview_count'] = array(\n '#type' => 'select',\n '#title' => t('Number of records to preview'),\n '#default_value' => isset($values['preview_count']) ? $values['preview_count'] : variable_get('node_import:preview_count', 5),\n '#options' => drupal_map_assoc(array(5, 10, 15, 25, 50, 100, 150, 200)),\n );\n\n $form['preview'] = array(\n '#title' => t('Previa'),\n );\n\n foreach ($values['previews'] as $i => $preview) {\n $form['preview'][] = array(\n '#type' => 'item',\n '#title' => t('Record @count', array('@count' => $i + 1)),\n '#value' => $preview,\n );\n }\n }\n\n // ------------------------------------------------------------\n // Start import.\n if ($page == 'start') {\n $files = node_import_list_files();\n $file = $files[$values['fid']]; \n $form[] = helper_import_task_details($values);\n }\n\n // ------------------------------------------------------------\n // Add Back, Next and/or Start buttons.\n $form['buttons-bottom'] = array(\n '#weight' => 50,\n );\n $form['buttons-bottom']['back_button'] = array(\n '#type' => 'submit',\n '#value' => t('Back'),\n '#submit' => array('node_import_add_form_submit_back'),\n '#disabled' => ($page == $first_page),\n );\n $form['buttons-bottom']['reload_button'] = array(\n '#type' => 'submit',\n '#value' => t('Reload page'),\n '#submit' => array('node_import_add_form_submit_reload'),\n '#disabled' => ($page == $first_page),\n );\n $form['buttons-bottom']['reset_button'] = array(\n '#type' => 'submit',\n '#value' => t('Reset page'),\n '#submit' => array('node_import_add_form_submit_reset'),\n '#disabled' => ($page == $first_page),\n ); \n $form['buttons-bottom']['next_button'] = array(\n '#type' => 'submit',\n '#value' => ($page == $last_page) ? t('Start import') : t('Siguiente'),\n '#validate' => array('helper_import_add_form_validate_next'),\n '#submit' => array('helper_import_add_form_submit_next'),\n '#disabled' => empty($types),\n ); \n\n return $form;\n}", "function create() {\n\t\tglobal $default, $lang_err_doc_exist, $lang_err_database;\n\t\t//if the id >= 0, then the object has already been created\n\t\tif ($this->iId < 0) {\n\t\t\t//check to see if name exsits\n\t\t\t$sql = $default->db;\n\t\t\t$sQuery = \"SELECT id FROM \". $default->document_type_fields_table .\" WHERE document_type_id = ? and field_id = ?\";/*ok*/\n $aParams = array($this->iDocumentTypeID, $this->iFieldID);\n $sql->query(array($sQuery, $aParams));\n $rows = $sql->num_rows($sql);\n \n if ($rows > 0){\n $_SESSION[\"errorMessage\"] = \"DocTypes::The DocumentType name \" . $this->sName . \" is already in use!\";\n return false;\n }\n\t\t}\n\n return parent::create();\n\t}", "public function isValidCreateData($form){\n return true;\n }", "function pdfbulletin_edit_form(&$node, $form_state) {\n $type = node_get_types('type', $node);\n $pdfbulletin = $node->pdfbulletin;\n $form['pdfbulletin'] = array(\n '#type' => 'value',\n '#value' => $pdfbulletin,\n );\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => check_plain($type->title_label),\n '#required' => TRUE,\n '#default_value' => $node->title,\n '#weight' => -5,\n );\n\n $form['header_format'] = array(\n '#tree' => FALSE,\n );\n $form['header_format']['header'] = array(\n '#title' => t('Header'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->header,\n );\n $form['header_format']['format'] = filter_form($pdfbulletin->header_format, NULL, array('header_format'));\n\n $form['footer_format'] = array(\n '#tree' => FALSE,\n );\n $form['footer_format']['footer'] = array(\n '#title' => t('Footer'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->footer,\n );\n $form['footer_format']['format'] = filter_form($pdfbulletin->footer_format, NULL, array('footer_format'));\n\n $form['email_format'] = array(\n '#tree' => FALSE, \n );\n $form['email_format']['email'] = array(\n '#title' => t('Text for e-mail'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->email,\n );\n $form['email_format']['format'] = filter_form($pdfbulletin->email_format, NULL, array('email_format'));\n\n $form['empty_text_format'] = array(\n '#tree' => FALSE,\n );\n $form['empty_text_format']['empty_text'] = array(\n '#title' => t('Empty text'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->empty_text,\n '#description' => t('Text for e-mail if it is sent with an empty bulletin.'),\n );\n $form['empty_text_format']['format'] = filter_form($pdfbulletin->empty_text_format, NULL, array('empty_text_format'));\n\n $paper_sizes = pdfbulletin_util_settings('paper_size');\n $form['paper_size'] = array(\n '#title' => t('Paper size'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->paper_size,\n );\n foreach ($paper_sizes as $key => $value) {\n $form['paper_size']['#options'][$key] = t($key);\n }\n\n $css = pdfbulletin_css();\n $form['css_file'] = array(\n '#title' => t('Style'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->css_file,\n );\n foreach ($css as $key => $value) {\n $form['css_file']['#options'][$key] = check_plain($value);\n }\n\n\n return $form;\n}", "public function validation();", "protected function _validate() {\n\t}", "function validate_user_form()\n {\n }", "function uc_order_product_select_form_validate($form, &$form_state) {\n if (empty($form_state['values']['product_controls']['nid'])) {\n form_set_error('product_controls][nid', t('Please select a product.'));\n }\n}", "function scfnode_form_add_association(&$form_state, $nid, $name) {\n $form = array();\n /*$form['cancel'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'scf') . '/images/icon-x.gif',\n '#attributes' => array(\n 'onclick' => \"$('#association-addtermdiv-\" . $name . \"').slideUp('slow');return false;\"\n ),\n '#executes_submit_callback' => FALSE,\n '#title' => 'Close'\n );*/\n \n /*$form['caption'] = array(\n '#type' => 'markup',\n '#value' => t('Add new term:')\n );*/\n \n $form['textfield'] = array(\n '#type' => 'textfield',\n '#autocomplete_path' => $name . '/autocomplete/title',\n '#size' => 20,\n '#id' => 'association-' . $name . '-text',\n '#name' => 'textfield',\n );\n $form['add'] = array(\n '#type' => 'button',\n '#value' => t('Add'),\n '#ahah' => array(\n 'path' => 'association/ajax/add/' . $nid . '/' . $name . '/',\n 'wrapper' => 'association-list-' . $name,\n 'event' => 'click',\n 'effect' => 'slide',\n 'method' => 'append',\n 'progress' => 'none',\n ),\n '#executes_submit_callback' => FALSE\n );\n \n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $nid\n );\n return $form;\n }", "public static function create() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$field_type = FrmAppHelper::get_post_param( 'field_type', '', 'sanitize_text_field' );\n\t\t$form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );\n\n\t\t$field = self::include_new_field( $field_type, $form_id );\n\n // this hook will allow for multiple fields to be added at once\n do_action('frm_after_field_created', $field, $form_id);\n\n wp_die();\n }", "function bat_event_type_form($form, &$form_state, $event_type, $op = 'edit') {\n $form['#attributes']['class'][] = 'bat-management-form bat-event-type-form';\n\n if ($op == 'clone') {\n $event_type->label .= ' (cloned)';\n $event_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $event_type->label,\n '#description' => t('The human-readable name of this event type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n\n // Machine-readable type name.\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($event_type->type) ? $event_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'bat_event_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this event type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n if ($op == 'add') {\n $form['fixed_event_states'] = array(\n '#type' => 'checkbox',\n '#title' => t('Fixed event states'),\n );\n }\n elseif ($op == 'edit') {\n $form['type']['#disabled'] = TRUE;\n }\n\n $form['event_granularity'] = array(\n '#type' => 'select',\n '#title' => t('Event Granularity'),\n '#options' => array('bat_daily' => t('Daily'), 'bat_hourly' => t('Hourly')),\n '#default_value' => isset($event_type->event_granularity) ? $event_type->event_granularity : 'bat_daily',\n );\n\n if (isset($event_type->is_new)) {\n // Check for available Target Entity types.\n $target_entity_types = module_invoke_all('bat_event_target_entity_types');\n if (count($target_entity_types) == 1) {\n // If there's only one target entity type, we simply store the value\n // without showing it to the user.\n $form['target_entity_type'] = array(\n '#type' => 'value',\n '#value' => $target_entity_types[0],\n );\n }\n else {\n // Build option list.\n $options = array();\n foreach ($target_entity_types as $target_entity_type) {\n $target_entity_info = entity_get_info($target_entity_type);\n $options[$target_entity_type] = $target_entity_info['label'];\n }\n $form['target_entity_type'] = array(\n '#type' => 'select',\n '#title' => t('Target Entity Type'),\n '#description' => t('Select the target entity type for this Event type. In most cases you will wish to leave this as \"Unit\".'),\n '#options' => $options,\n // Default to BAT Unit if available.\n '#default_value' => isset($target_entity_types['bat_unit']) ? 'bat_unit' : '',\n );\n }\n }\n\n if (!isset($event_type->is_new) && $event_type->fixed_event_states == 0) {\n $fields_options = array();\n\n $fields = field_info_instances('bat_event', $event_type->type);\n\n foreach ($fields as $field) {\n $fields_options[$field['field_name']] = $field['field_name'];\n }\n\n $form['events'] = array(\n '#type' => 'fieldset',\n '#group' => 'additional_settings',\n '#title' => t('Events'),\n '#tree' => TRUE,\n '#weight' => 80,\n );\n\n $form['events'][$event_type->type] = array(\n '#type' => 'select',\n '#title' => t('Select your default @event field', array('@event' => $event_type->label)),\n '#options' => $fields_options,\n '#default_value' => isset($event_type->default_event_value_field_ids[$event_type->type]) ? $event_type->default_event_value_field_ids[$event_type->type] : NULL,\n '#empty_option' => t('- Select a field -'),\n );\n }\n\n if (!isset($event_type->is_new)) {\n $fields_options = array();\n $fields = field_info_instances('bat_event', $event_type->type);\n\n foreach ($fields as $field) {\n $fields_options[$field['field_name']] = $field['field_name'];\n }\n\n $form['event_label'] = array(\n '#type' => 'fieldset',\n '#group' => 'additional_settings',\n '#title' => t('Label Source'),\n '#tree' => TRUE,\n '#weight' => 80,\n );\n\n $form['event_label']['default_event_label_field_name'] = array(\n '#type' => 'select',\n '#title' => t('Select your label field', array('@event' => $event_type->label)),\n '#default_value' => isset($event_type->default_event_label_field_name) ? $event_type->default_event_label_field_name : NULL,\n '#empty_option' => t('- Select a field -'),\n '#description' => t('If you select a field here, its value will be used as the label for your event. BAT will fall back to using the event state as the label if the field has no value.'),\n '#options' => $fields_options,\n );\n }\n\n $form['actions'] = array(\n '#type' => 'actions',\n '#tree' => FALSE,\n );\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save Event type'),\n '#weight' => 40,\n '#submit' => array('bat_event_type_form_submit'),\n );\n\n return $form;\n}", "public function getFormType();", "protected function addFormValidators() {\n \t}", "public function check_form()\n\t{\n\t\tProfil_fields_forum::validate(PROFIL_FIELDS_CONTACT, 'contact', $this->errstr, Fsb::$session->id());\n\t}", "public function create()\n {\n return view('admin.typeField.create');\n }", "abstract function validator();" ]
[ "0.77895594", "0.678418", "0.66281605", "0.6349097", "0.6168554", "0.610568", "0.60453206", "0.60402095", "0.6012209", "0.59940475", "0.5758476", "0.57140166", "0.56463796", "0.5642471", "0.5613593", "0.5533103", "0.54347605", "0.5433027", "0.5426902", "0.5426902", "0.5405251", "0.5385138", "0.5385138", "0.53786254", "0.5359969", "0.5351087", "0.5350247", "0.533616", "0.5334571", "0.5324472", "0.53073174", "0.53027356", "0.5293922", "0.52877337", "0.5283516", "0.52629995", "0.525383", "0.5249877", "0.52486634", "0.52402675", "0.5227514", "0.5227235", "0.5213433", "0.5200605", "0.51959294", "0.5191233", "0.5189585", "0.51832205", "0.5181878", "0.5171455", "0.51699626", "0.5140918", "0.51293856", "0.5126387", "0.5120616", "0.51201403", "0.510724", "0.5100825", "0.5098204", "0.50900084", "0.5083189", "0.5077868", "0.50633246", "0.50578946", "0.5033646", "0.50199234", "0.50126415", "0.50122523", "0.5008534", "0.50056016", "0.50022966", "0.49931085", "0.49916863", "0.49896362", "0.4985711", "0.49787432", "0.49773625", "0.49734765", "0.49625367", "0.49621794", "0.49621794", "0.49621794", "0.49621794", "0.49460596", "0.49399096", "0.49387953", "0.4937519", "0.4935837", "0.4935548", "0.49314642", "0.49231797", "0.49209118", "0.4920559", "0.49141774", "0.49091357", "0.4892755", "0.48885265", "0.4887774", "0.48786968", "0.48765323" ]
0.6903851
1
Form submission handler for mongo_node_type_create_form().
function mongo_node_type_create_form_submit($form, $form_state) { $label = $form_state['values']['label']; $machine_name = $form_state['values']['name']; $set = mongo_node_settings(); $set += mongo_node_type_default_settings($label, $machine_name); // @todo - redirect to entity type page mongo_node_settings_save($set); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "function mongo_node_add($entity_type, $bundle) {\n global $user;\n $set = mongo_node_settings();\n\n $entity = entity_create($entity_type, array(\n 'uid' => $user->uid,\n 'name' => (isset($user->name) ? $user->name : ''),\n 'type' => $bundle,\n 'language' => LANGUAGE_NONE,\n )\n );\n $form_id = $entity_type . '_' . $bundle . '_mongo_node_form';\n $output = drupal_get_form($form_id, $entity, $entity_type);\n\n return $output;\n}", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function main() {\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tprint_r($_POST);\n\t\t\techo \"<br />\";\n\t\t\t\n\t\t\t// Required Fields in the POST data //\t\t\t\n\t\t\tif ( !isset($_POST['_type']) ) return;\n\t\t\tif ( !isset($_POST['_subtype']) ) return;\n\t\t\tif ( !isset($_POST['_name']) ) return;\n\t\t\tif ( !isset($_POST['_mail']) ) return;\n\t\t\tif ( !isset($_POST['_password']) ) return;\n\t\t\tif ( !isset($_POST['_publish']) ) return;\n\t\n\t\t\t// Node Type //\n\t\t\t$type = sanitize_NodeType($_POST['_type']);\n\t\t\tif ( empty($type) ) return;\t\n\n\t\t\t$subtype = sanitize_NodeType($_POST['_subtype']);\n\t\n\t\t\t// Name/Title //\n\t\t\t$name = $_POST['_name'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Slug //\n\t\t\tif ( empty($_POST['_slug']) )\n\t\t\t\t$slug = $_POST['_name'];\n\t\t\telse\n\t\t\t\t$slug = $_POST['_slug'];\n\t\t\t$slug = sanitize_Slug($slug);\n\t\t\tif ( empty($slug) ) return;\n\t\t\t\n\t\t\t// TODO: Confirm slug is legal\n\t\t\t\t\n\t\t\t// Body //\n\t\t\t$body = $_POST['_body'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Do we publish? //\n\t\t\t$publish = mb_strtolower($_POST['_publish']) == \"true\";\n\t\t\t\n\t\t\t// Email //\n\t\t\t$mail = sanitize_Email($_POST['_mail']);\n\t\t\tif ( empty($mail) ) return;\n\n\t\t\t// Password //\n\t\t\t$password = $_POST['_password'];\n\t\t\tif ( empty($password) ) return;\n\n\t\n\t\t\t$id = node_Add(\n\t\t\t\t$type,$subtype,$slug,$name,$body,\n\t\t\t\t0,2,\n\t\t\t\t$publish\n\t\t\t);\n\t\t\t\n\t\t\tuser_Add($id,$mail,$password);\n\t\n\t\t\techo \"Added \" . $id . \".<br />\";\n\t\t\techo \"<br />\";\n\t\t}\n\t}", "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function mongo_node_type_edit_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $old_entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_entity_type) {\n $set += mongo_node_type_default_settings($label, $machine_name);\n $set[$machine_name] = $set[$old_entity_type];\n unset($set[$old_entity_type]);\n\n // Update existing mongo entities with new entity type.\n _mongo_node_update_type($old_entity_type, $machine_name);\n }\n else {\n $set[$machine_name]['label'] = $label;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function mongo_node_bundle_create_form_submit($form, $form_state) {\n $entity_type = $form_state['values']['entity_type'];\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n\n // @todo - redirect to bundle type page.\n mongo_node_settings_save($set);\n}", "function node_add($type) {\n global $user;\n\n $types = node_get_types();\n $type = isset($type) ? str_replace('-', '_', $type) : NULL;\n // If a node type has been specified, validate its existence.\n if (isset($types[$type]) && node_access('create', $type)) {\n // Initialize settings:\n $node = array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');\n\n drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));\n $output = drupal_get_form($type .'_node_form', $node);\n }\n\n return $output;\n}", "function node_form(&$form_state, $node) {\n global $user;\n\n if (isset($form_state['node'])) {\n $node = $form_state['node'] + (array)$node;\n }\n if (isset($form_state['node_preview'])) {\n $form['#prefix'] = $form_state['node_preview'];\n }\n $node = (object)$node;\n foreach (array('body', 'title', 'format') as $key) {\n if (!isset($node->$key)) {\n $node->$key = NULL;\n }\n }\n if (!isset($form_state['node_preview'])) {\n node_object_prepare($node);\n }\n else {\n $node->build_mode = NODE_BUILD_PREVIEW;\n }\n\n // Set the id of the top-level form tag\n $form['#id'] = 'node-form';\n\n // Basic node information.\n // These elements are just values so they are not even sent to the client.\n foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => isset($node->$key) ? $node->$key : NULL,\n );\n }\n\n // Changed must be sent to the client, for later overwrite error checking.\n $form['changed'] = array(\n '#type' => 'hidden',\n '#default_value' => isset($node->changed) ? $node->changed : NULL,\n );\n // Get the node-specific bits.\n if ($extra = node_invoke($node, 'form', $form_state)) {\n $form = array_merge_recursive($form, $extra);\n }\n if (!isset($form['title']['#weight'])) {\n $form['title']['#weight'] = -5;\n }\n\n $form['#node'] = $node;\n\n // Add a log field if the \"Create new revision\" option is checked, or if the\n // current user has the ability to check that option.\n if (!empty($node->revision) || user_access('administer nodes')) {\n $form['revision_information'] = array(\n '#type' => 'fieldset',\n '#title' => t('Revision information'),\n '#collapsible' => TRUE,\n // Collapsed by default when \"Create new revision\" is unchecked\n '#collapsed' => !$node->revision,\n '#weight' => 20,\n );\n $form['revision_information']['revision'] = array(\n '#access' => user_access('administer nodes'),\n '#type' => 'checkbox',\n '#title' => t('Create new revision'),\n '#default_value' => $node->revision,\n );\n $form['revision_information']['log'] = array(\n '#type' => 'textarea',\n '#title' => t('Log message'),\n '#default_value' => (isset($node->log) ? $node->log : ''),\n '#rows' => 2,\n '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),\n );\n }\n\n // Node author information for administrators\n $form['author'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Authoring information'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 20,\n );\n $form['author']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored by'),\n '#maxlength' => 60,\n '#autocomplete_path' => 'user/autocomplete',\n '#default_value' => $node->name ? $node->name : '',\n '#weight' => -1,\n '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', t('Anonymous')))),\n );\n $form['author']['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored on'),\n '#maxlength' => 25,\n '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? $node->date : format_date($node->created, 'custom', 'Y-m-d H:i:s O'))),\n );\n\n if (isset($node->date)) {\n $form['author']['date']['#default_value'] = $node->date;\n }\n\n // Node options for administrators\n $form['options'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Publishing options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 25,\n );\n $form['options']['status'] = array(\n '#type' => 'checkbox',\n '#title' => t('Published'),\n '#default_value' => $node->status,\n );\n $form['options']['promote'] = array(\n '#type' => 'checkbox',\n '#title' => t('Promoted to front page'),\n '#default_value' => $node->promote,\n );\n $form['options']['sticky'] = array(\n '#type' => 'checkbox',\n '#title' => t('Sticky at top of lists'),\n '#default_value' => $node->sticky,\n );\n\n // These values are used when the user has no administrator access.\n foreach (array('uid', 'created') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => $node->$key,\n );\n }\n\n // Add the buttons.\n $form['buttons'] = array();\n $form['buttons']['submit'] = array(\n '#type' => 'submit',\n '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])),\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('node_form_submit'),\n );\n $form['buttons']['preview'] = array(\n '#type' => 'submit',\n '#value' => t('Preview'),\n '#weight' => 10,\n '#submit' => array('node_form_build_preview'),\n );\n if (!empty($node->nid) && node_access('delete', $node)) {\n $form['buttons']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 15,\n '#submit' => array('node_form_delete_submit'),\n );\n }\n $form['#validate'][] = 'node_form_validate';\n $form['#theme'] = array($node->type .'_node_form', 'node_form');\n return $form;\n}", "public function createAction()\n {\n $entity = new Node();\n $request = $this->getRequest();\n $form = $this->createForm(new NodeType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n $this->get('session')->setFlash('notice', 'Los cambios se realizaron correctamente.');\n return $this->redirect($this->generateUrl('node_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('HegesAppNodeBundle:Node:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "function mongo_node_operation_submit($form, &$form_state) {\n $operations = mongo_node_operations();\n $operation = $operations[$form_state['values']['operation']];\n\n $entities = array_filter($form_state['values']['entities']);\n $entity_type = $form_state['values']['entity_type'];\n if ($function = $operation['callback']) {\n // Add in callback arguments if present.\n if (isset($operation['callback arguments'])) {\n $args = array(\n $entity_type,\n $entities,\n $operation['callback arguments'],\n );\n }\n else {\n $args = array($entity_type, $entities);\n }\n call_user_func_array($function, $args);\n cache_clear_all();\n }\n}", "public function create()\n {\n return view('nodes.form')\n ->with('types', NodeType::orderBy('display_name')->get())\n ->with('scripts', ['vendor/unisharp/laravel-ckeditor/ckeditor.js'])\n ->with('action', 'Add');\n }", "function node_form_submit_build_node($form, &$form_state) {\n // Unset any button-level handlers, execute all the form-level submit\n // functions to process the form values into an updated node.\n unset($form_state['submit_handlers']);\n form_execute_handlers('submit', $form, $form_state);\n $node = node_submit($form_state['values']);\n $form_state['node'] = (array)$node;\n $form_state['rebuild'] = TRUE;\n return $node;\n}", "function happywedding_node_form_submit($form, &$form_state) {\n global $user;\n //dpm($user);\n if ( !empty($form_state['nid']) && isset($_GET['vendor'] ) ) {\n \n $type = $form['type']['#value'];\n if (in_array('vendor', $user->roles)) {\n $basepath = 'bo/vendor/';\n } else {\n $basepath = 'node/';\n }\n //dpm($form);\n if($type=='news')\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type;\n else if($type=='product') {\n $query = array('category' => array());\n foreach($form[\"field_product_category\"][\"und\"][\"#value\"] as $key => $value){\n $query[\"category\"][] = $key; \n }\n $form_state['redirect'] = array( \n $basepath.$_GET['vendor'].'/categories/'.$type.'s' ,\n array('query' => $query ) \n );\n //dpm($form_state['redirect']);\n }else\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type.'s';\n }\n}", "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "public function getSetupForm() {\n\n /**\n * @todo find a beter way to do this\n */\n\n if(!empty($_POST['nodeId'])){\n $this->id = $_POST['nodeId'];\n }\n\n if (empty($this->id)) {\n $table = new HomeNet_Model_DbTable_Nodes();\n $this->id = $table->fetchNextId($this->house);\n }\n // $this->id = 50;\n\n $form = new HomeNet_Form_Node();\n $sub = $form->getSubForm('node');\n $id = $sub->getElement('node');\n $id->setValue($this->id);\n \n $table = new HomeNet_Model_DbTable_Nodes();\n $rows = $table->fetchAllInternetNodes();\n\n $uplink = $sub->getElement('uplink');\n\n foreach($rows as $value){\n $uplink->addMultiOption($value->id, $value->id);\n }\n\n\n return $form;\n }", "function nobookoutline_nodetypes_settings_form() {\n $nodetypesobj = node_get_types();\n $options = array();\n foreach($nodetypesobj as $nodetype) {\n $options[$nodetype->type] = $nodetype->type;\n \n }\n \n\t$form['form_nobookoutline_nodetypes'] = array(\n\t\t'#type' => 'select',\n '#title' => t('Select Node Types'),\n '#default_value' => variable_get('form_nobookoutline_nodetypes', \"book\"),\n '#options' => $options,\n\t '#multiple' => TRUE,\n '#description' => t('<b>Select the node types to show book outline.</b>'),\n\t);\n\n\n return system_settings_form($form);\n}", "public function postCreate()\n {\n\n // Declare the rules for the form validation\n $rules = array(\n 'name' => 'required'\n );\n\n // Validate the inputs\n $validator = Validator::make(Input::all(), $rules);\n // Check if the form validates with success\n if ($validator->passes())\n {\n // Get the inputs, with some exceptions\n $inputs = Input::except('csrf_token');\n\n $this->type->name = $inputs['name'];\n $this->type->save();\n\n // Was the type created?\n if ($this->type->id)\n {\n // Redirect to the new type page\n return Redirect::to('admin/types/' . $this->type->id . '/edit')->with('success', Lang::get('admin/types/messages.create.success'));\n }\n\n // Redirect to the new type page\n return Redirect::to('admin/types/create')->with('error', Lang::get('admin/types/messages.create.error'));\n\n // Redirect to the type create page\n return Redirect::to('admin/types/create')->withInput()->with('error', Lang::get('admin/types/messages.' . $error));\n }\n\n // Form validation failed\n return Redirect::to('admin/types/create')->withInput()->withErrors($validator);\n }", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "function scfnode_form_add_association(&$form_state, $nid, $name) {\n $form = array();\n /*$form['cancel'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'scf') . '/images/icon-x.gif',\n '#attributes' => array(\n 'onclick' => \"$('#association-addtermdiv-\" . $name . \"').slideUp('slow');return false;\"\n ),\n '#executes_submit_callback' => FALSE,\n '#title' => 'Close'\n );*/\n \n /*$form['caption'] = array(\n '#type' => 'markup',\n '#value' => t('Add new term:')\n );*/\n \n $form['textfield'] = array(\n '#type' => 'textfield',\n '#autocomplete_path' => $name . '/autocomplete/title',\n '#size' => 20,\n '#id' => 'association-' . $name . '-text',\n '#name' => 'textfield',\n );\n $form['add'] = array(\n '#type' => 'button',\n '#value' => t('Add'),\n '#ahah' => array(\n 'path' => 'association/ajax/add/' . $nid . '/' . $name . '/',\n 'wrapper' => 'association-list-' . $name,\n 'event' => 'click',\n 'effect' => 'slide',\n 'method' => 'append',\n 'progress' => 'none',\n ),\n '#executes_submit_callback' => FALSE\n );\n \n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $nid\n );\n return $form;\n }", "function bookcrossing_add_new_book_form() {\n global $user;\n\n $types = node_type_get_types();\n $node = (object) array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => 'bookcrossing', 'language' => LANGUAGE_NONE);\n //drupal_set_title(t('Create @name', array('@name' => $types['bookcrossing']->name)), PASS_THROUGH);\n return drupal_get_form('bookcrossing_node_form', $node, 'add-new-book');\n}", "private function loadNewNodeFormForTestContentType() {\n $this->drupalLogin($this->user);\n $this->drupalGet(self::CONTENT_ADD_PREFIX\n . self::TEST_CONTENT_TYPE_ID);\n $this->assertResponse(200);\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 multisite_aggregate_type_form($form, &$form_state, $aggregate_type, $op = 'edit') {\n if ($op == 'clone') {\n $aggregate_type->label .= ' (cloned)';\n $aggregate_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $aggregate_type->label,\n '#description' => t('The human-readable name of this multisite aggregate type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($aggregate_type->type) ? $aggregate_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'multisite_aggregate_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this multisite aggregate type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n $form['source'] = array(\n '#type' => 'fieldset',\n '#title' => t('Source'),\n );\n // Only nodes are allowed for now\n $form['source']['source_type'] = array(\n '#type' => 'hidden',\n '#value' => 'node',\n );\n $form['source']['source_bundle'] = array(\n '#type' => 'select',\n '#title' => t('Node bundle'),\n '#options' => node_type_get_names(),\n '#default_value' => !empty($aggregate_type->source_bundle),\n );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save aggregate type'),\n '#weight' => 40,\n );\n return $form;\n}", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function createForm();", "public function createForm();", "function mongo_node_bundle_edit_form_submit($form, $form_state) {\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['bundle_type']['entity_type'];\n $old_bundle_type = $form_state['values']['bundle_type']['bundle'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_bundle_type) {\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n $set[$entity_type]['bundles'][$machine_name] = $set[$entity_type]['bundles'][$old_bundle_type];\n unset($set[$entity_type]['bundles'][$old_bundle_type]);\n\n // Update existing mongo entities with new bundle.\n //_mongo_node_update_bundle($entity_type, $old_bundle_type, $machine_name);\n }\n else {\n $set[$entity_type]['bundles'][$machine_name]['label'] = $label;\n $set[$entity_type]['bundles'][$machine_name]['description'] = $description;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "public function postEdit(NodeFormRequest $request)\n { \n // first we save the node model\n $node = $this->nodeModel->find($request->input('id'));\n \n // save the node model\n $node->type = $request->input('type');\n $node->title = $request->input('title');\n $node->save();\n \n $nodeType = $node->nodeType;\n if($nodeType) {\n // instantiate nodeType model\n $nodeType->nid = $request->input('id');\n $nodeType->body = $request->input('body');\n // save model\n $nodeType->save();\n } else{\n \n $this->nodeTypeModel->create($request->input());\n }\n // we will flash a notification\n Notification::success($request->input('type') . ' page has been updated');\n return redirect()->route('admin.home');\n }", "abstract public function createForm();", "abstract public function createForm();", "function mongo_node_admin_content($form, $form_state, $entity_type) {\n $settings = mongo_node_settings();\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n );\n\n $filters = mongo_node_filters($entity_type);\n $applied_filters = isset($_SESSION[$entity_type . '_filters']) ? $_SESSION[$entity_type . '_filters'] : array();\n\n foreach ($filters as $f_type_name => $f_type) {\n $form['filters'][$f_type_name] = array('#type' => 'select', '#title' => $f_type_name);\n foreach ($f_type as $f_name => $f_val) {\n $form['filters'][$f_type_name]['#options'][$f_name] = $f_val['label'];\n }\n }\n\n $items = array();\n $remaining_filters = array();\n foreach ($applied_filters as $app_filter) {\n $items[] = t('where %f_name is %f_val', array('%f_name' => $app_filter['#type'], '%f_val' => $app_filter['#value']));\n $conditions = $filters[$app_filter['#type']][$app_filter['#value']]['filters'];\n foreach ($conditions as $condition) {\n $remaining_filters[$condition['#type']]['#callback'] = $condition['#callback'];\n $remaining_filters[$condition['#type']]['#value'][] = $condition['#value'];\n }\n }\n\n $form['filters']['#description'] = theme('item_list', array('items' => $items));\n\n if (empty($applied_filters)) {\n $form['filters']['filter'] = array(\n '#type' => 'submit',\n '#value' => 'Filter',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n else {\n $form['filters']['refine'] = array(\n '#type' => 'submit',\n '#value' => 'Refine',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['undo'] = array(\n '#type' => 'submit',\n '#value' => 'Undo',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => 'Reset',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Update options'),\n );\n\n $operations = mongo_node_operations();\n foreach ($operations as $op => $op_set) {\n $options[$op] = $op_set['label'];\n }\n $form['options']['operation'] = array(\n '#type' => 'select',\n '#options' => $options,\n );\n\n $form['options']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Update'),\n '#validate' => array('mongo_node_operation_validate'),\n '#submit' => array('mongo_node_operation_submit'),\n );\n\n $query = new EntityFieldQuery();\n\n $query->entityCondition('entity_type', $entity_type)\n ->propertyOrderBy('created', 'DESC')\n ->pager(10);\n\n // Actually apply filters.\n foreach ($remaining_filters as $r_name => $r_values) {\n $query->{$r_values['#callback']}($r_name, $r_values['#value'], 'IN');\n }\n\n $result = $query->execute();\n\n $languages = language_list();\n $destination = drupal_get_destination();\n $header = array(\n 'title' => array('data' => t('Title'), 'field' => 'title'),\n 'type' => t('Type'),\n 'author' => t('Author'),\n 'status' => t('Status'),\n 'changed' => t('Updated'),\n 'language' => t('Language'),\n 'operations' => t('Operations'),\n );\n $options = array();\n\n if (isset($result[$entity_type])) {\n $ids = array_keys($result[$entity_type]);\n $entities = entity_load($entity_type, $ids);\n\n foreach ($result[$entity_type] as $id => $efq_entity) {\n $entity = entity_load($entity_type, array($id));\n $entity = reset($entity);\n\n $entity_uri = entity_uri($entity_type, $entity);\n\n $options[$id] = array(\n 'title' => array(\n 'data' => array(\n '#type' => 'link',\n '#title' => $entity->title,\n '#href' => $entity_uri['path'],\n ),\n ),\n 'type' => check_plain($settings[$entity_type]['bundles'][$entity->type]['label']),\n 'author' => theme('username', array('account' => $entity)),\n 'status' => $entity->status ? t('published') : t('not published'),\n 'changed' => format_date($entity->changed, 'short'),\n 'language' => ($entity->language == LANGUAGE_NONE) ? t('Language neutral') : $languages[$entity->language]->name,\n );\n\n $operations = array();\n $operations[] = l(t('edit'), $entity_uri['path'] . '/edit', array('query' => $destination));\n $operations[] = l(t('delete'), $entity_uri['path'] . '/delete', array('query' => $destination));\n\n $options[$id]['operations'] = theme('item_list', array('items' => $operations, 'attributes' => array('class' => 'inline')));\n }\n }\n\n $form['entities'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n '#empty' => t('No content available'),\n );\n\n $form['pager'] = array(\n '#theme' => 'pager',\n );\n\n return $form;\n}", "public function createAction($type)\n {\n if (!$type) {\n return $this->redirect($this->generateUrl('resymf_admin_dashboard'), 301);\n }\n $em = $this->getDoctrine()->getManager();\n\n $request = $this->container->get('request');\n $routeName = $request->get('_route');\n\n $adminConfigurator = $this->get('resymfcms.configurator.admin');\n $objectConfigurator = $this->get('resymfcms.configurator.object');\n\n $objectMapper = $this->get('resymfcms.object.mapper');\n\n $objectType = $objectMapper->getMappedObject($type);\n $annotationReader = $this->get('resymfcms.annotation.reader');\n\n $formConfig = $annotationReader->readFormAnnotation($objectType);\n\n if ($request->isMethod('POST')) {\n $object = new $objectType();\n\n// echo '<pre>';\n// print_r($formConfig->fields);\n// die();\n foreach ($formConfig->fields as $field) {\n $fieldType = $field['type'];\n $fieldRelationType = $field['relationType'];\n $methodName = 'set' . $field['name'];\n\n// if()\n switch ($fieldType) {\n case 'relation':\n $class = $field['class'];\n $targetEntityField = $field['targetEntityField'];\n $relationObjects = $em->getRepository($class)\n ->createQueryBuilder('q')\n ->where('q.id IN(:id)')\n ->setParameter('id', $request->get($field['name']))\n// ->setMaxResults()\n ->getQuery()\n ->getResult();\n// print_r($relationObject);\n $addMethodName2 = 'set' . $field['name'];\n if($fieldRelationType == 'manyToOne' || $fieldRelationType == 'oneToOne') {\n $object->$addMethodName2($relationObjects[0]);\n }else {\n $object->$addMethodName2($relationObjects);\n }\n foreach ($relationObjects as $relationObject) {\n\n if ($relationObject) {\n\n $addMethodName = 'set' . $type;\n $addMethodName2 = 'set' . $field['name'];\n\n if ($fieldRelationType == 'oneToMany') {\n $addMethodName2 = 'add' . $field['name'];\n\n }\n if ($fieldRelationType = 'manyToMany' || $fieldRelationType = 'multiselect') {\n $addMethodName2 = 'add' . $targetEntityField;\n } else { ///toOne\n $relationObject->$addMethodName($object);\n }\n\n }\n }\n\n \n break;\n case 'date':\n $object->$methodName(new \\DateTime($request->get($field['name'])));\n break;\n case 'file':\n// echo $field['name'];\n// print_r($request->get($field['name']));\n// die();\n $object->$methodName(json_encode($request->get($field['name'])));\n break;\n default:\n $object->$methodName($request->get($field['name']));\n }\n\n }\n\n $objectConfigurator->setInitialValuesFromAnnotations($objectType, $object, $type);\n $em->persist($object);\n $em->flush();\n return $this->redirect($this->generateUrl('object_edit', array('type' => $type, 'id' => $object->getId())), 301);\n }\n\n if (!isset($object)) {\n $object = false;\n }\n $multiSelectValues = $objectConfigurator->generateMultiSelectOptions($objectType, $object);\n\n return $this->render('ReSymfCmsBundle:adminmenu:create.html.twig', array('menu' => $adminConfigurator->getAdminConfig(), 'site_config' => $adminConfigurator->getSiteConfig(), 'form_config' => $formConfig, 'route' => $routeName, 'multi_select' => $multiSelectValues));\n }", "function mongo_node_page_edit($entity_type, $entity) {\n $title = $entity->title;\n drupal_set_title($title);\n\n $content = array();\n $content = drupal_get_form('mongo_node_form', $entity, $entity_type);\n\n return $content;\n}", "public function get_create(array $args)\n { \n $node = $this->request->get_node();\n if ($node instanceof midgardmvc_core_providers_hierarchy_node_midgard2)\n {\n // If we have a Midgard node we can assign that as a \"default parent\"\n $this->data['parent'] = $node->get_object();\n }\n\n // Prepare the new object that form will eventually create\n $this->prepare_new_object($args);\n $this->data['object'] =& $this->object;\n\n if (isset($this->data['parent']))\n {\n midgardmvc_core::get_instance()->authorization->require_do('midgard:create', $this->data['parent']);\n }\n\n $this->load_form();\n $this->data['form'] =& $this->form;\n }", "public function init()\n {\n $this->setMethod('post');\n \n $this->addElement('select', 'parentId', array(\n 'label' => 'Parent:',\n 'required' => true,\n \t'multioptions' => $this->_tree->getForm($this->_node->getId()),\n \t'value'\t=> array($this->_node->getParentId())\n ));\n \n $this->addElement('text', 'nodeName', array(\n 'label' => 'Titel ',\n 'required' => true,\n \t'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 30))\n ),\n 'value'\t=> ''.$this->_node->getNodeName()\n ));\n \n $this->addElement('text', 'nodeValue', array(\n 'label' => 'Link Url ',\n 'required' => true,\n \t'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 30))\n ),\n 'value'\t=> ''.$this->_node->getNodeValue()\n ));\n \n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Submit',\n ));\n\n }", "public function ajax_create_field() {\n\t\tglobal $wpdb;\n\n\t\t$data = array();\n\t\t$field_options = $field_validation = $parent = $previous = '';\n\n\t\tforeach ( $_REQUEST['data'] as $k ) {\n\t\t\t$data[ $k['name'] ] = $k['value'];\n\t\t}\n\n\t\tcheck_ajax_referer( 'create-field-' . $data['form_id'], 'nonce' );\n\n\t\t$form_id = absint( $data['form_id'] );\n\t\t$field_key = sanitize_title( $_REQUEST['field_type'] );\n\t\t$field_type = strtolower( sanitize_title( $_REQUEST['field_type'] ) );\n\n\t\t$parent = ( isset( $_REQUEST['parent'] ) && $_REQUEST['parent'] > 0 ) ? $_REQUEST['parent'] : 0;\n\t\t$previous = ( isset( $_REQUEST['previous'] ) && $_REQUEST['previous'] > 0 ) ? $_REQUEST['previous'] : 0;\n\n\t\t// If a Page Break, the default name is Next, otherwise use the field type\n\t\t$field_name = ( 'page-break' == $field_type ) ? 'Next' : $_REQUEST['field_type'];\n\n\t\t// Set defaults for validation\n\t\tswitch ( $field_type ) :\n\t\t\tcase 'select' :\n\t\t\tcase 'radio' :\n\t\t\tcase 'checkbox' :\n\t\t\t\t$field_options = serialize( array( 'Option 1', 'Option 2', 'Option 3' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'email' :\n\t\t\tcase 'url' :\n\t\t\tcase 'phone' :\n\t\t\t\t$field_validation = $field_type;\n\t\t\t\tbreak;\n\n\t\t\tcase 'currency' :\n\t\t\t\t$field_validation = 'number';\n\t\t\t\tbreak;\n\n\t\t\tcase 'number' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\tbreak;\n\n\t\t\tcase 'min' :\n\t\t\tcase 'max' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\t$field_options = serialize( array( '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'range' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\t$field_options = serialize( array( '1', '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'time' :\n\t\t\t\t$field_validation = 'time-12';\n\t\t\t\tbreak;\n\n\t\t\tcase 'file-upload' :\n\t\t\t\t$field_options = serialize( array( 'png|jpe?g|gif' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ip-address' :\n\t\t\t\t$field_validation = 'ipv6';\n\t\t\t\tbreak;\n\n\t\t\tcase 'hidden' :\n\t\t\tcase 'custom-field' :\n\t\t\t\t$field_options = serialize( array( '' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'autocomplete' :\n\t\t\t\t$field_validation = 'auto';\n\t\t\t\t$field_options = serialize( array( 'Option 1', 'Option 2', 'Option 3' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'name' :\n\t\t\t\t$field_options = serialize( array( 'normal' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'date' :\n\t\t\t\t$field_options = serialize( array( 'dateFormat' => 'mm/dd/yy' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'rating' :\n\t\t\t\t$field_options = serialize( array( 'negative' => 'Disagree', 'positive' => 'Agree', 'scale' => '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'likert' :\n\t\t\t\t$field_options = serialize( array( 'rows' => \"Ease of Use\\nPortability\\nOverall\", 'cols' => \"Strongly Disagree\\nDisagree\\nUndecided\\nAgree\\nStrongly Agree\" ) );\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\n\n\t\t// Get fields info\n\t\t$all_fields = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE form_id = %d ORDER BY field_sequence ASC\", $form_id ) );\n\t\t$field_sequence = 0;\n\n\t\t// We only want the fields that FOLLOW our parent or previous item\n\t\tif ( $parent > 0 || $previous > 0 ) {\n\t\t\t$cut_off = ( $previous > 0 ) ? $previous : $parent;\n\n\t\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\t\tif ( $field->field_id == $cut_off ) {\n\t\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t\t}\n\t\t\tarray_shift( $all_fields );\n\n\t\t\t// If the previous had children, we need to remove them so our item is placed correctly\n\t\t\tif ( !$parent && $previous > 0 ) {\n\t\t\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\t\t\tif ( !$field->field_parent )\n\t\t\t\t\t\tbreak;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Create the new field's data\n\t\t$newdata = array(\n\t\t\t'form_id' \t\t\t=> absint( $data['form_id'] ),\n\t\t\t'field_key' \t\t=> $field_key,\n\t\t\t'field_name' \t\t=> $field_name,\n\t\t\t'field_type' \t\t=> $field_type,\n\t\t\t'field_options' \t=> $field_options,\n\t\t\t'field_sequence' \t=> $field_sequence,\n\t\t\t'field_validation' \t=> $field_validation,\n\t\t\t'field_parent' \t\t=> $parent\n\t\t);\n\n\t\t// Create the field\n\t\t$wpdb->insert( $this->field_table_name, $newdata );\n\t\t$insert_id = $wpdb->insert_id;\n\n\t\t// VIP fields\n\t\t$vip_fields = array( 'verification', 'secret', 'submit' );\n\n\t\t// Rearrange the fields that follow our new data\n\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\tif ( !in_array( $field->field_type, $vip_fields ) ) {\n\t\t\t\t$field_sequence++;\n\t\t\t\t// Update each field with it's new sequence and parent ID\n\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), array( 'field_id' => $field->field_id ) );\n\t\t\t}\n\t\t}\n\n\t\t// Move the VIPs\n\t\tforeach ( $vip_fields as $update ) {\n\t\t\t$field_sequence++;\n\t\t\t$where = array(\n\t\t\t\t'form_id' \t\t=> absint( $data['form_id'] ),\n\t\t\t\t'field_type' \t=> $update\n\t\t\t);\n\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), $where );\n\n\t\t}\n\n\t\techo $this->field_output( $data['form_id'], $insert_id );\n\n\t\tdie(1);\n\t}", "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}", "function travel_type_form($form, &$form_state, $entity_type, $op = 'edit') {\n // Handle the case when cloning is performed.\n if ($op == 'clone') {\n $entity_type->label .= ' (cloned)';\n $entity_type->type = '';\n }\n\n // Describe all properties of the entity which shall be shown on the form.\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $entity_type->label,\n '#description' => t('The human-readable name of this entity type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($entity_type->type) ? $entity_type->type : '',\n '#maxlength' => 32,\n //'#disabled' => $entity_type->isLocked() && $op != 'clone',\n '#machine_name' => array(\n 'exists' => 'travel_type_load_multiple',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this entity type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n $form['description'] = array(\n '#type' => 'textarea',\n '#default_value' => isset($entity_type->description) ? $entity_type->description : '',\n '#description' => t('Description about the entity type.'),\n );\n\n // Add some buttons.\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save entity type'),\n '#weight' => 40,\n );\n //if (!$entity_type->isLocked() && $op != 'add' && $op != 'clone') {\n $entity_id = entity_id('travel', $entity);\n if (!empty($entity_id)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete entity type'),\n '#weight' => 45,\n '#limit_validation_errors' => array(),\n '#submit' => array('travel_type_form_submit_delete'),\n );\n }\n\n return $form;\n}", "function theme_node_form($form) {\n $output = \"\\n<div class=\\\"node-form\\\">\\n\";\n\n // Admin form fields and submit buttons must be rendered first, because\n // they need to go to the bottom of the form, and so should not be part of\n // the catch-all call to drupal_render().\n $admin = '';\n if (isset($form['author'])) {\n $admin .= \" <div class=\\\"authored\\\">\\n\";\n $admin .= drupal_render($form['author']);\n $admin .= \" </div>\\n\";\n }\n if (isset($form['options'])) {\n $admin .= \" <div class=\\\"options\\\">\\n\";\n $admin .= drupal_render($form['options']);\n $admin .= \" </div>\\n\";\n }\n $buttons = drupal_render($form['buttons']);\n\n // Everything else gets rendered here, and is displayed before the admin form\n // field and the submit buttons.\n $output .= \" <div class=\\\"standard\\\">\\n\";\n $output .= drupal_render($form);\n $output .= \" </div>\\n\";\n\n if (!empty($admin)) {\n $output .= \" <div class=\\\"admin\\\">\\n\";\n $output .= $admin;\n $output .= \" </div>\\n\";\n }\n $output .= $buttons;\n $output .= \"</div>\\n\";\n\n return $output;\n}", "public function createForm()\n {\n }", "function ctools_block_content_type_edit_form_submit(&$form, &$form_state) {\n if (empty($form_state['subtype']) && isset($form_state['pane'])) {\n $form_state['pane']->subtype = $form_state['conf']['module'] . '-' . $form_state['conf']['delta'];\n unset($form_state['conf']['module']);\n unset($form_state['conf']['delta']);\n }\n}", "function create_node() {\n $type = drush_get_option('type');\n $title = drush_get_option('title');\n $body = drush_get_option('body');\n // get content types\n $contentTypes = \\Drupal::entityTypeManager()\n ->getStorage('node_type')\n ->loadMultiple();\n $types = [];\n foreach ($contentTypes as $contentType) {\n $types[$contentType->getOriginalId()] = $contentType->label();\n }\n if (!isset($type)) {\n $type = drush_choice($types, dt(\"Choose content type\"));\n }\n if (empty($type)) {\n return drush_user_abort();\n }\n if (!isset($title)) {\n $title = drush_prompt(\"Enter node title\", NULL, TRUE);\n }\n if (!isset($body)) {\n $body = drush_prompt(\"Enter node body\", NULL, TRUE);\n }\n try {\n $data = ['type' => $type, 'title' => $title, 'body' => $body];\n $nodeManager = new NodeManager();\n if ($link = $nodeManager->createNode($data)) {\n return drush_log(dt('Node created with title !title, click on !link link to open.', ['!title' => $title, '!link' => $link]), 'success');\n }\n }\n catch (Exception $ex) {\n return drush_set_error('mydrush', dt('Something went wrong while creating node.'));\n }\n}", "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "public function CreateForm();", "function content_form($post_type,$post_id = '',$action='',$thankyou = array()){\n\t$app = \\Jolt\\Jolt::getInstance();\n\t//\tgrab blueprint based on content type..\n\t$blueprint = $app->store('blueprints');\n\t$blueprint = $blueprint[ $post_type ];\n//\tprint_r( $blueprint );\n\t$nonce = generate_nonce();\n\n\tif( isset($_POST['title']) ){\n//\t\tprint_r($_POST);\n\t\t$c_url = site_url().$_SERVER['REQUEST_URI'];\n\t\t$post \t\t\t\t= array();\n\t\t$post['title'] \t\t= $_POST['title'];\n\t\t$post['name'] \t\t= new_slug( slugify( $_POST['title'] ) );\n\t\t$post['type'] \t\t= $post_type;\n\t\t$post['user_id'] \t= '';\n\t\t$post['date'] \t\t= date('Y-m-d H:i:s');\n\t\t$post['modified']\t= date('Y-m-d H:i:s');\n\t\t$post['password'] \t= '';\n\t\t$post['status'] \t= 'draft';\t//\tregardless of post type, we never want a post actually published from here..\n\t\t$post['parent'] \t= 0;\n\t\t$post['guid'] \t\t= generate_uuid();\n\t\t$post['category'] \t= '';\n\t\t$restricted = array('_id','title','name','user_id','date','modified','guid','type','status','parent','password');\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\t//\tThere are fields we don't want to change... This makes sure we don't...\n\t\t\tif( in_array($restricted,$fname) )\tcontinue;\n\t\t\tif( !isset($_POST[ $fname ]) ){\n\t\t\t\tif( $field['type'] == 'related' ){\n\t\t\t\t\t$_POST[ $fname ] = array();\n\t\t\t\t}else{\n\t\t\t\t\t$_POST[ $fname ] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($_POST as $k=>$v){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t$post[$k] = $v;\n\t\t}\n\t\tif( isset($_FILES) ){\n\t\t\tforeach($_FILES as $k=>$file){\n\t\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t\t$uploaddir = $this->app->store('upload_path');\n\t\t\t\t$uploadfile = $uploaddir . basename($file['name']);\n\t\t\t\t$uploadurl = $this->app->store('upload_url') . basename($file['name']);\n\t\t\t\tif( file_exists($uploadfile) ){\n\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t}else{\n\t\t\t\t\tif ( move_uploaded_file($file['tmp_name'], $uploadfile) ) {\n\t\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$app->db->insert('post', $post );\n\t\tunset($_POST);\n\t\tif( isset($thankyou['url']) ){\n\t\t\techo '<script>top.location.href=\"'.$thankyou['url'].'\";</script>';\n\t\t}else if( isset($thankyou['msg']) ){\n\t\t\techo '<p>'.$thankyou['msg'].'</p>';\n\t\t}else{\n\t\t\techo '<p><strong>Thank you, your post has been saved.</strong></p>';\n\t\t}\n\t}\n?>\n\t<form role=\"form\" method=\"POST\" action=\"<?php echo $action?>\" enctype=\"multipart/form-data\">\n\t<input type=\"hidden\" name=\"nonce\" value=\"<?php echo $nonce?>\" />\n\t<fieldset>\n\t\t<div class=\"form-group\">\n\t\t\t<label for=\"title\"><?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Title\")?></label>\n\t\t\t<input type=\"text\" class=\"form-control\" id=\"title\" name=\"title\" placeholder=\"<?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Enter Title\")?>\" value=\"<?php echo ( isset($post) ? $post['title'] : '');?>\" required>\n\t\t</div>\n<?php\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( $field['adminonly'] )\tcontinue;\n\t\t\tform_field($fname,$field,$post);\n\t\t}\n?>\n\t\t<button type=\"submit\" class=\"btn btn-primary\">Save</button>\n\t</fieldset>\n\t</form>\n<?php\n}", "function guifi_domain_create_form($form_state, $node) {\n\n $ip = guifi_main_ip($node->device_id);\n if (guifi_domain_access('create',$node->sid)) {\n $form['text_add'] = array(\n '#type' => 'item',\n '#value' => t('You are not allowed to create a domain on this service.'),\n '#weight' => 0\n );\n return $form;\n }\n if (empty($ip['ipv4'])) {\n $device = db_fetch_object(db_query('SELECT nick FROM {guifi_devices} WHERE id = %d', $node->device_id));\n $url = url('guifi/device/'.$node->device_id);\n $form['text'] = array(\n '#type' => 'item',\n '#value' => t('The server <a href='.$url.'>'.$device->nick.'</a> does not have an IPv4 address, can not create a domain.')\n );\n return $form;\n} \n $form['domain_type'] = array(\n '#type' => 'select',\n '#title' => t('Select new domain type'),\n '#default_value' => 'none',\n '#options' => array('NULL' => 'none', 'master' => 'Master, ex: newdomain.net','delegation' => 'Delegation, ex: newdomain.guifi.net'),\n '#ahah' => array(\n 'path' => 'guifi/js/add-domain',\n 'wrapper' => 'select_type',\n 'effect' => 'fade',\n )\n );\n $form['domain_type_form'] = array(\n '#prefix' => '<div id=\"select_type\">',\n '#suffix' => '</div>',\n '#type' => 'fieldset',\n );\n\n if ($form_state['values']['domain_type'] == 'master') {\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#size' => 64,\n '#maxlength' => 32,\n '#title' => t('Add a new domain'),\n '#description' => t('Insert domain name'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'master',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['mname'] = array(\n '#type' => 'hidden',\n '#value' => '0',\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n\n if ($form_state['values']['domain_type'] == 'delegation') {\n $ip = guifi_main_ip($node->device_id);\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Add a new delegated Domain Name'),\n '#description' => t('Just the hostname (HOSTNAME.domain.com) will be added before master domain.'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $domqry= db_query(\"\n SELECT *\n FROM {guifi_dns_domains}\n WHERE type = 'master'\n AND public = 'yes'\n ORDER BY name\"\n );\n $values = array();\n while ($type = db_fetch_object($domqry)) {\n $values[$type->name] = $type->name;\n }\n $form['domain_type_form']['mname'] = array(\n '#type' => 'select',\n '#options' => $values,\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'delegation',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n return $form;\n}", "public function create($type){\n $this->setFormType($type);\n $this->setActionMethod($type);\n }", "function process() {\n // We always call the parent's method\n parent::process();\n $d = $this->getDocument();\n \n // We pass the form our request object and the location of us so the form\n // will make us handle the input (as actually we take care of processing\n // this form) - it could link to any other action as long as it is aware\n // of the form\n $form = new Form($this->getRequest(), new Location($this), Request::METHOD_POST);\n \n // This is how you prepare values for the radio buttons\n $radios = array('visa', 'master');\n \n // This is how we prepare the fields\n $form->addField('text1', new TextInputField('Your name here please', \n new RegexValidator('^[[:alpha:]]+[[:space:]][[:alpha:]]+$')));\n $form->addField('pass1', \n new TextInputField('', new RegexValidator('^[[:digit:]]{16}$'), TextInputField::PASSWORD));\n $form->addField('text2', new TextInputField('', null, TextInputField::TEXTAREA));\n $form->addField('check1', new CheckBoxInputField());\n $form->addField('payment', new RadioButtonInputField('visa', $radios));\n \n // Here we test if the form was correctly submitted\n if($form->isValidSubmission()) {\n // Normally, we would do something useful here and redirect to another page\n // since this form uses the POST method\n $d->setVariable('success', true);\n }\n \n // Here we place the form into the document variable so it can process it\n $d->setVariable('form', $form);\n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "function worx_commerce_term_pricing_node_option_form($form, &$form_id, $node) {\n $form = $possible_fields = $list_fields = $term_fields = $text_fields = $image_fields = array();\n\n // @TODO: This needs to be a var set somewhere.\n $product_field = 'field_product_display_product';\n\n $info = field_info_instances('node', $node->type);\n $line_item_type = $info[$product_field]['display']['default']['settings']['line_item_type'];\n $line_item_info = field_info_instances('commerce_line_item', $line_item_type);\n\n foreach ($line_item_info as $field => $properties) {\n // Setup filter arrays.\n $no_options = array(\n 'commerce_display_path',\n );\n $optionable_types = array(\n 'list_default',\n 'taxonomy_term_reference_link',\n 'text_default',\n 'image',\n );\n\n // This will handle default fields which are the same type as fields we\n // want to create options for.\n if (in_array($field, $no_options)) {\n continue;\n }\n\n // Now we check to make sure we can handle the field type.\n if (in_array($properties['display']['default']['type'], $optionable_types)\n && $properties['commerce_cart_settings']['field_access']) {\n //dsm(field_info_field($field));\n $possible_fields[$field] = $properties['label'];\n\n switch ($properties['display']['default']['type']) {\n case 'list_default':\n $list_fields[$field] = $properties['label'];\n break;\n case 'taxonomy_term_reference_link':\n $term_fields[$field] = $properties['label'];\n break;\n case 'text_default':\n $text_fields[$field] = $properties['label'];\n break;\n case 'image':\n $image_fields[$field] = $properties['label'];\n break;\n }\n }\n }\n $defaults = db_select('commerce_term_pricing_node_options', 'ctpno')\n ->fields('ctpno')\n ->condition('nid', $node->nid)\n ->execute()\n ->fetchAssoc();\n $defaults = unserialize($defaults['options_data']);\n isset($defaults['available_fields']) ? $set_lists = $defaults['available_fields'] : $set_lists = array();\n\n // Now that we have all the pieces we actually create the form!\n // Need the nid for saving into the DB.\n $form['nid'] = array(\n '#type' => 'textfield',\n '#title' => t('Node'),\n '#default_value' => $node->nid,\n '#size' => 25,\n '#maxlength' => 100,\n '#required' => TRUE,\n '#access' => FALSE,\n );\n // Allow the user to select which attributes are available whne adding to cart\n $form['available_fields'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Available Attribute Fields'),\n '#description' => t('Select a field if it should be available as an attribute when adding a product to the cart.'),\n '#options' => $possible_fields,\n '#empty_option' => t('-None-'),\n '#default_value' => $set_lists,\n );\n\n // Each field type has specific fields, so we loop through the active ones\n // and create them.\n foreach ($list_fields as $list_field => $list_label) {\n if (array_key_exists($list_field, $set_lists)) {\n $form[$list_field] = array(\n '#type' => 'fieldset',\n '#title' => t($list_label . ' Setting'),\n '#collapsible' => TRUE, // Added\n '#collapsed' => TRUE, // Added\n );\n $form[$list_field][$list_field . '_required'] = array(\n '#type' => 'checkbox',\n '#title' => t($list_label . ' Field Required?.'),\n '#default_value' => isset($defaults[$list_field . '_required']) ? $defaults[$list_field . '_required'] : FALSE,\n );\n $form[$list_field][$list_field . '_label'] = array(\n '#type' => 'textfield',\n '#title' => t($list_label . ' field Label'),\n '#default_value' => isset($defaults[$list_field . '_label']) ? $defaults[$list_field . '_label'] : $list_label,\n '#description' => t('Change the field label if desired.'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n );\n //Get list options and allow users to select availability\n $list_options = field_info_field($list_field)['settings']['allowed_values'];\n $form[$list_field][$list_field . '_options'] = array(\n '#type' => 'checkboxes',\n '#title' => t($list_label . ' Options'),\n '#options' => $list_options,\n '#default_value' => isset($defaults[$list_field . '_options']) ? $defaults[$list_field . '_options'] : array(),\n '#description' => t('Select which options are available for this attribute on this product.'),\n );\n }\n }\n\n foreach ($term_fields as $term_field => $term_label) {\n if (array_key_exists($term_field, $set_lists)) {\n $form[$term_field] = array(\n '#type' => 'fieldset',\n '#title' => t($term_label . ' Setting'),\n '#collapsible' => TRUE, // Added\n '#collapsed' => TRUE, // Added\n );\n $form[$term_field][$term_field . '_required'] = array(\n '#type' => 'checkbox',\n '#title' => t($term_label . ' Field Required?.'),\n '#default_value' => isset($defaults[$term_field . '_required']) ? $defaults[$term_field . '_required'] : FALSE,\n );\n $form[$term_field][$term_field . '_label'] = array(\n '#type' => 'textfield',\n '#title' => t($term_label . ' field Label'),\n '#default_value' => isset($defaults[$term_field . '_label']) ? $defaults[$term_field . '_label'] : $term_label,\n '#description' => t('Change the field label if desired.'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n );\n $term_options = array();\n $term_vocab = taxonomy_vocabulary_machine_name_load(field_info_field($term_field)['settings']['allowed_values'][0]['vocabulary']);\n $vocab_tree = taxonomy_get_tree($term_vocab->vid);\n foreach ($vocab_tree as $term) {\n $term_options[$term->tid] = $term->name;\n }\n $form[$term_field][$term_field . '_options'] = array(\n '#type' => 'checkboxes',\n '#title' => t($term_label . ' Options'),\n '#options' => $term_options,\n '#default_value' => isset($defaults[$term_field . '_options']) ? $defaults[$term_field . '_options'] : array(),\n '#description' => t('Select which options are available for this attribute on this product.'),\n );\n }\n }\n \n foreach ($text_fields as $text_field => $text_label) {\n if (array_key_exists($text_field, $set_lists)) {\n $form[$text_field] = array(\n '#type' => 'fieldset',\n '#title' => t($text_label . ' Setting'),\n '#collapsible' => TRUE, // Added\n '#collapsed' => TRUE, // Added\n );\n $form[$text_field][$text_field . '_required'] = array(\n '#type' => 'checkbox',\n '#title' => t($text_label . ' Field Required?.'),\n '#default_value' => isset($defaults[$text_field . '_required']) ? $defaults[$text_field . '_required'] : FALSE,\n );\n $form[$text_field][$text_field . '_label'] = array(\n '#type' => 'textfield',\n '#title' => t($text_label . ' field Label'),\n '#default_value' => isset($defaults[$text_field . '_label']) ? $defaults[$text_field . '_label'] : $text_label,\n '#description' => t('Change the field label if desired.'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n );\n }\n }\n \n foreach ($image_fields as $image_field => $image_label) {\n if (array_key_exists($image_field, $set_lists)) {\n $form[$image_field] = array(\n '#type' => 'fieldset',\n '#title' => t($image_label . ' Setting'),\n '#collapsible' => TRUE, // Added\n '#collapsed' => TRUE, // Added\n );\n $form[$image_field][$image_field . '_required'] = array(\n '#type' => 'checkbox',\n '#title' => t($image_label . ' Field Required?.'),\n '#default_value' => isset($defaults[$image_field . '_required']) ? $defaults[$image_field . '_required'] : FALSE,\n );\n $form[$image_field][$image_field . '_label'] = array(\n '#type' => 'textfield',\n '#title' => t($image_label . ' field Label'),\n '#default_value' => isset($defaults[$image_field . '_label']) ? $defaults[$image_field . '_label'] : $image_label,\n '#description' => t('Change the field label if desired.'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n );\n $form[$image_field][$image_field . '_max'] = array(\n '#type' => 'select',\n '#title' => t('Maximum Number of Images'),\n '#options' => range(0, 1),\n '#empty_option' => t('-none-'),\n '#required' => FALSE,\n '#default_value' => isset($defaults[$image_field . '_max']) ? $defaults[$image_field . '_max'] : array(),\n );\n }\n }\n\n $form['#validate'][] = 'worx_commerce_term_pricing_options_validate';\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save')\n );\n\n return $form;\n}", "function manage_node()\n\t{\n\t\n\t\t$tree_id = $this->EE->input->get('tree_id');\n\t\t\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id, true);\n\t\t\n\t\t$this->EE->load->model('channel_entries_model');\n\t\t\t\t\n\t\t$vars = array();\n\t\t\n\t\t$vars['tree_settings'] \t= $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t// check this user has access to this tree\n\t\t$permissions = explode('|', $vars['tree_settings']['permissions']);\n\t\tif( !has_access_to_tree($this->EE->session->userdata['group_id'], $permissions) )\n\t\t{\n\t\t\t$this->EE->session->set_flashdata('message_failure', lang('unauthorised'));\n\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t}\n\t\t\n\t\t$vars['title_extra'] = $vars['tree_settings']['label'];\n\t\t$vars['root_insert'] = $this->EE->input->get('add_root');\n\t\t$vars['channel_entries'] = array();\n\t\t$vars['templates'] = array();\n\t\t$vars['tree_id'] = $tree_id;\n\t\t$vars['parent_select'] = array();\n\t\t$vars['node_id'] = $this->EE->input->get('node_id');\n\t\t$vars['label'] = '';\n\t\t$vars['template_path'] = '';\n\t\t$vars['entry_id'] = '';\n\t\t$vars['custom_url'] = '';\n\t\t$vars['field_data'] = '';\n\t\t$vars['site_pages'] = $this->EE->config->item('site_pages');\n\t\t$vars['hide'] = \" class='js_hide'\";\n\t\t$vars['select_page_uri_option'] = '';\n\t\t\t\n\t\t// get template info from selected templates\n\t\t$template_ids = explode('|', $vars['tree_settings']['template_preferences']);\n\t\t$templates = $this->EE->ttree->get_templates($template_ids, $tree_id);\n\t\t\n\t\t// build our options for the template form_dropdown\n\t\tif( count($templates))\n\t\t{\n\t\t\t// output our initial value only if there's more than one template\n\t\t\tif(count($templates) != 1)\n\t\t\t{\n\t\t\t\t$vars['templates'][0] = '--';\n\t\t\t}\n\t\t\tforeach($templates as $template)\n\t\t\t{\n\t\t\t\t// strip /index from each template\n\t\t\t\t$vars['templates'][ $template['template_id'] ] = str_replace('index/', '', '/'.$template['group_name'].'/'.$template['template_name'].'/');\n\t\t\t}\n\t\t}\n\t\t\n\t\t// get channel entries from selected templates\n\t\t$channel_ids = explode('|', $vars['tree_settings']['channel_preferences']);\n\t\t$fields_needed = array(\"entry_id\", \"channel_id\", \"title\");\n\t\t$channel_entries = $this->EE->channel_entries_model->get_entries($channel_ids, $fields_needed)->result_array();\n\t\t$channels = $this->EE->ttree->get_channels($this->site_id);\n\t\t\n\t\t// build an array of channel_ids => channel_titles\n\t\tforeach($channels as $channel)\n\t\t{\n\t\t\t$channel_names[$channel['channel_id']] = $channel['channel_title'];\n\t\t}\n\t\t// build our channel_entries form_dropdown array\n\t\tif( count($channel_entries))\n\t\t{\n\t\t\t$vars['channel_entries'][0] = '--';\n\t\t\tforeach($channel_entries as $entry)\n\t\t\t{\n\t\t\t\t$vars['channel_entries'][ $entry['entry_id'] ] = '['.$channel_names[$entry['channel_id']].'] &rarr; '.$entry['title'];\n\t\t\t}\n\t\t}\n\n\t\t// sort the entries alphabetically\n\t\tnatcasesort($vars['channel_entries']);\n\t\t\n\t\t// build our nodes array for the select parent form_dropdown\n\t\t// only if we're not inserting a root\n\t\tif(!$vars['root_insert'] && !$vars['node_id'])\n\t\t{\n\t\t\t$parent_select = array();\n\t\t\t$disabled_parents = array();\n\t\t\t\n\t\t\t$flat_tree = $this->EE->ttree->get_flat_tree(1);\n\t\t\t\n\t\t\t// go through our parent options\n\t\t\tforeach($flat_tree as $node)\n\t\t\t{\n\t\t\t\t// find out if any are at or beyond our max_depth limit\n\t\t\t\tif($node['level'] >= $vars['tree_settings']['max_depth'] && $vars['tree_settings']['max_depth'] != 0)\n\t\t\t\t{\n\t\t\t\t\t// store for later\n\t\t\t\t\t$disabled_parents[] = $node['lft'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$parent_select[$node['lft']] = str_repeat('-&nbsp;', $node['level']).$node['label'];\n\t\t\t}\n\t\t\t\n\t\t\t// put our dropdown field into a var\n\t\t\t$vars['parent_select'] = form_dropdown('parent', $parent_select);\n\t\t\t\n\t\t\t// do we have any disabled parents?\n\t\t\tif(count($disabled_parents))\n\t\t\t{\t\n\t\t\t\t// disable each parent we're not allowing.\n\t\t\t\t// haven't figured out a better way of doing this ?\n\t\t\t\tforeach($disabled_parents as $disabled_parent)\n\t\t\t\t{\n\t\t\t\t\t$vars['parent_select'] = str_replace('value=\"'.$disabled_parent.'\"', 'value=\"'.$disabled_parent.'\" disabled=\"disabled\"', $vars['parent_select']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// are we editing a node, get node's existing values\n\t\tif($vars['node_id'])\n\t\t{\n\t\t\t$this_node = $this->EE->ttree->get_node_by_node_id($vars['node_id']);\n\t\t\t\n\t\t\tif(count($this_node))\n\t\t\t{\n\t\t\t\t$vars['label'] = $this_node['label'];\n\t\t\t\t$vars['template_path'] = $this_node['template_path'];\n\t\t\t\t$vars['entry_id'] = $this_node['entry_id'];\n\t\t\t\t$vars['custom_url'] = $this_node['custom_url'];\n\t\t\t\t$vars['field_data'] = ($this_node['field_data']) ? $this->unserialize($this_node['field_data']) : '';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// build options for 'use page uri' checkbox\n\t\t$checked = false;\n\t\t\t\t\t\t\n\t\tif(isset($this_node['custom_url']) && $this_node['custom_url'] == \"[page_uri]\")\n\t\t{\n\t\t\t//check it, and show it\n\t\t\t$checked = TRUE;\n\t\t\t$vars['hide'] = \"\";\n\t\t}\n\t\t\n\t\t$vars['site_pages_checkbox_options'] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t 'name' => 'use_page_uri',\n\t\t\t\t\t\t\t\t\t\t\t\t 'id' => 'use_page_uri',\n\t\t\t\t\t\t\t\t\t\t\t\t 'value' => '1',\n\t\t\t\t\t\t\t\t\t\t\t\t 'checked' => $checked\n\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\n\t\t$vars['has_page_ajax_url'] = str_replace('&amp;','&', $this->_base_url.AMP.\"method=check_entry_has_pages_uri\".AMP.\"tree_id=\".$tree_id.AMP.\"node_entry_id=\");\n\t\t\n\t\t// put the select entry field into a variable\n\t\t$entries_select_dropdown = form_dropdown('entry_id', $vars['channel_entries'], $vars['entry_id']);\n\t\t\n\t\t// fetch our existing entry_ids\n\t\t$entry_ids_in_tree = $this->EE->ttree->get_tree_entry_ids($tree_id);\n\n\t\tif($entry_ids_in_tree)\n\t\t{\n\t\t\t// loop through our entries and str_replace the disabled=\"disabled\" in there :(\n\t\t\tforeach($entry_ids_in_tree as $row)\n\t\t\t{\n\t\t\t\t// don't want to disable our current node though :)\n\t\t\t\tif($row['entry_id'] != $vars['entry_id'])\n\t\t\t\t{\n\t\t\t\t\t$entries_select_dropdown = str_replace('value=\"'.$row['entry_id'].'\"', 'value=\"'.$row['entry_id'].'\" disabled=\"disabled\"', $entries_select_dropdown);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$vars['entries_select_dropdown'] = $entries_select_dropdown;\n\t\t\n\t\tunset($entries_select_dropdown);\n\n\t\treturn $this->content_wrapper('manage_node', 'manage_node', $vars);\n\n\t}", "public function newAction()\n {\n $entity = new Node();\n $form = $this->createForm(new NodeType(), $entity);\n\n return $this->render('HegesAppNodeBundle:Node:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function cs_generate_form() {\n global $post;\n }", "public function create()\n {\n return view('admin.typeField.create');\n }", "public function actionCreate()\n\t{\n\t\t$model = new CmsNode();\n\n\t\tif (isset($_POST['CmsNode']))\n\t\t{\n\t\t\t$model->attributes = $_POST['CmsNode'];\n\n\t\t\tif ($model->save())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash(Yii::app()->cms->flashes['success'], Yii::t('CmsModule.core', 'Node created.'));\n\t\t\t\t$this->redirect(array('update', 'id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create', array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "function mongo_node_type_create_form_validate($form, $form_state) {\n $set = mongo_node_settings();\n $machine_name = $form_state['values']['name'];\n\n if (isset($set[$machine_name])) {\n form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name)));\n return FALSE;\n }\n return TRUE;\n}", "function MYMODULE_my_custom_form(&$form_state) {\n // Add some normal FAPI item.\n $form['title'] = array (\n '#type' => 'textfield',\n '#title' => 'Title',\n '#required' => true,\n '#default_value' => NULL,\n '#maxlength' => 255,\n '#weight' => -5,\n );\n // Add special CCK form items.\n module_load_include('inc', 'content', 'includes/content.node_form');\n // Assume a hypothetical content type called \"article\"\n $type = content_types('article');\n // Go through each of its custom fields and add them to our form.\n foreach ($type['fields'] as $field_name => $field) {\n // If we wanted a specific field, we'd filter it here, by name:\n // if ($field_name == 'field_article_my_custom_field') { }\n // But for this example we're going to add them all.\n $form['#field_info'][$field['field_name']] = $field;\n $form += (array) content_field_form($form, $form_state, $field);\n }\n $form['submit'] = array (\n '#value' => 'Submit',\n '#type' => 'submit',\n );\n return $form;\n}", "public function 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}", "function helper_import_add_form(&$form_state) {\n global $user;\n $form = array();\n\n //drupal_set_message(print_r($form_state));\n\n // Check if the user can create something.\n $types = node_import_types();\n if (empty($types)) {\n form_set_error('', t('No tiene permisos para crear contenidos. <a href=\"!permissions\">Asigne correctamente los permisos</a> en la página de administración.', array('!permissions' => url('admin/user/permissions'))));\n }\n\n // ------------------------------------------------------------\n // Get the currently filled in values of the form.\n $form_state['storage'] = isset($form_state['storage']) ? $form_state['storage'] : array();\n $form_state['values'] = isset($form_state['values']) ? $form_state['values'] : array();\n $values = array_merge($form_state['storage'], $form_state['values']);\n\n // ------------------------------------------------------------\n // Check and store the page we are on.\n $pages = array(\n 'file' => array(\n 'title' => t('Select file'),\n 'description' => t('Seleccione el archivo <a href=\"http://es.wikipedia.org/wiki/CSV\" target=\"_blank\">CSV</a> que contiene los datos a importar.<br>Un archivo CSV, es un archivo donde los datos se encuentran separados por coma. Cada dato contenido entre comas se denomina campo, el cual debe estar entre comillas dobles.<br>Puede descargar un ejemplo de archivo CSV <a href=\"http://localhost/nuevo_sistema_mp/sites/default/files/ejemplo.csv\">aqui</a>.'),\n ),\n 'preview' => array(\n 'title' => t('Vista Previa'),\n 'description' => t('Aquí pueda visualizar previamente los datos a importar. Si encuentra errores puede hacer volver %back o comenzar de nuevo. También puede recargar solo esta página por si ocurrió un error al cargarla %reload.', array('%reload' => t('Recargar'), '%back' => t('Atrás'))),\n ),\n 'start' => array(\n 'title' => t('Iniciar Importación'),\n 'description' => t('Si todo está correcto, clic %start.', array('%start' => t('Start import'))),\n ),\n );\n\n $page_keys = array_keys($pages);\n $first_page = $page_keys[0];\n $last_page = $page_keys[count($page_keys) - 1];\n\n $page = isset($values['page']) ? $values['page'] : $first_page;\n $form['#pages'] = $pages;\n $form_state['storage']['page'] = $page;\n\n // ------------------------------------------------------------\n // Set title and description for the current page.\n $steps = count($pages);\n $step = array_search($page, $page_keys) + 1;\n\n if ($page !== 'intro') {\n drupal_set_title(t('@title (Paso @step de @steps)', array('@title' => $pages[$page]['title'], '@step' => $step, '@steps' => $steps)));\n }\n\n $form['help'] = array(\n '#value' => '<div class=\"help\">'. $pages[$page]['description'] .'</div>',\n '#weight' => -50,\n );\n\n // ------------------------------------------------------------\n // Select or upload a file.\n if ($page == 'file') {\n $files = node_import_list_files(TRUE);\n\n $form['file_select'] = array(\n '#type' => 'item',\n '#title' => t('Seleccione el archivo'),\n '#theme' => 'node_import_file_select',\n );\n\n if (isset($values['fid'])) {\n foreach ($files as $fid => $file) {\n if ($fid == $values['fid']) {\n $file_owner = user_load(array('uid' => $file->uid));\n $form['file_select'][$fid] = array(\n 'filename' => array('#value' => $file->filename),\n 'filepath' => array('#value' => $file->filepath),\n 'filesize' => array('#value' => format_size($file->filesize)),\n 'timestamp' => array('#value' => format_date($file->timestamp, 'small')),\n 'uid' => array('#value' => ($file->uid == 0 ? t('Public FTPd file') : theme('username', $file_owner))),\n );\n $aux_files = node_import_extract_property($files, 'filename'); \n $form['file_select']['fid'] = array(\n '#type' => 'radios',\n '#options' => $aux_files['fid'],\n '#default_value' => isset($values['fid']) ? $values['fid'] : 0,\n );\n }\n }\n set_content_type($form_state);\n set_file_options($form_state);\n map_fields($form_state);\n }\n else {\n $form['file_select']['fid'] = array(\n '#type' => 'item',\n '#value' => t('No files available.'),\n );\n }\n\n $form['#attributes'] = array('enctype' => 'multipart/form-data');\n\n $form['upload'] = array(\n '#type' => 'fieldset',\n '#title' => t('Upload file'),\n '#description' => t(''),\n '#collapsible' => FALSE,\n '#collapsed' => FALSE,\n );\n $form['upload']['file_upload'] = array(\n '#type' => 'file',\n );\n $form['upload']['file_upload_button'] = array(\n '#type' => 'submit',\n '#value' => t('Upload'),\n '#submit' => array('node_import_add_form_submit_upload_file'),\n );\n }\n\n // ------------------------------------------------------------\n // Preview.\n if ($page == 'preview') {\n $form['preview_count'] = array(\n '#type' => 'select',\n '#title' => t('Number of records to preview'),\n '#default_value' => isset($values['preview_count']) ? $values['preview_count'] : variable_get('node_import:preview_count', 5),\n '#options' => drupal_map_assoc(array(5, 10, 15, 25, 50, 100, 150, 200)),\n );\n\n $form['preview'] = array(\n '#title' => t('Previa'),\n );\n\n foreach ($values['previews'] as $i => $preview) {\n $form['preview'][] = array(\n '#type' => 'item',\n '#title' => t('Record @count', array('@count' => $i + 1)),\n '#value' => $preview,\n );\n }\n }\n\n // ------------------------------------------------------------\n // Start import.\n if ($page == 'start') {\n $files = node_import_list_files();\n $file = $files[$values['fid']]; \n $form[] = helper_import_task_details($values);\n }\n\n // ------------------------------------------------------------\n // Add Back, Next and/or Start buttons.\n $form['buttons-bottom'] = array(\n '#weight' => 50,\n );\n $form['buttons-bottom']['back_button'] = array(\n '#type' => 'submit',\n '#value' => t('Back'),\n '#submit' => array('node_import_add_form_submit_back'),\n '#disabled' => ($page == $first_page),\n );\n $form['buttons-bottom']['reload_button'] = array(\n '#type' => 'submit',\n '#value' => t('Reload page'),\n '#submit' => array('node_import_add_form_submit_reload'),\n '#disabled' => ($page == $first_page),\n );\n $form['buttons-bottom']['reset_button'] = array(\n '#type' => 'submit',\n '#value' => t('Reset page'),\n '#submit' => array('node_import_add_form_submit_reset'),\n '#disabled' => ($page == $first_page),\n ); \n $form['buttons-bottom']['next_button'] = array(\n '#type' => 'submit',\n '#value' => ($page == $last_page) ? t('Start import') : t('Siguiente'),\n '#validate' => array('helper_import_add_form_validate_next'),\n '#submit' => array('helper_import_add_form_submit_next'),\n '#disabled' => empty($types),\n ); \n\n return $form;\n}", "public function flo_reg_custom_post_type(){\n\t\t// call the methods that are registering the post types\n\t\t$this->flo_reg_forms_post_type();\n\t\t$this->flo_reg_entrie_post_type();\n\n\t\t$this->flo_register_form_entries_taxonomy();\n\t}", "public function setupNodeTypeAction() {\n\t\t$arguments = $this->request->getArguments();\n\t\t$files = glob(self::TEMP_PATH . '/*');\n\t\t$baseDestination = FLOW_PATH_PACKAGES . 'Sites/' . $this->getActiveSiteKey();\n\t\tforeach($files as $file) {\n\t\t\tif(is_file($file)) {\n\t\t\t\t$filename = basename($file);\n\t\t\t\t$extension = pathinfo($filename, PATHINFO_EXTENSION);\n\t\t\t\tif ($extension == 'yaml') {\n\t\t\t\t\tcopy(self::TEMP_PATH . '/' . $filename, $baseDestination . '/Configuration/' . $filename);\n\t\t\t\t} else if($extension == 'ts2') {\n\t\t\t\t\t$fusion = '';\n\t\t\t\t\tif ($arguments['isDocument']) {\n\t\t\t\t\t\t$fusionDestination = $baseDestination . '/Resources/Private/TypoScript/Root.ts2';\n\t\t\t\t\t\t$fusion = FileService::read($fusionDestination);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$fusionDestination = $baseDestination . '/Resources/Private/TypoScript/NodeTypes/' . $filename;\n\t\t\t\t\t}\n\t\t\t\t\t$fusion .= \"\\n\" . $arguments['fusion'];\n\t\t\t\t\tFileService::write($fusionDestination, $fusion);\n\t\t\t\t} else if($extension == 'html') {\n\t\t\t\t\tif ($arguments['isDocument']) {\n\t\t\t\t\t\t$templateSite = $baseDestination . '/Resources/Private/Templates/Page';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$templateSite = $baseDestination . '/Resources/Private/Templates/NodeTypes';\n\t\t\t\t\t}\n\t\t\t\t\tFileService::write($templateSite . '/' . $filename, $arguments['template']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->view->assign('isDocument', $arguments['isDocument']);\n\t}", "private static function register_form_post_type() {\n\t\tif ( post_type_exists( self::$forms_post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_type_args = apply_filters(\n\t\t\t'wphf_register_post_type_' . self::$forms_post_type,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Forms', 'fff-rest-contact-form' ),\n\t\t\t\t\t'singular_name' => __( 'Form', 'fff-rest-contact-form' ),\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title' ),\n\t\t\t)\n\t\t);\n\n\t\tregister_post_type( self::$forms_post_type, $post_type_args );\n\t}", "public function perform()\n {\n // init template array to fill with node data\n $this->viewVar['title'] = '';\n // Init template form field values\n $this->viewVar['error'] = array();\n\n $this->viewVar['htmlTitle'] .= ' Add new simple text';\n\n $addtext = $this->httpRequest->getParameter('addtext', 'post', 'alnum');\n $cancel = $this->httpRequest->getParameter('cancel', 'post', 'alpha');\n\n if(false !== $cancel)\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/default/cntr/advancedMain');\n }\n\n\n // add node\n if( !empty($addtext) )\n {\n if(false !== ($id_text = $this->addText()))\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/misc/cntr/editText/id_text/'.$id_text);\n }\n }\n }", "public function xadmin_createfield() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$field_title = $args [1];\n\t\t$field_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$field = $this->getModel ( 'field' );\n\t\t$this->session->returnto ( 'fields' );\n\t\t\n\t\t/* create the form */\n\t\t$field->createNewField ( $field_title, $field_type );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t$plug = Plugins_Fields::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateField', $field );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateField_ExtendDataTable', $field );\n\t\t\n\t\t$plug->trigger ( 'onAfterSaveNewField', $field );\n\t\t\n\t\t$this->setArguments ( array ($field->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( '_editField' );\n\t}", "function wpgnv_process_form() {\n\tif ( empty( $_POST['post-title'] ) && wp_verify_nonce( $_POST['wpgnv_new_idea'], 'wpgnv_new_idea' ) ) {\n\t\tglobal $wpgnv_error;\n\t\t$wpgnv_error = 'You left the Idea field empty. Please enter an Idea and THEN submit it.';\n\t\treturn;\n\t}\n\tif ( isset( $_POST ) && wp_verify_nonce( $_POST['wpgnv_new_idea'], 'wpgnv_new_idea' ) ) {\n\t\t$post_args = array (\n\t\t\t'post_type' => 'ideas',\n\t\t\t'post_status' => 'pending',\n\t\t\t'post_title' => esc_html( $_POST['post-title'] )\n\t\t);\n\t\t$post_id = wp_insert_post( $post_args );\n\n\t\tif ( is_wp_error( $post_id ) ) {\n\t\t\tglobal $wpgnv_error;\n\t\t\t$wpgnv_error = 'Sorry, there was an error processing your new idea.';\n\t\t} else {\n\t\t\tglobal $wpgnv_success;\n\t\t\t$wpgnv_success = 'Awesome! Your idea has been submitted and is awaiting moderation.';\n\t\t}\n\t}\t\n}", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "function gwt_drupal_form_node_form_alter(&$form, &$form_state, $form_id) {\n // Remove if #1245218 is backported to D7 core.\n foreach (array_keys($form) as $item) {\n if (strpos($item, 'field_') === 0) {\n if (!empty($form[$item]['#attributes']['class'])) {\n foreach ($form[$item]['#attributes']['class'] as &$class) {\n // Core bug: the field-type-text-with-summary class is used as a JS hook.\n if ($class != 'field-type-text-with-summary' && strpos($class, 'field-type-') === 0 || strpos($class, 'field-name-') === 0) {\n // Make the class different from that used in theme_field().\n $class = 'form-' . $class;\n }\n }\n }\n }\n }\n}", "public function bindForm($type = RB_DEFAULT_FORM_TYPE) {\n\t\t$class = 'Rb' . $type . 'Form';\n\t\trequire_once('forms/' . $class . '.class.php');\n\t\t$form = new $class();\n\n\t\t$content = $form->bind($_POST);\n\t\t$category = 'default';\n\n\t\t$this->storage->saveArticle($category, $content);\n\t}", "function process(&$dom, &$formnode) {\n\t\t$formerrors = $this->readform();\n\t\tif(count($formerrors) > 0) {\n\t\t\tforeach($formerrors as $error) {\n\t\t\t\t$node = $formnode->appendChild($dom->createElement(\"formerror\"));\n\t\t\t\t$node->setAttribute(\"type\", $error);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Attempt MySQL add\n\t\t$result = $this->ftpmirror->addmirror();\n\t\tif(PEAR::isError($result)) {\n\t\t\t$node = $formnode->appendChild($dom->createElement(\"error\"));\n\t\t\t$node->appendChild($dom->createTextNode($result->getMessage()));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Report success\n\t\tif($result) {\n\t\t\t$node = $formnode->appendChild($dom->createElement(\"added\"));\n\t\t\t$this->ftpmirror->add_to_node($dom, $node);\n\t\t\t$this->ftpmirror = new FTPMirror();\n\t\t}\n\n\t\treturn;\n\t}", "function os2dagsorden_create_agenda_meeting_create_user_form($form, &$form_state) {\r\n $form_state['meeting_data'] = json_encode($form_state['values']);\r\n $form[] = array(\r\n '#markup' => '<h1 class=\"title\">' . t('External user') . '</h1>',\r\n );\r\n\r\n $form[] = array(\r\n '#markup' => '<div class=\"node\">',\r\n );\r\n $form['firstname'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Firstname'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n );\r\n $form['lastname'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Lastname'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n );\r\n $form['email'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Email'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n '#element_validate' => array('_os2dagsorden_create_agenda_meeting_create_user_form_email_validate'),\r\n );\r\n $form['save_bullet_point'] = array(\r\n '#type' => 'submit',\r\n '#value' => t('Save'),\r\n '#submit' => array('_os2dagsorden_create_agenda_meeting_create_user_form_submit'),\r\n );\r\n $form[] = array(\r\n '#markup' => '</div>',\r\n );\r\n $form['#attached']['css'] = array(\r\n drupal_get_path('module', 'os2dagsorden_create_agenda') . '/css/form_theme.css',\r\n );\r\n return $form;\r\n}", "function ctools_term_parent_settings_form($conf) {\n $form['type'] = array(\n '#type' => 'select',\n '#title' => t('Relationship type'),\n '#options' => array('parent' => t('Immediate parent'), 'top' => t('Top level term')),\n '#default_value' => $conf['type'],\n );\n\n return $form;\n}", "public function populateFromDOMNode(\\DOMElement $formNode) {\r\n foreach (array('name', 'id', 'class', 'action', 'enctype') as $attr) {\r\n $this->$attr = $formNode->hasAttribute($attr) ? $formNode->getAttribute($attr) : null;\r\n }\r\n $this->method = strtolower($formNode->getAttribute('method'));\r\n\r\n foreach ($this->search('.//input', $formNode) as $input) {\r\n $n = $this->getAttribute($input, 'name');\r\n //if ($n == '') continue;\r\n $v = $this->getAttribute($input, 'value');\r\n $typeAttr = $this->getAttribute($input, 'type');\r\n $type = ($typeAttr == null || $typeAttr == 'input') ? 'text' :\r\n preg_replace('/[^a-z]/', '', strtolower($this->getAttribute($input, 'type')));\r\n if (!in_array($type, self::supportedInputTypes())) {\r\n $this->warn(\"Found input field with unrecognized type, '$type'\");\r\n }\r\n if ($type == 'radio') {\r\n $value = $v === null ? \"on\" : $v; # Default value of \"on\" is used by web browsers\r\n if (empty($this->fields[$n])) {\r\n $field = $this->addField($n, new HtmlRadioButtonField());\r\n }\r\n $field->options[$value] = $value;\r\n $subField = new HtmlFormField(null, $value, $input);\r\n $field->optionLabels[$value] = $this->getLabel(null, $subField);\r\n $field->textAfter[$value] = $input->nextSibling ?\r\n trim($this->normalizeSpace($input->nextSibling->textContent)) : null;\r\n if ($this->getAttribute($input, 'checked')) {\r\n $field->value = $value;\r\n }\r\n $field->xmlNode = $input;\r\n } else if ($type == 'checkbox') {\r\n if ($v === null) $v = 'on'; // Default value of \"on\" is used by web browsers\r\n $isChecked = $this->getAttribute($input, 'checked') ? true : false;\r\n $this->addField($n, new HtmlCheckboxField($isChecked, $v, $input));\r\n } else if ($type == 'submit') {\r\n $field = $this->addField($n, new HtmlButtonField('submit', $v, $input));\r\n $field->buttonText = $v;\r\n } else if ($type == 'image') {\r\n $field = $this->addField($n, new HtmlButtonField('image', $v, $input));\r\n $field->buttonText = null;\r\n } else if ($type == 'button') {\r\n // XXX: How should <input type=\"button\" ... /> fields be dealt with ???\r\n } else {\r\n $this->addField($n, new HtmlTextField($type, $v === null ? '' : $v, $input));\r\n }\r\n }\r\n\r\n foreach ($this->search('.//select', $formNode) as $select) {\r\n $name = $select->getAttribute('name');\r\n if ($name == '') continue;\r\n $options = array();\r\n $defaultValue = null;\r\n foreach ($this->search('.//option', $select) as $option) {\r\n $innerContent = trim($this->normalizeSpace($option->textContent));\r\n $thisOptionValue = $this->getAttribute($option, 'value');\r\n if ($thisOptionValue === null) { $thisOptionValue = $innerContent; }\r\n if ($option->getAttribute('selected')) {\r\n $defaultValue = $thisOptionValue;\r\n } else if ($defaultValue === null) {\r\n $defaultValue = $thisOptionValue;\r\n }\r\n $options[$thisOptionValue] = $innerContent;\r\n }\r\n //if ($defaultValue === null) { $defaultValue = keys($options)[0]; }\r\n $this->addField($name, new HtmlSelectField($options, $defaultValue, $select));\r\n //$this->fields[$name]->xmlNode = $select;\r\n }\r\n\r\n foreach ($this->search('.//textarea', $formNode) as $textarea) {\r\n $name = $textarea->getAttribute('name');\r\n if ($name == '') continue;\r\n $this->addField($name, new HtmlFormField('textarea', $textarea->textContent, $textarea));\r\n //$this->fields[$name]->xmlNode = $textarea;\r\n }\r\n\r\n foreach ($this->search('.//button', $formNode) as $button) {\r\n $n = $this->getAttribute($button, 'name');\r\n //if ($n == '') continue;\r\n $v = $this->getAttribute($button, 'value');\r\n $t = $this->getAttribute($button, 'type');\r\n $type = $t ? $t : 'submit';\r\n $f = new HtmlButtonField($type, $v, $button);\r\n $f->buttonText = $button->textContent;\r\n $this->addField($n, $f);\r\n }\r\n\r\n foreach ($this->fields as $n => $f) {\r\n $this->fields[$n]->label = $this->getLabel($n, $f);\r\n }\r\n }", "public function create()\n {\n $types = Core_custom_field_type::select('ID','name')->get();\n\n\n return view('common::backend.customfield.create' , compact('types'));\n }", "public static function create() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$field_type = FrmAppHelper::get_post_param( 'field_type', '', 'sanitize_text_field' );\n\t\t$form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );\n\n\t\t$field = self::include_new_field( $field_type, $form_id );\n\n // this hook will allow for multiple fields to be added at once\n do_action('frm_after_field_created', $field, $form_id);\n\n wp_die();\n }", "public function test_formNodeAdded() : void\n {\n $form = $this->createForm();\n $form->onFormNodeAdded(array($this, 'callback_formNodeAdded'));\n $form->onNodeAdded(array($this, 'callback_nodeAdded'));\n\n $form->addText('foo');\n\n $this->assertTrue($this->formEventCalled);\n $this->assertTrue($this->containerEventCalled);\n }", "protected function createFormFields() {\n\t}", "function pdfbulletin_edit_form(&$node, $form_state) {\n $type = node_get_types('type', $node);\n $pdfbulletin = $node->pdfbulletin;\n $form['pdfbulletin'] = array(\n '#type' => 'value',\n '#value' => $pdfbulletin,\n );\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => check_plain($type->title_label),\n '#required' => TRUE,\n '#default_value' => $node->title,\n '#weight' => -5,\n );\n\n $form['header_format'] = array(\n '#tree' => FALSE,\n );\n $form['header_format']['header'] = array(\n '#title' => t('Header'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->header,\n );\n $form['header_format']['format'] = filter_form($pdfbulletin->header_format, NULL, array('header_format'));\n\n $form['footer_format'] = array(\n '#tree' => FALSE,\n );\n $form['footer_format']['footer'] = array(\n '#title' => t('Footer'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->footer,\n );\n $form['footer_format']['format'] = filter_form($pdfbulletin->footer_format, NULL, array('footer_format'));\n\n $form['email_format'] = array(\n '#tree' => FALSE, \n );\n $form['email_format']['email'] = array(\n '#title' => t('Text for e-mail'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->email,\n );\n $form['email_format']['format'] = filter_form($pdfbulletin->email_format, NULL, array('email_format'));\n\n $form['empty_text_format'] = array(\n '#tree' => FALSE,\n );\n $form['empty_text_format']['empty_text'] = array(\n '#title' => t('Empty text'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->empty_text,\n '#description' => t('Text for e-mail if it is sent with an empty bulletin.'),\n );\n $form['empty_text_format']['format'] = filter_form($pdfbulletin->empty_text_format, NULL, array('empty_text_format'));\n\n $paper_sizes = pdfbulletin_util_settings('paper_size');\n $form['paper_size'] = array(\n '#title' => t('Paper size'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->paper_size,\n );\n foreach ($paper_sizes as $key => $value) {\n $form['paper_size']['#options'][$key] = t($key);\n }\n\n $css = pdfbulletin_css();\n $form['css_file'] = array(\n '#title' => t('Style'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->css_file,\n );\n foreach ($css as $key => $value) {\n $form['css_file']['#options'][$key] = check_plain($value);\n }\n\n\n return $form;\n}", "function ding_panels_node_body_content_type_edit_form(&$form, &$form_state) {\n return $form;\n}", "function store_post_type(){\n $rules = array(\n array('field'=>'name', 'label'=>'lang:post_type_name', 'rules'=>'trim|required|htmlspecialchars'),\n array('field'=>'description', 'label'=>'lang:post_type_description', 'rules'=>'trim|required|htmlspecialchars'),\n array('field'=>'avatar', 'label'=>'lang:avatar', 'rules'=>'trim|required')\n );\n $this->form_validation->set_rules($rules);\n\n /*Check if the form passed its validation */\n if ($this->form_validation->run() == FALSE) {\n $this->create_post_type();\n }\n else{\n $isCreate = $this->ad_config_model->createPostType();\n if($isCreate){\n redirect(base_url('admin/config/post_types'));\n }else{\n $this->create_post_type();\n }\n }\n }", "function legal_document_content_type_edit_form_submit($form, &$form_state) {\n $form_state['conf']['document'] = $form_state['values']['document'];\n $form_state['conf']['agree'] = $form_state['values']['agree'];\n $form_state['conf']['admin_title'] = $form_state['values']['admin_title'];\n}", "function makeForm($request, $formOpts){\n\t\t#print_r ($request);\n\t\t$formDescriptor = array(\n\t\t\t'radioForm' => array(\n \t\t\t\t'type' => 'radio',\n \t\t\t\t'label' => 'Select a search type:',\n \t\t\t\t'options' => array( # The options available within the checkboxes (displayed => value)\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 0' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 1' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 2' => 2,\n\t\t\t\t\t\t\t\t\t\t\t),\n \t\t\t\t'default' => 0 # The option selected by default (identified by value)\n \t\t\t),\n 'textfield1' => array(\n\t\t\t\t\t\t\t\t'label' => 'textfield 1 label', # What's the label of the field\n\t\t\t\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t\t\t\t),\n\t\t\t'textfield2' => array(\n\t\t\t\t\t'label' => 'textfield 2 label', # What's the label of the field\n\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t), \t\t\t\t\n \t\t);\n\t\t\n\t\tswitch($formOpts){\n\t\t\tcase '1':\n\t\t\t\t$formDescriptor['textfield1']['label'] = 'textfield 1 label'; # What's the label of the field\n\t\t\t\t$formDescriptor['textfield2']['label'] = 'textfield 2 label'; # What's the label of the field\t\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t#same as case 1\n\t\t\tdefault:\n\t\t}\n\n\t\t#Submit button structure and page callback. \n $htmlForm = new HTMLForm( $formDescriptor, $this->getContext(), 'myform'); # We build the HTMLForm object, calling the form 'myform'\n $htmlForm->setSubmitText( 'Submit button text' ); # What text does the submit button display\n\t\t\n\t\t/* We set a callback function */ \n\t\t#This code has no function to the special page. It used to produce red wiki text callback such as \"Try Again\" commented-out below under processInput function. \n\t\t$htmlForm->setSubmitCallback( array( 'specialpagetemplate', 'processInput' ) ); # Call processInput() in specialpagetemplate on submit\n $htmlForm->show(); # Displaying the form\n\t}", "function ef_notifications_form_node_form_alter(&$form, $form_state) {\n if (workbench_moderation_node_type_moderated($form['type']['#value'])) {\n $available = FALSE;\n // Workbench Moderation uses \"options\" fieldset in favor of \"revision information\"\n // if \"administer roles\" perm is given to content moderator.\n if (isset($form['revision_information']['workbench_moderation_state_new'])) {\n $wrapper_id = 'revision_information';\n $available = TRUE;\n }\n else if (isset($form['options']['workbench_moderation_state_new'])) {\n $wrapper_id = 'options';\n $available = TRUE;\n }\n\n if (!$available) {\n return;\n }\n\n $form[$wrapper_id]['workbench_moderation_state_new']['#ajax'] = array(\n 'callback' => 'ef_notifications_form_node_callback',\n 'wrapper' => 'wv-workflow-form-node',\n 'effect' => 'fade',\n 'event' => 'change',\n );\n\n $form[$wrapper_id]['workflow_email'] = array(\n '#prefix' => '<div id=\"wv-workflow-form-node\">',\n '#suffix' => '</div>',\n '#tree' => TRUE,\n );\n\n // Determine current state.\n if (isset($form['#node']->workbench_moderation['current']->state)) {\n $current_from_state = $form['#node']->workbench_moderation['current']->state;\n }\n else {\n $current_from_state = variable_get('workbench_moderation_default_state_' . $form['type']['#value'], workbench_moderation_state_none());\n }\n\n if ($current_from_state == workbench_moderation_state_published()) {\n $current_from_state = workbench_moderation_state_none();\n }\n\n // Initialize to the current state.\n $form_moderation_state = $current_from_state;\n if (empty($form_state['values'])) {\n $form_moderation_state = $current_from_state;\n }\n if (!empty($form_state['values']) &&\n isset($form_state['values']['workbench_moderation_state_new'])) {\n $form_moderation_state = $form_state['values']['workbench_moderation_state_new'];\n }\n if (!empty($form_state['values']) &&\n isset($form_state['values'][$wrapper_id]['workbench_moderation_state_new'])) {\n $form_moderation_state = $form_state['values'][$wrapper_id]['workbench_moderation_state_new'];\n }\n\n $ef_notifications = ef_notifications_get();\n foreach ($ef_notifications as $transition => $notification_roles) {\n foreach ($notification_roles as $rid => $notification_transition) {\n if ($notification_transition->from_name == $current_from_state\n && $notification_transition->to_name == $form_moderation_state) {\n ef_notifications_create_form_element($form, $notification_transition);\n }\n }\n }\n\n $form['actions']['submit']['#submit'][] = 'ef_notifications_notification_submit';\n }\n}", "public function create()\n {\n return view('admin.formtype.create', [\n 'form_type' => new FormType,\n 'colors' => Setting::colors()\n ]);\n }", "function bat_event_type_form($form, &$form_state, $event_type, $op = 'edit') {\n $form['#attributes']['class'][] = 'bat-management-form bat-event-type-form';\n\n if ($op == 'clone') {\n $event_type->label .= ' (cloned)';\n $event_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $event_type->label,\n '#description' => t('The human-readable name of this event type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n\n // Machine-readable type name.\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($event_type->type) ? $event_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'bat_event_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this event type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n if ($op == 'add') {\n $form['fixed_event_states'] = array(\n '#type' => 'checkbox',\n '#title' => t('Fixed event states'),\n );\n }\n elseif ($op == 'edit') {\n $form['type']['#disabled'] = TRUE;\n }\n\n $form['event_granularity'] = array(\n '#type' => 'select',\n '#title' => t('Event Granularity'),\n '#options' => array('bat_daily' => t('Daily'), 'bat_hourly' => t('Hourly')),\n '#default_value' => isset($event_type->event_granularity) ? $event_type->event_granularity : 'bat_daily',\n );\n\n if (isset($event_type->is_new)) {\n // Check for available Target Entity types.\n $target_entity_types = module_invoke_all('bat_event_target_entity_types');\n if (count($target_entity_types) == 1) {\n // If there's only one target entity type, we simply store the value\n // without showing it to the user.\n $form['target_entity_type'] = array(\n '#type' => 'value',\n '#value' => $target_entity_types[0],\n );\n }\n else {\n // Build option list.\n $options = array();\n foreach ($target_entity_types as $target_entity_type) {\n $target_entity_info = entity_get_info($target_entity_type);\n $options[$target_entity_type] = $target_entity_info['label'];\n }\n $form['target_entity_type'] = array(\n '#type' => 'select',\n '#title' => t('Target Entity Type'),\n '#description' => t('Select the target entity type for this Event type. In most cases you will wish to leave this as \"Unit\".'),\n '#options' => $options,\n // Default to BAT Unit if available.\n '#default_value' => isset($target_entity_types['bat_unit']) ? 'bat_unit' : '',\n );\n }\n }\n\n if (!isset($event_type->is_new) && $event_type->fixed_event_states == 0) {\n $fields_options = array();\n\n $fields = field_info_instances('bat_event', $event_type->type);\n\n foreach ($fields as $field) {\n $fields_options[$field['field_name']] = $field['field_name'];\n }\n\n $form['events'] = array(\n '#type' => 'fieldset',\n '#group' => 'additional_settings',\n '#title' => t('Events'),\n '#tree' => TRUE,\n '#weight' => 80,\n );\n\n $form['events'][$event_type->type] = array(\n '#type' => 'select',\n '#title' => t('Select your default @event field', array('@event' => $event_type->label)),\n '#options' => $fields_options,\n '#default_value' => isset($event_type->default_event_value_field_ids[$event_type->type]) ? $event_type->default_event_value_field_ids[$event_type->type] : NULL,\n '#empty_option' => t('- Select a field -'),\n );\n }\n\n if (!isset($event_type->is_new)) {\n $fields_options = array();\n $fields = field_info_instances('bat_event', $event_type->type);\n\n foreach ($fields as $field) {\n $fields_options[$field['field_name']] = $field['field_name'];\n }\n\n $form['event_label'] = array(\n '#type' => 'fieldset',\n '#group' => 'additional_settings',\n '#title' => t('Label Source'),\n '#tree' => TRUE,\n '#weight' => 80,\n );\n\n $form['event_label']['default_event_label_field_name'] = array(\n '#type' => 'select',\n '#title' => t('Select your label field', array('@event' => $event_type->label)),\n '#default_value' => isset($event_type->default_event_label_field_name) ? $event_type->default_event_label_field_name : NULL,\n '#empty_option' => t('- Select a field -'),\n '#description' => t('If you select a field here, its value will be used as the label for your event. BAT will fall back to using the event state as the label if the field has no value.'),\n '#options' => $fields_options,\n );\n }\n\n $form['actions'] = array(\n '#type' => 'actions',\n '#tree' => FALSE,\n );\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save Event type'),\n '#weight' => 40,\n '#submit' => array('bat_event_type_form_submit'),\n );\n\n return $form;\n}", "protected function saveData() {\n $user = \\Drupal\\user\\Entity\\User::load(\\Drupal::currentUser()->id());\n\n $node = Node::create(array(\n 'type' => 'community',\n 'title' => $this->store->get('community'),\n 'langcode' => 'en',\n 'uid' => $user->get('uid')->value,\n 'status' => 1,\n 'field_community' => array($this->store->get('community')),\n 'field_state' => array($this->store->get('state')),\n 'field_country' => array($this->store->get('country')),\n 'field_city' => array($this->store->get('community')),\n 'field_address' => array($this->store->get('address')),\n 'field_company' => array($this->store->get('company')),\n 'field_name_on_card' => array($this->store->get('name_card')),\n 'field_card_number' => array($this->store->get('card_number')),\n 'field_payment_type' => array($this->store->get('payment_type')),\n ));\n\n $node->save();\n $this->deleteStore();\n drupal_set_message($this->t('The form has been saved.'));\n\n }", "function multisite_aggregate_type_form_submit(&$form, &$form_state) {\n $aggregate_type = entity_ui_form_submit_build_entity($form, $form_state);\n $aggregate_type->save();\n $form_state['redirect'] = 'admin/structure/multisite_aggregate_types';\n}", "function _erpal_projects_helper_timetracking_node_form_alter(&$form, $form_state) {\n //we alter only, if the timetracking will be new created, not for existing timetrackings\n $nid = isset($form['nid']['#value']) ? $form['nid']['#value'] : false;\n if ($nid) {\n return;\n }\n \n if (isset($form['field_timetracking_subject'][LANGUAGE_NONE][0]['target_id'])) {\n $target_string = $form['field_timetracking_subject'][LANGUAGE_NONE][0]['target_id']['#default_value'];\n if (!$target_string) {\n //there must be a subject, otherwise show access denied and information to choose a task!\n drupal_set_message(t('Please select a task from you projects first to track you time.'), 'error');\n drupal_access_denied();\n exit(0);\n }\n\n //prefil the title\n $nid = _erpal_basic_helper_get_nid_from_autocomplete_string($target_string);\n $subject_node = node_load($nid);\n $default_title = _erpal_projects_helper_get_timetracking_default_title();\n $default_title = token_replace($default_title, array('subject' => $subject_node));\n $form['title']['#default_value'] = $default_title;\n\n //prefill the category\n $node = node_load($nid);\n $category_tid = _erpal_projects_helper_get_project_category($node, true);\n if ($category_tid) {\n $form['field_project_tags'][LANGUAGE_NONE]['#default_value'] = $category_tid;\n }\n }\n}", "abstract protected function _setNewForm();", "public function create_post_types() {\n }", "public function create(NodeType $nodeType)\n {\n // 节点模板数据\n $model = array_merge(Node::template(), $nodeType->getFieldValues());\n $model['langcode'] = langcode('content');\n $model['mold_id'] = $nodeType->getKey();\n\n // 字段集,按是否全局字段分组\n $fields = $nodeType->getFields()->groupBy(function(NodeField $field) {\n return $field->is_global ? 'global' : 'local';\n });\n\n $data = [\n 'model' => $model,\n 'context' => [\n 'mold' => $nodeType,\n 'global_fields' => $fields->get('global', []),\n 'local_fields' => $fields->get('local', []),\n 'views' => Node::query()->pluck('view')->filter()->unique()->all(),\n 'mode' => 'create',\n ],\n 'langcode' => langcode('content'),\n ];\n\n return view('node::node.create-edit', $data);\n }", "function druplex_preprocess_node(&$variables) {\n \n $node = $variables['node'];\n $variables['date'] = format_date($node->created);\n \n $variables['field_image_class'] = 'col-md-12';\n if (!empty($node->{'field_image'})) {\n $variables['field_image_class'] = 'col-md-7';\n }\n \n if (variable_get('node_submitted_' . $node->type, TRUE)) {\n $variables['display_submitted'] = TRUE;\n \n $date = format_date($node->created, 'custom', 'M d, Y');\n $user = theme('username', array('account' => $node));\n \n $variables['submitted'] = '<ul class=\"submitted\">';\n $variables['submitted'] .= '<li>' . $date . '</li>';\n $variables['submitted'] .= '<li>' . $user . '</li>';\n \n if (!empty($node->{'field_tags'})) {\n $tags = druplex_node_tags($node);\n $variables['submitted'] .= '<li>' . $tags . '</li>';\n }\n \n if ($node->comment == COMMENT_NODE_OPEN) {\n $comments = $node->comment_count . t(' comments');\n $variables['submitted'] .= '<li>' . $comments . '</li>';\n }\n \n $variables['submitted'] .= '</ul>';\n } else {\n $variables['display_submitted'] = FALSE;\n $variables['submitted'] = '';\n }\n \n}", "abstract protected function getFormType(): string;", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "function ting_visual_relation_slide_form_submit($form, &$form_state) {\n $type = $form_state['values']['type'];\n $fields = array(\n 'name' => $form_state['values']['name'],\n 'type' => $type,\n );\n switch ($type) {\n case 'external':\n case 'circular':\n $fields['datawell_pid'] = $form_state['values']['datawell_pid'];\n break;\n case 'structural':\n $fields['search_query'] = $form_state['values']['search_query'];\n }\n // Determine if this is an update or insert\n $slide = isset($form_state['slide']) ? $form_state['slide'] : FALSE;\n if ($slide) {\n db_update('ting_visual_relation_slides')\n ->condition('slide_id', $slide->slide_id)\n ->fields($fields)\n ->execute();\n }\n else {\n db_insert('ting_visual_relation_slides')->fields($fields)->execute();\n }\n // Set message and go back to table overview\n drupal_set_message(t('Slide saved'));\n $form_state['redirect'] = 'admin/config/ting/ting-visual-relation/app-settings';\n}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function createPostTypes()\n {\n }" ]
[ "0.75537634", "0.7259901", "0.681234", "0.6734988", "0.66604066", "0.66321564", "0.66177344", "0.65728587", "0.64692134", "0.64574426", "0.6294301", "0.62569225", "0.61547625", "0.6117619", "0.6045405", "0.60168475", "0.6002687", "0.5941034", "0.59276116", "0.5846542", "0.5828956", "0.5796779", "0.5793598", "0.5789525", "0.57869947", "0.57788634", "0.5773492", "0.5766791", "0.5762629", "0.5762629", "0.5751964", "0.5750839", "0.5666657", "0.5666657", "0.56613696", "0.5655499", "0.5647479", "0.56434995", "0.5641687", "0.5632601", "0.5594789", "0.55902094", "0.5578864", "0.55727357", "0.557222", "0.5563029", "0.55597985", "0.5555389", "0.5516052", "0.55016315", "0.54727733", "0.5466672", "0.5466498", "0.546571", "0.5461558", "0.5461115", "0.54517776", "0.54490054", "0.5435557", "0.5433648", "0.54258233", "0.54238594", "0.5407306", "0.5387154", "0.538401", "0.5381142", "0.53767043", "0.53638506", "0.53573984", "0.5343858", "0.53395534", "0.53320503", "0.5326324", "0.5323696", "0.53207886", "0.53100795", "0.5307867", "0.5307656", "0.53065217", "0.5306467", "0.5290406", "0.5279624", "0.52731013", "0.5267514", "0.52647305", "0.52629626", "0.52570885", "0.523946", "0.5234142", "0.5232408", "0.52316993", "0.5227377", "0.52269334", "0.52123696", "0.5211184", "0.5191863", "0.5179624", "0.51689404", "0.5168705", "0.5165434" ]
0.75139195
1
Form constructor for editing entity types.
function mongo_node_type_edit_form($form, $form_state, $entity_type) { $set = mongo_node_settings(); $form = array(); $form['label'] = array( '#type' => 'textfield', '#title' => t('Entity type'), '#default_value' => $set[$entity_type]['label'], '#description' => t('The human readable name of the entity.'), ); $form['name'] = array( '#type' => 'machine_name', '#required' => FALSE, '#default_value' => $entity_type, '#machine_name' => array( 'exists' => '_mongo_node_type_exists', 'source' => array('label'), ), ); // Send entity type. $form['entity_type'] = array( '#type' => 'value', '#value' => $entity_type, ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function travel_type_form($form, &$form_state, $entity_type, $op = 'edit') {\n // Handle the case when cloning is performed.\n if ($op == 'clone') {\n $entity_type->label .= ' (cloned)';\n $entity_type->type = '';\n }\n\n // Describe all properties of the entity which shall be shown on the form.\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $entity_type->label,\n '#description' => t('The human-readable name of this entity type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($entity_type->type) ? $entity_type->type : '',\n '#maxlength' => 32,\n //'#disabled' => $entity_type->isLocked() && $op != 'clone',\n '#machine_name' => array(\n 'exists' => 'travel_type_load_multiple',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this entity type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n $form['description'] = array(\n '#type' => 'textarea',\n '#default_value' => isset($entity_type->description) ? $entity_type->description : '',\n '#description' => t('Description about the entity type.'),\n );\n\n // Add some buttons.\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save entity type'),\n '#weight' => 40,\n );\n //if (!$entity_type->isLocked() && $op != 'add' && $op != 'clone') {\n $entity_id = entity_id('travel', $entity);\n if (!empty($entity_id)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete entity type'),\n '#weight' => 45,\n '#limit_validation_errors' => array(),\n '#submit' => array('travel_type_form_submit_delete'),\n );\n }\n\n return $form;\n}", "public function __construct(\\Library\\Entity $entity){\n\t\t$this->setForm(new Form\\Form($entity));\n\t}", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n\n $elemento = new Text(\"formacion_id\");\n $this->add($elemento->setLabel(\"Id\"));\n } else {\n $this->add(new \\Phalcon\\Forms\\Element\\Hidden(\"formacion_id\"));\n }\n /*========================== ==========================*/\n $elemento = new Text('formacion_institucion',array('maxlength'=>50,'class'=>'form-control','required'=>'true','placeholder'=>'Ingrese el nombre de la institución'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Institución');\n $elemento->setFilters(array('striptags', 'string'));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'El nombre de la institución es requerido'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_gradoId', \\Curriculum\\Grado::find(), array(\n 'using' => array('grado_id', 'grado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el nivel'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Nivel');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Text('formacion_titulo',array('maxlength'=>50,'class'=>'form-control','placeholder'=>'Ingrese el nombre del Titulo','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Titulo');\n $elemento->setFilters(array('striptags', 'string'));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_estadoId', \\Curriculum\\Estado::find(), array(\n 'using' => array('estado_id', 'estado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el estado'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Estado');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaInicio',array('class'=>'form-control','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Fecha de Inicio');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha de inicio es requerida.'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaFinal',array('class'=>'form-control', 'disabled'=>''));\n $elemento->setLabel('Fecha Final');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha final es requerida.'\n ))\n ));\n $this->add($elemento);\n\n }", "public function __construct( $form_type, $args )\n {\n parent::__construct( $form_type.'_form', $args );\n $this->form_type = $form_type;\n \n $this->add_column( 'id', 'number', 'ID', true );\n $this->add_column( 'date', 'date', 'Date Added', true );\n $this->add_column( 'typist_1', 'string', 'Typist 1', false );\n $this->add_column( 'typist_1_submitted', 'boolean', 'Submitted', false );\n $this->add_column( 'typist_2', 'string', 'Typist 2', false );\n $this->add_column( 'typist_2_submitted', 'boolean', 'Submitted', false );\n $this->add_column( 'conflict', 'boolean', 'Conflict', false );\n }", "protected function _prepareForm()\n\t{\n\n\t\t$intId = $this->getRequest()->getParam(SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID);\n\n\t\t$objEntity = new SDZeCOM_Aurednik_Model_Cms_Home_Entity ();\n\n\t\t$objEntity->load($intId);\n\n\t\t$objAttribute = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute ();\n\n\t\t$objAttributeValue = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute_Values ();\n\n\t\t$objEntityType = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Type ();\n\n\t\t$objForm = new Varien_Data_Form (\n\t\t\tarray(\n\t\t\t\t'id' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME,\n\t\t\t\t'action' => $this->getUrl('*/*/save'),\n\t\t\t\t'method' => 'post',\n\t\t\t\t'enctype' => 'multipart/form-data',\n\t\t\t\t'name' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME\n\t\t\t)\n\t\t);\n\n\t\t$this->setForm($objForm);\n\n\t\t$objForm->setUseContainer(true);\n\n\t\t//Set Enitty\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset('aurednik_cms_home_entity',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity')));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'required' => true,\n\t\t\t\t'value' => $objEntity->getId(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getEntity_name(),\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$field = $objFieldset->addField(SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store::TABLE_COLUMN_STORE_ID, 'multiselect', array(\n\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store :: TABLE_COLUMN_STORE_ID . ']',\n\t\t\t'label' => Mage::helper('cms')->__('Store View'),\n\t\t\t'title' => Mage::helper('cms')->__('Store View'),\n\t\t\t'required' => true,\n\t\t\t'value' => $objEntity->getStore_id(),\n\t\t\t'values' => Mage:: getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),\n\t\t));\n\n\t\t$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');\n\t\t$field->setRenderer($renderer);\n\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => true,\n\t\t\t\t'options' => $objEntityType->toOptionArray(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'value' => $objEntity->getType_id()\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => false,\n\t\t\t\t'options' => array(0 => Mage:: helper('admin')->__('No'), 1 => Mage:: helper('admin')->__('Yes')),\n\t\t\t\t'value' => $objEntity->getActive()\n\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getSort(),\n\t\t\t\t'class' => 'required-entry',\n\t\t\t\t'required' => true,\n\t\t\t));\n\n\t\t$objAttrCollection = $objAttribute->getCollection()->getByEntityTypeId($objEntity->getType_id());\n\n\t\tif ($objAttrCollection->count() == 0)\n\t\t{\n\t\t\tMage:: getSingleton('core/session')->addError(Mage:: helper('aurednik')->__('Error no attributes'));\n\t\t\t$this->getResponse()->sendResponse();\n\t\t}\n\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset(\n\t\t\t\t'aurednik_cms_home_entity_data',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity attribute data')\n\t\t\t\t)\n\t\t\t);\n\n\t\tforeach ($objAttrCollection as $objCurrentAttr)\n\t\t{\n\n\t\t\t$objEntityAttrValuesCollection = $objAttributeValue->getCollection()->getByEntityIdAndAttributeId($objEntity->getId(), $objCurrentAttr->getId());\n\n\t\t\tif ($objEntityAttrValuesCollection->count() > 0)\n\t\t\t{\n\n\t\t\t\tforeach ($objEntityAttrValuesCollection as $objCurrentAttrValue)\n\t\t\t\t{\n\n\t\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t\t$objCurrentAttrValue->getId(),\n\t\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t\t'value' => $objCurrentAttrValue->getAttribute_value(),\n\t\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t$objEntity->getId() . \"_\" . $objCurrentAttr->getId(),\n\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\treturn parent:: _prepareForm();\n\t}", "function bat_event_type_form($form, &$form_state, $event_type, $op = 'edit') {\n $form['#attributes']['class'][] = 'bat-management-form bat-event-type-form';\n\n if ($op == 'clone') {\n $event_type->label .= ' (cloned)';\n $event_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $event_type->label,\n '#description' => t('The human-readable name of this event type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n\n // Machine-readable type name.\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($event_type->type) ? $event_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'bat_event_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this event type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n if ($op == 'add') {\n $form['fixed_event_states'] = array(\n '#type' => 'checkbox',\n '#title' => t('Fixed event states'),\n );\n }\n elseif ($op == 'edit') {\n $form['type']['#disabled'] = TRUE;\n }\n\n $form['event_granularity'] = array(\n '#type' => 'select',\n '#title' => t('Event Granularity'),\n '#options' => array('bat_daily' => t('Daily'), 'bat_hourly' => t('Hourly')),\n '#default_value' => isset($event_type->event_granularity) ? $event_type->event_granularity : 'bat_daily',\n );\n\n if (isset($event_type->is_new)) {\n // Check for available Target Entity types.\n $target_entity_types = module_invoke_all('bat_event_target_entity_types');\n if (count($target_entity_types) == 1) {\n // If there's only one target entity type, we simply store the value\n // without showing it to the user.\n $form['target_entity_type'] = array(\n '#type' => 'value',\n '#value' => $target_entity_types[0],\n );\n }\n else {\n // Build option list.\n $options = array();\n foreach ($target_entity_types as $target_entity_type) {\n $target_entity_info = entity_get_info($target_entity_type);\n $options[$target_entity_type] = $target_entity_info['label'];\n }\n $form['target_entity_type'] = array(\n '#type' => 'select',\n '#title' => t('Target Entity Type'),\n '#description' => t('Select the target entity type for this Event type. In most cases you will wish to leave this as \"Unit\".'),\n '#options' => $options,\n // Default to BAT Unit if available.\n '#default_value' => isset($target_entity_types['bat_unit']) ? 'bat_unit' : '',\n );\n }\n }\n\n if (!isset($event_type->is_new) && $event_type->fixed_event_states == 0) {\n $fields_options = array();\n\n $fields = field_info_instances('bat_event', $event_type->type);\n\n foreach ($fields as $field) {\n $fields_options[$field['field_name']] = $field['field_name'];\n }\n\n $form['events'] = array(\n '#type' => 'fieldset',\n '#group' => 'additional_settings',\n '#title' => t('Events'),\n '#tree' => TRUE,\n '#weight' => 80,\n );\n\n $form['events'][$event_type->type] = array(\n '#type' => 'select',\n '#title' => t('Select your default @event field', array('@event' => $event_type->label)),\n '#options' => $fields_options,\n '#default_value' => isset($event_type->default_event_value_field_ids[$event_type->type]) ? $event_type->default_event_value_field_ids[$event_type->type] : NULL,\n '#empty_option' => t('- Select a field -'),\n );\n }\n\n if (!isset($event_type->is_new)) {\n $fields_options = array();\n $fields = field_info_instances('bat_event', $event_type->type);\n\n foreach ($fields as $field) {\n $fields_options[$field['field_name']] = $field['field_name'];\n }\n\n $form['event_label'] = array(\n '#type' => 'fieldset',\n '#group' => 'additional_settings',\n '#title' => t('Label Source'),\n '#tree' => TRUE,\n '#weight' => 80,\n );\n\n $form['event_label']['default_event_label_field_name'] = array(\n '#type' => 'select',\n '#title' => t('Select your label field', array('@event' => $event_type->label)),\n '#default_value' => isset($event_type->default_event_label_field_name) ? $event_type->default_event_label_field_name : NULL,\n '#empty_option' => t('- Select a field -'),\n '#description' => t('If you select a field here, its value will be used as the label for your event. BAT will fall back to using the event state as the label if the field has no value.'),\n '#options' => $fields_options,\n );\n }\n\n $form['actions'] = array(\n '#type' => 'actions',\n '#tree' => FALSE,\n );\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save Event type'),\n '#weight' => 40,\n '#submit' => array('bat_event_type_form_submit'),\n );\n\n return $form;\n}", "public function initialize($entity = null, $options = null)\n {\n if (isset($options['edit']) && $options['edit']) {\n $id = new Hidden('id');\n } else {\n $id = new Text('id');\n }\n\n $this->add($id);\n\n // //id reseller\n // $id_reseller= new Text('id_reseller', [\n // 'placeholder' => 'Id Reseller'\n // ]);\n //\n // $id_reseller->setLabel('Reseller');\n // // $id_reseller->addValidators([\n // // new PresenceOf([\n // // 'message' => 'Id Reseller is required'\n // // ])\n // // ]);\n // $this->add($id_reseller);\n\n //nama agen\n $nama_agen = new Text('nama_agen', [\n 'placeholder' => 'Nama Agen'\n ]);\n\n $nama_agen->setLabel('Nama Agen');\n\n $nama_agen->addValidators([\n new PresenceOf([\n 'message' => 'Nama Agen is required'\n ])\n ]);\n\n $this->add($nama_agen);\n\n\n //merk\n $merk = new Text('merk', [\n 'placeholder' => 'Merk'\n ]);\n\n $merk->setLabel('Merk');\n $merk->addValidators([\n new PresenceOf([\n 'message' => 'Merk is required'\n ])\n ]);\n\n $this->add($merk);\n\n\n //serial number\n $serial_number = new Text('serial_number', [\n 'placeholder' => 'Serial Number'\n ]);\n\n $serial_number->setLabel('Serial Number');\n $serial_number->addValidators([\n new PresenceOf([\n 'message' => 'Serial Number is required'\n ])\n ]);\n\n $this->add($serial_number);\n\n\n //lokasi\n $lokasi = new Text('lokasi', [\n 'placeholder' => 'Lokasi'\n ]);\n\n $lokasi->setLabel('Lokasi');\n $lokasi->addValidators([\n new PresenceOf([\n 'message' => 'Lokasi is required'\n ])\n ]);\n\n $this->add($lokasi);\n\n\n //alamat\n $alamat = new Text('alamat', [\n 'placeholder' => 'Alamat'\n ]);\n\n $alamat->setLabel('Alamat');\n $alamat->addValidators([\n new PresenceOf([\n 'message' => 'Alamat is required'\n ])\n ]);\n\n $this->add($alamat);\n\n // Save\n $this->add(new Submit('Save', [\n 'class' => 'btn btn-success',\n 'id'=> 'submit'\n ]));\n\n // Save\n $this->add(new Submit('Search', [\n 'class' => 'btn btn-success',\n 'id'=> 'submit'\n ]));\n\n //id_doctor\n $findreseller = Users::find([\"profilesId = '5'\"]);\n $id_reseller = new Select('id_reseller', $findreseller, [\n 'using' => [\n 'id',\n 'name'\n ],\n 'useEmpty' => true,\n 'emptyText' => '----Select Reseller----',\n 'emptyValue' => ''\n ]);\n $id_reseller->setLabel('Reseller *');\n $this->add($id_reseller);\n\n }", "public function __construct() {\n\t\t\t$this->field_type = 'select-edit-delete';\n\n\t\t\tparent::__construct();\n\t\t}", "private function createEditForm(ObjectType $entity)\n {\n $form = $this->createForm(new ObjectTypeType(), $entity, array(\n 'action' => $this->generateUrl('object_objecttype_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Сохранить изменения'));\n\n return $form;\n }", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "function ting_new_materials_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function edit(Type $type)\n {\n //\n }", "public function edit(Type $type)\n {\n //\n }", "public function edit(Type $type)\n {\n //\n }", "public function getEditForm();", "private function createEditForm(Cardtype $entity)\n {\n $form = $this->createForm(new CardtypeType(), $entity, array(\n 'action' => $this->generateUrl('cardtype_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function initialize($entity = null, $options = [])\n {\n\n\n if (!isset($options['edit'])) {\n\n\n// $element = new Text(\"PrefixNameID\");\n// $this->add($element->setLabel(\"เลขที่คำนำหน้าชื่อ\"));\n }\n else {\n //Edit ONLY\n $this->add(new Hidden(\"CourseID\"));\n\n }\n\n\n $RecordStatus = new Hidden(\"RecordStatus\");\n $RecordStatus->setDefault('N');\n $this->add($RecordStatus);\n\n $CourseNameTh = new Text(\"CourseNameTh\");\n $CourseNameTh->setLabel(\"ชื่อหลักสูตร(Th)\");\n $CourseNameTh->setFilters(['striptags', 'string']);\n $CourseNameTh->addValidators([\n new PresenceOf([\n 'message' => 'กรุณากรอกข้อมูล ชื่อหลักสูตร(Th)'\n ])\n ]);\n\n $this->add($CourseNameTh);\n\n $CourseNameEn = new Text(\"CourseNameEn\");\n $CourseNameEn->setLabel(\"ชื่อหลักสูตร(En)\");\n $CourseNameEn->setFilters(['striptags', 'string']);\n\n $this->add($CourseNameEn);\n\n $CourseDetail = new Text(\"CourseDetail\");\n $CourseDetail->setLabel(\"รายละเอียด\");\n $CourseDetail->setFilters(['striptags', 'string']);\n\n $this->add($CourseDetail);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "function form2($tablename, $type = false, $int = false)\n\t{\n\t\t$this->tablename = $tablename;\n\n\t\t$this->form = new form;\n\t\t$this->form->initTable($tablename);\n\t\t$this->type = $type;\n\t\t$this->table = &$this->form->tables->$tablename;\n\t\t$this->table->setupenv($_GET);\n\n\t\tif ($type == 'list')\n\t\t{\n\t\t\t//$this->getRecords($int);\n\t\t}\n\t\telseif ($type == 'record')\n\t\t{\n\t\t\tif ($int === false)\n\t\t\t\ttrigger_error(\"You need to specify an id for this type form\");\n\t\t\t$this->getRecord($int);\n\t\t\t$this->id = $int;\n\t\t}\n\t}", "public function initialize(ThThesaurus $entity = null, $options = ['edit'=>true])\n {\n \t$this->add(new Hidden('id_thesaurus'));\n\n \t$this->addText('nombre', ['tooltip'=>'Título del Thesaurus (requerido)', 'label'=>'Titulo', 'filters'=>array('striptags', 'string'), 'validators'=>[new PresenceOf(['message' => 'Titulo es requerido'])] ]);\n \t//$this->addText('iso25964_identifier', ['label'=>'DC:Identificador', 'filters'=>array('striptags', 'string')]);\n\n \t$this->addTextArea('iso25964_description', ['label'=>'Descripción', 'filters'=>array('striptags', 'string'), 'validators'=>[new PresenceOf(['message' => 'Descripción es requerido'])] ]);\n $this->addText('iso25964_publisher', ['tooltip'=>'Entidad responsable de la publicación', 'label'=>'Editor', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_rights', ['tooltip'=>'Copyright / Otros Derechos de la Información', 'label'=>'Derechos/Copyright', 'filters'=>array('striptags', 'string')]);\n\n $this->addSelect('iso25964_license', ['tooltip'=> 'Licencias para otros trabajos', 'label'=>'Licencia', 'options'=> self::DEFAULT_RIGHTS, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addText('iso25964_coverage', ['tooltip'=>'Cobertura espacial o temporal del Thesaurus', 'label'=>'Cobertura/Alcance', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_created', ['label'=>'Fecha creación', 'filters'=>array('striptags', 'string')]);\n\n $this->addText('iso25964_subject', ['tooltip'=>'Indice de Términos indicando las materias del contenido', 'label'=>'Temática/Contenido', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_language', ['tooltip'=>'Idiomas soportados por el Thesaurus', 'label'=>'Idioma', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_source', ['tooltip'=>'Recursos desde los cuales el Thesaurus fue derivado', 'label'=>'Fuentes', 'filters'=>array('striptags', 'string')]);\n\n $this->addText('iso25964_creator', ['tooltip'=>'Persona o entidad principal responsable de la elaboración', 'label'=>'Creador', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_contributor', ['tooltip'=>'Personas u organizaciones quienes contribuyeron con el Thesaurus', 'label'=>'Colaborador', 'filters'=>array('striptags', 'string')]);\n $this->addSelect('iso25964_type', ['tooltip'=>'El género del vocabulario', 'label'=>'Tipo', 'options'=> self::DEFAULT_TYPES, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n $this->addSelect('is_activo', ['tooltip'=>'Activar / Inactivar', 'label'=>'Activo', 'options'=> [0 => 'NO', 1 => 'SI'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addSelect('is_primario', ['tooltip'=>'Primario (Aparece como pagina inicial del sitio)', 'label'=>'Primario', 'options'=> [0 => 'NO', 1 => 'SI'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addSelect('is_publico', ['tooltip'=>'Publico (Si LECTOR_PERMISO = ANONIMO es explorable sin ingresar como usuario registrado) / Privado (Solo pueden ver los usuarios autorizados)', 'label'=>'Publico/Privado', 'options'=> [0 => 'PRIVADO', 1 => 'PUBLICO'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n $this->addSelect('permisos[]', ['tooltip'=>'Permisos por Usuario', 'label'=>'Tipo', 'options'=> AdUsuarioForm::PERMISOS_TYPES, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n if ($this->isEditable($options)) {\n\n }\n else {\n \tforeach($this->getElements() as &$e) {\n \t\t$e->setAttribute(\"readonly\", \"readonly\");\n \t}\n }\n }", "function fyc_project_menu_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n $element = new Text(\"id\");\n $this->add($element->setLabel(\"Id\"));\n } else {\n $this->add(new Hidden(\"id\"));\n }\n\n $name = new Text(\"nombre\");\n $name->setLabel(\"Nombre\");\n $name->setFilters(['striptags', 'string']);\n $name->addValidators([\n new PresenceOf([\n 'message' => 'El Nombre es Requerido'\n ])\n ]);\n $this->add($name);\n\n $genero = new Select('id_genero', Generos::find(), [\n 'using' => ['id_genero', 'genero'],\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ]);\n $genero->setLabel('Genero de Pelicula');\n $this->add($genero);\n\n $year = new Text(\"Año\");\n $year->setLabel(\"Año\");\n $year->setFilters(['date']);\n $year->addValidators([\n new PresenceOf([\n 'message' => 'Por favor ingrese el Año'\n ])\n ]);\n $this->add($year);\n }", "public function edit(TypesConges $typesConges)\n {\n //\n }", "private function createEditForm(SkSpecies $entity) {\n $em = $this->getDoctrine()->getManager();\n\n // Get criterias from species\n $criteria_ids = $em->getRepository('SkaphandrusAppBundle:SkIdentificationCriteria')->getCriteriasFromSpecies($entity->getId());\n\n\n\n $form = $this->createForm(new SkIdentificationSpeciesType(), $entity, array(\n 'action' => $this->generateUrl('identification_species_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'criterias' => $criteria_ids\n ));\n return $form;\n }", "function ctools_term_list_content_type_edit_form(&$form, &$form_state) {\n $conf = $form_state['conf'];\n\n $form['type'] = array(\n '#type' => 'radios',\n '#title' => t('Which terms'),\n '#options' => ctools_admin_term_list_options(),\n '#default_value' => $conf['type'],\n '#prefix' => '<div class=\"clear-block no-float\">',\n '#suffix' => '</div>',\n );\n\n $form['list_type'] = array(\n '#type' => 'select',\n '#title' => t('List type'),\n '#options' => array('ul' => t('Unordered'), 'ol' => t('Ordered')),\n '#default_value' => $conf['list_type'],\n );\n}", "private function createEditForm(Galeria $entity, $tipo=\"imagen\")\r\n {\r\n if($tipo == \"imagen\"){\r\n $form = $this->createForm(new GaleriaType(), $entity, array(\r\n 'action' => $this->generateUrl('galerias_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n }else if($tipo== \"link_video\"){\r\n $form = $this->createForm(new GaleriaLinkVideoType(), $entity, array(\r\n 'action' => $this->generateUrl('galerias_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n }else if($tipo==\"parcial\"){\r\n $form = $this->createForm(new GaleriaParcialType(), $entity, array(\r\n 'action' => $this->generateUrl('galerias_actualizar', array('id' => $entity->getId())),\r\n 'method' => 'PATCH',\r\n ));\r\n }\r\n\r\n //$form->add('submit', 'submit', array('label' => 'Update'));\r\n\r\n return $form;\r\n }", "function ting_visual_relation_search_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "protected function form()\n {\n $form = new Form(new Usertype());\n\n $form->text('usertype', '类型名称')->rules('required|max:10');\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableList();\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n return $form;\n }", "function ctools_block_content_type_edit_form(&$form, &$form_state) {\n // Does nothing!\n}", "function dgu_search_info_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "protected function setForm(&$form) {\n if (is_array($form) && isset($form['#entity'])) {\n $this->form =& $form;\n $this->entity =& $form['#entity'];\n $this->type = \"{$this->entity->type}_entity_form\";\n }\n elseif (is_object($form) && $form instanceof Entity) {\n $entity =& $form;\n $type = $entity->type;\n $bundle = $type;\n $form_id = \"eck__entity__form__add_{$type}_{$bundle}\";\n\n $this->form = drupal_get_form($form_id, $entity);\n $this->entity =& $entity;\n $this->type = \"{$type}_entity_form\";\n }\n else {\n $this->form =& $form;\n $this->type = 'non_entity_form';\n }\n }", "public function ItemEditForm() {\n $form = parent::ItemEditForm();\n\n return $form;\n }", "public function initialize($entity = null, $options = array())\n { \n $titulo = new Text(\"nome\");\n $titulo->setAttribute('class','form-control ');\n $this->add($titulo);\n\n $email = new Text(\"email\");\n $email->setAttribute('class','form-control ');\n $this->add($email);\n\n }", "public function initialize($entity = null, $options = array())\n {\n\n //if (!isset($options['edit']) || !isset($options['new'])) {\n // $element = new Text(\"id\");\n // $this->add($element->setLabel(\"Id\"));\n //} else {\n $this->add(new Hidden(\"id\"));\n //}\n\n $make = new Select('make_id', Makes::find(), array(\n 'using' => array('id', 'name'),\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ));\n $make->setLabel('Make');\n $this->add($make);\n\n $user = new Select('user_id', Users::find(), array(\n 'using' => array('id', 'name'),\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ));\n $user->setLabel('User');\n $this->add($user);\n\n\n\n $model = new Text(\"model\");\n $model->setLabel(\"Model\");\n $model->setFilters(array('striptags', 'string'));\n $model->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Name is required'\n ))\n ));\n $this->add($model);\n\n $condition = new Text(\"condition\");\n $condition->setLabel(\"Condition\");\n $condition->setFilters(array('striptags', 'string'));\n $condition->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Condition is required'\n ))\n ));\n $this->add($condition);\n\n $colour = new Text(\"colour\");\n $colour->setLabel(\"Colour\");\n $colour->setFilters(array('striptags', 'string'));\n $colour->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Colour is required'\n ))\n ));\n $this->add($colour);\n\n $style = new Text(\"style\");\n $style->setLabel(\"Style\");\n $style->setFilters(array('striptags', 'string'));\n $style->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Style is required'\n ))\n ));\n $this->add($style);\n\n $image = new Text(\"image\");\n $image->setLabel(\"Image\");\n $image->setFilters(array('striptags', 'string'));\n $image->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Image is required'\n ))\n ));\n $this->add($image);\n\n $price = new Text(\"price\");\n $price->setLabel(\"Price\");\n $price->setFilters(array('float'));\n $price->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Price is required'\n ))\n ));\n $this->add($price);\n\n $year = new Text(\"year\");\n $year->setLabel(\"Year\");\n $year->setFilters(array('float'));\n $year->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Year is required'\n ))\n ));\n $this->add($year);\n }", "function ding_event_similar_events_content_type_edit_form(&$form, &$form_state) {\n return $form;\n}", "public function buildEditForm(FormBuilderInterface $builder, array $options);", "function breol_facetbrowser_breol_facetbrowser_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "protected function form()\n {\n $form = new Form(new Dictionary());\n $form->disableViewCheck();\n $form->disableEditingCheck();\n $form->disableCreatingCheck();\n\n\n $form->select('type', __('Type'))->options(Dictionary::TYPES);\n $form->text('option', __('Title'))->required();\n $form->text('slug', __('Slug'))->rules('nullable|regex:/(\\w\\d\\_)*/', [\n 'regex' => 'Только латинские буквы и знаки подчеркивания',\n ]);\n $form->text('alternative', __('Alternative'));\n $form->switch('approved', __('Approved'))->default(1);\n $form->number('sort', __('Sort'));\n\n $form->saving(function (Form $form) {\n if ($form->slug === null) {\n $form->slug = Str::slug($form->option);\n }\n });\n return $form;\n }", "private function createEditForm(TypeSepulture $entity): FormInterface\n {\n return $this->createForm(\n TypeSepultureType::class,\n $entity,\n [\n 'action' => $this->generateUrl('typesepulture_edit', [\n 'id' => $entity->getId(),\n ]),\n ]\n );\n }", "public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, QueryFactory $query_factory, FormBuilderInterface $form_builder, DateFormatter $date_formatter) {\n parent::__construct($entity_type, $storage);\n $this->queryFactory = $query_factory;\n $this->formBuilder = $form_builder;\n\t $this->dateFormatter = $date_formatter;\n }", "private function createEditForm(Element $entity)\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$request = $this->container->get('request_stack')->getCurrentRequest();\n\t\t$params = $request->get('_route_params');\n\t\t$block = $em->getRepository('NovuscomCMFBundle:Block')->find($params['block_id']);\n\n\t\t$epArray = array();\n\t\t$epDescription = array();\n\n\t\t/**\n\t\t * Пролучаем значения свойств типа \"строка\"\n\t\t */\n\t\t$ElementProperty = $em->getRepository('NovuscomCMFBundle:ElementProperty')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\tforeach ($ElementProperty as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t\t$epDescription[$ep->getProperty()->getId()][] = $ep->getDescription();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"дата/время\"\n\t\t */\n\t\t$ElementPropertyDT = $em->getRepository('NovuscomCMFBundle:ElementPropertyDT')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\t\tforeach ($ElementPropertyDT as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"файл\"\n\t\t */\n\t\t$ElementPropertyFile = $em->getRepository('NovuscomCMFBundle:ElementPropertyF')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\t$ElementPropertyFileId = array();\n\t\tforeach ($ElementPropertyFile as $epf) {\n\t\t\t$ElementPropertyFileId[$epf->getProperty()->getId()][$epf->getId()] = $epf->getFile()->getId();\n\t\t}\n\n\n\t\t/**\n\t\t * Устанавливаем значения для формы\n\t\t */\n\t\t$data = array(\n\t\t\t'VALUES' => $epArray,\n\t\t\t'DESCRIPTION' => $epDescription,\n\t\t\t'PROPERTY_FILE_VALUES' => $ElementPropertyFileId,\n\t\t\t'LIIP' => $this->get('liip_imagine.cache.manager'),\n\t\t\t'BLOCK_PROPERTIES' => $block->getProperty(),\n\t\t\t'ELEMENT_ENTITY' => $entity,\n\t\t\t'service.file' => $this->get('File'),\n\t\t);\n\n\n\t\t//$propertyForm = new ElementPropertyType($block->getProperty(), $em, $data, $request);\n\n\t\t//$formProperty = new FormProperty();\n\t\t//$formProperty->setValue('value of form property');\n\n\t\t/*$formElement = new FormElement();\n\t\t$formElement->setName($entity->getName());\n\t\t$formElement->setCode($entity->getCode());\n\t\t$formElement->setProperties($formProperty);*/\n\n\t\t$action_url = $this->generateUrl('admin_element_update', array('id' => $entity->getId(), 'block_id' => $params['block_id']));\n\t\tif (array_key_exists('section_id', $params)) {\n\t\t\t$action_url = $this->generateUrl('admin_element_update_in_section', array(\n\t\t\t\t'id' => $entity->getId(),\n\t\t\t\t'block_id' => $params['block_id'],\n\t\t\t\t'section_id' => $params['section_id']\n\t\t\t));\n\t\t}\n\t\t$form = $this->createForm(ElementType::class, $entity, array(\n\t\t\t'action' => $action_url,\n\t\t\t'method' => 'PUT',\n\t\t\t'em' => $em,\n\t\t\t'blockObject' => $block\n\t\t));\n\n\n\t\t$form->add('properties', ElementPropertyType::class,\n\t\t\tarray(\n\t\t\t\t//'entry_type' => ElementPropertyType::class,\n\t\t\t\t'label' => 'Свойства',\n\t\t\t\t'mapped' => false,\n\t\t\t\t//'by_reference' => false,\n\t\t\t\t//'allow_add' => true,\n\t\t\t\t//'allow_delete' => true,\n\t\t\t\t//'prototype' => true,\n\t\t\t\t'data' => $data,\n\t\t\t\t//'options' => array('asdasdasdasd'), // не работает\n\t\t\t));\n\n\t\t//$form->add('submit', SubmitType::class, array('label' => 'Сохранить', 'attr' => array('class' => 'btn btn-info')));\n\n\n\t\treturn $form;\n\t}", "function mongo_node_page_edit($entity_type, $entity) {\n $title = $entity->title;\n drupal_set_title($title);\n\n $content = array();\n $content = drupal_get_form('mongo_node_form', $entity, $entity_type);\n\n return $content;\n}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "protected function form()\n {\n $form = new Form(new Category());\n \n $form->text('erp_id', __('ID(ERP用)'));\n $form->select('parent_id', __('中分類'))->options(\n\n Category::Mid()->pluck('name', 'id')\n\n )->required();\n \n $form->text('name', __('小分類名稱'));\n $form->hidden('type', __('Type'))->default(3);\n\n return $form;\n }", "private function createEditForm(Functions $entity) {\n $session = $this->get(\"session\");\n $form = $this->createForm(new FunctionsType(), $entity, array(\n 'action' => $this->generateUrl('hall_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n \n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "function medstat_quizz_questionnaire_take_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "private function createEditForm(Consulta $entity,$tipo)\r\n {\r\n if($tipo==1){\r\n $form = $this->createForm(new ConsultaConPacienteType(), $entity, array(\r\n 'action' => $this->generateUrl('admin_consulta_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n }\r\n else{\r\n $form = $this->createForm(new ConsultaConPacienteType(), $entity, array(\r\n 'action' => $this->generateUrl('admin_consulta_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n )); \r\n }\r\n \r\n\r\n $form->add('submit', 'submit', array('label' => 'Modificar',\r\n 'attr'=>\r\n array('class'=>'btn btn-success btn-sm')));\r\n\r\n return $form;\r\n }", "public function edit(Form $form)\n {\n //\n }", "private function createEditForm(TipoCamera $entity)\n {\n $form = $this->createForm(new TipoCameraType(), $entity, array(\n 'action' => $this->generateUrl('tipocamera_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifica'));\n\n return $form;\n }", "private function createEditForm(Task $entity) //recibiendo nuestra entidad de tarea\n {\n //$form = $this->createForm(new TaskType, $entity, array( \n //pero para Symfony3.4.15 ahora es: \n $form = $this->createForm(TaskType::class, $entity, array(\n 'action' => $this->generateUrl('infunisa_task_update', array('id' => $entity->getId())),\n 'method' => 'PUT' //como estamos editando la tarea usamos PUT\n ));\n \n return $form;\n }", "public function __construct()\n {\n parent::__construct('ServicioForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'servicio_nombre',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Nombre',\n ),\n ));\n $this->add(array(\n 'name' => 'servicio_descripcion',\n 'type' => 'textarea',\n 'options' => array(\n 'label' => 'Descripcion',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_costo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Costo',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_precio',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Precio',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_iva',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'IVA',\n ),\n ));\n \n\n\n }", "public function editAction() {\n $entities = $this\n ->_getRepository()\n ->findAllOrdered();\n $entities = $this->_transformAllConfigEntities($entities);\n $form = $this->createForm(new ConfigType(), array(\n 'configentities' => $entities,\n ));\n\n return array(\n 'form' => $form->createView(),\n );\n }", "private function createEditForm(ActionListe $entity)\n {\n $form = $this->createForm(new ActionListeType(), $entity, array(\n 'action' => $this->generateUrl('actionliste_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier'));\n\n return $form;\n }", "function firstentity_person_edit($form , &$form_state , $person) {\n $form['name'] = array(\n '#type' => 'textfield',\n '#title' => 'name',\n '#default_value' => $person->name\n );\n\n $form['person'] = array(\n '#type' => 'value',\n '#value' => $person\n );\n $form['personality'] = array(\n '#type' => 'value',\n '#value' => $person->personality\n );\n field_attach_form( 'person' , $person , $form , $form_state );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['save'] = array(\n '#type' => 'submit',\n '#value' => 'save'\n );\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => 'delete',\n '#submit' => array('firstentity_person_edit_delete')\n );\n return $form;\n}", "private function createFormDefinition()\n {\n $id = $this->getServiceId('form_type');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('form'));\n $definition\n ->setArguments([$this->options['entity']])\n ->addTag('form.type', [\n 'alias' => sprintf('%s_%s', $this->prefix, $this->resourceName)]\n )\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "protected function form()\n {\n $form = new Form(new City());\n $form->disableViewCheck();\n $form->disableEditingCheck();\n $form->disableCreatingCheck();\n\n $form->text('name', __('field.name'));\n $form->text('slug', __('field.slug'));\n $form->text('description', __('field.description'));\n $form->number('sort', __('field.sort'))->default(0);\n $form->hasMany('files', __('field.images'), function (Form\\NestedForm $form) {\n $form->image('file', __('field.image'))\n ->options(['showClose'=>false])\n ->options(['fileActionSettings'=>['showRemove'=>true]])\n ->options(['otherActionButtons'=>ImageHelper::previewRotateButtons()])\n ->uniqueName();\n $form->number('sort', __('field.sort'))->default(0);\n });\n $form->saving(function (Form $form) {\n if ($form->slug === null) {\n $form->slug = Str::slug($form->option);\n }\n });\n return $form;\n }", "public function getFormId()\n {\n return 'lei_entity_type_settings';\n }", "private function createEditForm(Entreprise $entity)\n {\n $form = $this->createForm(new EntrepriseType(), $entity, array(\n 'action' => $this->generateUrl('ad_entreprise_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "private function createEditForm(Endroit $entity)\n {\n $form = $this->createForm(new EndroitType(), $entity, array(\n 'action' => $this->generateUrl('endroit_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function bindForm($type = RB_DEFAULT_FORM_TYPE) {\n\t\t$class = 'Rb' . $type . 'Form';\n\t\trequire_once('forms/' . $class . '.class.php');\n\t\t$form = new $class();\n\n\t\t$content = $form->bind($_POST);\n\t\t$category = 'default';\n\n\t\t$this->storage->saveArticle($category, $content);\n\t}", "function commerce_panels_integration_commerce_checkout_form_content_type_edit_form($form, &$form_state) {\n // Provide a blank form so we have a place to have context setting.\n return $form;\n}", "private function createEditForm(Rubrique $entity) {\r\n $form = $this->createForm('Loonins\\WikiBundle\\Form\\RubriqueType', $entity, array(\r\n 'action' => $this->generateUrl('rubrique_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', SubmitType::class, array('label' => 'Enregistrer les modifications'));\r\n\r\n return $form;\r\n }", "public function edit(ProductProductType $productProductType)\n {\n //\n }", "public function createComponentEditForm()\n\t{\n\t\t$form = new Form;\n\t\t$form->addGroup();\n\t\t$form->addHidden('ID_leku');\n\t\t$form->addText('nazev_leku', 'Názov lieku')\n\t\t\t->addRule(Form::FILLED, 'Zadajte názov lieku');\n\t\t$form->addSelect('typ_leku', 'Typ lieku', self::MEDICINE_TYPE)\n\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setAttribute('class', 'form-control');\n\n\t\t$form->addGroup(\"Poisťovne\");\n\t\t$removeEvent = [$this, 'removeElementClicked'];\n\t\t$insurences = $form->addDynamic(\n\t\t\t'insurences',\n\t\t\tfunction (Container $insurence) use ($removeEvent) {\n\t\t\t\t$insurence->addHidden('ID_leku');\n\t\t\t\t$insurence->addSelect('ID_pojistovny', 'Poisťovňa', $this->insurenceManager->getInsurenceToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$insurence->addText('cena', 'Cena lieku')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Cena musí byť číslo');\n\t\t\t\t$insurence->addText('doplatek', 'Doplatok na liek')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Doplatok musí byť číslo');\n\t\t\t\t$insurence->addSelect('hradene', 'Typ lieku', array('hradene' => 'Hradený', 'nehradene' => 'Nehradený', 'doplatok' => 'Liek s doplatkom'))\n\t\t\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$removeBtn = $insurence->addSubmit('remove', 'Odstrániť poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$insurences->addSubmit('add', 'Pridať poisťovňu')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup(\"Pobočky\");\n\t\t$offices = $form->addDynamic(\n\t\t\t'offices',\n\t\t\tfunction (Container $office) use ($removeEvent) {\n\t\t\t\t$office->addHidden('ID_leku');\n\t\t\t\t$office->addSelect('ID_pobocky', 'Pobočka', $this->officeManager->getOfficesToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte pobočku')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$office->addText('pocet_na_sklade', 'Počet kusov')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setDefaultValue('1')\n\t\t\t\t\t->addRule(Form::INTEGER, 'Počet kusov musí byť číslo')\n\t\t\t\t\t->addRule(Form::RANGE, 'Počet kusov musí byť kladné číslo', array(0, null));\n\n\t\t\t\t$removeBtn = $office->addSubmit('remove', 'Odstrániť pobočku')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$offices->addSubmit('add', 'Pridať pobočku')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup('');\n\t\t$form->addSubmit('submit', 'Uložiť liek')\n\t\t\t->setAttribute('class', 'btn-primary')\n\t\t\t->onClick[] = [$this, 'submitElementClicked'];\n\n\t\treturn $this->bootstrapFormRender($form);\n\t}", "private function createEditForm(Ligne $entity)\n {\n $form = $this->createForm(new LigneType(), $entity, array(\n 'action' => $this->generateUrl('ligne_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(Cosecha $entity)\n {\n $form = $this->createForm(new CosechaType(), $entity, array(\n 'action' => $this->generateUrl('cosecha_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(form $form)\n {\n //\n }", "public function createEditObject()\n {\n $class = $this->CreateType;\n\n // see if we've been passed a create type in the request\n if ($customType = $this->getRequest()->postVar('CustomCreateType')) {\n $allowed = $this->allowedCreationTypes();\n if (isset($allowed[$customType])) {\n $class = $customType;\n }\n }\n return $class::create();\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "private function createEditForm(IntrestConfig $entity) {\n\t\t$form = $this->createForm(new IntrestConfigType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('member_intrestconfig_update', array('id' => $entity->getId())),\n\t\t\t'method' => 'PUT',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array('label' => 'Update'));\n\n\t\treturn $form;\n\t}", "private function createEditForm(Compte $entity)\n {\n $form = $this->createForm(new CompteType(), $entity, array(\n 'action' => $this->generateUrl('compte_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }", "private function createEditForm(EntradaDetalles $entity)\n {\n $form = $this->createForm(new EntradaDetallesType(), $entity, array(\n 'action' => '',\n 'method' => 'PUT',\n 'mostrar_campo_articulo' => false,\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar', 'icon' => 'floppy-disk', 'attr' => array('class' => 'btn-primary')));\n\n return $form;\n }", "function _setDegreeTypeForm() {\n\t\t$this->loadModel('DegreeType');\n\t\t$degree_opts = array_merge(array(0=> 'Select a Degree'), $this->DegreeType->find('list'));\n\t\t$this->set('degree_opts', $degree_opts);\n\t}", "private function createEditForm(AdmTipoAporte $entity)\r\n {\r\n $form = $this->createForm(new AdmTipoAporteType(), $entity, array(\r\n 'action' => $this->generateUrl('admtipoaporte_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr'=>array('class'=>'btn btn-success btn-sm')));\r\n\r\n return $form;\r\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "protected function formView($entityName = null)\n {\n $view = parent::formView($entityName);\n $fields = $view->fields();\n \n // Set text 'content' as type 'editor' to get WYSIWYG\n $fields['content']['type'] = 'editor';\n \n // Set type and options for 'type' select\n $fields['type']['type'] = 'select';\n $fields['type']['options'] = array(\n '' => 'None',\n 'note' => 'Note',\n 'warning' => 'Warning',\n 'code' => 'Code'\n );\n \n $view->action(\"\")\n ->fields($fields);\n return $view;\n }", "private function createEditForm(Experience $entity)\n {\n $form = $this->createForm(new ExperienceType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Valider'));\n\n return $form;\n }", "private function createEditForm(Klasses $entity)\n {\n $form = $this->createForm(new KlassesType(), $entity, array(\n 'action' => $this->generateUrl('klasses_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "function setEntity($entity_type, $entity_id) {\n $this->checkChange();\n\n // Ignore empty values.\n if (empty($entity_type) || empty($entity_id)) {\n return $this;\n }\n\n $this->entity_type = $entity_type;\n $this->entity_id = $entity_id;\n return $this;\n }", "private function createEditForm(Event $entity)\n {\n $form = $this->createForm(new EventType(), $entity, array(\n 'action' => $this->generateUrl('event_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "private function createEditForm(Missatges $entity) {\n $form = $this->createForm(new MissatgesType(), $entity, array(\n 'action' => $this->generateUrl('admin_missatges_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(TypeThird $typeThird)\n {\n //\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "function openlayers_component_form_type($form, &$form_state) {\n $form['factory_service'] = array(\n '#type' => 'select',\n '#title' => t('Component Type'),\n '#default_value' => isset($form_state['item']->factory_service) ? $form_state['item']->factory_service : '',\n '#description' => t('Select the type of component.'),\n '#options' => Openlayers::getOLObjectsOptions('Component'),\n '#required' => TRUE,\n );\n\n return $form;\n}", "private function createEditForm(Bien $entity)\n {\n $form = $this->createForm(new BienType(), $entity, array(\n 'action' => $this->generateUrl('bien_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function edit(Ctype $ctype)\n {\n //\n }", "public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}", "public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }", "public function ArtistForm() {\n $URLParams = Director::urlParams();\n if ($URLParams['ID']){\n $formAction = new FieldSet (\n new FormAction('doSubmit', _t('Artist','Edit Artist'))\n );\n } else {\n $formAction = new FieldSet (\n new FormAction('doSubmit', _t('Artist','Create New Artist'))\n );\n }\n $form = new Form (\n $this,\n \"ArtistForm\",\n new FieldSet (\n $ImageLink = new TextField('ImageLink', _t('Artist.ImageLink','Image Link')),\n $NameField = new TextField('Name', _t('Artist.Name','Name')),\n $YoutubeSingle1Field = new TextField('YoutubeSingle1', _t('Artist.YoutubeSingle1','YoutubeSingle1')),\n $YoutubeSingle2Field = new TextField('YoutubeSingle2', _t('Artist.YoutubeSingle2','YoutubeSingle2')),\n $YoutubeSingle3Field = new TextField('YoutubeSingle3', _t('Artist.YoutubeSingle3','YoutubeSingle3')),\n $OfficialWebpageField = new TextField('OfficialWebpage', _t('Artist.OfficialWebpage','OfficialWebpage')),\n $SoundcloudField = new TextField('Soundcloud', _t('Artist.Soundcloud','Soundcloud')),\n $FacebookField = new TextField('Facebook', _t('Artist.Facebook','Facebook')),\n $TwitterField = new TextField('Twitter', _t('Artist.Twitter','Twitter')),\n $MyspaceField = new TextField('Myspace', _t('Artist.Myspace','Myspace')),\n $OfficialYoutubeField = new TextField('OfficialYoutube', _t('Artist.OfficialYoutube','OfficialYoutube')),\n $GenreListField = new TextField('GenreList', _t('Artist.GenreList','GenreList')),\n $IDField = new HiddenField('ID','', '')\n ),\n $formAction,\n // new RequiredFields('Name','Date','Address','City')\n new RequiredFields('Name', 'Date', 'Venue')\n );\n\n // Grab previous data if editing an existing DataObject\n // URLParams can be visited at artist/edit/#\n if ($URLParams['ID']){\n $thisID = Convert::raw2sql($URLParams['ID']);\n $artist = DataObject::get_by_id('Artist', $thisID);\n\n $FlyerLinkField->value = $artist->ImageLink;\n $NameField->value = $artist->Name;\n $YoutubeSingle1Field->value = $artist->YoutubeSingle1;\n $YoutubeSingle2Field->value = $artist->YoutubeSingle2;\n $YoutubeSingle3Field->value = $artist->YoutubeSingle3;\n $OfficialWebpageField->value = $artist->OfficialWebpage;\n $SoundcloudField->value = $artist->Soundcloud;\n $FacebookField->value = $artist->Facebook;\n $TwitterField->value = $artist->Twitter;\n $MyspaceField->value = $artist->Myspace;\n $OfficialYoutubeField->value = $artist->OfficialYoutube;\n $GenreListField->value = $artist->GenreList;\n $IDField->value = $thisID;\n }\n return $form;\n }", "private function createEditForm(Dzialy $entity) {\n $form = $this->createForm(new DzialyType(true), $entity, array(\n 'action' => $this->generateUrl('dzialy_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n \n\n return $form;\n }", "private function createEditForm(EnvaseIngreso $entity)\n {\n $form = $this->createForm(new EnvaseIngresoType(), $entity, array(\n 'action' => $this->generateUrl('envase_ingreso_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Guardar', 'attr' => array('class' => \"btn btn-success\")));\n\n return $form;\n }", "protected function form($type = self::FORM_VERTICAL, $inputClass = '', $labelClass = '') {\n\t\t$this->formType = $type;\n\t\t$this->inputClass = $inputClass;\n\t\t$this->labelClass = $labelClass;\n\t}", "public function editSettings() {\n $name = $this->schema->name();\n $form = new Fragment($name);\n\n if ($this->schema->newgroup()) { // définit dans la vue fields.php\n $form->hidden('type');\n // pour un nouveau groupe, il faut que le groupe soit créé avec le bon type\n // pour un groupe existant, inutile : on a déjà le bon type dans le schéma\n }\n\n $form->input('name')\n ->attribute('class', 'name')\n ->label(__('Nom du groupe', 'docalist-biblio'))\n ->description(__(\"Le nom du groupe doit être unique (ni un nom de champ, ni le nom d'un autre groupe).\", 'docalist-biblio'));\n\n $form->input('label')\n ->attribute('id', $name . '-label')\n ->attribute('class', 'label regular-text')\n ->label(__('Titre du groupe', 'docalist-biblio'))\n ->description(__(\"C'est le titre qui sera affiché dans la barre de titre du groupe et dans les options de l'écran de saisie. Valeur par défaut : type de la notice\", 'docalist-biblio'));\n\n $form->input('capability')\n ->attribute('id', $name . '-capability')\n ->attribute('class', 'capability regular-text')\n ->label(__('Droit requis', 'docalist-biblio'))\n ->description(__(\"Droit requis pour afficher ce groupe de champs. Ce groupe (et tous les champs qu'il contient) sera masqué si l'utilisateur ne dispose pas du droit indiqué. Si vous laissez vide, aucun test ne sera effectué.\", 'docalist-biblio'));\n\n $form->textarea('description')\n ->attribute('id', $name . '-description')\n ->attribute('class', 'description large-text')\n ->attribute('rows', 2)\n ->label(__(\"Texte d'introduction\", 'docalist-biblio'))\n ->description(__(\"Ce texte sera affiché entre la barre de titre et le premier champ du groupe. Vous pouvez utiliser cette zone pour donner des consignes de saisie ou toute autre information utile aux utilisateurs.\", 'docalist-biblio'));\n\n $form->select('state')\n ->attribute('id', $name . '-state')\n ->attribute('class', 'state')\n ->label(__(\"Etat initial du groupe\", 'docalist-biblio'))\n ->description(__(\"Dans l'écran de saisie, chaque utilisateur peut choisir comment afficher chacun des groupes : il peut replier ou déplier un groupe ou utiliser les options de l'écran de saisie pour masquer ou afficher certains groupes. Ce paramètre indique comment le groupe sera affiché initiallement (pour un nouvel utilisateur).\", 'docalist-biblio'))\n ->options([\n '' => __('Ouvert', 'docalist-biblio'),\n 'collapsed' => __('Replié', 'docalist-biblio'),\n 'hidden' => __('Masqué', 'docalist-biblio'),\n ])\n ->firstOption(false);\n\n $form->button(__('Supprimer ce groupe', 'docalist-biblio'))\n ->attribute('class', 'delete-group button right');\n\n return $form;\n }", "private function createEditForm(Equipo $entity)\n {\n $form = $this->createForm(new EquipoType(), $entity, array(\n 'action' => $this->generateUrl('tecnoequipo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "abstract protected function _setNewForm();", "private function createEditForm(Cidades $entity)\n {\n $form = $this->createForm(new CidadesType(), $entity, array(\n 'action' => $this->generateUrl('cidades_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\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 }", "private function createEditForm(Servicio $entity)\n {\n $securityContext = $this->container->get('security.context');\n $form = $this->createForm(new ServicioType($securityContext), $entity, array(\n 'action' => $this->generateUrl('administracion_servicio_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }" ]
[ "0.687346", "0.6510986", "0.6469823", "0.6450052", "0.63589495", "0.6339538", "0.6334518", "0.63295275", "0.62948775", "0.6289656", "0.6288563", "0.62831736", "0.62712705", "0.62712705", "0.62712705", "0.6207555", "0.620274", "0.61831987", "0.61577857", "0.6130354", "0.6123258", "0.6119838", "0.61140615", "0.61041206", "0.6071785", "0.60556877", "0.6027003", "0.60263836", "0.6010666", "0.60090876", "0.59943146", "0.59925675", "0.59908175", "0.59357995", "0.5926714", "0.5918636", "0.5899738", "0.58942235", "0.5891517", "0.5882608", "0.58796513", "0.58614475", "0.5837139", "0.5833013", "0.58275366", "0.5824851", "0.58206606", "0.5817803", "0.58170176", "0.5814702", "0.58016956", "0.5782582", "0.5780191", "0.57681274", "0.5767529", "0.57571065", "0.5751634", "0.5748727", "0.57387924", "0.573384", "0.5725741", "0.5717776", "0.5714138", "0.5709484", "0.5707965", "0.57073903", "0.5706959", "0.5704119", "0.5701776", "0.57007015", "0.56992626", "0.56936204", "0.5686319", "0.5684016", "0.5674623", "0.5673372", "0.5670746", "0.56705254", "0.5668845", "0.5663574", "0.5659803", "0.5651289", "0.5651236", "0.5647419", "0.5640059", "0.56340873", "0.563315", "0.5630736", "0.56272376", "0.5627096", "0.56220293", "0.56145936", "0.561415", "0.5613768", "0.5607352", "0.5606385", "0.5600608", "0.55981153", "0.55965906", "0.5590927" ]
0.6971317
0
Form submission handler for mongo_node_type_edit_form().
function mongo_node_type_edit_form_submit($form, $form_state) { $label = $form_state['values']['label']; $machine_name = $form_state['values']['name']; $old_entity_type = $form_state['values']['entity_type']; $set = mongo_node_settings(); if ($machine_name != $old_entity_type) { $set += mongo_node_type_default_settings($label, $machine_name); $set[$machine_name] = $set[$old_entity_type]; unset($set[$old_entity_type]); // Update existing mongo entities with new entity type. _mongo_node_update_type($old_entity_type, $machine_name); } else { $set[$machine_name]['label'] = $label; } // Save settings. mongo_node_settings_save($set); return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "public function postEdit(NodeFormRequest $request)\n { \n // first we save the node model\n $node = $this->nodeModel->find($request->input('id'));\n \n // save the node model\n $node->type = $request->input('type');\n $node->title = $request->input('title');\n $node->save();\n \n $nodeType = $node->nodeType;\n if($nodeType) {\n // instantiate nodeType model\n $nodeType->nid = $request->input('id');\n $nodeType->body = $request->input('body');\n // save model\n $nodeType->save();\n } else{\n \n $this->nodeTypeModel->create($request->input());\n }\n // we will flash a notification\n Notification::success($request->input('type') . ' page has been updated');\n return redirect()->route('admin.home');\n }", "function mongo_node_page_edit($entity_type, $entity) {\n $title = $entity->title;\n drupal_set_title($title);\n\n $content = array();\n $content = drupal_get_form('mongo_node_form', $entity, $entity_type);\n\n return $content;\n}", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function ctools_block_content_type_edit_form_submit(&$form, &$form_state) {\n if (empty($form_state['subtype']) && isset($form_state['pane'])) {\n $form_state['pane']->subtype = $form_state['conf']['module'] . '-' . $form_state['conf']['delta'];\n unset($form_state['conf']['module']);\n unset($form_state['conf']['delta']);\n }\n}", "function mongo_node_type_create_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n\n $set = mongo_node_settings();\n $set += mongo_node_type_default_settings($label, $machine_name);\n\n // @todo - redirect to entity type page\n mongo_node_settings_save($set);\n}", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "function mongo_node_bundle_edit_form_submit($form, $form_state) {\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['bundle_type']['entity_type'];\n $old_bundle_type = $form_state['values']['bundle_type']['bundle'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_bundle_type) {\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n $set[$entity_type]['bundles'][$machine_name] = $set[$entity_type]['bundles'][$old_bundle_type];\n unset($set[$entity_type]['bundles'][$old_bundle_type]);\n\n // Update existing mongo entities with new bundle.\n //_mongo_node_update_bundle($entity_type, $old_bundle_type, $machine_name);\n }\n else {\n $set[$entity_type]['bundles'][$machine_name]['label'] = $label;\n $set[$entity_type]['bundles'][$machine_name]['description'] = $description;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function mongo_node_admin_content($form, $form_state, $entity_type) {\n $settings = mongo_node_settings();\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n );\n\n $filters = mongo_node_filters($entity_type);\n $applied_filters = isset($_SESSION[$entity_type . '_filters']) ? $_SESSION[$entity_type . '_filters'] : array();\n\n foreach ($filters as $f_type_name => $f_type) {\n $form['filters'][$f_type_name] = array('#type' => 'select', '#title' => $f_type_name);\n foreach ($f_type as $f_name => $f_val) {\n $form['filters'][$f_type_name]['#options'][$f_name] = $f_val['label'];\n }\n }\n\n $items = array();\n $remaining_filters = array();\n foreach ($applied_filters as $app_filter) {\n $items[] = t('where %f_name is %f_val', array('%f_name' => $app_filter['#type'], '%f_val' => $app_filter['#value']));\n $conditions = $filters[$app_filter['#type']][$app_filter['#value']]['filters'];\n foreach ($conditions as $condition) {\n $remaining_filters[$condition['#type']]['#callback'] = $condition['#callback'];\n $remaining_filters[$condition['#type']]['#value'][] = $condition['#value'];\n }\n }\n\n $form['filters']['#description'] = theme('item_list', array('items' => $items));\n\n if (empty($applied_filters)) {\n $form['filters']['filter'] = array(\n '#type' => 'submit',\n '#value' => 'Filter',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n else {\n $form['filters']['refine'] = array(\n '#type' => 'submit',\n '#value' => 'Refine',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['undo'] = array(\n '#type' => 'submit',\n '#value' => 'Undo',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => 'Reset',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Update options'),\n );\n\n $operations = mongo_node_operations();\n foreach ($operations as $op => $op_set) {\n $options[$op] = $op_set['label'];\n }\n $form['options']['operation'] = array(\n '#type' => 'select',\n '#options' => $options,\n );\n\n $form['options']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Update'),\n '#validate' => array('mongo_node_operation_validate'),\n '#submit' => array('mongo_node_operation_submit'),\n );\n\n $query = new EntityFieldQuery();\n\n $query->entityCondition('entity_type', $entity_type)\n ->propertyOrderBy('created', 'DESC')\n ->pager(10);\n\n // Actually apply filters.\n foreach ($remaining_filters as $r_name => $r_values) {\n $query->{$r_values['#callback']}($r_name, $r_values['#value'], 'IN');\n }\n\n $result = $query->execute();\n\n $languages = language_list();\n $destination = drupal_get_destination();\n $header = array(\n 'title' => array('data' => t('Title'), 'field' => 'title'),\n 'type' => t('Type'),\n 'author' => t('Author'),\n 'status' => t('Status'),\n 'changed' => t('Updated'),\n 'language' => t('Language'),\n 'operations' => t('Operations'),\n );\n $options = array();\n\n if (isset($result[$entity_type])) {\n $ids = array_keys($result[$entity_type]);\n $entities = entity_load($entity_type, $ids);\n\n foreach ($result[$entity_type] as $id => $efq_entity) {\n $entity = entity_load($entity_type, array($id));\n $entity = reset($entity);\n\n $entity_uri = entity_uri($entity_type, $entity);\n\n $options[$id] = array(\n 'title' => array(\n 'data' => array(\n '#type' => 'link',\n '#title' => $entity->title,\n '#href' => $entity_uri['path'],\n ),\n ),\n 'type' => check_plain($settings[$entity_type]['bundles'][$entity->type]['label']),\n 'author' => theme('username', array('account' => $entity)),\n 'status' => $entity->status ? t('published') : t('not published'),\n 'changed' => format_date($entity->changed, 'short'),\n 'language' => ($entity->language == LANGUAGE_NONE) ? t('Language neutral') : $languages[$entity->language]->name,\n );\n\n $operations = array();\n $operations[] = l(t('edit'), $entity_uri['path'] . '/edit', array('query' => $destination));\n $operations[] = l(t('delete'), $entity_uri['path'] . '/delete', array('query' => $destination));\n\n $options[$id]['operations'] = theme('item_list', array('items' => $operations, 'attributes' => array('class' => 'inline')));\n }\n }\n\n $form['entities'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n '#empty' => t('No content available'),\n );\n\n $form['pager'] = array(\n '#theme' => 'pager',\n );\n\n return $form;\n}", "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function ding_panels_node_body_content_type_edit_form(&$form, &$form_state) {\n return $form;\n}", "function travel_type_form($form, &$form_state, $entity_type, $op = 'edit') {\n // Handle the case when cloning is performed.\n if ($op == 'clone') {\n $entity_type->label .= ' (cloned)';\n $entity_type->type = '';\n }\n\n // Describe all properties of the entity which shall be shown on the form.\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $entity_type->label,\n '#description' => t('The human-readable name of this entity type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($entity_type->type) ? $entity_type->type : '',\n '#maxlength' => 32,\n //'#disabled' => $entity_type->isLocked() && $op != 'clone',\n '#machine_name' => array(\n 'exists' => 'travel_type_load_multiple',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this entity type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n $form['description'] = array(\n '#type' => 'textarea',\n '#default_value' => isset($entity_type->description) ? $entity_type->description : '',\n '#description' => t('Description about the entity type.'),\n );\n\n // Add some buttons.\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save entity type'),\n '#weight' => 40,\n );\n //if (!$entity_type->isLocked() && $op != 'add' && $op != 'clone') {\n $entity_id = entity_id('travel', $entity);\n if (!empty($entity_id)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete entity type'),\n '#weight' => 45,\n '#limit_validation_errors' => array(),\n '#submit' => array('travel_type_form_submit_delete'),\n );\n }\n\n return $form;\n}", "function node_form(&$form_state, $node) {\n global $user;\n\n if (isset($form_state['node'])) {\n $node = $form_state['node'] + (array)$node;\n }\n if (isset($form_state['node_preview'])) {\n $form['#prefix'] = $form_state['node_preview'];\n }\n $node = (object)$node;\n foreach (array('body', 'title', 'format') as $key) {\n if (!isset($node->$key)) {\n $node->$key = NULL;\n }\n }\n if (!isset($form_state['node_preview'])) {\n node_object_prepare($node);\n }\n else {\n $node->build_mode = NODE_BUILD_PREVIEW;\n }\n\n // Set the id of the top-level form tag\n $form['#id'] = 'node-form';\n\n // Basic node information.\n // These elements are just values so they are not even sent to the client.\n foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => isset($node->$key) ? $node->$key : NULL,\n );\n }\n\n // Changed must be sent to the client, for later overwrite error checking.\n $form['changed'] = array(\n '#type' => 'hidden',\n '#default_value' => isset($node->changed) ? $node->changed : NULL,\n );\n // Get the node-specific bits.\n if ($extra = node_invoke($node, 'form', $form_state)) {\n $form = array_merge_recursive($form, $extra);\n }\n if (!isset($form['title']['#weight'])) {\n $form['title']['#weight'] = -5;\n }\n\n $form['#node'] = $node;\n\n // Add a log field if the \"Create new revision\" option is checked, or if the\n // current user has the ability to check that option.\n if (!empty($node->revision) || user_access('administer nodes')) {\n $form['revision_information'] = array(\n '#type' => 'fieldset',\n '#title' => t('Revision information'),\n '#collapsible' => TRUE,\n // Collapsed by default when \"Create new revision\" is unchecked\n '#collapsed' => !$node->revision,\n '#weight' => 20,\n );\n $form['revision_information']['revision'] = array(\n '#access' => user_access('administer nodes'),\n '#type' => 'checkbox',\n '#title' => t('Create new revision'),\n '#default_value' => $node->revision,\n );\n $form['revision_information']['log'] = array(\n '#type' => 'textarea',\n '#title' => t('Log message'),\n '#default_value' => (isset($node->log) ? $node->log : ''),\n '#rows' => 2,\n '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),\n );\n }\n\n // Node author information for administrators\n $form['author'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Authoring information'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 20,\n );\n $form['author']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored by'),\n '#maxlength' => 60,\n '#autocomplete_path' => 'user/autocomplete',\n '#default_value' => $node->name ? $node->name : '',\n '#weight' => -1,\n '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', t('Anonymous')))),\n );\n $form['author']['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored on'),\n '#maxlength' => 25,\n '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? $node->date : format_date($node->created, 'custom', 'Y-m-d H:i:s O'))),\n );\n\n if (isset($node->date)) {\n $form['author']['date']['#default_value'] = $node->date;\n }\n\n // Node options for administrators\n $form['options'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Publishing options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 25,\n );\n $form['options']['status'] = array(\n '#type' => 'checkbox',\n '#title' => t('Published'),\n '#default_value' => $node->status,\n );\n $form['options']['promote'] = array(\n '#type' => 'checkbox',\n '#title' => t('Promoted to front page'),\n '#default_value' => $node->promote,\n );\n $form['options']['sticky'] = array(\n '#type' => 'checkbox',\n '#title' => t('Sticky at top of lists'),\n '#default_value' => $node->sticky,\n );\n\n // These values are used when the user has no administrator access.\n foreach (array('uid', 'created') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => $node->$key,\n );\n }\n\n // Add the buttons.\n $form['buttons'] = array();\n $form['buttons']['submit'] = array(\n '#type' => 'submit',\n '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])),\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('node_form_submit'),\n );\n $form['buttons']['preview'] = array(\n '#type' => 'submit',\n '#value' => t('Preview'),\n '#weight' => 10,\n '#submit' => array('node_form_build_preview'),\n );\n if (!empty($node->nid) && node_access('delete', $node)) {\n $form['buttons']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 15,\n '#submit' => array('node_form_delete_submit'),\n );\n }\n $form['#validate'][] = 'node_form_validate';\n $form['#theme'] = array($node->type .'_node_form', 'node_form');\n return $form;\n}", "function multisite_aggregate_type_form($form, &$form_state, $aggregate_type, $op = 'edit') {\n if ($op == 'clone') {\n $aggregate_type->label .= ' (cloned)';\n $aggregate_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $aggregate_type->label,\n '#description' => t('The human-readable name of this multisite aggregate type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($aggregate_type->type) ? $aggregate_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'multisite_aggregate_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this multisite aggregate type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n $form['source'] = array(\n '#type' => 'fieldset',\n '#title' => t('Source'),\n );\n // Only nodes are allowed for now\n $form['source']['source_type'] = array(\n '#type' => 'hidden',\n '#value' => 'node',\n );\n $form['source']['source_bundle'] = array(\n '#type' => 'select',\n '#title' => t('Node bundle'),\n '#options' => node_type_get_names(),\n '#default_value' => !empty($aggregate_type->source_bundle),\n );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save aggregate type'),\n '#weight' => 40,\n );\n return $form;\n}", "function main() {\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tprint_r($_POST);\n\t\t\techo \"<br />\";\n\t\t\t\n\t\t\t// Required Fields in the POST data //\t\t\t\n\t\t\tif ( !isset($_POST['_type']) ) return;\n\t\t\tif ( !isset($_POST['_subtype']) ) return;\n\t\t\tif ( !isset($_POST['_name']) ) return;\n\t\t\tif ( !isset($_POST['_mail']) ) return;\n\t\t\tif ( !isset($_POST['_password']) ) return;\n\t\t\tif ( !isset($_POST['_publish']) ) return;\n\t\n\t\t\t// Node Type //\n\t\t\t$type = sanitize_NodeType($_POST['_type']);\n\t\t\tif ( empty($type) ) return;\t\n\n\t\t\t$subtype = sanitize_NodeType($_POST['_subtype']);\n\t\n\t\t\t// Name/Title //\n\t\t\t$name = $_POST['_name'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Slug //\n\t\t\tif ( empty($_POST['_slug']) )\n\t\t\t\t$slug = $_POST['_name'];\n\t\t\telse\n\t\t\t\t$slug = $_POST['_slug'];\n\t\t\t$slug = sanitize_Slug($slug);\n\t\t\tif ( empty($slug) ) return;\n\t\t\t\n\t\t\t// TODO: Confirm slug is legal\n\t\t\t\t\n\t\t\t// Body //\n\t\t\t$body = $_POST['_body'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Do we publish? //\n\t\t\t$publish = mb_strtolower($_POST['_publish']) == \"true\";\n\t\t\t\n\t\t\t// Email //\n\t\t\t$mail = sanitize_Email($_POST['_mail']);\n\t\t\tif ( empty($mail) ) return;\n\n\t\t\t// Password //\n\t\t\t$password = $_POST['_password'];\n\t\t\tif ( empty($password) ) return;\n\n\t\n\t\t\t$id = node_Add(\n\t\t\t\t$type,$subtype,$slug,$name,$body,\n\t\t\t\t0,2,\n\t\t\t\t$publish\n\t\t\t);\n\t\t\t\n\t\t\tuser_Add($id,$mail,$password);\n\t\n\t\t\techo \"Added \" . $id . \".<br />\";\n\t\t\techo \"<br />\";\n\t\t}\n\t}", "function mongo_node_operation_submit($form, &$form_state) {\n $operations = mongo_node_operations();\n $operation = $operations[$form_state['values']['operation']];\n\n $entities = array_filter($form_state['values']['entities']);\n $entity_type = $form_state['values']['entity_type'];\n if ($function = $operation['callback']) {\n // Add in callback arguments if present.\n if (isset($operation['callback arguments'])) {\n $args = array(\n $entity_type,\n $entities,\n $operation['callback arguments'],\n );\n }\n else {\n $args = array($entity_type, $entities);\n }\n call_user_func_array($function, $args);\n cache_clear_all();\n }\n}", "function mongo_node_add($entity_type, $bundle) {\n global $user;\n $set = mongo_node_settings();\n\n $entity = entity_create($entity_type, array(\n 'uid' => $user->uid,\n 'name' => (isset($user->name) ? $user->name : ''),\n 'type' => $bundle,\n 'language' => LANGUAGE_NONE,\n )\n );\n $form_id = $entity_type . '_' . $bundle . '_mongo_node_form';\n $output = drupal_get_form($form_id, $entity, $entity_type);\n\n return $output;\n}", "function ting_visual_relation_search_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "function ding_event_similar_events_content_type_edit_form(&$form, &$form_state) {\n return $form;\n}", "function ctools_term_list_content_type_edit_form(&$form, &$form_state) {\n $conf = $form_state['conf'];\n\n $form['type'] = array(\n '#type' => 'radios',\n '#title' => t('Which terms'),\n '#options' => ctools_admin_term_list_options(),\n '#default_value' => $conf['type'],\n '#prefix' => '<div class=\"clear-block no-float\">',\n '#suffix' => '</div>',\n );\n\n $form['list_type'] = array(\n '#type' => 'select',\n '#title' => t('List type'),\n '#options' => array('ul' => t('Unordered'), 'ol' => t('Ordered')),\n '#default_value' => $conf['list_type'],\n );\n}", "function ctools_block_content_type_edit_form(&$form, &$form_state) {\n // Does nothing!\n}", "function update_node()\n\t{\n\t\t\n\t\t// @todo form validation properly\n\t\t$this->EE->load->library('form_validation');\n\t\t$this->EE->form_validation->set_rules('label', 'Label', 'required');\n\t\t\n\t\tif ($this->EE->form_validation->run('label') == FALSE)\n\t\t{\n\t\t show_error('\"Label\" is a required field');\n\t\t}\n\n\t\t$tree_id \t= $this->EE->input->post('tree_id');\n\t\t$is_root\t= $this->EE->input->post('is_root');\n\t\t\n\t\t$data = array();\n\t\t$data['label'] \t\t= htmlspecialchars($this->EE->input->post('label'), ENT_COMPAT, 'UTF-8');\n\t\t$data['template_path'] \t= $this->EE->input->post('template');\n\t\t$data['entry_id'] \t= $this->EE->input->post('entry_id');\n\t\t$data['node_id'] \t= $this->EE->input->post('node_id');\n\t\t$data['custom_url']\t= $this->EE->input->post('custom_url');\n\t\t$data['field_data']\t= ( is_array($this->EE->input->post('custom_fields')) ) ? base64_encode(serialize($this->EE->input->post('custom_fields'))) : '';\n\t\t\n\t\t$data = $this->EE->security->xss_clean($data);\n\t\t\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id);\n\t\t\n\t\t// are we adding a root node\n\t\tif($is_root)\n\t\t{\n\t\t\t// returns true if root has been added\n\t\t\tif($this->EE->ttree->insert_root($data))\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_success', $this->EE->lang->line('root_added'));\n\t\t\t}\n\t\t\t// we already have a root!\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_failure', lang('root_already_exists'));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// are we updating\n\t\telseif($data['node_id'])\n\t\t{\n\t\t\t$this->EE->ttree->update_node_by_node_id($data['node_id'], $data);\n\t\t}\n\t\t// we're inserting a new node\n\t\telse\n\t\t{\n\t\t\t$parent_lft = $this->EE->input->post('parent');\n\t\t\t$this->EE->ttree->append_node_last($parent_lft, $data);\n\t\t}\n\t\t\n\t\tunset($data);\n\t\t\n\t\t// insert our tree array\n\t\t$data['tree_array'] = base64_encode(serialize( $this->EE->ttree->tree_to_array() ));\n\t\t$data['last_updated'] = time();\n\t\t$this->EE->db->where('id', $tree_id);\n\t\t$this->EE->db->update('exp_taxonomy_trees', $data); \n\t\t\n\t\t$this->EE->functions->redirect($this->_base_url.AMP.'method=edit_nodes'.AMP.'tree_id='.$tree_id);\n\t\n\t}", "function pdfbulletin_edit_form(&$node, $form_state) {\n $type = node_get_types('type', $node);\n $pdfbulletin = $node->pdfbulletin;\n $form['pdfbulletin'] = array(\n '#type' => 'value',\n '#value' => $pdfbulletin,\n );\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => check_plain($type->title_label),\n '#required' => TRUE,\n '#default_value' => $node->title,\n '#weight' => -5,\n );\n\n $form['header_format'] = array(\n '#tree' => FALSE,\n );\n $form['header_format']['header'] = array(\n '#title' => t('Header'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->header,\n );\n $form['header_format']['format'] = filter_form($pdfbulletin->header_format, NULL, array('header_format'));\n\n $form['footer_format'] = array(\n '#tree' => FALSE,\n );\n $form['footer_format']['footer'] = array(\n '#title' => t('Footer'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->footer,\n );\n $form['footer_format']['format'] = filter_form($pdfbulletin->footer_format, NULL, array('footer_format'));\n\n $form['email_format'] = array(\n '#tree' => FALSE, \n );\n $form['email_format']['email'] = array(\n '#title' => t('Text for e-mail'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->email,\n );\n $form['email_format']['format'] = filter_form($pdfbulletin->email_format, NULL, array('email_format'));\n\n $form['empty_text_format'] = array(\n '#tree' => FALSE,\n );\n $form['empty_text_format']['empty_text'] = array(\n '#title' => t('Empty text'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->empty_text,\n '#description' => t('Text for e-mail if it is sent with an empty bulletin.'),\n );\n $form['empty_text_format']['format'] = filter_form($pdfbulletin->empty_text_format, NULL, array('empty_text_format'));\n\n $paper_sizes = pdfbulletin_util_settings('paper_size');\n $form['paper_size'] = array(\n '#title' => t('Paper size'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->paper_size,\n );\n foreach ($paper_sizes as $key => $value) {\n $form['paper_size']['#options'][$key] = t($key);\n }\n\n $css = pdfbulletin_css();\n $form['css_file'] = array(\n '#title' => t('Style'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->css_file,\n );\n foreach ($css as $key => $value) {\n $form['css_file']['#options'][$key] = check_plain($value);\n }\n\n\n return $form;\n}", "function bat_event_type_form($form, &$form_state, $event_type, $op = 'edit') {\n $form['#attributes']['class'][] = 'bat-management-form bat-event-type-form';\n\n if ($op == 'clone') {\n $event_type->label .= ' (cloned)';\n $event_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $event_type->label,\n '#description' => t('The human-readable name of this event type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n\n // Machine-readable type name.\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($event_type->type) ? $event_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'bat_event_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this event type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n if ($op == 'add') {\n $form['fixed_event_states'] = array(\n '#type' => 'checkbox',\n '#title' => t('Fixed event states'),\n );\n }\n elseif ($op == 'edit') {\n $form['type']['#disabled'] = TRUE;\n }\n\n $form['event_granularity'] = array(\n '#type' => 'select',\n '#title' => t('Event Granularity'),\n '#options' => array('bat_daily' => t('Daily'), 'bat_hourly' => t('Hourly')),\n '#default_value' => isset($event_type->event_granularity) ? $event_type->event_granularity : 'bat_daily',\n );\n\n if (isset($event_type->is_new)) {\n // Check for available Target Entity types.\n $target_entity_types = module_invoke_all('bat_event_target_entity_types');\n if (count($target_entity_types) == 1) {\n // If there's only one target entity type, we simply store the value\n // without showing it to the user.\n $form['target_entity_type'] = array(\n '#type' => 'value',\n '#value' => $target_entity_types[0],\n );\n }\n else {\n // Build option list.\n $options = array();\n foreach ($target_entity_types as $target_entity_type) {\n $target_entity_info = entity_get_info($target_entity_type);\n $options[$target_entity_type] = $target_entity_info['label'];\n }\n $form['target_entity_type'] = array(\n '#type' => 'select',\n '#title' => t('Target Entity Type'),\n '#description' => t('Select the target entity type for this Event type. In most cases you will wish to leave this as \"Unit\".'),\n '#options' => $options,\n // Default to BAT Unit if available.\n '#default_value' => isset($target_entity_types['bat_unit']) ? 'bat_unit' : '',\n );\n }\n }\n\n if (!isset($event_type->is_new) && $event_type->fixed_event_states == 0) {\n $fields_options = array();\n\n $fields = field_info_instances('bat_event', $event_type->type);\n\n foreach ($fields as $field) {\n $fields_options[$field['field_name']] = $field['field_name'];\n }\n\n $form['events'] = array(\n '#type' => 'fieldset',\n '#group' => 'additional_settings',\n '#title' => t('Events'),\n '#tree' => TRUE,\n '#weight' => 80,\n );\n\n $form['events'][$event_type->type] = array(\n '#type' => 'select',\n '#title' => t('Select your default @event field', array('@event' => $event_type->label)),\n '#options' => $fields_options,\n '#default_value' => isset($event_type->default_event_value_field_ids[$event_type->type]) ? $event_type->default_event_value_field_ids[$event_type->type] : NULL,\n '#empty_option' => t('- Select a field -'),\n );\n }\n\n if (!isset($event_type->is_new)) {\n $fields_options = array();\n $fields = field_info_instances('bat_event', $event_type->type);\n\n foreach ($fields as $field) {\n $fields_options[$field['field_name']] = $field['field_name'];\n }\n\n $form['event_label'] = array(\n '#type' => 'fieldset',\n '#group' => 'additional_settings',\n '#title' => t('Label Source'),\n '#tree' => TRUE,\n '#weight' => 80,\n );\n\n $form['event_label']['default_event_label_field_name'] = array(\n '#type' => 'select',\n '#title' => t('Select your label field', array('@event' => $event_type->label)),\n '#default_value' => isset($event_type->default_event_label_field_name) ? $event_type->default_event_label_field_name : NULL,\n '#empty_option' => t('- Select a field -'),\n '#description' => t('If you select a field here, its value will be used as the label for your event. BAT will fall back to using the event state as the label if the field has no value.'),\n '#options' => $fields_options,\n );\n }\n\n $form['actions'] = array(\n '#type' => 'actions',\n '#tree' => FALSE,\n );\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save Event type'),\n '#weight' => 40,\n '#submit' => array('bat_event_type_form_submit'),\n );\n\n return $form;\n}", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "public function postEdit($type)\n {\n // Declare the rules for the form validation\n $rules = array(\n 'name' => 'required|min:3'\n );\n\n // Validate the inputs\n $validator = Validator::make(Input::all(), $rules);\n\n // Check if the form validates with success\n if ($validator->passes())\n {\n // Update the type post data\n $this->$type->name = Input::get('name');\n\n // Was the type post updated?\n if($this->$type->save())\n {\n // Redirect to the new type post page\n return Redirect::to('admin/types/' . $type->id . '/edit')->with('success', Lang::get('admin/types/messages.update.success'));\n }\n\n // Redirect to the types post management page\n return Redirect::to('admin/types/' . $type->id . '/edit')->with('error', Lang::get('admin/types/messages.update.error'));\n }\n\n // Form validation failed\n return Redirect::to('admin/types/' . $type->id . '/edit')->withInput()->withErrors($validator);\n }", "function dgu_search_info_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "function medstat_quizz_questionnaire_take_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function katakrak_search_search_results_content_type_edit_form($form, &$form_state) {\n $conf = $form_state['conf'];\n\n $action_options = array(\n 'none' => t('From context'),\n 'override' => t('Override'),\n 'append' => t('Append to'),\n 'fallback' => t('Fallback if empty'),\n );\n\n $form['keys_action'] = array(\n '#prefix' => '<div class=\"form-item container-inline\">',\n '#title' => t('Keywords'),\n '#type' => 'select',\n '#options' => $action_options,\n '#default_value' => $conf['keys_action'],\n );\n\n $form['keys'] = array(\n '#title' => '',\n '#type' => 'textfield',\n '#default_value' => $conf['keys'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('edit-keys-action' => array('fallback', 'override', 'append')),\n );\n\n $form['keys_required'] = array(\n '#title' => t('Required'),\n '#type' => 'checkbox',\n '#default_value' => $conf['keys_required'],\n '#suffix' => '</div>',\n );\n\n $form['filters_action'] = array(\n '#prefix' => '<div class=\"form-item container-inline\">',\n '#title' => t('Filters'),\n '#type' => 'select',\n '#options' => $action_options,\n '#default_value' => $conf['filters_action'],\n );\n\n $form['filters'] = array(\n '#title' => '',\n '#type' => 'textfield',\n '#default_value' => $conf['filters'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('edit-filters-action' => array('fallback', 'override', 'append')),\n '#suffix' => '</div>',\n );\n\n $form['sort_action'] = array(\n '#prefix' => '<div class=\"form-item container-inline\">',\n '#title' => t('Sort'),\n '#type' => 'select',\n '#options' => $action_options,\n '#default_value' => $conf['sort_action'],\n );\n\n $form['sort'] = array(\n '#title' => '',\n '#type' => 'textfield',\n '#default_value' => $conf['sort'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('edit-sort-action' => array('fallback', 'override', 'append')),\n '#suffix' => '</div>',\n );\n $form['rows'] = array(\n '#prefix' => '<div class=\"form-item container-inline\">',\n '#title' => t('Results per page'),\n '#type' => 'textfield',\n '#default_value' => isset($conf['rows']) ? $conf['rows'] : 10,\n '#suffix' => '</div>',\n );\n $form['env_id'] = array(\n '#prefix' => '<div class=\"form-item container-inline\">',\n '#title' => t('Solr Environment ID'),\n '#description' => t('The machine name of the Solr environment, as defined in the Settings page of the Apache Solr module'),\n '#type' => 'textfield',\n '#default_value' => isset($conf['env_id']) ? $conf['env_id'] : '',\n '#suffix' => '</div>',\n );\n\n $form['title_override'] = array(\n '#title' => t('Override title'),\n '#type' => 'checkbox',\n '#default_value' => $conf['title_override'],\n );\n\n $form['title_override_text'] = array(\n '#type' => 'textfield',\n '#default_value' => $conf['title_override_text'],\n '#size' => 35,\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('edit-title-override' => array(1)),\n );\n\n $form['empty_override'] = array(\n '#title' => t('Override \"no result\" text'),\n '#type' => 'checkbox',\n '#default_value' => $conf['empty_override'],\n );\n\n $form['empty_override_field']['empty_override_title'] = array(\n '#title' => t('Title'),\n '#type' => 'textfield',\n '#default_value' => $conf['empty_override_title'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('edit-empty-override' => array(1)),\n );\n\n $form['empty_override_field']['empty_override_text'] = array(\n '#title' => t('No result text'),\n '#type' => 'text_format',\n '#base_type' => 'textarea',\n '#default_value' => $conf['empty_override_text'],\n '#format' => $conf['empty_override_format'],\n '#process' => array('filter_process_format', 'ctools_dependent_process'),\n '#dependency' => array('edit-empty-override' => array(1)),\n '#id' => 'edit-empty-override-text-value',\n '#prefix' => '<div id=\"edit-empty-override-text-value-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['breadcrumb'] = array(\n '#title' => t('Show keywords and filters in the breadcrumb trail'),\n '#type' => 'checkbox',\n '#default_value' => $conf['breadcrumb'],\n );\n\n $form['log'] = array(\n '#title' => t('Record a watchdog log entry when searches are made'),\n '#type' => 'checkbox',\n '#default_value' => $conf['log'],\n );\n \n $form['tipo'] = array(\n '#title' => t('Tipo de búsqueda'),\n '#type' => 'select',\n '#options' => array(\n 'blogs' => 'blogs',\n 'agenda' => 'agenda',\n 'libros' => 'libros',\n ),\n '#default_value' => $conf['tipo'],\n );\n \n $form['columns'] = array(\n '#title' => t('Number of columns'),\n '#type' => 'textfield',\n '#default_value' => $conf['columns'],\n );\n\n // Substitutions.\n if (!empty($form_state['contexts'])) {\n $form['substitute'] = array(\n '#type' => 'checkbox',\n '#title' => t('Use context keywords'),\n '#description' => t('If checked, context keywords will be substituted in this content.'),\n '#default_value' => !empty($conf['substitute']),\n );\n $form['contexts'] = array(\n '#title' => t('Substitutions'),\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n\n $header = array(t('Keyword'), t('Value'));\n\n $rows = array();\n foreach ($form_state['contexts'] as $context) {\n foreach (ctools_context_get_converters('%' . check_plain($context->keyword) . ':', $context) as $keyword => $title) {\n $rows[] = array(\n check_plain($keyword),\n t('@identifier: @title', array('@title' => $title, '@identifier' => $context->identifier)),\n );\n }\n }\n\n $form['contexts']['context'] = array('#value' => theme('table', array('header' => $header, 'rows' => $rows)));\n }\n\n return $form;\n}", "function thumbwhere_contentcollection_edit_form($form, &$form_state, $thumbwhere_contentcollection) {\n\n // Add the default field elements.\n $form['fk_actor'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollection fk_actor'),\n '#default_value' => isset($thumbwhere_contentcollection->fk_actor) ? $thumbwhere_contentcollection->fk_actor : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_actor',\n );\n // Add the default field elements.\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollection title'),\n '#default_value' => isset($thumbwhere_contentcollection->title) ? $thumbwhere_contentcollection->title : 'Hello',\n // '#maxlength' => 255,\n // '#required' => TRUE,\n '#weight' => -5,\n );\n\n\n\n $form['data']['#tree'] = TRUE;\n\n /*\n $form['data']['sample_data'] = array(\n '#type' => 'checkbox',\n '#title' => t('An interesting thumbwhere_contentcollection switch'),\n '#default_value' => isset($thumbwhere_contentcollection->data['sample_data']) ? $thumbwhere_contentcollection->data['sample_data'] : 1,\n );\n */\n\n\n // Add the field related form elements.\n $form_state['thumbwhere_contentcollection'] = $thumbwhere_contentcollection;\n field_attach_form('thumbwhere_contentcollection', $thumbwhere_contentcollection, $form, $form_state);\n\n $form['actions'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('form-actions')),\n '#weight' => 400,\n );\n\n // We add the form's #submit array to this button along with the actual submit\n // handler to preserve any submit handlers added by a form callback_wrapper.\n $submit = array();\n\n if (!empty($form['#submit'])) {\n $submit += $form['#submit'];\n }\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save thumbwhere_contentcollection'),\n '#submit' => $submit + array('thumbwhere_contentcollection_edit_form_submit'),\n );\n\n // Do we show the delete button?\n if (!empty($thumbwhere_contentcollection->pk_contentcollection)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete thumbwhere_contentcollection'),\n '#suffix' => l(t('Cancel'), 'admin/thumbwhere/thumbwhere_contentcollections'),\n '#submit' => $submit + array('thumbwhere_contentcollection_form_submit_delete'),\n '#weight' => 45,\n );\n }\n\n // We append the validate handler to #validate in case a form callback_wrapper\n // is used to add validate handlers earlier.\n $form['#validate'][] = 'thumbwhere_contentcollection_edit_form_validate';\n return $form;\n}", "function doEdit()\n {\n $dt = new lmbDate();\n $this->dt_up = $dt->getStamp();\n\n $node_id = $this->request->getInteger('id');\n $this->node = $node_id;\n $category['node_id'] = $node_id;\n $category['title'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_TITLE);\n $category['description'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_DESCR);\n $category['identifier'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_URI);\n\n $this->dt_cr = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $category['date_create'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $category['date_update'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_UPDATE_DATE);\n $category['is_branch'] = TreeItem::getIsBranchByNodeId($node_id);\n\n $this->setFormDatasource($category, 'object_form');\n\n if($this->request->hasPost())\n {\n $this->_validateAndSave(false);\n //$this->_onAfterSave();\n }\n }", "function ef_notifications_form_node_form_alter(&$form, $form_state) {\n if (workbench_moderation_node_type_moderated($form['type']['#value'])) {\n $available = FALSE;\n // Workbench Moderation uses \"options\" fieldset in favor of \"revision information\"\n // if \"administer roles\" perm is given to content moderator.\n if (isset($form['revision_information']['workbench_moderation_state_new'])) {\n $wrapper_id = 'revision_information';\n $available = TRUE;\n }\n else if (isset($form['options']['workbench_moderation_state_new'])) {\n $wrapper_id = 'options';\n $available = TRUE;\n }\n\n if (!$available) {\n return;\n }\n\n $form[$wrapper_id]['workbench_moderation_state_new']['#ajax'] = array(\n 'callback' => 'ef_notifications_form_node_callback',\n 'wrapper' => 'wv-workflow-form-node',\n 'effect' => 'fade',\n 'event' => 'change',\n );\n\n $form[$wrapper_id]['workflow_email'] = array(\n '#prefix' => '<div id=\"wv-workflow-form-node\">',\n '#suffix' => '</div>',\n '#tree' => TRUE,\n );\n\n // Determine current state.\n if (isset($form['#node']->workbench_moderation['current']->state)) {\n $current_from_state = $form['#node']->workbench_moderation['current']->state;\n }\n else {\n $current_from_state = variable_get('workbench_moderation_default_state_' . $form['type']['#value'], workbench_moderation_state_none());\n }\n\n if ($current_from_state == workbench_moderation_state_published()) {\n $current_from_state = workbench_moderation_state_none();\n }\n\n // Initialize to the current state.\n $form_moderation_state = $current_from_state;\n if (empty($form_state['values'])) {\n $form_moderation_state = $current_from_state;\n }\n if (!empty($form_state['values']) &&\n isset($form_state['values']['workbench_moderation_state_new'])) {\n $form_moderation_state = $form_state['values']['workbench_moderation_state_new'];\n }\n if (!empty($form_state['values']) &&\n isset($form_state['values'][$wrapper_id]['workbench_moderation_state_new'])) {\n $form_moderation_state = $form_state['values'][$wrapper_id]['workbench_moderation_state_new'];\n }\n\n $ef_notifications = ef_notifications_get();\n foreach ($ef_notifications as $transition => $notification_roles) {\n foreach ($notification_roles as $rid => $notification_transition) {\n if ($notification_transition->from_name == $current_from_state\n && $notification_transition->to_name == $form_moderation_state) {\n ef_notifications_create_form_element($form, $notification_transition);\n }\n }\n }\n\n $form['actions']['submit']['#submit'][] = 'ef_notifications_notification_submit';\n }\n}", "function nobookoutline_nodetypes_settings_form() {\n $nodetypesobj = node_get_types();\n $options = array();\n foreach($nodetypesobj as $nodetype) {\n $options[$nodetype->type] = $nodetype->type;\n \n }\n \n\t$form['form_nobookoutline_nodetypes'] = array(\n\t\t'#type' => 'select',\n '#title' => t('Select Node Types'),\n '#default_value' => variable_get('form_nobookoutline_nodetypes', \"book\"),\n '#options' => $options,\n\t '#multiple' => TRUE,\n '#description' => t('<b>Select the node types to show book outline.</b>'),\n\t);\n\n\n return system_settings_form($form);\n}", "function gwt_drupal_form_node_form_alter(&$form, &$form_state, $form_id) {\n // Remove if #1245218 is backported to D7 core.\n foreach (array_keys($form) as $item) {\n if (strpos($item, 'field_') === 0) {\n if (!empty($form[$item]['#attributes']['class'])) {\n foreach ($form[$item]['#attributes']['class'] as &$class) {\n // Core bug: the field-type-text-with-summary class is used as a JS hook.\n if ($class != 'field-type-text-with-summary' && strpos($class, 'field-type-') === 0 || strpos($class, 'field-name-') === 0) {\n // Make the class different from that used in theme_field().\n $class = 'form-' . $class;\n }\n }\n }\n }\n }\n}", "public function bindForm($type = RB_DEFAULT_FORM_TYPE) {\n\t\t$class = 'Rb' . $type . 'Form';\n\t\trequire_once('forms/' . $class . '.class.php');\n\t\t$form = new $class();\n\n\t\t$content = $form->bind($_POST);\n\t\t$category = 'default';\n\n\t\t$this->storage->saveArticle($category, $content);\n\t}", "function legal_document_content_type_edit_form_submit($form, &$form_state) {\n $form_state['conf']['document'] = $form_state['values']['document'];\n $form_state['conf']['agree'] = $form_state['values']['agree'];\n $form_state['conf']['admin_title'] = $form_state['values']['admin_title'];\n}", "function happywedding_node_form_submit($form, &$form_state) {\n global $user;\n //dpm($user);\n if ( !empty($form_state['nid']) && isset($_GET['vendor'] ) ) {\n \n $type = $form['type']['#value'];\n if (in_array('vendor', $user->roles)) {\n $basepath = 'bo/vendor/';\n } else {\n $basepath = 'node/';\n }\n //dpm($form);\n if($type=='news')\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type;\n else if($type=='product') {\n $query = array('category' => array());\n foreach($form[\"field_product_category\"][\"und\"][\"#value\"] as $key => $value){\n $query[\"category\"][] = $key; \n }\n $form_state['redirect'] = array( \n $basepath.$_GET['vendor'].'/categories/'.$type.'s' ,\n array('query' => $query ) \n );\n //dpm($form_state['redirect']);\n }else\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type.'s';\n }\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(Node $node)\n {\n //\n }", "function mongo_node_bundle_create_form_submit($form, $form_state) {\n $entity_type = $form_state['values']['entity_type'];\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n\n // @todo - redirect to bundle type page.\n mongo_node_settings_save($set);\n}", "public function updateSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id);\n $node->setSticky($form_state->getValue('sticky'));\n $node->setPublished($form_state->getValue('status'));\n $node->save();\n }", "function _mongo_node_update_type($old_entity_type, $entity_type) {\n // Update collection names.\n _mongo_node_rename_collection($old_entity_type, $entity_type);\n\n // Update bundle name in mongo entities.\n $collection = mongodb_collection('fields_current', $entity_type);\n $result = $collection->update(\n array('_type' => $old_entity_type),\n array('$set' => array('_type' => $entity_type, 'type' => $entity_type))\n );\n}", "function editItemType() {\n\t\tglobal $page;\n\t\tglobal $HTML;\n\t\t$HTML->details(1);\n\n\t\t$_ = '';\n\t\t$_ .= '<div class=\"c init:form form:action:'.$page->url.'\" id=\"container:itemtype\">';\n\t\t\t$_ .= $this->getTypeObject()->editItem();\n\t\t$_ .= '</div>';\n\n\t\treturn $_;\n\t}", "public function edit_form_after_title() {\n\t\twp_nonce_field( 'papi_save_data', 'papi_meta_nonce' );\n\n\t\tif ( $value = esc_attr( papi_get_entry_type_id() ) ) {\n\t\t\tpapi_render_html_tag( 'input', [\n\t\t\t\t'data-papi-page-type-key' => true,\n\t\t\t\t'name' => esc_attr( papi_get_page_type_key() ),\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'value' => $value\n\t\t\t] );\n\t\t}\n\t}", "function manage_node()\n\t{\n\t\n\t\t$tree_id = $this->EE->input->get('tree_id');\n\t\t\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id, true);\n\t\t\n\t\t$this->EE->load->model('channel_entries_model');\n\t\t\t\t\n\t\t$vars = array();\n\t\t\n\t\t$vars['tree_settings'] \t= $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t// check this user has access to this tree\n\t\t$permissions = explode('|', $vars['tree_settings']['permissions']);\n\t\tif( !has_access_to_tree($this->EE->session->userdata['group_id'], $permissions) )\n\t\t{\n\t\t\t$this->EE->session->set_flashdata('message_failure', lang('unauthorised'));\n\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t}\n\t\t\n\t\t$vars['title_extra'] = $vars['tree_settings']['label'];\n\t\t$vars['root_insert'] = $this->EE->input->get('add_root');\n\t\t$vars['channel_entries'] = array();\n\t\t$vars['templates'] = array();\n\t\t$vars['tree_id'] = $tree_id;\n\t\t$vars['parent_select'] = array();\n\t\t$vars['node_id'] = $this->EE->input->get('node_id');\n\t\t$vars['label'] = '';\n\t\t$vars['template_path'] = '';\n\t\t$vars['entry_id'] = '';\n\t\t$vars['custom_url'] = '';\n\t\t$vars['field_data'] = '';\n\t\t$vars['site_pages'] = $this->EE->config->item('site_pages');\n\t\t$vars['hide'] = \" class='js_hide'\";\n\t\t$vars['select_page_uri_option'] = '';\n\t\t\t\n\t\t// get template info from selected templates\n\t\t$template_ids = explode('|', $vars['tree_settings']['template_preferences']);\n\t\t$templates = $this->EE->ttree->get_templates($template_ids, $tree_id);\n\t\t\n\t\t// build our options for the template form_dropdown\n\t\tif( count($templates))\n\t\t{\n\t\t\t// output our initial value only if there's more than one template\n\t\t\tif(count($templates) != 1)\n\t\t\t{\n\t\t\t\t$vars['templates'][0] = '--';\n\t\t\t}\n\t\t\tforeach($templates as $template)\n\t\t\t{\n\t\t\t\t// strip /index from each template\n\t\t\t\t$vars['templates'][ $template['template_id'] ] = str_replace('index/', '', '/'.$template['group_name'].'/'.$template['template_name'].'/');\n\t\t\t}\n\t\t}\n\t\t\n\t\t// get channel entries from selected templates\n\t\t$channel_ids = explode('|', $vars['tree_settings']['channel_preferences']);\n\t\t$fields_needed = array(\"entry_id\", \"channel_id\", \"title\");\n\t\t$channel_entries = $this->EE->channel_entries_model->get_entries($channel_ids, $fields_needed)->result_array();\n\t\t$channels = $this->EE->ttree->get_channels($this->site_id);\n\t\t\n\t\t// build an array of channel_ids => channel_titles\n\t\tforeach($channels as $channel)\n\t\t{\n\t\t\t$channel_names[$channel['channel_id']] = $channel['channel_title'];\n\t\t}\n\t\t// build our channel_entries form_dropdown array\n\t\tif( count($channel_entries))\n\t\t{\n\t\t\t$vars['channel_entries'][0] = '--';\n\t\t\tforeach($channel_entries as $entry)\n\t\t\t{\n\t\t\t\t$vars['channel_entries'][ $entry['entry_id'] ] = '['.$channel_names[$entry['channel_id']].'] &rarr; '.$entry['title'];\n\t\t\t}\n\t\t}\n\n\t\t// sort the entries alphabetically\n\t\tnatcasesort($vars['channel_entries']);\n\t\t\n\t\t// build our nodes array for the select parent form_dropdown\n\t\t// only if we're not inserting a root\n\t\tif(!$vars['root_insert'] && !$vars['node_id'])\n\t\t{\n\t\t\t$parent_select = array();\n\t\t\t$disabled_parents = array();\n\t\t\t\n\t\t\t$flat_tree = $this->EE->ttree->get_flat_tree(1);\n\t\t\t\n\t\t\t// go through our parent options\n\t\t\tforeach($flat_tree as $node)\n\t\t\t{\n\t\t\t\t// find out if any are at or beyond our max_depth limit\n\t\t\t\tif($node['level'] >= $vars['tree_settings']['max_depth'] && $vars['tree_settings']['max_depth'] != 0)\n\t\t\t\t{\n\t\t\t\t\t// store for later\n\t\t\t\t\t$disabled_parents[] = $node['lft'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$parent_select[$node['lft']] = str_repeat('-&nbsp;', $node['level']).$node['label'];\n\t\t\t}\n\t\t\t\n\t\t\t// put our dropdown field into a var\n\t\t\t$vars['parent_select'] = form_dropdown('parent', $parent_select);\n\t\t\t\n\t\t\t// do we have any disabled parents?\n\t\t\tif(count($disabled_parents))\n\t\t\t{\t\n\t\t\t\t// disable each parent we're not allowing.\n\t\t\t\t// haven't figured out a better way of doing this ?\n\t\t\t\tforeach($disabled_parents as $disabled_parent)\n\t\t\t\t{\n\t\t\t\t\t$vars['parent_select'] = str_replace('value=\"'.$disabled_parent.'\"', 'value=\"'.$disabled_parent.'\" disabled=\"disabled\"', $vars['parent_select']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// are we editing a node, get node's existing values\n\t\tif($vars['node_id'])\n\t\t{\n\t\t\t$this_node = $this->EE->ttree->get_node_by_node_id($vars['node_id']);\n\t\t\t\n\t\t\tif(count($this_node))\n\t\t\t{\n\t\t\t\t$vars['label'] = $this_node['label'];\n\t\t\t\t$vars['template_path'] = $this_node['template_path'];\n\t\t\t\t$vars['entry_id'] = $this_node['entry_id'];\n\t\t\t\t$vars['custom_url'] = $this_node['custom_url'];\n\t\t\t\t$vars['field_data'] = ($this_node['field_data']) ? $this->unserialize($this_node['field_data']) : '';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// build options for 'use page uri' checkbox\n\t\t$checked = false;\n\t\t\t\t\t\t\n\t\tif(isset($this_node['custom_url']) && $this_node['custom_url'] == \"[page_uri]\")\n\t\t{\n\t\t\t//check it, and show it\n\t\t\t$checked = TRUE;\n\t\t\t$vars['hide'] = \"\";\n\t\t}\n\t\t\n\t\t$vars['site_pages_checkbox_options'] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t 'name' => 'use_page_uri',\n\t\t\t\t\t\t\t\t\t\t\t\t 'id' => 'use_page_uri',\n\t\t\t\t\t\t\t\t\t\t\t\t 'value' => '1',\n\t\t\t\t\t\t\t\t\t\t\t\t 'checked' => $checked\n\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\n\t\t$vars['has_page_ajax_url'] = str_replace('&amp;','&', $this->_base_url.AMP.\"method=check_entry_has_pages_uri\".AMP.\"tree_id=\".$tree_id.AMP.\"node_entry_id=\");\n\t\t\n\t\t// put the select entry field into a variable\n\t\t$entries_select_dropdown = form_dropdown('entry_id', $vars['channel_entries'], $vars['entry_id']);\n\t\t\n\t\t// fetch our existing entry_ids\n\t\t$entry_ids_in_tree = $this->EE->ttree->get_tree_entry_ids($tree_id);\n\n\t\tif($entry_ids_in_tree)\n\t\t{\n\t\t\t// loop through our entries and str_replace the disabled=\"disabled\" in there :(\n\t\t\tforeach($entry_ids_in_tree as $row)\n\t\t\t{\n\t\t\t\t// don't want to disable our current node though :)\n\t\t\t\tif($row['entry_id'] != $vars['entry_id'])\n\t\t\t\t{\n\t\t\t\t\t$entries_select_dropdown = str_replace('value=\"'.$row['entry_id'].'\"', 'value=\"'.$row['entry_id'].'\" disabled=\"disabled\"', $entries_select_dropdown);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$vars['entries_select_dropdown'] = $entries_select_dropdown;\n\t\t\n\t\tunset($entries_select_dropdown);\n\n\t\treturn $this->content_wrapper('manage_node', 'manage_node', $vars);\n\n\t}", "function _scheduler_form_node_type_form_alter(array &$form, FormStateInterface $form_state) {\n $config = \\Drupal::config('scheduler.settings');\n\n /** @var \\Drupal\\node\\NodeTypeInterface $type */\n $type = $form_state->getFormObject()->getEntity();\n\n $form['#attached']['library'][] = 'scheduler/admin';\n $form['#attached']['library'][] = 'scheduler/vertical-tabs';\n\n $form['scheduler'] = [\n '#type' => 'details',\n '#title' => t('Scheduler'),\n '#weight' => 35,\n '#group' => 'additional_settings',\n ];\n\n // Publishing options.\n $form['scheduler']['publish'] = [\n '#type' => 'details',\n '#title' => t('Publishing'),\n '#weight' => 1,\n '#group' => 'scheduler',\n '#open' => TRUE,\n ];\n $form['scheduler']['publish']['scheduler_publish_enable'] = [\n '#type' => 'checkbox',\n '#title' => t('Enable scheduled publishing for this content type'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'publish_enable', $config->get('default_publish_enable')),\n ];\n $form['scheduler']['publish']['scheduler_publish_touch'] = [\n '#type' => 'checkbox',\n '#title' => t('Change content creation time to match the scheduled publish time'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'publish_touch', $config->get('default_publish_touch')),\n '#states' => [\n 'visible' => [\n ':input[name=\"scheduler_publish_enable\"]' => ['checked' => TRUE],\n ],\n ],\n ];\n $form['scheduler']['publish']['scheduler_publish_required'] = [\n '#type' => 'checkbox',\n '#title' => t('Require scheduled publishing'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'publish_required', $config->get('default_publish_required')),\n '#states' => [\n 'visible' => [\n ':input[name=\"scheduler_publish_enable\"]' => ['checked' => TRUE],\n ],\n ],\n ];\n $form['scheduler']['publish']['scheduler_publish_revision'] = [\n '#type' => 'checkbox',\n '#title' => t('Create a new revision on publishing'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'publish_revision', $config->get('default_publish_revision')),\n '#states' => [\n 'visible' => [\n ':input[name=\"scheduler_publish_enable\"]' => ['checked' => TRUE],\n ],\n ],\n ];\n $form['scheduler']['publish']['advanced'] = [\n '#type' => 'details',\n '#title' => t('Advanced options'),\n '#open' => FALSE,\n '#states' => [\n 'visible' => [\n ':input[name=\"scheduler_publish_enable\"]' => ['checked' => TRUE],\n ],\n ],\n ];\n $form['scheduler']['publish']['advanced']['scheduler_publish_past_date'] = [\n '#type' => 'radios',\n '#title' => t('Action to be taken for publication dates in the past'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'publish_past_date', $config->get('default_publish_past_date')),\n '#options' => [\n 'error' => t('Display an error message - do not allow dates in the past'),\n 'publish' => t('Publish the content immediately after saving'),\n 'schedule' => t('Schedule the content for publication on the next cron run'),\n ],\n ];\n $form['scheduler']['publish']['advanced']['scheduler_publish_past_date_created'] = [\n '#type' => 'checkbox',\n '#title' => t(\"Change content creation time to match the published time for dates before the content was created\"),\n '#description' => t(\"The created time will only be altered when the scheduled publishing time is earlier than the existing content creation time\"),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'publish_past_date_created', $config->get('default_publish_past_date_created')),\n // This option is not relevant if the full 'change creation time' option is\n // selected, or when past dates are not allowed. Hence only show it when\n // the main option is not checked and the past dates option is not 'error'.\n '#states' => [\n 'visible' => [\n ':input[name=\"scheduler_publish_touch\"]' => ['checked' => FALSE],\n ':input[name=\"scheduler_publish_past_date\"]' => ['!value' => 'error'],\n ],\n ],\n ];\n\n // Unpublishing options.\n $form['scheduler']['unpublish'] = [\n '#type' => 'details',\n '#title' => t('Unpublishing'),\n '#weight' => 2,\n '#group' => 'scheduler',\n '#open' => TRUE,\n ];\n $form['scheduler']['unpublish']['scheduler_unpublish_enable'] = [\n '#type' => 'checkbox',\n '#title' => t('Enable scheduled unpublishing for this content type'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'unpublish_enable', $config->get('default_unpublish_enable')),\n ];\n $form['scheduler']['unpublish']['scheduler_unpublish_required'] = [\n '#type' => 'checkbox',\n '#title' => t('Require scheduled unpublishing'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'unpublish_required', $config->get('default_unpublish_required')),\n '#states' => [\n 'visible' => [\n ':input[name=\"scheduler_unpublish_enable\"]' => ['checked' => TRUE],\n ],\n ],\n ];\n $form['scheduler']['unpublish']['scheduler_unpublish_revision'] = [\n '#type' => 'checkbox',\n '#title' => t('Create a new revision on unpublishing'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'unpublish_revision', $config->get('default_unpublish_revision')),\n '#states' => [\n 'visible' => [\n ':input[name=\"scheduler_unpublish_enable\"]' => ['checked' => TRUE],\n ],\n ],\n ];\n\n // The 'node_edit_layout' fieldset contains options to alter the layout of\n // node edit pages.\n $form['scheduler']['node_edit_layout'] = [\n '#type' => 'details',\n '#title' => t('Node edit page layout'),\n '#weight' => 3,\n '#group' => 'scheduler',\n // The #states processing only caters for AND and does not do OR. So to set\n // the state to visible if either of the boxes are ticked we use the fact\n // that logical 'X = A or B' is equivalent to 'not X = not A and not B'.\n '#states' => [\n '!visible' => [\n ':input[name=\"scheduler_publish_enable\"]' => ['!checked' => TRUE],\n ':input[name=\"scheduler_unpublish_enable\"]' => ['!checked' => TRUE],\n ],\n ],\n ];\n $form['scheduler']['node_edit_layout']['scheduler_fields_display_mode'] = [\n '#type' => 'radios',\n '#title' => t('Display scheduling options as'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'fields_display_mode', $config->get('default_fields_display_mode')),\n '#options' => [\n 'vertical_tab' => t('Vertical tab'),\n 'fieldset' => t('Separate fieldset'),\n ],\n '#description' => t('Use this option to specify how the scheduling options will be displayed when editing a node.'),\n ];\n $form['scheduler']['node_edit_layout']['scheduler_expand_fieldset'] = [\n '#type' => 'radios',\n '#title' => t('Expand fieldset or vertical tab'),\n '#default_value' => $type->getThirdPartySetting('scheduler', 'expand_fieldset', $config->get('default_expand_fieldset')),\n '#options' => [\n 'when_required' => t('Expand only when a scheduled date exists or when a date is required'),\n 'always' => t('Always open the fieldset or vertical tab'),\n ],\n ];\n\n $form['#entity_builders'][] = 'scheduler_form_node_type_form_builder';\n}", "function content_form($post_type,$post_id = '',$action='',$thankyou = array()){\n\t$app = \\Jolt\\Jolt::getInstance();\n\t//\tgrab blueprint based on content type..\n\t$blueprint = $app->store('blueprints');\n\t$blueprint = $blueprint[ $post_type ];\n//\tprint_r( $blueprint );\n\t$nonce = generate_nonce();\n\n\tif( isset($_POST['title']) ){\n//\t\tprint_r($_POST);\n\t\t$c_url = site_url().$_SERVER['REQUEST_URI'];\n\t\t$post \t\t\t\t= array();\n\t\t$post['title'] \t\t= $_POST['title'];\n\t\t$post['name'] \t\t= new_slug( slugify( $_POST['title'] ) );\n\t\t$post['type'] \t\t= $post_type;\n\t\t$post['user_id'] \t= '';\n\t\t$post['date'] \t\t= date('Y-m-d H:i:s');\n\t\t$post['modified']\t= date('Y-m-d H:i:s');\n\t\t$post['password'] \t= '';\n\t\t$post['status'] \t= 'draft';\t//\tregardless of post type, we never want a post actually published from here..\n\t\t$post['parent'] \t= 0;\n\t\t$post['guid'] \t\t= generate_uuid();\n\t\t$post['category'] \t= '';\n\t\t$restricted = array('_id','title','name','user_id','date','modified','guid','type','status','parent','password');\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\t//\tThere are fields we don't want to change... This makes sure we don't...\n\t\t\tif( in_array($restricted,$fname) )\tcontinue;\n\t\t\tif( !isset($_POST[ $fname ]) ){\n\t\t\t\tif( $field['type'] == 'related' ){\n\t\t\t\t\t$_POST[ $fname ] = array();\n\t\t\t\t}else{\n\t\t\t\t\t$_POST[ $fname ] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($_POST as $k=>$v){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t$post[$k] = $v;\n\t\t}\n\t\tif( isset($_FILES) ){\n\t\t\tforeach($_FILES as $k=>$file){\n\t\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t\t$uploaddir = $this->app->store('upload_path');\n\t\t\t\t$uploadfile = $uploaddir . basename($file['name']);\n\t\t\t\t$uploadurl = $this->app->store('upload_url') . basename($file['name']);\n\t\t\t\tif( file_exists($uploadfile) ){\n\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t}else{\n\t\t\t\t\tif ( move_uploaded_file($file['tmp_name'], $uploadfile) ) {\n\t\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$app->db->insert('post', $post );\n\t\tunset($_POST);\n\t\tif( isset($thankyou['url']) ){\n\t\t\techo '<script>top.location.href=\"'.$thankyou['url'].'\";</script>';\n\t\t}else if( isset($thankyou['msg']) ){\n\t\t\techo '<p>'.$thankyou['msg'].'</p>';\n\t\t}else{\n\t\t\techo '<p><strong>Thank you, your post has been saved.</strong></p>';\n\t\t}\n\t}\n?>\n\t<form role=\"form\" method=\"POST\" action=\"<?php echo $action?>\" enctype=\"multipart/form-data\">\n\t<input type=\"hidden\" name=\"nonce\" value=\"<?php echo $nonce?>\" />\n\t<fieldset>\n\t\t<div class=\"form-group\">\n\t\t\t<label for=\"title\"><?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Title\")?></label>\n\t\t\t<input type=\"text\" class=\"form-control\" id=\"title\" name=\"title\" placeholder=\"<?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Enter Title\")?>\" value=\"<?php echo ( isset($post) ? $post['title'] : '');?>\" required>\n\t\t</div>\n<?php\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( $field['adminonly'] )\tcontinue;\n\t\t\tform_field($fname,$field,$post);\n\t\t}\n?>\n\t\t<button type=\"submit\" class=\"btn btn-primary\">Save</button>\n\t</fieldset>\n\t</form>\n<?php\n}", "private function loadNewNodeFormForTestContentType() {\n $this->drupalLogin($this->user);\n $this->drupalGet(self::CONTENT_ADD_PREFIX\n . self::TEST_CONTENT_TYPE_ID);\n $this->assertResponse(200);\n }", "function breol_facetbrowser_breol_facetbrowser_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "function ting_new_materials_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "function elife_article_markup_doi_edit_form_submit(&$form, &$form_state) {\n // Nothing.\n}", "function ctools_term_list_content_type_edit_form_submit(&$form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n}", "public function edit_postAction() {\n\t\t$info = $this->getPost(array('id', 'sort','name'));\n\t\t$info = $this->_cookData($info);\n\t\t$supplier = Fanli_Service_Ptype::getBy(array('name'=>$info['name']));\n\t\tif($supplier && $supplier['id'] != $info['id']) $this->output(-1, '操作失败,该供分类已存在');\n\t\t$ret = Fanli_Service_Ptype::updateType($info, intval($info['id']));\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功.'); \t\t\n\t}", "function my_module_post_update_subtype_field() {\n $eq = \\Drupal::entityQuery('node');\n $nids = $eq->condition('type', 'org_page')->execute();\n /** @var Drupal\\node\\Entity\\Node[] $nodes */\n $nodes = Node::loadMultiple($nids);\n foreach ($nodes as $node) {\n $node->field_new->setValue('A Default Value');\n $node->save();\n }\n}", "function fyc_project_menu_content_type_edit_form($form, &$form_state) {\n return $form;\n}", "function change_admin_field_type( $current_type ){\r\n\r\n\t\t// Types to change for admin, if method or action does not exist\r\n\t\t$change_types = apply_filters( 'field_editor_change_admin_field_type_types',array(\r\n\t\t\t'wp-editor' => 'textarea',\r\n\t\t\t'business-hours' => 'business_hours'\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif( $current_type === 'wp-editor' && ( $this->is_admin_create_or_update() || ! get_option( 'jmfe_admin_enable_wp_editor') ) ) return 'textarea';\r\n\r\n\t\t// Check if taxonomy type (always starts with \"term-\")\r\n\t\tif( strpos( $current_type, 'term-' ) !== false) return $current_type;\r\n\r\n\t\t// Change any - to _ to check for method or actions\r\n\t\t$input_type = str_replace( \"-\", \"_\", $current_type );\r\n\r\n\t\t// Check if custom function or action exists for type (WPJM)\r\n\t\tif ( method_exists( 'WP_Job_Manager_Field_Editor_Job_Writepanels', 'input_' . $input_type ) ) return $input_type;\r\n\t\tif ( has_action( 'job_manager_input_' . $input_type ) ) return $input_type;\r\n\r\n\t\tif( $this->wprm_active() ){\r\n\t\t\t// Check if custom function or action exists for type (WPRM)\r\n\t\t\tif ( method_exists( 'WP_Job_Manager_Field_Editor_Resume_Writepanels', 'input_' . $input_type ) ) return $input_type;\r\n\t\t\tif ( has_action( 'resume_manager_input_' . $input_type ) ) return $input_type;\r\n\t\t}\r\n\r\n\t\t// Check if admin field type should be changed based on array config above\r\n\t\tif ( array_key_exists( $current_type, $change_types ) ) return $change_types[ $current_type ];\r\n\r\n\t\treturn $current_type;\r\n\t}", "function update() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->updateElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function thumbwhere_contentcollectionitem_edit_form($form, &$form_state, $thumbwhere_contentcollectionitem) {\n\n // Add the default field elements.\n $form['fk_contentcollection'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollectionItem fk_contentcollection'),\n '#default_value' => isset($thumbwhere_contentcollectionitem->fk_contentcollection) ? $thumbwhere_contentcollectionitem->fk_contentcollection : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_contentcollection',\n );\n // Add the default field elements.\n $form['fk_content'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollectionItem fk_content'),\n '#default_value' => isset($thumbwhere_contentcollectionitem->fk_content) ? $thumbwhere_contentcollectionitem->fk_content : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_content',\n );\n // Add the default field elements.\n $form['weight'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollectionItem weight'),\n '#default_value' => isset($thumbwhere_contentcollectionitem->weight) ? $thumbwhere_contentcollectionitem->weight : 1,\n // '#maxlength' => 255,\n // '#required' => TRUE,\n '#weight' => -5,\n );\n\n\n\n $form['data']['#tree'] = TRUE;\n\n /*\n $form['data']['sample_data'] = array(\n '#type' => 'checkbox',\n '#title' => t('An interesting thumbwhere_contentcollectionitem switch'),\n '#default_value' => isset($thumbwhere_contentcollectionitem->data['sample_data']) ? $thumbwhere_contentcollectionitem->data['sample_data'] : 1,\n );\n */\n\n\n // Add the field related form elements.\n $form_state['thumbwhere_contentcollectionitem'] = $thumbwhere_contentcollectionitem;\n field_attach_form('thumbwhere_contentcollectionitem', $thumbwhere_contentcollectionitem, $form, $form_state);\n\n $form['actions'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('form-actions')),\n '#weight' => 400,\n );\n\n // We add the form's #submit array to this button along with the actual submit\n // handler to preserve any submit handlers added by a form callback_wrapper.\n $submit = array();\n\n if (!empty($form['#submit'])) {\n $submit += $form['#submit'];\n }\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save thumbwhere_contentcollectionitem'),\n '#submit' => $submit + array('thumbwhere_contentcollectionitem_edit_form_submit'),\n );\n\n // Do we show the delete button?\n if (!empty($thumbwhere_contentcollectionitem->pk_contentcollectionitem)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete thumbwhere_contentcollectionitem'),\n '#suffix' => l(t('Cancel'), 'admin/thumbwhere/thumbwhere_contentcollectionitems'),\n '#submit' => $submit + array('thumbwhere_contentcollectionitem_form_submit_delete'),\n '#weight' => 45,\n );\n }\n\n // We append the validate handler to #validate in case a form callback_wrapper\n // is used to add validate handlers earlier.\n $form['#validate'][] = 'thumbwhere_contentcollectionitem_edit_form_validate';\n return $form;\n}", "public function EditNodeAction() {\n\n if ($_SESSION['usuarioPortal']['IdPerfil'] == '1') {\n\n switch ($this->request['METHOD']) {\n\n case 'GET':\n\n $tipo = $this->request['3'];\n $ambito = $this->request['2'];\n $nombre = $this->request['4'];\n $columna = $this->request['5'];\n $titulo = \"Variables {$this->request['3']} de '{$columna}'\";\n\n $variables = new Variables($ambito, $tipo, $nombre);\n $variablesColumna = $variables->getColumn($columna);\n unset($variables);\n\n $archivoConfig = new Form($nombre);\n $columnasConfig = $archivoConfig->getNode('columns');\n unset($archivoConfig);\n $datos = $this->ponAtributos($variablesColumna, $columnasConfig[$columna]);\n\n $this->values['titulo'] = $titulo;\n $this->values['tipo'] = $tipo;\n $this->values['ambito'] = $ambito;\n $this->values['nombre'] = $nombre;\n $this->values['columna'] = $columna;\n $this->values['d'] = $datos;\n\n $template = $this->entity . '/formPlantillaVariables.html.twig';\n break;\n\n case 'POST':\n\n $tipo = $this->request['tipo'];\n $ambito = $this->request['ambito'];\n $nombre = $this->request['nombre'];\n $columna = $this->request['columna'];\n $titulo = \"Variables {$tipo} de '{$columna}'\";\n\n $variables = new Variables($ambito, $tipo, $nombre);\n $variables->setColumn($columna, $this->request['d']);\n $variables->save();\n\n $this->values['titulo'] = $titulo;\n $this->values['tipo'] = $tipo;\n $this->values['ambito'] = $ambito;\n $this->values['nombre'] = $nombre;\n $this->values['columna'] = $columna;\n $this->values['errores'] = $variables->getErrores();\n\n $archivoConfig = new Form($nombre);\n $columnasConfig = $archivoConfig->getNode('columns');\n unset($archivoConfig);\n $datos = $this->ponAtributos($variables->getColumn($columna), $columnasConfig[$columna]);\n $this->values['d'] = $datos;\n unset($variables);\n\n $template = $this->entity . '/formPlantillaVariables.html.twig';\n break;\n }\n } else\n $template = '_global/forbiden.html.twig';\n\n return array('template' => $template, 'values' => $this->values);\n }", "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }", "function image_gallery_admin_edit($tid = NULL) {\r\n if ((isset($_POST['op']) && $_POST['op'] == t('Delete')) || isset($_POST['confirm'])) {\r\n return drupal_get_form('image_gallery_confirm_delete_form', $tid);\r\n }\r\n\r\n if (is_numeric($tid)) {\r\n $edit = (array) taxonomy_get_term($tid);\r\n }\r\n else {\r\n $edit = array(\r\n 'name' => '',\r\n 'description' => '',\r\n 'vid' => _image_gallery_get_vid(),\r\n 'tid' => NULL,\r\n 'weight' => 0,\r\n );\r\n }\r\n return drupal_get_form('image_gallery_admin_form', $edit);\r\n}", "function edit_tree()\n\t{\n\n\t\t$tree_id = $this->EE->input->get('tree_id');\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id);\n\t\t\n\t\t$this->EE->cp->add_to_head('<link type=\"text/css\" href=\"'.$this->_theme_base_url.'css/taxonomy.css\" rel=\"stylesheet\" />');\n\n\t\t$new = $this->EE->input->get('new');\n\t\t\n\t\t$vars = array();\n\t\t\n\t\t// fetch the tree\n\t\t$this->EE->db->where_in('id', $tree_id);\n\t\t$vars['tree'] = $this->EE->db->get('taxonomy_trees')->result_array();\n\t\t\n\t\t// make sure if a tree is requested it exists\n\t\t// unless we're adding a new one that is...\n\t\tif( !$vars['tree'] && $new != 1)\n\t\t{\n\t\t\t$this->EE->session->set_flashdata( 'message_failure', lang('invalid_tree') );\n\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$vars['tree'] = (isset($vars['tree'][0])) ? $vars['tree'][0] : '';\n\t\t$vars['tree']['template_preferences'] = (isset($vars['tree']['template_preferences'])) ? explode('|', $vars['tree']['template_preferences']) : '';\n\t\t$vars['tree']['channel_preferences'] = (isset($vars['tree']['channel_preferences'])) ? explode('|', $vars['tree']['channel_preferences']) : '';\n\t\t$vars['tree']['permissions'] = (isset($vars['tree']['permissions'])) ? explode('|', $vars['tree']['permissions']) : '';\n\t\t\n\t\t$vars['tree']['fields'] = (isset($vars['tree']['fields'])) ? array_sort($this->unserialize($vars['tree']['fields']), 'order', SORT_ASC) : '';\n\t\t$vars['tree']['max_depth'] = (isset($vars['tree']['max_depth'])) ? $vars['tree']['max_depth'] : 0;\n\t\t$vars['member_groups'] = array();\n\n\t\t\n\t\t// -----------\n\t\t// Build templates, channels, and member_group select options\n\t\t// -----------\n\t\t\n\t\t\t// fetch our templates\n\t\t\t$templates = $this->EE->template_model->get_templates($this->site_id)->result_array();\n\t\t\t\n\t\t\t// must have templates!\n\t\t\tif ( !$templates )\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_failure', lang('no_templates_exist'));\n\t\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t\t}\n\t\t\t\n\t\t\t// build up our templates array for our multiselect options\n\t\t\tforeach( $templates as $template )\n\t\t\t{\n\t\t\t\t$vars['templates'][$template['template_id']] = '/'.$template['group_name'].'/'.$template['template_name'];\n\t\t\t}\n\n\t\t\t// fetch our channels\n\t\t\t$channels = $this->EE->ttree->get_channels($this->site_id);\n\t\t\t\n\t\t\t// must have channels!\n\t\t\tif (!$channels)\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_failure', $this->EE->lang->line('no_channels_exist'));\n\t\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t\t}\n\t\t\t\n\t\t\t// build our channels array for our multiselect options\n\t\t\tforeach( $channels as $channel )\n\t\t\t{\n\t\t\t\t$vars['channels'][$channel['channel_id']] = $channel['channel_title'];\n\t\t\t}\n\n\t\t\t// fetch our member_groups\n\t\t\t$member_groups = $this->EE->member_model->get_member_groups()->result_array();\n\t\t\t\n\t\t\t// build our member_groups array for our multiselect options\n\t\t\tforeach( $member_groups as $member_group )\n\t\t\t{\n\t\t\t\t// only add to the array if the member group can actuall access the taxonomy module \n\t\t\t\tif( $this->EE->ttree->can_access_taxonomy($member_group['group_id']) )\n\t\t\t\t{\n\t\t\t\t\t$vars['member_groups'][$member_group['group_id']] = $member_group['group_title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\n\t\t// -----------\n\n\t\tif($new)\n\t\t{\n\t\t\t$vars['tree']['id'] = NULL;\n\t\t\t$vars['tree']['label'] = NULL;\n\t\t\treturn $this->content_wrapper('edit_tree', 'add_tree', $vars);\n\t\t}\n\n\t\treturn $this->content_wrapper('edit_tree', 'edit_tree', $vars);\n\t\n\t}", "function ting_visual_relation_slide_form_submit($form, &$form_state) {\n $type = $form_state['values']['type'];\n $fields = array(\n 'name' => $form_state['values']['name'],\n 'type' => $type,\n );\n switch ($type) {\n case 'external':\n case 'circular':\n $fields['datawell_pid'] = $form_state['values']['datawell_pid'];\n break;\n case 'structural':\n $fields['search_query'] = $form_state['values']['search_query'];\n }\n // Determine if this is an update or insert\n $slide = isset($form_state['slide']) ? $form_state['slide'] : FALSE;\n if ($slide) {\n db_update('ting_visual_relation_slides')\n ->condition('slide_id', $slide->slide_id)\n ->fields($fields)\n ->execute();\n }\n else {\n db_insert('ting_visual_relation_slides')->fields($fields)->execute();\n }\n // Set message and go back to table overview\n drupal_set_message(t('Slide saved'));\n $form_state['redirect'] = 'admin/config/ting/ting-visual-relation/app-settings';\n}", "public function edit($type = 'about')\n {\n // we should gather any information from the tables and then send that\n // back to the view. We order by id desc because we can create new\n // type pages or edit\n $node = $this->nodeModel->nodeByType($type)->orderBy('id', 'desc')->first();\n // return view\n \n return view('admin.node_view')->with(compact('node'));\n }", "function doEdit()\n {\n $dt = new lmbDate();\n $this->dt_up = $dt->getStamp();\n\n $node_id = $this->request->getInteger('id');\n $node['node_id'] = $node_id;\n $node['title'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_TITLE);\n $node['description'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_DESCR);\n $node['identifier'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_URI);\n $node['price'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_PRICE);\n\n $this->dt_cr = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $node['date_create'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $node['date_update'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_UPDATE_DATE);\n $node['is_branch'] = TreeItem::getIsBranchByNodeId($node_id);\n\n $this->setFormDatasource($node, 'object_form');\n\n $criteria = new lmbSQLFieldCriteria('is_branch', 1);\n $criteria->addAnd('attr_id = '. TreeItem::ID_TITLE );\n $this->items = lmbActiveRecord :: find('TreeItem', $criteria);\n\n\n if($this->request->hasPost())\n {\n $this->_validateAndSave(false);\n //$this->_onAfterSave();\n }\n }", "function update_tree()\n\t{\n\t\n\t\t$data = array();\n\t\t$field_prefs = array();\n\t\t\n\t\t// get all our post data\n\t\t$data['id'] \t\t= $this->EE->input->post('id');\n\t\t$data['site_id']\t= $this->site_id;\n\t\t$data['label']\t\t= $this->EE->input->post('label');\n\t\t$data['fields'] \t= $this->EE->input->post('fields');\n\t\t$data['template_preferences'] = $this->EE->input->post('template_preferences');\n\t\t$data['channel_preferences'] = $this->EE->input->post('channel_preferences');\n\t\t$data['permissions'] = $this->EE->input->post('member_group_preferences');\n\t\t$data['max_depth'] = (int) $this->EE->input->post('max_depth');\n\t\t\n\t\t// implode posted array data\n\t\t$data['template_preferences'] = (is_array($data['template_preferences']) ? implode('|', $data['template_preferences']) : '');\n\t\t$data['channel_preferences'] = (is_array($data['channel_preferences']) ? implode('|', $data['channel_preferences']) : '');\n\t\t$data['permissions'] \t\t = (is_array($data['permissions']) ? implode('|', $data['permissions']) : '');\n\t\t\n\t\t// prep our custom field data\n\t\tif($data['fields'] && is_array($data['fields']))\n\t\t{\n\t\t\tforeach($data['fields'] as $key => $field)\n\t\t\t{\n\t\t\t\tif($field['label'] && $field['name'])\n\t\t\t\t{\n\t\t\t\t\t$field_prefs[$key] = $field;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$data['fields'] = (count($field_prefs) > 0) ? base64_encode(serialize($field_prefs)) : '';\n\n\t\t$data = $this->EE->security->xss_clean($data);\n\n\t\t// do we have an id? update...\n\t\tif( $data['id'] )\n\t\t{\n\t\t\t$this->EE->db->query($this->EE->db->update_string('exp_taxonomy_trees', $data, \"id = \".$data['id']));\n\t\t\t$this->EE->session->set_flashdata('message_success', lang('properties_updated'));\n\t\t\t$ret = ($this->EE->input->post('update_and_return')) ? $this->_base_url : $this->_base_url.AMP.'method=edit_tree'.AMP.'tree_id='.$data['id'];\n\t\t\t$this->EE->functions->redirect($ret);\t\n\t\t}\n\t\t// if not then create the new tree table\n\t\telse\n\t\t{\n\t\t\tunset($data['id']);\n\t\t\t$this->EE->db->query($this->EE->db->insert_string('exp_taxonomy_trees', $data));\n\t\t\t$tree_id = $this->EE->db->insert_id();\n\t\t\t// build our tree table\n\t\t\t$this->EE->ttree->build_tree_table($tree_id);\n\t\t\t// notify of success and redirect\n\t\t\t$this->EE->session->set_flashdata('message_success', lang('tree_added'));\n\t\t\t$ret = ($this->EE->input->post('update_and_return')) ? $this->_base_url : $this->_base_url.AMP.'method=edit_tree'.AMP.'tree_id='.$tree_id;\n\t\t\t$this->EE->functions->redirect($ret);\t\n\t\t}\n\t\n\t}", "public function updateNode($type) {\n $this->current->updateType($type);\n }", "function image_gallery_admin_form(&$form_state, $edit = array()) {\r\n $form['name'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Gallery name'),\r\n '#default_value' => $edit['name'],\r\n '#size' => 60,\r\n '#maxlength' => 64,\r\n '#description' => t('The name is used to identify the gallery.'),\r\n '#required' => TRUE,\r\n );\r\n $form['description'] = array(\r\n '#type' => 'textarea',\r\n '#title' => t('Description'),\r\n '#default_value' => $edit['description'],\r\n '#cols' => 60,\r\n '#rows' => 5,\r\n '#description' => t('The description can be used to provide more information about the image gallery.'),\r\n );\r\n $form['parent']['#tree'] = TRUE;\r\n $form['parent'][0] = _image_gallery_parent_select($edit['tid'], t('Parent'), 'forum');\r\n $form['weight'] = array(\r\n '#type' => 'weight',\r\n '#title' => t('Weight'),\r\n '#default_value' => $edit['weight'],\r\n '#delta' => 10,\r\n '#description' => t('When listing galleries, those with with light (small) weights get listed before containers with heavier (larger) weights. Galleries with equal weights are sorted alphabetically.'),\r\n );\r\n $form['vid'] = array(\r\n '#type' => 'hidden',\r\n '#value' => _image_gallery_get_vid(),\r\n );\r\n $form['submit'] = array(\r\n '#type' => 'submit',\r\n '#value' => t('Save'),\r\n );\r\n if ($edit['tid']) {\r\n $form['delete'] = array(\r\n '#type' => 'submit',\r\n '#value' => t('Delete'),\r\n );\r\n $form['tid'] = array(\r\n '#type' => 'hidden',\r\n '#value' => $edit['tid'],\r\n );\r\n }\r\n $form['#submit'][] = 'image_gallery_admin_submit';\r\n $form['#theme'][] = 'image_gallery_admin';\r\n return $form;\r\n}", "function ctools_ads_include_page_content_type_edit_form_submit($form, &$form_state) {\n foreach (array('page_name') as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n}", "public function process_post($type, $id = null){\n\t\t$action = $_POST['action'];\n\t\t\n\t\tif($action == 'cancel'){\n\t\t\turl::redirect($this->section_url);\n\t\t}\n\t\t\n\t\tif($action == 'delete'){\n\t\t\tif(Auth::instance()->logged_in('admin')){\n\t\t\t\tif($this->model->update(array($this->model->db_column_prefix.'status' => 0,$this->model->db_column_prefix.'deleted' => 1,$this->model->db_column_prefix.'deleted_date' => date('Y-m-d H:i:s')))){\n\t\t\t\t\t$this->session->set('alert',array('type' => 'success', 'message' => 'Entry deleted'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Something went wrong'));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Sorry, you don\\'t have permission to do that.'));\n\t\t\t}\n\t\t\t\n\t\t\turl::redirect($this->section_url);\n\t\t}\n\t\t\n\t\t$fields = $this->model->fields();\n\t\t\n\t\t// Remove default field values\n\t\tforeach ($fields as $key => $field){\n\t\t\tif (isset($_POST[$key]) && $field['type'] != 'select' && $field['type'] != 'radio' && $field['type'] != 'checkbox' && $_POST[$key] == $field['value']) {\n\t\t\t\t$_POST[$key] = '';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$validation = $this->model->validation();\n\t \n\t if ($validation->validate()){\n\t \t// Pull out fields we want from POST.\n\t\t\t$data = $this->model->map_post($this->input->post());\n\n\t\t\t// Format data/fields \n\t\t\t$this->model->process_fields($data);\n\t\t\t\n\t // Add or Edit\n\t if($type == 'add'){\n\t $id = $this->model->insert($data);\n\t } elseif($type == 'edit') {\n\t $this->model->update($data);\n\t }\n\t\t\t\n\t\t\t// Process files\n\t\t\t$this->process_uploaded_files($id);\n\t \n\t // Audit trace\n\t $this->audit_record('edit',$this->section_url,$id,$data);\n\t \n\t // Handle redirect and success message\n\t if($action == 'save'){\n\t $this->session->set('alert',array('type' => 'success', 'message' => 'Saved'));\n\t\t\t\t\n\t url::redirect($this->section_url);\n\t } else {\n\t $this->session->set('alert',array('type' => 'success', 'message' => 'Updated'));\n\t\t\t\t\n\t url::redirect(Kohana::config('admin.url').'/'.$this->section_url.'/edit/'.$id);\n\t }\t \n\t } else {\t \t\n\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'There are form errors'));\n\n\t \treturn array($validation,0);\n\t\t}\n\t}", "function islandora_related_content_form_islandora_related_content_form_alter(&$form, &$formstate){\n $hooks = array();\n\n // Object\n $object = islandora_object_load($formstate['islandora']['object']);\n if(array_intersect(array('fedora-system:ContentModel-3.0'), $object->models))\n {\n unset($form['Add']);\n unset($form['View']);\n }\n\n\n\n // Related CModel\n $related_cmodel_id = $formstate['islandora']['cmodel'];\n $related_cmodel_types = islandora_cmodel_types($related_cmodel_id);\n\n $rcm_count = 0;\n // Iterate through array of types and make the function safe version of them.\n foreach($related_cmodel_types as $rcm){\n $rcm_str_replaced = str_replace(array(':', '.', '-'), '_', $rcm);\n $related_cmodel_types[$rcm_count] = $rcm_str_replaced;\n\n // Hook function string.\n $hook = \"form_islandora_related_{$rcm_str_replaced}_content_form\";\n drupal_alter($hook, $form, $formstate);\n $rcm_count++;\n }\n\n $object_models = islandora_object_models($object);\n\n // Iterate through the Object's CModels, making them function safe.\n foreach($object_models as $ocm){\n $object_cmodel = str_replace(array(':', '.', '-'), '_', $ocm);\n\n drupal_alter(\"form_islandora_{$object_cmodel}_related_content_form\", $form, $formstate);\n\n foreach($related_cmodel_types as $rcm){\n $hook = \"form_islandora_{$object_cmodel}_related_{$rcm}_content_form\";\n drupal_alter($hook, $form, $formstate);\n }\n }\n}", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function theme_node_form($form) {\n $output = \"\\n<div class=\\\"node-form\\\">\\n\";\n\n // Admin form fields and submit buttons must be rendered first, because\n // they need to go to the bottom of the form, and so should not be part of\n // the catch-all call to drupal_render().\n $admin = '';\n if (isset($form['author'])) {\n $admin .= \" <div class=\\\"authored\\\">\\n\";\n $admin .= drupal_render($form['author']);\n $admin .= \" </div>\\n\";\n }\n if (isset($form['options'])) {\n $admin .= \" <div class=\\\"options\\\">\\n\";\n $admin .= drupal_render($form['options']);\n $admin .= \" </div>\\n\";\n }\n $buttons = drupal_render($form['buttons']);\n\n // Everything else gets rendered here, and is displayed before the admin form\n // field and the submit buttons.\n $output .= \" <div class=\\\"standard\\\">\\n\";\n $output .= drupal_render($form);\n $output .= \" </div>\\n\";\n\n if (!empty($admin)) {\n $output .= \" <div class=\\\"admin\\\">\\n\";\n $output .= $admin;\n $output .= \" </div>\\n\";\n }\n $output .= $buttons;\n $output .= \"</div>\\n\";\n\n return $output;\n}", "public function getEditForm();", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "public function editSettings() {\n $name = $this->schema->name();\n $form = new Fragment($name);\n\n if ($this->schema->newgroup()) { // définit dans la vue fields.php\n $form->hidden('type');\n // pour un nouveau groupe, il faut que le groupe soit créé avec le bon type\n // pour un groupe existant, inutile : on a déjà le bon type dans le schéma\n }\n\n $form->input('name')\n ->attribute('class', 'name')\n ->label(__('Nom du groupe', 'docalist-biblio'))\n ->description(__(\"Le nom du groupe doit être unique (ni un nom de champ, ni le nom d'un autre groupe).\", 'docalist-biblio'));\n\n $form->input('label')\n ->attribute('id', $name . '-label')\n ->attribute('class', 'label regular-text')\n ->label(__('Titre du groupe', 'docalist-biblio'))\n ->description(__(\"C'est le titre qui sera affiché dans la barre de titre du groupe et dans les options de l'écran de saisie. Valeur par défaut : type de la notice\", 'docalist-biblio'));\n\n $form->input('capability')\n ->attribute('id', $name . '-capability')\n ->attribute('class', 'capability regular-text')\n ->label(__('Droit requis', 'docalist-biblio'))\n ->description(__(\"Droit requis pour afficher ce groupe de champs. Ce groupe (et tous les champs qu'il contient) sera masqué si l'utilisateur ne dispose pas du droit indiqué. Si vous laissez vide, aucun test ne sera effectué.\", 'docalist-biblio'));\n\n $form->textarea('description')\n ->attribute('id', $name . '-description')\n ->attribute('class', 'description large-text')\n ->attribute('rows', 2)\n ->label(__(\"Texte d'introduction\", 'docalist-biblio'))\n ->description(__(\"Ce texte sera affiché entre la barre de titre et le premier champ du groupe. Vous pouvez utiliser cette zone pour donner des consignes de saisie ou toute autre information utile aux utilisateurs.\", 'docalist-biblio'));\n\n $form->select('state')\n ->attribute('id', $name . '-state')\n ->attribute('class', 'state')\n ->label(__(\"Etat initial du groupe\", 'docalist-biblio'))\n ->description(__(\"Dans l'écran de saisie, chaque utilisateur peut choisir comment afficher chacun des groupes : il peut replier ou déplier un groupe ou utiliser les options de l'écran de saisie pour masquer ou afficher certains groupes. Ce paramètre indique comment le groupe sera affiché initiallement (pour un nouvel utilisateur).\", 'docalist-biblio'))\n ->options([\n '' => __('Ouvert', 'docalist-biblio'),\n 'collapsed' => __('Replié', 'docalist-biblio'),\n 'hidden' => __('Masqué', 'docalist-biblio'),\n ])\n ->firstOption(false);\n\n $form->button(__('Supprimer ce groupe', 'docalist-biblio'))\n ->attribute('class', 'delete-group button right');\n\n return $form;\n }", "function lib4ridora_citation_subtype_mapping_form_submit(&$form, &$form_state) {\n foreach ($form_state['values']['settings'] as $variable => $values) {\n variable_set($variable, $values);\n }\n drupal_set_message(t('Saved mappings.'));\n}", "function editTypeOfRent($data) {\n\t\t\t$conn = $this->connect();\n\t\t\t$tOFr = $this->modify(mysqli_real_escape_string($conn, $data['tOFr']));\n\t\t\t$uid = $_SESSION['userid'];\n\t\t\t$pid = $_SESSION['pid'];\n\t\t\tif(empty($tOFr)) {\n\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[a-z ]+$/i\", $tOFr)) {\n\t\t\t\t\tif($this->length($tOFr, 25, 3)) {\n\t\t\t\t\t\t$result = $this->changepost('newpost', 'post_type_of_Rent', $tOFr, $uid , $pid);\n\t\t\t\t\t\tif($result == true) {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Successfully_Changed\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Failed!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&length=tooBigOrSmall\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&invalid=type\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function main_form($type='edit')\n\t{\n\t\t$this->ipsclass->input['id'] = intval($this->ipsclass->input['id']);\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\tif ( ! $this->ipsclass->input['id'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error(\"No custom field id was passed to edit.\");\n\t\t\t}\n\t\t\t\n\t\t\t$form_code = 'doedit';\n\t\t\t$button = 'Complete Edit';\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form_code = 'doadd';\n\t\t\t$button = 'Add Field';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get field from db\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->input['id'] )\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'downloads_cfields', 'where' => \"cf_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\t\t$fields = $this->ipsclass->DB->fetch_row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields = array();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Top 'o 'the mornin'\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title = \"Editing Custom Field \".$fields['cf_title'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title = 'Adding a new custom field';\n\t\t\t$fields['cf_title'] = '';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Wise words\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->page_detail = \"Please double check the information before submitting the form.\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Start form\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 2 => array( 'act' , 'downloads' ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 3 => array( 'id' , $this->ipsclass->input['id'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 5 => array( 'req'\t , 'customfields'\t),\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Format...\n\t\t//-----------------------------------------\n\t\t\t\t\t\t\t\t\t \n\t\t$fields['cf_content'] = $this->func->method_format_content_for_edit($fields['cf_content'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Tbl (no ae?)\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Field Settings\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field Title</b><div class='graytext'>Max characters: 200</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_title\", $fields['cf_title'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Description</b><div class='graytext'>Max Characters: 250</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_desc\", $fields['cf_desc'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t//-----------------------------------------\n\t\t// Apply to categories\n\t\t//-----------------------------------------\n\t\t\n\t\t$sel_menu = \"<select name='cats_apply[]' size='5' multiple='multiple'>\\n\";\n\t\t\n\t\t$cur \t = $this->lib->get_cats_cfield( $fields['cf_id'] );\n\t\t$opts\t = $this->lib->cat_jump_list( 1, 'none', $cur );\n\n\t\tif( is_array($opts) AND count($opts) )\n\t\t{\n\t\t\tforeach( $opts as $cdata )\n\t\t\t{\n\t\t\t\tif( is_array($cur) AND in_array( $cdata[0], $cur ) )\n\t\t\t\t{\n\t\t\t\t\t$cdata[2] = \" selected='selected'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sel_menu .= \"<option value='{$cdata[0]}'{$cdata[2]}>{$cdata[1]}</option>\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sel_menu .= \"</select>\";\n\t\t\t\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Use in Categories</b><div class='graytext'>Select the categories to use this field in</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $sel_menu\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field Type</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t $this->ipsclass->adskin->form_dropdown(\"cf_type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 0 => array( 'text' , 'Text Input' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'drop' , 'Drop Down Box' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'area' , 'Text Area' ),\n\t\t\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\t\t\t\t\t\t\t\t\t\t\t\t $fields['cf_type'] )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Maximum Input</b><div class='graytext'>For text input and text areas (in characters)</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_max_input\", $fields['cf_max_input'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Expected Input Format</b><div class='graytext'>Use: <b>a</b> for alpha characters<br />Use: <b>n</b> for numerics.<br />Example, for credit card numbers: nnnn-nnnn-nnnn-nnnn<br />Example, Date of Birth: nn-nn-nnnn<br />Leave blank to accept any input</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_input_format\", $fields['cf_input_format'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Option Content (for drop downs)</b><div class='graytext'>In sets, one set per line<br>Example for 'Software Version' field:<br>10=1.0<br>20=2.0<br>na=Not Applicable<br>Will produce:<br><select name='version'><option value='10'>1.0</option><option value='20'>2.0</option><option value='na'>Not Applicable</option></select><br>10,20, or na stored in database. When showing field on download page, will use value from pair (20=2.0, shows '2.0')</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_textarea(\"cf_content\", $fields['cf_content'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field MUST be completed and not left empty?</b><div class='graytext'>If 'yes', an error will be shown if this field is not completed.</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_not_null\", $fields['cf_not_null'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Include field in auto-generated topics?</b><div class='graytext'>Only applies to categories that automatically generate topics for file submissions</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_topic\", $fields['cf_topic'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Allow users to search in these fields?</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_search\", $fields['cf_search'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form($button);\n\t\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t\t\t\n\t}", "function update_post_type(){\n $rules = array(\n array('field'=>'name', 'label'=>'lang:post_type_name', 'rules'=>'trim|required|htmlspecialchars'),\n array('field'=>'description', 'label'=>'lang:post_type_description', 'rules'=>'trim|required|htmlspecialchars'),\n array('field'=>'avatar', 'label'=>'lang:avatar', 'rules'=>'trim|required')\n );\n $this->form_validation->set_rules($rules);\n\n /*Check if the form passed its validation */\n if ($this->form_validation->run() == FALSE) {\n $id = $this->input->post('id');\n $this->edit_post_type($id);\n }\n else{\n $id = $this->input->post('id');\n $isUpdate = $this->ad_config_model->updatePostType();\n if($isUpdate){\n redirect(base_url('admin/config/post_types'));\n }else{\n $this->edit_post_type($id);\n }\n }\n }", "function oa_widgets_add_content_edit_form($form, &$form_state) {\n $conf = $form_state['conf'];\n\n $nodes = oa_core_list_content_types();\n\n $options = array();\n foreach ($nodes as $node) {\n $options[$node->type] = check_plain($node->name);\n }\n $form['settings']['oa_widgets_types'] = array(\n '#title' => t('Enable content types'),\n '#type' => 'checkboxes',\n '#options' => $options,\n '#default_value' => isset($conf['oa_widgets_types']) ? $conf['oa_widgets_types'] : array_values($options),\n '#description' => t('Select which content types you would like to enable for this widget.'),\n );\n $form['button_class'] = array(\n '#title' => t('CSS class for links'),\n '#type' => 'textfield',\n '#default_value' => $conf['button_class'],\n '#description' => 'Enter CSS class for links, such as btn.'\n );\n $form['title_prefix'] = array(\n '#title' => t('Title Prefix'),\n '#type' => 'textfield',\n '#default_value' => $conf['title_prefix'],\n '#description' => 'Enter prefix text for link titles.'\n );\n\n return $form;\n}", "public function postAction()\n {\n if ($this->_isAdmin){\n \n // Work out the type of action they want to perform\n switch($_POST['operation']){\n case 'update':\n $data = $this->_contentTypesModel->updateContentType(unserialize(base64_decode($_POST['data'])), $_POST['argOne']);\n break;\n case 'add':\n $data = $this->_contentTypesModel->addContentType(unserialize(base64_decode($_POST['data'])));\n break;\n case 'remove':\n $data = $this->_contentTypesModel->removeContentType(unserialize(base64_decode($_POST['data'])));\n break;\n default:\n $data = 'Operation not found';\n break;\n }\n \n $this->returnPostResult($data);\n \n }else{\n $this->returnNoAuth();\n }\n\n }", "function pa_type_DEP_130707() \n\t\t\t{\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) return $this->pa();\n\t\t\t\t$this->set_var('edit_pid', $edit_pid);\n\t\t\t\t//-- der seitenpfad erscheint immer\n\t\t\t\t$this->set_var('show_path',$this->show_path($edit_pid));\n\t\t\t\t//-- vorhandene module lesen\n\t\t\t\t$mods = $this->MC->get_mods();\n\t\t\t\t//-- auslesen, fuer welche module rechte vergeben wurden\n\t\t\t\t$known_mods = $this->MC->get_page_mods($edit_pid);\n\t\t\t\t//-- seitenbaum auslesen\n\t\t\t\t$root_id = (int)$this->root_id;\n\t\t\t\t$set = new NestedSet();\n\t\t\t\t$set->set_table_name($this->mod_tbl);\n\t\t\t\t$nodes = $set->getNodes($root_id, '*', $this->DB->table_restriction($this->mod_tbl));\n\t\t\t\t$this->set_var('page_nodes', $nodes);\n\t\t\t\t$this->set_var('known_mods', $known_mods);\n\t\t\t\t$this->set_var('mod_list', $mods);\n\t\t\t\t$this->set_var('table_name', $this->mod_tbl);\n\t\t\t\t$this->set_var('title',e::o('v_title_2'));\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir . 'pa_type.php');\n\t\t\t}", "function _erpal_projects_helper_timetracking_node_form_alter(&$form, $form_state) {\n //we alter only, if the timetracking will be new created, not for existing timetrackings\n $nid = isset($form['nid']['#value']) ? $form['nid']['#value'] : false;\n if ($nid) {\n return;\n }\n \n if (isset($form['field_timetracking_subject'][LANGUAGE_NONE][0]['target_id'])) {\n $target_string = $form['field_timetracking_subject'][LANGUAGE_NONE][0]['target_id']['#default_value'];\n if (!$target_string) {\n //there must be a subject, otherwise show access denied and information to choose a task!\n drupal_set_message(t('Please select a task from you projects first to track you time.'), 'error');\n drupal_access_denied();\n exit(0);\n }\n\n //prefil the title\n $nid = _erpal_basic_helper_get_nid_from_autocomplete_string($target_string);\n $subject_node = node_load($nid);\n $default_title = _erpal_projects_helper_get_timetracking_default_title();\n $default_title = token_replace($default_title, array('subject' => $subject_node));\n $form['title']['#default_value'] = $default_title;\n\n //prefill the category\n $node = node_load($nid);\n $category_tid = _erpal_projects_helper_get_project_category($node, true);\n if ($category_tid) {\n $form['field_project_tags'][LANGUAGE_NONE]['#default_value'] = $category_tid;\n }\n }\n}", "function acquia_marina_preprocess_gradapplication_node_form(&$vars) {\r\n\tprint \"<pre>\";\r\n//\tprint_r($vars['form']['group_personal_information']['field_first_name']['0']['value']['#size']);\r\n//\tprint_r ($vars['form']['group_personal_information']['field_place_of_birth']['0']['city']);\r\n//\tprint_r ($vars['form']['group_personal_information']['field_phone_primary']);\r\n//\tprint_r($vars['form']['group_international_information']);\r\n\tprint \"</pre>\";\r\n\t\r\n\tprint \"arg1: \". arg(1). \" \";\r\n\tprint \"arg2: \". arg(2). \" \";\r\n\tprint \"arg3: \". arg(3). \" \";\r\n\tprint \"arg4: \". arg(4). \" \";\r\n\t\r\n\t//buttons\r\n\t$vars['submit'] = drupal_render($vars['form']['buttons']['submit']);\r\n\t$vars['prev'] = drupal_render($vars['form']['buttons']['previous']);\r\n\t$vars['next'] = drupal_render($vars['form']['buttons']['next']);\r\n\t$vars['preview'] = drupal_render($vars['form']['buttons']['preview']);\r\n\t$vars['delete'] = drupal_render($vars['form']['buttons']['delete']);\r\n\t$vars['save'] = drupal_render($vars['form']['buttons']['save']);\r\n\t$vars['all_buttons'] = drupal_render($vars['form']['buttons']['all']);\r\n\r\nif(arg(3) == 1) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication');\r\n\t\r\n //personal information group\t\r\n\t//$vars['personal_information_group'] = drupal_render($vars['form']['group_personal_information']);\r\n\t$vars['first_name'] = drupal_render($vars['form']['group_personal_information']['field_first_name']);\r\n\t$vars['middle_name'] = drupal_render($vars['form']['group_personal_information']['field_middle_name']);\r\n\t$vars['last_name'] = drupal_render($vars['form']['group_personal_information']['field_last_name']);\r\n\t$vars['maiden_name'] = drupal_render($vars['form']['group_personal_information']['field_maiden_name']);\r\n\t$vars['email_address'] = drupal_render($vars['form']['group_personal_information']['field_email_address']);\r\n\t$vars['date_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_dob']);\r\n\t$vars['ssn'] = drupal_render($vars['form']['group_personal_information']['field_ssn']);\r\n\t$vars['gender'] = drupal_render($vars['form']['group_personal_information']['field_gender']);\r\n \r\n //place of birth group\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['city']['#title'] = 'City of Birth';\r\n\t$vars['city_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['city']);\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['province']['#title'] = 'State or Province of Birth';\r\n\t$vars['state_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['province']);\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['country']['#title'] = 'Country of Birth';\r\n\t$vars['country_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['country']);\r\n\t$vars['form']['group_personal_information']['field_coc']['0']['country']['#title'] = 'Country of Citizenship';\r\n\t$vars['country_of_citizenship'] = drupal_render($vars['form']['group_personal_information']['field_coc']['0']['country']);\r\n\t$vars['residency_status'] = drupal_render($vars['form']['group_personal_information']['field_residency']);\r\n\t$vars['ethnic_background'] = drupal_render($vars['form']['group_personal_information']['field_ethnic']);\r\n \r\n //permanent address group\r\n\t$vars['form']['group_personal_information']['field_permanent_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['perm_street_1'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['street']);\r\n\t$vars['form']['group_personal_information']['field_permanent_address']['0']['additional']['#title'] = '';\r\n\t$vars['perm_street_2'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['additional']);\r\n\t$vars['perm_city'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['city']);\r\n\t$vars['perm_state'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['province']);\r\n\t$vars['perm_zip'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['postal_code']);\r\n\t$vars['perm_country'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['country']);\r\n \r\n //mailing address group\r\n\t$vars['form']['group_personal_information']['field_mailing_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['mail_street_1'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['street']);\r\n\t$vars['form']['group_personal_information']['field_mailing_address']['0']['additional']['#title'] = '';\r\n\t$vars['mail_street_2'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['additional']);\r\n\t$vars['mail_city'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['city']);\r\n\t$vars['mail_state'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['province']);\r\n\t$vars['mail_zip'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['postal_code']);\r\n\t$vars['mail_country'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['country']);\r\n \t\r\n //phone numbers\r\n\t$vars['phone_primary'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_primary']);\r\n\t$vars['phone_work'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_work']);\r\n\t$vars['phone_fax'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_fax']);\r\n \r\n //other information\r\n\t$vars['student_type'] = drupal_render($vars['form']['group_other_info']['field_student_type']);\r\n\t$vars['entry_date'] = drupal_render($vars['form']['group_other_info']['field_entry_date']);\r\n\t$vars['entry_year'] = drupal_render($vars['form']['group_other_info']['field_entry_date_year']);\r\n\t\r\n\t//emergency contact information\r\n $vars['emergency_first'] = drupal_render($vars['form']['group_emergency']['field_e_fname']);\r\n\t$vars['emergency_last'] = drupal_render($vars['form']['group_emergency']['field_e_lname']);\r\n\t$vars['emergency_relation'] = drupal_render($vars['form']['group_emergency']['field_e_relationship']);\r\n\t$vars['emergency_phone'] = drupal_render($vars['form']['group_emergency']['field_e_phone']);\r\n\t\r\n\t$vars['form']['group_emergency']['field_e_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['e_street_1'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['street']);\r\n\t$vars['form']['group_emergency']['field_e_address']['0']['additional']['#title'] = '';\r\n\t$vars['e_street_2'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['additional']);\r\n\t$vars['e_city'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['city']);\r\n\t$vars['e_state'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['province']);\r\n\t$vars['e_zip'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['postal_code']);\r\n\t$vars['e_country'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['country']);\r\n\t\r\n\t//language information\r\n\t$vars['language'] = drupal_render($vars['form']['group_language']['field_language']);\r\n\t$vars['english'] = drupal_render($vars['form']['group_language']['field_english']);\r\n\r\n //crime information\r\n\t$vars['crime_radio'] = drupal_render($vars['form']['group_crime_info']['field_crime_radio']);\r\n\t$vars['crime'] = drupal_render($vars['form']['group_crime_info']['field_crime']);\r\n\t$vars['crime_doi'] = drupal_render($vars['form']['group_crime_info']['field_doi']);\r\n\t$vars['crime_explanation'] = drupal_render($vars['form']['group_crime_info']['field_explination']);\r\n}\r\n\r\nif(arg(3) == 2) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication2');\r\n\t\r\n\t//international information group\r\n\t//$vars['international_group'] = drupal_render($vars['form']['group_international_information']);\r\n\t//$vars['int'] = $vars['form']['group_international_information']['field_international_dep_citz'];\r\n\t$vars['international_radio'] = drupal_render($vars['form']['group_international_information']['field_international']);\r\n\t$vars['international_time'] = drupal_render($vars['form']['group_international_information']['field_international_time_us']);\r\n\t$vars['international_degree'] = drupal_render($vars['form']['group_international_information']['field_international_plan_degree']);\r\n\t$vars['international_where'] = drupal_render($vars['form']['group_international_information']['field_international_where']);\r\n\t$vars['international_subject'] = drupal_render($vars['form']['group_international_information']['field_international_subject']);\r\n\t$vars['international_when'] = drupal_render($vars['form']['group_international_information']['field_international_when']);\r\n\t$vars['international_grad'] = drupal_render($vars['form']['group_international_information']['field_international_after_grad']);\r\n\t$vars['international_employer'] = drupal_render($vars['form']['group_international_information']['field_international_employer']);\r\n\t\r\n\t//$vars['international_location'] = drupal_render($vars['form']['group_international_information']['field_international_location']);\r\n\t$vars['international_location_name'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['name']);\r\n\t$vars['international_location_street1'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['street']);\r\n\t$vars['form']['group_international_information']['field_international_location']['0']['additional']['#title'] = '';\r\n\t$vars['international_location_street2'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['additional']);\r\n\t$vars['international_location_city'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['city']);\r\n\t$vars['international_location_state'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['province']);\r\n\t$vars['international_location_zip'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['postal_code']);\r\n\t\r\n\t$vars['international_start'] = drupal_render($vars['form']['group_international_information']['field_international_start']);\r\n\t$vars['international_dependants'] = drupal_render($vars['form']['group_international_information']['field_international_dependants']);\r\n\t$vars['international_dep_arrive'] = drupal_render($vars['form']['group_international_information']['field_international_dep_arrive']);\r\n\t$vars['international_dep_relation'] = drupal_render($vars['form']['group_international_information']['field_international_dep_relation']);\r\n\t$vars['international_dep_dob'] = drupal_render($vars['form']['group_international_information']['field_international_dep_dob']);\r\n\t$vars['form']['group_international_information']['field_international_dep_cob']['0']['country']['#title'] = t('Country of Birth');\r\n\t$vars['international_dep_cob'] = drupal_render($vars['form']['group_international_information']['field_international_dep_cob']['0']['country']);\r\n\t$vars['form']['group_international_information']['field_international_dep_citz']['0']['country'][\"#title\"] = t('Country of Citizenship');\r\n\t$vars['international_dep_citz'] = drupal_render($vars['form']['group_international_information']['field_international_dep_citz']['0']['country']);\r\n\t$vars['international_dep_fname'] = drupal_render($vars['form']['group_international_information']['field_international_e_first_name']);\r\n\t$vars['international_dep_lname'] = drupal_render($vars['form']['group_international_information']['field_international_e_last_name']);\r\n\t$vars['international_dep_street1'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['street']);\r\n\t$vars['form']['group_international_information']['field_international_e_addr']['0']['additional']['#title'] = '';\r\n\t$vars['international_dep_street2'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['additional']);\r\n\t$vars['international_dep_city'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['city']);\r\n\t$vars['international_dep_state'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['province']);\r\n\t$vars['international_dep_zip'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['postal_code']);\r\n\t$vars['form']['group_international_information']['field_international_e_addr']['0']['country']['#title'] = t('Country of Citizenship');\r\n\t$vars['international_dep_country'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['country']);\r\n}\r\n\r\nif(arg(3) == 3) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication3');\r\n\t\r\n\t//academic history group\r\n\t$vars['academic_history_group'] = drupal_render($vars['form']['group_academic_history']);\r\n\t$vars['int'] = $vars['form']['group_academic_history'];\r\n\t//$vars['applied'] = drupal_render($vars['form']['group_academic_history']['field_applied']);\r\n\t//$vars['app_date'] = drupal_render($vars['form']['group_academic_history']['field_applied_date']);\t\r\n}\r\n\r\nif(arg(3) == 4) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication4');\r\n\t\r\n}\r\n\r\nif(arg(3) == 5) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication5');\r\n\t\r\n}\r\n\r\n\t$vars['whole_form'] = drupal_render($vars['form']);\r\n\t\t//print_r ($vars['form']['group_personal_information']);\r\n\t//\t$vars['form']['group_personal_information']['field_middle_name']['0']['value']['#suffix'] = '&#60;br/&#62;';\r\n\t//\tprint_r ($vars['form']['group_personal_information']['field_first_name']['0']['value']);\r\n\t//\t$vars['form']['group_personal_information']['field_ssn']['0']['value']['#size'] = 10;\r\n}", "public function update_edit_form() {\n if ( ! $this->isValidPostType() ) {\n return false;\n }\n echo ' enctype=\"multipart/form-data\"';\n }", "function review_handler($entry, $form)\n{\n\t$post_id = $entry['post_id'];\n\tif(get_post_type($post_id) != 'bi_review')\n\t\treturn;\n\tif(! is_user_logged_in())\n\t\treturn;\n\t$post = get_post($post_id);\n\t$post->comment_status = 'open';\n\t$post->post_title = $entry[13];\n\t$post->post_status = 'pending';\n\t$post->post_parent = get_post_meta($post_id, 'post_parent', true);\n //echo \"post->parent = \" . $post->post_parent . \"<br/>\";\n\twp_update_post( get_object_vars($post) );\n}", "function osa_form_alter_group_class_node_form(&$form, &$form_state) {\r\n \r\n // hide fields that are auto populated\r\n hide($form['field_event_summary']);\r\n hide($form['body']);\r\n}", "function edit_nodes()\n\t{\n\t\t\n\t\t$tree_id = $this->EE->input->get('tree_id');\n\t\t\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id, true);\n\t\t\n\t\t$tree_settings = $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t// check this user has access to this tree\n\t\t$permissions = explode('|', $tree_settings['permissions']);\n\t\tif( !has_access_to_tree($this->EE->session->userdata['group_id'], $permissions) )\n\t\t{\n\t\t\t$this->EE->session->set_flashdata('message_failure', lang('unauthorised'));\n\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t}\n\n\t\t$root_array = $this->EE->ttree->get_root();\n\t\t\n\t\t// if we don't have a root redirect and prompt to enter one\n\t\tif( !$root_array)\n\t\t{\n\t\t\t$this->EE->functions->redirect($this->_base_url.AMP.'method=manage_node'.AMP.'tree_id='.$tree_id.AMP.'add_root=1');\n\t\t}\n\t\t\n\t\t$vars = array();\n\t\t$vars['root_insert'] = $this->EE->input->get('root_insert');\n\t\t$vars['tree_id'] = $tree_id;\n\t\t$vars['update_action'] = $this->_form_base_url.AMP.'method=reorder_nodes'.AMP.'tree_id='.$tree_id;\n\t\t$vars['last_updated'] = $tree_settings['last_updated'];\n\t\t$vars['title_extra'] = $tree_settings['label'];\n\t\t$vars['max_depth'] = (int) $tree_settings['max_depth'];\n\t\t\n\t\t$tree_array = $this->EE->ttree->get_tree_array($tree_id);\n\t\t\n\t\t$vars['taxonomy_list'] = $this->EE->ttree->build_cp_list($tree_array);\n\t\t\n\t\treturn $this->content_wrapper('edit_nodes', 'edit_nodes', $vars);\n\n\t}", "function ctools_term_parent_settings_form($conf) {\n $form['type'] = array(\n '#type' => 'select',\n '#title' => t('Relationship type'),\n '#options' => array('parent' => t('Immediate parent'), 'top' => t('Top level term')),\n '#default_value' => $conf['type'],\n );\n\n return $form;\n}", "public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }", "function upitt_islandora_findingaids_relationships_admin_form_submit(array $form, array &$form_state) {\n drupal_set_message(t('The settings have been updated!'));\n $id = $form_state['triggering_element']['#id'];\n switch ($id) {\n case 'edit-submit':\n variable_set('upitt_islandora_findingaids_relationships_namespace_prefix', $form_state['values']['namespace_prefix']);\n break;\n\n case 'edit-reset':\n variable_del('upitt_islandora_findingaids_relationships_namespace_prefix');\n break;\n }\n}", "protected function handlePageEditing() {}", "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 edit(Type $type)\n {\n //\n }" ]
[ "0.75606555", "0.72743845", "0.71291107", "0.6928399", "0.68131834", "0.668602", "0.662143", "0.65089715", "0.6425825", "0.6371721", "0.63688594", "0.6361926", "0.6356016", "0.62655133", "0.6153967", "0.6112404", "0.5997931", "0.59577876", "0.5949831", "0.59267294", "0.5896008", "0.58660424", "0.5838378", "0.5823254", "0.58143425", "0.5812541", "0.5809478", "0.58014643", "0.58004725", "0.5777057", "0.5757714", "0.57492805", "0.57329357", "0.57251287", "0.5718741", "0.57029897", "0.56922644", "0.56845677", "0.5643493", "0.56434536", "0.5632761", "0.5621252", "0.55758446", "0.5566783", "0.5563443", "0.556249", "0.55507815", "0.5544348", "0.5541995", "0.55262613", "0.55212873", "0.5519202", "0.5509481", "0.55045456", "0.550196", "0.5495335", "0.54948163", "0.54911405", "0.54875267", "0.5486654", "0.5467471", "0.5463093", "0.54622805", "0.5461781", "0.546052", "0.5454838", "0.54369235", "0.54299587", "0.5418231", "0.54153925", "0.5403423", "0.53752506", "0.5369356", "0.5349222", "0.534885", "0.5346866", "0.53359807", "0.53300905", "0.53215116", "0.5314071", "0.52991486", "0.5291341", "0.5290567", "0.5279996", "0.5279957", "0.52782077", "0.52752674", "0.52708286", "0.5268483", "0.5253824", "0.5248083", "0.5247657", "0.52466244", "0.5246409", "0.5244998", "0.52444243", "0.5243701", "0.5238987", "0.5226559", "0.522348" ]
0.72839963
1
Form constructor for deleting entity types.
function mongo_node_type_delete_form($form, $form_state, $entity_type) { $form = array(); // Send entity type. $form['entity_type'] = array( '#type' => 'value', '#value' => $entity_type, ); $path = '/admin/structure/mongo-node'; $extist_entity_content = ''; $collection = mongodb_collection('fields_current', $entity_type); $count = $collection->count(array('_type' => $entity_type)); if ($count) { $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count)); $extist_entity_content .= '<br/><br/>'; } return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "public function __construct() {\n\t\t\t$this->field_type = 'select-edit-delete';\n\n\t\t\tparent::__construct();\n\t\t}", "private function createDeleteForm(Types $type)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('types_delete', array('id' => $type->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function travel_type_form_submit_delete(&$form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity type.\n $form_state['redirect'] = 'admin/structure/travel/' . $form_state['travel_type']->type . '/delete';\n}", "function travel_type_form_delete_confirm($form, &$form_state, $entity_type) {\n // Store the entity in the form.\n $form_state['entity_type'] = $entity_type;\n\n // Show confirm dialog.\n $message = t('Are you sure you want to delete entity type %title?', array('%title' => entity_label('entity_type', $entity_type)));\n return confirm_form(\n $form,\n $message,\n 'travel/' . entity_id('travel_type', $entity_type),\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "public function Delete($entity) {\n }", "private function createDeleteForm(DictType $dictType)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dicttype_delete', array('id' => $dictType->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "function multisite_aggregate_type_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/structure/multisite_aggregate_types/manage/' . $form_state['multisite_aggregate_type']->type . '/delete';\n}", "public function delete($entity)\n {\n \n }", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fanli_Service_Ptype::getType($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Fanli_Service_Ptype::deleteType($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "public function delete(DataObject $entity){\n }", "private function createDeleteForm(TypeDePokemons $typeDePokemon)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('typedepokemons_delete', array('id' => $typeDePokemon->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function travel_type_form_delete_confirm_submit($form, &$form_state) {\n // Delete the entity type.\n $entity_type = $form_state['entity_type'];\n entity_delete('travel_type', entity_id('travel_type', $entity_type));\n\n // Redirect user.\n drupal_set_message(t('@type %title has been deleted.', array('@type' => $entity_type->type, '%title' => $entity_type->label)));\n $form_state['redirect'] = 'admin/structure/travel';\n}", "private function createDeleteForm(Tipoanuncio $tipoanuncio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipoanuncio_delete', array('id' => $tipoanuncio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(TypeProduct $typeProduct)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('type_product_delete', array('id' => $typeProduct->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function delete($entity);", "public function postDelete($type)\n {\n // Declare the rules for the form validation\n $rules = array(\n 'id' => 'required|integer'\n );\n\n // Validate the inputs\n $validator = Validator::make(Input::all(), $rules);\n\n // Check if the form validates with success\n if ($validator->passes())\n {\n $id = $type->id;\n $type->delete();\n\n // Was the type post deleted?\n $type = Type::find($id);\n if(empty($type))\n {\n // Redirect to the type posts management page\n return Redirect::to('admin/successful-delete')->with('success', Lang::get('admin/types/messages.delete.success'));\n }\n }\n // There was a problem deleting the type post\n return Redirect::to('admin/types/' . $id . '/delete')->with('error', Lang::get('admin/types/messages.delete.error'));\n }", "private function createDeleteForm(JobType $jobType) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_jmp_job_type_delete', array('id' => $jobType->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleting($educationType)\n {\n\t\tparent::deleting($educationType);\n\n }", "public function testLineItemTypeDeletion() {\n $values = [\n 'id' => strtolower($this->randomMachineName(8)),\n 'label' => $this->randomMachineName(16),\n 'purchasableEntityType' => 'commerce_product_variation',\n 'orderType' => 'default',\n ];\n $line_item_type = $this->createEntity('commerce_line_item_type', $values);\n\n $this->drupalGet($line_item_type->toUrl('delete-form'));\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextContains(t('This action cannot be undone.'));\n $this->submitForm([], t('Delete'));\n $line_item_type_exists = (bool) LineItemType::load($line_item_type->id());\n $this->assertFalse($line_item_type_exists, 'The line item type has been deleted form the database.');\n }", "public function deleteAction() {\n \n }", "private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "abstract function performDelete(Form $arg0);", "public function newDelete()\n {\n return $this->newInstance('Delete');\n }", "private function createDeleteForm(TypeCharge $typeCharge)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('typecharge_delete', array('id' => $typeCharge->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function __construct( $form_type, $args )\n {\n parent::__construct( $form_type.'_form', $args );\n $this->form_type = $form_type;\n \n $this->add_column( 'id', 'number', 'ID', true );\n $this->add_column( 'date', 'date', 'Date Added', true );\n $this->add_column( 'typist_1', 'string', 'Typist 1', false );\n $this->add_column( 'typist_1_submitted', 'boolean', 'Submitted', false );\n $this->add_column( 'typist_2', 'string', 'Typist 2', false );\n $this->add_column( 'typist_2_submitted', 'boolean', 'Submitted', false );\n $this->add_column( 'conflict', 'boolean', 'Conflict', false );\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_objecttype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Entreprise $entreprise)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $entreprise->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function travel_form_submit_delete($form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity.\n $entity = $form_state['entity'];\n $entity_uri = entity_uri('travel', $entity);\n $form_state['redirect'] = $entity_uri['path'] . '/delete';\n}", "function travel_type_form($form, &$form_state, $entity_type, $op = 'edit') {\n // Handle the case when cloning is performed.\n if ($op == 'clone') {\n $entity_type->label .= ' (cloned)';\n $entity_type->type = '';\n }\n\n // Describe all properties of the entity which shall be shown on the form.\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $entity_type->label,\n '#description' => t('The human-readable name of this entity type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($entity_type->type) ? $entity_type->type : '',\n '#maxlength' => 32,\n //'#disabled' => $entity_type->isLocked() && $op != 'clone',\n '#machine_name' => array(\n 'exists' => 'travel_type_load_multiple',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this entity type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n $form['description'] = array(\n '#type' => 'textarea',\n '#default_value' => isset($entity_type->description) ? $entity_type->description : '',\n '#description' => t('Description about the entity type.'),\n );\n\n // Add some buttons.\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save entity type'),\n '#weight' => 40,\n );\n //if (!$entity_type->isLocked() && $op != 'add' && $op != 'clone') {\n $entity_id = entity_id('travel', $entity);\n if (!empty($entity_id)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete entity type'),\n '#weight' => 45,\n '#limit_validation_errors' => array(),\n '#submit' => array('travel_type_form_submit_delete'),\n );\n }\n\n return $form;\n}", "private function createDeleteForm(Entrepot $entrepot)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entrepot_delete', array('idEntrepot' => $entrepot->getIdentrepot())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction()\n {\n if ($this->request->isPost()) {\n $ids = $this->request->getPost('ids');\n\n ZArrayHelper::toInteger($ids);\n\n foreach ($ids as $id) {\n /**\n * @var MenuTypes $menu_type\n */\n $menu_type = MenuTypes::findFirst($id);\n /**\n * @var MenuDetails[] $menu_details\n */\n $menu_details = MenuDetails::find([\n 'menu_type_id = ?0',\n 'bind' => [$id]\n ]);\n foreach ($menu_details as $detail) {\n $detail->delete();\n }\n if ($menu_type->delete()) {\n $this->flashSession->success($menu_type->name . ' deleted successful');\n\n } else {\n $this->flashSession->error($menu_type->name . ' deleted fail');\n }\n }\n }\n return $this->response->redirect('/admin/menu/');\n }", "private function createDeleteForm(Indicateur $indicateur) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('indicateur_delete', array('id' => $indicateur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function timetracking_type_delete(timetrackingType $type) {\n $type->delete();\n}", "private function createDeleteForm(Clasificaciontg $clasificaciontg)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('clasificaciontg_delete', array('id' => $clasificaciontg->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function __construct(\\Library\\Entity $entity){\n\t\t$this->setForm(new Form\\Form($entity));\n\t}", "private function createDeleteForm(Acte $acte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acte_delete', array('id' => $acte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function travel_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('travel', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('travel', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "private function createDeleteForm(SvCfgDisenio $SvCfgDisenio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Svcfgdisenio_delete', array('id' => $SvCfgDisenio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function __construct($type, $name)\r\n\t{\r\n\t\t$this->_drop_type = $type;\r\n\t\t\r\n\t\t// Set the object we're going to drop.\r\n\t\t$this->_name = $name;\r\n\t\t\r\n\t\t// Because mummy says so.\r\n\t\tparent::__construct(Database::DROP, '');\r\n\t}", "public function delete($entity_type, $entity_bundle, $entity_display) {\n $config = $this->configFactory->getEditable('alinks.settings');\n $displays = array_values(array_filter($config->get('displays'), function ($display) use ($entity_type, $entity_bundle, $entity_display) {\n return !($display['entity_type'] == $entity_type && $display['entity_bundle'] == $entity_bundle && $display['entity_display'] == $entity_display);\n }));\n $config->set('displays', $displays)->save();\n return new RedirectResponse(Url::fromRoute('alink_keyword.settings')->setAbsolute()->toString());\n }", "function calendar_display_type_delete() {\n\t\t$db = new DB ;\n\t\tif(isset($_GET['id']) > 0)\n\t\t{\n\t\t\t// update all events who use this event_type we set the event_type to 'other'.\n\t\t\t// if we don't do this, the events who use this event_type can't be edited anymore.\n\t\t\t$result = $this->set_types_to_other($_GET['id']);\n\n\t\t\t// delete the event_type\n\t\t\t$sql = \"delete from event_type where event_type_id = \".$_GET['id'];\n\t\t\t$db->execute_statement($sql);\n\n\t\t\tinclude_once(SF_CLASS_PATH.'/calendar/calendar.inc');\n $calendar_obj = new Calendar ;\n $calendar_obj->cache_event_type_array();\n\t\t\t\t\t\t\t\n\t\t}\n\t\theader('Location: /admin/calendar/display_type_list.php');\n }", "public function deleteAction()\n {\n \n }", "public function deleteEntityType($entityTypeId)\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->urlSegment($entityTypeId)\n ->delete()\n ->go();\n }", "public function delete($placeType){\n }", "private function createDeleteForm(TranslationBuyerType $translationBuyerType)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('translationbuyertype_delete', array('id' => $translationBuyerType->getId())))\n\t\t\t->setMethod('DELETE')\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Orden $orden)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orden_delete', array('id' => $orden->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function actionDelete() {}", "public function actionDelete() {}", "public function save_trash_delete_form() {\n\t\t// Handled in the process_bulk_actions() function in includes/class-forms-list.php\n\t}", "public function deleted(ClaseType $clases_type)\n {\n // $clases_type->blocks()->delete();\n }", "private function createDeleteForm(Torniquete $torniquete)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('torniquete_delete', array('id' => $torniquete->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function bat_event_type_form_submit_delete(&$form, &$form_state) {\n $destination = array();\n if (isset($_GET['destination'])) {\n $destination = drupal_get_destination();\n unset($_GET['destination']);\n }\n\n $form_state['redirect'] = array('admin/bat/events/event_types/manage/' . $form_state['bat_event_type']->type . '/delete', array('query' => $destination));\n}", "private function createDeleteForm(LoteInsumo $loteInsumo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('loteinsumo_delete', array('id' => $loteInsumo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction()\n {\n }", "public function deleteFormAction($id) {\n $form = $this->createDeleteForm($id);\n $entity = $this->getItem($id);\n\n return array(\n 'form' => $form->createView(),\n 'order' => $this->getOrder(),\n 'entity' => $this->getOrder()\n );\n }", "private function createDeleteForm( $entityName, $instance)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entity_delete',\n [\n 'entityName' => $entityName,\n 'id' => $instance->getId()\n ]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Estadosciviles $estadoscivile)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estadosciviles_delete', array('idEstadocivil' => $estadoscivile->getIdestadocivil())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function remove()\n {\n $arg = func_get_args();\n\n foreach ($this->group as $form) {\n if (! is_object($form)) {\n $form = new $form();\n }\n\n if (method_exists($form, 'delete')) {\n $form->delete(...$arg);\n }\n }\n }", "private function createDeleteForm(Etablissements $etablissement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etablissements_delete', array('id' => $etablissement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Team $entity)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('app_team_delete', array('id' => $entity->getId())))\r\n ->setMethod('DELETE')\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(CtlTipoEmpleo $ctlTipoEmpleo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ctltipoempleo_delete', array('id' => $ctlTipoEmpleo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function mongo_node_mass_delete($entity_type, $entities) {\n entity_delete_multiple($entity_type, $entities);\n}", "function kala_revision_batch_delete_form() {\n // Initialize Vars.\n $form = array();\n\n // Date text field.\n $form['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Delete nodes revisions before this time.'),\n '#description' => t('Enter as a -1 day, 1-year, etc. Defaults to -90 days.'),\n '#default_value' => t('-90 days'),\n '#required' => TRUE,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Delete These Revisions!'),\n '#submit' => array('kala_revision_batch_delete_form_submit'),\n );\n\n return $form;\n}", "public function delete() :db\n \t{\n \t\t$this->queryType = \"delete\";\n \t\treturn $this;\n \t}", "public function clean( $entity, $name, $type=null )\n {\n if( !$type ) $type = EntityAbstract::_ID_TYPE_VIRTUAL;\n $entity = $this->cm->getEntityShortNameFromClass( $entity );\n $cena = $this->cm->cena;\n if( !isset( $this->source[ $cena ] ) ) return $this;\n if( !isset( $this->source[ $cena ][ $entity ] ) ) return $this;\n if( !isset( $this->source[ $cena ][ $entity ][ $type ] ) ) return $this;\n foreach( $this->source[ $cena ][ $entity ][ $type ] as $id => $data ) {\n if( !isset( $data[ 'prop' ][ $name ] ) || empty( $data[ 'prop' ][ $name ] ) ) {\n unset( $this->source[ $cena ][ $entity ][ $type ][ $id ] );\n }\n }\n if( empty( $this->source[ $cena ][ $entity ][ $type ] ) ) {\n unset( $this->source[ $cena ][ $entity ][ $type ] );\n }\n return $this;\n }", "public function actionDelete($id,$type)\n {\n if($type=='dept'){\n $model=$this->findModel($id);\n $model->setAttribute('dept_delete',1);\n $model->save(false);\n }else{\n $model=$this->findModel($id);\n $model->setAttribute('branch_delete',1);\n $model->save(false);\n }\n\n return $this->redirect(['index']);\n }", "public function testLineItemTypeDeletion() {\n $values = [\n 'id' => strtolower($this->randomMachineName(8)),\n 'label' => $this->randomMachineName(16),\n 'purchasableEntityType' => 'commerce_product_variation',\n 'orderType' => 'default',\n ];\n $lineItemType = $this->createEntity('commerce_line_item_type', $values);\n\n $this->drupalGet('admin/commerce/config/line-item-types/' . $lineItemType->id() . '/delete');\n $this->assertResponse(200, 'line item type delete form can be accessed at admin/commerce/config/line-item-types/'. $lineItemType->id() . '/delete.');\n $this->assertText(t('This action cannot be undone.'), 'The line item type deletion confirmation form is available');\n $this->drupalPostForm(NULL, NULL, t('Delete'));\n $lineItemTypeExists = (bool) LineItemType::load($lineItemType->id());\n $this->assertFalse($lineItemTypeExists, 'The line item type has been deleted form the database.');\n }", "private function createDeleteForm(Personnage $personnage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnage_delete', array('id' => $personnage->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(BulletinSoin $bulletinSoin)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bs_delete', array('id' => $bulletinSoin->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private\n function createAnnonceeDeleteForm(Annonce $annonce)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annoncee_delete', array('id' => $annonce->getAnnonceId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "function form_init_data($action = FT_ACTION_DELETE)\r\n {\r\n parent::form_init_data($action) ;\r\n }", "private function createDeleteForm(Nomenclature $nomenclature)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_delete', array('id' => $nomenclature->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(TMajor $tMajor)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tmajor_delete', array('id' => $tMajor->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Situation $situation)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('situation_delete', array('id' => $situation->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public static function deleteEntities($entity_type, $min_entity_id) {\n $query = new \\EntityFieldQuery();\n $results = $query->entityCondition('entity_type', $entity_type)\n ->entityCondition('entity_id', $min_entity_id, '>')\n ->execute();\n if (isset($results[$entity_type])) {\n $entity_ids = array_keys($results[$entity_type]);\n\n $info = entity_get_info($entity_type);\n if (isset($info['deletion callback'])) {\n foreach ($entity_ids as $id) {\n $info['deletion callback']($id);\n }\n }\n elseif (in_array(\n 'EntityAPIControllerInterface',\n class_implements($info['controller class'])\n )) {\n entity_get_controller($entity_type)->delete($entity_ids);\n }\n else {\n if ($entity_type == 'node') {\n node_delete_multiple($entity_ids);\n }\n elseif ($entity_type == 'user') {\n user_delete_multiple($entity_ids);\n }\n elseif ($entity_type == 'taxonomy_term') {\n foreach ($entity_ids as $entity_id) {\n taxonomy_term_delete($entity_id);\n }\n }\n elseif ($entity_type == 'comment') {\n foreach ($entity_ids as $entity_id) {\n comment_delete($entity_id);\n }\n }\n\n return FALSE;\n }\n }\n }", "protected function createComponentDeleteRate()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteRateSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function createDeleteForm(Tipocaso $tipocaso)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipocaso_delete', array('idTipo' => $tipocaso->getIdtipo())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Tblyear $tblyear)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tblyear_delete', array('id' => $tblyear->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(FormType $form_type)\n {\n $form_type->delete();\n\n return response()->json([\n 'status' => 'success'\n ]);\n }", "private function createDeleteForm(Eventos $evento)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventos_delete', array('id' => $evento->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(PhpposPeople $phpposPerson)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('phppospeople_delete', array('id' => $phpposPerson->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(TypesConges $typesConges)\n {\n //\n }", "protected static function deleteEntity(\\ElggEntity $entity) {\n\n\t\tif (!$entity->getPrivateSetting(ELASTICSEARCH_INDEXED_NAME)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$client = elasticsearch_get_client();\n\t\tif (empty($client)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\telasticsearch_add_document_for_deletion($entity->getGUID(), [\n\t\t\t'_index' => $client->getIndex(),\n\t\t\t'_type' => $client->getDocumentTypeFromEntity($entity),\n\t\t\t'_id' => $entity->getGUID(),\n\t\t]);\n\t}", "private function createDeleteForm(Etat_civil $etat_civil)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etat_civil_delete', array('id' => $etat_civil->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Personas $persona)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personas_delete', array('id' => $persona->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function forum_delete($info, $itemtype) {\n $object->id = $info;\n $object->itemtype = $itemtype;\n return $object;\n}", "private function createDeleteForm(Proeflessen $proeflessen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_proeflessen_delete', array('id' => $proeflessen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Complect $complect)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_complect_delete', array('id' => $complect->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function delete()\r\n {\r\n $sub_categories =& eZCompanyType::getByParentID( $this->ID );\r\n foreach ( $sub_categories as $category )\r\n {\r\n $category->delete();\r\n }\r\n $top_category = new eZCompanyType( 0 );\r\n $companies =& eZCompany::getByCategory( $this->ID );\r\n foreach ( $companies as $company )\r\n {\r\n $company->removeCategories();\r\n $top_category->addCompany( $company );\r\n }\r\n $db =& eZDB::globalDatabase();\r\n $db->begin();\r\n $res[] = $db->query( \"DELETE FROM eZContact_CompanyType WHERE ID='$this->ID'\" );\r\n eZDB::finish( $res, $db );\r\n }", "public function deleteByIdType($id, $type);", "public function delete()\n {\n $textvalues = $this->gettextvalues();\n $this->deleteValues($textvalues);\n \n $componentvalues = $this->getcomponentvalues();\n $this->deleteValues($componentvalues);\n \n $filevalues = $this->getfilevalues();\n $this->deleteValues($filevalues);\n \n $contributorvalues = $this->getcontributorvalues();\n $this->deleteValues($contributorvalues);\n \n parent::delete();\n }" ]
[ "0.6472056", "0.6468265", "0.6308098", "0.6305742", "0.6122077", "0.60757643", "0.5991428", "0.58580947", "0.58278126", "0.582059", "0.5791579", "0.57691324", "0.57279426", "0.57035005", "0.5696368", "0.5626221", "0.56165195", "0.561625", "0.5605363", "0.5584769", "0.5582737", "0.55499464", "0.55192906", "0.5494267", "0.5493179", "0.5466169", "0.54638124", "0.54334587", "0.5429448", "0.54283977", "0.540789", "0.5395204", "0.53860676", "0.5380833", "0.53785735", "0.53667986", "0.5363779", "0.5352562", "0.5350761", "0.5348267", "0.53444195", "0.5338291", "0.53372824", "0.53333807", "0.53230524", "0.5309018", "0.5307832", "0.53062946", "0.5302463", "0.53024095", "0.52955574", "0.5294435", "0.5284612", "0.5283729", "0.52836096", "0.52777696", "0.52777696", "0.5265313", "0.5247565", "0.52460253", "0.52386314", "0.5232097", "0.522732", "0.522681", "0.52207017", "0.5219463", "0.521796", "0.5215012", "0.5211822", "0.5208249", "0.5194837", "0.5194683", "0.5191688", "0.5191101", "0.5190085", "0.5189579", "0.5185256", "0.51844203", "0.51839393", "0.51811624", "0.516975", "0.51666456", "0.5166079", "0.51644826", "0.5161893", "0.5161663", "0.51602435", "0.5159036", "0.5158462", "0.5155461", "0.5154737", "0.51490843", "0.51458454", "0.5145081", "0.51441896", "0.5142556", "0.513737", "0.51372355", "0.51353765", "0.5133852" ]
0.66571033
0
Form submission handler for mongo_node_type_delete_form().
function mongo_node_type_delete_form_submit($form, $form_state) { $set = mongo_node_settings(); // Remove entity type. $entity_type = $form_state['values']['entity_type']; unset($set[$entity_type]); // Drop collection that stores entities for entity type. $collection = mongodb_collection('fields_current', $entity_type); $collection->drop(); // Drop collection that stores entity types autoincrement ids. $collection = mongodb_collection($entity_type . '_ids'); $collection->drop(); mongo_node_settings_save($set); // Redirect to entity type admin. drupal_goto('admin/structure/mongo-node'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n drupal_set_message(t('@label %title deleted',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title)\n )\n );\n }\n\n $form_state['redirect'] = '<front>';\n}", "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "public function deleteSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id)->delete();\n }", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "function node_form_delete_submit($form, &$form_state) {\n $destination = '';\n if (isset($_REQUEST['destination'])) {\n $destination = drupal_get_destination();\n unset($_REQUEST['destination']);\n }\n $node = $form['#node'];\n $form_state['redirect'] = array('node/'. $node->nid .'/delete', $destination);\n}", "function multisite_aggregate_type_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/structure/multisite_aggregate_types/manage/' . $form_state['multisite_aggregate_type']->type . '/delete';\n}", "function travel_type_form_submit_delete(&$form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity type.\n $form_state['redirect'] = 'admin/structure/travel/' . $form_state['travel_type']->type . '/delete';\n}", "function bat_event_type_form_submit_delete(&$form, &$form_state) {\n $destination = array();\n if (isset($_GET['destination'])) {\n $destination = drupal_get_destination();\n unset($_GET['destination']);\n }\n\n $form_state['redirect'] = array('admin/bat/events/event_types/manage/' . $form_state['bat_event_type']->type . '/delete', array('query' => $destination));\n}", "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "public function postDelete($type)\n {\n // Declare the rules for the form validation\n $rules = array(\n 'id' => 'required|integer'\n );\n\n // Validate the inputs\n $validator = Validator::make(Input::all(), $rules);\n\n // Check if the form validates with success\n if ($validator->passes())\n {\n $id = $type->id;\n $type->delete();\n\n // Was the type post deleted?\n $type = Type::find($id);\n if(empty($type))\n {\n // Redirect to the type posts management page\n return Redirect::to('admin/successful-delete')->with('success', Lang::get('admin/types/messages.delete.success'));\n }\n }\n // There was a problem deleting the type post\n return Redirect::to('admin/types/' . $id . '/delete')->with('error', Lang::get('admin/types/messages.delete.error'));\n }", "function thumbwhere_contentcollection_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollections/thumbwhere_contentcollection/' . $form_state['thumbwhere_contentcollection']->pk_contentcollection . '/delete';\n}", "function kala_revision_batch_delete_form() {\n // Initialize Vars.\n $form = array();\n\n // Date text field.\n $form['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Delete nodes revisions before this time.'),\n '#description' => t('Enter as a -1 day, 1-year, etc. Defaults to -90 days.'),\n '#default_value' => t('-90 days'),\n '#required' => TRUE,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Delete These Revisions!'),\n '#submit' => array('kala_revision_batch_delete_form_submit'),\n );\n\n return $form;\n}", "public function post_delete(){\n\t\t\t\n\t\t$data \t= \tFiledb::_rawurldecode(json_decode(stripcslashes(Input::get('data')), true));\n\n\t\tif($data[\"delete\"] == 'delete'){\n\t\t\t\n\t\t\t$status = Users::delete($data[\"id\"]);\n\n\t\t\treturn ($status) ? Utilites::success_message(__('forms.deleted_word')) : Utilites::fail_message(__('forms_errors.undefined'));\n\t\t}\n\t}", "function thumbwhere_contentcollectionitem_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollectionitems/thumbwhere_contentcollectionitem/' . $form_state['thumbwhere_contentcollectionitem']->pk_contentcollectionitem . '/delete';\n}", "public function ajax_delete_field() {\n\t\tglobal $wpdb;\n\n\t\tif ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'visual_form_builder_delete_field' ) {\n\t\t\t$form_id = absint( $_REQUEST['form'] );\n\t\t\t$field_id = absint( $_REQUEST['field'] );\n\n\t\t\tcheck_ajax_referer( 'delete-field-' . $form_id, 'nonce' );\n\n\t\t\tif ( isset( $_REQUEST['child_ids'] ) ) {\n\t\t\t\tforeach ( $_REQUEST['child_ids'] as $children ) {\n\t\t\t\t\t$parent = absint( $_REQUEST['parent_id'] );\n\n\t\t\t\t\t// Update each child item with the new parent ID\n\t\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_parent' => $parent ), array( 'field_id' => $children ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Delete the field\n\t\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM $this->field_table_name WHERE field_id = %d\", $field_id ) );\n\t\t}\n\n\t\tdie(1);\n\t}", "function node_delete_confirm(&$form_state, $node) {\n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $node->nid,\n );\n\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $node->title)),\n isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "abstract function performDelete(Form $arg0);", "function delete() {\n\n $document = Doctrine::getTable('DocDocument')->find($this->input->post('doc_document_id'));\n $node = Doctrine::getTable('Node')->find($document->node_id);\n\n if ($document && $document->delete()) {\n//echo '{\"success\": true}';\n\n $this->syslog->register('delete_document', array(\n $document->doc_document_filename,\n $node->getPath()\n )); // registering log\n\n $success = 'true';\n $msg = $this->translateTag('General', 'operation_successful');\n } else {\n//echo '{\"success\": false}';\n $success = 'false';\n $msg = $e->getMessage();\n }\n\n $json_data = $this->json->encode(array('success' => $success, 'msg' => $msg));\n echo $json_data;\n }", "function travel_type_form_delete_confirm_submit($form, &$form_state) {\n // Delete the entity type.\n $entity_type = $form_state['entity_type'];\n entity_delete('travel_type', entity_id('travel_type', $entity_type));\n\n // Redirect user.\n drupal_set_message(t('@type %title has been deleted.', array('@type' => $entity_type->type, '%title' => $entity_type->label)));\n $form_state['redirect'] = 'admin/structure/travel';\n}", "function thumbwhere_contentcollection_delete_form_wrapper($thumbwhere_contentcollection) {\n // Add the breadcrumb for the form's location.\n //thumbwhere_contentcollection_set_breadcrumb();\n return drupal_get_form('thumbwhere_contentcollection_delete_form', $thumbwhere_contentcollection);\n}", "function thumbwhere_contentcollection_delete_form_submit($form, &$form_state) {\n $thumbwhere_contentcollection = $form_state['thumbwhere_contentcollection'];\n\n thumbwhere_contentcollection_delete($thumbwhere_contentcollection);\n\n drupal_set_message(t('The thumbwhere_contentcollection %name has been deleted.', array('%name' => $thumbwhere_contentcollection->title)));\n watchdog('thumbwhere_contentcollection', 'Deleted thumbwhere_contentcollection %name.', array('%name' => $thumbwhere_contentcollection->title));\n\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollections';\n}", "function access_scheme_form_delete_submit($form, &$form_state) {\n if (isset($_GET['destination'])) {\n drupal_get_destination();\n unset($_GET['destination']);\n }\n $scheme = $form_state['scheme'];\n $form_state['redirect'] = 'admin/structure/access/' . str_replace('_', '-', $scheme->machine_name) . '/delete';\n}", "public function ajax_delete_field() {\n global $wpdb;\n\n if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'swpm_form_builder_delete_field') {\n $form_id = absint($_REQUEST['form']);\n $field_id = absint($_REQUEST['field']);\n\n check_ajax_referer('delete-field-' . $form_id, 'nonce');\n\n $field_key = $wpdb->get_var($wpdb->prepare(\"SELECT field_key FROM $this->field_table_name WHERE field_id=%d\", $field_id));\n if (SwpmFbUtils::is_mandatory_field($field_key)) {\n die('0'); // don't delete required fields\n }\n if (isset($_REQUEST['child_ids'])) {\n foreach ($_REQUEST['child_ids'] as $children) {\n $parent = absint($_REQUEST['parent_id']);\n\n // Update each child item with the new parent ID\n $wpdb->update($this->field_table_name, array('field_parent' => $parent), array('field_id' => $children));\n }\n }\n\n // Delete the field\n $wpdb->query($wpdb->prepare(\"DELETE FROM $this->field_table_name WHERE field_id = %d\", $field_id));\n }\n\n die(1);\n }", "function thumbwhere_contentcollectionitem_delete_form_wrapper($thumbwhere_contentcollectionitem) {\n // Add the breadcrumb for the form's location.\n //thumbwhere_contentcollectionitem_set_breadcrumb();\n return drupal_get_form('thumbwhere_contentcollectionitem_delete_form', $thumbwhere_contentcollectionitem);\n}", "public function actionDelete(){\n\t\t$form = $_POST;\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('DELETE FROM core_pages WHERE id = ?', $form['id']);\n\t\t$this->redirect('pages:');\n\t}", "function thumbwhere_contentcollectionitem_delete_form_submit($form, &$form_state) {\n $thumbwhere_contentcollectionitem = $form_state['thumbwhere_contentcollectionitem'];\n\n thumbwhere_contentcollectionitem_delete($thumbwhere_contentcollectionitem);\n\n drupal_set_message(t('The thumbwhere_contentcollectionitem %name has been deleted.', array('%name' => $thumbwhere_contentcollectionitem->pk_contentcollectionitem)));\n watchdog('thumbwhere_contentcollectionitem', 'Deleted thumbwhere_contentcollectionitem %name.', array('%name' => $thumbwhere_contentcollectionitem->pk_contentcollectionitem));\n\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollectionitems';\n}", "public function save_trash_delete_form() {\n\t\t// Handled in the process_bulk_actions() function in includes/class-forms-list.php\n\t}", "function _mica_datasets_node_delete_confirm($form, &$form_state, $node) {\n if ($node->type === 'dataset') {\n $form['#node'] = $node;\n // Always provide entity id in the same form key as in the entity edit form.\n $form['nid'] = array('#type' => 'value', '#value' => $node->nid);\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $node->title)),\n 'node/' . $node->nid,\n t('It will also delete all its variables, queries and study connectors.')\n . '<br />' . t('This action cannot be undone.') . '<br /><br />',\n t('Delete'),\n t('Cancel')\n );\n }\n module_load_include('inc', 'node', 'node.pages');\n return node_delete_confirm($form, $form_state, $node);\n}", "function delete_assignment_form_submit_handler ($form, &$form_state) {\n sb_assignment_delete ( (object) $form_state['values'] );\n\n $selected = eto_user_load($form_state['values']['selected_uid']);\n $user = eto_user_load($form_state['values']['uid']);\n\n drupal_set_message(ucwords($form_state['values']['type']) . \" '\" \n\t\t . l($selected->name, \"users/\" . $selected->uid) \n\t\t . \"' deleted from \" \n\t\t . l($user->name, \"users/\" . $user->uid),\n\t\t \"success\");\n $form_state['redirect'] = 'eto/admin/assignments';\n}", "protected function _postDelete() {}", "protected function _postDelete() {}", "private function _do_delete() {\n\t\tif (g($_POST, 'delete')) {\n\t\t\tif (g($this->conf, 'disable.delete')) die('Forbidden');\n\t\t\t\n $path = g($this->conf, 'path');\n if (g($_POST, 'path'))\n $path = \\Crypt::decrypt(g($_POST, 'path'));\n \n $this->_validPath($path);\n \n\t\t\t$parent = dirname($path);\n\t\t\t\n\t\t\tif ($path == g($this->conf, 'type')) {\n\t\t\t\t$this->_msg('Cannot delete root folder', 'error');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ($this->_delete($this->_path($path))) {\n\t\t\t\t$this->_msg('Success delete ['.$path.']');\n\t\t\t\theader('location:'.$this->_url(['path' => $parent]));\n\t\t\t\tdie();\n\t\t\t} else {\n\t\t\t\t$this->_msg('Failed delete ['.$path.'] : please call your administator', 'error');\n\t\t\t}\n\t\t}\n\t}", "public function testDeleteForm() {\n $document = $this->createDocument();\n\n $document_name = $document->id();\n\n // Log in and check for existence of the created document.\n $this->drupalLogin($this->adminUser);\n $this->drupalGet('admin/structure/legal');\n $this->assertRaw($document_name, 'Document found in overview list');\n\n // Delete the document.\n $this->drupalPostForm('admin/structure/legal/manage/' . $document_name . '/delete', [], 'Delete');\n\n // Ensure document no longer exists on the overview page.\n $this->assertUrl('admin/structure/legal', [], 'Returned to overview page after deletion');\n $this->assertNoText($document_name, 'Document not found in overview list');\n }", "public function remove_form_field()\n\t{\n\t\t//Get logged in session admin id\n\t\t$user_id \t\t\t\t\t\t= ($this->session->userdata('user_id_hotcargo')) ? $this->session->userdata('user_id_hotcargo') : 1;\n\t\t$setting_data \t\t\t\t\t= $this->myaccount_model->get_account_data($user_id);\n\t\t$data['data']['setting_data'] \t= $setting_data;\n\t\t$data['data']['settings'] \t\t= $this->sitesetting_model->get_settings();\n\t\t$data['data']['dealer_id'] \t\t= $user_id;\n\t\t\n\t\t//getting all admin data \n\t\t$data['myaccount_data'] \t\t\t= $this->myaccount_model->get_account_data($user_id);\n\t\t\n\t\t\n\t\t//Get requested id to remove\n\t\t$field_id \t\t\t\t\t= $this->input->get('form_id');\n\t\t\n\t\t//deleting query\n\t\t$this->mongo_db->where(array('field_name' => $field_id));\n\t\tif($this->mongo_db->delete('form_fields'))\n\t\t\techo 1;\n\t\telse\n\t\t\techo 0;\n\t}", "function student_form_delete() {\n $id = arg(1);\n $num_deleted = db_delete('student')\n ->condition('st_id', $id)\n ->execute();\n if ($num_deleted) {\n drupal_set_message(t('entry has been deleted.'));\n drupal_goto(\"formlist\");\n }\n else {\n drupal_set_message(t('error in query'));\n }\n}", "function do_delete(){\n\t\t// remove from fieldset:\n\t\t$fieldset = jcf_fieldsets_get( $this->fieldset_id );\n\t\tif( isset($fieldset['fields'][$this->id]) )\n\t\t\tunset($fieldset['fields'][$this->id]);\n\t\tjcf_fieldsets_update( $this->fieldset_id, $fieldset );\n\t\t\n\t\t// remove from fields array\n\t\tjcf_field_settings_update($this->id, NULL);\n\t}", "public function deleteNode(){\n\t\tparent::deleteNode();\n\n\t\t//Delete Langs\n\t\t$relMetaLang = new XlyreRelMetaLangs();\n\t\t$results = $relMetaLang->find(\"IdRel\", \"IdNode=%s\", array($this->nodeID), MONO);\n\t\tif ($results) {\n\t\t\tforeach ($results as $idRel) {\n\t\t\t\t$objectToDelete = new XlyreRelMetaLangs($idRel);\n\t\t\t\t$objectToDelete->delete();\n\t\t\t}\n\t\t}\n\n\t\t//Delete Tags\n\t\t$relMetaLang = new XlyreRelMetaTags();\n\t\t$results = $relMetaLang->find(\"IdRel\", \"IdNode=%s\", array($this->nodeID), MONO);\n\t\tif ($results) {\n\t\t\tforeach ($results as $idRel) {\n\t\t\t\t$objectToDelete = new XlyreRelMetaTags($idRel);\n\t\t\t\t$objectToDelete->delete();\n\t\t\t}\n\t\t}\n\n\t\t//Delete dataset\n\t\t$dataset = new XlyreDataset($this->nodeID);\n\t\treturn $dataset->delete();\n\t}", "function regional_content_form_block_custom_block_delete_alter(&$form, &$form_state) {\n $form['#submit'][] = 'regional_content_form_block_custom_block_delete_submit';\n}", "function travel_form_submit_delete($form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity.\n $entity = $form_state['entity'];\n $entity_uri = entity_uri('travel', $entity);\n $form_state['redirect'] = $entity_uri['path'] . '/delete';\n}", "function travel_delete_form_submit($form, &$form_state) {\n // Delete the entity.\n $entity = $form_state['entity'];\n entity_delete('travel', entity_id('travel', $entity));\n\n // Redirect user.\n drupal_set_message(t('Entity %title deleted.', array('%title' => entity_label('travel', $entity))));\n $form_state['redirect'] = '<front>';\n}", "function image_gallery_confirm_delete_form(&$form_state, $tid) {\r\n $term = taxonomy_get_term($tid);\r\n\r\n $form['tid'] = array('#type' => 'value', '#value' => $tid);\r\n $form['name'] = array('#type' => 'value', '#value' => $term->name);\r\n\r\n return confirm_form($form, t('Are you sure you want to delete the image gallery %name?', array('%name' => $term->name)), 'admin/content/image', t('Deleting an image gallery will delete all sub-galleries. This action cannot be undone.'), t('Delete'), t('Cancel'));\r\n}", "function dolist_messages_mail_admin_bundle_delete_form_submit($form, &$form_state) {\n dolist_messages_mail_bundle_delete($form_state['values']['type']);\n\n $t_args = array('%name' => $form_state['values']['name']);\n drupal_set_message(t('The message bundle %name has been deleted.', $t_args));\n watchdog('node', 'Deleted message bundle %name.', $t_args, WATCHDOG_NOTICE);\n\n\n $form_state['redirect'] = 'admin/structure/dolist/messagesmail';\n return;\n}", "public function onDeleteField()\n {\n $code = post('code');\n FieldManager::deleteField($code);\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }", "function bigbluebutton_admin_meeting_room_delete_form_submit($form, &$form_state) {\n\n\t//debug($form_state, \"form_state\", $print_r = TRUE);\n\n \tdb_delete('meeting_room')\n\t\t->condition('mid', $form_state['build_info']['args'][0])\n \t->execute();\n\n \tdrupal_set_message(t('Meeting room %meeting_room_name has been deleted.', array('%meeting_room_name' => $form_state['values']['meeting_room_name'])));\n\n \t$form_state['redirect'] = 'admin/config/system/bigbluebutton/meeting_room';\n\n}", "function mongo_node_mass_delete($entity_type, $entities) {\n entity_delete_multiple($entity_type, $entities);\n}", "public function deleteAction()\n {\n if ($this->request->isPost()) {\n $ids = $this->request->getPost('ids');\n\n ZArrayHelper::toInteger($ids);\n\n foreach ($ids as $id) {\n /**\n * @var MenuTypes $menu_type\n */\n $menu_type = MenuTypes::findFirst($id);\n /**\n * @var MenuDetails[] $menu_details\n */\n $menu_details = MenuDetails::find([\n 'menu_type_id = ?0',\n 'bind' => [$id]\n ]);\n foreach ($menu_details as $detail) {\n $detail->delete();\n }\n if ($menu_type->delete()) {\n $this->flashSession->success($menu_type->name . ' deleted successful');\n\n } else {\n $this->flashSession->error($menu_type->name . ' deleted fail');\n }\n }\n }\n return $this->response->redirect('/admin/menu/');\n }", "function admin_delete($node_id = '')\n\t{\n\t\tif(!$this->RequestHandler->prefers('json'))\n\t\t{\n\t\t\t$this->cakeError('error404');\n\t\t\treturn;\n\t\t}\n\n\t\tif(empty($node_id))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($node_id))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\t$node = $this->Navigation->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Navigation.id' => $node_id,\n\t\t\t),\n\t\t\t'recursive' => -1,\n\t\t));\n\t\tif(empty($node))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\t$response = array('success' => 1);\n\n\t\tif(!$this->Navigation->delete($node_id))\n\t\t{\n\t\t\t$response['success'] = 0;\n\t\t}\n\n\t\t$this->set('response', $response);\n\t}", "function thumbwhere_contentcollection_delete_form($form, &$form_state, $thumbwhere_contentcollection) {\n $form_state['thumbwhere_contentcollection'] = $thumbwhere_contentcollection;\n\n $form['#submit'][] = 'thumbwhere_contentcollection_delete_form_submit';\n\n $form = confirm_form($form,\n t('Are you sure you want to delete thumbwhere_contentcollection %name?', array('%name' => $thumbwhere_contentcollection->title)),\n 'admin/thumbwhere/thumbwhere_contentcollections/thumbwhere_contentcollection',\n '<p>' . t('This action cannot be undone.') . '</p>',\n t('Delete'),\n t('Cancel'),\n 'confirm'\n );\n\n return $form;\n}", "function thumbwhere_contentcollectionitem_delete_form($form, &$form_state, $thumbwhere_contentcollectionitem) {\n $form_state['thumbwhere_contentcollectionitem'] = $thumbwhere_contentcollectionitem;\n\n $form['#submit'][] = 'thumbwhere_contentcollectionitem_delete_form_submit';\n\n $form = confirm_form($form,\n t('Are you sure you want to delete thumbwhere_contentcollectionitem %name?', array('%name' => $thumbwhere_contentcollectionitem->pk_contentcollectionitem)),\n 'admin/thumbwhere/thumbwhere_contentcollectionitems/thumbwhere_contentcollectionitem',\n '<p>' . t('This action cannot be undone.') . '</p>',\n t('Delete'),\n t('Cancel'),\n 'confirm'\n );\n\n return $form;\n}", "function tutor_assignment_delete($username, $type, $selected_uid) {\n $type = rtrim($type, \"s\");\n\n $select = eto_user_load($selected_uid);\n \n $title = \"Delete the $type '\" . $select->name . \"' from $username\";\n drupal_set_title($title);\n $output = \"<h2>$title</h2>\";\n\n $user = eto_user_load(array('name' => $username));\n\n $node = (object) array ('uid' => $user->uid,\n\t\t\t 'selected_uid' => $selected_uid,\n\t\t\t 'type' => $type);\n\n $output .= \"Are you sure you want to delete this assignment?\";\n $output .= drupal_get_form('delete_assignment_form', $node);\n\n return $output;\n}", "protected function _postDelete()\n\t{\n\t}", "public function save_trash_delete_form() {\n global $wpdb;\n\n if (!isset($_REQUEST['action']) || !isset($_GET['page']))\n return;\n\n if ('swpm-form-builder' !== $_GET['page'])\n return;\n\n if ('delete_form' !== $_REQUEST['action'])\n return;\n\n $id = absint($_REQUEST['form']);\n\n check_admin_referer('delete-form-' . $id);\n\n // Delete form and all fields\n $wpdb->query($wpdb->prepare(\"DELETE FROM $this->form_table_name WHERE form_id = %d\", $id));\n $wpdb->query($wpdb->prepare(\"DELETE FROM $this->field_table_name WHERE form_id = %d\", $id));\n\n // Redirect to keep the URL clean (use AJAX in the future?)\n wp_redirect(add_query_arg('action', 'deleted', 'admin.php?page=swpm-form-builder'));\n exit();\n }", "function delete_sub_field($selector, $post_id = \\false)\n{\n}", "function execute()\n\t{\n\t\t$this->obj_form = New form_input;\n\t\t$this->obj_form->formname = \"chart_delete\";\n\t\t$this->obj_form->language = $_SESSION[\"user\"][\"lang\"];\n\n\t\t$this->obj_form->action = \"accounts/charts/delete-process.php\";\n\t\t$this->obj_form->method = \"post\";\n\t\t\n\n\t\t// general\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"code_chart\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"description\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t// hidden\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"id_chart\";\n\t\t$structure[\"type\"]\t\t= \"hidden\";\n\t\t$structure[\"defaultvalue\"]\t= $this->id;\n\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t\n\t\t// confirm delete\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"delete_confirm\";\n\t\t$structure[\"type\"]\t\t= \"checkbox\";\n\t\t$structure[\"options\"][\"label\"]\t= \"Yes, I wish to delete this account and realise that once deleted the data can not be recovered.\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\n\t\t// define submit field\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] = \"submit\";\n\t\t$structure[\"type\"]\t\t= \"submit\";\n\t\t$structure[\"defaultvalue\"]\t= \"delete\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t\n\t\t// define subforms\n\t\t$this->obj_form->subforms[\"chart_delete\"]\t= array(\"code_chart\", \"description\");\n\t\t$this->obj_form->subforms[\"hidden\"]\t\t= array(\"id_chart\");\n\n\t\tif ($this->locked)\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t= array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t\t= array(\"delete_confirm\", \"submit\");\n\t\t}\n\n\t\t\n\t\t// fetch the form data\n\t\t$this->obj_form->sql_query = \"SELECT code_chart, description FROM `account_charts` WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$this->obj_form->load_data();\n\t}", "function vu_core_hubspot_map_delete_form($form, &$form_state) {\n $form['webform_field_name'] = [\n '#type' => 'textfield',\n '#title' => t('What is the webform field you want to delete?'),\n '#required' => TRUE,\n '#size' => 100,\n '#maxlength' => 100,\n ];\n\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#attributes' => ['onclick' => 'if(!confirm(\"Are you sure you want to delete this field?\")){return false;}'],\n ];\n\n $form['cancel'] = [\n '#type' => 'submit',\n '#value' => t('Cancel'),\n '#submit' => ['vu_core_hubspot_map_add_form_cancel'],\n '#limit_validation_errors' => [],\n ];\n\n return $form;\n}", "protected function node_delete($nid) {\n\n // Clear the cache before the load, so if multiple nodes are deleted, the\n // memory will not fill up with nodes (possibly) already removed.\n $node = node_load($nid, NULL, TRUE);\n\n\n db_query('DELETE FROM {node} WHERE nid = %d', $node->nid);\n db_query('DELETE FROM {node_revisions} WHERE nid = %d', $node->nid);\n\n // Call the node-specific callback (if any):\n node_invoke($node, 'delete');\n node_invoke_nodeapi($node, 'delete');\n\n // Clear the page and block caches.\n cache_clear_all();\n\n // Remove this node from the search index if needed.\n if (function_exists('search_wipe')) {\n search_wipe($node->nid, 'node');\n }\n watchdog('content', '@type: deleted %title.', array('@type' => $node->type, '%title' => $node->title));\n drupal_set_message(t('@type %title has been deleted.', array('@type' => node_get_types('name', $node), '%title' => $node->title)));\n\n }", "public function actionDelete($id)\n\t{\n\t\t// we only allow deletion via POST request\n\t\t$this->loadModel($id)->delete();\n\t\tYii::app()->user->setFlash(Yii::app()->cms->flashes['success'], Yii::t('CmsModule.core', 'Node deleted.'));\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif (!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : Yii::app()->homeUrl);\n\t}", "function kala_revision_batch_delete_form_submit($form, &$form_state) {\n // Initalize vars.\n $operations = array();\n $values = $form_state['values'];\n\n // Grab the string date.\n if (isset($values['date'])) {\n $time = strtotime($values['date']);\n }\n\n // If we have the time, lets do this!\n if (isset($time)) {\n // Grab all vids before our time stamp.\n $sql = \"SELECT r.vid FROM {node_revision} r WHERE r.timestamp < :time ORDER BY r.timestamp DESC;\";\n $query = db_query($sql, array(':time' => $time));\n $vids = $query->fetchAllKeyed(0,0);\n $count = count($vids);\n\n // Throw our chunks into the batch.\n $chunks = array_chunk($vids, 50);\n foreach ($chunks as $chunk) {\n $operations[] = array(\"kala_revision_batch_delete_batch_process\", array($chunk, $count));\n }\n\n // Engage.\n $batch = array(\n 'title' => t('Deleting Revisions...'),\n 'init_message' => t('Grabbing Revisions to Delete.'),\n 'operations' => $operations,\n 'finished' => 'kala_revision_batch_delete_batch_finished',\n 'file' => drupal_get_path('module', 'kala_revision_batch_delete') . '/includes/kala_revision_batch_delete.batch.inc',\n );\n\n batch_set($batch);\n }\n}", "public function deleteAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n if (!($category_id = $this->_getParam('category_id'))) {\n die('No identifier specified');\n }\n\n //GENERATE FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Delete();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n foreach ($values as $key => $value) {\n if ($value == 1) {\n $reviewcat_id = explode('reviewcat_name_', $key);\n $reviewcat = Engine_Api::_()->getItem('sitestorereview_reviewcat', $reviewcat_id[1]);\n\n Engine_Api::_()->sitestorereview()->deleteReviewCategory($reviewcat_id[1]);\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //DELETE THE REVIEW PARAMETERS\n $reviewcat->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n $this->renderScript('admin-ratingparameter/delete.tpl');\n }", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "function execute()\n\t{\n\t\t$this->obj_form = New form_input;\n\t\t$this->obj_form->formname = \"user_delete\";\n\t\t$this->obj_form->language = $_SESSION[\"user\"][\"lang\"];\n\n\t\t$this->obj_form->action = \"user/user-delete-process.php\";\n\t\t$this->obj_form->method = \"post\";\n\t\t\n\n\t\t// general\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"username\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t// hidden\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"id_user\";\n\t\t$structure[\"type\"]\t\t= \"hidden\";\n\t\t$structure[\"defaultvalue\"]\t= $this->id;\n\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t\n\t\t// confirm delete\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"delete_confirm\";\n\t\t$structure[\"type\"]\t\t= \"checkbox\";\n\t\t$structure[\"options\"][\"label\"]\t= \"Yes, I wish to delete this user and realise that once deleted the data can not be recovered.\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\n\t\t// define submit field\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"submit\";\n\t\t$structure[\"type\"]\t\t= \"submit\";\n\t\t$structure[\"defaultvalue\"]\t= \"delete\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t\n\t\t// define subforms\n\t\t$this->obj_form->subforms[\"user_delete\"]\t= array(\"username\");\n\t\t$this->obj_form->subforms[\"hidden\"]\t\t= array(\"id_user\");\n\t\t$this->obj_form->subforms[\"submit\"]\t\t= array(\"delete_confirm\", \"submit\");\n\n\t\t\n\t\t// fetch the form data\n\t\t$this->obj_form->sql_query = \"SELECT username FROM `users` WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$this->obj_form->load_data();\n\n\n\t}", "function dh_cwsserviceareamap_form_submit_delete(&$form, &$form_state) {\n list($pg, $us, $id) = explode('/', $_GET['destination']);\n unset($_GET['destination']);\n drupal_goto(\n 'admin/content/dh_adminreg_feature/manage/' . $form_state['dh_adminreg_feature']->fid . '/delete',\n array('query' => array(\n 'destination' => $pg\n )\n ) \n );\n}", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "function thumbwhere_host_delete_form_wrapper($thumbwhere_host) {\n // Add the breadcrumb for the form's location.\n //thumbwhere_host_set_breadcrumb();\n return drupal_get_form('thumbwhere_host_delete_form', $thumbwhere_host);\n}", "public function remove_post()\n {\n $input = $this->input->post();\n $data=$this->Category_model->deleteData($input);\n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "function thumbwhere_host_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_hosts/thumbwhere_host/' . $form_state['thumbwhere_host']->pk_host . '/delete';\n}", "public function delete() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['delete']) && !empty($_POST['delete'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if (!$this->_model->delete(explode(\"/\", $this->_url)[1])) {\n echo \"error\";\n } else {\n echo \"good\";\n }\n }\n }\n }", "function travel_type_form_delete_confirm($form, &$form_state, $entity_type) {\n // Store the entity in the form.\n $form_state['entity_type'] = $entity_type;\n\n // Show confirm dialog.\n $message = t('Are you sure you want to delete entity type %title?', array('%title' => entity_label('entity_type', $entity_type)));\n return confirm_form(\n $form,\n $message,\n 'travel/' . entity_id('travel_type', $entity_type),\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }", "function observation_delete_form($form, &$form_state, $observationdata = NULL) {\n\tassert(!empty($observationdata));\n\tdrupal_set_title(\n\t\tt(\n\t\t\t'Delete Observation @observation_organism from @observation_date.',\n\t\t\tarray('@observation_organism' => $observationdata['organism']['name_lang'] . '('\n\t\t\t\t\t\t\t. $observationdata['organism']['name_lat'] . ')',\n\t\t\t\t\t'@observation_date' => date('d.m.Y', $observationdata['observation']['date'])\n\t\t\t)));\n\n\t$question = t(\n\t\t'Are you sure that you want to delete this observation «@observation_organism»?',\n\t\tarray('@observation_organism' => $observationdata['organism']['name_lang'] . '('\n\t\t\t\t\t\t. $observationdata['organism']['name_lat'] . ')'\n\t\t));\n\t/* create a fieldset for the tabular data */\n\t$form['question'] = array(\n\t\t\t'#type' => 'markup',\n\t\t\t'#markup' => \"<p>$question</p>\"\n\t);\n\n\t$form['button'] = array(\n\t\t\t'#type' => 'submit',\n\t\t\t'#value' => t('Delete')\n\t);\n\treturn $form;\n}", "function afterDelete(&$model) {\n\t\t$node = Set::extract($this->node($model), \"0.Node.id\");\n\t\tif (!empty($node)) {\n\t\t\t$model->Node->delete($node);\n\t\t}\n\t}", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fanli_Service_Ptype::getType($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Fanli_Service_Ptype::deleteType($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "function delete_field($selector, $post_id = \\false)\n{\n}", "function ting_visual_relation_slide_form_delete($form, &$form_state) {\n // Pass along any destination parameter set from previous pages\n $destination = array();\n if (isset($_GET['destination'])) {\n $destination = drupal_get_destination();\n unset($_GET['destination']);\n }\n // Should allways be set since this is only available on the edit form.\n $slide_id = $form_state['slide']->slide_id;\n $path = 'admin/config/ting/ting-visual-relation/app-settings/' . $slide_id .'/delete';\n $form_state['redirect'] = array($path, array('query' => $destination));\n}", "public function deleteField($fieldName) {}", "public function del(){\n\t\t$this->OnlyAdmin();\n\t\tif($this->input->post()){\n\t\t$this->TicketModel->delet($this->input->post());\n\t\tredirect('index.php/ticket/lists');}\n\t}", "public function getPostAdminDeleteUser()\n {\n $title = \"Avanmäl användare\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n $form = new AdminDeleteUserForm($this->di);\n\n $form->check();\n\n $data = [\n \"form\" => $form->getHTML(),\n ];\n\n $view->add(\"user/crud/admindelete\", $data);\n $tempfix = \"\";\n\n $pageRender->renderPage($tempfix, [\"title\" => $title]);\n }", "function culturefeed_pages_page_delete_member(CultureFeed_Cdb_Item_Page $page, $user = NULL, $request_type = 'nojs') {\n\n $my_pages = FALSE;\n if (empty($user)) {\n try {\n $user = DrupalCultureFeed::getLoggedInUser();\n $my_pages = TRUE;\n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_pages', $e);\n return;\n }\n }\n\n $form = drupal_get_form('culturefeed_pages_delete_member_form', $page, $user, $request_type, $my_pages);\n\n if ($request_type == 'ajax') {\n $output = drupal_render($form);\n print $output;\n }\n else {\n return $form;\n }\n\n}", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "public static function delete(){\n\t\tif(isset($_POST['formId']) && isset($_POST['personnalInformationName'])){\n\t\t\t$data = array(\n\t\t\t\t\"formId\" => $_POST['formId'],\n\t\t\t\t\"personnalInformationName\" => $_POST['personnalInformationName']\n\t\t\t);\n\t\t\techo json_encode(ModelAssocFormPI::delete($data));\n\t\t}else{\n\t\t\techo json_encode(false);\n\t\t}\n\t}", "function execute()\n\t{\n\t\t$this->obj_form = New form_input;\n\t\t$this->obj_form->formname = \"transaction_delete\";\n\t\t$this->obj_form->language = $_SESSION[\"user\"][\"lang\"];\n\n\t\t$this->obj_form->action = \"accounts/gl/delete-process.php\";\n\t\t$this->obj_form->method = \"post\";\n\t\t\n\n\t\t// general\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"code_gl\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"description\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t// hidden\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"id_transaction\";\n\t\t$structure[\"type\"]\t\t= \"hidden\";\n\t\t$structure[\"defaultvalue\"]\t= $this->id;\n\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t\n\t\t// confirm delete\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"delete_confirm\";\n\t\t$structure[\"type\"]\t\t= \"checkbox\";\n\t\t$structure[\"options\"][\"label\"]\t= \"Yes, I wish to delete this transaction and realise that once deleted the data can not be recovered.\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\n\t\t/*\n\t\t\tCheck that the transaction can be deleted\n\t\t*/\n\n\t\t// define submit field\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"submit\";\n\t\t$structure[\"type\"]\t\t= \"submit\";\n\t\t$structure[\"defaultvalue\"]\t= \"delete\";\n\t\t\t\t\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t\n\t\t// define subforms\n\t\t$this->obj_form->subforms[\"transaction_delete\"]\t= array(\"code_gl\", \"description\");\n\t\t$this->obj_form->subforms[\"hidden\"]\t\t= array(\"id_transaction\");\n\t\t\n\t\tif ($this->locked)\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t= array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t= array(\"delete_confirm\", \"submit\");\n\t\t}\n\n\t\t\n\t\t// fetch the form data\n\t\t$this->obj_form->sql_query = \"SELECT code_gl, description FROM `account_gl` WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$this->obj_form->load_data();\n\n\t}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "public function delete_meta()\n {\n # process the request which it must be post and ajax request\n if (request()->isPost() && request()->isAjax()) {\n \n $objectId = request()->getPost('object-id', 'int');\n $object = request()->getPost('object', 'alphanum');\n \n $this->setJsonResponse();\n\n $object = PostMeta::findFirstByMeta_id($objectId);\n\n if(!$object) {\n $this->jsonMessages['messages'][] = [\n 'type' => 'warning',\n 'content' => 'Object not found!'\n ];\n return $this->jsonMessages;\n }\n $object->delete();\n\n \n $this->jsonMessages['messages'][] = [\n 'type' => 'success',\n 'content' => 'Object has been deleted!'\n ];\n return $this->jsonMessages;\n \n\n }\n }", "function deleteInfo() {\n?>\n <form method=\"post\" id=\"delete_form\">\n <!-- for deletes to work, this must be here and the values must be in this order -->\n <input type=\"hidden\" id=\"primary_key\" name=\"primary_key\" value=\"<?php echo $this->primary_key ?>\">\n <input type=\"hidden\" id=\"primary_key_value\" name=\"primary_key_value\" value=\"<?php echo $this->primary_key_value ?>\">\n <input type=\"hidden\" id=\"delete_from_table\" name=\"delete_from_table\" value=\"<?php echo $this->table_title ?>\">\n <input type=\"hidden\" id=\"return_address\" name=\"return_address\" value=\"/treatment/tables/<?php echo $this->table_display ?>\">\n </form>\n<?php\n }", "function dolist_messages_mail_admin_bundle_delete_form($form, &$form_state, $bundle) {\n \n if(!$bundle) {\n drupal_set_message(t('Could not load bundle'), 'error');\n drupal_goto('admin/structure/dolist/messagesmail');\n }\n\n $form['type'] = array('#type' => 'value', '#value' => $bundle->bundle);\n $form['name'] = array('#type' => 'value', '#value' => $bundle->name);\n\n $message = t('Are you sure you want to delete the message bundle %bundle?', array('%bundle' => $bundle->name));\n $caption = '';\n $caption .= '<p>' . t('This action cannot be undone. Content using the bundle will be broken.') . '</p>';\n\n return confirm_form($form, $message, 'admin/structure/dolist/messagesmail', $caption, t('Delete'));\n}", "function vu_core_hubspot_map_delete_form_submit($form, &$form_state) {\n $webform_field_name = $form_state['values']['webform_field_name'];\n if (vu_core_hubspot_map_is_existing_field($webform_field_name)) {\n vu_core_hubspot_map_record_delete($webform_field_name);\n drupal_set_message(t('Successfully deleted webform field from the master map.'));\n drupal_goto('admin/config/hubspot/fields/list');\n }\n else {\n drupal_set_message(t('The webform field does not exist.'), 'error');\n }\n}", "function webform_confirm_email_delete($node, $email = array()) {\n\n $form_state = array(\n 'build_info' => array(\n 'args' => array(\n $node,\n $email,\n ),\n ),\n 'submit_handlers' => array(\n 'webform_email_delete_form_submit',\n '_webform_confirm_email_delete_submit',\n ),\n );\n $form = drupal_build_form(\n 'webform_email_delete_form',\n $form_state\n );\n\n return $form;\n}", "public function deleteFormAction()\n {\n\t\t$id = $this->params()->fromRoute(\"id\");\n\t\tif ($id == \"\")\n\t\t{\n\t\t\t$this->flashMessenger()->addErrorMessage(\"Form could not be deleted. ID is not set\");\n\n\t\t\t//return to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end if\n\n\t\t//load data\n\t\ttry {\n\t\t\t$objForm = $this->getFormAdminModel()->fetchForm($id);\n\n\t\t\tif (!$objForm)\n\t\t\t{\n\t\t\t\t$this->flashMessenger()->addErrorMessage(\"A problem occurred. The requested form could not be laoded\");\n\t\t\t\t//return to index page\n\t\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t\t}//end if\n\t\t} catch (\\Exception $e) {\n\t\t\t//set error message\n\t\t\t$this->flashMessenger()->addErrorMessage($e->getMessage());\n\n\t\t\t//return to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end catch\n\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost())\n\t\t{\n\t\t\tif (strtolower($request->getPost(\"delete\")) == \"yes\")\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t$this->getFormAdminModel()->deleteForm($id);\n\n\t\t\t\t\t//set message\n\t\t\t\t\t$this->flashMessenger()->addSuccessMessage(\"Form deleted successfully\");\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t//set error message\n\t\t\t\t\t$this->flashMessenger()->addErrorMessage($this->frontControllerErrorHelper()->formatErrors($e));\n\t\t\t\t}//end catch\n\t\t\t}//end if\n\t\t\t\n\t\t\t//return to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end if\n\n\t\treturn array(\n\t\t\t\"objForm\" => $objForm,\n\t\t);\n }", "function address_book_contact_deleteform_submit($form_id, $form_values) {\n $contact = address_book_contact_load($form_values['values']['cid']);\n\n // delete contact\n $delete_contact_query = db_delete('edu_contacts')\n ->condition('cid', $contact->cid)\n ->execute();\n\n //delete photo\n $photo = file_load($contact->photo);\n if ($photo) {\n file_delete($photo);\n }\n\n\n drupal_set_message(t('Contact deleted successful'));\n drupal_goto('address_book');\n}", "function btrClient_delterm_form_submit($form, &$form_state) {\n\n $sguid = check_plain(trim($form_state['values']['sguid']));\n btr_del_term($sguid);\n\n // redirect to the list of terms\n $lng = variable_get('btrClient_translation_lng', 'fr');\n drupal_goto(\"translations/search\",\n array('query' => array(\n 'lng' => $lng,\n 'project' => 'vocabulary',\n 'limit' => 10,\n )));\n}", "public function delete(){\n\t\t\t\n\t\t/* set method */\n\t\t$this->request_method = 'delete';\n\t\t\t\t\n\t\t/* check for id */\n\t\tif( ! $this->id) {\n\t\t\t$this->set_error( 14, 'No model id in request, cant delete' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* parse the data from backbone */\n\t\t$this->parse_model_request();\n\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\t\t\n\t\t/* access the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\t\t\n\t\t \t\t\t \t\n\t\t/* delete from 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 */\n\t\t\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('delete_post', $this->id)) { \n\t\t\t\t\t$this->set_error( 15, 'no user privileges to delete the item on server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t\t$result = wp_delete_post($this->id);\n\t\t\t\t\n\t\t\t\t/* error checking while delete */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 16, 'deleting 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/* success, the id of the deleted post was returned */\n\t\t\t\t$deleted_id = $result->ID;\n\t\t\t\t\n\t\t\t\t/* setup a clean response */\n\t\t\t\t$this->parse_model_response($deleted_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/* @TODO better permission handling */\n\t\t\t\t\t$comment_in_db = get_comment( $this->id );\n\t\t\t\t\t$comment_author = $comment_in_db->user_id;\n\t\t\t\tif ( $this->properties->access == \"loggedin\" && $comment_author != $this->current_user->ID ) {\n\t\t\t\t\t$this->set_error( 17, 'This comment can only be deleted by the comment author :' . $comment_author );\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t$result = wp_delete_comment($this->id);\n\t\t\t\t\n\t\t\t\t/* true is returned on success delete */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 17, 'deleting 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/* setup a clean response */\t\n\t\t\t\t$this->parse_model_response($result);\t\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\t\n\t\t\tbreak;\n\t\t}\t\n do_action('bb-wp-api_after_upd', $updated_id, $this->properties, $this );\n\n\t}", "public function postEliminarcfamiliar(){\n $cfamiliar=Cuadrofamiliar::find(Input::get('id'));\n $id=$cfamiliar->user->id;\n CuadroFamiliar::destroy(Input::get('id'));\n return $this->recargarFormularios('users.psico.inicio.vermas.formularios.step-22',$id);\n }", "public function deleteAction($id)\n {\n $form = $this->createDeleteForm($id);\n $request = $this->getRequest();\n\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $entity = $em->getRepository('HegesAppNodeBundle:Node')->find($id);\n\n \n $nodename=$entity->getName();\n \n if (!$entity) {\n throw $this->createNotFoundException('NodeController :: deleteAction :: No existe un nodo con id '.$id);\n }\n\n $em->remove($entity);\n $em->flush();\n $this->get('session')->setFlash('notice', 'Los cambios se realizaron correctamente.');\n\n $logsource=\"hegesapp_log_app\";\n $hegesapplogentry = new HegesAppLog(\n $this->container->getParameter('hegesapp_log_dir').$this->container->getParameter($logsource),\n $this->container->get('security.context')->getToken()->getUser(),\n $logsource);\n \n $hegesapplogentry->HegesAppLogWriteToLog(\"El nodo \".$nodename.\" ha sido borrado.\");\n \n \n }\n\n return $this->redirect($this->generateUrl('node'));\n }", "public function onRelationManageDelete()\n {\n $this->beforeAjax();\n\n /*\n * Multiple (has many, belongs to many)\n */\n if ($this->viewMode == 'multi') {\n if (($checkedIds = post('checked')) && is_array($checkedIds)) {\n foreach ($checkedIds as $relationId) {\n if (!$obj = $this->relationModel->find($relationId)) {\n continue;\n }\n\n $obj->delete();\n }\n }\n }\n /*\n * Single (belongs to, has one)\n */\n elseif ($this->viewMode == 'single') {\n $relatedModel = $this->viewModel;\n if ($relatedModel->exists) {\n $relatedModel->delete();\n }\n\n $this->viewWidget->setFormValues([]);\n $this->viewModel = $this->relationModel;\n }\n\n return $this->relationRefresh();\n }", "public function actionDelete($id)\n\t{\n\t\t// we only allow deletion via POST request\n\t\t$model = Page::model()->findByPk($id);\n\t\tif(!$model) {\n\t\t\tthrow new CHttpException(404, Yii::t('form', 'The requested does not exist.'));\n\t\t}\n\t\t\n\t\tif($model->type == 'normal') {\n\t\t\tif($model->delete()) {\n\t\t\t\tYii::app()->user->setFlash('success', yii::t('form', 'The data was successfully removed.'));\n\t\t\t} else {\n\t\t\t\tYii::app()->user->setFlash('error', yii::t('form', 'The data was not removed.'));\n\t\t\t}\n\t\t}\n\t\telseif($model->type == 'system') {\n\t\t\tYii::app()->user->setFlash('error', yii::t('form', 'This is an item from the system and can not be removed.'));\n\t\t}\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n\t}", "public function deletePost(){\n\n if (!$this->auth->isLogged()) {\n $this->view->redirect(\"/user/login\", \"You can not add new categories if you are not logged in!\");\n }\n\n if (!$this->auth->isInRole(\"admin\")) {\n $this->view->redirect(\"/user/login\", \"You can not manage categories if you are not Admin!\");\n }\n\n if ($this->input->post(\"delete_category\") === null){\n $this->view->redirect(\"/categories/manage\");\n }\n\n if (empty($this->input->get(0,\"int\"))){\n $this->view->redirect(\"/categories/manage\");\n }\n\n $categoryId = $this->input->get(0,\"int\");\n\n $categoryModel = new CategoriesModel();\n try{\n if (!$categoryModel->existCategoryId($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"This categories do not exist!\");\n }\n if ($categoryModel->deleteCategory($categoryId)){\n $this->view->redirect(\"/categories/manage\",\"Category deleted successfully!\",\"success\");\n }\n } catch (\\Exception $exception) {\n $this->view->redirect(\"/categories/manage\", $exception->getMessage());\n }\n }", "function thumbwhere_host_delete_form_submit($form, &$form_state) {\n $thumbwhere_host = $form_state['thumbwhere_host'];\n\n thumbwhere_host_delete($thumbwhere_host);\n\n drupal_set_message(t('The thumbwhere_host %name has been deleted.', array('%name' => $thumbwhere_host->pk_host)));\n watchdog('thumbwhere_host', 'Deleted thumbwhere_host %name.', array('%name' => $thumbwhere_host->pk_host));\n\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_hosts';\n}", "public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t//print_r ($_POST);\n\t\t\t\n\t\t\tif (isset($_POST[\"articleCheckbox\"]) && !empty($_POST[\"articleCheckbox\"]) && $_POST[\"command\"] == \"deleteSelected\"){\n\t\t\t\tforeach($_POST[\"articleCheckbox\"] as $record)\n\t\t\t\t{\n\t\t\t\t\tArticles::model()->deleteByPk($record);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// we only allow deletion via POST request\n\t\t\t\t$this->loadarticles()->delete();\n\t\t\t}\n\t\t\t$this->redirect(array('admin'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}" ]
[ "0.78526545", "0.7351332", "0.7347114", "0.7220521", "0.71068573", "0.7055229", "0.6662198", "0.6615363", "0.657397", "0.6415916", "0.63025516", "0.6188454", "0.6143792", "0.6140851", "0.6084777", "0.6066255", "0.6050293", "0.6005385", "0.59997916", "0.5976242", "0.59560156", "0.59102654", "0.5907019", "0.58810115", "0.58738995", "0.5871507", "0.586136", "0.58560365", "0.5848908", "0.58367103", "0.5821633", "0.5819343", "0.581734", "0.58152294", "0.5804014", "0.57936543", "0.5792416", "0.57883674", "0.5788345", "0.578705", "0.5781114", "0.5774645", "0.57689023", "0.5759382", "0.5725407", "0.57252085", "0.57115674", "0.5688272", "0.56847864", "0.56838495", "0.5654177", "0.5653755", "0.56386673", "0.5638411", "0.56099087", "0.559915", "0.55924183", "0.55917484", "0.55892664", "0.55839765", "0.5578373", "0.5573337", "0.55658746", "0.5554436", "0.5553327", "0.5534632", "0.5530802", "0.5505841", "0.5498104", "0.5497154", "0.5491403", "0.54850423", "0.54758906", "0.54660827", "0.5462045", "0.54592943", "0.54432476", "0.5440863", "0.5439172", "0.5438504", "0.543565", "0.543273", "0.54238784", "0.54237807", "0.5421629", "0.54182756", "0.54104125", "0.5400525", "0.5395903", "0.53954524", "0.53867143", "0.5386462", "0.53801763", "0.53690964", "0.5368887", "0.53673756", "0.5359994", "0.5351052", "0.53499883", "0.53411573" ]
0.78017473
1
Entity type existance check Helper function.
function _mongo_node_type_exists($entity_type) { $set = mongo_node_settings(); if (isset($set[$entity_type])) { return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasEntityType() {\n return $this->_has(6);\n }", "public function hasEntityType() {\n return $this->_has(5);\n }", "public function getEntityTypeId(){\n $entityType = Mage::getModel('eav/entity_type')->loadByCode($this->_entityType);\n if (!$entityType->getId()){\n Mage::helper('connector')\n ->log(\"Entity type \" . $this->_entityType . \" undefined\", Zend_log::ERR);\n return false;\n }\n return $entityType->getId();\n }", "public function hasEntity($name);", "public function remoteEntityExists($entity_type, $entity_id) {\n $uri = $this->getRemoteUri($entity_type, $entity_id);\n if ($this->request('head', $uri)->getStatusCode() === 200) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "public function hasEntityClass(): bool\n {\n return $this->hasDataItem('entity');\n }", "protected function isEntity($class)\n {\n return Nishchay::getEntityCollection()->isExist($class);\n }", "function invalidEntityType( Application $app, $entityType ) {\n\n if ( ! in_array( $entityType, getAvailableEntities( $app ) ) ) {\n // If entity type doesn't exists, return an error\n $error[\"code\"] = 2;\n $error[\"message\"] = \"EntityType unavailable\";\n $error[\"fields\"] = $entityType;\n return $error;\n }\n return false;\n}", "public function exists($entity): bool;", "public function has($type = null) {}", "public function has($type);", "public function type_exists($type)\n\t{\n\t\t$module_path=$this->_ci->config->item('module_path');\n\t\treturn file_exists($module_path.'/'.$type);\n\t}", "public function getType(): EntityType;", "public function getEntityType($entity)\n {\n $result = $this->db->query(\"SELECT type FROM entities WHERE id='$entity'\");\n// echo \"The result is $result->num_rows\";\n if (!isset($result->num_rows) || $result->num_rows == 0) {\n return Constants::ENTITY_NONEXISTENT;\n } else {\n $thing = $result->fetch_assoc()[\"type\"];\n// echo \"The thing iis $thing\";\n switch ($thing) {\n case \"ATOM\":\n return Constants::ENTITY_ATOM;\n case \"GROUP\":\n return Constants::ENTITY_GROUP;\n case \"USER\":\n return Constants::ENTITY_USER;\n }\n }\n throw new \\Exception(\"Unknown entity type\");\n }", "public function hasType(){\r\n return $this->_has(1);\r\n }", "public function hasType($name);", "public function exist(BaseEntity $entity): bool\n {\n return $this->entityManager\n ->getRepository($entity->getClassName())\n ->find($entity) ? true : false;\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(2);\n }", "function acf_field_type_exists($type = '')\n{\n}", "function check_exists()\n\t{\n\t\t$name = url_title($this->input->post('name'));\n\n\t\t$exists = $this->content_type_model->check_exists(\n\t\t\t'name',\n\t\t\t$name,\n\t\t\t$this->input->post('id_content_type')\n\t\t);\n\n\t\t$this->xhr_output($exists);\n\t}", "function is_exists_s_atribute_type_lookup($s_attribute_type, $value) {\n\t$query = \"SELECT 'x' FROM s_attribute_type_lookup WHERE s_attribute_type = '\" . $s_attribute_type . \"' AND value = '$value'\";\n\n\t$result = db_query($query);\n\tif ($result && db_num_rows($result) > 0) {\n\t\tdb_free_result($result);\n\t\treturn TRUE;\n\t}\n\n\t//else\n\treturn FALSE;\n}", "public function hasEntity($value, array $params = array());", "public function hasType() {\n return $this->_has(2);\n }", "public function hasType() {\n return $this->_has(3);\n }", "function verifyEntityParam($entityParam) {\n global $authorizedEntities;\n\n return array_key_exists($entityParam, $authorizedEntities);\n}", "public function hasReferencedEntityType() {\n return $this->_has(12);\n }", "public function hasType(){\n return $this->_has(9);\n }", "public function hasType(){\r\n return $this->_has(7);\r\n }", "public function testEntityClassExist()\n {\n $this->assertInstanceOf(TreeFactory::class, new TreeFactory());\n }", "private function isHasEntity($property){\n\t\tif(isset($this->columns[$property]) && \n\t\t(is_object($this->columns[$property]) OR is_array($this->columns[$property])) ){\n\t\t\treturn true;\t\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "function atkexists($type, $name)\n{\n\treturn file_exists(atkgetinclude($type, $name));\n}", "function db_type_name_exists()\r\n {\r\n $toReturn = false;\r\n $dbmgr = new DB_Mgr(\"sites\");\r\n $stmt = \"SELECT count(*) FROM SI_PHONE_TYPE WHERE name = '\" . $this->name . \"'\";\r\n $dbmgr->query($stmt);\r\n $row = $dbmgr->get_a_row();\r\n $num = $row[0];\r\n return($num);\r\n }", "function is_exists_item_attribute_type($s_item_type, $s_attribute_type, $order_no = NULL) {\n\t$query = \"SELECT 'x' FROM s_item_attribute_type \";\n\n\tif (strlen($s_attribute_type) > 0) {\n\t\t$where .= \" s_attribute_type = '\" . $s_attribute_type . \"'\";\n\t\tif (is_numeric($order_no))\n\t\t\t$where .= \" AND order_no = '$order_no'\";\n\t}\n\n\t// Support check for any instances of the s_attribute_type in the s_item_attribute_type table,\n\t// or a specific s_item_type instance if $s_item_type specified.\t\n\tif (strlen($s_item_type) > 0) {\n\t\tif (strlen($s_attribute_type) > 0)\n\t\t\t$where .= \" AND \";\n\t\t$where .= \"s_item_type = '$s_item_type'\";\n\t}\n\n\tif (strlen($where) > 0)\n\t\t$query .= \" WHERE $where \";\n\n\t$result = db_query($query);\n\tif ($result && db_num_rows($result) > 0) {\n\t\tdb_free_result($result);\n\t\treturn TRUE;\n\t}\n\n\t//else\n\treturn FALSE;\n}", "function checkIfContentExists($type) {\n $ci = & get_instance();\n $content = $ci->crud->get(CMS_CONTENT, array('page_type' => $type));\n if (count($content) > 0) {\n return 1;\n } else {\n return 0;\n }\n}", "function does_exists($id, $type) {\n\n global $course_id;\n switch ($type) {\n case 'forum':\n $sql = Database::get()->querySingle(\"SELECT id FROM forum\n WHERE id = ?d\n AND course_id = ?d\", $id, $course_id);\n break;\n case 'topic':\n $sql = Database::get()->querySingle(\"SELECT id FROM forum_topic\n WHERE id = ?d\", $id);\n break;\n }\n if (!$sql) {\n return 0;\n } else {\n return 1;\n }\n}", "public function hasType(){\n return $this->_has(4);\n }", "public function validEntrytype($data) {\n\t\t$values = array_values($data);\n\t\tif (!isset($values)) {\n\t\t\treturn false;\n\t\t}\n\t\t$value = $values[0];\n\n\t\t/* Load the Entrytype model */\n\t\tApp::import(\"Webzash.Model\", \"Entrytype\");\n\t\t$Entrytype = new Entrytype();\n\n\t\tif ($Entrytype->exists($value)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isEntity() : bool\n {\n return is_array($this->fields) && !empty($this->fields);\n }", "function _mongo_node_bundle_exists($bundle) {\n $entity_type = arg(3);\n\n $set = mongo_node_settings();\n if (isset($set[$entity_type]['bundles'][$bundle])) {\n return TRUE;\n }\n return FALSE;\n}", "function is_property_reference($entity_type, $name) {\n}", "public function _init($entity_type)\n {\n return TRUE;\n }", "public function hasComponent(string $type): bool;", "public function supports(string $entityClass): bool;", "abstract protected function getEntityType(): string;", "function is_class_exists($class_name, $class_type) {\n\t$file_path = ROOT . $class_type . 's/' . $class_name . '.' . $class_type . '.php';\n\tif(!file_exists($file_path)) return false;\n\n\tinclude_once $file_path;\n\treturn class_exists(true_uppercase($class_name . '_' . $class_type), false);\n}", "public function hasType(string $name): bool;", "function check_type_code($type_code){\n\t\t\tif($this->db->get_where('type',array('code' => $type_code))->num_rows() > 0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function checkFinanceTypeIsUsed($type_id)\n\t{\n\t\t$sql = \"SELECT * FROM ia32_finance WHERE type_id = '\".stripquotes($type_id).\"'\";\n\t\t$recs = $this->db32select($sql);\n\n\t\tif ($recs[0]) return true;\n\n\t\treturn false;\n\n\t}", "public function hasType(){\n return !empty($this->type);\n }", "function validateExist($str, $type){\n $query = M('user');\n $condition[$type] = $str;\n $exist = $query->where($condition)->select();\n \n if(count($exist)>0)\n return true;\n else\n return false;\n}", "public function POS_it_checks_create_audits_testing_checkIfTypeExists() {\n\n $type = 'Bob';\n\n $taskType = new TaskType();\n $taskType->setType($type);\n $taskType->setDescription('was here');\n $taskType->created_at = Carbon::now();\n $taskType->updated_at = Carbon::now();\n $taskType->client_id = 1;\n\n $taskType->save();\n\n $result = $taskType->checkTaskTypeCreateAudits($taskType);\n\n $this->assertEquals($result, appGlobals()::TBL_TASK_TYPE_TYPE_ALREADY_EXISTS);\n }", "protected function is_types_active() {\n\t\treturn class_exists( 'Types_Main' );\n\t}", "public function hasType(){\n return $this->_has(5);\n }", "public function hasType(){\n return $this->_has(5);\n }", "private static function discoverEntity()\n {\n Structure::indexEntity(static::class);\n }", "function metadata_exists($meta_type, $object_id, $meta_key)\n {\n }", "protected static function isSearchableEntity(\\ElggEntity $entity) {\n\t\t\n\t\tif (empty($entity) || !($entity instanceof \\ElggEntity)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$type = $entity->getType();\n\t\t$type_subtypes = elasticsearch_get_registered_entity_types();\n\t\tif (!isset($type_subtypes[$type])) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$subtype = $entity->getSubtype();\n\t\tif (empty($subtype)) {\n\t\t\t// eg. user, group, site\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn in_array($subtype, $type_subtypes[$type]);\n\t}", "public function getEntity($guid){\nif(isset($guid)){\n\t return get_entity($guid);\n}\n return false;\n}", "public function serviceTypeNameIsUnique($name){\n $dql = \"SELECT s from ServiceType s\n WHERE s.name = :name\";\n $query = $this->em->createQuery($dql);\n $result = $query->setParameter('name', $name)->getResult();\n\n if(count($result)==0){\n return true;\n }\n else {\n return false;\n }\n\n }", "public function hasTypeIdentifier()\n {\n return count($this->get(self::TYPE_IDENTIFIER)) !== 0;\n }", "protected abstract function initializeEntityType(): string;", "public function entityExists($entity)\n {\n return $this->getEntityIdentifier($entity) ? true : false;\n }", "public function entityTypeId();", "public function getEntityTypeId();", "abstract public function exists();", "abstract public function exists();", "protected function exists() {}", "function assetTypeInAsset ( $asset_type_id )\n {\n\n $q = Doctrine_Query::create ()\n ->from ( 'AssetType at' )\n ->innerJoin ( 'at.Asset a' )\n ->where ( 'a.asset_type_id = ?' , $asset_type_id )\n ->limit ( 1 );\n\n $results = $q->execute ();\n return ($results->count () == 0 ? false : true);\n }", "function getEntityTypeID($EntityTypeName){\r\n\t\tif(empty($EntityTypeName)){return FALSE;}\r\n\t\t$this->db->select('EntityTypeID');\r\n\t\t$this->db->from('tbl_entity_type');\r\n\t\t$this->db->where('EntityTypeName',$EntityTypeName);\r\n\t\t$this->db->limit(1);\r\n\t\t$Query = $this->db->get();\t\t\r\n\t\tif($Query->num_rows()>0){\r\n\t\t\treturn $Query->row()->EntityTypeID;\r\n\t\t}else{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "function order_contains_product_type($order, $type) {\n if (!empty($order->commerce_line_items)) {\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n foreach ($order_wrapper->commerce_line_items as $line_item_wrapper) {\n if (!empty($line_item_wrapper->commerce_product)) {\n if ($line_item_wrapper->commerce_product->type->value() == trim($type)) {\n return TRUE;\n }\n }\n }\n }\n return FALSE;\n}", "public function hasType()\n {\n return isset($this->type);\n }", "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 protected function getEntityClass();", "function existsItemStrict ($name, $type) {\n\t\tif (array_key_exists ('/'.$type.$name, $this->allConfigItems) or\n\t\t\tarray_key_exists ('/'.$type.$name, $this->allUserItems)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getEntityType();", "public function hasEntityListClass(): bool\n {\n return $this->hasDataItem('entityList');\n }", "private function _checkClass()\n {\n if ($this->_useWithoutTypeCheck === true) {\n return true;\n }\n\n $resource = $this->_owApp->selectedResource;\n $rModel = $resource->getMemoryModel();\n\n // search with each expression using the preg matchtype\n foreach ($this->_types as $type) {\n if (isset($type['classUri'])) {\n $classUri = $type['classUri'];\n } else {\n continue;\n }\n if (\n $rModel->hasSPvalue(\n (string) $resource,\n EF_RDF_TYPE,\n $classUri\n )\n ) {\n return true;\n }\n }\n\n // type does not match to one of the expressions\n return false;\n }", "public function hasType(): bool\n {\n return $this->node->type !== null;\n }", "public static function attributeTypeExists(AttributeType $data) {\n $model = self::_getDataType();\n $idName = $model::_getPrimaryIdKey();\n $method = \"get\".ucfirst($idName);\n $pId = $data->$method();\n if($pId > 0) {\n return parent::dbRecordExists($data);\n } elseif((string) $data->getName() !== '') {\n $rec = self::getAttributeTypeByName($data->getName());\n return (boolean) ($rec instanceof $model);\n } else {\n throw new \\Exception(__METHOD__.\" requires valid/populated model as input\");\n }\n }", "abstract public function getEntityTypeID();", "private function checkImportEssentialField($type) {\n $mandatoryFields = EfrontImport::getMandatoryFields($type);\n $not_found = false;\n foreach ($mandatoryFields as $dbField => $columnName) {\n if (!isset($this -> mappings[$dbField])) {\n $not_found = true;\n break;\n }\n }\n if ($not_found) {\n $this -> log[\"failure\"][\"headerproblem\"] = _HEADERDOESNOTINCLUDEESSENTIALCOLUMN . \": \" . implode(\",\", $mandatoryFields);\n return false;\n } else {\n return true;\n }\n }", "protected function isValidEntity(EntityTypeInterface $definition) {\n return $definition->get('field_ui_base_route') && $definition->hasViewBuilderClass();\n }", "public function isType($type){\n \n // canary...\n if(!$this->hasType()){ return false; }//if\n \n return ($this->field_map['type'] === $type);\n \n }", "public function isField($field_name, $bundle, $entity_type) {\n $bundle_fields = \\Drupal::getContainer()->get('entity_field.manager')->getFieldDefinitions($bundle, $entity_type);\n if (empty($bundle_fields[$field_name])) {\n Assert::assertEmpty($bundle_fields, $field_name . ' is not present on the ' . $entity_type . \" \" . $bundle);\n }\n }", "function macro_is_entity($path)\n{\n return preg_match('/XLite.Model.|XLite.Module.\\w+.\\w+.Model./Ss', $path);\n}", "public function searchEntitiesByType($type)\n {\n $deployableWorkflowStateList = $this->_loadDeployableWorkflowStates();\n\n $query = \"\n SELECT `eid`\n ,`revisionid`\n ,`entityid`\n ,`state`\n FROM \" . self::$prefix . \"entity AS ENTITY_REVISION\n WHERE `type` = ?\n AND `revisionid` = (\n SELECT MAX(`revisionid`)\n FROM \" . self::$prefix . \"entity AS ENTITY\n WHERE ENTITY.eid = ENTITY_REVISION.eid\n )\n \";\n $queryVariables = array($type);\n\n // Add deployabe state check\n $nrOfWorkflowStates = count($deployableWorkflowStateList);\n $fWorkflowStateInPlaceholders = substr(str_repeat('?,',$nrOfWorkflowStates), 0, -1);\n $query .= \" AND `state` IN(\" . $fWorkflowStateInPlaceholders . \")\";\n $queryVariables = array_merge($queryVariables, $deployableWorkflowStateList);\n\n $st = $this->execute($query, $queryVariables);\n\n if ($st === false) {\n return 'error_db';\n }\n\n $this->_entities = array();\n $rows = $st->fetchAll(PDO::FETCH_ASSOC);\n foreach ($rows AS $row) {\n $entity = new sspmod_janus_Entity($this->_config);\n $entity->setEid($row['eid']);\n if ($entity->load()) {\n $this->_entities[] = $entity;\n } else {\n SimpleSAML_Logger::error(\n 'JANUS:UserController:searchEntitiesByType - Entity could not be\n loaded, eid: '.$row['eid']\n );\n }\n }\n return $this->_entities; \n }", "protected function checkReferenceOnEntityType($entity_type, $bundle, $reference_field_label, $reference_field_name) {\n $this->loginWithPermissions([\"create $bundle content\"]);\n $this->drupalGet(\"node/add/$bundle\");\n $this->assertText($reference_field_label);\n // @todo Check html for field\n $this->loginLastUser();\n // $field_id = 'edit-' . str_replace('_', '-', $reference_field_name);\n //$this->assertFieldbyId($field_id);\n }", "public function isReportEntityType($entity = null)\n {\n return false;\n }", "function checkType($type){\n\n $allowed = array('jpg', 'jpeg', 'png');\n $fileExt = explode('/', $type);\n $fileExt = strtolower(end($fileExt));\n return in_array($fileExt, $allowed) ? true : false ;\n\n }", "function checkTablesIntegrity() {\n \n $sm = $this->db->getSchemaManager();\n\n $tables = $this->getTables();\n \n // Check the users table..\n if (!isset($tables[$this->prefix.\"users\"])) {\n return false; \n }\n \n \n \n // Check the taxonomy table..\n if (!isset($tables[$this->prefix.\"taxonomy\"])) {\n return false; \n }\n \n // Now, iterate over the contenttypes, and create the tables if they don't exist.\n foreach ($this->config['contenttypes'] as $key => $contenttype) {\n\n $tablename = $this->prefix . makeSlug($key);\n \n if (!isset($tables[$tablename])) {\n return false; \n }\n \n // Check if all the fields are present in the DB..\n foreach($contenttype['fields'] as $field => $values) {\n if (!isset($tables[$tablename][$field])) {\n return false;\n }\n }\n \n }\n\n \n return true; \n \n }", "public function getEntityClass();", "protected function _exists($key,$typ,$uname){\r\n if($this->bag[0]->count($this->bag[1],array('key'=>$key,'type'=>$typ,'uname'=>$uname))!=1) return FALSE;\r\n return $this->bag[0]->load_field($this->bag[1],'id',array('key'=>$key,'type'=>$typ,'uname'=>$uname));\r\n }", "function _checkAllowedEntryType($entry) {\n\t\treturn in_array($entry, $this->allowedEntryTypes);\n\t}", "public function exists() {}", "public static function isValidEntityType($entityType)\n {\n return (in_array($entityType, [\n static::ENTITY_TYPE_ORDER,\n static::ENTITY_TYPE_CUSTOMER,\n ]));\n }", "public static function hasType($type)\n {\n \t$types = array_keys(self::getTypes());\n return false !== in_array($type, $types);\n }", "abstract protected function assertEntityClass();" ]
[ "0.68108726", "0.6652305", "0.65877634", "0.65792507", "0.6565098", "0.65342337", "0.6360991", "0.6326077", "0.6321625", "0.6262326", "0.61903954", "0.6188985", "0.6178305", "0.6155019", "0.6114054", "0.6097126", "0.6044834", "0.60335714", "0.60335714", "0.60335714", "0.6032001", "0.6027361", "0.5947106", "0.5941511", "0.5932704", "0.591327", "0.59020084", "0.589839", "0.58536935", "0.58393097", "0.58273745", "0.5813817", "0.57966715", "0.57866436", "0.5786049", "0.5785785", "0.57843715", "0.5772578", "0.57700264", "0.5767776", "0.5767265", "0.5763015", "0.5759321", "0.5758662", "0.57478374", "0.5744373", "0.57377446", "0.57219726", "0.57097137", "0.5703246", "0.5684993", "0.56818867", "0.5655984", "0.5652765", "0.5651749", "0.5649932", "0.5649932", "0.5639339", "0.56302905", "0.560549", "0.5595739", "0.5590806", "0.55899775", "0.558932", "0.5577611", "0.5556686", "0.5555724", "0.5538846", "0.5538846", "0.5522879", "0.5518074", "0.551682", "0.55151564", "0.5506904", "0.550581", "0.5504994", "0.5504666", "0.55025446", "0.5496942", "0.5488537", "0.5476095", "0.54683375", "0.5458812", "0.5457857", "0.5449571", "0.5429201", "0.5428159", "0.5408556", "0.5408227", "0.54062456", "0.5405867", "0.54045355", "0.540367", "0.5389431", "0.53863657", "0.53828454", "0.5380971", "0.5380283", "0.5365423", "0.53647274" ]
0.69549507
0
Form constructor for the entity bundle creation.
function mongo_node_bundle_create_form($form, $form_state, $entity_type) { $form = array(); $form['label'] = array( '#type' => 'textfield', '#title' => t('Entity type'), '#description' => t('The human readable name of the entity.'), ); $form['name'] = array( '#type' => 'machine_name', '#required' => FALSE, '#machine_name' => array( 'exists' => '_mongo_node_bundle_exists', 'source' => array('label'), ), ); $form['description'] = array( '#type' => 'textarea', '#title' => t('Description'), '#description' => t('Describe this bundle.'), ); $form['entity_type'] = array( '#type' => 'value', '#value' => $entity_type, ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(\\Library\\Entity $entity){\n\t\t$this->setForm(new Form\\Form($entity));\n\t}", "public function __construct($form)\n\t{\n\t\t$formPackage = $form->getMergePackage();\n\t\t$this->name = $form->getName();\n\t\t$this->form = $form;\n\t\t$this->inputs = $formPackage['inputs'];\n\t\t$this->sectionIntro = $formPackage['intros'];\n\t\t$this->sectionOutro = $formPackage['outros'];\n\t\t$this->sectionLegends = $formPackage['legends'];\n\t\t$this->sectionClasses = $formPackage['classes'];\n\t\t$this->errors = $formPackage['errors'];\n\t}", "public function __construct()\n {\n parent::__construct('ServicioForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'servicio_nombre',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Nombre',\n ),\n ));\n $this->add(array(\n 'name' => 'servicio_descripcion',\n 'type' => 'textarea',\n 'options' => array(\n 'label' => 'Descripcion',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_costo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Costo',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_precio',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Precio',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_iva',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'IVA',\n ),\n ));\n \n\n\n }", "protected function _construct()\n {\n $this->_init(\\AddictedToMagento\\DynamicForms\\Model\\ResourceModel\\Form::class);\n }", "public function __construct($FormName)\n\t {\n\t \t// Call parent's constructor with the form name so nothing breaks down.\n\t \tparent::__construct($FormName);\n\t\t\t\n // ProductID.\n\t\t\t$this->add(\n\t\t\t[\n\t 'name' => 'productId',\n\t 'attributes' =>\n\t [\n\t 'type' => 'text',\n\t 'id' => 'productId',\n 'required' => 'required',\n\t \t],\n\t 'options' => ['label' => 'ProductID']\n\t ]);\n\t\t\t\n\t\t\t// Submit button.\n\t\t\t$this->add(\n\t\t\t[\n\t 'name' => 'submitDeleteProductForm',\n\t 'attributes' =>\n\t [\n\t 'type' => 'submit',\n\t 'id' => 'submitDeleteProductForm',\n 'required' => 'required',\n 'value' => 'Delete',\n\t \t]\n\t ]);\n\t }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "public function createForm()\n {\n }", "public function initialize()\n {\n $this->setEntity($this);\n\n // full name\n $key = new Text(\n \t'key',\n \t[\n \t\t\"required\"=>true,\n \t\t\"class\"=>\"form-control\",\n \t\t\"id\"=>\"key\",\n \t]\n );\n\n $key->addFilter('string');\n\n // full name\n $value = new Text(\n \t'val',\n \t[\n \t\t\"required\"=>true,\n \t\t\"class\"=>\"form-control\",\n \t\t\"id\"=>\"value\",\n \t]\n );\n\n $value->addFilter('string');\n \n\n \n \n\n $this->add($key);\n $this->add($value);\n\n // Add a text element to put a hidden CSRF\n $this->add(\n new Hidden(\n 'csrf'\n )\n );\n }", "public function __construct()\n {\n parent::__construct();\n $this->FormGenerator = new FormGenerator();\n }", "public function __construct()\n {\n parent::__construct(array(\n 'name' => __('WS Form', 'ws-form'),\n 'description' => __('Add a form.', 'ws-form'),\n 'category'\t\t=> __('Basic', 'ws-form'),\n 'dir' => FL_WS_FORM_DIR . 'modules/ws-form/',\n 'url' => FL_WS_FORM_URL . 'modules/ws-form/',\n 'editor_export' => true, // Defaults to true and can be omitted.\n 'enabled' => true, // Defaults to true and can be omitted.\n 'icon' => 'icon.svg'\n ));\n }", "public function initialize($entity = null, $options = array())\n { \n $titulo = new Text(\"nome\");\n $titulo->setAttribute('class','form-control ');\n $this->add($titulo);\n\n $email = new Text(\"email\");\n $email->setAttribute('class','form-control ');\n $this->add($email);\n\n }", "abstract public function createForm();", "abstract public function createForm();", "public function __construct(array $form)\n {\n $this->form = $form;\n }", "public function __construct(Form $form)\n {\n $this->form = $form;\n }", "public function __construct(Form $form)\n {\n $this->form = $form;\n }", "public function initialize($entity = null, $options = null)\n {\n if (isset($options['edit']) && $options['edit']) {\n $id = new Hidden('id');\n } else {\n $id = new Text('id');\n }\n\n $this->add($id);\n\n // //id reseller\n // $id_reseller= new Text('id_reseller', [\n // 'placeholder' => 'Id Reseller'\n // ]);\n //\n // $id_reseller->setLabel('Reseller');\n // // $id_reseller->addValidators([\n // // new PresenceOf([\n // // 'message' => 'Id Reseller is required'\n // // ])\n // // ]);\n // $this->add($id_reseller);\n\n //nama agen\n $nama_agen = new Text('nama_agen', [\n 'placeholder' => 'Nama Agen'\n ]);\n\n $nama_agen->setLabel('Nama Agen');\n\n $nama_agen->addValidators([\n new PresenceOf([\n 'message' => 'Nama Agen is required'\n ])\n ]);\n\n $this->add($nama_agen);\n\n\n //merk\n $merk = new Text('merk', [\n 'placeholder' => 'Merk'\n ]);\n\n $merk->setLabel('Merk');\n $merk->addValidators([\n new PresenceOf([\n 'message' => 'Merk is required'\n ])\n ]);\n\n $this->add($merk);\n\n\n //serial number\n $serial_number = new Text('serial_number', [\n 'placeholder' => 'Serial Number'\n ]);\n\n $serial_number->setLabel('Serial Number');\n $serial_number->addValidators([\n new PresenceOf([\n 'message' => 'Serial Number is required'\n ])\n ]);\n\n $this->add($serial_number);\n\n\n //lokasi\n $lokasi = new Text('lokasi', [\n 'placeholder' => 'Lokasi'\n ]);\n\n $lokasi->setLabel('Lokasi');\n $lokasi->addValidators([\n new PresenceOf([\n 'message' => 'Lokasi is required'\n ])\n ]);\n\n $this->add($lokasi);\n\n\n //alamat\n $alamat = new Text('alamat', [\n 'placeholder' => 'Alamat'\n ]);\n\n $alamat->setLabel('Alamat');\n $alamat->addValidators([\n new PresenceOf([\n 'message' => 'Alamat is required'\n ])\n ]);\n\n $this->add($alamat);\n\n // Save\n $this->add(new Submit('Save', [\n 'class' => 'btn btn-success',\n 'id'=> 'submit'\n ]));\n\n // Save\n $this->add(new Submit('Search', [\n 'class' => 'btn btn-success',\n 'id'=> 'submit'\n ]));\n\n //id_doctor\n $findreseller = Users::find([\"profilesId = '5'\"]);\n $id_reseller = new Select('id_reseller', $findreseller, [\n 'using' => [\n 'id',\n 'name'\n ],\n 'useEmpty' => true,\n 'emptyText' => '----Select Reseller----',\n 'emptyValue' => ''\n ]);\n $id_reseller->setLabel('Reseller *');\n $this->add($id_reseller);\n\n }", "function mongo_node_bundle_create_form_submit($form, $form_state) {\n $entity_type = $form_state['values']['entity_type'];\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n\n // @todo - redirect to bundle type page.\n mongo_node_settings_save($set);\n}", "public function createForm();", "public function createForm();", "public function __construct (FormBuilder $formBuilder)\n {\n $this->middleware('auth');\n\n $this->formBuilder = $formBuilder;\n $this->entity = 'posts';\n }", "private function createForm()\n\t{\n\t\t$builder = $this->getService('form')->create();\n\t\t$builder->setValidatorService($this->getService('validator'));\n\t\t$builder->setFormatter(new BasicFormFormatter());\n\t\t$builder->setDesigner(new DoctrineDesigner($this->getDoctrine(), 'Entity\\User',array('location')));\n\n\t\t$builder->getField('location')->setRequired(true);\n\t\t$builder->submit($this->getRequest());\n\n\t\treturn $builder;\n\t}", "public function init()\n {\n $this->add([\n 'name' => 'name',\n 'type' => Text::class,\n 'attributes' => [\n 'placeholder' => 'Full Name',\n 'autofocus' => true,\n ],\n 'options' => [\n 'label' => 'Name',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'email',\n 'type' => Email::class,\n 'attributes' => [\n 'placeholder' => 'Email Address',\n ],\n 'options' => [\n 'label' => 'Email',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'subject',\n 'type' => Text::class,\n 'options' => [\n 'label' => 'Subject',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n 'attributes' => [\n 'placeholder' => 'Subject',\n ],\n ]);\n\n $this->add([\n 'name' => 'transport',\n 'type' => Select::class,\n 'options' => [\n 'label' => 'Department',\n 'value_options' => $this->getTransportList(),\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'body',\n 'type' => Textarea::class,\n 'options' => [\n 'label' => 'Message',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n 'attributes' => [\n 'placeholder' => 'Your message',\n 'rows' => 10,\n ],\n ]);\n\n if (true === $this->getOption('enable_captcha')) {\n $this->add([\n 'name' => 'captcha',\n 'type' => Captcha::class,\n 'attributes' => [\n 'placeholder' => 'Type letters and number here',\n ],\n 'options' => [\n 'label' => 'Please verify you are human',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10 col-sm-offset-2',\n 'label_attributes' => [\n 'class' => 'col-sm-10 col-sm-offset-2',\n ],\n ],\n ]);\n }\n\n $this->add([\n 'name' => 'csrf',\n 'type' => Csrf::class,\n ]);\n\n $this->add([\n 'name' => 'submit',\n 'type' => Submit::class,\n 'attributes' => [\n 'id' => 'contact-submit-button',\n 'class' => 'btn btn-primary',\n ],\n 'options' => [\n 'label' => 'Send',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10 col-sm-offset-2',\n ]\n ]);\n }", "public function __construct()\n {\n $tmpl = implode(\n DIRECTORY_SEPARATOR,\n array(ARCH_PATH, 'theme', 'form', 'form.php')\n );\n parent::__construct($tmpl);\n }", "public function __construct( Form $form ) {\n\t\t$this->form = $form;\n\t\t$this->phpRenderer = $this->form->getRenderer();\n\t\t$this->templatesEngine = ( Application::get() )->plugin->get( Engine::class );\n\n\t\t$this->setupFieldsAttributes();\n\t}", "private function createCreateForm(BonCommandeLigne $entity)\n {\n $form = $this->createForm(new BonCommandeLigneType(), $entity, array(\n 'action' => $this->generateUrl('boncommandeligne_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function __construct($name = null)\n {\n parent::__construct('serviceform');\n\n $this->add(array(\n 'name' => 'id',\n 'type' => 'Hidden',\n ));\n $this->add(array(\n 'name' => 'name',\n 'type' => 'Text',\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'composition',\n 'type' => 'Text',\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n $this->add(array(\n 'name' => 'description',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'url',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'input',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'output',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'categories',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'submit',\n 'type' => 'Submit',\n 'attributes' => array(\n 'value' => 'Create',\n 'id' => 'submit',\n 'class' => 'btn btn-success',\n ),\n ));\n $this->setAttribute('class','form-horizontal');\n\n }", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n $element = new Text(\"id\");\n $this->add($element->setLabel(\"Id\"));\n } else {\n $this->add(new Hidden(\"id\"));\n }\n\n $name = new Text(\"nombre\");\n $name->setLabel(\"Nombre\");\n $name->setFilters(['striptags', 'string']);\n $name->addValidators([\n new PresenceOf([\n 'message' => 'El Nombre es Requerido'\n ])\n ]);\n $this->add($name);\n\n $genero = new Select('id_genero', Generos::find(), [\n 'using' => ['id_genero', 'genero'],\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ]);\n $genero->setLabel('Genero de Pelicula');\n $this->add($genero);\n\n $year = new Text(\"Año\");\n $year->setLabel(\"Año\");\n $year->setFilters(['date']);\n $year->addValidators([\n new PresenceOf([\n 'message' => 'Por favor ingrese el Año'\n ])\n ]);\n $this->add($year);\n }", "function __construct($form = null)\n\t{\n\t\t$lang = Factory::getLanguage();\n\t\t$lang->load(\"com_jevents\", JPATH_ADMINISTRATOR);\n\n\t\tparent::__construct($form);\n\t\t$this->data = array();\n\t\t$this->labeldata = array();\n\n\t}", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "public function __construct()\n\t{\n\t $this->entity = new TiposContacto;\n\t}", "private function createCreateForm(Ligne $entity)\n {\n $form = $this->createForm(new LigneType(), $entity, array(\n 'action' => $this->generateUrl('ligne_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function create() {\r\n\t\r\n\t$form = new Form();\r\n\t$form->setTranslator($this->translator);\r\n\treturn $form;\r\n }", "public function __construct(&$form_state) {\n $this->initializeStorage($form_state);\n $this->formState = &$form_state;\n $this->storage = &$this->formState['storage'][STORAGE_KEY];\n $this->collectionPid = $this->storage['collection_pid'];\n $this->collectionLabel = $this->storage['collection_label'];\n $this->contentModelPid = isset($this->storage['content_model_pid']) ? $this->storage['content_model_pid'] : NULL;\n $this->contentModelDsid = isset($this->storage['content_model_dsid']) ? $this->storage['content_model_dsid'] : NULL;\n $this->formName = isset($this->storage['form_name']) ? $this->storage['form_name'] : NULL;\n $this->page = &$this->storage['ingest_form_page'];\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 }", "function custom_entity_generate_form($form, $form_state, $name) {\n $form['entity_label'] = array(\n '#type' => 'value',\n '#value' => $name,\n );\n $form['kill_entities'] = array(\n '#type' => 'checkbox',\n '#title' => t('<strong>Delete all @name</strong> before generating new @name.', ['@name' => $name]),\n '#default_value' => FALSE,\n );\n\n $form['num_entities'] = array(\n '#type' => 'textfield',\n '#title' => t('How many @name would you like to generate?', ['@name' => $name]),\n '#default_value' => 50,\n '#size' => 10,\n );\n\n $form['title_length'] = array(\n '#type' => 'textfield',\n '#title' => t('Max word length of titles'),\n '#default_value' => 4,\n '#size' => 10,\n );\n\n unset($options);\n $options[LANGUAGE_NONE] = t('Language neutral');\n if (module_exists('locale')) {\n $options += locale_language_list();\n }\n $form['add_language'] = array(\n '#type' => 'select',\n '#title' => t('Set language on @name', ['@name' => $name]),\n '#multiple' => TRUE,\n '#disabled' => !module_exists('locale'),\n '#description' => t('Requires locale.module'),\n '#options' => $options,\n '#default_value' => array(LANGUAGE_NONE => LANGUAGE_NONE),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Generate'),\n );\n $form['#redirect'] = FALSE;\n\n return $form;\n}", "public function newAction()\n {\n //Get the entity manager.\n $em = $this->get('doctrine.orm.entity_manager'); \n \n //Get the list of categories as an array. \n $categories = $em->getRepository('JobeetBundle:JobeetCategory')\n ->getCategoriesAsOptions(); \n \n //Set up the form.\n $job = new JobeetJob();\n $form = JobForm::create($categories, $job, $this->get('validator')); \n \n //If a POST, process the form and persist it if valid.\n $request = $this->get('request');\n if ('POST' === $request->getMethod()) {\n //Register an event subscriber to index the job.\n $em->getEventManager()->addEventSubscriber(new LuceneListener($this->get('lucene_search')));\n \n $params = $request->request->get('job'); \n \n //Get the category object.\n $params['category'] = $em->getReference('JobeetBundle:JobeetCategory', $params['category']); \n \n //TODO:VALIDATE HERE\n \n //Get uploaded files and bind the form.\n $files = $request->files->get('job'); \n //unset($params['category_id']);\n $form->bind($params, $files);\n \n //If there is a logo uploaded, move it to the uploads dir.\n if($files['logo']['file']) { \n $name = uniqid().'-'.$files['logo']['file']->getOriginalName();\n $files['logo']['file']->move($this->container->getParameter('frontend.logos_dir')); \n $files['logo']['file']->rename($name); \n }\n else {\n $name = '';\n } \n \n //Set the logo filename and persist the entity.\n $job->setLogo($name); \n $em->persist($job); \n $em->flush();\n }\n \n return $this->render('FrontendBundle:Job:new.twig', array('form' => $form));\n }", "private function createCreateForm(Bien $entity)\n {\n $form = $this->createForm(new BienType(), $entity, array(\n 'action' => $this->generateUrl('bien_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Crear','attr' => array('class' => 'btn btn-success'),));\n return $form;\n }", "public function __construct( $form_type, $args )\n {\n parent::__construct( $form_type.'_form', $args );\n $this->form_type = $form_type;\n \n $this->add_column( 'id', 'number', 'ID', true );\n $this->add_column( 'date', 'date', 'Date Added', true );\n $this->add_column( 'typist_1', 'string', 'Typist 1', false );\n $this->add_column( 'typist_1_submitted', 'boolean', 'Submitted', false );\n $this->add_column( 'typist_2', 'string', 'Typist 2', false );\n $this->add_column( 'typist_2_submitted', 'boolean', 'Submitted', false );\n $this->add_column( 'conflict', 'boolean', 'Conflict', false );\n }", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n\n $elemento = new Text(\"formacion_id\");\n $this->add($elemento->setLabel(\"Id\"));\n } else {\n $this->add(new \\Phalcon\\Forms\\Element\\Hidden(\"formacion_id\"));\n }\n /*========================== ==========================*/\n $elemento = new Text('formacion_institucion',array('maxlength'=>50,'class'=>'form-control','required'=>'true','placeholder'=>'Ingrese el nombre de la institución'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Institución');\n $elemento->setFilters(array('striptags', 'string'));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'El nombre de la institución es requerido'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_gradoId', \\Curriculum\\Grado::find(), array(\n 'using' => array('grado_id', 'grado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el nivel'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Nivel');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Text('formacion_titulo',array('maxlength'=>50,'class'=>'form-control','placeholder'=>'Ingrese el nombre del Titulo','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Titulo');\n $elemento->setFilters(array('striptags', 'string'));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_estadoId', \\Curriculum\\Estado::find(), array(\n 'using' => array('estado_id', 'estado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el estado'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Estado');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaInicio',array('class'=>'form-control','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Fecha de Inicio');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha de inicio es requerida.'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaFinal',array('class'=>'form-control', 'disabled'=>''));\n $elemento->setLabel('Fecha Final');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha final es requerida.'\n ))\n ));\n $this->add($elemento);\n\n }", "public function init()\n { \n $this->setMethod('post');\n $this->setAttrib('id', 'IngredientAddForm');\n //$this->setAttrib('name', 'IngredientAddForm');\n //$this->setName('add_ingredient_form');\n \n $this->addElement('select', 'ingredient_id', [\n 'label' => 'Ingredient:',\n 'id' => '',\n 'required' => true,\n 'filters' => ['StringTrim'],\n 'validators' => [],\n 'multiOptions'=> $this->ingredients,\n ]);\n\n $this->addElement('text', 'quantity', [\n 'label' => 'Quantity:',\n 'required' => true,\n 'validators' => [],\n ]); \n \n\n $this->addElement('submit', 'submit_add', [\n 'ignore' => true,\n 'class' => 'btn btn-md btn-primary',\n 'label' => 'Save',\n ]);\n\n $this->addElement('hash', 'csrf_add_ingredient_form', array(\n 'ignore' => true,\n ));\n }", "public function __construct() {\n $form = $this->form(Company::class);\n $model = \\Platform\\Models\\Company::first()->getFillable();\n $columns = $form->getFields();\n\n // Remove columns\n array_forget($columns, [\n 'password', \n 'logo', \n 'role', \n 'users', \n 'projects', \n 'header1', \n 'header2', \n 'header3', \n 'header4', \n 'header5', \n 'header6', \n 'header7', \n 'header8', \n 'header9', \n 'header10',\n 'default', \n 'notes', \n 'back', \n 'submit'\n ]);\n\n $table_columns = [];\n $header_names = [];\n\n foreach ($columns as $column_name => $column) {\n $options = $column->getOptions();\n\n $table_columns[] = $column_name;\n $header_names[] = $options['label'];\n }\n\n // Add columns for export\n array_unshift($table_columns, 'id');\n array_unshift($header_names, 'ID');\n\n $header_names[] = 'Created at';\n $header_names[] = 'Created by';\n $header_names[] = 'Updated at';\n $header_names[] = 'Updated by';\n\n $table_columns[] = 'created_at';\n $table_columns[] = 'created_by';\n $table_columns[] = 'updated_at';\n $table_columns[] = 'updated_by';\n\n $this->table_columns = $table_columns;\n $this->header_names = $header_names;\n }", "public function __construct(){\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\n\t\t$this->form = new Formly()->set_options(\n\t\t\tarray(\n\t\t\t\t'framework'=>$this->form_framework,\n\t\t\t\t'form_class'=>$this->form_class;\n\t\t\t)\n\t\t);\n\n\t}", "function __construct()\n {\n parent::__construct();\n\n $usuario_logado = TSession::getValue('login');\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_Equipe');\n $this->form->setFormTitle('Inscrição');\n \n // master fields\n $id = new TEntry('id');\n $nome = new TEntry('nome');\n $ref_campeonato = new TDBCombo('ref_campeonato', 'futapp', 'Campeonato', 'id', '{nome}','id asc' );\n $ref_categoria = new TCombo('ref_categoria');\n $escudo = new TFile('escudo');\n $usuario = new THidden('usuario');\n \n // detail fields\n $id_atleta = new THidden('id_atleta');\n $nome_atleta = new TEntry('nome_atleta');\n $cpf = new TEntry('cpf');\n\n if(TSession::getValue('login') == 'J30EVENTOS' || TSession::getValue('login') == 'admin' || TSession::getValue('login') == 'Roni')\n {\n $ja_jogou = new TCombo('ja_jogou');\n\n $ja_jogou->addItems( [ 't' => 'Sim', 'f' => 'Não' ] ); \n $label_ja = new TLabel('Já Jogou ?'); \n }\n else\n {\n $ja_jogou = new THidden('ja_jogou');\n $label_ja = new TLabel(' ');\n }\n\n\n $ref_campeonato->setChangeAction(new TAction([$this,'onMudaCampeonato']));\n $usuario->setValue($usuario_logado);\n\n $ref_campeonato->setEditable(false);\n \n // adjust field properties\n $id->setEditable(false);\n $id_atleta->setEditable(false);\n $nome->setSize('100%');\n $nome_atleta->setSize('100%');\n $cpf->setSize('100%');\n $cpf->setMask('99999999999');\n\n // allow just these extensions\n $escudo->setAllowedExtensions( ['png', 'jpg', 'jpeg'] );\n \n // enable progress bar, preview, and file remove actions\n $escudo->enableFileHandling();\n \n // add validations\n $nome->addValidation('Nome', new TRequiredValidator);\n \n // add master form fields\n $this->form->addFields( [new TLabel('ID')], [$id]);\n $this->form->addFields( [new TLabel('Nome da Equipe')], [$nome ] );\n $this->form->addFields( [new TLabel('Campeonato')], [$ref_campeonato ] );\n $this->form->addFields( [new TLabel('Categoria')], [$ref_categoria ] );\n $this->form->addFields( [new TLabel('Escudo')], [$escudo] );\n $this->form->addFields( [new TLabel('')], [$usuario] );\n \n \n $add_atleta = TButton::create('add_atleta', [$this, 'onProductAdd'], 'Adicionar', 'fa:save');\n \n $Label_id = new TLabel('');\n $Label_nome = new TLabel('Nome Completo (*)');\n $label_cpf = new TLabel('CPF (*)');\n\n $Label_nome->setFontColor('#FF0000');\n $label_cpf->setFontColor('#FF0000');\n \n $this->form->addContent( ['<h4>Atletas</h4><hr>'] );\n $this->form->addContent( ['Digite o Nome e CPF do atleta e clique em ADICIONAR para inserir o atleta na equipe.'] );\n $this->form->addContent( ['Para editar os dados do atleta clique no icone do lapis azul.'] );\n $this->form->addContent( ['Para remover o atleta clique no icone da lixeira vermelha.'] );\n $this->form->addFields( [$Label_id], [$id_atleta]);\n $this->form->addFields( [$Label_nome], [$nome_atleta]);\n $this->form->addFields( [$label_cpf], [$cpf]);\n $this->form->addFields( [$label_ja], [$ja_jogou]);\n $this->form->addFields( [], [$add_atleta] )->style = 'background: whitesmoke; padding: 5px; margin: 1px;';\n \n $this->product_list = new BootstrapDatagridWrapper(new TDataGrid);\n $this->product_list->setId('products_list');\n $this->product_list->style = \"min-width: 700px; width:100%;margin-bottom: 10px\";\n \n $col_id = new TDataGridColumn( 'id_atleta', 'ID', 'left', '10%');\n $col_nome = new TDataGridColumn( 'nome_atleta', 'Nome', 'left', '45%');\n $col_cpf = new TDataGridColumn( 'cpf', 'CPF', 'left', '45%');\n $col_jogou = new TDataGridColumn( 'ja_jogou', 'Já Jogou?', 'left', '45%');\n \n $this->product_list->addColumn($col_id);\n $this->product_list->addColumn($col_nome);\n $this->product_list->addColumn($col_cpf);\n $this->product_list->addColumn($col_jogou);\n\n $col_jogou->setTransformer( function($ja_jogou) \n {\n if ($ja_jogou == 't') \n {\n return 'Sim';\n }\n else\n {\n return 'Não';\n }\n });\n \n // creates two datagrid actions\n $action1 = new TDataGridAction([$this, 'onEditItemProduto']);\n $action1->setLabel('Editar');\n $action1->setImage('fa:edit blue');\n $action1->setField('id_atleta');\n $action1->setField('nome_atleta');\n $action1->setField('cpf');\n $action1->setField('ja_jogou');\n \n $action2 = new TDataGridAction([$this, 'onDeleteItem']);\n $action2->setLabel('Excluir');\n $action2->setImage('fa:trash red');\n $action2->setField('id_atleta');\n // $action2->setField('nome_atleta');\n // $action2->setField('cpf');\n \n // add the actions to the datagrid\n $this->product_list->addAction($action1);\n $this->product_list->addAction($action2);\n \n $this->product_list->createModel();\n \n $panel = new TPanelGroup;\n $panel->add($this->product_list);\n $panel->getBody()->style = 'overflow-x:auto';\n $this->form->addContent( [$panel] );\n \n $this->form->addAction( 'Salvar', new TAction([$this, 'onSave']), 'fa:save green');\n // $this->form->addAction( 'Clear', new TAction([$this, 'onClear']), 'fa:eraser red');\n \n // create the page container\n $container = new TVBox;\n $container->style = 'width: 100%';\n // $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $container->add($this->form);\n parent::add($container);\n }", "public function __construct(FormInterface $form)\n {\n // Grab the Fields out of the form...\n $this->fields = $form->getData()['fields'];\n }", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function createForm(FormBuilder $formBuilder, Translator $translator);", "protected function _construct()\r\n {\r\n parent::_construct();\r\n $this->setTemplate('placetopay/form.phtml');\r\n }", "public function __construct()\n {\n parent::__construct();\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle(\"Listagem de emprestimos\");\n\n $exemplar_id = new TDBUniqueSearch('exemplar_id', 'biblioteca', 'Exemplar', 'id', 'codigo_barras','id asc' );\n $leitor_id = new TDBUniqueSearch('leitor_id', 'biblioteca', 'Leitor', 'id', 'nome','nome asc' );\n $dt_emprestimo = new TDate('dt_emprestimo');\n $dt_emprestimo_final = new TDate('dt_emprestimo_final');\n $dt_previsao = new TDate('dt_previsao');\n $dt_prevista_final = new TDate('dt_prevista_final');\n $dt_devolucao = new TDate('dt_devolucao');\n $dt_devolucao_final = new TDate('dt_devolucao_final');\n\n $leitor_id->setMinLength(2);\n $exemplar_id->setMinLength(1);\n\n $dt_previsao->setDatabaseMask('yyyy-mm-dd');\n $dt_devolucao->setDatabaseMask('yyyy-mm-dd');\n $dt_emprestimo->setDatabaseMask('yyyy-mm-dd');\n $dt_prevista_final->setDatabaseMask('yyyy-mm-dd');\n $dt_devolucao_final->setDatabaseMask('yyyy-mm-dd');\n $dt_emprestimo_final->setDatabaseMask('yyyy-mm-dd');\n\n $leitor_id->setSize('70%');\n $dt_previsao->setSize(100);\n $dt_devolucao->setSize(100);\n $exemplar_id->setSize('70%');\n $dt_emprestimo->setSize(100);\n $dt_prevista_final->setSize(100);\n $dt_devolucao_final->setSize(100);\n $dt_emprestimo_final->setSize(100);\n\n $leitor_id->setMask('{nome}');\n $dt_previsao->setMask('dd/mm/yyyy');\n $dt_devolucao->setMask('dd/mm/yyyy');\n $dt_emprestimo->setMask('dd/mm/yyyy');\n $exemplar_id->setMask('{livro->titulo}');\n $dt_prevista_final->setMask('dd/mm/yyyy');\n $dt_devolucao_final->setMask('dd/mm/yyyy');\n $dt_emprestimo_final->setMask('dd/mm/yyyy');\n\n $row1 = $this->form->addFields([new TLabel(\"Exemplar:\", null, '14px', null)],[$exemplar_id]);\n $row2 = $this->form->addFields([new TLabel(\"Leitor:\", null, '14px', null)],[$leitor_id]);\n $row3 = $this->form->addFields([new TLabel(\"Data de empréstimo inicial:\", null, '14px', null)],[$dt_emprestimo],[new TLabel(\"Data de empréstimo final:\", null, '14px', null)],[$dt_emprestimo_final]);\n $row4 = $this->form->addFields([new TLabel(\"Data prevista de devolução inicial:\", null, '14px', null)],[$dt_previsao],[new TLabel(\"Data prevista de devolução final:\", null, '14px', null)],[$dt_prevista_final]);\n $row5 = $this->form->addFields([new TLabel(\"Data de devolução inicial:\", null, '14px', null)],[$dt_devolucao],[new TLabel(\"Data de devolução final:\", null, '14px', null)],[$dt_devolucao_final]);\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_onsearch = $this->form->addAction(\"Buscar\", new TAction([$this, 'onSearch']), 'fas:search #ffffff');\n $btn_onsearch->addStyleClass('btn-primary'); \n\n $btn_onexportcsv = $this->form->addAction(\"Exportar como CSV\", new TAction([$this, 'onExportCsv']), 'far:file-alt #000000');\n\n $btn_onshow = $this->form->addAction(\"Novo emprestimo\", new TAction(['EmprestimoLivroForm', 'onShow']), 'fas:plus #69aa46');\n\n // creates a Datagrid\n $this->datagrid = new TDataGrid;\n $this->datagrid->disableHtmlConversion();\n $this->datagrid = new BootstrapDatagridWrapper($this->datagrid);\n $this->filter_criteria = new TCriteria;\n\n $this->datagrid->style = 'width: 100%';\n $this->datagrid->setHeight(320);\n\n $column_id = new TDataGridColumn('id', \"Id\", 'left' , '69px');\n $column_exemplar_livro_titulo = new TDataGridColumn('exemplar->livro->titulo', \"Exemplar\", 'left');\n $column_leitor_nome = new TDataGridColumn('leitor->nome', \"Leitor\", 'left');\n $column_dt_emprestimo_transformed = new TDataGridColumn('dt_emprestimo', \"Emprestado em\", 'left');\n $column_dt_previsao_transformed = new TDataGridColumn('dt_previsao', \"Previsão de devolução\", 'left');\n $column_dt_devolucao_transformed = new TDataGridColumn('dt_devolucao', \"Devolvido em\", 'left');\n\n $column_dt_emprestimo_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n });\n\n $column_dt_previsao_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n });\n\n $column_dt_devolucao_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n }); \n\n $order_id = new TAction(array($this, 'onReload'));\n $order_id->setParameter('order', 'id');\n $column_id->setAction($order_id);\n $order_dt_emprestimo_transformed = new TAction(array($this, 'onReload'));\n $order_dt_emprestimo_transformed->setParameter('order', 'dt_emprestimo');\n $column_dt_emprestimo_transformed->setAction($order_dt_emprestimo_transformed);\n $order_dt_previsao_transformed = new TAction(array($this, 'onReload'));\n $order_dt_previsao_transformed->setParameter('order', 'dt_previsao');\n $column_dt_previsao_transformed->setAction($order_dt_previsao_transformed);\n $order_dt_devolucao_transformed = new TAction(array($this, 'onReload'));\n $order_dt_devolucao_transformed->setParameter('order', 'dt_devolucao');\n $column_dt_devolucao_transformed->setAction($order_dt_devolucao_transformed);\n\n $this->datagrid->addColumn($column_id);\n $this->datagrid->addColumn($column_exemplar_livro_titulo);\n $this->datagrid->addColumn($column_leitor_nome);\n $this->datagrid->addColumn($column_dt_emprestimo_transformed);\n $this->datagrid->addColumn($column_dt_previsao_transformed);\n $this->datagrid->addColumn($column_dt_devolucao_transformed);\n\n $action_onDevolver = new TDataGridAction(array('EmprestimoList', 'onDevolver'));\n $action_onDevolver->setUseButton(true);\n $action_onDevolver->setButtonClass('btn btn-default btn-sm');\n $action_onDevolver->setLabel(\"Devolver\");\n $action_onDevolver->setImage('fa:arrow-up #000000');\n $action_onDevolver->setField(self::$primaryKey);\n $action_onDevolver->setDisplayCondition('EmprestimoList::onExibirDevolver');\n\n $this->datagrid->addAction($action_onDevolver);\n\n // create the datagrid model\n $this->datagrid->createModel();\n\n // creates the page navigation\n $this->pageNavigation = new TPageNavigation;\n $this->pageNavigation->setAction(new TAction(array($this, 'onReload')));\n $this->pageNavigation->setWidth($this->datagrid->getWidth());\n\n $panel = new TPanelGroup;\n $panel->add($this->datagrid);\n\n $panel->addFooter($this->pageNavigation);\n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n // $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $container->add($this->form);\n $container->add($panel);\n\n parent::add($container);\n\n }", "public function __construct($form = null)\n\t{\n\t\tparent::__construct($form);\n\n\t\t// Load the required language\n\t\t$lang = Factory::getLanguage();\n\t\t$lang->load('com_actionlogs', JPATH_ADMINISTRATOR);\n\t}", "public function init()\n {\n $this->add(array(\n 'name' => 'name',\n 'options' => array(\n 'label' => __('Name*'),\n ),\n 'attributes' => array(\n 'type' => 'text',\n ),\n ));\n\n $this->add(array(\n 'name' => 'title',\n 'options' => array(\n 'label' => __('Title*'),\n ),\n 'attributes' => array(\n 'type' => 'text',\n ),\n ));\n $this->add(array(\n 'name' => 'company',\n 'options' => array(\n 'label' => __('Company*'),\n ),\n 'attributes' => array(\n 'type' => 'text',\n ),\n ));\n $this->add(array(\n 'name' => 'email',\n 'options' => array(\n 'label' => __('Email*'),\n ),\n 'attributes' => array(\n\n 'type' => 'text',\n ),\n ));\n $this->add(array(\n 'name' => 'phone',\n 'options' => array(\n 'label' => __('Phone*'),\n ),\n 'attributes' => array(\n 'type' => 'text',\n ),\n ));\n $this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'value' => __('Freetrial'),\n ),\n 'type' => 'submit',\n ));\n }", "protected function _construct()\n {\n $this->_init('bundle/option');\n }", "public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, QueryFactory $query_factory, FormBuilderInterface $form_builder, DateFormatter $date_formatter) {\n parent::__construct($entity_type, $storage);\n $this->queryFactory = $query_factory;\n $this->formBuilder = $form_builder;\n\t $this->dateFormatter = $date_formatter;\n }", "public function init() {\n $this->add([\n 'name' => 'id',\n 'type' => 'hidden'\n ]);\n\n $this->add([\n 'name' => 'title',\n 'type' => 'text'\n ]);\n\n $this->add([\n 'name' => 'text',\n 'type' => 'textarea'\n ]);\n }", "public function CreateForm();", "public function __construct()\n\t{\n\t $this->entity = new EstatusDocumentos;\n\t}", "private function createCreateForm(LocalBanner $entity)\n {\n $form = $this->createForm(new LocalBannerType(), $entity, array(\n 'action' => $this->generateUrl('localbanner_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => $this->get('translator')->transChoice('txt.gravar',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-primary btn-lg')));\n\n return $form;\n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "public function init()\n {\n parent::__construct(\"gallery\");\n\n $vocabulary = $this->getVocabulary();\n\n $this->add(array(\n 'name' => 'name',\n 'type' => 'text',\n 'options' => array(\n 'label' => $this->getTranslator()->translate($vocabulary[\"LABEL_GALLERY_NAME\"])\n ),\n 'attributes' => array(\n 'placeholder' => $this->getTranslator()->translate($vocabulary[\"PLACEHOLDER_GALLERY_NAME\"])\n ),\n\n ));\n\n $this->add(array(\n 'type' => 'text',\n 'name' => 'images',\n 'options' => array(\n 'object_manager' => $this->getEntityManager(),\n 'target_class' => 'Image\\Entity\\Image',\n 'label' => $this->getTranslator()->translate($vocabulary[\"LABEL_GALLERY_IMAGES\"])\n ),\n 'attributes' => array(\n 'class' => 'imageSelect'\n )\n ));\n\n $this->add(array(\n 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect',\n 'name' => 'parentGallery',\n 'options' => array(\n 'label' => $this->getTranslator()->translate($vocabulary[\"LABEL_GALLERY_PARENT_GALLERY\"]),\n 'object_manager' => $this->getEntityManager(),\n 'empty_option' => $this->getTranslator()->translate($vocabulary[\"EMPTY_OPTION\"]),\n 'target_class' => 'Image\\Entity\\Gallery',\n 'property' => 'name',\n 'disable_inarray_validator' => true\n ),\n ));\n }", "public function __construct(EntityManagerInterface $entity_manager, WebformRequestInterface $webform_request, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL) {\n // Calling the parent constructor.\n parent::__construct($entity_manager, $entity_type_bundle_info, $time);\n\n $this->requestHandler = $webform_request;\n }", "private function createFormDefinition()\n {\n $id = $this->getServiceId('form_type');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('form'));\n $definition\n ->setArguments([$this->options['entity']])\n ->addTag('form.type', [\n 'alias' => sprintf('%s_%s', $this->prefix, $this->resourceName)]\n )\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function __construct()\n\t{\n\t $this->entity = new Salidas;\n\t}", "public function __construct($request) {\n $this->request = $request;\n\n // Cargar la configuracion del modulo (modules/moduloName/config.yaml)\n $this->form = new Form($this->entity);\n\n $this->values['request'] = $this->request;\n }", "public function initialize(ThThesaurus $entity = null, $options = ['edit'=>true])\n {\n \t$this->add(new Hidden('id_thesaurus'));\n\n \t$this->addText('nombre', ['tooltip'=>'Título del Thesaurus (requerido)', 'label'=>'Titulo', 'filters'=>array('striptags', 'string'), 'validators'=>[new PresenceOf(['message' => 'Titulo es requerido'])] ]);\n \t//$this->addText('iso25964_identifier', ['label'=>'DC:Identificador', 'filters'=>array('striptags', 'string')]);\n\n \t$this->addTextArea('iso25964_description', ['label'=>'Descripción', 'filters'=>array('striptags', 'string'), 'validators'=>[new PresenceOf(['message' => 'Descripción es requerido'])] ]);\n $this->addText('iso25964_publisher', ['tooltip'=>'Entidad responsable de la publicación', 'label'=>'Editor', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_rights', ['tooltip'=>'Copyright / Otros Derechos de la Información', 'label'=>'Derechos/Copyright', 'filters'=>array('striptags', 'string')]);\n\n $this->addSelect('iso25964_license', ['tooltip'=> 'Licencias para otros trabajos', 'label'=>'Licencia', 'options'=> self::DEFAULT_RIGHTS, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addText('iso25964_coverage', ['tooltip'=>'Cobertura espacial o temporal del Thesaurus', 'label'=>'Cobertura/Alcance', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_created', ['label'=>'Fecha creación', 'filters'=>array('striptags', 'string')]);\n\n $this->addText('iso25964_subject', ['tooltip'=>'Indice de Términos indicando las materias del contenido', 'label'=>'Temática/Contenido', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_language', ['tooltip'=>'Idiomas soportados por el Thesaurus', 'label'=>'Idioma', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_source', ['tooltip'=>'Recursos desde los cuales el Thesaurus fue derivado', 'label'=>'Fuentes', 'filters'=>array('striptags', 'string')]);\n\n $this->addText('iso25964_creator', ['tooltip'=>'Persona o entidad principal responsable de la elaboración', 'label'=>'Creador', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_contributor', ['tooltip'=>'Personas u organizaciones quienes contribuyeron con el Thesaurus', 'label'=>'Colaborador', 'filters'=>array('striptags', 'string')]);\n $this->addSelect('iso25964_type', ['tooltip'=>'El género del vocabulario', 'label'=>'Tipo', 'options'=> self::DEFAULT_TYPES, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n $this->addSelect('is_activo', ['tooltip'=>'Activar / Inactivar', 'label'=>'Activo', 'options'=> [0 => 'NO', 1 => 'SI'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addSelect('is_primario', ['tooltip'=>'Primario (Aparece como pagina inicial del sitio)', 'label'=>'Primario', 'options'=> [0 => 'NO', 1 => 'SI'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addSelect('is_publico', ['tooltip'=>'Publico (Si LECTOR_PERMISO = ANONIMO es explorable sin ingresar como usuario registrado) / Privado (Solo pueden ver los usuarios autorizados)', 'label'=>'Publico/Privado', 'options'=> [0 => 'PRIVADO', 1 => 'PUBLICO'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n $this->addSelect('permisos[]', ['tooltip'=>'Permisos por Usuario', 'label'=>'Tipo', 'options'=> AdUsuarioForm::PERMISOS_TYPES, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n if ($this->isEditable($options)) {\n\n }\n else {\n \tforeach($this->getElements() as &$e) {\n \t\t$e->setAttribute(\"readonly\", \"readonly\");\n \t}\n }\n }", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function __construct() {\n \n parent::__construct();\n $this->load->library('form_builder');\n \n }", "public function __construct() {\n \n parent::__construct();\n $this->load->library('form_builder');\n \n }", "public function initialize()\n {\n if (isset($this->arguments['form'])) {\n $this->arguments = array_replace(\n $this->arguments,\n $this->arguments['form']->vars\n );\n }\n parent::initialize();\n }", "public function buildForm()\n {\n $this\n ->add('group_name', 'text')\n ->add(\n 'organizations',\n 'choice',\n [\n 'choices' => $this->getOrganizationName(),\n 'attr' => ['style' => 'height:100px'],\n 'multiple' => true\n ]\n )\n ->add(\n 'group_identifier',\n 'text',\n [\n 'attr' => [\n 'id' => 'group_identifier'\n ],\n 'help_block' => [\n 'text' => \"Your group identifier will be used as a prefix for your organisation group. We recommend that you use a short abbreviation that uniquely identifies your organisation group. If your group identifier is 'abc' the username for the group created with this registration will be 'abc_group'.\",\n 'tag' => 'p',\n 'attr' => ['class' => 'help-block']\n ],\n 'label' => 'Group Identifier'\n ]\n );\n }", "public function __construct()\n {\n $this->setColumnsMeta(array(\n ));\n\n $this->setMultiLangColumnsList(array(\n ));\n\n $this->setAvailableLangs(array('es', 'eu'));\n\n $this->setParentList(array(\n ));\n\n $this->setDependentList(array(\n 'LlamadasIbfk2' => array(\n 'property' => 'Llamadas',\n 'table_name' => 'Llamadas',\n ),\n ));\n\n $this->setOnDeleteCascadeRelationships(array(\n 'Llamadas_ibfk_2'\n ));\n\n\n $this->_defaultValues = array(\n );\n\n $this->_initFileObjects();\n parent::__construct();\n }", "function example_simple_property_bundle_form($property, $vars) {\n $form = &$vars['form'];\n $eck_entity_type = $form['entity_type']['#value'];\n $eck_bundle = $form['bundle']['#value'];\n $config = $eck_bundle->config;\n\n $form['config_simple'] = array(\n '#title' => t('Simple'),\n '#description' => t('Simple textfield.'),\n '#type' => 'textfield',\n '#size' => 255,\n '#default_value' => isset($config['simple']) ? $config['simple'] : 'abcd',\n '#weight' => 0,\n );\n\n return $vars;\n}", "public function initialize($entity = null, $options = [])\n {\n\n\n if (!isset($options['edit'])) {\n\n\n// $element = new Text(\"PrefixNameID\");\n// $this->add($element->setLabel(\"เลขที่คำนำหน้าชื่อ\"));\n }\n else {\n //Edit ONLY\n $this->add(new Hidden(\"CourseID\"));\n\n }\n\n\n $RecordStatus = new Hidden(\"RecordStatus\");\n $RecordStatus->setDefault('N');\n $this->add($RecordStatus);\n\n $CourseNameTh = new Text(\"CourseNameTh\");\n $CourseNameTh->setLabel(\"ชื่อหลักสูตร(Th)\");\n $CourseNameTh->setFilters(['striptags', 'string']);\n $CourseNameTh->addValidators([\n new PresenceOf([\n 'message' => 'กรุณากรอกข้อมูล ชื่อหลักสูตร(Th)'\n ])\n ]);\n\n $this->add($CourseNameTh);\n\n $CourseNameEn = new Text(\"CourseNameEn\");\n $CourseNameEn->setLabel(\"ชื่อหลักสูตร(En)\");\n $CourseNameEn->setFilters(['striptags', 'string']);\n\n $this->add($CourseNameEn);\n\n $CourseDetail = new Text(\"CourseDetail\");\n $CourseDetail->setLabel(\"รายละเอียด\");\n $CourseDetail->setFilters(['striptags', 'string']);\n\n $this->add($CourseDetail);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "public function __construct(FormBuilder $builder)\n {\n $this->builder = $builder;\n }", "private function createCreateForm(Element $entity)\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$request = $this->container->get('request_stack')->getCurrentRequest();\n\t\t$params = $request->get('_route_params');\n\t\t$block = $em->getRepository('NovuscomCMFBundle:Block')->find($params['id']);\n\n\n\t\tif ($params['section_id']) {\n\t\t\t$action = $this->generateUrl('admin_element_create_in_section',\n\t\t\t\tarray(\n\t\t\t\t\t'section_id' => $params['section_id'],\n\t\t\t\t\t'id' => $params['id'],\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$action = $this->generateUrl('admin_element_create_in_block',\n\t\t\t\tarray(\n\t\t\t\t\t'id' => $params['id'],\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$form = $this->createForm(ElementType::class, $entity, array(\n\t\t\t'action' => $action,\n\t\t\t'method' => 'POST',\n\t\t\t'blockObject' => $block,\n\t\t\t'params' => array('_route_params' => $params),\n\t\t\t'em' => $em,\n\t\t));\n\n\n\t\t$properties = $block->getProperty();\n\t\t$countProperties = count($properties);\n\n\n\t\t/*$EP = new ElementProperty();\n\t\t$propertiesForm = $this->createFormBuilder($EP);\n\t\tforeach ($properties as $p) {\n\t\t\t//echo '<pre>' . print_r($p->getName(), true) . '</pre>';\n\t\t\t\t$add = $propertiesForm->add('value', 'text');\n\n\t\t}*/\n\t\t//$propForm = $add->getForm();\n\n\t\tif ($countProperties > 0) {\n\t\t\t//$propertyForm = new ElementPropertyType($properties, $em, false, $request);\n\t\t\t//$form->add('properties', $propertyForm, array('mapped' => false, 'label' => 'Свойства'));\n\t\t}\n\n\t\t//$form->add('properties', new ElementPropertyType($properties, $em));\n\n\t\t//$form->add('properties', 'collection', array('type' => new ElementPropertyType($properties, $em)));\n\n\t\t$epArray = array();\n\n\t\t/**\n\t\t * Пролучаем значения свойств типа \"строка\"\n\t\t */\n\t\t$ElementProperty = $em->getRepository('NovuscomCMFBundle:ElementProperty')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\tforeach ($ElementProperty as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"дата/время\"\n\t\t */\n\t\t$ElementPropertyDT = $em->getRepository('NovuscomCMFBundle:ElementPropertyDT')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\t\tforeach ($ElementPropertyDT as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"файл\"\n\t\t */\n\t\t$ElementPropertyFile = $em->getRepository('NovuscomCMFBundle:ElementPropertyF')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\t$ElementPropertyFileId = array();\n\t\tforeach ($ElementPropertyFile as $epf) {\n\t\t\t$ElementPropertyFileId[$epf->getProperty()->getId()][$epf->getId()] = $epf->getFile()->getId();\n\t\t}\n\t\techo '<pre>' . print_r($ElementPropertyFileId, true) . '</pre>';\n\t\t$data = array(\n\t\t\t'VALUES' => $epArray,\n\t\t\t'PROPERTY_FILE_VALUES' => $ElementPropertyFileId,\n\t\t\t'LIIP' => $this->get('liip_imagine.cache.manager'),\n\t\t\t'BLOCK_PROPERTIES' => $block->getProperty(),\n\t\t\t'ELEMENT_ENTITY' => $entity,\n\t\t);\n\t\t$form->add('properties', ElementPropertyType::class,\n\t\t\tarray(\n\t\t\t\t//'entry_type' => ElementPropertyType::class,\n\t\t\t\t'label' => 'Свойства',\n\t\t\t\t'mapped' => false,\n\t\t\t\t//'by_reference' => false,\n\t\t\t\t//'allow_add' => true,\n\t\t\t\t//'allow_delete' => true,\n\t\t\t\t//'prototype' => true,\n\t\t\t\t'data' => $data,\n\t\t\t\t//'options' => array('asdasdasdasd'), // не работает\n\t\t\t));\n\n\t\t//$form->add('submit', SubmitType::class, array('label' => 'Сохранить', 'attr' => array('class' => 'btn btn-success')));\n\n\t\treturn $form;\n\t}", "protected function createComponentEditorForm()\n {\n $form = new Form;\n $form->addHidden('article_id');\n $form->addText('title', 'Titulek')->setRequired();\n $form->addText('url', 'URL')->setRequired();\n $form->addText('description', 'Popisek')->setRequired();\n $form->addTextArea ('content', 'Obsah');\n $form->addSubmit('submit', 'Uložit článek');\n $form->onSuccess[] = [$this, 'editorFormSucceeded'];\n return $form;\n }", "public function init()\n {\n parent::init();\n $this->formModel = new GoodsForm();\n \n }", "public function __construct(FormInterface $form)\n {\n $this->form = $form;\n }", "private function createCreateForm(IntrestConfig $entity) {\n\t\t$form = $this->createForm(new IntrestConfigType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('member_intrestconfig_create'),\n\t\t\t'method' => 'POST',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array('label' => 'Create'));\n\n\t\treturn $form;\n\t}", "private function createCreateForm(Rubrique $entity) {\r\n $form = $this->createForm('Loonins\\WikiBundle\\Form\\RubriqueType', $entity, array(\r\n 'action' => $this->generateUrl('rubrique_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', SubmitType::class, array('label' => 'Créer'));\r\n\r\n return $form;\r\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "public function buildForm()\n {\n }", "private function createCreateForm(Aula $entity)\n {\n $form = $this->createForm(new AulaType(), $entity, array(\n 'action' => $this->generateUrl('aulas_aula_create'),\n 'method' => 'POST',\n ));\n $form->add('submit', 'submit', array('label' => 'Crear','attr'=>array('class'=>'btn btn-default botonTabla')));\n $form->add('button', 'submit', array('label' => 'Volver a la lista','attr'=>array('formaction'=>'../aula','formnovalidate'=>'formnovalidate','class'=>'btn btn-default botonTabla')));\n return $form;\n }", "public function buildYourSelf(FormBuilderInterface $builder, array $options){\n\n\n // FIRSTNAME\n $builder->add(\n \"firstName\",\n \"text\",\n array(\n 'label'=>$this->translator->trans(\"yourself.firstName.label\", [], $this->domain),\n 'required'=>false,\n 'attr'=>array(\n 'class'=>'form-control',\n 'placeholder'=>$this->translator->trans(\"yourself.firstName.placeholder\", [], $this->domain)\n )\n )\n );\n\n // LASTNAME\n $builder->add(\n \"lastName\",\n \"text\",\n array(\n 'label'=>$this->translator->trans(\"yourself.lastName.label\", [], $this->domain),\n 'required'=>false,\n 'attr'=>array(\n 'class'=>'form-control',\n 'placeholder'=>$this->translator->trans(\"yourself.lastName.placeholder\", [], $this->domain)\n )\n )\n );\n\n // SEX\n $builder->add(\n \"sex\",\n \"choice\",\n array(\n 'label'=>$this->translator->trans(\"yourself.sex.label\", [], $this->domain),\n 'choices'=>array(1=>\"Male\", 0=>\"Female\"),\n 'attr'=>array(\n 'class'=>'form-control'\n )\n )\n );\n \n // BIRTHDAY\n $currentDate = new \\DateTime();\n $year = intval($currentDate->format(\"Y\"));\n $years = array();\n for($i = 0; $i < 150;$i ++){\n $years[] = $year;\n $year --;\n }\n \n $builder->add(\n \"birthday\",\n \"date\",\n array(\n 'label'=>$this->translator->trans(\"yourself.birthday.label\", [], $this->domain),\n 'widget'=>'choice',\n 'years'=>$years,\n 'required'=>false,\n 'attr'=>array(\n 'class'=>'form-control'\n )\n )\n );\n\n // BIOGRAPHY\n $builder->add(\n \"biography\",\n \"textarea\",\n array(\n 'label'=>$this->translator->trans(\"yourself.biography.label\", [], $this->domain),\n 'required'=>false,\n 'attr'=>array(\n 'class'=>'form-control'\n )\n )\n );\n }", "public function getCreationForm()\n {\n return new ProductForm;\n }", "public function __construct($name = null)\n {\n parent::__construct('objectownership');\n $this->setAttribute('method', 'post');\n\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Text',\n 'name' => 'name',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Naam',\n ),\n ));\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Date',\n 'name' => 'fromDate',\n 'attributes' => array(\n 'type' => 'date',\n ),\n 'options' => array(\n 'label' => 'Vanaf datum',\n ),\n ));\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Date',\n 'name' => 'toDate',\n 'attributes' => array(\n 'type' => 'date',\n ),\n 'options' => array(\n 'label' => 'Tot datum',\n ),\n ));\n $this->add(array(\n 'name' => 'type',\n 'type' => 'Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => 'Type',\n 'empty_option' => 'Kies Type',\n 'value_options' => array(\n '1' => 'Box',\n '2' => 'Stroomverbruik',\n '3' => 'Winterstalling',\n ),\n ),\n ));\n $this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'type' => 'submit',\n 'value' => 'Go',\n 'id' => 'submitbutton',\n ),\n ));\n }", "private function createCreateForm(Vluchten $entity)\n {\n $form = $this->createForm(new VluchtenType(), $entity, array(\n 'action' => $this->generateUrl('vluchten_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public static function createInstance()\n {\n return new Form('serializableInstance', '');\n }", "public function init()\n {\n \t\n \t$this->setAttrib('enctype', 'multipart/form-data');\n \t \t\n \t$this->setName('FormularioOcorrencia');\n $id = new Zend_Form_Element_Hidden('id_ocorrencia');\n $id->addFilter('Int');\n \n \n \n\t\t$descricao = new Zend_Form_Element_Textarea('descricao');\n $descricao->setLabel('Descricao')\n ->setRequired(true);\n\t\t$descricao->removeDecorator('DtDdWrapper')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label')\n ->setAttrib('class', 'form-control')\n \t->setAttrib('rows', '5');\n \n\t\t\n\t\t\n\t\t\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setLabel(\"Adiconar\");\n $submit->setAttrib('id', 'submitbutton');\n $submit->removeDecorator('DtDdWrapper')\n ->setAttrib('class', 'btn btn-primary')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label');\n \n \n \n \n $this->addElements(array($id,$descricao,$submit)); \n \n $this->setDecorators( array( array('ViewScript', array('viewScript' => 'formularioOcorrencia.phtml'))));\n }", "protected function _prepareForm()\n\t{\n\n\t\t$intId = $this->getRequest()->getParam(SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID);\n\n\t\t$objEntity = new SDZeCOM_Aurednik_Model_Cms_Home_Entity ();\n\n\t\t$objEntity->load($intId);\n\n\t\t$objAttribute = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute ();\n\n\t\t$objAttributeValue = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute_Values ();\n\n\t\t$objEntityType = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Type ();\n\n\t\t$objForm = new Varien_Data_Form (\n\t\t\tarray(\n\t\t\t\t'id' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME,\n\t\t\t\t'action' => $this->getUrl('*/*/save'),\n\t\t\t\t'method' => 'post',\n\t\t\t\t'enctype' => 'multipart/form-data',\n\t\t\t\t'name' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME\n\t\t\t)\n\t\t);\n\n\t\t$this->setForm($objForm);\n\n\t\t$objForm->setUseContainer(true);\n\n\t\t//Set Enitty\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset('aurednik_cms_home_entity',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity')));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'required' => true,\n\t\t\t\t'value' => $objEntity->getId(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getEntity_name(),\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$field = $objFieldset->addField(SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store::TABLE_COLUMN_STORE_ID, 'multiselect', array(\n\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store :: TABLE_COLUMN_STORE_ID . ']',\n\t\t\t'label' => Mage::helper('cms')->__('Store View'),\n\t\t\t'title' => Mage::helper('cms')->__('Store View'),\n\t\t\t'required' => true,\n\t\t\t'value' => $objEntity->getStore_id(),\n\t\t\t'values' => Mage:: getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),\n\t\t));\n\n\t\t$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');\n\t\t$field->setRenderer($renderer);\n\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => true,\n\t\t\t\t'options' => $objEntityType->toOptionArray(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'value' => $objEntity->getType_id()\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => false,\n\t\t\t\t'options' => array(0 => Mage:: helper('admin')->__('No'), 1 => Mage:: helper('admin')->__('Yes')),\n\t\t\t\t'value' => $objEntity->getActive()\n\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getSort(),\n\t\t\t\t'class' => 'required-entry',\n\t\t\t\t'required' => true,\n\t\t\t));\n\n\t\t$objAttrCollection = $objAttribute->getCollection()->getByEntityTypeId($objEntity->getType_id());\n\n\t\tif ($objAttrCollection->count() == 0)\n\t\t{\n\t\t\tMage:: getSingleton('core/session')->addError(Mage:: helper('aurednik')->__('Error no attributes'));\n\t\t\t$this->getResponse()->sendResponse();\n\t\t}\n\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset(\n\t\t\t\t'aurednik_cms_home_entity_data',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity attribute data')\n\t\t\t\t)\n\t\t\t);\n\n\t\tforeach ($objAttrCollection as $objCurrentAttr)\n\t\t{\n\n\t\t\t$objEntityAttrValuesCollection = $objAttributeValue->getCollection()->getByEntityIdAndAttributeId($objEntity->getId(), $objCurrentAttr->getId());\n\n\t\t\tif ($objEntityAttrValuesCollection->count() > 0)\n\t\t\t{\n\n\t\t\t\tforeach ($objEntityAttrValuesCollection as $objCurrentAttrValue)\n\t\t\t\t{\n\n\t\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t\t$objCurrentAttrValue->getId(),\n\t\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t\t'value' => $objCurrentAttrValue->getAttribute_value(),\n\t\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t$objEntity->getId() . \"_\" . $objCurrentAttr->getId(),\n\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\treturn parent:: _prepareForm();\n\t}", "function __generateForm($entity,$action=\"\",$label=\"\",$method=\"POST\"){\n\t$htmlForm = new HtmlForm(\n\t\t\tget_class($entity),\n\t\t\t$action,\n\t\t\tnull,\n\t\t\tnull,\n\t\t\tarray(\t'method'=>$method,\n\t\t\t\t\t\t'label'=>$label)\n\t\t\t);\n\t$htmlForm->generateFormForEntity($entity);\n\techo $htmlForm->serialize();\n}", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "public function prepareAsCreate()\n {\n $context = sfContext::hasInstance() ? sfContext::getInstance() : NULL;\n if ($context)\n {\n $context->getConfiguration()->getActive()->loadHelpers('Partial', 'I18N');\n $objStack = $this->form->getObject();\n $resource = new sfRessource($objStack->getTable()->getClassnameToReturn());\n $vars = array(\n \"ressource_id\" => $resource->getId(),\n \"entity_id\" => $objStack->getId());\n return get_component(\"eav\", \"form\", $vars);\n }\n }", "private function createCreateForm(Task $entity)\n {\n //$form = $this->createForm(new TaskType(), $entity, array( \n //pero para Symfony3.4.15 ahora es:\n $form = $this->createForm(TaskType::class, $entity, array( \n 'action' => $this->generateUrl('infunisa_task_create'),\n 'method' => 'POST'\n ));\n \n return $form;\n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "private function createCreateForm(Annonce $entity)\n {\n $form = $this->createForm(new AnnonceType(), $entity, array(\n 'action' => $this->generateUrl('annonce_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer'));\n\n return $form;\n }", "private function createCreateForm(Compte $entity)\n {\n $form = $this->createForm(new CompteType(), $entity, array(\n 'action' => $this->generateUrl('compte_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer'));\n\n return $form;\n }", "public function __construct(EntityManager $em, Form $form, Request $request)\n {\n $this->em = $em;\n $this->form = $form;\n $this->request = $request;\n }", "function __construct($entity)\n\t{\n\t\t$this->entity = $entity;\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->entity = clsAdminCommon::getAdminMessage('brand', ADMIN_ENTITIES_BLOCK);\n $this->em = clsDB::getInstance();\n }" ]
[ "0.7282269", "0.6783061", "0.6717208", "0.66257316", "0.65306914", "0.6512528", "0.6465536", "0.64655024", "0.64308816", "0.6401182", "0.63922143", "0.63817096", "0.63817096", "0.63507676", "0.6347384", "0.6347384", "0.6320024", "0.6294007", "0.6288342", "0.6288342", "0.62788415", "0.6277748", "0.625975", "0.6255916", "0.62527245", "0.6252583", "0.62359387", "0.6225507", "0.6222608", "0.6204458", "0.6197634", "0.6185519", "0.6168731", "0.61571914", "0.61494106", "0.61362517", "0.6132792", "0.6129254", "0.6127911", "0.6127232", "0.61098635", "0.60940474", "0.6091651", "0.607439", "0.6066512", "0.60527027", "0.6047189", "0.60429865", "0.6041692", "0.6036269", "0.6033807", "0.602651", "0.60185784", "0.6012569", "0.60105044", "0.60056806", "0.60027933", "0.60019463", "0.5985387", "0.5985156", "0.59779257", "0.59771675", "0.5965706", "0.59607273", "0.59534526", "0.59432614", "0.59375197", "0.59375197", "0.5936085", "0.59252286", "0.5923762", "0.59177655", "0.5917137", "0.58974004", "0.58968884", "0.5892106", "0.5889946", "0.5888833", "0.5884663", "0.58803785", "0.5874164", "0.5866804", "0.5862979", "0.58481455", "0.58399147", "0.5839447", "0.5833836", "0.5828322", "0.5823009", "0.5820389", "0.5815093", "0.58149695", "0.58076227", "0.58052766", "0.5797962", "0.5794086", "0.5793946", "0.57931125", "0.57891023", "0.5784746" ]
0.71189916
1
Form validation handler for mongo_node_bundle_create_form().
function mongo_node_bundle_create_form_validate($form, $form_state) { if (empty($form_state['values']['name'])) { form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name))); return FALSE; } $machine_name = $form_state['values']['name']; $entity_type = $form_state['values']['entity_type']; $set = mongo_node_settings(); if (isset($set[$entity_type]['bundles'][$machine_name])) { form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name))); return FALSE; } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function mongo_node_type_create_form_validate($form, $form_state) {\n $set = mongo_node_settings();\n $machine_name = $form_state['values']['name'];\n\n if (isset($set[$machine_name])) {\n form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name)));\n return FALSE;\n }\n return TRUE;\n}", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "function mongo_node_operation_validate($form, &$form_state) {\n if (!is_array($form_state['values']['entities']) || !count(array_filter($form_state['values']['entities']))) {\n form_set_error('', t('No items selected.'));\n }\n}", "function mongo_node_bundle_create_form_submit($form, $form_state) {\n $entity_type = $form_state['values']['entity_type'];\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n\n // @todo - redirect to bundle type page.\n mongo_node_settings_save($set);\n}", "function mongo_node_bundle_edit_form_submit($form, $form_state) {\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['bundle_type']['entity_type'];\n $old_bundle_type = $form_state['values']['bundle_type']['bundle'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_bundle_type) {\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n $set[$entity_type]['bundles'][$machine_name] = $set[$entity_type]['bundles'][$old_bundle_type];\n unset($set[$entity_type]['bundles'][$old_bundle_type]);\n\n // Update existing mongo entities with new bundle.\n //_mongo_node_update_bundle($entity_type, $old_bundle_type, $machine_name);\n }\n else {\n $set[$entity_type]['bundles'][$machine_name]['label'] = $label;\n $set[$entity_type]['bundles'][$machine_name]['description'] = $description;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "private function validateForm(): void\n { if ($this->form->isSubmitted()) {\n // get the status\n $status = $this->getRequest()->request->has('saveAsDraft') ? 'draft' : 'active';\n\n // cleanup the submitted fields, ignore fields that were added by hackers\n $this->form->cleanupFields();\n\n // validate fields\n $this->form->getField('title')->isFilled(BL::err('TitleIsRequired'));\n $this->form->getField('text')->isFilled(BL::err('FieldIsRequired'));\n $this->form->getField('publish_on_date')->isValid(BL::err('DateIsInvalid'));\n $this->form->getField('publish_on_time')->isValid(BL::err('TimeIsInvalid'));\n $this->form->getField('category_id')->isFilled(BL::err('FieldIsRequired'));\n if ($this->form->getField('category_id')->getValue() == 'new_category') {\n $this->form->getField('category_id')->addError(BL::err('FieldIsRequired'));\n }\n\n // validate meta\n $this->meta->validate();\n\n if ($this->form->isCorrect()) {\n // build item\n $item = [\n 'id' => (int) BackendBlogModel::getMaximumId() + 1,\n 'meta_id' => $this->meta->save(),\n 'category_id' => (int) $this->form->getField('category_id')->getValue(),\n 'user_id' => $this->form->getField('user_id')->getValue(),\n 'language' => BL::getWorkingLanguage(),\n 'title' => $this->form->getField('title')->getValue(),\n 'introduction' => $this->form->getField('introduction')->getValue(),\n 'text' => $this->form->getField('text')->getValue(),\n 'publish_on' => BackendModel::getUTCDate(\n null,\n BackendModel::getUTCTimestamp(\n $this->form->getField('publish_on_date'),\n $this->form->getField('publish_on_time')\n )\n ),\n 'created_on' => BackendModel::getUTCDate(),\n 'hidden' => $this->form->getField('hidden')->getValue(),\n 'allow_comments' => $this->form->getField('allow_comments')->getChecked(),\n 'num_comments' => 0,\n 'status' => $status,\n ];\n $item['edited_on'] = $item['created_on'];\n\n // insert the item\n $item['revision_id'] = BackendBlogModel::insert($item);\n\n if ($this->imageIsAllowed) {\n // the image path\n $imagePath = FRONTEND_FILES_PATH . '/Blog/images';\n\n // create folders if needed\n $filesystem = new Filesystem();\n $filesystem->mkdir([$imagePath . '/source', $imagePath . '/128x128']);\n\n // image provided?\n if ($this->form->getField('image')->isFilled()) {\n // build the image name\n $item['image'] = $this->meta->getUrl()\n . '-' . BL::getWorkingLanguage()\n . '-' . $item['revision_id']\n . '.' . $this->form->getField('image')->getExtension();\n\n // upload the image & generate thumbnails\n $this->form->getField('image')->generateThumbnails($imagePath, $item['image']);\n\n // add the image to the database without changing the revision id\n BackendBlogModel::updateRevision($item['revision_id'], ['image' => $item['image']]);\n }\n }\n\n // save the tags\n BackendTagsModel::saveTags($item['id'], $this->form->getField('tags')->getValue(), $this->url->getModule());\n\n // active\n if ($item['status'] == 'active') {\n // add search index\n BackendSearchModel::saveIndex($this->getModule(), $item['id'], ['title' => $item['title'], 'text' => $item['text']]);\n\n // everything is saved, so redirect to the overview\n $this->redirect(BackendModel::createUrlForAction('Index') . '&report=added&var=' . rawurlencode($item['title']) . '&highlight=row-' . $item['revision_id']);\n } elseif ($item['status'] == 'draft') {\n // draft: everything is saved, so redirect to the edit action\n $this->redirect(BackendModel::createUrlForAction('Edit') . '&report=saved-as-draft&var=' . rawurlencode($item['title']) . '&id=' . $item['id'] . '&draft=' . $item['revision_id'] . '&highlight=row-' . $item['revision_id']);\n }\n }\n }\n }", "function inscription_jesa_manage_validate($form, &$form_state) {\n \n}", "function mongo_node_type_create_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n\n $set = mongo_node_settings();\n $set += mongo_node_type_default_settings($label, $machine_name);\n\n // @todo - redirect to entity type page\n mongo_node_settings_save($set);\n}", "function validate_blog_form()\n {\n }", "public function createForm();", "public function createForm();", "function thumbwhere_contentcollection_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_actor\n $value = $form['fk_actor']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_actor'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_actor']);\n if (twCanDebug()) debug('fk_actor = ' . $value);\n // Validate fk fk_actor\n if (empty($value)) {\n form_set_error('fk_actor', t('Validation error, \\'fk_actor\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_actor\\' in is mandatory');\n }\n\n // Validate normaltitle\n $value = $form['title']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_contentcollection = $form_state['thumbwhere_contentcollection'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_contentcollection', $thumbwhere_contentcollection, $form, $form_state);\n \n \n \n}", "public function createForm()\n {\n }", "function mongo_node_add($entity_type, $bundle) {\n global $user;\n $set = mongo_node_settings();\n\n $entity = entity_create($entity_type, array(\n 'uid' => $user->uid,\n 'name' => (isset($user->name) ? $user->name : ''),\n 'type' => $bundle,\n 'language' => LANGUAGE_NONE,\n )\n );\n $form_id = $entity_type . '_' . $bundle . '_mongo_node_form';\n $output = drupal_get_form($form_id, $entity, $entity_type);\n\n return $output;\n}", "abstract public function createForm();", "abstract public function createForm();", "function restapi_admin_form_validate($form, &$form_state) {\n\n $class = isset($form_state['values']['restapi_default_auth_class']) ? $form_state['values']['restapi_default_auth_class'] : NULL;\n $prefix = isset($form_state['values']['restapi_url_prefix']) ? $form_state['values']['restapi_url_prefix'] : NULL;\n\n if ($class && !class_exists($class)) {\n form_set_error('restapi_default_auth_class', t('The class \"@class\" does not seem to exist, or is not callable.', [\n '@class' => $class,\n ]));\n }\n\n if ($prefix != variable_get('restapi_url_prefix')) {\n $form_state['storage']['restapi_url_prefix_changed'] = TRUE;\n\n $prefix = trim($prefix);\n $prefix = rtrim($prefix, '/');\n $prefix = ltrim($prefix, '/');\n $form_state['values']['restapi_url_prefix'] = $prefix;\n }\n\n}", "function dolist_messages_mail_admin_bundle_form_validate($form, &$form_state) {\n $bundle = new stdClass();\n $bundle->name = trim($form_state['values']['name']);\n\n if (!$form_state['values']['locked']) {\n $bundle->bundle = trim($form_state['values']['bundle']);\n // 'theme' conflicts with theme_node_form().\n // '0' is invalid, since elsewhere we check it using empty().\n if (in_array($bundle->bundle, array('0', 'theme'))) {\n form_set_error('type', t(\"Invalid machine-readable name. Enter a name other than %invalid.\", array('%invalid' => $bundle->bundle)));\n }\n }\n\n}", "function _validate_form($form, &$form_state)\n{\n\t// Retrieve variables to be validated\n\t$terms_selected_options = $_SESSION['ef_term_merge']['selected']['#options'];\n\t$merge_into = $form_state['values']['terms-list-to-merge-into'];\n\n\tif(count($terms_selected_options) == 0 || $merge_into == 0)\n\t{\n\n\t\t$error_elements = array($form['container']['selected']['terms-selected-to-merge'], $form['merge-into']['terms-list-to-merge-into']);\n\n\t\tforeach ($error_elements as $element)\n\t\t{\n\t\t\t\tform_set_error($element);\n\t\t}\n\n\t\t// Reset vocabulary select\n\t\t$form_state['input']['vocabularies'] = 0;\n\n\t\t$form_state['rebuild'] = TRUE;\n\t\tdrupal_set_message('At least one term needs to be selected from \"Terms to be merged\" and another one from \"Term to merge into\"','error');\n\t}\n}", "function pdfbulletin_settings_form_validate(&$form, &$form_state) {\n // @todo SERIOUSLY\n}", "function validate_on_create() {}", "function ting_visual_relation_slide_form_validate($form, &$form_state) {\n if (empty($form_state['values']['name'])) {\n form_set_error('name', t('Please enter a name for the slide'));\n }\n $type = $form_state['values']['type'];\n switch ($type) {\n case 'external':\n case 'circular':\n $datawell_pid = $form_state['values']['datawell_pid'];\n // TODO: use a regex to validate the datawell-PID.\n if (empty($datawell_pid)) {\n form_set_error('datawell_pid', t('Please enter a valid datawell-PID'));\n }\n break;\n case 'structural':\n if (empty($form_state['values']['search_query'])) {\n form_set_error('search_query', t('Please enter a search query'));\n }\n }\n}", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "function node_form(&$form_state, $node) {\n global $user;\n\n if (isset($form_state['node'])) {\n $node = $form_state['node'] + (array)$node;\n }\n if (isset($form_state['node_preview'])) {\n $form['#prefix'] = $form_state['node_preview'];\n }\n $node = (object)$node;\n foreach (array('body', 'title', 'format') as $key) {\n if (!isset($node->$key)) {\n $node->$key = NULL;\n }\n }\n if (!isset($form_state['node_preview'])) {\n node_object_prepare($node);\n }\n else {\n $node->build_mode = NODE_BUILD_PREVIEW;\n }\n\n // Set the id of the top-level form tag\n $form['#id'] = 'node-form';\n\n // Basic node information.\n // These elements are just values so they are not even sent to the client.\n foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => isset($node->$key) ? $node->$key : NULL,\n );\n }\n\n // Changed must be sent to the client, for later overwrite error checking.\n $form['changed'] = array(\n '#type' => 'hidden',\n '#default_value' => isset($node->changed) ? $node->changed : NULL,\n );\n // Get the node-specific bits.\n if ($extra = node_invoke($node, 'form', $form_state)) {\n $form = array_merge_recursive($form, $extra);\n }\n if (!isset($form['title']['#weight'])) {\n $form['title']['#weight'] = -5;\n }\n\n $form['#node'] = $node;\n\n // Add a log field if the \"Create new revision\" option is checked, or if the\n // current user has the ability to check that option.\n if (!empty($node->revision) || user_access('administer nodes')) {\n $form['revision_information'] = array(\n '#type' => 'fieldset',\n '#title' => t('Revision information'),\n '#collapsible' => TRUE,\n // Collapsed by default when \"Create new revision\" is unchecked\n '#collapsed' => !$node->revision,\n '#weight' => 20,\n );\n $form['revision_information']['revision'] = array(\n '#access' => user_access('administer nodes'),\n '#type' => 'checkbox',\n '#title' => t('Create new revision'),\n '#default_value' => $node->revision,\n );\n $form['revision_information']['log'] = array(\n '#type' => 'textarea',\n '#title' => t('Log message'),\n '#default_value' => (isset($node->log) ? $node->log : ''),\n '#rows' => 2,\n '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),\n );\n }\n\n // Node author information for administrators\n $form['author'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Authoring information'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 20,\n );\n $form['author']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored by'),\n '#maxlength' => 60,\n '#autocomplete_path' => 'user/autocomplete',\n '#default_value' => $node->name ? $node->name : '',\n '#weight' => -1,\n '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', t('Anonymous')))),\n );\n $form['author']['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored on'),\n '#maxlength' => 25,\n '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? $node->date : format_date($node->created, 'custom', 'Y-m-d H:i:s O'))),\n );\n\n if (isset($node->date)) {\n $form['author']['date']['#default_value'] = $node->date;\n }\n\n // Node options for administrators\n $form['options'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Publishing options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 25,\n );\n $form['options']['status'] = array(\n '#type' => 'checkbox',\n '#title' => t('Published'),\n '#default_value' => $node->status,\n );\n $form['options']['promote'] = array(\n '#type' => 'checkbox',\n '#title' => t('Promoted to front page'),\n '#default_value' => $node->promote,\n );\n $form['options']['sticky'] = array(\n '#type' => 'checkbox',\n '#title' => t('Sticky at top of lists'),\n '#default_value' => $node->sticky,\n );\n\n // These values are used when the user has no administrator access.\n foreach (array('uid', 'created') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => $node->$key,\n );\n }\n\n // Add the buttons.\n $form['buttons'] = array();\n $form['buttons']['submit'] = array(\n '#type' => 'submit',\n '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])),\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('node_form_submit'),\n );\n $form['buttons']['preview'] = array(\n '#type' => 'submit',\n '#value' => t('Preview'),\n '#weight' => 10,\n '#submit' => array('node_form_build_preview'),\n );\n if (!empty($node->nid) && node_access('delete', $node)) {\n $form['buttons']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 15,\n '#submit' => array('node_form_delete_submit'),\n );\n }\n $form['#validate'][] = 'node_form_validate';\n $form['#theme'] = array($node->type .'_node_form', 'node_form');\n return $form;\n}", "protected function createFormFields() {\n\t}", "public function postBind(FormEvent $event)\n {\n $data = $event->getData();\n $form = $event->getForm();\n\n // Check if the Form has a 'File' field\n if ($form->has('file')) {\n if (!$data->hasFile()) {\n $form->addError(new FormError('File must be given to create Document.'));\n }\n }\n }", "function form_backend_validation()\r\n {\r\n return true ;\r\n }", "public function CreateForm();", "function guifi_domain_create_form($form_state, $node) {\n\n $ip = guifi_main_ip($node->device_id);\n if (guifi_domain_access('create',$node->sid)) {\n $form['text_add'] = array(\n '#type' => 'item',\n '#value' => t('You are not allowed to create a domain on this service.'),\n '#weight' => 0\n );\n return $form;\n }\n if (empty($ip['ipv4'])) {\n $device = db_fetch_object(db_query('SELECT nick FROM {guifi_devices} WHERE id = %d', $node->device_id));\n $url = url('guifi/device/'.$node->device_id);\n $form['text'] = array(\n '#type' => 'item',\n '#value' => t('The server <a href='.$url.'>'.$device->nick.'</a> does not have an IPv4 address, can not create a domain.')\n );\n return $form;\n} \n $form['domain_type'] = array(\n '#type' => 'select',\n '#title' => t('Select new domain type'),\n '#default_value' => 'none',\n '#options' => array('NULL' => 'none', 'master' => 'Master, ex: newdomain.net','delegation' => 'Delegation, ex: newdomain.guifi.net'),\n '#ahah' => array(\n 'path' => 'guifi/js/add-domain',\n 'wrapper' => 'select_type',\n 'effect' => 'fade',\n )\n );\n $form['domain_type_form'] = array(\n '#prefix' => '<div id=\"select_type\">',\n '#suffix' => '</div>',\n '#type' => 'fieldset',\n );\n\n if ($form_state['values']['domain_type'] == 'master') {\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#size' => 64,\n '#maxlength' => 32,\n '#title' => t('Add a new domain'),\n '#description' => t('Insert domain name'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'master',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['mname'] = array(\n '#type' => 'hidden',\n '#value' => '0',\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n\n if ($form_state['values']['domain_type'] == 'delegation') {\n $ip = guifi_main_ip($node->device_id);\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Add a new delegated Domain Name'),\n '#description' => t('Just the hostname (HOSTNAME.domain.com) will be added before master domain.'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $domqry= db_query(\"\n SELECT *\n FROM {guifi_dns_domains}\n WHERE type = 'master'\n AND public = 'yes'\n ORDER BY name\"\n );\n $values = array();\n while ($type = db_fetch_object($domqry)) {\n $values[$type->name] = $type->name;\n }\n $form['domain_type_form']['mname'] = array(\n '#type' => 'select',\n '#options' => $values,\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'delegation',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n return $form;\n}", "function cps_changeset_edit_form_validate($form, &$form_state) {\n}", "function _or_chart_admin_url_form_validate($form, &$form_state) { \n $nodes = array_filter($form_state['values']['nodes']);\n if (count($nodes) == 0) {\n form_set_error('', t('No items selected.'));\n }\n}", "function oa_export_blueprint_export_form_validate($form, &$form_state) {\n if (empty($form_state['values']['blueprint']) || empty($form_state['values']['space'])) {\n drupal_set_message(t(\"We can't seem to find the Blueprint or Space for your export.\"), 'error');\n form_set_error('', NULL);\n }\n}", "public function options_form_validate($form, &$form_state) {\n // Context module doesn't allow for validation of reaction fields.\n // @todo: Raise bug for context module.\n }", "protected function addFormValidators() {\n \t}", "function thumbwhere_contentcollectionitem_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_contentcollection\n $value = $form['fk_contentcollection']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_contentcollection'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_contentcollection']);\n if (twCanDebug()) debug('fk_contentcollection = ' . $value);\n // Validate fk fk_contentcollection\n if (empty($value)) {\n form_set_error('fk_contentcollection', t('Validation error, \\'fk_contentcollection\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_contentcollection\\' in is mandatory');\n }\n\n // Convert fk autocomplete for fk_content\n $value = $form['fk_content']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_content'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_content']);\n if (twCanDebug()) debug('fk_content = ' . $value);\n // Validate fk fk_content\n if (empty($value)) {\n form_set_error('fk_content', t('Validation error, \\'fk_content\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_content\\' in is mandatory');\n }\n\n // Validate normalweight\n $value = $form['weight']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_contentcollectionitem = $form_state['thumbwhere_contentcollectionitem'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_contentcollectionitem', $thumbwhere_contentcollectionitem, $form, $form_state);\n \n \n \n}", "public function newAction()\n {\n //Get the entity manager.\n $em = $this->get('doctrine.orm.entity_manager'); \n \n //Get the list of categories as an array. \n $categories = $em->getRepository('JobeetBundle:JobeetCategory')\n ->getCategoriesAsOptions(); \n \n //Set up the form.\n $job = new JobeetJob();\n $form = JobForm::create($categories, $job, $this->get('validator')); \n \n //If a POST, process the form and persist it if valid.\n $request = $this->get('request');\n if ('POST' === $request->getMethod()) {\n //Register an event subscriber to index the job.\n $em->getEventManager()->addEventSubscriber(new LuceneListener($this->get('lucene_search')));\n \n $params = $request->request->get('job'); \n \n //Get the category object.\n $params['category'] = $em->getReference('JobeetBundle:JobeetCategory', $params['category']); \n \n //TODO:VALIDATE HERE\n \n //Get uploaded files and bind the form.\n $files = $request->files->get('job'); \n //unset($params['category_id']);\n $form->bind($params, $files);\n \n //If there is a logo uploaded, move it to the uploads dir.\n if($files['logo']['file']) { \n $name = uniqid().'-'.$files['logo']['file']->getOriginalName();\n $files['logo']['file']->move($this->container->getParameter('frontend.logos_dir')); \n $files['logo']['file']->rename($name); \n }\n else {\n $name = '';\n } \n \n //Set the logo filename and persist the entity.\n $job->setLogo($name); \n $em->persist($job); \n $em->flush();\n }\n \n return $this->render('FrontendBundle:Job:new.twig', array('form' => $form));\n }", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function openlayers_component_form_start_validate($form, &$form_state) {\n $class = new Drupal\\openlayers\\UI\\OpenlayersComponents();\n $class->init($form_state['plugin']);\n $class->edit_form_validate($form, $form_state);\n}", "function uc_order_product_select_form_validate($form, &$form_state) {\n if (empty($form_state['values']['product_controls']['nid'])) {\n form_set_error('product_controls][nid', t('Please select a product.'));\n }\n}", "function process() {\n // We always call the parent's method\n parent::process();\n $d = $this->getDocument();\n \n // We pass the form our request object and the location of us so the form\n // will make us handle the input (as actually we take care of processing\n // this form) - it could link to any other action as long as it is aware\n // of the form\n $form = new Form($this->getRequest(), new Location($this), Request::METHOD_POST);\n \n // This is how you prepare values for the radio buttons\n $radios = array('visa', 'master');\n \n // This is how we prepare the fields\n $form->addField('text1', new TextInputField('Your name here please', \n new RegexValidator('^[[:alpha:]]+[[:space:]][[:alpha:]]+$')));\n $form->addField('pass1', \n new TextInputField('', new RegexValidator('^[[:digit:]]{16}$'), TextInputField::PASSWORD));\n $form->addField('text2', new TextInputField('', null, TextInputField::TEXTAREA));\n $form->addField('check1', new CheckBoxInputField());\n $form->addField('payment', new RadioButtonInputField('visa', $radios));\n \n // Here we test if the form was correctly submitted\n if($form->isValidSubmission()) {\n // Normally, we would do something useful here and redirect to another page\n // since this form uses the POST method\n $d->setVariable('success', true);\n }\n \n // Here we place the form into the document variable so it can process it\n $d->setVariable('form', $form);\n }", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function isValidCreateData($form){\n return true;\n }", "private function validateForm()\n {\n\n //--Check if the add-image form is submitted\n if($this->frmAddImage->isSubmitted())\n {\n //--Clean up fields in the form\n $this->frmAddImage->cleanupFields();\n\n //--Get image field\n $filImage = $this->frmAddImage->getField('images');\n\n //--Check if the field is filled in\n if($filImage->isFilled())\n {\n //--Image extension and mime type\n $filImage->isAllowedExtension(array('jpg', 'png', 'gif', 'jpeg'), BL::err('JPGGIFAndPNGOnly'));\n $filImage->isAllowedMimeType(array('image/jpg', 'image/png', 'image/gif', 'image/jpeg'), BL::err('JPGGIFAndPNGOnly'));\n\n //--Check if there are no errors.\n $strError = $filImage->getErrors();\n\n if($strError === null)\n {\n\n //--Get the filename\n $strFilename = BackendGalleriaModel::checkFilename(substr($filImage->getFilename(), 0, 0 - (strlen($filImage->getExtension()) + 1)), $filImage->getExtension());\n\n //--Fill in the item\n $item = array();\n $item[\"album_id\"] = (int)$this->id;\n $item[\"user_id\"] = BackendAuthentication::getUser()->getUserId();\n $item[\"language\"] = BL::getWorkingLanguage();\n $item[\"filename\"] = $strFilename;\n $item[\"description\"] = \"\";\n $item[\"publish_on\"] = BackendModel::getUTCDate();\n $item[\"hidden\"] = \"N\";\n $item[\"sequence\"] = BackendGalleriaModel::getMaximumImageSequence($this->id) + 1;\n\n //--the image path\n $imagePath = FRONTEND_FILES_PATH . '/Galleria/Images';\n\n //--create folders if needed\n if(!\\SpoonDirectory::exists($imagePath . '/Source')) \\SpoonDirectory::create($imagePath . '/Source');\n if(!\\SpoonDirectory::exists($imagePath . '/128x128')) \\SpoonDirectory::create($imagePath . '/128x128');\n\n //--image provided?\n if($filImage->isFilled())\n {\n //--upload the image & generate thumbnails\n $filImage->generateThumbnails($imagePath, $item[\"filename\"]);\n }\n\n //--Add item to the database\n BackendGalleriaModel::insert($item);\n\n //--Redirect\n $this->redirect(BackendModel::createURLForAction('edit_images') . '&id=' . $item[\"album_id\"] . '&report=added-image&var=' . urlencode($item[\"filename\"]));\n }\n }\n }\n\n //--Check if the delete-image form is submitted\n if($this->frmDeleteImage->isSubmitted())\n {\n //--Clean up fields in the form\n $this->frmDeleteImage->cleanupFields();\n\n //--Check if the image-array is not empty.\n if(!empty($this->images))\n {\n //--Loop the images\n foreach($this->images as $row)\n {\n //--Check if the delete parameter is filled in.\n if(\\SpoonFilter::getPostValue(\"delete_\" . $row[\"id\"], null, \"\") == \"Y\")\n {\n //--Delete the image\n BackendGalleriaModel::delete($row[\"id\"]);\n }\n\n //--Update item\n $item['id'] = $row['id'];\n $item['language'] = $row['language'];\n $item['description'] = \\SpoonFilter::getPostValue(\"description_\" . $row[\"id\"], null, \"\");\n BackendGalleriaModel::updateImage($item);\n }\n\n $this->redirect(BackendModel::createURLForAction('edit_images') . '&id=' . $this->id . '&report=deleted-images');\n }\n }\n }", "function ValidateBeforeAdd(){\n $this->validator->ValidateForm($this->_data, true);\n }", "public function postNewBundle(Request $request) {\n \t$validator = Validator::make($request->all(),[\n 'title' => 'required',\n 'bundleurl' => 'required',\n 'minimum' => 'required|numeric',\n ]);\n\n if($validator->fails())\n {\n return redirect()->route('new_bundle')->withErrors($validator, 'newbundle')->withInput();\n }\n\n $bundle = $this->bundle->addNewBundle($request->all());\n return redirect()->route('bundles');\n }", "protected function processForm(sfWebRequest $request, sfForm $form) {\n $collectionId = sfToolkit::getArrayValueForPath($form->getName(), 'parent_node_id');\n $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));\n if ($form->isValid()) {\n $asset_group = $form->save();\n\n $this->redirect('assetgroup/edit?id=' . $asset_group->getId() . '&c=' . $form->getOption('collectionID'));\n }\n }", "public function test_formNodeAdded() : void\n {\n $form = $this->createForm();\n $form->onFormNodeAdded(array($this, 'callback_formNodeAdded'));\n $form->onNodeAdded(array($this, 'callback_nodeAdded'));\n\n $form->addText('foo');\n\n $this->assertTrue($this->formEventCalled);\n $this->assertTrue($this->containerEventCalled);\n }", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "function after_validation_on_create() {}", "function adstrue_vendor_provice_validate($form, &$form_state) {\n drupal_add_css(drupal_get_path('module','adstrue_vendor').'/assets/css/custom_form.css');\n \n $name_province = $form_state['values']['name_province'];\n $company_id = $form_state['values']['company_id'];\n if($company_id == 0) {\n form_set_error('company_id',t('Vui lòng chọn công ty'));\n }\n\n $province_description = $form_state['values']['province_description'];\n $region_id = $form_state['values']['region_id'];\n $company_id = $form_state['values']['company_id'];\n if($name_province == '') {\n form_set_error('Vui lòng nhập tên tỉnh thành');\n }\n}", "abstract protected function fieldValidation($submittedData);", "protected function ValidateForm()\n {\n return true;\n }", "public function validateCreate(){\n $currentUser=$this->getCurrentUser();\n /** @noinspection PhpMethodParametersCountMismatchInspection */\n $this->input->field('miner')\n ->addRule(IValidator::REQUIRED,'Miner ID is required!')\n ->addRule(IValidator::CALLBACK,'Requested miner is not available!',function($value)use($currentUser){\n try{\n $miner=$this->minersFacade->findMiner($value);\n }catch(\\Exception $e){\n return false;\n }\n if (!($miner->getUserId()==$currentUser->userId)){return false;}\n return $miner->metasource->state==Metasource::STATE_AVAILABLE;\n });\n /** @noinspection PhpMethodParametersCountMismatchInspection */\n $this->input->field('minSupport')\n ->addRule(IValidator::REQUIRED,'Min value of support is required!')\n ->addRule(IValidator::RANGE,'Min value of support has to be in interval [0;1]!',[0,1]);\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 validateOnAdd( $entity ){\t\t\t\n\t\t//TODO unicidad (cliente )\n\t\t\n\t}", "public function check_form()\n\t{\n\t\tProfil_fields_forum::validate(PROFIL_FIELDS_CONTACT, 'contact', $this->errstr, Fsb::$session->id());\n\t}", "function onlinepdf_node_validate($node, $form, &$form_state)\r\n{\r\n $load = sys_getloadavg();\r\n if ($load[0] > variable_get('onlinepdf_max_load', 16) || $load[1] > variable_get('onlinepdf_max_5min_load', 8)) {\r\n form_set_error(\"submit\", t('The pdfjpg service is currently overloaded! Please wait a few minutes before submitting again.', array()));\r\n watchdog('load', 'The systemload is %load! Conversion process on hold.', array('%load' => $load[0]), WATCHDOG_WARNING);\r\n };\r\n //$form_state['submit_handlers'][] = '_custom_request_node_disable_msg';\r\n}", "public function beforeValidationOnCreate()\n {\n\n }", "function mongo_node_type_edit_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $old_entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_entity_type) {\n $set += mongo_node_type_default_settings($label, $machine_name);\n $set[$machine_name] = $set[$old_entity_type];\n unset($set[$old_entity_type]);\n\n // Update existing mongo entities with new entity type.\n _mongo_node_update_type($old_entity_type, $machine_name);\n }\n else {\n $set[$machine_name]['label'] = $label;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "public abstract function validation();", "public function setup()\n {\n parent::setup();\n \n $formClass = $this->getChildFormClass();\n $collection = $this->getParentObject()->{$this->getRelationAlias()};\n $nbChilds = 0;\n $min = $this->getMinNbChilds();\n $max = $this->getMaxNbChilds();\n \n if ($min > $max && $max > 0)\n throw new RuntimeException('min cannot be greater than max.');\n \n // embed forms for each child element that is already persisted\n foreach ($collection as $childObject)\n {\n $form = new $formClass($childObject);\n $pk = $childObject->identifier();\n \n if ($childObject->exists() === false)\n throw new RuntimeException('Transient child objects are not supported.');\n \n if (count($pk) !== 1)\n throw new RuntimeException('Composite primary keys are not supported.');\n \n $this->embedForm(self::PERSISTENT_PREFIX.reset($pk), $form);\n $nbChilds += 1;\n }\n \n // embed as many additional forms as are needed to reach the minimum\n // number of required child objects\n for (; $nbChilds < $min; $nbChilds += 1)\n {\n $form = new $formClass($collection->get(null));\n $this->embedForm(self::TRANSIENT_PREFIX.$nbChilds, $form);\n }\n \n $this->validatorSchema->setPostValidator(new sfValidatorCallback(array(\n 'callback' => array($this, 'validateLogic'),\n )));\n }", "function hosting_signup_form_validate($form, &$form_state) {\n $key = variable_get('hosting_signup_server_key', '');\n $values = $form_state['values'];\n $values['form_id'] = '_hosting_signup_form';\n\n $return = xmlrpc(_hosting_signup_get_url(), 'hosting_signup.validateForm', $key, $values);\n if (is_array($return) && sizeof($return)) {\n foreach($return as $field => $message) {\n form_set_error($field, $message);\n }\n }\n}", "public function ajax_create_field() {\n\t\tglobal $wpdb;\n\n\t\t$data = array();\n\t\t$field_options = $field_validation = $parent = $previous = '';\n\n\t\tforeach ( $_REQUEST['data'] as $k ) {\n\t\t\t$data[ $k['name'] ] = $k['value'];\n\t\t}\n\n\t\tcheck_ajax_referer( 'create-field-' . $data['form_id'], 'nonce' );\n\n\t\t$form_id = absint( $data['form_id'] );\n\t\t$field_key = sanitize_title( $_REQUEST['field_type'] );\n\t\t$field_type = strtolower( sanitize_title( $_REQUEST['field_type'] ) );\n\n\t\t$parent = ( isset( $_REQUEST['parent'] ) && $_REQUEST['parent'] > 0 ) ? $_REQUEST['parent'] : 0;\n\t\t$previous = ( isset( $_REQUEST['previous'] ) && $_REQUEST['previous'] > 0 ) ? $_REQUEST['previous'] : 0;\n\n\t\t// If a Page Break, the default name is Next, otherwise use the field type\n\t\t$field_name = ( 'page-break' == $field_type ) ? 'Next' : $_REQUEST['field_type'];\n\n\t\t// Set defaults for validation\n\t\tswitch ( $field_type ) :\n\t\t\tcase 'select' :\n\t\t\tcase 'radio' :\n\t\t\tcase 'checkbox' :\n\t\t\t\t$field_options = serialize( array( 'Option 1', 'Option 2', 'Option 3' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'email' :\n\t\t\tcase 'url' :\n\t\t\tcase 'phone' :\n\t\t\t\t$field_validation = $field_type;\n\t\t\t\tbreak;\n\n\t\t\tcase 'currency' :\n\t\t\t\t$field_validation = 'number';\n\t\t\t\tbreak;\n\n\t\t\tcase 'number' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\tbreak;\n\n\t\t\tcase 'min' :\n\t\t\tcase 'max' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\t$field_options = serialize( array( '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'range' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\t$field_options = serialize( array( '1', '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'time' :\n\t\t\t\t$field_validation = 'time-12';\n\t\t\t\tbreak;\n\n\t\t\tcase 'file-upload' :\n\t\t\t\t$field_options = serialize( array( 'png|jpe?g|gif' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ip-address' :\n\t\t\t\t$field_validation = 'ipv6';\n\t\t\t\tbreak;\n\n\t\t\tcase 'hidden' :\n\t\t\tcase 'custom-field' :\n\t\t\t\t$field_options = serialize( array( '' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'autocomplete' :\n\t\t\t\t$field_validation = 'auto';\n\t\t\t\t$field_options = serialize( array( 'Option 1', 'Option 2', 'Option 3' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'name' :\n\t\t\t\t$field_options = serialize( array( 'normal' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'date' :\n\t\t\t\t$field_options = serialize( array( 'dateFormat' => 'mm/dd/yy' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'rating' :\n\t\t\t\t$field_options = serialize( array( 'negative' => 'Disagree', 'positive' => 'Agree', 'scale' => '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'likert' :\n\t\t\t\t$field_options = serialize( array( 'rows' => \"Ease of Use\\nPortability\\nOverall\", 'cols' => \"Strongly Disagree\\nDisagree\\nUndecided\\nAgree\\nStrongly Agree\" ) );\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\n\n\t\t// Get fields info\n\t\t$all_fields = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE form_id = %d ORDER BY field_sequence ASC\", $form_id ) );\n\t\t$field_sequence = 0;\n\n\t\t// We only want the fields that FOLLOW our parent or previous item\n\t\tif ( $parent > 0 || $previous > 0 ) {\n\t\t\t$cut_off = ( $previous > 0 ) ? $previous : $parent;\n\n\t\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\t\tif ( $field->field_id == $cut_off ) {\n\t\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t\t}\n\t\t\tarray_shift( $all_fields );\n\n\t\t\t// If the previous had children, we need to remove them so our item is placed correctly\n\t\t\tif ( !$parent && $previous > 0 ) {\n\t\t\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\t\t\tif ( !$field->field_parent )\n\t\t\t\t\t\tbreak;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Create the new field's data\n\t\t$newdata = array(\n\t\t\t'form_id' \t\t\t=> absint( $data['form_id'] ),\n\t\t\t'field_key' \t\t=> $field_key,\n\t\t\t'field_name' \t\t=> $field_name,\n\t\t\t'field_type' \t\t=> $field_type,\n\t\t\t'field_options' \t=> $field_options,\n\t\t\t'field_sequence' \t=> $field_sequence,\n\t\t\t'field_validation' \t=> $field_validation,\n\t\t\t'field_parent' \t\t=> $parent\n\t\t);\n\n\t\t// Create the field\n\t\t$wpdb->insert( $this->field_table_name, $newdata );\n\t\t$insert_id = $wpdb->insert_id;\n\n\t\t// VIP fields\n\t\t$vip_fields = array( 'verification', 'secret', 'submit' );\n\n\t\t// Rearrange the fields that follow our new data\n\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\tif ( !in_array( $field->field_type, $vip_fields ) ) {\n\t\t\t\t$field_sequence++;\n\t\t\t\t// Update each field with it's new sequence and parent ID\n\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), array( 'field_id' => $field->field_id ) );\n\t\t\t}\n\t\t}\n\n\t\t// Move the VIPs\n\t\tforeach ( $vip_fields as $update ) {\n\t\t\t$field_sequence++;\n\t\t\t$where = array(\n\t\t\t\t'form_id' \t\t=> absint( $data['form_id'] ),\n\t\t\t\t'field_type' \t=> $update\n\t\t\t);\n\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), $where );\n\n\t\t}\n\n\t\techo $this->field_output( $data['form_id'], $insert_id );\n\n\t\tdie(1);\n\t}", "public function validateForm(){\n\n if (isset($_POST['sign-up'])) {\n self::registrationForm();\n };\n\n if(isset($_POST['login-form'])){\n self::loginForm();\n }\n }", "function validarFormulario()\n\t\t{\n\t\t}", "function os2dagsorden_create_agenda_meeting_create_user_form($form, &$form_state) {\r\n $form_state['meeting_data'] = json_encode($form_state['values']);\r\n $form[] = array(\r\n '#markup' => '<h1 class=\"title\">' . t('External user') . '</h1>',\r\n );\r\n\r\n $form[] = array(\r\n '#markup' => '<div class=\"node\">',\r\n );\r\n $form['firstname'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Firstname'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n );\r\n $form['lastname'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Lastname'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n );\r\n $form['email'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Email'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n '#element_validate' => array('_os2dagsorden_create_agenda_meeting_create_user_form_email_validate'),\r\n );\r\n $form['save_bullet_point'] = array(\r\n '#type' => 'submit',\r\n '#value' => t('Save'),\r\n '#submit' => array('_os2dagsorden_create_agenda_meeting_create_user_form_submit'),\r\n );\r\n $form[] = array(\r\n '#markup' => '</div>',\r\n );\r\n $form['#attached']['css'] = array(\r\n drupal_get_path('module', 'os2dagsorden_create_agenda') . '/css/form_theme.css',\r\n );\r\n return $form;\r\n}", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "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 validateMakeBlog(){\n\n }", "public function createValidator();", "public function testCreateForm() {\n $test_label = $this->randomMachineName();\n $test_id = $this->randomMachineName();\n\n $this->drupalLogin($this->adminUser);\n $this->drupalPostForm('admin/structure/legal/add', [\n 'label' => $test_label,\n 'id' => $test_id,\n 'settings[new_users][require]' => 1,\n 'settings[new_users][require_method]' => 'form_inline',\n 'settings[existing_users][require]' => 1,\n 'settings[existing_users][require_method]' => 'redirect',\n ], 'Save');\n\n // Load a reset version of the entity.\n /** @var \\Drupal\\entity_legal\\EntityLegalDocumentInterface $created_document */\n $created_document = $this->getUncachedEntity(ENTITY_LEGAL_DOCUMENT_ENTITY_NAME, $test_id);\n\n $this->assertTrue(!empty($created_document), 'Document was successfully created');\n\n if ($created_document) {\n $this->assertEqual($test_label, $created_document->label(), 'Label was saved correctly');\n $this->assertEqual($test_id, $created_document->id(), 'ID was saved correctly');\n $this->assertEqual(1, $created_document->get('require_signup'), 'Signup requirement was saved correctly');\n $this->assertEqual(1, $created_document->get('require_existing'), 'Existing user requirement was saved correctly');\n $this->assertEqual('form_inline', $created_document->get('settings')['new_users']['require_method'], 'Existing user requirement was saved correctly');\n $this->assertEqual('redirect', $created_document->get('settings')['existing_users']['require_method'], 'Existing user requirement was saved correctly');\n }\n }", "function validate_user_form()\n {\n }", "protected function _processForm() {\n\t\t$formValidators = $this->getElement()->getValidators();\n\n\t\t$constraints = array();\n\t\tforeach ($formValidators as $validator) {\n\t\t\t$situations = array();\n\t\t\t$conditions = array();\n\t\t\tif (isset($validator['situations'])) {\n\t\t\t\tforeach ($validator['situations'] as $name => $validators) {\n\t\t\t\t\t$situations[$name] = $this->_generateClientSideValidation($name, $this->_convertFormValidation($validators), false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($validator['conditions'] as $name => $validators) {\n\t\t\t\t// Make the field trigger itself.\n\t\t\t\tif (!array_key_exists($name, $this->_validationTriggers)) {\n\t\t\t\t\t$this->_validationTriggers[$name] = array();\n\t\t\t\t}\n\t\t\t\t$this->_validationTriggers[$name][$name] = true;\n\n\t\t\t\t$clientsideValidation = $this->_generateClientSideValidation($name, $this->_convertFormValidation($validators));\n\t\t\t\tif (isset($validator['message'])) {\n\t\t\t\t\tforeach ($clientsideValidation as $rule => & $message) {\n\t\t\t\t\t\t$message = $validator['message'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_validatedFields[$name][] = array(\n\t\t\t\t\t'situations' => $situations,\n\t\t\t\t\t'conditions' => array($name => $clientsideValidation)\n\t\t\t\t);\n\n\t\t\t\t// Now ensure that each element that determines whether the condition needs to be satisfied trigger the checks on this element.\n\t\t\t\tforeach (array_keys($situations) as $trigger) {\n\t\t\t\t\t$this->_validationTriggers[$trigger][$name] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function validator(Request $request)\n {\n //validate the form...\n }", "function before_validation_on_create() {}", "public function createAddForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(),$entity,array(\n 'action' => $this->generateUrl('rsp_create'),\n 'method'=> 'POST'\n ));\n \n \n $form->add('Add','submit',array(\n //'attr'=>array('onClick'=>'return checksubmit(this)')\n ));\n return $form;\n }", "public function buildForm()\n {\n $this\n ->add('group_name', 'text')\n ->add(\n 'organizations',\n 'choice',\n [\n 'choices' => $this->getOrganizationName(),\n 'attr' => ['style' => 'height:100px'],\n 'multiple' => true\n ]\n )\n ->add(\n 'group_identifier',\n 'text',\n [\n 'attr' => [\n 'id' => 'group_identifier'\n ],\n 'help_block' => [\n 'text' => \"Your group identifier will be used as a prefix for your organisation group. We recommend that you use a short abbreviation that uniquely identifies your organisation group. If your group identifier is 'abc' the username for the group created with this registration will be 'abc_group'.\",\n 'tag' => 'p',\n 'attr' => ['class' => 'help-block']\n ],\n 'label' => 'Group Identifier'\n ]\n );\n }", "function patternentity_form_validate(&$form, &$form_state) {\n $validators = array('file_validate_extensions' => array('yaml xml'));\n //if (empty($form_state['value']['pattern_file'])) {\n // form_set_error('pattern_file', t('please choose a pattern file.'));\n //}\n //else {\n $file = file_save_upload('pattern_file', $validators);\n\n $file_exist = db_select('patternentity', 'pe')\n ->fields('pe', array('file_name'))\n ->condition('file_name', $file->filename, '=')\n ->execute()\n ->fetchAssoc();\n\n if ($file_exist) {\n form_set_error('pattern_file', t('pattern file already exists.'));\n }\n\n $form_state['storage']['file_obj'] = $file;\n $pattern = NULL;\n $file_extension = NULL;\n if ($file) {\n $file_extension = pathinfo($file->filename, PATHINFO_EXTENSION);\n\n // Choose appropriate function based on the file extension.\n // Can be FALSE, if no parser is found.\n $load_function = patterns_parser_get_parser_function($file_extension, PATTERNS_PARSER_LOAD);\n\n // Load and save pattern.\n if (!$load_function || !($pattern = $load_function($file->uri))) {\n form_set_error('pattern_file', t('parser pattern file failed.'));\n }\n\n if (!patterns_validate_pattern($pattern, $file_extension, PATTERNS_VALIDATE_SYNTAX)) {\n form_set_error('pattern_file', t('pattern file has wrong syntax.'));\n }\n }\n else {\n form_set_error('pattern_file', t('No file was uploaded.'));\n }\n \n if (isset($pattern['info']['title']) && !empty($pattern['info']['title'])) {\n $form_state['values']['title'] = $pattern['info']['title'];\n }\n else {\n form_set_error('pattern_file', t('file don\\'t have \\'title\\' field.'));\n }\n if (isset($pattern['info']['description']) && !empty($pattern['info']['description'])) {\n $form_state['values']['description'] = $pattern['info']['description'];\n }\n else {\n form_set_error('pattern_file', t('file don\\'t have \\'description\\' field.'));\n }\n if (isset($pattern['info']['category']) && !empty($pattern['info']['category'])) {\n $form_state['values']['category'] = $pattern['info']['category'];\n }\n else {\n form_set_error('pattern_file', t('file don\\'t have \\'category\\' field.'));\n }\n $form_state['values']['pattern'] = $pattern;\n if (isset($pattern['info']['author']) && !empty($pattern['info']['author'])) {\n $form_state['values']['author'] = $pattern['info']['author'];\n }\n else {\n form_set_error('pattern_file', t('file don\\'t have \\'author\\' field.'));\n }\n Global $user;\n $form_state['values']['uploader'] = $user->uid;\n $form_state['values']['file_name'] = $file->filename;\n $form_state['values']['file_format'] = $file_extension;\n //$form_state['values']['file_path'] = $file->uri;\n\n $dir = 'public://patternentity/';\n if (!file_prepare_directory($dir)) {\n form_set_error('pattern_file', t('public://patternentity doesn\\'t exist, or isn\\'t writable.'));\n }\n else {\n if ($file = file_move($file, $dir)) {\n $form_state['storage']['file_obj'] = $file;\n $file->status = FILE_STATUS_PERMANENT;\n file_save($file);\n $form_state['values']['file_path'] = $file->uri;\n }\n else {\n form_set_error('pattern_file', t('save to public dir failed'));\n }\n }\n //}\n}", "function btrProject_import_translations_form_validate($form, &$form_state) {\n bcl::uploadfile_validate();\n}", "protected function mainValidation()\n {\n $this->validator->add(\n 'title',\n new StringLength([\n 'max' => 50\n ])\n );\n\n $this->validator->add(\n 'description',\n new StringLength([\n 'max' => 200,\n 'allowEmpty' => true\n ])\n );\n }", "public function validate_fields() {\n \n\t\t//...\n \n }", "function redmine_sso_admin_settings_validate($form, $form_state) {\n /**\n * TODO\n * check url\n * check if group exsists\n * check if project exsists\n */\n}", "function helper_import_add_form(&$form_state) {\n global $user;\n $form = array();\n\n //drupal_set_message(print_r($form_state));\n\n // Check if the user can create something.\n $types = node_import_types();\n if (empty($types)) {\n form_set_error('', t('No tiene permisos para crear contenidos. <a href=\"!permissions\">Asigne correctamente los permisos</a> en la página de administración.', array('!permissions' => url('admin/user/permissions'))));\n }\n\n // ------------------------------------------------------------\n // Get the currently filled in values of the form.\n $form_state['storage'] = isset($form_state['storage']) ? $form_state['storage'] : array();\n $form_state['values'] = isset($form_state['values']) ? $form_state['values'] : array();\n $values = array_merge($form_state['storage'], $form_state['values']);\n\n // ------------------------------------------------------------\n // Check and store the page we are on.\n $pages = array(\n 'file' => array(\n 'title' => t('Select file'),\n 'description' => t('Seleccione el archivo <a href=\"http://es.wikipedia.org/wiki/CSV\" target=\"_blank\">CSV</a> que contiene los datos a importar.<br>Un archivo CSV, es un archivo donde los datos se encuentran separados por coma. Cada dato contenido entre comas se denomina campo, el cual debe estar entre comillas dobles.<br>Puede descargar un ejemplo de archivo CSV <a href=\"http://localhost/nuevo_sistema_mp/sites/default/files/ejemplo.csv\">aqui</a>.'),\n ),\n 'preview' => array(\n 'title' => t('Vista Previa'),\n 'description' => t('Aquí pueda visualizar previamente los datos a importar. Si encuentra errores puede hacer volver %back o comenzar de nuevo. También puede recargar solo esta página por si ocurrió un error al cargarla %reload.', array('%reload' => t('Recargar'), '%back' => t('Atrás'))),\n ),\n 'start' => array(\n 'title' => t('Iniciar Importación'),\n 'description' => t('Si todo está correcto, clic %start.', array('%start' => t('Start import'))),\n ),\n );\n\n $page_keys = array_keys($pages);\n $first_page = $page_keys[0];\n $last_page = $page_keys[count($page_keys) - 1];\n\n $page = isset($values['page']) ? $values['page'] : $first_page;\n $form['#pages'] = $pages;\n $form_state['storage']['page'] = $page;\n\n // ------------------------------------------------------------\n // Set title and description for the current page.\n $steps = count($pages);\n $step = array_search($page, $page_keys) + 1;\n\n if ($page !== 'intro') {\n drupal_set_title(t('@title (Paso @step de @steps)', array('@title' => $pages[$page]['title'], '@step' => $step, '@steps' => $steps)));\n }\n\n $form['help'] = array(\n '#value' => '<div class=\"help\">'. $pages[$page]['description'] .'</div>',\n '#weight' => -50,\n );\n\n // ------------------------------------------------------------\n // Select or upload a file.\n if ($page == 'file') {\n $files = node_import_list_files(TRUE);\n\n $form['file_select'] = array(\n '#type' => 'item',\n '#title' => t('Seleccione el archivo'),\n '#theme' => 'node_import_file_select',\n );\n\n if (isset($values['fid'])) {\n foreach ($files as $fid => $file) {\n if ($fid == $values['fid']) {\n $file_owner = user_load(array('uid' => $file->uid));\n $form['file_select'][$fid] = array(\n 'filename' => array('#value' => $file->filename),\n 'filepath' => array('#value' => $file->filepath),\n 'filesize' => array('#value' => format_size($file->filesize)),\n 'timestamp' => array('#value' => format_date($file->timestamp, 'small')),\n 'uid' => array('#value' => ($file->uid == 0 ? t('Public FTPd file') : theme('username', $file_owner))),\n );\n $aux_files = node_import_extract_property($files, 'filename'); \n $form['file_select']['fid'] = array(\n '#type' => 'radios',\n '#options' => $aux_files['fid'],\n '#default_value' => isset($values['fid']) ? $values['fid'] : 0,\n );\n }\n }\n set_content_type($form_state);\n set_file_options($form_state);\n map_fields($form_state);\n }\n else {\n $form['file_select']['fid'] = array(\n '#type' => 'item',\n '#value' => t('No files available.'),\n );\n }\n\n $form['#attributes'] = array('enctype' => 'multipart/form-data');\n\n $form['upload'] = array(\n '#type' => 'fieldset',\n '#title' => t('Upload file'),\n '#description' => t(''),\n '#collapsible' => FALSE,\n '#collapsed' => FALSE,\n );\n $form['upload']['file_upload'] = array(\n '#type' => 'file',\n );\n $form['upload']['file_upload_button'] = array(\n '#type' => 'submit',\n '#value' => t('Upload'),\n '#submit' => array('node_import_add_form_submit_upload_file'),\n );\n }\n\n // ------------------------------------------------------------\n // Preview.\n if ($page == 'preview') {\n $form['preview_count'] = array(\n '#type' => 'select',\n '#title' => t('Number of records to preview'),\n '#default_value' => isset($values['preview_count']) ? $values['preview_count'] : variable_get('node_import:preview_count', 5),\n '#options' => drupal_map_assoc(array(5, 10, 15, 25, 50, 100, 150, 200)),\n );\n\n $form['preview'] = array(\n '#title' => t('Previa'),\n );\n\n foreach ($values['previews'] as $i => $preview) {\n $form['preview'][] = array(\n '#type' => 'item',\n '#title' => t('Record @count', array('@count' => $i + 1)),\n '#value' => $preview,\n );\n }\n }\n\n // ------------------------------------------------------------\n // Start import.\n if ($page == 'start') {\n $files = node_import_list_files();\n $file = $files[$values['fid']]; \n $form[] = helper_import_task_details($values);\n }\n\n // ------------------------------------------------------------\n // Add Back, Next and/or Start buttons.\n $form['buttons-bottom'] = array(\n '#weight' => 50,\n );\n $form['buttons-bottom']['back_button'] = array(\n '#type' => 'submit',\n '#value' => t('Back'),\n '#submit' => array('node_import_add_form_submit_back'),\n '#disabled' => ($page == $first_page),\n );\n $form['buttons-bottom']['reload_button'] = array(\n '#type' => 'submit',\n '#value' => t('Reload page'),\n '#submit' => array('node_import_add_form_submit_reload'),\n '#disabled' => ($page == $first_page),\n );\n $form['buttons-bottom']['reset_button'] = array(\n '#type' => 'submit',\n '#value' => t('Reset page'),\n '#submit' => array('node_import_add_form_submit_reset'),\n '#disabled' => ($page == $first_page),\n ); \n $form['buttons-bottom']['next_button'] = array(\n '#type' => 'submit',\n '#value' => ($page == $last_page) ? t('Start import') : t('Siguiente'),\n '#validate' => array('helper_import_add_form_validate_next'),\n '#submit' => array('helper_import_add_form_submit_next'),\n '#disabled' => empty($types),\n ); \n\n return $form;\n}", "public function getSetupForm() {\n\n /**\n * @todo find a beter way to do this\n */\n\n if(!empty($_POST['nodeId'])){\n $this->id = $_POST['nodeId'];\n }\n\n if (empty($this->id)) {\n $table = new HomeNet_Model_DbTable_Nodes();\n $this->id = $table->fetchNextId($this->house);\n }\n // $this->id = 50;\n\n $form = new HomeNet_Form_Node();\n $sub = $form->getSubForm('node');\n $id = $sub->getElement('node');\n $id->setValue($this->id);\n \n $table = new HomeNet_Model_DbTable_Nodes();\n $rows = $table->fetchAllInternetNodes();\n\n $uplink = $sub->getElement('uplink');\n\n foreach($rows as $value){\n $uplink->addMultiOption($value->id, $value->id);\n }\n\n\n return $form;\n }", "protected function type_validation()\n {\n if (is_superadmin_loggedin()) {\n $this->form_validation->set_rules('branch_id', translate('branch'), 'required');\n }\n $this->form_validation->set_rules('type_name', translate('name'), 'trim|required|callback_unique_type');\n }", "protected function _validate() {\n\t}", "protected function _processValidForm()\n {\n $table = $this->_getTable();\n\n $formValues = $this->_getForm()->getValues();\n\n if (!empty($formValues[$this->_getPrimaryIdKey()])) {\n $row = $this->_getRow($this->_getPrimaryId());\n } else {\n $row = $table->createRow();\n }\n\n foreach ($formValues as $key => $value) {\n if (isset($row->$key) && !$table->isIdentity($key)) {\n $row->$key = $value;\n }\n }\n\n $row->save();\n\n $this->_goto($this->_getBrowseAction());\n }", "public function createobject($data, Form $form, $request)\n {\n if ($this->data()->AllowUserSelection) {\n $pid = $request->postVar('CreateLocationID');\n if ($this->isParentIdValid($pid)) {\n $this->pid = $pid;\n }\n } else {\n $this->pid = $this->data()->CreateLocationID;\n }\n\n if ($this->data()->AllowUserWhenObjectExists) {\n $this->woe = $request->postVar('WhenObjectExists');\n } else {\n $this->woe = $this->data()->WhenObjectExists;\n }\n\n // create a new object or update / replace one...\n $obj = null;\n if ($this->data()->useObjectExistsHandling()) {\n $existingObject = $this->objectExists();\n if ($existingObject && $this->woe == 'Replace') {\n if ($existingObject->hasExtension('VersionedFileExtension') || $existingObject->hasExtension(Versioned::class)) {\n $obj = $existingObject;\n } else {\n $existingObject->delete();\n }\n } elseif ($existingObject && $this->woe == 'Error') {\n $form->sessionMessage(\"Error: $this->CreateType already exists\", 'bad');\n return $this->redirect($this->Link()); // redirect back with error message\n }\n }\n if (!$obj) {\n // Set $obj to $this->editObject so it's modifying the same entity provided to the form.\n // (Ensures UnsavedRelationList stuff works properly)\n $obj = $this->editObject;\n }\n\n if ($this->pid) {\n $obj->ParentID = $this->pid;\n }\n\n $obj->ObjectCreatorPageID = $this->ID;\n\n // if (!$form->validate()) {\n // \t$form->sessionMessage(\"Could not validate form\", 'bad');\n // \treturn $this->redirect($this->data()->Link());\n // }\n\n // allow extensions to change the object state just before creating.\n $this->extend('updateObjectBeforeCreate', $obj);\n\n if ($obj->hasMethod('onBeforeFrontendCreate')) {\n $obj->onBeforeFrontendCreate($this);\n }\n\n $origMode = Versioned::get_reading_mode();\n Versioned::set_stage('Stage');\n\n try {\n $form->saveInto($obj);\n } catch (ValidationException $ve) {\n Versioned::set_reading_mode($origMode);\n $form->sessionMessage(\"Could not upload file: \" . $ve->getMessage(), 'bad');\n $this->redirect($this->data()->Link());\n return;\n }\n\n // get workflow\n $workflowID = $this->data()->WorkflowDefinitionID;\n $workflow = false;\n if ($workflowID && $obj->hasExtension(WorkflowApplicable::class)) {\n if ($workflow = WorkflowDefinition::get()->byID($workflowID)) {\n $obj->WorkflowDefinitionID = $workflowID;\n }\n }\n\n $additional = $this->data()->AdditionalProperties->getValues();\n if ($additional) {\n foreach ($additional as $field => $value) {\n $obj->$field = $value;\n }\n }\n\n if (Extensible::has_extension($this->CreateType, Versioned::class)) {\n // switching to make sure everything we do from now on is versioned, until the\n // point that we redirect\n $obj->write();\n if ($this->PublishOnCreate) {\n $obj->doPublish();\n }\n } else {\n $obj->write();\n }\n\n // start workflow\n if ($workflow) {\n $svc = singleton(WorkflowService::class);\n $svc->startWorkflow($obj);\n }\n\n $this->extend('objectCreated', $obj);\n // let the object be updated directly\n // if this is a versionable object, it'll be edited on stage\n $obj->invokeWithExtensions('frontendCreated');\n\n Versioned::set_reading_mode($origMode);\n $link = $this->data()->Link();\n $link = $link . (strpos($link, \"?\") !== false ? \"&\" : \"?\") . \"new=\" . $obj->ID;\n $this->redirect($link);\n }", "function validate_forms()\r\n{\r\n\tglobal $alert,$db;\r\n\tif($_REQUEST['dont_save']!=1)\r\n\t{\r\n\t\t//Validations\r\n\t\t$alert = '';\r\n\t\t$fieldRequired \t\t= array($_REQUEST['review_author']);\r\n\t\t$fieldDescription \t= array('Review Author');\r\n\t\t$fieldEmail \t\t= array();\r\n\t\t$fieldConfirm \t\t= array();\r\n\t\t$fieldConfirmDesc \t= array();\r\n\t\t$fieldNumeric \t\t= array();\r\n\t\t$fieldNumericDesc \t= array();\r\n\t\t\r\n\t\t\r\n\t\tserverside_validation($fieldRequired, $fieldDescription, $fieldEmail, $fieldConfirm, $fieldConfirmDesc, $fieldNumeric, $fieldNumericDesc);\r\n\t}\r\n}", "function courier_connector_queue_validate(&$form_state) {\n\n}", "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}", "public function validate()\n {\n $this->validateNode($this->tree);\n }", "function main() {\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tprint_r($_POST);\n\t\t\techo \"<br />\";\n\t\t\t\n\t\t\t// Required Fields in the POST data //\t\t\t\n\t\t\tif ( !isset($_POST['_type']) ) return;\n\t\t\tif ( !isset($_POST['_subtype']) ) return;\n\t\t\tif ( !isset($_POST['_name']) ) return;\n\t\t\tif ( !isset($_POST['_mail']) ) return;\n\t\t\tif ( !isset($_POST['_password']) ) return;\n\t\t\tif ( !isset($_POST['_publish']) ) return;\n\t\n\t\t\t// Node Type //\n\t\t\t$type = sanitize_NodeType($_POST['_type']);\n\t\t\tif ( empty($type) ) return;\t\n\n\t\t\t$subtype = sanitize_NodeType($_POST['_subtype']);\n\t\n\t\t\t// Name/Title //\n\t\t\t$name = $_POST['_name'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Slug //\n\t\t\tif ( empty($_POST['_slug']) )\n\t\t\t\t$slug = $_POST['_name'];\n\t\t\telse\n\t\t\t\t$slug = $_POST['_slug'];\n\t\t\t$slug = sanitize_Slug($slug);\n\t\t\tif ( empty($slug) ) return;\n\t\t\t\n\t\t\t// TODO: Confirm slug is legal\n\t\t\t\t\n\t\t\t// Body //\n\t\t\t$body = $_POST['_body'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Do we publish? //\n\t\t\t$publish = mb_strtolower($_POST['_publish']) == \"true\";\n\t\t\t\n\t\t\t// Email //\n\t\t\t$mail = sanitize_Email($_POST['_mail']);\n\t\t\tif ( empty($mail) ) return;\n\n\t\t\t// Password //\n\t\t\t$password = $_POST['_password'];\n\t\t\tif ( empty($password) ) return;\n\n\t\n\t\t\t$id = node_Add(\n\t\t\t\t$type,$subtype,$slug,$name,$body,\n\t\t\t\t0,2,\n\t\t\t\t$publish\n\t\t\t);\n\t\t\t\n\t\t\tuser_Add($id,$mail,$password);\n\t\n\t\t\techo \"Added \" . $id . \".<br />\";\n\t\t\techo \"<br />\";\n\t\t}\n\t}", "public function listingValidate($form){\n \n //verify form only in case it was posted\n //via \"create button\"\n \n if (!$form[\"add_postage\"]->submittedBy){\n $this->lHelp->formValidateValues($form);\n $images = $form->values['image'];\n $this->lHelp->imgUpload($images, $form);\n }\n }", "public function createAction()\n {\n $entity = new Node();\n $request = $this->getRequest();\n $form = $this->createForm(new NodeType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n $this->get('session')->setFlash('notice', 'Los cambios se realizaron correctamente.');\n return $this->redirect($this->generateUrl('node_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('HegesAppNodeBundle:Node:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "function acf_validate_save_post()\n {\n }" ]
[ "0.74918324", "0.67976105", "0.6633064", "0.6482915", "0.6348119", "0.6339121", "0.6242151", "0.60979575", "0.5983234", "0.5968238", "0.5949089", "0.594119", "0.58625954", "0.5776641", "0.5776641", "0.5740215", "0.572987", "0.57215273", "0.56918436", "0.56918436", "0.5639497", "0.56300795", "0.5603309", "0.5557135", "0.5542969", "0.5509469", "0.54869384", "0.5486055", "0.5477474", "0.5472062", "0.5466459", "0.5451576", "0.54387397", "0.5427439", "0.54256314", "0.54080296", "0.540065", "0.5388927", "0.53468645", "0.533832", "0.5336713", "0.5323808", "0.5319102", "0.5303864", "0.5293391", "0.5290792", "0.52732307", "0.5270475", "0.5252267", "0.52329856", "0.5229981", "0.5229313", "0.5226174", "0.52236015", "0.52202433", "0.521754", "0.5213208", "0.5203543", "0.5201836", "0.5200418", "0.5199459", "0.51962835", "0.519257", "0.5189227", "0.51761", "0.516036", "0.5156914", "0.51552606", "0.51503927", "0.5150231", "0.51486886", "0.51460534", "0.5144452", "0.514077", "0.514067", "0.51405156", "0.5139841", "0.51389074", "0.51332563", "0.51263136", "0.51237845", "0.51231277", "0.5121105", "0.5115022", "0.5112598", "0.5111922", "0.51115817", "0.51052237", "0.50979733", "0.5092703", "0.50909513", "0.5089649", "0.50790834", "0.5072242", "0.5071768", "0.50702345", "0.50694996", "0.506742", "0.506472", "0.5061625" ]
0.73487484
1
Form submission handler for mongo_node_bundle_create_form().
function mongo_node_bundle_create_form_submit($form, $form_state) { $entity_type = $form_state['values']['entity_type']; $label = $form_state['values']['label']; $machine_name = $form_state['values']['name']; $description = $form_state['values']['description']; $set = mongo_node_settings(); $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description); // @todo - redirect to bundle type page. mongo_node_settings_save($set); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "function mongo_node_type_create_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n\n $set = mongo_node_settings();\n $set += mongo_node_type_default_settings($label, $machine_name);\n\n // @todo - redirect to entity type page\n mongo_node_settings_save($set);\n}", "function mongo_node_bundle_edit_form_submit($form, $form_state) {\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['bundle_type']['entity_type'];\n $old_bundle_type = $form_state['values']['bundle_type']['bundle'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_bundle_type) {\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n $set[$entity_type]['bundles'][$machine_name] = $set[$entity_type]['bundles'][$old_bundle_type];\n unset($set[$entity_type]['bundles'][$old_bundle_type]);\n\n // Update existing mongo entities with new bundle.\n //_mongo_node_update_bundle($entity_type, $old_bundle_type, $machine_name);\n }\n else {\n $set[$entity_type]['bundles'][$machine_name]['label'] = $label;\n $set[$entity_type]['bundles'][$machine_name]['description'] = $description;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_add($entity_type, $bundle) {\n global $user;\n $set = mongo_node_settings();\n\n $entity = entity_create($entity_type, array(\n 'uid' => $user->uid,\n 'name' => (isset($user->name) ? $user->name : ''),\n 'type' => $bundle,\n 'language' => LANGUAGE_NONE,\n )\n );\n $form_id = $entity_type . '_' . $bundle . '_mongo_node_form';\n $output = drupal_get_form($form_id, $entity, $entity_type);\n\n return $output;\n}", "function mongo_node_operation_submit($form, &$form_state) {\n $operations = mongo_node_operations();\n $operation = $operations[$form_state['values']['operation']];\n\n $entities = array_filter($form_state['values']['entities']);\n $entity_type = $form_state['values']['entity_type'];\n if ($function = $operation['callback']) {\n // Add in callback arguments if present.\n if (isset($operation['callback arguments'])) {\n $args = array(\n $entity_type,\n $entities,\n $operation['callback arguments'],\n );\n }\n else {\n $args = array($entity_type, $entities);\n }\n call_user_func_array($function, $args);\n cache_clear_all();\n }\n}", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function main() {\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tprint_r($_POST);\n\t\t\techo \"<br />\";\n\t\t\t\n\t\t\t// Required Fields in the POST data //\t\t\t\n\t\t\tif ( !isset($_POST['_type']) ) return;\n\t\t\tif ( !isset($_POST['_subtype']) ) return;\n\t\t\tif ( !isset($_POST['_name']) ) return;\n\t\t\tif ( !isset($_POST['_mail']) ) return;\n\t\t\tif ( !isset($_POST['_password']) ) return;\n\t\t\tif ( !isset($_POST['_publish']) ) return;\n\t\n\t\t\t// Node Type //\n\t\t\t$type = sanitize_NodeType($_POST['_type']);\n\t\t\tif ( empty($type) ) return;\t\n\n\t\t\t$subtype = sanitize_NodeType($_POST['_subtype']);\n\t\n\t\t\t// Name/Title //\n\t\t\t$name = $_POST['_name'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Slug //\n\t\t\tif ( empty($_POST['_slug']) )\n\t\t\t\t$slug = $_POST['_name'];\n\t\t\telse\n\t\t\t\t$slug = $_POST['_slug'];\n\t\t\t$slug = sanitize_Slug($slug);\n\t\t\tif ( empty($slug) ) return;\n\t\t\t\n\t\t\t// TODO: Confirm slug is legal\n\t\t\t\t\n\t\t\t// Body //\n\t\t\t$body = $_POST['_body'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Do we publish? //\n\t\t\t$publish = mb_strtolower($_POST['_publish']) == \"true\";\n\t\t\t\n\t\t\t// Email //\n\t\t\t$mail = sanitize_Email($_POST['_mail']);\n\t\t\tif ( empty($mail) ) return;\n\n\t\t\t// Password //\n\t\t\t$password = $_POST['_password'];\n\t\t\tif ( empty($password) ) return;\n\n\t\n\t\t\t$id = node_Add(\n\t\t\t\t$type,$subtype,$slug,$name,$body,\n\t\t\t\t0,2,\n\t\t\t\t$publish\n\t\t\t);\n\t\t\t\n\t\t\tuser_Add($id,$mail,$password);\n\t\n\t\t\techo \"Added \" . $id . \".<br />\";\n\t\t\techo \"<br />\";\n\t\t}\n\t}", "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "function node_form(&$form_state, $node) {\n global $user;\n\n if (isset($form_state['node'])) {\n $node = $form_state['node'] + (array)$node;\n }\n if (isset($form_state['node_preview'])) {\n $form['#prefix'] = $form_state['node_preview'];\n }\n $node = (object)$node;\n foreach (array('body', 'title', 'format') as $key) {\n if (!isset($node->$key)) {\n $node->$key = NULL;\n }\n }\n if (!isset($form_state['node_preview'])) {\n node_object_prepare($node);\n }\n else {\n $node->build_mode = NODE_BUILD_PREVIEW;\n }\n\n // Set the id of the top-level form tag\n $form['#id'] = 'node-form';\n\n // Basic node information.\n // These elements are just values so they are not even sent to the client.\n foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => isset($node->$key) ? $node->$key : NULL,\n );\n }\n\n // Changed must be sent to the client, for later overwrite error checking.\n $form['changed'] = array(\n '#type' => 'hidden',\n '#default_value' => isset($node->changed) ? $node->changed : NULL,\n );\n // Get the node-specific bits.\n if ($extra = node_invoke($node, 'form', $form_state)) {\n $form = array_merge_recursive($form, $extra);\n }\n if (!isset($form['title']['#weight'])) {\n $form['title']['#weight'] = -5;\n }\n\n $form['#node'] = $node;\n\n // Add a log field if the \"Create new revision\" option is checked, or if the\n // current user has the ability to check that option.\n if (!empty($node->revision) || user_access('administer nodes')) {\n $form['revision_information'] = array(\n '#type' => 'fieldset',\n '#title' => t('Revision information'),\n '#collapsible' => TRUE,\n // Collapsed by default when \"Create new revision\" is unchecked\n '#collapsed' => !$node->revision,\n '#weight' => 20,\n );\n $form['revision_information']['revision'] = array(\n '#access' => user_access('administer nodes'),\n '#type' => 'checkbox',\n '#title' => t('Create new revision'),\n '#default_value' => $node->revision,\n );\n $form['revision_information']['log'] = array(\n '#type' => 'textarea',\n '#title' => t('Log message'),\n '#default_value' => (isset($node->log) ? $node->log : ''),\n '#rows' => 2,\n '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),\n );\n }\n\n // Node author information for administrators\n $form['author'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Authoring information'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 20,\n );\n $form['author']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored by'),\n '#maxlength' => 60,\n '#autocomplete_path' => 'user/autocomplete',\n '#default_value' => $node->name ? $node->name : '',\n '#weight' => -1,\n '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', t('Anonymous')))),\n );\n $form['author']['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored on'),\n '#maxlength' => 25,\n '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? $node->date : format_date($node->created, 'custom', 'Y-m-d H:i:s O'))),\n );\n\n if (isset($node->date)) {\n $form['author']['date']['#default_value'] = $node->date;\n }\n\n // Node options for administrators\n $form['options'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Publishing options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 25,\n );\n $form['options']['status'] = array(\n '#type' => 'checkbox',\n '#title' => t('Published'),\n '#default_value' => $node->status,\n );\n $form['options']['promote'] = array(\n '#type' => 'checkbox',\n '#title' => t('Promoted to front page'),\n '#default_value' => $node->promote,\n );\n $form['options']['sticky'] = array(\n '#type' => 'checkbox',\n '#title' => t('Sticky at top of lists'),\n '#default_value' => $node->sticky,\n );\n\n // These values are used when the user has no administrator access.\n foreach (array('uid', 'created') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => $node->$key,\n );\n }\n\n // Add the buttons.\n $form['buttons'] = array();\n $form['buttons']['submit'] = array(\n '#type' => 'submit',\n '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])),\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('node_form_submit'),\n );\n $form['buttons']['preview'] = array(\n '#type' => 'submit',\n '#value' => t('Preview'),\n '#weight' => 10,\n '#submit' => array('node_form_build_preview'),\n );\n if (!empty($node->nid) && node_access('delete', $node)) {\n $form['buttons']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 15,\n '#submit' => array('node_form_delete_submit'),\n );\n }\n $form['#validate'][] = 'node_form_validate';\n $form['#theme'] = array($node->type .'_node_form', 'node_form');\n return $form;\n}", "function ds_extras_vd_bundle_form_submit($form, &$form_state) {\n\n // Save new bundle.\n $record = new stdClass();\n $record->vd = $form_state['values']['vd'];\n $record->label = $form['vd']['#options'][$record->vd];\n drupal_write_record('ds_vd', $record);\n\n // Clear entity cache and field info fields cache.\n cache_clear_all('field_info_fields', 'cache_field');\n cache_clear_all('entity_info', 'cache', TRUE);\n\n // Message and redirect.\n drupal_set_message(t('Bundle @label has been added.', array('@label' => $record->label)));\n $form_state['redirect'] = 'admin/structure/ds/vd';\n}", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "function mongo_node_type_edit_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $old_entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_entity_type) {\n $set += mongo_node_type_default_settings($label, $machine_name);\n $set[$machine_name] = $set[$old_entity_type];\n unset($set[$old_entity_type]);\n\n // Update existing mongo entities with new entity type.\n _mongo_node_update_type($old_entity_type, $machine_name);\n }\n else {\n $set[$machine_name]['label'] = $label;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function happywedding_node_form_submit($form, &$form_state) {\n global $user;\n //dpm($user);\n if ( !empty($form_state['nid']) && isset($_GET['vendor'] ) ) {\n \n $type = $form['type']['#value'];\n if (in_array('vendor', $user->roles)) {\n $basepath = 'bo/vendor/';\n } else {\n $basepath = 'node/';\n }\n //dpm($form);\n if($type=='news')\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type;\n else if($type=='product') {\n $query = array('category' => array());\n foreach($form[\"field_product_category\"][\"und\"][\"#value\"] as $key => $value){\n $query[\"category\"][] = $key; \n }\n $form_state['redirect'] = array( \n $basepath.$_GET['vendor'].'/categories/'.$type.'s' ,\n array('query' => $query ) \n );\n //dpm($form_state['redirect']);\n }else\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type.'s';\n }\n}", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "public function newAction()\n {\n //Get the entity manager.\n $em = $this->get('doctrine.orm.entity_manager'); \n \n //Get the list of categories as an array. \n $categories = $em->getRepository('JobeetBundle:JobeetCategory')\n ->getCategoriesAsOptions(); \n \n //Set up the form.\n $job = new JobeetJob();\n $form = JobForm::create($categories, $job, $this->get('validator')); \n \n //If a POST, process the form and persist it if valid.\n $request = $this->get('request');\n if ('POST' === $request->getMethod()) {\n //Register an event subscriber to index the job.\n $em->getEventManager()->addEventSubscriber(new LuceneListener($this->get('lucene_search')));\n \n $params = $request->request->get('job'); \n \n //Get the category object.\n $params['category'] = $em->getReference('JobeetBundle:JobeetCategory', $params['category']); \n \n //TODO:VALIDATE HERE\n \n //Get uploaded files and bind the form.\n $files = $request->files->get('job'); \n //unset($params['category_id']);\n $form->bind($params, $files);\n \n //If there is a logo uploaded, move it to the uploads dir.\n if($files['logo']['file']) { \n $name = uniqid().'-'.$files['logo']['file']->getOriginalName();\n $files['logo']['file']->move($this->container->getParameter('frontend.logos_dir')); \n $files['logo']['file']->rename($name); \n }\n else {\n $name = '';\n } \n \n //Set the logo filename and persist the entity.\n $job->setLogo($name); \n $em->persist($job); \n $em->flush();\n }\n \n return $this->render('FrontendBundle:Job:new.twig', array('form' => $form));\n }", "public function createAction()\n {\n $entity = new Node();\n $request = $this->getRequest();\n $form = $this->createForm(new NodeType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n $this->get('session')->setFlash('notice', 'Los cambios se realizaron correctamente.');\n return $this->redirect($this->generateUrl('node_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('HegesAppNodeBundle:Node:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "function process() {\n // We always call the parent's method\n parent::process();\n $d = $this->getDocument();\n \n // We pass the form our request object and the location of us so the form\n // will make us handle the input (as actually we take care of processing\n // this form) - it could link to any other action as long as it is aware\n // of the form\n $form = new Form($this->getRequest(), new Location($this), Request::METHOD_POST);\n \n // This is how you prepare values for the radio buttons\n $radios = array('visa', 'master');\n \n // This is how we prepare the fields\n $form->addField('text1', new TextInputField('Your name here please', \n new RegexValidator('^[[:alpha:]]+[[:space:]][[:alpha:]]+$')));\n $form->addField('pass1', \n new TextInputField('', new RegexValidator('^[[:digit:]]{16}$'), TextInputField::PASSWORD));\n $form->addField('text2', new TextInputField('', null, TextInputField::TEXTAREA));\n $form->addField('check1', new CheckBoxInputField());\n $form->addField('payment', new RadioButtonInputField('visa', $radios));\n \n // Here we test if the form was correctly submitted\n if($form->isValidSubmission()) {\n // Normally, we would do something useful here and redirect to another page\n // since this form uses the POST method\n $d->setVariable('success', true);\n }\n \n // Here we place the form into the document variable so it can process it\n $d->setVariable('form', $form);\n }", "public function createForm();", "public function createForm();", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function scfnode_form_add_association(&$form_state, $nid, $name) {\n $form = array();\n /*$form['cancel'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'scf') . '/images/icon-x.gif',\n '#attributes' => array(\n 'onclick' => \"$('#association-addtermdiv-\" . $name . \"').slideUp('slow');return false;\"\n ),\n '#executes_submit_callback' => FALSE,\n '#title' => 'Close'\n );*/\n \n /*$form['caption'] = array(\n '#type' => 'markup',\n '#value' => t('Add new term:')\n );*/\n \n $form['textfield'] = array(\n '#type' => 'textfield',\n '#autocomplete_path' => $name . '/autocomplete/title',\n '#size' => 20,\n '#id' => 'association-' . $name . '-text',\n '#name' => 'textfield',\n );\n $form['add'] = array(\n '#type' => 'button',\n '#value' => t('Add'),\n '#ahah' => array(\n 'path' => 'association/ajax/add/' . $nid . '/' . $name . '/',\n 'wrapper' => 'association-list-' . $name,\n 'event' => 'click',\n 'effect' => 'slide',\n 'method' => 'append',\n 'progress' => 'none',\n ),\n '#executes_submit_callback' => FALSE\n );\n \n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $nid\n );\n return $form;\n }", "public function get_create(array $args)\n { \n $node = $this->request->get_node();\n if ($node instanceof midgardmvc_core_providers_hierarchy_node_midgard2)\n {\n // If we have a Midgard node we can assign that as a \"default parent\"\n $this->data['parent'] = $node->get_object();\n }\n\n // Prepare the new object that form will eventually create\n $this->prepare_new_object($args);\n $this->data['object'] =& $this->object;\n\n if (isset($this->data['parent']))\n {\n midgardmvc_core::get_instance()->authorization->require_do('midgard:create', $this->data['parent']);\n }\n\n $this->load_form();\n $this->data['form'] =& $this->form;\n }", "abstract public function createForm();", "abstract public function createForm();", "protected function processForm(sfWebRequest $request, sfForm $form) {\n $collectionId = sfToolkit::getArrayValueForPath($form->getName(), 'parent_node_id');\n $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));\n if ($form->isValid()) {\n $asset_group = $form->save();\n\n $this->redirect('assetgroup/edit?id=' . $asset_group->getId() . '&c=' . $form->getOption('collectionID'));\n }\n }", "function node_form_submit_build_node($form, &$form_state) {\n // Unset any button-level handlers, execute all the form-level submit\n // functions to process the form values into an updated node.\n unset($form_state['submit_handlers']);\n form_execute_handlers('submit', $form, $form_state);\n $node = node_submit($form_state['values']);\n $form_state['node'] = (array)$node;\n $form_state['rebuild'] = TRUE;\n return $node;\n}", "public function createForm()\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}", "public function getSetupForm() {\n\n /**\n * @todo find a beter way to do this\n */\n\n if(!empty($_POST['nodeId'])){\n $this->id = $_POST['nodeId'];\n }\n\n if (empty($this->id)) {\n $table = new HomeNet_Model_DbTable_Nodes();\n $this->id = $table->fetchNextId($this->house);\n }\n // $this->id = 50;\n\n $form = new HomeNet_Form_Node();\n $sub = $form->getSubForm('node');\n $id = $sub->getElement('node');\n $id->setValue($this->id);\n \n $table = new HomeNet_Model_DbTable_Nodes();\n $rows = $table->fetchAllInternetNodes();\n\n $uplink = $sub->getElement('uplink');\n\n foreach($rows as $value){\n $uplink->addMultiOption($value->id, $value->id);\n }\n\n\n return $form;\n }", "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "public function create()\n {\n return view('nodes.form')\n ->with('types', NodeType::orderBy('display_name')->get())\n ->with('scripts', ['vendor/unisharp/laravel-ckeditor/ckeditor.js'])\n ->with('action', 'Add');\n }", "public function createAction()\n {\n// $this->view->form = $form;\n }", "function mongo_node_bundle_create_form_validate($form, $form_state) {\n if (empty($form_state['values']['name'])) {\n form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name)));\n return FALSE;\n }\n\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if (isset($set[$entity_type]['bundles'][$machine_name])) {\n form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name)));\n return FALSE;\n }\n return TRUE;\n}", "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n drupal_set_message(t('@label %title deleted',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title)\n )\n );\n }\n\n $form_state['redirect'] = '<front>';\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 init()\n {\n $this->setMethod('post');\n \n $this->addElement('select', 'parentId', array(\n 'label' => 'Parent:',\n 'required' => true,\n \t'multioptions' => $this->_tree->getForm($this->_node->getId()),\n \t'value'\t=> array($this->_node->getParentId())\n ));\n \n $this->addElement('text', 'nodeName', array(\n 'label' => 'Titel ',\n 'required' => true,\n \t'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 30))\n ),\n 'value'\t=> ''.$this->_node->getNodeName()\n ));\n \n $this->addElement('text', 'nodeValue', array(\n 'label' => 'Link Url ',\n 'required' => true,\n \t'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 30))\n ),\n 'value'\t=> ''.$this->_node->getNodeValue()\n ));\n \n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Submit',\n ));\n\n }", "public function CreateForm();", "function bookcrossing_add_new_book_form() {\n global $user;\n\n $types = node_type_get_types();\n $node = (object) array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => 'bookcrossing', 'language' => LANGUAGE_NONE);\n //drupal_set_title(t('Create @name', array('@name' => $types['bookcrossing']->name)), PASS_THROUGH);\n return drupal_get_form('bookcrossing_node_form', $node, 'add-new-book');\n}", "function _dataone_admin_settings_submit($form, &$form_state) {\n global $base_url;\n\n // Let menu_execute_active_handler() know that a menu rebuild may be required.\n variable_set('menu_rebuild_needed', TRUE);\n\n // Register updated node document.\n drupal_set_message(t('Don\\'t forget to register your changes with DataONE'), 'warning');\n $register_url = $base_url . '/admin/config/services/dataone/register/';\n $selected_versions = variable_get(DATAONE_VARIABLE_API_VERSIONS);\n foreach ($selected_versions as $version => $label) {\n $register_version_url = $register_url . $version;\n drupal_set_message(t('Register @ver: !url', array('@ver' => $label, '!url' => $register_version_url)), 'warning');\n }\n\n}", "function guifi_domain_create_form($form_state, $node) {\n\n $ip = guifi_main_ip($node->device_id);\n if (guifi_domain_access('create',$node->sid)) {\n $form['text_add'] = array(\n '#type' => 'item',\n '#value' => t('You are not allowed to create a domain on this service.'),\n '#weight' => 0\n );\n return $form;\n }\n if (empty($ip['ipv4'])) {\n $device = db_fetch_object(db_query('SELECT nick FROM {guifi_devices} WHERE id = %d', $node->device_id));\n $url = url('guifi/device/'.$node->device_id);\n $form['text'] = array(\n '#type' => 'item',\n '#value' => t('The server <a href='.$url.'>'.$device->nick.'</a> does not have an IPv4 address, can not create a domain.')\n );\n return $form;\n} \n $form['domain_type'] = array(\n '#type' => 'select',\n '#title' => t('Select new domain type'),\n '#default_value' => 'none',\n '#options' => array('NULL' => 'none', 'master' => 'Master, ex: newdomain.net','delegation' => 'Delegation, ex: newdomain.guifi.net'),\n '#ahah' => array(\n 'path' => 'guifi/js/add-domain',\n 'wrapper' => 'select_type',\n 'effect' => 'fade',\n )\n );\n $form['domain_type_form'] = array(\n '#prefix' => '<div id=\"select_type\">',\n '#suffix' => '</div>',\n '#type' => 'fieldset',\n );\n\n if ($form_state['values']['domain_type'] == 'master') {\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#size' => 64,\n '#maxlength' => 32,\n '#title' => t('Add a new domain'),\n '#description' => t('Insert domain name'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'master',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['mname'] = array(\n '#type' => 'hidden',\n '#value' => '0',\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n\n if ($form_state['values']['domain_type'] == 'delegation') {\n $ip = guifi_main_ip($node->device_id);\n $form['domain_type_form']['sid'] = array(\n '#type' => 'hidden',\n '#value' => $node->id\n );\n $form['domain_type_form']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Add a new delegated Domain Name'),\n '#description' => t('Just the hostname (HOSTNAME.domain.com) will be added before master domain.'),\n '#prefix' => '<table style=\"width: 0px\"><tr><td>',\n '#suffix' => '</td>',\n );\n $domqry= db_query(\"\n SELECT *\n FROM {guifi_dns_domains}\n WHERE type = 'master'\n AND public = 'yes'\n ORDER BY name\"\n );\n $values = array();\n while ($type = db_fetch_object($domqry)) {\n $values[$type->name] = $type->name;\n }\n $form['domain_type_form']['mname'] = array(\n '#type' => 'select',\n '#options' => $values,\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['scope'] = array(\n '#type' => 'select',\n '#title' => t('Scope'),\n '#options' => array('internal' => 'internal', 'external' => 'external'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['management'] = array(\n '#type' => 'select',\n '#title' => t('Management'),\n '#options' => array('automatic' => 'automatic', 'manual' => 'manual'),\n '#prefix' => '<td>',\n '#suffix' => '</td>',\n );\n $form['domain_type_form']['type'] = array(\n '#type' => 'hidden',\n '#value' => 'delegation',\n );\n $form['domain_type_form']['ipv4'] = array(\n '#type' => 'hidden',\n '#value' => $ip[ipv4],\n );\n $form['domain_type_form']['submit'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'guifi').'/icons/add.png',\n '#attributes' => array('title' => t('add')),\n '#executes_submit_callback' => TRUE,\n '#submit' => array(guifi_domain_create_form_submit),\n '#prefix' => '<td>',\n '#suffix' => '</td></tr></table>',\n );\n }\n return $form;\n}", "function helper_import_add_form(&$form_state) {\n global $user;\n $form = array();\n\n //drupal_set_message(print_r($form_state));\n\n // Check if the user can create something.\n $types = node_import_types();\n if (empty($types)) {\n form_set_error('', t('No tiene permisos para crear contenidos. <a href=\"!permissions\">Asigne correctamente los permisos</a> en la página de administración.', array('!permissions' => url('admin/user/permissions'))));\n }\n\n // ------------------------------------------------------------\n // Get the currently filled in values of the form.\n $form_state['storage'] = isset($form_state['storage']) ? $form_state['storage'] : array();\n $form_state['values'] = isset($form_state['values']) ? $form_state['values'] : array();\n $values = array_merge($form_state['storage'], $form_state['values']);\n\n // ------------------------------------------------------------\n // Check and store the page we are on.\n $pages = array(\n 'file' => array(\n 'title' => t('Select file'),\n 'description' => t('Seleccione el archivo <a href=\"http://es.wikipedia.org/wiki/CSV\" target=\"_blank\">CSV</a> que contiene los datos a importar.<br>Un archivo CSV, es un archivo donde los datos se encuentran separados por coma. Cada dato contenido entre comas se denomina campo, el cual debe estar entre comillas dobles.<br>Puede descargar un ejemplo de archivo CSV <a href=\"http://localhost/nuevo_sistema_mp/sites/default/files/ejemplo.csv\">aqui</a>.'),\n ),\n 'preview' => array(\n 'title' => t('Vista Previa'),\n 'description' => t('Aquí pueda visualizar previamente los datos a importar. Si encuentra errores puede hacer volver %back o comenzar de nuevo. También puede recargar solo esta página por si ocurrió un error al cargarla %reload.', array('%reload' => t('Recargar'), '%back' => t('Atrás'))),\n ),\n 'start' => array(\n 'title' => t('Iniciar Importación'),\n 'description' => t('Si todo está correcto, clic %start.', array('%start' => t('Start import'))),\n ),\n );\n\n $page_keys = array_keys($pages);\n $first_page = $page_keys[0];\n $last_page = $page_keys[count($page_keys) - 1];\n\n $page = isset($values['page']) ? $values['page'] : $first_page;\n $form['#pages'] = $pages;\n $form_state['storage']['page'] = $page;\n\n // ------------------------------------------------------------\n // Set title and description for the current page.\n $steps = count($pages);\n $step = array_search($page, $page_keys) + 1;\n\n if ($page !== 'intro') {\n drupal_set_title(t('@title (Paso @step de @steps)', array('@title' => $pages[$page]['title'], '@step' => $step, '@steps' => $steps)));\n }\n\n $form['help'] = array(\n '#value' => '<div class=\"help\">'. $pages[$page]['description'] .'</div>',\n '#weight' => -50,\n );\n\n // ------------------------------------------------------------\n // Select or upload a file.\n if ($page == 'file') {\n $files = node_import_list_files(TRUE);\n\n $form['file_select'] = array(\n '#type' => 'item',\n '#title' => t('Seleccione el archivo'),\n '#theme' => 'node_import_file_select',\n );\n\n if (isset($values['fid'])) {\n foreach ($files as $fid => $file) {\n if ($fid == $values['fid']) {\n $file_owner = user_load(array('uid' => $file->uid));\n $form['file_select'][$fid] = array(\n 'filename' => array('#value' => $file->filename),\n 'filepath' => array('#value' => $file->filepath),\n 'filesize' => array('#value' => format_size($file->filesize)),\n 'timestamp' => array('#value' => format_date($file->timestamp, 'small')),\n 'uid' => array('#value' => ($file->uid == 0 ? t('Public FTPd file') : theme('username', $file_owner))),\n );\n $aux_files = node_import_extract_property($files, 'filename'); \n $form['file_select']['fid'] = array(\n '#type' => 'radios',\n '#options' => $aux_files['fid'],\n '#default_value' => isset($values['fid']) ? $values['fid'] : 0,\n );\n }\n }\n set_content_type($form_state);\n set_file_options($form_state);\n map_fields($form_state);\n }\n else {\n $form['file_select']['fid'] = array(\n '#type' => 'item',\n '#value' => t('No files available.'),\n );\n }\n\n $form['#attributes'] = array('enctype' => 'multipart/form-data');\n\n $form['upload'] = array(\n '#type' => 'fieldset',\n '#title' => t('Upload file'),\n '#description' => t(''),\n '#collapsible' => FALSE,\n '#collapsed' => FALSE,\n );\n $form['upload']['file_upload'] = array(\n '#type' => 'file',\n );\n $form['upload']['file_upload_button'] = array(\n '#type' => 'submit',\n '#value' => t('Upload'),\n '#submit' => array('node_import_add_form_submit_upload_file'),\n );\n }\n\n // ------------------------------------------------------------\n // Preview.\n if ($page == 'preview') {\n $form['preview_count'] = array(\n '#type' => 'select',\n '#title' => t('Number of records to preview'),\n '#default_value' => isset($values['preview_count']) ? $values['preview_count'] : variable_get('node_import:preview_count', 5),\n '#options' => drupal_map_assoc(array(5, 10, 15, 25, 50, 100, 150, 200)),\n );\n\n $form['preview'] = array(\n '#title' => t('Previa'),\n );\n\n foreach ($values['previews'] as $i => $preview) {\n $form['preview'][] = array(\n '#type' => 'item',\n '#title' => t('Record @count', array('@count' => $i + 1)),\n '#value' => $preview,\n );\n }\n }\n\n // ------------------------------------------------------------\n // Start import.\n if ($page == 'start') {\n $files = node_import_list_files();\n $file = $files[$values['fid']]; \n $form[] = helper_import_task_details($values);\n }\n\n // ------------------------------------------------------------\n // Add Back, Next and/or Start buttons.\n $form['buttons-bottom'] = array(\n '#weight' => 50,\n );\n $form['buttons-bottom']['back_button'] = array(\n '#type' => 'submit',\n '#value' => t('Back'),\n '#submit' => array('node_import_add_form_submit_back'),\n '#disabled' => ($page == $first_page),\n );\n $form['buttons-bottom']['reload_button'] = array(\n '#type' => 'submit',\n '#value' => t('Reload page'),\n '#submit' => array('node_import_add_form_submit_reload'),\n '#disabled' => ($page == $first_page),\n );\n $form['buttons-bottom']['reset_button'] = array(\n '#type' => 'submit',\n '#value' => t('Reset page'),\n '#submit' => array('node_import_add_form_submit_reset'),\n '#disabled' => ($page == $first_page),\n ); \n $form['buttons-bottom']['next_button'] = array(\n '#type' => 'submit',\n '#value' => ($page == $last_page) ? t('Start import') : t('Siguiente'),\n '#validate' => array('helper_import_add_form_validate_next'),\n '#submit' => array('helper_import_add_form_submit_next'),\n '#disabled' => empty($types),\n ); \n\n return $form;\n}", "function MYMODULE_my_custom_form(&$form_state) {\n // Add some normal FAPI item.\n $form['title'] = array (\n '#type' => 'textfield',\n '#title' => 'Title',\n '#required' => true,\n '#default_value' => NULL,\n '#maxlength' => 255,\n '#weight' => -5,\n );\n // Add special CCK form items.\n module_load_include('inc', 'content', 'includes/content.node_form');\n // Assume a hypothetical content type called \"article\"\n $type = content_types('article');\n // Go through each of its custom fields and add them to our form.\n foreach ($type['fields'] as $field_name => $field) {\n // If we wanted a specific field, we'd filter it here, by name:\n // if ($field_name == 'field_article_my_custom_field') { }\n // But for this example we're going to add them all.\n $form['#field_info'][$field['field_name']] = $field;\n $form += (array) content_field_form($form, $form_state, $field);\n }\n $form['submit'] = array (\n '#value' => 'Submit',\n '#type' => 'submit',\n );\n return $form;\n}", "public function new_form(){\n $this->vars['page_header'] = __('Create New Service', 'latepoint');\n $this->vars['breadcrumbs'][] = array('label' => __('Create New Service', 'latepoint'), 'link' => false );\n\n $this->vars['category'] = new OsServiceCategoryModel();\n\n if($this->get_return_format() == 'json'){\n $response_html = $this->render($this->views_folder.'new_form', 'none');\n echo wp_send_json(array('status' => 'success', 'message' => $response_html));\n exit();\n }else{\n echo $this->render($this->views_folder . 'new_form', $this->get_layout());\n }\n }", "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "function lib4ridora_ingest_selector_form_submit(array $form, array &$form_state) {\n module_load_include('inc', 'xml_form_builder', 'includes/associations');\n module_load_include('inc', 'lib4ridora', 'includes/utilities');\n module_load_include('inc', 'lib4ridora', 'includes/citation.subtypes');\n $association_step_storage = &islandora_ingest_form_get_step_storage($form_state, 'xml_form_builder_association_step');\n $association_step_storage['journal_import_method'] = $form_state['values']['journal_import_method'];\n $association_step_storage['doi'] = $form_state['values']['doi'];\n $association_step_storage['ingest_selector'] = $form_state['values']['ingest_selector'];\n\n $subtype = $form_state['values']['ingest_selector'];\n $subtypes = lib4ridora_citation_form_subtypes();\n $form_name = $subtypes[$subtype]['form'];\n foreach (xml_form_builder_get_associations(array($form_name), array(), array('MODS')) as $key => $association) {\n // Update the content_model to be ir:citationCModel so that regardless of\n // the form used it will only have the ir:citationCModel.\n $association['content_model'] = \"ir:citationCModel\";\n $association_step_storage['association'] = $association;\n break;\n }\n if (!isset($association_step_storage['association'])) {\n form_set_error('ingest_selector', t('A form could not be determined for the selected publication type.'));\n }\n}", "private function createCreateForm(Element $entity)\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$request = $this->container->get('request_stack')->getCurrentRequest();\n\t\t$params = $request->get('_route_params');\n\t\t$block = $em->getRepository('NovuscomCMFBundle:Block')->find($params['id']);\n\n\n\t\tif ($params['section_id']) {\n\t\t\t$action = $this->generateUrl('admin_element_create_in_section',\n\t\t\t\tarray(\n\t\t\t\t\t'section_id' => $params['section_id'],\n\t\t\t\t\t'id' => $params['id'],\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$action = $this->generateUrl('admin_element_create_in_block',\n\t\t\t\tarray(\n\t\t\t\t\t'id' => $params['id'],\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$form = $this->createForm(ElementType::class, $entity, array(\n\t\t\t'action' => $action,\n\t\t\t'method' => 'POST',\n\t\t\t'blockObject' => $block,\n\t\t\t'params' => array('_route_params' => $params),\n\t\t\t'em' => $em,\n\t\t));\n\n\n\t\t$properties = $block->getProperty();\n\t\t$countProperties = count($properties);\n\n\n\t\t/*$EP = new ElementProperty();\n\t\t$propertiesForm = $this->createFormBuilder($EP);\n\t\tforeach ($properties as $p) {\n\t\t\t//echo '<pre>' . print_r($p->getName(), true) . '</pre>';\n\t\t\t\t$add = $propertiesForm->add('value', 'text');\n\n\t\t}*/\n\t\t//$propForm = $add->getForm();\n\n\t\tif ($countProperties > 0) {\n\t\t\t//$propertyForm = new ElementPropertyType($properties, $em, false, $request);\n\t\t\t//$form->add('properties', $propertyForm, array('mapped' => false, 'label' => 'Свойства'));\n\t\t}\n\n\t\t//$form->add('properties', new ElementPropertyType($properties, $em));\n\n\t\t//$form->add('properties', 'collection', array('type' => new ElementPropertyType($properties, $em)));\n\n\t\t$epArray = array();\n\n\t\t/**\n\t\t * Пролучаем значения свойств типа \"строка\"\n\t\t */\n\t\t$ElementProperty = $em->getRepository('NovuscomCMFBundle:ElementProperty')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\tforeach ($ElementProperty as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"дата/время\"\n\t\t */\n\t\t$ElementPropertyDT = $em->getRepository('NovuscomCMFBundle:ElementPropertyDT')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\t\tforeach ($ElementPropertyDT as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"файл\"\n\t\t */\n\t\t$ElementPropertyFile = $em->getRepository('NovuscomCMFBundle:ElementPropertyF')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\t$ElementPropertyFileId = array();\n\t\tforeach ($ElementPropertyFile as $epf) {\n\t\t\t$ElementPropertyFileId[$epf->getProperty()->getId()][$epf->getId()] = $epf->getFile()->getId();\n\t\t}\n\t\techo '<pre>' . print_r($ElementPropertyFileId, true) . '</pre>';\n\t\t$data = array(\n\t\t\t'VALUES' => $epArray,\n\t\t\t'PROPERTY_FILE_VALUES' => $ElementPropertyFileId,\n\t\t\t'LIIP' => $this->get('liip_imagine.cache.manager'),\n\t\t\t'BLOCK_PROPERTIES' => $block->getProperty(),\n\t\t\t'ELEMENT_ENTITY' => $entity,\n\t\t);\n\t\t$form->add('properties', ElementPropertyType::class,\n\t\t\tarray(\n\t\t\t\t//'entry_type' => ElementPropertyType::class,\n\t\t\t\t'label' => 'Свойства',\n\t\t\t\t'mapped' => false,\n\t\t\t\t//'by_reference' => false,\n\t\t\t\t//'allow_add' => true,\n\t\t\t\t//'allow_delete' => true,\n\t\t\t\t//'prototype' => true,\n\t\t\t\t'data' => $data,\n\t\t\t\t//'options' => array('asdasdasdasd'), // не работает\n\t\t\t));\n\n\t\t//$form->add('submit', SubmitType::class, array('label' => 'Сохранить', 'attr' => array('class' => 'btn btn-success')));\n\n\t\treturn $form;\n\t}", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "public function cs_generate_form() {\n global $post;\n }", "public function createAction(){\n \n $this->_form->customSubmitBtn = $this->xhr;\n $this->_form->build( $this->uri,\n $this->consumer_id,\n $this->user_id,\n $this->id);\n \n \n \n $this->result = Main_Forms_Handler::onPost($this->_form ,\n $this->post,\n $this->_model,\n \"createNote\",\n $this->params,\n $this->_helper,\n $this->indexAction . $this->consumer_id,\n \"Note created.\",\n $this->xhr); \n \n $this->_onSubmit();\n\n }", "public function updateSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id);\n $node->setSticky($form_state->getValue('sticky'));\n $node->setPublished($form_state->getValue('status'));\n $node->save();\n }", "public function createAction()\n {\n $request = $this->getRequest();\n $em = $this->getDoctrine()->getManager();\n\n $form = $this->createForm(new LinkType(), new Link());\n $formHandler = new LinkHandler($form, $request, new Link(), $em);\n if ($formHandler->process()) {\n return $this->redirect($this->generateUrl('_blog_backend_link'));\n }\n\n return array(\n 'form' => $form->createView(),\n );\n }", "function multisite_aggregate_type_form($form, &$form_state, $aggregate_type, $op = 'edit') {\n if ($op == 'clone') {\n $aggregate_type->label .= ' (cloned)';\n $aggregate_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $aggregate_type->label,\n '#description' => t('The human-readable name of this multisite aggregate type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($aggregate_type->type) ? $aggregate_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'multisite_aggregate_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this multisite aggregate type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n $form['source'] = array(\n '#type' => 'fieldset',\n '#title' => t('Source'),\n );\n // Only nodes are allowed for now\n $form['source']['source_type'] = array(\n '#type' => 'hidden',\n '#value' => 'node',\n );\n $form['source']['source_bundle'] = array(\n '#type' => 'select',\n '#title' => t('Node bundle'),\n '#options' => node_type_get_names(),\n '#default_value' => !empty($aggregate_type->source_bundle),\n );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save aggregate type'),\n '#weight' => 40,\n );\n return $form;\n}", "function os2dagsorden_create_agenda_meeting_create_user_form($form, &$form_state) {\r\n $form_state['meeting_data'] = json_encode($form_state['values']);\r\n $form[] = array(\r\n '#markup' => '<h1 class=\"title\">' . t('External user') . '</h1>',\r\n );\r\n\r\n $form[] = array(\r\n '#markup' => '<div class=\"node\">',\r\n );\r\n $form['firstname'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Firstname'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n );\r\n $form['lastname'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Lastname'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n );\r\n $form['email'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Email'),\r\n '#size' => 60,\r\n '#maxlength' => 128,\r\n '#required' => TRUE,\r\n '#element_validate' => array('_os2dagsorden_create_agenda_meeting_create_user_form_email_validate'),\r\n );\r\n $form['save_bullet_point'] = array(\r\n '#type' => 'submit',\r\n '#value' => t('Save'),\r\n '#submit' => array('_os2dagsorden_create_agenda_meeting_create_user_form_submit'),\r\n );\r\n $form[] = array(\r\n '#markup' => '</div>',\r\n );\r\n $form['#attached']['css'] = array(\r\n drupal_get_path('module', 'os2dagsorden_create_agenda') . '/css/form_theme.css',\r\n );\r\n return $form;\r\n}", "public function executeCreate(sfWebRequest $request) {\n $this->forward404Unless($this->getUser()->getGuardUser()->getType() != 3);\n $this->forward404Unless($request->isMethod(sfRequest::POST));\n $collectionId = sfToolkit::getArrayValueForPath($request->getParameter('asset_group'), 'parent_node_id');\n\n $this->form = new AssetGroupForm(null, array(\n 'creatorID' => $this->getUser()->getGuardUser()->getId(),\n 'collectionID' => $collectionId));\n $this->collection = Doctrine_Query::Create()\n ->from('Collection c')\n ->select('c.*')\n ->where('c.id = ?', $collectionId)\n ->fetchOne();\n\n $this->processForm($request, $this->form);\n\n $this->setTemplate('new');\n }", "public function save_builder() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforminator_validate_ajax( \"forminator_save_builder_fields\" );\n\n\t\t$submitted_data = $this->get_post_data();\n\t\t$form_data = $submitted_data['data'];\n\t\t$form_data = json_decode( stripslashes( $form_data ), true );\n\t\t$fields = array();\n\t\t$notifications = array();\n\t\t$id = isset( $submitted_data['form_id'] ) ? $submitted_data['form_id'] : null;\n\t\t$id = intval( $id );\n\t\t$title = sanitize_text_field( $submitted_data['formName'] );\n\t\t$status = isset( $submitted_data['status'] ) ? sanitize_text_field( $submitted_data['status'] ) : '';\n\t\t$version = isset( $submitted_data['version'] ) ? sanitize_text_field( $submitted_data['version'] ) : '1.0';\n\t\t$action = false;\n\n\t\tif ( is_null( $id ) || $id <= 0 ) {\n\t\t\t$form_model = new Forminator_Custom_Form_Model();\n\t\t\t$action = 'create';\n\n\t\t\tif ( empty( $status ) ) {\n\t\t\t\t$status = Forminator_Custom_Form_Model::STATUS_PUBLISH;\n\t\t\t}\n\t\t} else {\n\t\t\t$form_model = Forminator_Custom_Form_Model::model()->load( $id );\n\t\t\t$action = 'update';\n\n\t\t\tif ( ! is_object( $form_model ) ) {\n\t\t\t\twp_send_json_error( __( \"Form model doesn't exist\", Forminator::DOMAIN ) );\n\t\t\t}\n\n\t\t\tif ( empty( $status ) ) {\n\t\t\t\t$status = $form_model->status;\n\t\t\t}\n\n\t\t\t//we need to empty fields cause we will send new data\n\t\t\t$form_model->clear_fields();\n\t\t}\n\n\t\t$form_model->set_var_in_array( 'name', 'formName', $submitted_data, 'forminator_sanitize_field' );\n\n\t\t// Build the fields\n\t\tif ( isset( $form_data ) ) {\n\t\t\t$fields = $form_data['wrappers'];\n\t\t\tunset( $form_data['wrappers'] );\n\t\t}\n\n\t\tforeach ( $fields as $row ) {\n\t\t\tforeach ( $row['fields'] as $f ) {\n\t\t\t\t$field = new Forminator_Form_Field_Model();\n\t\t\t\t$field->form_id = $row['wrapper_id'];\n\t\t\t\t$field->slug = $f['element_id'];\n\t\t\t\tunset( $f['element_id'] );\n\t\t\t\t$field->import( $f );\n\t\t\t\t$form_model->add_field( $field );\n\t\t\t}\n\t\t}\n\n\t\t// Sanitize settings\n\t\t$settings = forminator_sanitize_field( $form_data['settings'] );\n\n\t\t// Sanitize custom css\n\t\tif ( isset( $form_data['settings']['custom_css'] ) ) {\n\t\t\t$settings['custom_css'] = sanitize_textarea_field( $form_data['settings']['custom_css'] );\n\t\t}\n\n\t\t// Sanitize thank you message\n\t\tif ( isset( $form_data['settings']['thankyou-message'] ) ) {\n\t\t\t$settings['thankyou-message'] = $form_data['settings']['thankyou-message'];\n\t\t}\n\n\t\t// Sanitize user email message\n\t\tif ( isset( $form_data['settings']['user-email-editor'] ) ) {\n\t\t\t$settings['user-email-editor'] = $form_data['settings']['user-email-editor'];\n\t\t}\n\n\t\t// Sanitize admin email message\n\t\tif ( isset( $form_data['settings']['admin-email-editor'] ) ) {\n\t\t\t$settings['admin-email-editor'] = $form_data['settings']['admin-email-editor'];\n\t\t}\n\n\t\tif ( isset( $form_data['notifications'] ) ) {\n\t\t\t$notifications = forminator_sanitize_field( $form_data['notifications'] );\n\n\t\t\t$count = 0;\n\t\t\tforeach( $notifications as $notification ) {\n\t\t\t\tif( isset( $notification['email-editor'] ) ) {\n\t\t\t\t\t$notifications[ $count ]['email-editor'] = $form_data['notifications'][ $count ]['email-editor'];\n\t\t\t\t}\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\n\t\t$form_model->set_var_in_array( 'name', 'formName', $submitted_data );\n\n\t\t// Handle quiz questions\n\t\t$form_model->notifications = $notifications;\n\n\t\t$settings['formName'] = $title;\n\n\t\t$settings['version'] = $version;\n\t\t$form_model->settings = $settings;\n\n\t\t// status\n\t\t$form_model->status = $status;\n\n\t\t// Save data\n\t\t$id = $form_model->save();\n\n\t\t/**\n\t\t * Action called after form saved to database\n\t\t *\n\t\t * @since 1.11\n\t\t *\n\t\t * @param int $id - form id\n\t\t * @param string $title - form title\n\t\t * @param string $status - form status\n\t\t * @param array $fields - form fields\n\t\t * @param array $settings - form settings\n\t\t *\n\t\t */\n\t\tdo_action( 'forminator_custom_form_action_' . $action, $id, $title, $status, $fields, $settings );\n\n\t\t// add privacy settings to global option\n\t\t$override_privacy = false;\n\t\tif ( isset( $settings['enable-submissions-retention'] ) ) {\n\t\t\t$override_privacy = filter_var( $settings['enable-submissions-retention'], FILTER_VALIDATE_BOOLEAN );\n\t\t}\n\t\t$retention_number = null;\n\t\t$retention_unit = null;\n\t\tif ( $override_privacy ) {\n\t\t\t$retention_number = 0;\n\t\t\t$retention_unit = 'days';\n\t\t\tif ( isset( $settings['submissions-retention-number'] ) ) {\n\t\t\t\t$retention_number = (int) $settings['submissions-retention-number'];\n\t\t\t}\n\t\t\tif ( isset( $settings['submissions-retention-unit'] ) ) {\n\t\t\t\t$retention_unit = $settings['submissions-retention-unit'];\n\t\t\t}\n\t\t}\n\n\t\tforminator_update_form_submissions_retention( $id, $retention_number, $retention_unit );\n\n\t\twp_send_json_success( $id );\n\t}", "abstract protected function _setNewForm();", "public function getNewItemForm(){\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][1] == '0' && $_SESSION[PAGE_SESSIONID]['privileges']['articles'][3] == '0') die($this->text('dont_have_permission'));\n \n $tempdirname = $this->createNewTempdir();\n $data = array(\n 'dirname' => $tempdirname,\n 'id_menucategory' => $this->data['id_menucategory']\n );\n \n if(isset($this->data['lang']) && $this->data['lang'] != ''){\n $data['lang'] = $this->data['lang'];\n }\n \n $_SESSION['articles_dirname'] = $tempdirname;\n $markup = '<div><h4 class=\"left\">'.$this->text('new_article').'</h4>';\n $markup .= $this->getForm('add',$data);\n $markup .= '</div>';\n return array('state'=>'ok','data'=> $markup);\n }", "public function createAddForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(),$entity,array(\n 'action' => $this->generateUrl('rsp_create'),\n 'method'=> 'POST'\n ));\n \n \n $form->add('Add','submit',array(\n //'attr'=>array('onClick'=>'return checksubmit(this)')\n ));\n return $form;\n }", "public function listingCreate($form){\n \n ///do things only if submited by \"create button\"\n if (!$form['add_postage']->submittedBy){\n \n //things to do when form is submitted by create button\n //unset postage textbox counter on success\n unset($this->hlp->sess(\"postage\")->counter);\n \n $values = $form->getValues(True);\n $postage = $this->lHelp->returnPostageArray($values);\n $procValues = $this->lHelp->getProcValues($values); \n $listingID = $this->listings->create($procValues);\n \n if (!empty($postage['options'])){\n $this->listings->writeListingPostageOptions($listingID, $postage);\n }\n \n $this->redirect(\"Listings:in\");\n }\n }", "function theme_node_form($form) {\n $output = \"\\n<div class=\\\"node-form\\\">\\n\";\n\n // Admin form fields and submit buttons must be rendered first, because\n // they need to go to the bottom of the form, and so should not be part of\n // the catch-all call to drupal_render().\n $admin = '';\n if (isset($form['author'])) {\n $admin .= \" <div class=\\\"authored\\\">\\n\";\n $admin .= drupal_render($form['author']);\n $admin .= \" </div>\\n\";\n }\n if (isset($form['options'])) {\n $admin .= \" <div class=\\\"options\\\">\\n\";\n $admin .= drupal_render($form['options']);\n $admin .= \" </div>\\n\";\n }\n $buttons = drupal_render($form['buttons']);\n\n // Everything else gets rendered here, and is displayed before the admin form\n // field and the submit buttons.\n $output .= \" <div class=\\\"standard\\\">\\n\";\n $output .= drupal_render($form);\n $output .= \" </div>\\n\";\n\n if (!empty($admin)) {\n $output .= \" <div class=\\\"admin\\\">\\n\";\n $output .= $admin;\n $output .= \" </div>\\n\";\n }\n $output .= $buttons;\n $output .= \"</div>\\n\";\n\n return $output;\n}", "private function createAddForm() {\n return $this->createFormBuilder\n ->setAction($this->generateUrl('nn_genie_infos_mat_proprietaire_add'))\n ->setMethod('POST')\n ->getForm()\n ;\n }", "public function store()\n\t{\n\t\treturn $this->processForm('create');\n\t}", "function legal_document_content_type_edit_form_submit($form, &$form_state) {\n $form_state['conf']['document'] = $form_state['values']['document'];\n $form_state['conf']['agree'] = $form_state['values']['agree'];\n $form_state['conf']['admin_title'] = $form_state['values']['admin_title'];\n}", "public function create()\n {\n\t\t$js = [Module::asset(\"metafields:js/post.js\")];\n\t\tView::share('js_script', $js);\n return view('metafields::backend.create',array(\"title\" => \"Create Metafield\"));\n }", "public function perform()\n {\n // init template array to fill with node data\n $this->viewVar['title'] = '';\n // Init template form field values\n $this->viewVar['error'] = array();\n\n $this->viewVar['htmlTitle'] .= ' Add new simple text';\n\n $addtext = $this->httpRequest->getParameter('addtext', 'post', 'alnum');\n $cancel = $this->httpRequest->getParameter('cancel', 'post', 'alpha');\n\n if(false !== $cancel)\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/default/cntr/advancedMain');\n }\n\n\n // add node\n if( !empty($addtext) )\n {\n if(false !== ($id_text = $this->addText()))\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/misc/cntr/editText/id_text/'.$id_text);\n }\n }\n }", "public function store()\n {\n return $this->processForm('create');\n }", "public function store()\n {\n return $this->processForm('create');\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function CreateForm($request = null)\n {\n //\t\t\t the Staged data rather than _Live. ie. Elemental.\n //\n //\t\t\t We *do not* want to revert back to _Live mode before the end of the function\n //\t\t\t or has_many/many_many will use the _Live table.\n Versioned::set_stage('Stage');\n\n $fields = new FieldList(\n new TextField('Title', _t('FrontendCreate.TITLE', 'Title'))\n );\n\n if ($this->CreateType) {\n if (!$this->editObject) {\n $this->editObject = $this->createEditObject();\n }\n if ($this->editObject instanceof FrontendCreatable || $this->editObject->hasMethod('getFrontendCreateFields')) {\n $tFields = $this->editObject->getFrontendCreateFields();\n if ($tFields) {\n // Only override fields if 'getFrontendCreateFields' actually returns something.\n $fields = $tFields;\n }\n } else if ($this->editObject instanceof Member) {\n $fields = $this->editObject->getMemberFormFields();\n } else {\n $fields = $this->editObject->getFrontEndFields();\n }\n } else {\n $fields = new FieldList(\n new LiteralField('InvalidType', 'Type configuration is incorrectly configured')\n );\n }\n if ($this->editObject && $this->editObject->ID) {\n $fields->push(HiddenField::create('ID', 'ID', $this->editObject->ID));\n }\n\n // If record doesn't exist.\n if (!$this->editObject || !$this->editObject->exists()) {\n $pid = $this->getRequest()->requestVar('CreateLocationID');\n if ($pid && $this->isParentIdValid($pid)) {\n $parentPage = \\Page::get()->byID($pid);\n $createLocation = HiddenField::create('CreateLocationID', 'Create location', $pid);\n $fields->push($createLocation);\n } else if ($this->data()->AllowUserSelection) {\n $parentMap = Config::inst()->get(ObjectCreatorPage::class, 'parent_map');\n $parentType = isset($parentMap[$this->CreateType]) ? $parentMap[$this->CreateType] : $this->CreateType;\n $fields->push($tree = DropdownField::create('CreateLocationID', _t('FrontendCreate.SELECT_LOCATION', 'Location')));\n $tree->setSource($this->data()->RestrictCreationToItems()->map()->toArray());\n }\n\n $customTypes = $this->allowedCreationTypes();\n if (count($customTypes)) {\n $fields->push(DropdownField::create('CustomCreateType', 'Type to create', $customTypes, $this->CreateType));\n }\n\n if ($this->data()->useObjectExistsHandling() && $this->data()->AllowUserWhenObjectExists) {\n $fields->push(new DropdownField(\n 'WhenObjectExists',\n _t('FrontendCreate.WHENOBJECTEXISTS', \"If $this->CreateType exists\"),\n $this->dbObject('WhenObjectExists')->EnumValues(),\n $this->data()->WhenObjectExists\n ));\n }\n\n if ($new = $this->NewObject()) {\n $firstFieldName = $fields->first()->getName();\n\n $title = $new->getTitle();\n if ($this->ShowCmsLink) {\n $fields->insertBefore(new LiteralField('CMSLink', sprintf(_t('FrontendCreate.ITEM_CMS_LINK', '<p><a href=\"admin/show/%s\" target=\"_blank\">Edit %s in the CMS</a></p>'), $new->ID, $title)), $firstFieldName);\n }\n }\n }\n\n // Actions\n $action = null;\n if ($this->editObject && $this->editObject->exists()) {\n $action = FormAction::create('editobject', 'Save Changes');\n } else {\n $createButtonText = ($this->data()->CreateButtonText) ? $this->data()->CreateButtonText : 'Create';\n $action = FormAction::create('createobject', $createButtonText);\n }\n $actions = FieldList::create($action);\n\n // validators\n $validator = ($this->editObject && $this->editObject->hasMethod('getFrontendCreateValidator')) ? $this->editObject->getFrontendCreateValidator() : null;\n\n $form = new Form($this, 'CreateForm', $fields, $actions, $validator);\n\n if (class_exists(ObjectCreatorPage_FrontEndWorkflowController::class)) {\n $s = singleton(ObjectCreatorPage_FrontEndWorkflowController::class);\n $s->updateFrontendCreateForm($form);\n }\n $this->extend('updateFrontendCreateForm', $form);\n if ($this->editObject) {\n $this->editObject->invokeWithExtensions('updateFrontendCreateForm', $form);\n if ($this->editObject->exists()) {\n $form->loadDataFrom($this->editObject);\n }\n }\n return $form;\n }", "function content_form($post_type,$post_id = '',$action='',$thankyou = array()){\n\t$app = \\Jolt\\Jolt::getInstance();\n\t//\tgrab blueprint based on content type..\n\t$blueprint = $app->store('blueprints');\n\t$blueprint = $blueprint[ $post_type ];\n//\tprint_r( $blueprint );\n\t$nonce = generate_nonce();\n\n\tif( isset($_POST['title']) ){\n//\t\tprint_r($_POST);\n\t\t$c_url = site_url().$_SERVER['REQUEST_URI'];\n\t\t$post \t\t\t\t= array();\n\t\t$post['title'] \t\t= $_POST['title'];\n\t\t$post['name'] \t\t= new_slug( slugify( $_POST['title'] ) );\n\t\t$post['type'] \t\t= $post_type;\n\t\t$post['user_id'] \t= '';\n\t\t$post['date'] \t\t= date('Y-m-d H:i:s');\n\t\t$post['modified']\t= date('Y-m-d H:i:s');\n\t\t$post['password'] \t= '';\n\t\t$post['status'] \t= 'draft';\t//\tregardless of post type, we never want a post actually published from here..\n\t\t$post['parent'] \t= 0;\n\t\t$post['guid'] \t\t= generate_uuid();\n\t\t$post['category'] \t= '';\n\t\t$restricted = array('_id','title','name','user_id','date','modified','guid','type','status','parent','password');\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\t//\tThere are fields we don't want to change... This makes sure we don't...\n\t\t\tif( in_array($restricted,$fname) )\tcontinue;\n\t\t\tif( !isset($_POST[ $fname ]) ){\n\t\t\t\tif( $field['type'] == 'related' ){\n\t\t\t\t\t$_POST[ $fname ] = array();\n\t\t\t\t}else{\n\t\t\t\t\t$_POST[ $fname ] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($_POST as $k=>$v){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t$post[$k] = $v;\n\t\t}\n\t\tif( isset($_FILES) ){\n\t\t\tforeach($_FILES as $k=>$file){\n\t\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t\t$uploaddir = $this->app->store('upload_path');\n\t\t\t\t$uploadfile = $uploaddir . basename($file['name']);\n\t\t\t\t$uploadurl = $this->app->store('upload_url') . basename($file['name']);\n\t\t\t\tif( file_exists($uploadfile) ){\n\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t}else{\n\t\t\t\t\tif ( move_uploaded_file($file['tmp_name'], $uploadfile) ) {\n\t\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$app->db->insert('post', $post );\n\t\tunset($_POST);\n\t\tif( isset($thankyou['url']) ){\n\t\t\techo '<script>top.location.href=\"'.$thankyou['url'].'\";</script>';\n\t\t}else if( isset($thankyou['msg']) ){\n\t\t\techo '<p>'.$thankyou['msg'].'</p>';\n\t\t}else{\n\t\t\techo '<p><strong>Thank you, your post has been saved.</strong></p>';\n\t\t}\n\t}\n?>\n\t<form role=\"form\" method=\"POST\" action=\"<?php echo $action?>\" enctype=\"multipart/form-data\">\n\t<input type=\"hidden\" name=\"nonce\" value=\"<?php echo $nonce?>\" />\n\t<fieldset>\n\t\t<div class=\"form-group\">\n\t\t\t<label for=\"title\"><?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Title\")?></label>\n\t\t\t<input type=\"text\" class=\"form-control\" id=\"title\" name=\"title\" placeholder=\"<?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Enter Title\")?>\" value=\"<?php echo ( isset($post) ? $post['title'] : '');?>\" required>\n\t\t</div>\n<?php\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( $field['adminonly'] )\tcontinue;\n\t\t\tform_field($fname,$field,$post);\n\t\t}\n?>\n\t\t<button type=\"submit\" class=\"btn btn-primary\">Save</button>\n\t</fieldset>\n\t</form>\n<?php\n}", "function mongo_node_admin_content($form, $form_state, $entity_type) {\n $settings = mongo_node_settings();\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n );\n\n $filters = mongo_node_filters($entity_type);\n $applied_filters = isset($_SESSION[$entity_type . '_filters']) ? $_SESSION[$entity_type . '_filters'] : array();\n\n foreach ($filters as $f_type_name => $f_type) {\n $form['filters'][$f_type_name] = array('#type' => 'select', '#title' => $f_type_name);\n foreach ($f_type as $f_name => $f_val) {\n $form['filters'][$f_type_name]['#options'][$f_name] = $f_val['label'];\n }\n }\n\n $items = array();\n $remaining_filters = array();\n foreach ($applied_filters as $app_filter) {\n $items[] = t('where %f_name is %f_val', array('%f_name' => $app_filter['#type'], '%f_val' => $app_filter['#value']));\n $conditions = $filters[$app_filter['#type']][$app_filter['#value']]['filters'];\n foreach ($conditions as $condition) {\n $remaining_filters[$condition['#type']]['#callback'] = $condition['#callback'];\n $remaining_filters[$condition['#type']]['#value'][] = $condition['#value'];\n }\n }\n\n $form['filters']['#description'] = theme('item_list', array('items' => $items));\n\n if (empty($applied_filters)) {\n $form['filters']['filter'] = array(\n '#type' => 'submit',\n '#value' => 'Filter',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n else {\n $form['filters']['refine'] = array(\n '#type' => 'submit',\n '#value' => 'Refine',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['undo'] = array(\n '#type' => 'submit',\n '#value' => 'Undo',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => 'Reset',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Update options'),\n );\n\n $operations = mongo_node_operations();\n foreach ($operations as $op => $op_set) {\n $options[$op] = $op_set['label'];\n }\n $form['options']['operation'] = array(\n '#type' => 'select',\n '#options' => $options,\n );\n\n $form['options']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Update'),\n '#validate' => array('mongo_node_operation_validate'),\n '#submit' => array('mongo_node_operation_submit'),\n );\n\n $query = new EntityFieldQuery();\n\n $query->entityCondition('entity_type', $entity_type)\n ->propertyOrderBy('created', 'DESC')\n ->pager(10);\n\n // Actually apply filters.\n foreach ($remaining_filters as $r_name => $r_values) {\n $query->{$r_values['#callback']}($r_name, $r_values['#value'], 'IN');\n }\n\n $result = $query->execute();\n\n $languages = language_list();\n $destination = drupal_get_destination();\n $header = array(\n 'title' => array('data' => t('Title'), 'field' => 'title'),\n 'type' => t('Type'),\n 'author' => t('Author'),\n 'status' => t('Status'),\n 'changed' => t('Updated'),\n 'language' => t('Language'),\n 'operations' => t('Operations'),\n );\n $options = array();\n\n if (isset($result[$entity_type])) {\n $ids = array_keys($result[$entity_type]);\n $entities = entity_load($entity_type, $ids);\n\n foreach ($result[$entity_type] as $id => $efq_entity) {\n $entity = entity_load($entity_type, array($id));\n $entity = reset($entity);\n\n $entity_uri = entity_uri($entity_type, $entity);\n\n $options[$id] = array(\n 'title' => array(\n 'data' => array(\n '#type' => 'link',\n '#title' => $entity->title,\n '#href' => $entity_uri['path'],\n ),\n ),\n 'type' => check_plain($settings[$entity_type]['bundles'][$entity->type]['label']),\n 'author' => theme('username', array('account' => $entity)),\n 'status' => $entity->status ? t('published') : t('not published'),\n 'changed' => format_date($entity->changed, 'short'),\n 'language' => ($entity->language == LANGUAGE_NONE) ? t('Language neutral') : $languages[$entity->language]->name,\n );\n\n $operations = array();\n $operations[] = l(t('edit'), $entity_uri['path'] . '/edit', array('query' => $destination));\n $operations[] = l(t('delete'), $entity_uri['path'] . '/delete', array('query' => $destination));\n\n $options[$id]['operations'] = theme('item_list', array('items' => $operations, 'attributes' => array('class' => 'inline')));\n }\n }\n\n $form['entities'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n '#empty' => t('No content available'),\n );\n\n $form['pager'] = array(\n '#theme' => 'pager',\n );\n\n return $form;\n}", "public function addFormAction()\n {\n $template = 'BugglMainBundle:Admin\\TripTheme:form.html.twig';\n $form = $this->createFormBuilder()\n ->add('name', 'text',\n array('constraints' => new \\Symfony\\Component\\Validator\\Constraints\\NotBlank()))\n ->add('status','checkbox', array('required' => false))\n ->getForm();\n\n $html = $this->renderView($template, array('form' => $form->createView()));\n\n $data = array('html'=>$html);\n\n return new \\Symfony\\Component\\HttpFoundation\\JsonResponse($data, 200);\n }", "public function createobject($data, Form $form, $request)\n {\n if ($this->data()->AllowUserSelection) {\n $pid = $request->postVar('CreateLocationID');\n if ($this->isParentIdValid($pid)) {\n $this->pid = $pid;\n }\n } else {\n $this->pid = $this->data()->CreateLocationID;\n }\n\n if ($this->data()->AllowUserWhenObjectExists) {\n $this->woe = $request->postVar('WhenObjectExists');\n } else {\n $this->woe = $this->data()->WhenObjectExists;\n }\n\n // create a new object or update / replace one...\n $obj = null;\n if ($this->data()->useObjectExistsHandling()) {\n $existingObject = $this->objectExists();\n if ($existingObject && $this->woe == 'Replace') {\n if ($existingObject->hasExtension('VersionedFileExtension') || $existingObject->hasExtension(Versioned::class)) {\n $obj = $existingObject;\n } else {\n $existingObject->delete();\n }\n } elseif ($existingObject && $this->woe == 'Error') {\n $form->sessionMessage(\"Error: $this->CreateType already exists\", 'bad');\n return $this->redirect($this->Link()); // redirect back with error message\n }\n }\n if (!$obj) {\n // Set $obj to $this->editObject so it's modifying the same entity provided to the form.\n // (Ensures UnsavedRelationList stuff works properly)\n $obj = $this->editObject;\n }\n\n if ($this->pid) {\n $obj->ParentID = $this->pid;\n }\n\n $obj->ObjectCreatorPageID = $this->ID;\n\n // if (!$form->validate()) {\n // \t$form->sessionMessage(\"Could not validate form\", 'bad');\n // \treturn $this->redirect($this->data()->Link());\n // }\n\n // allow extensions to change the object state just before creating.\n $this->extend('updateObjectBeforeCreate', $obj);\n\n if ($obj->hasMethod('onBeforeFrontendCreate')) {\n $obj->onBeforeFrontendCreate($this);\n }\n\n $origMode = Versioned::get_reading_mode();\n Versioned::set_stage('Stage');\n\n try {\n $form->saveInto($obj);\n } catch (ValidationException $ve) {\n Versioned::set_reading_mode($origMode);\n $form->sessionMessage(\"Could not upload file: \" . $ve->getMessage(), 'bad');\n $this->redirect($this->data()->Link());\n return;\n }\n\n // get workflow\n $workflowID = $this->data()->WorkflowDefinitionID;\n $workflow = false;\n if ($workflowID && $obj->hasExtension(WorkflowApplicable::class)) {\n if ($workflow = WorkflowDefinition::get()->byID($workflowID)) {\n $obj->WorkflowDefinitionID = $workflowID;\n }\n }\n\n $additional = $this->data()->AdditionalProperties->getValues();\n if ($additional) {\n foreach ($additional as $field => $value) {\n $obj->$field = $value;\n }\n }\n\n if (Extensible::has_extension($this->CreateType, Versioned::class)) {\n // switching to make sure everything we do from now on is versioned, until the\n // point that we redirect\n $obj->write();\n if ($this->PublishOnCreate) {\n $obj->doPublish();\n }\n } else {\n $obj->write();\n }\n\n // start workflow\n if ($workflow) {\n $svc = singleton(WorkflowService::class);\n $svc->startWorkflow($obj);\n }\n\n $this->extend('objectCreated', $obj);\n // let the object be updated directly\n // if this is a versionable object, it'll be edited on stage\n $obj->invokeWithExtensions('frontendCreated');\n\n Versioned::set_reading_mode($origMode);\n $link = $this->data()->Link();\n $link = $link . (strpos($link, \"?\") !== false ? \"&\" : \"?\") . \"new=\" . $obj->ID;\n $this->redirect($link);\n }", "function saveSubmit($args, $request) {\n\t\t$step = (int) array_shift($args);\n\t\t$articleId = (int) $request->getUserVar('articleId');\n\t\t$journal =& $request->getJournal();\n\n\t\t$this->validate($request, $articleId, $step);\n\t\t$this->setupTemplate($request, true);\n\t\t$article =& $this->article;\n\n\t\t$formClass = \"AuthorSubmitStep{$step}Form\";\n\t\timport(\"classes.author.form.submit.$formClass\");\n\n\t\t$submitForm = new $formClass($article, $journal, $request);\n\t\t$submitForm->readInputData();\n\n\t\tif (!HookRegistry::call('SubmitHandler::saveSubmit', array($step, &$article, &$submitForm))) {\n\n\t\t\t// Check for any special cases before trying to save\n\t\t\tswitch ($step) {\n\t\t\t\tcase 2:\n\t\t\t\t\tif ($request->getUserVar('uploadSubmissionFile')) {\n\t\t\t\t\t\t$submitForm->uploadSubmissionFile('submissionFile');\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tif ($request->getUserVar('addAuthor')) {\n\t\t\t\t\t\t// Add a sponsor\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\t\t\t\t\t\tarray_push($authors, array());\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\n\t\t\t\t\t} else if (($delAuthor = $request->getUserVar('delAuthor')) && count($delAuthor) == 1) {\n\t\t\t\t\t\t// Delete an author\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\tlist($delAuthor) = array_keys($delAuthor);\n\t\t\t\t\t\t$delAuthor = (int) $delAuthor;\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\t\t\t\t\t\tif (isset($authors[$delAuthor]['authorId']) && !empty($authors[$delAuthor]['authorId'])) {\n\t\t\t\t\t\t\t$deletedAuthors = explode(':', $submitForm->getData('deletedAuthors'));\n\t\t\t\t\t\t\tarray_push($deletedAuthors, $authors[$delAuthor]['authorId']);\n\t\t\t\t\t\t\t$submitForm->setData('deletedAuthors', join(':', $deletedAuthors));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_splice($authors, $delAuthor, 1);\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\n\t\t\t\t\t\tif ($submitForm->getData('primaryContact') == $delAuthor) {\n\t\t\t\t\t\t\t$submitForm->setData('primaryContact', 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ($request->getUserVar('moveAuthor')) {\n\t\t\t\t\t\t// Move an author up/down\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\t$moveAuthorDir = $request->getUserVar('moveAuthorDir');\n\t\t\t\t\t\t$moveAuthorDir = $moveAuthorDir == 'u' ? 'u' : 'd';\n\t\t\t\t\t\t$moveAuthorIndex = (int) $request->getUserVar('moveAuthorIndex');\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\n\t\t\t\t\t\tif (!(($moveAuthorDir == 'u' && $moveAuthorIndex <= 0) || ($moveAuthorDir == 'd' && $moveAuthorIndex >= count($authors) - 1))) {\n\t\t\t\t\t\t\t$tmpAuthor = $authors[$moveAuthorIndex];\n\t\t\t\t\t\t\t$primaryContact = $submitForm->getData('primaryContact');\n\t\t\t\t\t\t\tif ($moveAuthorDir == 'u') {\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex] = $authors[$moveAuthorIndex - 1];\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex - 1] = $tmpAuthor;\n\t\t\t\t\t\t\t\tif ($primaryContact == $moveAuthorIndex) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex - 1);\n\t\t\t\t\t\t\t\t} else if ($primaryContact == ($moveAuthorIndex - 1)) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex);\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$authors[$moveAuthorIndex] = $authors[$moveAuthorIndex + 1];\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex + 1] = $tmpAuthor;\n\t\t\t\t\t\t\t\tif ($primaryContact == $moveAuthorIndex) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex + 1);\n\t\t\t\t\t\t\t\t} else if ($primaryContact == ($moveAuthorIndex + 1)) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex);\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$submitForm->setData('authors', $authors);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\tif ($request->getUserVar('submitUploadSuppFile')) {\n\t\t\t\t\t\t$this->submitUploadSuppFile(array(), $request);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!isset($editData) && $submitForm->validate()) {\n\t\t\t\t$articleId = $submitForm->execute();\n\t\t\t\tHookRegistry::call('Author::SubmitHandler::saveSubmit', array(&$step, &$article, &$submitForm));\n\n\t\t\t\tif ($step == 5) {\n\t\t\t\t\t// Send a notification to associated users\n\t\t\t\t\timport('classes.notification.NotificationManager');\n\t\t\t\t\t$notificationManager = new NotificationManager();\n\t\t\t\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\n\t\t\t\t\t$article =& $articleDao->getArticle($articleId);\n\t\t\t\t\t$roleDao =& DAORegistry::getDAO('RoleDAO');\n\t\t\t\t\t$notificationUsers = array();\n\t\t\t\t\t$editors = $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getId());\n\t\t\t\t\twhile ($editor =& $editors->next()) {\n\t\t\t\t\t\t$notificationManager->createNotification(\n\t\t\t\t\t\t\t$request, $editor->getId(), NOTIFICATION_TYPE_ARTICLE_SUBMITTED,\n\t\t\t\t\t\t\t$article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId()\n\t\t\t\t\t\t);\n\t\t\t\t\t\tunset($editor);\n\t\t\t\t\t}\n\n\t\t\t\t\t$journal =& $request->getJournal();\n\t\t\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t\t\t$templateMgr->assign_by_ref('journal', $journal);\n\t\t\t\t\t// If this is an editor and there is a\n\t\t\t\t\t// submission file, article can be expedited.\n\t\t\t\t\tif (Validation::isEditor($journal->getId()) && $article->getSubmissionFileId()) {\n\t\t\t\t\t\t$templateMgr->assign('canExpedite', true);\n\t\t\t\t\t}\n\t\t\t\t\t$templateMgr->assign('articleId', $articleId);\n\t\t\t\t\t$templateMgr->assign('helpTopicId','submission.index');\n\t\t\t\t\t$templateMgr->display('author/submit/complete.tpl');\n\n\t\t\t\t} else {\n\t\t\t\t\t$request->redirect(null, null, 'submit', $step+1, array('articleId' => $articleId));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$submitForm->display();\n\t\t\t}\n\t\t}\n\t}", "public function test_formNodeAdded() : void\n {\n $form = $this->createForm();\n $form->onFormNodeAdded(array($this, 'callback_formNodeAdded'));\n $form->onNodeAdded(array($this, 'callback_nodeAdded'));\n\n $form->addText('foo');\n\n $this->assertTrue($this->formEventCalled);\n $this->assertTrue($this->containerEventCalled);\n }", "private function createCreatePageForm()\n {\n $form = $this->createFormBuilder()\n ->setAction( $this->generateUrl('MesdHelpWikiBundle_link_new_by_page'))\n ->add('routeAlias', 'hidden', array('constraints' => array(new NotBlank())))\n ->add('submit', 'submit')\n ->getForm();\n\n return $form;\n }", "public function createFormAction()\n {\n \t$form_type = $this->params()->fromQuery(\"ftype\", \"\");\n\n\t\t//load form\n\t\t$form = $this->getFormAdminModel()->getFormAdminForm($form_type);\n\n\t\t//set default content for submit button\n\t\tif ($form->has(\"submit_button\"))\n\t\t{\n\t\t\t$form->get(\"submit_button\")->setValue(\"Submit\");\n\t\t}//end if\n\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost())\n\t\t{\n\t\t\t$form->setData($request->getPost());\n\t\t\tif ($form->isValid())\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t//create the form\n\t\t\t\t\t$objForm = $this->getFormAdminModel()->createForm($form->getData());\n\n\t\t\t\t\t//set success message\n\t\t\t\t\t$this->flashMessenger()->addSuccessMessage(\"Form created\");\n\t\t\t\t\t\n\t\t\t\t\t//redirect to form edit page\n\t\t\t\t\tif ($form_type != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->redirect()->toUrl($this->url()->fromRoute(\"front-form-admin/form\", array(\"action\" => \"edit-form\", \"id\" => $objForm->get(\"id\"))) . \"?ftype=$form_type\");\n\t\t\t\t\t}//end if\n\t\t\t\t\t\n\t\t\t\t\treturn $this->redirect()->toRoute(\"front-form-admin/form\", array(\"action\" => \"edit-form\", \"id\" => $objForm->get(\"id\")));\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t//set error message\n\t\t\t\t\t$form = $this->frontFormHelper()->formatFormErrors($form, $e->getMessage());\n\t\t\t\t}//end catch\n\t\t\t}//end if\n\t\t}//end if\n\n\t\treturn array(\"form\" => $form);\n }", "function pdfbulletin_edit_form(&$node, $form_state) {\n $type = node_get_types('type', $node);\n $pdfbulletin = $node->pdfbulletin;\n $form['pdfbulletin'] = array(\n '#type' => 'value',\n '#value' => $pdfbulletin,\n );\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => check_plain($type->title_label),\n '#required' => TRUE,\n '#default_value' => $node->title,\n '#weight' => -5,\n );\n\n $form['header_format'] = array(\n '#tree' => FALSE,\n );\n $form['header_format']['header'] = array(\n '#title' => t('Header'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->header,\n );\n $form['header_format']['format'] = filter_form($pdfbulletin->header_format, NULL, array('header_format'));\n\n $form['footer_format'] = array(\n '#tree' => FALSE,\n );\n $form['footer_format']['footer'] = array(\n '#title' => t('Footer'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->footer,\n );\n $form['footer_format']['format'] = filter_form($pdfbulletin->footer_format, NULL, array('footer_format'));\n\n $form['email_format'] = array(\n '#tree' => FALSE, \n );\n $form['email_format']['email'] = array(\n '#title' => t('Text for e-mail'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->email,\n );\n $form['email_format']['format'] = filter_form($pdfbulletin->email_format, NULL, array('email_format'));\n\n $form['empty_text_format'] = array(\n '#tree' => FALSE,\n );\n $form['empty_text_format']['empty_text'] = array(\n '#title' => t('Empty text'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->empty_text,\n '#description' => t('Text for e-mail if it is sent with an empty bulletin.'),\n );\n $form['empty_text_format']['format'] = filter_form($pdfbulletin->empty_text_format, NULL, array('empty_text_format'));\n\n $paper_sizes = pdfbulletin_util_settings('paper_size');\n $form['paper_size'] = array(\n '#title' => t('Paper size'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->paper_size,\n );\n foreach ($paper_sizes as $key => $value) {\n $form['paper_size']['#options'][$key] = t($key);\n }\n\n $css = pdfbulletin_css();\n $form['css_file'] = array(\n '#title' => t('Style'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->css_file,\n );\n foreach ($css as $key => $value) {\n $form['css_file']['#options'][$key] = check_plain($value);\n }\n\n\n return $form;\n}", "public function populateForm() {}", "public function create()\n {\n // if it's a GET request display a blank form for creating a new product\n // else it's a POST so add to the database and redirect to readAll action\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\n show_view('views/admin/bodyparts/create.php');\n } else {\n $part = filter_input(INPUT_POST, 'part', FILTER_SANITIZE_SPECIAL_CHARS);\n BodyPart::create($part);\n redirect('body_parts', 'readAll');\n }\n }", "public function actionCreate()\n\t{\n\t\t$model = new CmsNode();\n\n\t\tif (isset($_POST['CmsNode']))\n\t\t{\n\t\t\t$model->attributes = $_POST['CmsNode'];\n\n\t\t\tif ($model->save())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash(Yii::app()->cms->flashes['success'], Yii::t('CmsModule.core', 'Node created.'));\n\t\t\t\t$this->redirect(array('update', 'id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create', array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "function process_form()\n {\n }", "public function createAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Create a item\",\n ]);\n }", "public static function get_form($args, $nid, $response=null) {\n $reloadPath = self::get_reload_path();\n $auth = data_entry_helper::get_read_write_auth($args['website_id'], $args['password']);\n $r = \"<form method=\\\"post\\\" id=\\\"entry_form\\\" action=\\\"$reloadPath\\\">\\n\";\n $r .= $auth['write'];\n data_entry_helper::$entity_to_load = [];\n if (!empty($_GET['termlists_term_id'])) {\n data_entry_helper::load_existing_record($auth['read'], 'termlists_term', $_GET['termlists_term_id']);\n // map fields to their appropriate supermodels\n data_entry_helper::$entity_to_load['term:term'] = data_entry_helper::$entity_to_load['termlists_term:term'];\n data_entry_helper::$entity_to_load['term:id'] = data_entry_helper::$entity_to_load['termlists_term:term_id'];\n data_entry_helper::$entity_to_load['meaning:id'] = data_entry_helper::$entity_to_load['termlists_term:meaning_id'];\n if (function_exists('hostsite_set_page_title'))\n hostsite_set_page_title(lang::get('Edit {1}', data_entry_helper::$entity_to_load['term:term']));\n }\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'website_id',\n 'default' => $args['website_id']\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'termlists_term:id'\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'termlists_term:termlist_id',\n 'default' => $args['termlist_id']\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'termlists_term:preferred',\n 'default' => 't'\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'term:id'\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'term:language_id',\n 'default' => $args['language_id']\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'meaning:id'\n ));\n // request automatic JS validation\n data_entry_helper::enable_validation('entry_form');\n $r .= data_entry_helper::text_input(array(\n 'label' => lang::get('Term'),\n 'fieldname' => 'term:term',\n 'helpText' => lang::get('Please provide the term'),\n 'validation' => array('required'),\n 'class' => 'control-width-5'\n ));\n $r .= \"<input type=\\\"submit\\\" name=\\\"form-submit\\\" id=\\\"delete\\\" value=\\\"Delete\\\" />\\n\";\n $r .= \"<input type=\\\"submit\\\" name=\\\"form-submit\\\" value=\\\"Save\\\" />\\n\";\n $r .= '<form>';\n self::set_breadcrumb($args);\n return $r;\n }", "public static function create() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$field_type = FrmAppHelper::get_post_param( 'field_type', '', 'sanitize_text_field' );\n\t\t$form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );\n\n\t\t$field = self::include_new_field( $field_type, $form_id );\n\n // this hook will allow for multiple fields to be added at once\n do_action('frm_after_field_created', $field, $form_id);\n\n wp_die();\n }", "public function executeDynamicFormCreate(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::POST));\n\n #clsCommon::pr($_POST);\n\n $this->form = new CustomerContactForm(null, array('userId' => $this->getUser()->getAttribute('admin_user_id')));\n $this->processDynamicForm($request, $this->form);\n $this->setTemplate('dynamicForm');\n }", "function uc_order_add_product_form($form, &$form_state, $order, $node) {\n $data = array();\n if (isset($form_state['values']['product_controls']['qty'])) {\n $data += module_invoke_all('uc_add_to_cart_data', $form_state['values']['product_controls']);\n }\n if (!empty($node->data) && is_array($node->data)) {\n $data += $node->data;\n }\n $node = uc_product_load_variant(intval($form_state['values']['product_controls']['nid']), $data);\n $form['title'] = array(\n '#markup' => '<h3>' . check_plain($node->title) . '</h3>',\n );\n $form['nid'] = array(\n '#type' => 'hidden',\n '#value' => $node->nid,\n );\n $form['qty'] = array(\n '#type' => 'uc_quantity',\n '#title' => theme('uc_qty_label'),\n '#default_value' => 1,\n );\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Add to order'),\n '#submit' => array('uc_order_edit_products_add'),\n '#ajax' => array(\n 'callback' => 'uc_order_pane_products_ajax_callback',\n 'wrapper' => 'product-controls',\n ),\n );\n $form['actions']['cancel'] = array(\n '#type' => 'submit',\n '#value' => t('Cancel'),\n '#submit' => array('uc_order_pane_products_select'),\n '#ajax' => array(\n 'callback' => 'uc_order_pane_products_ajax_callback',\n 'wrapper' => 'product-controls',\n ),\n '#limit_validation_errors' => array(),\n );\n $form['node'] = array(\n '#type' => 'value',\n '#value' => $node,\n );\n\n uc_form_alter($form, $form_state, __FUNCTION__);\n\n return $form;\n}", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "public function save_add_new_form() {\n $page = filter_input(INPUT_GET, 'page');\n $action = filter_input(INPUT_POST, 'action');\n\n if ('swpm-form-builder' !== $page || 'create_form' !== $action) {\n return;\n }\n $level = absint(filter_input(INPUT_POST, 'form_for_level'));\n $type = absint(filter_input(INPUT_POST, 'form_type'));\n\n check_admin_referer('create_form');\n $reg_form_id = SwpmFbFormmeta::get_registration_form_id_by_level($level);\n if ($type == SwpmFbFormCustom::REGISTRATION) {\n if (!empty($reg_form_id)) { // Rego form for given level exists so no need to auto-create the corresponding profile form.\n return;\n }\n $form = new SwpmFbRegistrationFormmeta();\n } else if ($type == SwpmFbFormCustom::PROFILE) {\n $edit_form = SwpmFbFormmeta::get_profile_form_id_by_level($level);\n\n if (!empty($edit_form)) { // edit form for given level exists\n return;\n }\n $form = new SwpmFbProfileFormmeta();\n\n if (empty($reg_form_id)) {\n return;\n }\n $form->load($reg_form_id, true);\n }\n\n $form->key = sanitize_title(filter_input(INPUT_POST, 'form_title'));\n $form->title = esc_html(filter_input(INPUT_POST, 'form_title'));\n $form->for_level = $level;\n $success = $form->create();\n // Redirect to keep the URL clean (use AJAX in the future?)\n if ($success) {\n if ($type == SwpmFbFormCustom::REGISTRATION) {\n //Lets auto create the corresponding profile edit form also\n $edit_form = new SwpmFbProfileFormmeta();\n $edit_form->load($form->id, true);\n\n // Lets remove Verification and Secret fields as those are not required for Profile form\n foreach ($edit_form->fields as $key => $field) {\n if ($field->type == 'verification' || $field->type == 'secret') {\n unset($edit_form->fields[$key]);\n }\n }\n $edit_form->fields = array_values($edit_form->fields);\n\n $edit_form->title = 'Profile edit form for level: ' . $edit_form->for_level; //Set a meaningful title for this auto-created form.\n $edit_form->create();\n }\n wp_redirect('admin.php?page=swpm-form-builder&action=edit&form=' . $form->id);\n exit();\n }\n }", "public function create()\n {\n try {\n \\array_push($this->formData, 'images');\n \\array_push($this->formData, 'none_slug');\n $response = [\n 'formElement' => $this->formElement(),\n 'result' => null,\n 'formData' => $this->formData,\n 'module' => $this->module,\n 'template' => 'menus',\n ];\n return $this->responseSuccess($response);\n } catch (\\Execption $e) {\n return $this->responseError($e);\n }\n }", "public function newAction()\n {\n $entity = new Node();\n $form = $this->createForm(new NodeType(), $entity);\n\n return $this->render('HegesAppNodeBundle:Node:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "public function postAction()\n {\n return $this->handleCreateRequest();\n }", "function inscription_jesa_direct($form, &$form_state) {\n $form['#tree'] = TRUE;\n\n $form['description'] = array(\n '#type' => 'item',\n '#title' => t('Allow to register a new participant. if the participant does\\'t exist he(she) will be created. For a new member you must provide the name, firstname, the gender and a contact method (mail or phone).'),\n );\n $form['stagiaire'] = array(\n '#type' => 'fieldset',\n '#title' => t('Member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stagiaire']['existant'] = array(\n '#type' => 'fieldset',\n '#title' => t('Existing member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stagiaire']['existant']['user_name'] = array(\n '#title' => t('Existing member'),\n '#type' => 'textfield',\n '#autocomplete_path' => 'inscriptions/jeunes/admin/direct/stagiaire_autoc',\n );\n $form['stagiaire']['nouveau'] = array(\n '#type' => 'fieldset',\n '#title' => t('New member'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $selection = array(\n 'nom' => array('required' => FALSE,),\n 'prenom' => array('required' => FALSE,),\n 'date_naissance' => array('required' => FALSE,),\n 'mail' => array('required' => FALSE,),\n 'telephone' => array('required' => FALSE,),\n 'adresse_1' => array('required' => FALSE,),\n 'adresse_2' => array('required' => FALSE,),\n 'sexe' => array('required' => FALSE,),\n );\n $form['stagiaire']['nouveau'] += _inscription_jesa_get_form_user_fields($selection);\n $form['stage'] = array(\n '#type' => 'fieldset',\n '#title' => t('Events'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['stage']['list'] = array(\n '#type' => 'radios',\n '#options' => _inscription_jesa_get_next_stages(4),\n '#title' => t('Events'),\n );\n $selection = array(\n 'train' => array('required' => FALSE,),\n );\n $form['stage'] += _inscription_jesa_get_form_incscription_fields($selection);\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Submit'),\n ); \n\n return $form;\n}", "function acquia_marina_preprocess_gradapplication_node_form(&$vars) {\r\n\tprint \"<pre>\";\r\n//\tprint_r($vars['form']['group_personal_information']['field_first_name']['0']['value']['#size']);\r\n//\tprint_r ($vars['form']['group_personal_information']['field_place_of_birth']['0']['city']);\r\n//\tprint_r ($vars['form']['group_personal_information']['field_phone_primary']);\r\n//\tprint_r($vars['form']['group_international_information']);\r\n\tprint \"</pre>\";\r\n\t\r\n\tprint \"arg1: \". arg(1). \" \";\r\n\tprint \"arg2: \". arg(2). \" \";\r\n\tprint \"arg3: \". arg(3). \" \";\r\n\tprint \"arg4: \". arg(4). \" \";\r\n\t\r\n\t//buttons\r\n\t$vars['submit'] = drupal_render($vars['form']['buttons']['submit']);\r\n\t$vars['prev'] = drupal_render($vars['form']['buttons']['previous']);\r\n\t$vars['next'] = drupal_render($vars['form']['buttons']['next']);\r\n\t$vars['preview'] = drupal_render($vars['form']['buttons']['preview']);\r\n\t$vars['delete'] = drupal_render($vars['form']['buttons']['delete']);\r\n\t$vars['save'] = drupal_render($vars['form']['buttons']['save']);\r\n\t$vars['all_buttons'] = drupal_render($vars['form']['buttons']['all']);\r\n\r\nif(arg(3) == 1) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication');\r\n\t\r\n //personal information group\t\r\n\t//$vars['personal_information_group'] = drupal_render($vars['form']['group_personal_information']);\r\n\t$vars['first_name'] = drupal_render($vars['form']['group_personal_information']['field_first_name']);\r\n\t$vars['middle_name'] = drupal_render($vars['form']['group_personal_information']['field_middle_name']);\r\n\t$vars['last_name'] = drupal_render($vars['form']['group_personal_information']['field_last_name']);\r\n\t$vars['maiden_name'] = drupal_render($vars['form']['group_personal_information']['field_maiden_name']);\r\n\t$vars['email_address'] = drupal_render($vars['form']['group_personal_information']['field_email_address']);\r\n\t$vars['date_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_dob']);\r\n\t$vars['ssn'] = drupal_render($vars['form']['group_personal_information']['field_ssn']);\r\n\t$vars['gender'] = drupal_render($vars['form']['group_personal_information']['field_gender']);\r\n \r\n //place of birth group\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['city']['#title'] = 'City of Birth';\r\n\t$vars['city_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['city']);\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['province']['#title'] = 'State or Province of Birth';\r\n\t$vars['state_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['province']);\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['country']['#title'] = 'Country of Birth';\r\n\t$vars['country_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['country']);\r\n\t$vars['form']['group_personal_information']['field_coc']['0']['country']['#title'] = 'Country of Citizenship';\r\n\t$vars['country_of_citizenship'] = drupal_render($vars['form']['group_personal_information']['field_coc']['0']['country']);\r\n\t$vars['residency_status'] = drupal_render($vars['form']['group_personal_information']['field_residency']);\r\n\t$vars['ethnic_background'] = drupal_render($vars['form']['group_personal_information']['field_ethnic']);\r\n \r\n //permanent address group\r\n\t$vars['form']['group_personal_information']['field_permanent_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['perm_street_1'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['street']);\r\n\t$vars['form']['group_personal_information']['field_permanent_address']['0']['additional']['#title'] = '';\r\n\t$vars['perm_street_2'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['additional']);\r\n\t$vars['perm_city'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['city']);\r\n\t$vars['perm_state'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['province']);\r\n\t$vars['perm_zip'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['postal_code']);\r\n\t$vars['perm_country'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['country']);\r\n \r\n //mailing address group\r\n\t$vars['form']['group_personal_information']['field_mailing_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['mail_street_1'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['street']);\r\n\t$vars['form']['group_personal_information']['field_mailing_address']['0']['additional']['#title'] = '';\r\n\t$vars['mail_street_2'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['additional']);\r\n\t$vars['mail_city'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['city']);\r\n\t$vars['mail_state'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['province']);\r\n\t$vars['mail_zip'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['postal_code']);\r\n\t$vars['mail_country'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['country']);\r\n \t\r\n //phone numbers\r\n\t$vars['phone_primary'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_primary']);\r\n\t$vars['phone_work'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_work']);\r\n\t$vars['phone_fax'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_fax']);\r\n \r\n //other information\r\n\t$vars['student_type'] = drupal_render($vars['form']['group_other_info']['field_student_type']);\r\n\t$vars['entry_date'] = drupal_render($vars['form']['group_other_info']['field_entry_date']);\r\n\t$vars['entry_year'] = drupal_render($vars['form']['group_other_info']['field_entry_date_year']);\r\n\t\r\n\t//emergency contact information\r\n $vars['emergency_first'] = drupal_render($vars['form']['group_emergency']['field_e_fname']);\r\n\t$vars['emergency_last'] = drupal_render($vars['form']['group_emergency']['field_e_lname']);\r\n\t$vars['emergency_relation'] = drupal_render($vars['form']['group_emergency']['field_e_relationship']);\r\n\t$vars['emergency_phone'] = drupal_render($vars['form']['group_emergency']['field_e_phone']);\r\n\t\r\n\t$vars['form']['group_emergency']['field_e_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['e_street_1'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['street']);\r\n\t$vars['form']['group_emergency']['field_e_address']['0']['additional']['#title'] = '';\r\n\t$vars['e_street_2'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['additional']);\r\n\t$vars['e_city'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['city']);\r\n\t$vars['e_state'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['province']);\r\n\t$vars['e_zip'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['postal_code']);\r\n\t$vars['e_country'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['country']);\r\n\t\r\n\t//language information\r\n\t$vars['language'] = drupal_render($vars['form']['group_language']['field_language']);\r\n\t$vars['english'] = drupal_render($vars['form']['group_language']['field_english']);\r\n\r\n //crime information\r\n\t$vars['crime_radio'] = drupal_render($vars['form']['group_crime_info']['field_crime_radio']);\r\n\t$vars['crime'] = drupal_render($vars['form']['group_crime_info']['field_crime']);\r\n\t$vars['crime_doi'] = drupal_render($vars['form']['group_crime_info']['field_doi']);\r\n\t$vars['crime_explanation'] = drupal_render($vars['form']['group_crime_info']['field_explination']);\r\n}\r\n\r\nif(arg(3) == 2) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication2');\r\n\t\r\n\t//international information group\r\n\t//$vars['international_group'] = drupal_render($vars['form']['group_international_information']);\r\n\t//$vars['int'] = $vars['form']['group_international_information']['field_international_dep_citz'];\r\n\t$vars['international_radio'] = drupal_render($vars['form']['group_international_information']['field_international']);\r\n\t$vars['international_time'] = drupal_render($vars['form']['group_international_information']['field_international_time_us']);\r\n\t$vars['international_degree'] = drupal_render($vars['form']['group_international_information']['field_international_plan_degree']);\r\n\t$vars['international_where'] = drupal_render($vars['form']['group_international_information']['field_international_where']);\r\n\t$vars['international_subject'] = drupal_render($vars['form']['group_international_information']['field_international_subject']);\r\n\t$vars['international_when'] = drupal_render($vars['form']['group_international_information']['field_international_when']);\r\n\t$vars['international_grad'] = drupal_render($vars['form']['group_international_information']['field_international_after_grad']);\r\n\t$vars['international_employer'] = drupal_render($vars['form']['group_international_information']['field_international_employer']);\r\n\t\r\n\t//$vars['international_location'] = drupal_render($vars['form']['group_international_information']['field_international_location']);\r\n\t$vars['international_location_name'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['name']);\r\n\t$vars['international_location_street1'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['street']);\r\n\t$vars['form']['group_international_information']['field_international_location']['0']['additional']['#title'] = '';\r\n\t$vars['international_location_street2'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['additional']);\r\n\t$vars['international_location_city'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['city']);\r\n\t$vars['international_location_state'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['province']);\r\n\t$vars['international_location_zip'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['postal_code']);\r\n\t\r\n\t$vars['international_start'] = drupal_render($vars['form']['group_international_information']['field_international_start']);\r\n\t$vars['international_dependants'] = drupal_render($vars['form']['group_international_information']['field_international_dependants']);\r\n\t$vars['international_dep_arrive'] = drupal_render($vars['form']['group_international_information']['field_international_dep_arrive']);\r\n\t$vars['international_dep_relation'] = drupal_render($vars['form']['group_international_information']['field_international_dep_relation']);\r\n\t$vars['international_dep_dob'] = drupal_render($vars['form']['group_international_information']['field_international_dep_dob']);\r\n\t$vars['form']['group_international_information']['field_international_dep_cob']['0']['country']['#title'] = t('Country of Birth');\r\n\t$vars['international_dep_cob'] = drupal_render($vars['form']['group_international_information']['field_international_dep_cob']['0']['country']);\r\n\t$vars['form']['group_international_information']['field_international_dep_citz']['0']['country'][\"#title\"] = t('Country of Citizenship');\r\n\t$vars['international_dep_citz'] = drupal_render($vars['form']['group_international_information']['field_international_dep_citz']['0']['country']);\r\n\t$vars['international_dep_fname'] = drupal_render($vars['form']['group_international_information']['field_international_e_first_name']);\r\n\t$vars['international_dep_lname'] = drupal_render($vars['form']['group_international_information']['field_international_e_last_name']);\r\n\t$vars['international_dep_street1'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['street']);\r\n\t$vars['form']['group_international_information']['field_international_e_addr']['0']['additional']['#title'] = '';\r\n\t$vars['international_dep_street2'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['additional']);\r\n\t$vars['international_dep_city'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['city']);\r\n\t$vars['international_dep_state'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['province']);\r\n\t$vars['international_dep_zip'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['postal_code']);\r\n\t$vars['form']['group_international_information']['field_international_e_addr']['0']['country']['#title'] = t('Country of Citizenship');\r\n\t$vars['international_dep_country'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['country']);\r\n}\r\n\r\nif(arg(3) == 3) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication3');\r\n\t\r\n\t//academic history group\r\n\t$vars['academic_history_group'] = drupal_render($vars['form']['group_academic_history']);\r\n\t$vars['int'] = $vars['form']['group_academic_history'];\r\n\t//$vars['applied'] = drupal_render($vars['form']['group_academic_history']['field_applied']);\r\n\t//$vars['app_date'] = drupal_render($vars['form']['group_academic_history']['field_applied_date']);\t\r\n}\r\n\r\nif(arg(3) == 4) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication4');\r\n\t\r\n}\r\n\r\nif(arg(3) == 5) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication5');\r\n\t\r\n}\r\n\r\n\t$vars['whole_form'] = drupal_render($vars['form']);\r\n\t\t//print_r ($vars['form']['group_personal_information']);\r\n\t//\t$vars['form']['group_personal_information']['field_middle_name']['0']['value']['#suffix'] = '&#60;br/&#62;';\r\n\t//\tprint_r ($vars['form']['group_personal_information']['field_first_name']['0']['value']);\r\n\t//\t$vars['form']['group_personal_information']['field_ssn']['0']['value']['#size'] = 10;\r\n}", "function processPost($formvalues) {\n\t\t// check if the parentid is specified\n\t\tif (isArrayKeyAnEmptyString('parentid', $formvalues)) {\n\t\t\t$formvalues['parentid'] = NULL;\n\t\t}\n\t\t// trim spaces from the name field\n\t\tif (!isArrayKeyAnEmptyString('name', $formvalues)) {\n\t\t\t$formvalues['name'] = trim($formvalues['name']);\n\t\t}\n\t\tparent::processPost($formvalues);\n\t}", "function makeForm($request, $formOpts){\n\t\t#print_r ($request);\n\t\t$formDescriptor = array(\n\t\t\t'radioForm' => array(\n \t\t\t\t'type' => 'radio',\n \t\t\t\t'label' => 'Select a search type:',\n \t\t\t\t'options' => array( # The options available within the checkboxes (displayed => value)\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 0' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 1' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 2' => 2,\n\t\t\t\t\t\t\t\t\t\t\t),\n \t\t\t\t'default' => 0 # The option selected by default (identified by value)\n \t\t\t),\n 'textfield1' => array(\n\t\t\t\t\t\t\t\t'label' => 'textfield 1 label', # What's the label of the field\n\t\t\t\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t\t\t\t),\n\t\t\t'textfield2' => array(\n\t\t\t\t\t'label' => 'textfield 2 label', # What's the label of the field\n\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t), \t\t\t\t\n \t\t);\n\t\t\n\t\tswitch($formOpts){\n\t\t\tcase '1':\n\t\t\t\t$formDescriptor['textfield1']['label'] = 'textfield 1 label'; # What's the label of the field\n\t\t\t\t$formDescriptor['textfield2']['label'] = 'textfield 2 label'; # What's the label of the field\t\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t#same as case 1\n\t\t\tdefault:\n\t\t}\n\n\t\t#Submit button structure and page callback. \n $htmlForm = new HTMLForm( $formDescriptor, $this->getContext(), 'myform'); # We build the HTMLForm object, calling the form 'myform'\n $htmlForm->setSubmitText( 'Submit button text' ); # What text does the submit button display\n\t\t\n\t\t/* We set a callback function */ \n\t\t#This code has no function to the special page. It used to produce red wiki text callback such as \"Try Again\" commented-out below under processInput function. \n\t\t$htmlForm->setSubmitCallback( array( 'specialpagetemplate', 'processInput' ) ); # Call processInput() in specialpagetemplate on submit\n $htmlForm->show(); # Displaying the form\n\t}" ]
[ "0.77444345", "0.7322824", "0.7106233", "0.7082012", "0.6999719", "0.6659567", "0.6641731", "0.6170207", "0.61485773", "0.61443996", "0.61306095", "0.6128872", "0.612424", "0.6100041", "0.60700536", "0.60196453", "0.59921896", "0.5978814", "0.5967667", "0.5955421", "0.5953872", "0.5953631", "0.5953631", "0.58987486", "0.5879178", "0.58722025", "0.58614105", "0.58614105", "0.585374", "0.5847335", "0.58339065", "0.5783185", "0.5725302", "0.5712891", "0.5705989", "0.5666041", "0.5656665", "0.5633298", "0.56311864", "0.5631008", "0.55950683", "0.5558439", "0.55357677", "0.5531658", "0.55197465", "0.5508016", "0.54709256", "0.54657066", "0.5456481", "0.5455975", "0.5447825", "0.54315245", "0.5409205", "0.5401493", "0.5399989", "0.53972775", "0.53873956", "0.5387187", "0.5384039", "0.53788173", "0.53713053", "0.5370779", "0.53702176", "0.5364903", "0.53640085", "0.5363628", "0.53581154", "0.5351049", "0.5348117", "0.53456444", "0.53456444", "0.53442943", "0.53409034", "0.53307533", "0.5328669", "0.5327529", "0.5317493", "0.530849", "0.5307348", "0.5302498", "0.5298356", "0.5283535", "0.527143", "0.5259779", "0.52559084", "0.5251128", "0.5249725", "0.52486867", "0.5239813", "0.52356464", "0.5234845", "0.5231634", "0.52294534", "0.522823", "0.5227504", "0.5222266", "0.52160126", "0.52131075", "0.52103716", "0.5207587" ]
0.7590311
1
Form constructor for entity bundle editing.
function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) { $set = mongo_node_settings(); $form = array(); $form['label'] = array( '#type' => 'textfield', '#title' => t('Entity type'), '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'], '#description' => t('The human readable name of the entity.'), ); $form['name'] = array( '#type' => 'machine_name', '#required' => FALSE, '#default_value' => $bundle, '#machine_name' => array( 'exists' => '_mongo_node_bundle_exists', 'source' => array('label'), ), ); $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : ''; $form['description'] = array( '#type' => 'textarea', '#title' => t('Description'), '#default_value' => $description, '#description' => t('Describe this bundle.'), ); // Save entity type and bundle. $form['bundle_type'] = array( '#type' => 'value', '#value' => array( 'entity_type' => $entity_type, 'bundle' => $bundle, ), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(\\Library\\Entity $entity){\n\t\t$this->setForm(new Form\\Form($entity));\n\t}", "public function initialize($entity = null, $options = null)\n {\n if (isset($options['edit']) && $options['edit']) {\n $id = new Hidden('id');\n } else {\n $id = new Text('id');\n }\n\n $this->add($id);\n\n // //id reseller\n // $id_reseller= new Text('id_reseller', [\n // 'placeholder' => 'Id Reseller'\n // ]);\n //\n // $id_reseller->setLabel('Reseller');\n // // $id_reseller->addValidators([\n // // new PresenceOf([\n // // 'message' => 'Id Reseller is required'\n // // ])\n // // ]);\n // $this->add($id_reseller);\n\n //nama agen\n $nama_agen = new Text('nama_agen', [\n 'placeholder' => 'Nama Agen'\n ]);\n\n $nama_agen->setLabel('Nama Agen');\n\n $nama_agen->addValidators([\n new PresenceOf([\n 'message' => 'Nama Agen is required'\n ])\n ]);\n\n $this->add($nama_agen);\n\n\n //merk\n $merk = new Text('merk', [\n 'placeholder' => 'Merk'\n ]);\n\n $merk->setLabel('Merk');\n $merk->addValidators([\n new PresenceOf([\n 'message' => 'Merk is required'\n ])\n ]);\n\n $this->add($merk);\n\n\n //serial number\n $serial_number = new Text('serial_number', [\n 'placeholder' => 'Serial Number'\n ]);\n\n $serial_number->setLabel('Serial Number');\n $serial_number->addValidators([\n new PresenceOf([\n 'message' => 'Serial Number is required'\n ])\n ]);\n\n $this->add($serial_number);\n\n\n //lokasi\n $lokasi = new Text('lokasi', [\n 'placeholder' => 'Lokasi'\n ]);\n\n $lokasi->setLabel('Lokasi');\n $lokasi->addValidators([\n new PresenceOf([\n 'message' => 'Lokasi is required'\n ])\n ]);\n\n $this->add($lokasi);\n\n\n //alamat\n $alamat = new Text('alamat', [\n 'placeholder' => 'Alamat'\n ]);\n\n $alamat->setLabel('Alamat');\n $alamat->addValidators([\n new PresenceOf([\n 'message' => 'Alamat is required'\n ])\n ]);\n\n $this->add($alamat);\n\n // Save\n $this->add(new Submit('Save', [\n 'class' => 'btn btn-success',\n 'id'=> 'submit'\n ]));\n\n // Save\n $this->add(new Submit('Search', [\n 'class' => 'btn btn-success',\n 'id'=> 'submit'\n ]));\n\n //id_doctor\n $findreseller = Users::find([\"profilesId = '5'\"]);\n $id_reseller = new Select('id_reseller', $findreseller, [\n 'using' => [\n 'id',\n 'name'\n ],\n 'useEmpty' => true,\n 'emptyText' => '----Select Reseller----',\n 'emptyValue' => ''\n ]);\n $id_reseller->setLabel('Reseller *');\n $this->add($id_reseller);\n\n }", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n\n $elemento = new Text(\"formacion_id\");\n $this->add($elemento->setLabel(\"Id\"));\n } else {\n $this->add(new \\Phalcon\\Forms\\Element\\Hidden(\"formacion_id\"));\n }\n /*========================== ==========================*/\n $elemento = new Text('formacion_institucion',array('maxlength'=>50,'class'=>'form-control','required'=>'true','placeholder'=>'Ingrese el nombre de la institución'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Institución');\n $elemento->setFilters(array('striptags', 'string'));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'El nombre de la institución es requerido'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_gradoId', \\Curriculum\\Grado::find(), array(\n 'using' => array('grado_id', 'grado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el nivel'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Nivel');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Text('formacion_titulo',array('maxlength'=>50,'class'=>'form-control','placeholder'=>'Ingrese el nombre del Titulo','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Titulo');\n $elemento->setFilters(array('striptags', 'string'));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_estadoId', \\Curriculum\\Estado::find(), array(\n 'using' => array('estado_id', 'estado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el estado'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Estado');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaInicio',array('class'=>'form-control','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Fecha de Inicio');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha de inicio es requerida.'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaFinal',array('class'=>'form-control', 'disabled'=>''));\n $elemento->setLabel('Fecha Final');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha final es requerida.'\n ))\n ));\n $this->add($elemento);\n\n }", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n $element = new Text(\"id\");\n $this->add($element->setLabel(\"Id\"));\n } else {\n $this->add(new Hidden(\"id\"));\n }\n\n $name = new Text(\"nombre\");\n $name->setLabel(\"Nombre\");\n $name->setFilters(['striptags', 'string']);\n $name->addValidators([\n new PresenceOf([\n 'message' => 'El Nombre es Requerido'\n ])\n ]);\n $this->add($name);\n\n $genero = new Select('id_genero', Generos::find(), [\n 'using' => ['id_genero', 'genero'],\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ]);\n $genero->setLabel('Genero de Pelicula');\n $this->add($genero);\n\n $year = new Text(\"Año\");\n $year->setLabel(\"Año\");\n $year->setFilters(['date']);\n $year->addValidators([\n new PresenceOf([\n 'message' => 'Por favor ingrese el Año'\n ])\n ]);\n $this->add($year);\n }", "function __construct()\n {\n parent::__construct();\n\n $usuario_logado = TSession::getValue('login');\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_Equipe');\n $this->form->setFormTitle('Inscrição');\n \n // master fields\n $id = new TEntry('id');\n $nome = new TEntry('nome');\n $ref_campeonato = new TDBCombo('ref_campeonato', 'futapp', 'Campeonato', 'id', '{nome}','id asc' );\n $ref_categoria = new TCombo('ref_categoria');\n $escudo = new TFile('escudo');\n $usuario = new THidden('usuario');\n \n // detail fields\n $id_atleta = new THidden('id_atleta');\n $nome_atleta = new TEntry('nome_atleta');\n $cpf = new TEntry('cpf');\n\n if(TSession::getValue('login') == 'J30EVENTOS' || TSession::getValue('login') == 'admin' || TSession::getValue('login') == 'Roni')\n {\n $ja_jogou = new TCombo('ja_jogou');\n\n $ja_jogou->addItems( [ 't' => 'Sim', 'f' => 'Não' ] ); \n $label_ja = new TLabel('Já Jogou ?'); \n }\n else\n {\n $ja_jogou = new THidden('ja_jogou');\n $label_ja = new TLabel(' ');\n }\n\n\n $ref_campeonato->setChangeAction(new TAction([$this,'onMudaCampeonato']));\n $usuario->setValue($usuario_logado);\n\n $ref_campeonato->setEditable(false);\n \n // adjust field properties\n $id->setEditable(false);\n $id_atleta->setEditable(false);\n $nome->setSize('100%');\n $nome_atleta->setSize('100%');\n $cpf->setSize('100%');\n $cpf->setMask('99999999999');\n\n // allow just these extensions\n $escudo->setAllowedExtensions( ['png', 'jpg', 'jpeg'] );\n \n // enable progress bar, preview, and file remove actions\n $escudo->enableFileHandling();\n \n // add validations\n $nome->addValidation('Nome', new TRequiredValidator);\n \n // add master form fields\n $this->form->addFields( [new TLabel('ID')], [$id]);\n $this->form->addFields( [new TLabel('Nome da Equipe')], [$nome ] );\n $this->form->addFields( [new TLabel('Campeonato')], [$ref_campeonato ] );\n $this->form->addFields( [new TLabel('Categoria')], [$ref_categoria ] );\n $this->form->addFields( [new TLabel('Escudo')], [$escudo] );\n $this->form->addFields( [new TLabel('')], [$usuario] );\n \n \n $add_atleta = TButton::create('add_atleta', [$this, 'onProductAdd'], 'Adicionar', 'fa:save');\n \n $Label_id = new TLabel('');\n $Label_nome = new TLabel('Nome Completo (*)');\n $label_cpf = new TLabel('CPF (*)');\n\n $Label_nome->setFontColor('#FF0000');\n $label_cpf->setFontColor('#FF0000');\n \n $this->form->addContent( ['<h4>Atletas</h4><hr>'] );\n $this->form->addContent( ['Digite o Nome e CPF do atleta e clique em ADICIONAR para inserir o atleta na equipe.'] );\n $this->form->addContent( ['Para editar os dados do atleta clique no icone do lapis azul.'] );\n $this->form->addContent( ['Para remover o atleta clique no icone da lixeira vermelha.'] );\n $this->form->addFields( [$Label_id], [$id_atleta]);\n $this->form->addFields( [$Label_nome], [$nome_atleta]);\n $this->form->addFields( [$label_cpf], [$cpf]);\n $this->form->addFields( [$label_ja], [$ja_jogou]);\n $this->form->addFields( [], [$add_atleta] )->style = 'background: whitesmoke; padding: 5px; margin: 1px;';\n \n $this->product_list = new BootstrapDatagridWrapper(new TDataGrid);\n $this->product_list->setId('products_list');\n $this->product_list->style = \"min-width: 700px; width:100%;margin-bottom: 10px\";\n \n $col_id = new TDataGridColumn( 'id_atleta', 'ID', 'left', '10%');\n $col_nome = new TDataGridColumn( 'nome_atleta', 'Nome', 'left', '45%');\n $col_cpf = new TDataGridColumn( 'cpf', 'CPF', 'left', '45%');\n $col_jogou = new TDataGridColumn( 'ja_jogou', 'Já Jogou?', 'left', '45%');\n \n $this->product_list->addColumn($col_id);\n $this->product_list->addColumn($col_nome);\n $this->product_list->addColumn($col_cpf);\n $this->product_list->addColumn($col_jogou);\n\n $col_jogou->setTransformer( function($ja_jogou) \n {\n if ($ja_jogou == 't') \n {\n return 'Sim';\n }\n else\n {\n return 'Não';\n }\n });\n \n // creates two datagrid actions\n $action1 = new TDataGridAction([$this, 'onEditItemProduto']);\n $action1->setLabel('Editar');\n $action1->setImage('fa:edit blue');\n $action1->setField('id_atleta');\n $action1->setField('nome_atleta');\n $action1->setField('cpf');\n $action1->setField('ja_jogou');\n \n $action2 = new TDataGridAction([$this, 'onDeleteItem']);\n $action2->setLabel('Excluir');\n $action2->setImage('fa:trash red');\n $action2->setField('id_atleta');\n // $action2->setField('nome_atleta');\n // $action2->setField('cpf');\n \n // add the actions to the datagrid\n $this->product_list->addAction($action1);\n $this->product_list->addAction($action2);\n \n $this->product_list->createModel();\n \n $panel = new TPanelGroup;\n $panel->add($this->product_list);\n $panel->getBody()->style = 'overflow-x:auto';\n $this->form->addContent( [$panel] );\n \n $this->form->addAction( 'Salvar', new TAction([$this, 'onSave']), 'fa:save green');\n // $this->form->addAction( 'Clear', new TAction([$this, 'onClear']), 'fa:eraser red');\n \n // create the page container\n $container = new TVBox;\n $container->style = 'width: 100%';\n // $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $container->add($this->form);\n parent::add($container);\n }", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "public function __construct($form)\n\t{\n\t\t$formPackage = $form->getMergePackage();\n\t\t$this->name = $form->getName();\n\t\t$this->form = $form;\n\t\t$this->inputs = $formPackage['inputs'];\n\t\t$this->sectionIntro = $formPackage['intros'];\n\t\t$this->sectionOutro = $formPackage['outros'];\n\t\t$this->sectionLegends = $formPackage['legends'];\n\t\t$this->sectionClasses = $formPackage['classes'];\n\t\t$this->errors = $formPackage['errors'];\n\t}", "public function __construct()\n {\n parent::__construct('ServicioForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'servicio_nombre',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Nombre',\n ),\n ));\n $this->add(array(\n 'name' => 'servicio_descripcion',\n 'type' => 'textarea',\n 'options' => array(\n 'label' => 'Descripcion',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_costo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Costo',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_precio',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Precio',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_iva',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'IVA',\n ),\n ));\n \n\n\n }", "protected function _prepareForm()\n\t{\n\n\t\t$intId = $this->getRequest()->getParam(SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID);\n\n\t\t$objEntity = new SDZeCOM_Aurednik_Model_Cms_Home_Entity ();\n\n\t\t$objEntity->load($intId);\n\n\t\t$objAttribute = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute ();\n\n\t\t$objAttributeValue = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute_Values ();\n\n\t\t$objEntityType = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Type ();\n\n\t\t$objForm = new Varien_Data_Form (\n\t\t\tarray(\n\t\t\t\t'id' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME,\n\t\t\t\t'action' => $this->getUrl('*/*/save'),\n\t\t\t\t'method' => 'post',\n\t\t\t\t'enctype' => 'multipart/form-data',\n\t\t\t\t'name' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME\n\t\t\t)\n\t\t);\n\n\t\t$this->setForm($objForm);\n\n\t\t$objForm->setUseContainer(true);\n\n\t\t//Set Enitty\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset('aurednik_cms_home_entity',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity')));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'required' => true,\n\t\t\t\t'value' => $objEntity->getId(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getEntity_name(),\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$field = $objFieldset->addField(SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store::TABLE_COLUMN_STORE_ID, 'multiselect', array(\n\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store :: TABLE_COLUMN_STORE_ID . ']',\n\t\t\t'label' => Mage::helper('cms')->__('Store View'),\n\t\t\t'title' => Mage::helper('cms')->__('Store View'),\n\t\t\t'required' => true,\n\t\t\t'value' => $objEntity->getStore_id(),\n\t\t\t'values' => Mage:: getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),\n\t\t));\n\n\t\t$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');\n\t\t$field->setRenderer($renderer);\n\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => true,\n\t\t\t\t'options' => $objEntityType->toOptionArray(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'value' => $objEntity->getType_id()\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => false,\n\t\t\t\t'options' => array(0 => Mage:: helper('admin')->__('No'), 1 => Mage:: helper('admin')->__('Yes')),\n\t\t\t\t'value' => $objEntity->getActive()\n\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getSort(),\n\t\t\t\t'class' => 'required-entry',\n\t\t\t\t'required' => true,\n\t\t\t));\n\n\t\t$objAttrCollection = $objAttribute->getCollection()->getByEntityTypeId($objEntity->getType_id());\n\n\t\tif ($objAttrCollection->count() == 0)\n\t\t{\n\t\t\tMage:: getSingleton('core/session')->addError(Mage:: helper('aurednik')->__('Error no attributes'));\n\t\t\t$this->getResponse()->sendResponse();\n\t\t}\n\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset(\n\t\t\t\t'aurednik_cms_home_entity_data',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity attribute data')\n\t\t\t\t)\n\t\t\t);\n\n\t\tforeach ($objAttrCollection as $objCurrentAttr)\n\t\t{\n\n\t\t\t$objEntityAttrValuesCollection = $objAttributeValue->getCollection()->getByEntityIdAndAttributeId($objEntity->getId(), $objCurrentAttr->getId());\n\n\t\t\tif ($objEntityAttrValuesCollection->count() > 0)\n\t\t\t{\n\n\t\t\t\tforeach ($objEntityAttrValuesCollection as $objCurrentAttrValue)\n\t\t\t\t{\n\n\t\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t\t$objCurrentAttrValue->getId(),\n\t\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t\t'value' => $objCurrentAttrValue->getAttribute_value(),\n\t\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t$objEntity->getId() . \"_\" . $objCurrentAttr->getId(),\n\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\treturn parent:: _prepareForm();\n\t}", "public function initialize(ThThesaurus $entity = null, $options = ['edit'=>true])\n {\n \t$this->add(new Hidden('id_thesaurus'));\n\n \t$this->addText('nombre', ['tooltip'=>'Título del Thesaurus (requerido)', 'label'=>'Titulo', 'filters'=>array('striptags', 'string'), 'validators'=>[new PresenceOf(['message' => 'Titulo es requerido'])] ]);\n \t//$this->addText('iso25964_identifier', ['label'=>'DC:Identificador', 'filters'=>array('striptags', 'string')]);\n\n \t$this->addTextArea('iso25964_description', ['label'=>'Descripción', 'filters'=>array('striptags', 'string'), 'validators'=>[new PresenceOf(['message' => 'Descripción es requerido'])] ]);\n $this->addText('iso25964_publisher', ['tooltip'=>'Entidad responsable de la publicación', 'label'=>'Editor', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_rights', ['tooltip'=>'Copyright / Otros Derechos de la Información', 'label'=>'Derechos/Copyright', 'filters'=>array('striptags', 'string')]);\n\n $this->addSelect('iso25964_license', ['tooltip'=> 'Licencias para otros trabajos', 'label'=>'Licencia', 'options'=> self::DEFAULT_RIGHTS, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addText('iso25964_coverage', ['tooltip'=>'Cobertura espacial o temporal del Thesaurus', 'label'=>'Cobertura/Alcance', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_created', ['label'=>'Fecha creación', 'filters'=>array('striptags', 'string')]);\n\n $this->addText('iso25964_subject', ['tooltip'=>'Indice de Términos indicando las materias del contenido', 'label'=>'Temática/Contenido', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_language', ['tooltip'=>'Idiomas soportados por el Thesaurus', 'label'=>'Idioma', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_source', ['tooltip'=>'Recursos desde los cuales el Thesaurus fue derivado', 'label'=>'Fuentes', 'filters'=>array('striptags', 'string')]);\n\n $this->addText('iso25964_creator', ['tooltip'=>'Persona o entidad principal responsable de la elaboración', 'label'=>'Creador', 'filters'=>array('striptags', 'string')]);\n $this->addText('iso25964_contributor', ['tooltip'=>'Personas u organizaciones quienes contribuyeron con el Thesaurus', 'label'=>'Colaborador', 'filters'=>array('striptags', 'string')]);\n $this->addSelect('iso25964_type', ['tooltip'=>'El género del vocabulario', 'label'=>'Tipo', 'options'=> self::DEFAULT_TYPES, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n $this->addSelect('is_activo', ['tooltip'=>'Activar / Inactivar', 'label'=>'Activo', 'options'=> [0 => 'NO', 1 => 'SI'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addSelect('is_primario', ['tooltip'=>'Primario (Aparece como pagina inicial del sitio)', 'label'=>'Primario', 'options'=> [0 => 'NO', 1 => 'SI'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n $this->addSelect('is_publico', ['tooltip'=>'Publico (Si LECTOR_PERMISO = ANONIMO es explorable sin ingresar como usuario registrado) / Privado (Solo pueden ver los usuarios autorizados)', 'label'=>'Publico/Privado', 'options'=> [0 => 'PRIVADO', 1 => 'PUBLICO'], 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n $this->addSelect('permisos[]', ['tooltip'=>'Permisos por Usuario', 'label'=>'Tipo', 'options'=> AdUsuarioForm::PERMISOS_TYPES, 'attrs'=> ['useEmpty' => true, 'emptyText' => '--']]);\n\n if ($this->isEditable($options)) {\n\n }\n else {\n \tforeach($this->getElements() as &$e) {\n \t\t$e->setAttribute(\"readonly\", \"readonly\");\n \t}\n }\n }", "private function createEditForm(BonCommandeLigne $entity)\n {\n $form = $this->createForm(new BonCommandeLigneType(), $entity, array(\n 'action' => $this->generateUrl('boncommandeligne_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "protected function createComponentEditorForm()\n {\n $form = new Form;\n $form->addHidden('article_id');\n $form->addText('title', 'Titulek')->setRequired();\n $form->addText('url', 'URL')->setRequired();\n $form->addText('description', 'Popisek')->setRequired();\n $form->addTextArea ('content', 'Obsah');\n $form->addSubmit('submit', 'Uložit článek');\n $form->onSuccess[] = [$this, 'editorFormSucceeded'];\n return $form;\n }", "public function initialize($entity = null, $options = [])\n {\n\n\n if (!isset($options['edit'])) {\n\n\n// $element = new Text(\"PrefixNameID\");\n// $this->add($element->setLabel(\"เลขที่คำนำหน้าชื่อ\"));\n }\n else {\n //Edit ONLY\n $this->add(new Hidden(\"CourseID\"));\n\n }\n\n\n $RecordStatus = new Hidden(\"RecordStatus\");\n $RecordStatus->setDefault('N');\n $this->add($RecordStatus);\n\n $CourseNameTh = new Text(\"CourseNameTh\");\n $CourseNameTh->setLabel(\"ชื่อหลักสูตร(Th)\");\n $CourseNameTh->setFilters(['striptags', 'string']);\n $CourseNameTh->addValidators([\n new PresenceOf([\n 'message' => 'กรุณากรอกข้อมูล ชื่อหลักสูตร(Th)'\n ])\n ]);\n\n $this->add($CourseNameTh);\n\n $CourseNameEn = new Text(\"CourseNameEn\");\n $CourseNameEn->setLabel(\"ชื่อหลักสูตร(En)\");\n $CourseNameEn->setFilters(['striptags', 'string']);\n\n $this->add($CourseNameEn);\n\n $CourseDetail = new Text(\"CourseDetail\");\n $CourseDetail->setLabel(\"รายละเอียด\");\n $CourseDetail->setFilters(['striptags', 'string']);\n\n $this->add($CourseDetail);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "public function __construct($FormName)\n\t {\n\t \t// Call parent's constructor with the form name so nothing breaks down.\n\t \tparent::__construct($FormName);\n\t\t\t\n // ProductID.\n\t\t\t$this->add(\n\t\t\t[\n\t 'name' => 'productId',\n\t 'attributes' =>\n\t [\n\t 'type' => 'text',\n\t 'id' => 'productId',\n 'required' => 'required',\n\t \t],\n\t 'options' => ['label' => 'ProductID']\n\t ]);\n\t\t\t\n\t\t\t// Submit button.\n\t\t\t$this->add(\n\t\t\t[\n\t 'name' => 'submitDeleteProductForm',\n\t 'attributes' =>\n\t [\n\t 'type' => 'submit',\n\t 'id' => 'submitDeleteProductForm',\n 'required' => 'required',\n 'value' => 'Delete',\n\t \t]\n\t ]);\n\t }", "public function initialize($entity = null, $options = array())\n { \n $titulo = new Text(\"nome\");\n $titulo->setAttribute('class','form-control ');\n $this->add($titulo);\n\n $email = new Text(\"email\");\n $email->setAttribute('class','form-control ');\n $this->add($email);\n\n }", "public function __construct()\n {\n parent::__construct();\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle(\"Listagem de emprestimos\");\n\n $exemplar_id = new TDBUniqueSearch('exemplar_id', 'biblioteca', 'Exemplar', 'id', 'codigo_barras','id asc' );\n $leitor_id = new TDBUniqueSearch('leitor_id', 'biblioteca', 'Leitor', 'id', 'nome','nome asc' );\n $dt_emprestimo = new TDate('dt_emprestimo');\n $dt_emprestimo_final = new TDate('dt_emprestimo_final');\n $dt_previsao = new TDate('dt_previsao');\n $dt_prevista_final = new TDate('dt_prevista_final');\n $dt_devolucao = new TDate('dt_devolucao');\n $dt_devolucao_final = new TDate('dt_devolucao_final');\n\n $leitor_id->setMinLength(2);\n $exemplar_id->setMinLength(1);\n\n $dt_previsao->setDatabaseMask('yyyy-mm-dd');\n $dt_devolucao->setDatabaseMask('yyyy-mm-dd');\n $dt_emprestimo->setDatabaseMask('yyyy-mm-dd');\n $dt_prevista_final->setDatabaseMask('yyyy-mm-dd');\n $dt_devolucao_final->setDatabaseMask('yyyy-mm-dd');\n $dt_emprestimo_final->setDatabaseMask('yyyy-mm-dd');\n\n $leitor_id->setSize('70%');\n $dt_previsao->setSize(100);\n $dt_devolucao->setSize(100);\n $exemplar_id->setSize('70%');\n $dt_emprestimo->setSize(100);\n $dt_prevista_final->setSize(100);\n $dt_devolucao_final->setSize(100);\n $dt_emprestimo_final->setSize(100);\n\n $leitor_id->setMask('{nome}');\n $dt_previsao->setMask('dd/mm/yyyy');\n $dt_devolucao->setMask('dd/mm/yyyy');\n $dt_emprestimo->setMask('dd/mm/yyyy');\n $exemplar_id->setMask('{livro->titulo}');\n $dt_prevista_final->setMask('dd/mm/yyyy');\n $dt_devolucao_final->setMask('dd/mm/yyyy');\n $dt_emprestimo_final->setMask('dd/mm/yyyy');\n\n $row1 = $this->form->addFields([new TLabel(\"Exemplar:\", null, '14px', null)],[$exemplar_id]);\n $row2 = $this->form->addFields([new TLabel(\"Leitor:\", null, '14px', null)],[$leitor_id]);\n $row3 = $this->form->addFields([new TLabel(\"Data de empréstimo inicial:\", null, '14px', null)],[$dt_emprestimo],[new TLabel(\"Data de empréstimo final:\", null, '14px', null)],[$dt_emprestimo_final]);\n $row4 = $this->form->addFields([new TLabel(\"Data prevista de devolução inicial:\", null, '14px', null)],[$dt_previsao],[new TLabel(\"Data prevista de devolução final:\", null, '14px', null)],[$dt_prevista_final]);\n $row5 = $this->form->addFields([new TLabel(\"Data de devolução inicial:\", null, '14px', null)],[$dt_devolucao],[new TLabel(\"Data de devolução final:\", null, '14px', null)],[$dt_devolucao_final]);\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_onsearch = $this->form->addAction(\"Buscar\", new TAction([$this, 'onSearch']), 'fas:search #ffffff');\n $btn_onsearch->addStyleClass('btn-primary'); \n\n $btn_onexportcsv = $this->form->addAction(\"Exportar como CSV\", new TAction([$this, 'onExportCsv']), 'far:file-alt #000000');\n\n $btn_onshow = $this->form->addAction(\"Novo emprestimo\", new TAction(['EmprestimoLivroForm', 'onShow']), 'fas:plus #69aa46');\n\n // creates a Datagrid\n $this->datagrid = new TDataGrid;\n $this->datagrid->disableHtmlConversion();\n $this->datagrid = new BootstrapDatagridWrapper($this->datagrid);\n $this->filter_criteria = new TCriteria;\n\n $this->datagrid->style = 'width: 100%';\n $this->datagrid->setHeight(320);\n\n $column_id = new TDataGridColumn('id', \"Id\", 'left' , '69px');\n $column_exemplar_livro_titulo = new TDataGridColumn('exemplar->livro->titulo', \"Exemplar\", 'left');\n $column_leitor_nome = new TDataGridColumn('leitor->nome', \"Leitor\", 'left');\n $column_dt_emprestimo_transformed = new TDataGridColumn('dt_emprestimo', \"Emprestado em\", 'left');\n $column_dt_previsao_transformed = new TDataGridColumn('dt_previsao', \"Previsão de devolução\", 'left');\n $column_dt_devolucao_transformed = new TDataGridColumn('dt_devolucao', \"Devolvido em\", 'left');\n\n $column_dt_emprestimo_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n });\n\n $column_dt_previsao_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n });\n\n $column_dt_devolucao_transformed->setTransformer(function($value, $object, $row) \n {\n if(!empty(trim($value)))\n {\n try\n {\n $date = new DateTime($value);\n return $date->format('d/m/Y');\n }\n catch (Exception $e)\n {\n return $value;\n }\n }\n }); \n\n $order_id = new TAction(array($this, 'onReload'));\n $order_id->setParameter('order', 'id');\n $column_id->setAction($order_id);\n $order_dt_emprestimo_transformed = new TAction(array($this, 'onReload'));\n $order_dt_emprestimo_transformed->setParameter('order', 'dt_emprestimo');\n $column_dt_emprestimo_transformed->setAction($order_dt_emprestimo_transformed);\n $order_dt_previsao_transformed = new TAction(array($this, 'onReload'));\n $order_dt_previsao_transformed->setParameter('order', 'dt_previsao');\n $column_dt_previsao_transformed->setAction($order_dt_previsao_transformed);\n $order_dt_devolucao_transformed = new TAction(array($this, 'onReload'));\n $order_dt_devolucao_transformed->setParameter('order', 'dt_devolucao');\n $column_dt_devolucao_transformed->setAction($order_dt_devolucao_transformed);\n\n $this->datagrid->addColumn($column_id);\n $this->datagrid->addColumn($column_exemplar_livro_titulo);\n $this->datagrid->addColumn($column_leitor_nome);\n $this->datagrid->addColumn($column_dt_emprestimo_transformed);\n $this->datagrid->addColumn($column_dt_previsao_transformed);\n $this->datagrid->addColumn($column_dt_devolucao_transformed);\n\n $action_onDevolver = new TDataGridAction(array('EmprestimoList', 'onDevolver'));\n $action_onDevolver->setUseButton(true);\n $action_onDevolver->setButtonClass('btn btn-default btn-sm');\n $action_onDevolver->setLabel(\"Devolver\");\n $action_onDevolver->setImage('fa:arrow-up #000000');\n $action_onDevolver->setField(self::$primaryKey);\n $action_onDevolver->setDisplayCondition('EmprestimoList::onExibirDevolver');\n\n $this->datagrid->addAction($action_onDevolver);\n\n // create the datagrid model\n $this->datagrid->createModel();\n\n // creates the page navigation\n $this->pageNavigation = new TPageNavigation;\n $this->pageNavigation->setAction(new TAction(array($this, 'onReload')));\n $this->pageNavigation->setWidth($this->datagrid->getWidth());\n\n $panel = new TPanelGroup;\n $panel->add($this->datagrid);\n\n $panel->addFooter($this->pageNavigation);\n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n // $container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $container->add($this->form);\n $container->add($panel);\n\n parent::add($container);\n\n }", "private function createEditForm(Task $entity) //recibiendo nuestra entidad de tarea\n {\n //$form = $this->createForm(new TaskType, $entity, array( \n //pero para Symfony3.4.15 ahora es: \n $form = $this->createForm(TaskType::class, $entity, array(\n 'action' => $this->generateUrl('infunisa_task_update', array('id' => $entity->getId())),\n 'method' => 'PUT' //como estamos editando la tarea usamos PUT\n ));\n \n return $form;\n }", "protected function _construct()\n {\n $this->_init(\\AddictedToMagento\\DynamicForms\\Model\\ResourceModel\\Form::class);\n }", "protected function createComponentEditTaskForm() {\r\n\r\n $form = new UI\\Form;\r\n\r\n $form->getElementPrototype()->novalidate = 'novalidate';\r\n\r\n $form->addText('name', 'Task name:')\r\n ->setRequired('Please provide a task name.');\r\n\r\n $form->addTextArea('description', 'Description:');\r\n\r\n $form->addText('deadline', 'Deadline')->setOption('description', 'Use format: YYYY-MM-DD')\r\n ->addCondition(UI\\Form::FILLED)\r\n ->addRule(UI\\Form::PATTERN, 'Může být v rozmezí 2011-01-01 až 2019-12-31', '^(20)\\d\\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$');\r\n\r\n $form->addRadioList('priority', 'Priority', array(\r\n '1' => '1',\r\n '2' => '2',\r\n '3' => '3',\r\n '0' => 'bez priority'\r\n ));\r\n\r\n $result = dibi::query('SELECT idcategory, name FROM `categories` WHERE iduser = %i', $this->getUser()->getId())->fetchPairs('idcategory', 'name');\r\n\r\n $form->addRadioList('idcategory', 'Category', $result)\r\n ->setRequired('Please select category.');\r\n\r\n $status = array(\r\n 'nedokončeno' => 'nedokončeno',\r\n 'odloženo' => 'odloženo',\r\n 'dokončeno' => 'dokončeno',\r\n );\r\n $form->addRadioList('status', 'Status', $status)\r\n ->setRequired('Please select status.');\r\n\r\n $form->addHidden('idtask');\r\n\r\n $form->addSubmit('editTask', 'Edit Task');\r\n\r\n $form->onSuccess[] = callback($this, 'EditTaskFormSubmitted');\r\n\r\n $task = dibi::query('SELECT * FROM `tasks` WHERE idtask = %i', $this->getParam('id'))->fetch();\r\n\r\n if ($task->deadline == \"0000-00-00\")\r\n $task->deadline = \"\";\r\n\r\n $form->setDefaults(array(\r\n 'name' => $task->name,\r\n 'description' => $task->description,\r\n 'deadline' => $task->deadline,\r\n 'status' => $task->status,\r\n 'priority' => $task->priority,\r\n 'idcategory' => $task->idcategory,\r\n 'idtask' => $task->idtask,\r\n ));\r\n\r\n return $form;\r\n }", "public function initialize()\n {\n $this->setEntity($this);\n\n // full name\n $key = new Text(\n \t'key',\n \t[\n \t\t\"required\"=>true,\n \t\t\"class\"=>\"form-control\",\n \t\t\"id\"=>\"key\",\n \t]\n );\n\n $key->addFilter('string');\n\n // full name\n $value = new Text(\n \t'val',\n \t[\n \t\t\"required\"=>true,\n \t\t\"class\"=>\"form-control\",\n \t\t\"id\"=>\"value\",\n \t]\n );\n\n $value->addFilter('string');\n \n\n \n \n\n $this->add($key);\n $this->add($value);\n\n // Add a text element to put a hidden CSRF\n $this->add(\n new Hidden(\n 'csrf'\n )\n );\n }", "public function __construct(Form $form)\n {\n $this->form = $form;\n }", "public function __construct(Form $form)\n {\n $this->form = $form;\n }", "private function createEditForm(Ligne $entity)\n {\n $form = $this->createForm(new LigneType(), $entity, array(\n 'action' => $this->generateUrl('ligne_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "function example_simple_property_bundle_form($property, $vars) {\n $form = &$vars['form'];\n $eck_entity_type = $form['entity_type']['#value'];\n $eck_bundle = $form['bundle']['#value'];\n $config = $eck_bundle->config;\n\n $form['config_simple'] = array(\n '#title' => t('Simple'),\n '#description' => t('Simple textfield.'),\n '#type' => 'textfield',\n '#size' => 255,\n '#default_value' => isset($config['simple']) ? $config['simple'] : 'abcd',\n '#weight' => 0,\n );\n\n return $vars;\n}", "private function createEditForm(Bien $entity)\n {\n $form = $this->createForm(new BienType(), $entity, array(\n 'action' => $this->generateUrl('bien_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "protected function setForm(&$form) {\n if (is_array($form) && isset($form['#entity'])) {\n $this->form =& $form;\n $this->entity =& $form['#entity'];\n $this->type = \"{$this->entity->type}_entity_form\";\n }\n elseif (is_object($form) && $form instanceof Entity) {\n $entity =& $form;\n $type = $entity->type;\n $bundle = $type;\n $form_id = \"eck__entity__form__add_{$type}_{$bundle}\";\n\n $this->form = drupal_get_form($form_id, $entity);\n $this->entity =& $entity;\n $this->type = \"{$type}_entity_form\";\n }\n else {\n $this->form =& $form;\n $this->type = 'non_entity_form';\n }\n }", "public function buildEditForm(FormBuilderInterface $builder, array $options);", "public function createComponentEditForm()\n\t{\n\t\t$form = new Form;\n\t\t$form->addGroup();\n\t\t$form->addHidden('ID_leku');\n\t\t$form->addText('nazev_leku', 'Názov lieku')\n\t\t\t->addRule(Form::FILLED, 'Zadajte názov lieku');\n\t\t$form->addSelect('typ_leku', 'Typ lieku', self::MEDICINE_TYPE)\n\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setAttribute('class', 'form-control');\n\n\t\t$form->addGroup(\"Poisťovne\");\n\t\t$removeEvent = [$this, 'removeElementClicked'];\n\t\t$insurences = $form->addDynamic(\n\t\t\t'insurences',\n\t\t\tfunction (Container $insurence) use ($removeEvent) {\n\t\t\t\t$insurence->addHidden('ID_leku');\n\t\t\t\t$insurence->addSelect('ID_pojistovny', 'Poisťovňa', $this->insurenceManager->getInsurenceToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$insurence->addText('cena', 'Cena lieku')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Cena musí byť číslo');\n\t\t\t\t$insurence->addText('doplatek', 'Doplatok na liek')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Doplatok musí byť číslo');\n\t\t\t\t$insurence->addSelect('hradene', 'Typ lieku', array('hradene' => 'Hradený', 'nehradene' => 'Nehradený', 'doplatok' => 'Liek s doplatkom'))\n\t\t\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$removeBtn = $insurence->addSubmit('remove', 'Odstrániť poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$insurences->addSubmit('add', 'Pridať poisťovňu')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup(\"Pobočky\");\n\t\t$offices = $form->addDynamic(\n\t\t\t'offices',\n\t\t\tfunction (Container $office) use ($removeEvent) {\n\t\t\t\t$office->addHidden('ID_leku');\n\t\t\t\t$office->addSelect('ID_pobocky', 'Pobočka', $this->officeManager->getOfficesToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte pobočku')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$office->addText('pocet_na_sklade', 'Počet kusov')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setDefaultValue('1')\n\t\t\t\t\t->addRule(Form::INTEGER, 'Počet kusov musí byť číslo')\n\t\t\t\t\t->addRule(Form::RANGE, 'Počet kusov musí byť kladné číslo', array(0, null));\n\n\t\t\t\t$removeBtn = $office->addSubmit('remove', 'Odstrániť pobočku')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$offices->addSubmit('add', 'Pridať pobočku')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup('');\n\t\t$form->addSubmit('submit', 'Uložiť liek')\n\t\t\t->setAttribute('class', 'btn-primary')\n\t\t\t->onClick[] = [$this, 'submitElementClicked'];\n\n\t\treturn $this->bootstrapFormRender($form);\n\t}", "private function createEditForm(LocalBanner $entity)\n {\n $form = $this->createForm(new LocalBannerType(), $entity, array(\n 'action' => $this->generateUrl('localbanner_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => $this->get('translator')->transChoice('txt.editar',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-primary btn-lg')));\n\n return $form;\n }", "public function __construct()\n {\n parent::__construct(array(\n 'name' => __('WS Form', 'ws-form'),\n 'description' => __('Add a form.', 'ws-form'),\n 'category'\t\t=> __('Basic', 'ws-form'),\n 'dir' => FL_WS_FORM_DIR . 'modules/ws-form/',\n 'url' => FL_WS_FORM_URL . 'modules/ws-form/',\n 'editor_export' => true, // Defaults to true and can be omitted.\n 'enabled' => true, // Defaults to true and can be omitted.\n 'icon' => 'icon.svg'\n ));\n }", "private function createEditForm(Element $entity)\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$request = $this->container->get('request_stack')->getCurrentRequest();\n\t\t$params = $request->get('_route_params');\n\t\t$block = $em->getRepository('NovuscomCMFBundle:Block')->find($params['block_id']);\n\n\t\t$epArray = array();\n\t\t$epDescription = array();\n\n\t\t/**\n\t\t * Пролучаем значения свойств типа \"строка\"\n\t\t */\n\t\t$ElementProperty = $em->getRepository('NovuscomCMFBundle:ElementProperty')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\tforeach ($ElementProperty as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t\t$epDescription[$ep->getProperty()->getId()][] = $ep->getDescription();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"дата/время\"\n\t\t */\n\t\t$ElementPropertyDT = $em->getRepository('NovuscomCMFBundle:ElementPropertyDT')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\t\tforeach ($ElementPropertyDT as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"файл\"\n\t\t */\n\t\t$ElementPropertyFile = $em->getRepository('NovuscomCMFBundle:ElementPropertyF')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\t$ElementPropertyFileId = array();\n\t\tforeach ($ElementPropertyFile as $epf) {\n\t\t\t$ElementPropertyFileId[$epf->getProperty()->getId()][$epf->getId()] = $epf->getFile()->getId();\n\t\t}\n\n\n\t\t/**\n\t\t * Устанавливаем значения для формы\n\t\t */\n\t\t$data = array(\n\t\t\t'VALUES' => $epArray,\n\t\t\t'DESCRIPTION' => $epDescription,\n\t\t\t'PROPERTY_FILE_VALUES' => $ElementPropertyFileId,\n\t\t\t'LIIP' => $this->get('liip_imagine.cache.manager'),\n\t\t\t'BLOCK_PROPERTIES' => $block->getProperty(),\n\t\t\t'ELEMENT_ENTITY' => $entity,\n\t\t\t'service.file' => $this->get('File'),\n\t\t);\n\n\n\t\t//$propertyForm = new ElementPropertyType($block->getProperty(), $em, $data, $request);\n\n\t\t//$formProperty = new FormProperty();\n\t\t//$formProperty->setValue('value of form property');\n\n\t\t/*$formElement = new FormElement();\n\t\t$formElement->setName($entity->getName());\n\t\t$formElement->setCode($entity->getCode());\n\t\t$formElement->setProperties($formProperty);*/\n\n\t\t$action_url = $this->generateUrl('admin_element_update', array('id' => $entity->getId(), 'block_id' => $params['block_id']));\n\t\tif (array_key_exists('section_id', $params)) {\n\t\t\t$action_url = $this->generateUrl('admin_element_update_in_section', array(\n\t\t\t\t'id' => $entity->getId(),\n\t\t\t\t'block_id' => $params['block_id'],\n\t\t\t\t'section_id' => $params['section_id']\n\t\t\t));\n\t\t}\n\t\t$form = $this->createForm(ElementType::class, $entity, array(\n\t\t\t'action' => $action_url,\n\t\t\t'method' => 'PUT',\n\t\t\t'em' => $em,\n\t\t\t'blockObject' => $block\n\t\t));\n\n\n\t\t$form->add('properties', ElementPropertyType::class,\n\t\t\tarray(\n\t\t\t\t//'entry_type' => ElementPropertyType::class,\n\t\t\t\t'label' => 'Свойства',\n\t\t\t\t'mapped' => false,\n\t\t\t\t//'by_reference' => false,\n\t\t\t\t//'allow_add' => true,\n\t\t\t\t//'allow_delete' => true,\n\t\t\t\t//'prototype' => true,\n\t\t\t\t'data' => $data,\n\t\t\t\t//'options' => array('asdasdasdasd'), // не работает\n\t\t\t));\n\n\t\t//$form->add('submit', SubmitType::class, array('label' => 'Сохранить', 'attr' => array('class' => 'btn btn-info')));\n\n\n\t\treturn $form;\n\t}", "private function createEditForm(Rubrique $entity) {\r\n $form = $this->createForm('Loonins\\WikiBundle\\Form\\RubriqueType', $entity, array(\r\n 'action' => $this->generateUrl('rubrique_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', SubmitType::class, array('label' => 'Enregistrer les modifications'));\r\n\r\n return $form;\r\n }", "public function init()\n {\n $this->add([\n 'name' => 'name',\n 'type' => Text::class,\n 'attributes' => [\n 'placeholder' => 'Full Name',\n 'autofocus' => true,\n ],\n 'options' => [\n 'label' => 'Name',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'email',\n 'type' => Email::class,\n 'attributes' => [\n 'placeholder' => 'Email Address',\n ],\n 'options' => [\n 'label' => 'Email',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'subject',\n 'type' => Text::class,\n 'options' => [\n 'label' => 'Subject',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n 'attributes' => [\n 'placeholder' => 'Subject',\n ],\n ]);\n\n $this->add([\n 'name' => 'transport',\n 'type' => Select::class,\n 'options' => [\n 'label' => 'Department',\n 'value_options' => $this->getTransportList(),\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'body',\n 'type' => Textarea::class,\n 'options' => [\n 'label' => 'Message',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n 'attributes' => [\n 'placeholder' => 'Your message',\n 'rows' => 10,\n ],\n ]);\n\n if (true === $this->getOption('enable_captcha')) {\n $this->add([\n 'name' => 'captcha',\n 'type' => Captcha::class,\n 'attributes' => [\n 'placeholder' => 'Type letters and number here',\n ],\n 'options' => [\n 'label' => 'Please verify you are human',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10 col-sm-offset-2',\n 'label_attributes' => [\n 'class' => 'col-sm-10 col-sm-offset-2',\n ],\n ],\n ]);\n }\n\n $this->add([\n 'name' => 'csrf',\n 'type' => Csrf::class,\n ]);\n\n $this->add([\n 'name' => 'submit',\n 'type' => Submit::class,\n 'attributes' => [\n 'id' => 'contact-submit-button',\n 'class' => 'btn btn-primary',\n ],\n 'options' => [\n 'label' => 'Send',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10 col-sm-offset-2',\n ]\n ]);\n }", "public function __construct(array $form)\n {\n $this->form = $form;\n }", "public function __construct (FormBuilder $formBuilder)\n {\n $this->middleware('auth');\n\n $this->formBuilder = $formBuilder;\n $this->entity = 'posts';\n }", "public function getEditForm();", "public function buildForm(FormBuilderInterface $builder, array $options){\n $builder\n\n ->add('id', HiddenType::class, array(\n 'attr'=> array(\n 'editable' => false\n )\n ))\n\n -> add('prenom', TextType::class, array(\n 'constraints' => array(\n new Assert\\NotBlank(),\n new Assert\\Length(array(\n 'min' => 3,\n 'max' => 40,\n ))\n ),\n 'required' => true,\n 'attr' => array(\n 'placeholder' => 'Votre prénom',\n 'class' => 'form-control',\n ),\n ))\n\n -> add('nom', TextType::class, array(\n 'constraints' => array(\n new Assert\\NotBlank(),\n new Assert\\Length(array(\n 'min' => 3,\n 'max' => 40,\n ))\n ),\n 'required' => true,\n 'attr' => array(\n 'placeholder' => 'Votre nom',\n 'class' => 'form-control',\n ),\n ))\n\n\n -> add('username', EmailType::class, array(\n // 'constraints' => array(\n // new Assert\\Email(),\n // ),\n 'attr' => array(\n 'placeholder' => 'Votre adresse email',\n 'class' => 'form-control',\n ),\n ))\n\n -> add('date_naissance', TextType::class, array(\n 'attr' => array(\n 'placeholder' => 'Votre date de naissance',\n 'class' => 'form-control',\n ),\n ))\n\n // -> add('photo', FileType::class, array(\n // 'label' => 'Votre photo d\\'identité',\n // 'required' => false,\n // )\n // )\n\n -> add('adresse', TextType::class, array(\n 'required' => true,\n 'attr' => array(\n 'placeholder' => 'Adresse',\n 'class' => 'form-control',\n ),\n ))\n\n -> add('ville', TextType::class, array(\n 'required' => true,\n 'attr' => array(\n 'placeholder' => 'Ville',\n 'class' => 'form-control',\n ),\n ))\n\n -> add('code_postal', TextType::class, array(\n 'required' => true,\n 'attr' => array(\n 'placeholder' => 'Code postal',\n 'class' => 'form-control',\n ),\n ))\n\n -> add('pays', TextType::class, array(\n 'required' => true,\n 'attr' => array(\n 'placeholder' => 'Pays',\n 'class' => 'form-control',\n ),\n ))\n\n -> add('telephone', TextType::class, array(\n 'required' => true,\n 'attr' => array(\n 'placeholder' => 'Téléphone',\n 'class' => 'form-control',\n ),\n ))\n\n // JS - TODO la vérification du mimetype fonctionne, mais n'affiche pas d'erreur à l'utilisateur en cas de mauvais fichier envoyé :\n -> add('cv', FileType::class, array(\n 'constraints' => new Assert\\File(array(\n 'mimeTypes' => array('image/png','image/jpeg', 'image/gif'),\n 'maxSize' => '500k'\n )\n ),\n 'label' => 'Votre ancien CV (si vous en avez un)',\n 'attr' => array('class' => 'input-file form-control'),\n 'required' => false,\n )\n );\n }", "private function createEditForm(Aula $entity)\n {\n $form = $this->createForm(new AulaType(), $entity, array(\n 'action' => $this->generateUrl('aulas_aula_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr'=>array('class'=>'btn btn-default botonTabla')));\n $form->add('button', 'submit', array('label' => 'Volver a la lista','attr'=>array('formaction'=>'../../aula','formnovalidate'=>'formnovalidate','class'=>'btn btn-default botonTabla')));\n return $form;\n }", "public function ItemEditForm() {\n $form = parent::ItemEditForm();\n\n return $form;\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->add(\n array(\n 'type' => 'Zend\\Form\\Element\\Hidden',\n 'name' => 'id',\n )\n );\n }", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "public function __construct()\n {\n parent::__construct();\n $this->FormGenerator = new FormGenerator();\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n{\n // TODO: Implement buildForm() method.\n}", "protected function _construct()\r\n {\r\n parent::_construct();\r\n $this->setTemplate('placetopay/form.phtml');\r\n }", "public function __construct() {\n\t\t\t$this->field_type = 'select-edit-delete';\n\n\t\t\tparent::__construct();\n\t\t}", "public function edit(Form $form)\n {\n //\n }", "public function __construct( Form $form ) {\n\t\t$this->form = $form;\n\t\t$this->phpRenderer = $this->form->getRenderer();\n\t\t$this->templatesEngine = ( Application::get() )->plugin->get( Engine::class );\n\n\t\t$this->setupFieldsAttributes();\n\t}", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n $builder->add(\"debut\", \"text\",array('required'=>false));\n $builder->add(\"fin\", \"text\",array('required'=>false));\n $builder->add(\"ville\", \"entity\", array('class' =>'lostBook\\lostBookBundle\\Entity\\Ville','required'=>false\n ,'placeholder'=>'ALL'\n ,'empty_data'=> null)); \n $builder->add(\"nom\",\"text\",array('required'=>false));\n \n }", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "function __construct($form = null)\n\t{\n\t\t$lang = Factory::getLanguage();\n\t\t$lang->load(\"com_jevents\", JPATH_ADMINISTRATOR);\n\n\t\tparent::__construct($form);\n\t\t$this->data = array();\n\t\t$this->labeldata = array();\n\n\t}", "private function createEditForm(IntrestConfig $entity) {\n\t\t$form = $this->createForm(new IntrestConfigType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('member_intrestconfig_update', array('id' => $entity->getId())),\n\t\t\t'method' => 'PUT',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array('label' => 'Update'));\n\n\t\treturn $form;\n\t}", "private function createEditForm(ActionListe $entity)\n {\n $form = $this->createForm(new ActionListeType(), $entity, array(\n 'action' => $this->generateUrl('actionliste_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier'));\n\n return $form;\n }", "private function createEditForm(Compte $entity)\n {\n $form = $this->createForm(new CompteType(), $entity, array(\n 'action' => $this->generateUrl('compte_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }", "public function newAction()\n {\n //Get the entity manager.\n $em = $this->get('doctrine.orm.entity_manager'); \n \n //Get the list of categories as an array. \n $categories = $em->getRepository('JobeetBundle:JobeetCategory')\n ->getCategoriesAsOptions(); \n \n //Set up the form.\n $job = new JobeetJob();\n $form = JobForm::create($categories, $job, $this->get('validator')); \n \n //If a POST, process the form and persist it if valid.\n $request = $this->get('request');\n if ('POST' === $request->getMethod()) {\n //Register an event subscriber to index the job.\n $em->getEventManager()->addEventSubscriber(new LuceneListener($this->get('lucene_search')));\n \n $params = $request->request->get('job'); \n \n //Get the category object.\n $params['category'] = $em->getReference('JobeetBundle:JobeetCategory', $params['category']); \n \n //TODO:VALIDATE HERE\n \n //Get uploaded files and bind the form.\n $files = $request->files->get('job'); \n //unset($params['category_id']);\n $form->bind($params, $files);\n \n //If there is a logo uploaded, move it to the uploads dir.\n if($files['logo']['file']) { \n $name = uniqid().'-'.$files['logo']['file']->getOriginalName();\n $files['logo']['file']->move($this->container->getParameter('frontend.logos_dir')); \n $files['logo']['file']->rename($name); \n }\n else {\n $name = '';\n } \n \n //Set the logo filename and persist the entity.\n $job->setLogo($name); \n $em->persist($job); \n $em->flush();\n }\n \n return $this->render('FrontendBundle:Job:new.twig', array('form' => $form));\n }", "private function createEditForm(SkSpecies $entity) {\n $em = $this->getDoctrine()->getManager();\n\n // Get criterias from species\n $criteria_ids = $em->getRepository('SkaphandrusAppBundle:SkIdentificationCriteria')->getCriteriasFromSpecies($entity->getId());\n\n\n\n $form = $this->createForm(new SkIdentificationSpeciesType(), $entity, array(\n 'action' => $this->generateUrl('identification_species_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'criterias' => $criteria_ids\n ));\n return $form;\n }", "public function initialize($entity = null, $options = array())\n {\n\n //if (!isset($options['edit']) || !isset($options['new'])) {\n // $element = new Text(\"id\");\n // $this->add($element->setLabel(\"Id\"));\n //} else {\n $this->add(new Hidden(\"id\"));\n //}\n\n $make = new Select('make_id', Makes::find(), array(\n 'using' => array('id', 'name'),\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ));\n $make->setLabel('Make');\n $this->add($make);\n\n $user = new Select('user_id', Users::find(), array(\n 'using' => array('id', 'name'),\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ));\n $user->setLabel('User');\n $this->add($user);\n\n\n\n $model = new Text(\"model\");\n $model->setLabel(\"Model\");\n $model->setFilters(array('striptags', 'string'));\n $model->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Name is required'\n ))\n ));\n $this->add($model);\n\n $condition = new Text(\"condition\");\n $condition->setLabel(\"Condition\");\n $condition->setFilters(array('striptags', 'string'));\n $condition->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Condition is required'\n ))\n ));\n $this->add($condition);\n\n $colour = new Text(\"colour\");\n $colour->setLabel(\"Colour\");\n $colour->setFilters(array('striptags', 'string'));\n $colour->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Colour is required'\n ))\n ));\n $this->add($colour);\n\n $style = new Text(\"style\");\n $style->setLabel(\"Style\");\n $style->setFilters(array('striptags', 'string'));\n $style->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Style is required'\n ))\n ));\n $this->add($style);\n\n $image = new Text(\"image\");\n $image->setLabel(\"Image\");\n $image->setFilters(array('striptags', 'string'));\n $image->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Image is required'\n ))\n ));\n $this->add($image);\n\n $price = new Text(\"price\");\n $price->setLabel(\"Price\");\n $price->setFilters(array('float'));\n $price->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Price is required'\n ))\n ));\n $this->add($price);\n\n $year = new Text(\"year\");\n $year->setLabel(\"Year\");\n $year->setFilters(array('float'));\n $year->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Year is required'\n ))\n ));\n $this->add($year);\n }", "public function __construct()\n\t{\n\t $this->entity = new TiposContacto;\n\t}", "private function createEditForm(Missatges $entity) {\n $form = $this->createForm(new MissatgesType(), $entity, array(\n 'action' => $this->generateUrl('admin_missatges_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function init()\n {\n \t\n \t$this->setAttrib('enctype', 'multipart/form-data');\n \t \t\n \t$this->setName('FormularioOcorrencia');\n $id = new Zend_Form_Element_Hidden('id_ocorrencia');\n $id->addFilter('Int');\n \n \n \n\t\t$descricao = new Zend_Form_Element_Textarea('descricao');\n $descricao->setLabel('Descricao')\n ->setRequired(true);\n\t\t$descricao->removeDecorator('DtDdWrapper')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label')\n ->setAttrib('class', 'form-control')\n \t->setAttrib('rows', '5');\n \n\t\t\n\t\t\n\t\t\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setLabel(\"Adiconar\");\n $submit->setAttrib('id', 'submitbutton');\n $submit->removeDecorator('DtDdWrapper')\n ->setAttrib('class', 'btn btn-primary')\n ->removeDecorator('HtmlTag')\n ->removeDecorator('Label');\n \n \n \n \n $this->addElements(array($id,$descricao,$submit)); \n \n $this->setDecorators( array( array('ViewScript', array('viewScript' => 'formularioOcorrencia.phtml'))));\n }", "public function createEntityFormBuilder($entity, $view)\n {\n if (false === $this->isGranted('ROLE_SUPER_ADMIN')) {\n $user = $this->getUser();\n $ong = $user->getOng();\n if ($ong) {\n $tematicas = $ong->getTematicas();\n } else {\n $ongColaborator = $user->getOngColaborator();\n $tematicas = $ongColaborator->getTematicas();\n }\n } else {\n //o todas las tematicas\n $tematicas = $this->getDoctrine()->getRepository(Tematica::Class)->findAll();\n }\n //armo el string para el WHERE IN\n $tematicasIN = \"( \";\n foreach ($tematicas as $tematica) {\n $tematicasIN = $tematicasIN . $tematica->getId() . \", \";\n }\n //quito la ultima coma\n if (count($tematicas) != 0) {\n $tematicasIN = substr($tematicasIN, 0, -2);\n } else {\n $tematicasIN = $tematicasIN . \"0 \";\n }\n $tematicasIN = $tematicasIN . \")\";\n \n $formBuilder = parent::createEntityFormBuilder($entity, $view);\n \n $formBuilder->add('tematicas', EntityType::class, array(\n 'class' => Tematica::class,\n 'multiple' => true,\n 'expanded' => true,\n 'query_builder' => function (EntityRepository $er) use ($tematicasIN) {\n return $er->createQueryBuilder('t')\n ->where('t.id IN ' . $tematicasIN)\n ->orderBy('t.nombre', 'ASC');\n },\n ));\n\n return $formBuilder;\n }", "function eck_extras_entityreference_property_bundle_form($property, $vars) {\n $form = &$vars['form'];\n $eck_entity_type = $form['entity_type']['#value'];\n $eck_bundle = $form['bundle']['#value'];\n $config = $eck_bundle->config;\n\n $form['entityreference'] = array(\n '#title' => t('Entity reference'),\n '#type' => 'fieldset',\n );\n // This is \n // Each entityreference property get a separate settings\n foreach ($eck_entity_type->properties as $name => $property) {\n if ($property['behavior'] == 'entityreference') {\n $container = 'config_' . $name;\n $form['entityreference'][$container] = array(\n '#type' => 'fieldset',\n '#title' => t('@label', array('@label' => $property['label'])),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n '#tree' => TRUE,\n );\n $form['entityreference'][$container]['entity_type'] = array(\n '#type' => 'select',\n '#title' => t('Entity type'),\n '#options' => eck_extras_entity_type_options(),\n '#default_value' => isset($config[$name]['entity_type']) ? $config[$name]['entity_type'] : '',\n );\n }\n }\n\n return $vars;\n}", "private function createEditForm(Entreprise $entity)\n {\n $form = $this->createForm(new EntrepriseType(), $entity, array(\n 'action' => $this->generateUrl('ad_entreprise_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "protected function _construct()\n {\n $this->_init('bundle/option');\n }", "private function createEditForm(EntradaDetalles $entity)\n {\n $form = $this->createForm(new EntradaDetallesType(), $entity, array(\n 'action' => '',\n 'method' => 'PUT',\n 'mostrar_campo_articulo' => false,\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar', 'icon' => 'floppy-disk', 'attr' => array('class' => 'btn-primary')));\n\n return $form;\n }", "public function __construct(FormBuilder $builder)\n {\n $this->builder = $builder;\n }", "public function init()\n {\n parent::__construct(\"gallery\");\n\n $vocabulary = $this->getVocabulary();\n\n $this->add(array(\n 'name' => 'name',\n 'type' => 'text',\n 'options' => array(\n 'label' => $this->getTranslator()->translate($vocabulary[\"LABEL_GALLERY_NAME\"])\n ),\n 'attributes' => array(\n 'placeholder' => $this->getTranslator()->translate($vocabulary[\"PLACEHOLDER_GALLERY_NAME\"])\n ),\n\n ));\n\n $this->add(array(\n 'type' => 'text',\n 'name' => 'images',\n 'options' => array(\n 'object_manager' => $this->getEntityManager(),\n 'target_class' => 'Image\\Entity\\Image',\n 'label' => $this->getTranslator()->translate($vocabulary[\"LABEL_GALLERY_IMAGES\"])\n ),\n 'attributes' => array(\n 'class' => 'imageSelect'\n )\n ));\n\n $this->add(array(\n 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect',\n 'name' => 'parentGallery',\n 'options' => array(\n 'label' => $this->getTranslator()->translate($vocabulary[\"LABEL_GALLERY_PARENT_GALLERY\"]),\n 'object_manager' => $this->getEntityManager(),\n 'empty_option' => $this->getTranslator()->translate($vocabulary[\"EMPTY_OPTION\"]),\n 'target_class' => 'Image\\Entity\\Gallery',\n 'property' => 'name',\n 'disable_inarray_validator' => true\n ),\n ));\n }", "public function __construct($name = null)\n {\n parent::__construct('serviceform');\n\n $this->add(array(\n 'name' => 'id',\n 'type' => 'Hidden',\n ));\n $this->add(array(\n 'name' => 'name',\n 'type' => 'Text',\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'composition',\n 'type' => 'Text',\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n $this->add(array(\n 'name' => 'description',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'url',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'input',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'output',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'categories',\n 'type' => 'Text',\n\n 'attributes' => array(\n 'class' => 'form-control',\n ),\n ));\n\n $this->add(array(\n 'name' => 'submit',\n 'type' => 'Submit',\n 'attributes' => array(\n 'value' => 'Create',\n 'id' => 'submit',\n 'class' => 'btn btn-success',\n ),\n ));\n $this->setAttribute('class','form-horizontal');\n\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "public function createForm()\n {\n }", "public function init()\n {\n parent::init();\n $this->formModel = new GoodsForm();\n \n }", "public function init() {\n $this->add([\n 'name' => 'id',\n 'type' => 'hidden'\n ]);\n\n $this->add([\n 'name' => 'title',\n 'type' => 'text'\n ]);\n\n $this->add([\n 'name' => 'text',\n 'type' => 'textarea'\n ]);\n }", "public function __construct(FormInterface $form)\n {\n // Grab the Fields out of the form...\n $this->fields = $form->getData()['fields'];\n }", "public function createComponentEditForm(){\n $frm = $this->formFactory->create();\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n \n //query database for listing type\n $FE = $this->listings->isFE($listingID);\n $MS = $this->listings->isMultisig($listingID);\n \n //checkbox value rendering logic\n $checkVal = array();\n \n if ($MS){\n $checkVal[\"ms\"] = \"ms\";\n }\n \n if ($FE){\n $checkVal[\"fe\"] = \"fe\";\n }\n \n $this->lHelp->constructCheckboxList($frm)->setValue($checkVal);\n \n //discard option array\n unset($checkVal);\n\n $cnt = count ($this->postageOptions); \n $session = $this->hlp->sess(\"postage\");\n\n \n for ($i = 0; $i<$cnt; $i++){\n\n $frm->addText(\"postage\" . $i, \"Doprava\");\n $frm->addText(\"pprice\" . $i, \"Cena dopravy\");\n\n }\n \n //additional postage textboxes logic\n $counter = $session->counterEdit;\n $values = $session->values;\n \n if (!is_null($counter)){\n \n $frm->addGroup(\"Postage\");\n \n for ($i =0; $i<$counter; $i++){\n $frm->addText(\"postage\" .$i. \"X\", \"Doprava\"); \n $frm->addText(\"pprice\" .$i. \"X\", \"Cena\");\n }\n }\n \n $frm->addSubmit(\"submit\", \"Upravit\");\n $frm->addSubmit(\"add_postage\", \"Přidat dopravu\")->onClick[] = \n \n function() use($listingID) {\n \n //inline onlclick handler, that counts postage options\n $session = $this->hlp->sess(\"postage\");\n $counter = &$session->counterEdit;\n \n if ($counter <= self::MAX_POSTAGE_OPTIONS){\n $counter++;\n } else {\n $this->flashMessage(\"Dosáhli jste maxima poštovních možností.\");\n }\n \n $form = $this->getComponent(\"editForm\");\n $session->values = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:editListing\", $listingID);\n };\n \n $this->lHelp->fillForm($frm, $values); \n $frm->onSuccess[] = array($this, 'editSuccess');\n $frm->onValidate[] = array($this, 'editValidate');\n \n return $frm; \n }", "public function __construct($request) {\n $this->request = $request;\n\n // Cargar la configuracion del modulo (modules/moduloName/config.yaml)\n $this->form = new Form($this->entity);\n\n $this->values['request'] = $this->request;\n }", "protected function formView($entityName = null)\n {\n $view = parent::formView($entityName);\n $fields = $view->fields();\n \n // Set text 'content' as type 'editor' to get WYSIWYG\n $fields['content']['type'] = 'editor';\n \n // Set type and options for 'type' select\n $fields['type']['type'] = 'select';\n $fields['type']['options'] = array(\n '' => 'None',\n 'note' => 'Note',\n 'warning' => 'Warning',\n 'code' => 'Code'\n );\n \n $view->action(\"\")\n ->fields($fields);\n return $view;\n }", "public function edit(form $form)\n {\n //\n }", "public function __construct()\n {\n $tmpl = implode(\n DIRECTORY_SEPARATOR,\n array(ARCH_PATH, 'theme', 'form', 'form.php')\n );\n parent::__construct($tmpl);\n }", "public function __construct()\n\t{\n\t $this->entity = new EstatusDocumentos;\n\t}", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "private function createEditForm(Annonce $entity)\n {\n $form = $this->createForm(new AnnonceType(), $entity, array(\n 'action' => $this->generateUrl('annonce_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Marquer comme Vu'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Article);\n\n $form->text('title', '标题')->rules('required', ['标题不可为空']);\n $form->cropper('cover', '封面')->uniqueName();\n $form->multipleImage('covers', '多封面')->help('可选');\n $form->select('category_id', '类型')->options(ArticleCategory::all()->pluck('title', 'id'));\n $form->number('read_count', '阅读数');\n $form->number('share_count', '分享数');\n $form->number('like_count', '喜欢数');\n $form->switch('cover_state', '是否显示多图封面');\n $form->datetime('show_at', '显示时间')->default(now());\n $form->textarea('desc', '描述');\n $form->UEditor('detail', '文章详情');\n\n $form->saving(function (Form $form) {\n $form->detail = str_replace('crossorigin=\"anonymous\"', '', $form->detail);\n });\n return $form;\n }", "private function createEditForm(SesionVentaTratamiento $entity)\n {\n $form = $this->createForm(new SesionVentaTratamientoType(), $entity, array(\n 'action' => $this->generateUrl('admin_sesionventatratamiento_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "private function createEditForm(EnvaseIngreso $entity)\n {\n $form = $this->createForm(new EnvaseIngresoType(), $entity, array(\n 'action' => $this->generateUrl('envase_ingreso_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Guardar', 'attr' => array('class' => \"btn btn-success\")));\n\n return $form;\n }", "public function __construct() {\r\n\t\tif (isset($_GET['edit'])) {\r\n\r\n\t\t\t// se é edição\r\n\t\t\t$this->editCadastro();\r\n\r\n\t\t} elseif (isset($_GET['editCadastro'])) {\r\n\r\n\t\t\t// se é cadastro\r\n\t\t\t$this->insertForm('edit',$_GET['editCadastro']);\r\n\r\n\t\t} elseif (isset($_GET['add'])) {\r\n\r\n\t\t\t// se é cadastro\r\n\t\t\t$this->addCadastro();\r\n\t\t\t$this->formCadastro();\r\n\r\n\t\t} elseif (isset($_GET['addCadastro'])) {\r\n\r\n\t\t\t// se é cadastro\r\n\t\t\t$this->insertForm('add',0);\r\n\r\n\t\t} elseif (isset($_GET['del'])) {\r\n\r\n\t\t\t// se é delete\r\n\t\t\t$this->delCadastro($_GET['del']);\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// senao, é listagem\r\n\t\t\t$this->formCadastro();\r\n\t\t}\r\n\r\n\t}", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "private function createEditForm(SkIdentificationModule $entity)\n {\n $form = $this->createForm(new SkIdentificationModuleType(), $entity, array(\n 'action' => $this->generateUrl('identification_module_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "public function initialize()\n {\n if (isset($this->arguments['form'])) {\n $this->arguments = array_replace(\n $this->arguments,\n $this->arguments['form']->vars\n );\n }\n parent::initialize();\n }", "public function init()\r\n {\r\n \t\r\n \r\n \t \t\r\n \t$this->setName('FormularioCliente');\r\n $ID_CLIENTE = new Zend_Form_Element_Hidden('$ID_CLIENTE');\r\n $ID_CLIENTE->addFilter('Int');\r\n $ID_CLIENTE->removeDecorator('Label');\r\n \r\n \r\n \r\n $DT_ATUALIZACAO = new Zend_Form_Element_Text('DT_ATUALIZACAO');\r\n $DT_ATUALIZACAO->setLabel('DATA ÚLTIMA ATUALIZAÇÃO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n ->removeDecorator('DtDdWrapper')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control')\r\n ->setAttrib('placeholder', '');\r\n \r\n \r\n \r\n $NM_CLIENTE= new Zend_Form_Element_Text('NM_CLIENTE');\r\n $NM_CLIENTE->setLabel('NOME')\r\n ->setRequired(true)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter nome');\r\n \r\n $NR_CNPJ = new Zend_Form_Element_Text('NR_CNPJ');\r\n $NR_CNPJ->setLabel('CNPJ')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cnpj');\r\n \r\n \t$TX_OBSERVACAO = new Zend_Form_Element_Textarea('TX_OBSERVACAO');\r\n $TX_OBSERVACAO->setLabel('OBSERVA��O')\r\n \t\t\r\n\t\t\t\t\t ->removeDecorator('DtDdWrapper')\r\n \t\t\t ->removeDecorator('HtmlTag')\r\n \t\t\t\t ->removeDecorator('Label')\r\n \t\t\t ->setAttrib('class', 'form-control')\r\n \t\t\t\t ->setAttrib('rows', '5'); \r\n \t\r\n $NM_LOGRADOURO = new Zend_Form_Element_Text('NM_LOGRADOURO');\r\n $NM_LOGRADOURO->setLabel('LOGRADOURO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter logradouro');\r\n \r\n \r\n \t\r\n \t$NR_NUMERO = new Zend_Form_Element_Text('NR_NUMERO');\r\n $NR_NUMERO->setLabel('NÚMERO')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter número');\t\t\t \r\n \t\t\t\t \r\n \t$DS_COMPLEMENTO = new Zend_Form_Element_Text('DS_COMPLEMENTO');\r\n $DS_COMPLEMENTO->setLabel('LOGRADOURO')\r\n \r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter complemento');\t\t\r\n \r\n \t \r\n \t \r\n \t\t\t\t \r\n \t$NM_BAIRRO = new Zend_Form_Element_Text('NM_BAIRRO');\r\n $NM_BAIRRO->setLabel('BAIRRO')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter bairro');\r\n \t\r\n \t$NR_CEP= new Zend_Form_Element_Text('NR_CEP');\r\n $NR_CEP->setLabel('CEP')\r\n\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cep');\r\n \t\r\n \t\t\r\n \t$NM_CIDADE = new Zend_Form_Element_Text('NM_CIDADE');\r\n $NM_CIDADE->setLabel('CIDADE')\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t ->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t ->setAttrib('class', 'form-control')\r\n \t ->setAttrib('placeholder', 'Enter cidade');\r\n \t \r\n \t\r\n \t$estados = array(\"AC\"=>\"Acre\", \"AL\"=>\"Alagoas\", \"AM\"=>\"Amazonas\", \"AP\"=>\"Amapá\",\"BA\"=>\"Bahia\",\"CE\"=>\"Ceará\",\"DF\"=>\"Distrito Federal\",\"ES\"=>\"Espírito Santo\",\"GO\"=>\"Goiás\",\"MA\"=>\"Maranhão\",\"MT\"=>\"Mato Grosso\",\"MS\"=>\"Mato Grosso do Sul\",\"MG\"=>\"Minas Gerais\",\"PA\"=>\"Pará\",\"PB\"=>\"Paraíba\",\"PR\"=>\"Paraná\",\"PE\"=>\"Pernambuco\",\"PI\"=>\"Piauí\",\"RJ\"=>\"Rio de Janeiro\",\"RN\"=>\"Rio Grande do Norte\",\"RO\"=>\"Rondônia\",\"RS\"=>\"Rio Grande do Sul\",\"RR\"=>\"Roraima\",\"SC\"=>\"Santa Catarina\",\"SE\"=>\"Sergipe\",\"SP\"=>\"São Paulo\",\"TO\"=>\"Tocantins\");\r\n \t\r\n \t$NM_UF = new Zend_Form_Element_Select( 'NM_UF' );\r\n $NM_UF->setLabel('UF')\r\n ->addMultiOptions($estados)\r\n ->addFilter('StripTags')\r\n ->addFilter('StringTrim')\r\n ->addValidator('NotEmpty')\r\n \t->removeDecorator('DtDdWrapper')\r\n \t->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n \t->setAttrib('class', 'form-control select2') ->setAttrib('placeholder', 'Enter uf');;\t\t \r\n\r\n \t\t\t\t \r\n \t$FK_RAMO_ATIVIDADE= new Zend_Form_Element_Select('FK_RAMO_ATIVIDADE');\r\n $FK_RAMO_ATIVIDADE->setAttrib('class', 'form-control');\r\n \r\n $ramoAtividade= new Application_Model_DbTable_RamoAtividade();\r\n $FK_RAMO_ATIVIDADE->setLabel('RAMO ATIVIDADE')\r\n ->setRequired(true)\r\n\t\t->removeDecorator('DtDdWrapper')\r\n \t ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label')\r\n ->setAttrib('class', 'form-control select2');\r\n \r\n \r\n $listaRamoAtividade=$ramoAtividade->getRamoAtividadeCombo();\r\n $FK_RAMO_ATIVIDADE->setMultiOptions( $listaRamoAtividade );\t\t\t \r\n \t\r\n $submit = new Zend_Form_Element_Submit('submit');\r\n $submit->setLabel(\"Adiconar\");\r\n $submit->setAttrib('id', 'submitbutton');\r\n $submit->removeDecorator('DtDdWrapper')\r\n ->setAttrib('class', 'btn btn-primary button')\r\n ->removeDecorator('HtmlTag')\r\n ->removeDecorator('Label'); \r\n \r\n $this->addElements(array($ID_CLIENTE,$NM_CLIENTE,$NR_CNPJ,$TX_OBSERVACAO,$NM_LOGRADOURO,$NR_NUMERO,$DS_COMPLEMENTO,$NM_BAIRRO,$NR_CEP,$NM_CIDADE,$NM_UF,$DT_ATUALIZACAO,$FK_RAMO_ATIVIDADE,$submit)); \r\n $this->setDecorators( array( array('ViewScript', array('viewScript' => '/forms/formularioCliente.phtml')))); \r\n\t\r\n }", "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 }", "protected function form()\n {\n $form = new Form(new Enseignant());\n\n $form->text('matricule', __('Matricule'));\n $form->text('nom', __('Nom'));\n $form->text('postnom', __('Postnom'));\n $form->text('prenom', __('Prenom'));\n $form->text('sexe', __('Sexe'));\n $form->text('grade', __('Grade'));\n $form->text('fonction', __('Fonction'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new MethodPrice);\n\n $form->display('id');\n $form->select('entity','Сущность')->options(Pest::all()->pluck('name','id'));\n return $form;\n }", "private function createEditForm(Vluchten $entity)\n {\n $form = $this->createForm(new VluchtenType(), $entity, array(\n 'action' => $this->generateUrl('vluchten_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "protected function createComponentEditForm()\n\t{\n\t\t$form = new Form();\n\t\t$form->getElementPrototype()->class( 'ajax' );\n\n\t\tif ( $this->isFiltering() ) {\n\t\t\t$form[ 'filter' ] = new FilterForm( $this );\n\t\t\t$form->addSubmit( 'setFilter', 'Filter' );\n\t\t\t$form->addSubmit( 'resetFilter', 'Reset' );\n\t\t}\n\n\t\tif ( $this->isEditing() ) {\n\t\t\t$form[ 'edit' ] = new EditForm( $this );\n\t\t\t$form->addSubmit( 'saveRecord', 'Save' );\n\t\t\t$form->addSubmit( 'cancelRecord', 'Cancel' );\n\t\t}\n\n\t\t$form->onSubmit[] = [ $this, 'processForm' ];\n\n\t\treturn $form;\n\t}", "public function __construct() {\n \n parent::__construct();\n $this->load->library('form_builder');\n \n }", "public function __construct() {\n \n parent::__construct();\n $this->load->library('form_builder');\n \n }", "protected function createComponentEditStudyFieldForm(): Form {\n $studyFieldId = $this->getParameter('id');\n $studyField = isset($studyFieldId) ? $this->studyFieldModel->getById($studyFieldId) : null;\n\n $form = new Form;\n $form->addText('name', 'Název')\n ->setRequired('Prosím vyplňte název.')\n ->setHtmlAttribute('autocomplete', 'off')\n ->setDefaultValue($studyField ? $studyField['nazev'] : '')\n ->setMaxLength(50);\n\n $form->addSubmit('send', $studyField ? 'Upravit' : 'Přidat');\n\n $form->onSuccess[] = [$this, 'onEdit'];\n return $form;\n }", "function custom_entity_generate_form($form, $form_state, $name) {\n $form['entity_label'] = array(\n '#type' => 'value',\n '#value' => $name,\n );\n $form['kill_entities'] = array(\n '#type' => 'checkbox',\n '#title' => t('<strong>Delete all @name</strong> before generating new @name.', ['@name' => $name]),\n '#default_value' => FALSE,\n );\n\n $form['num_entities'] = array(\n '#type' => 'textfield',\n '#title' => t('How many @name would you like to generate?', ['@name' => $name]),\n '#default_value' => 50,\n '#size' => 10,\n );\n\n $form['title_length'] = array(\n '#type' => 'textfield',\n '#title' => t('Max word length of titles'),\n '#default_value' => 4,\n '#size' => 10,\n );\n\n unset($options);\n $options[LANGUAGE_NONE] = t('Language neutral');\n if (module_exists('locale')) {\n $options += locale_language_list();\n }\n $form['add_language'] = array(\n '#type' => 'select',\n '#title' => t('Set language on @name', ['@name' => $name]),\n '#multiple' => TRUE,\n '#disabled' => !module_exists('locale'),\n '#description' => t('Requires locale.module'),\n '#options' => $options,\n '#default_value' => array(LANGUAGE_NONE => LANGUAGE_NONE),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Generate'),\n );\n $form['#redirect'] = FALSE;\n\n return $form;\n}", "public function __construct(&$form_state) {\n $this->initializeStorage($form_state);\n $this->formState = &$form_state;\n $this->storage = &$this->formState['storage'][STORAGE_KEY];\n $this->collectionPid = $this->storage['collection_pid'];\n $this->collectionLabel = $this->storage['collection_label'];\n $this->contentModelPid = isset($this->storage['content_model_pid']) ? $this->storage['content_model_pid'] : NULL;\n $this->contentModelDsid = isset($this->storage['content_model_dsid']) ? $this->storage['content_model_dsid'] : NULL;\n $this->formName = isset($this->storage['form_name']) ? $this->storage['form_name'] : NULL;\n $this->page = &$this->storage['ingest_form_page'];\n }" ]
[ "0.70325786", "0.66830426", "0.6604624", "0.66041875", "0.64861786", "0.6474166", "0.64365596", "0.6365781", "0.6349567", "0.63389164", "0.630213", "0.62161237", "0.6187194", "0.617044", "0.6165809", "0.6147192", "0.6099529", "0.6069998", "0.604738", "0.60436785", "0.60327756", "0.60301584", "0.6021147", "0.6021147", "0.59972626", "0.59934616", "0.5980378", "0.59729457", "0.59721017", "0.59658706", "0.5956851", "0.5948348", "0.59325016", "0.5920206", "0.59033734", "0.5902498", "0.58965355", "0.5889217", "0.5882626", "0.5880662", "0.5854013", "0.5853462", "0.58514935", "0.58494645", "0.58477056", "0.5844429", "0.5828527", "0.5821527", "0.58133864", "0.5811143", "0.5801763", "0.58005816", "0.57953906", "0.57953256", "0.57950425", "0.579454", "0.5788982", "0.57863295", "0.5782455", "0.57785016", "0.57622826", "0.57619673", "0.5761889", "0.5756254", "0.57561743", "0.574899", "0.5740119", "0.5739956", "0.5737524", "0.5735343", "0.57319593", "0.57314384", "0.5729122", "0.57263136", "0.57248974", "0.5723327", "0.57217747", "0.571315", "0.5703874", "0.5697941", "0.5695835", "0.5695612", "0.5686119", "0.56857616", "0.5685613", "0.56814206", "0.567278", "0.5672714", "0.5663353", "0.5662186", "0.5659793", "0.56590563", "0.5657131", "0.5656918", "0.56568855", "0.56565267", "0.56565267", "0.5654641", "0.5654414", "0.56536674" ]
0.6571871
4
Form submission handler for mongo_node_bundle_edit_form().
function mongo_node_bundle_edit_form_submit($form, $form_state) { $label = $form_state['values']['label']; $machine_name = $form_state['values']['name']; $entity_type = $form_state['values']['bundle_type']['entity_type']; $old_bundle_type = $form_state['values']['bundle_type']['bundle']; $description = $form_state['values']['description']; $set = mongo_node_settings(); if ($machine_name != $old_bundle_type) { $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description); $set[$entity_type]['bundles'][$machine_name] = $set[$entity_type]['bundles'][$old_bundle_type]; unset($set[$entity_type]['bundles'][$old_bundle_type]); // Update existing mongo entities with new bundle. //_mongo_node_update_bundle($entity_type, $old_bundle_type, $machine_name); } else { $set[$entity_type]['bundles'][$machine_name]['label'] = $label; $set[$entity_type]['bundles'][$machine_name]['description'] = $description; } // Save settings. mongo_node_settings_save($set); return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function mongo_node_type_edit_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $old_entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_entity_type) {\n $set += mongo_node_type_default_settings($label, $machine_name);\n $set[$machine_name] = $set[$old_entity_type];\n unset($set[$old_entity_type]);\n\n // Update existing mongo entities with new entity type.\n _mongo_node_update_type($old_entity_type, $machine_name);\n }\n else {\n $set[$machine_name]['label'] = $label;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "function mongo_node_bundle_create_form_submit($form, $form_state) {\n $entity_type = $form_state['values']['entity_type'];\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n\n // @todo - redirect to bundle type page.\n mongo_node_settings_save($set);\n}", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "function mongo_node_page_edit($entity_type, $entity) {\n $title = $entity->title;\n drupal_set_title($title);\n\n $content = array();\n $content = drupal_get_form('mongo_node_form', $entity, $entity_type);\n\n return $content;\n}", "public function postEdit(NodeFormRequest $request)\n { \n // first we save the node model\n $node = $this->nodeModel->find($request->input('id'));\n \n // save the node model\n $node->type = $request->input('type');\n $node->title = $request->input('title');\n $node->save();\n \n $nodeType = $node->nodeType;\n if($nodeType) {\n // instantiate nodeType model\n $nodeType->nid = $request->input('id');\n $nodeType->body = $request->input('body');\n // save model\n $nodeType->save();\n } else{\n \n $this->nodeTypeModel->create($request->input());\n }\n // we will flash a notification\n Notification::success($request->input('type') . ' page has been updated');\n return redirect()->route('admin.home');\n }", "protected function processEditForm(sfWebRequest $request, sfForm $form) {\n $collectionId = sfToolkit::getArrayValueForPath($form->getName(), 'parent_node_id');\n $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));\n if ($form->isValid()) {\n $asset_group = $form->save();\n $PostParams = $request->getPostParameters();\n\n $AssetInformatoin = Doctrine_Query::Create()\n ->from('AssetGroup a')\n ->select('a.*,ft.*')\n ->leftJoin('a.FormatType ft WITH ft.id=a.format_id')\n ->addWhere(\"ft.id = '\" . $PostParams['asset_group']['format_id'] . \"'\")\n ->fetchArray();\n\n $characteristicsValue = Doctrine_Query::Create()\n ->from('CharacteristicsValues cv')\n ->select('cv.*,cc.*,cf.*')\n ->leftJoin('cv.CharacteristicsConstraints cc')\n ->leftJoin('cv.CharacteristicsFormat cf')\n ->addWhere(\"cv.format_id = '\" . $AssetInformatoin[0]['FormatType']['type'] . \"'\")\n ->fetchArray();\n\n #Move copies to the end to check the total score if score is greater then 90 and less then 12 , copies score wont apply \n $copiesValue = NULL;\n $copieExist = FALSE;\n foreach ($characteristicsValue as $key => $SingleValue) {\n if ($SingleValue['c_name'] == 'copies') {\n $copiesValue = $SingleValue;\n $copieExist = TRUE;\n unset($characteristicsValue[$key]);\n }\n }\n $characteristicsValue[] = $copiesValue;\n\n #Loading Socre Calculater Library \n $ScoreCalculator = new scoreCalculator();\n $score = $ScoreCalculator->callFormatCalculator($AssetInformatoin, $characteristicsValue);\n\n #If Score is Greater Then 90 And Less Then 12 , Deduct Copies Score From Total\n if ($copieExist && isset($score['score']) && ($score['score'] >= 90 || $score['score'] <= 12)) {\n if ($AssetInformatoin[0]['FormatType']['copies'] == 1) {\n $scoreTotal = (float) $score['score'] - (float) $copiesValue['c_score'];\n if ($scoreTotal > 100) {\n $scoreTotal = 100;\n }\n $score['scoreRounded'] = round((float) $scoreTotal / 20, 2);\n $score['score'] = (float) $scoreTotal;\n }\n }\n if ($score != FALSE) {\n $update = Doctrine_Query::create()\n ->update('FormatType ')\n ->set('asset_score', '?', $score['scoreRounded'])\n ->where('id = ?', $AssetInformatoin[0]['FormatType']['id'])\n ->execute();\n echo 'Done';\n } else {\n echo 'calculator not found for this format type';\n }\n\n return true;\n }\n return false;\n }", "public function EditNodeAction() {\n\n if ($_SESSION['usuarioPortal']['IdPerfil'] == '1') {\n\n switch ($this->request['METHOD']) {\n\n case 'GET':\n\n $tipo = $this->request['3'];\n $ambito = $this->request['2'];\n $nombre = $this->request['4'];\n $columna = $this->request['5'];\n $titulo = \"Variables {$this->request['3']} de '{$columna}'\";\n\n $variables = new Variables($ambito, $tipo, $nombre);\n $variablesColumna = $variables->getColumn($columna);\n unset($variables);\n\n $archivoConfig = new Form($nombre);\n $columnasConfig = $archivoConfig->getNode('columns');\n unset($archivoConfig);\n $datos = $this->ponAtributos($variablesColumna, $columnasConfig[$columna]);\n\n $this->values['titulo'] = $titulo;\n $this->values['tipo'] = $tipo;\n $this->values['ambito'] = $ambito;\n $this->values['nombre'] = $nombre;\n $this->values['columna'] = $columna;\n $this->values['d'] = $datos;\n\n $template = $this->entity . '/formPlantillaVariables.html.twig';\n break;\n\n case 'POST':\n\n $tipo = $this->request['tipo'];\n $ambito = $this->request['ambito'];\n $nombre = $this->request['nombre'];\n $columna = $this->request['columna'];\n $titulo = \"Variables {$tipo} de '{$columna}'\";\n\n $variables = new Variables($ambito, $tipo, $nombre);\n $variables->setColumn($columna, $this->request['d']);\n $variables->save();\n\n $this->values['titulo'] = $titulo;\n $this->values['tipo'] = $tipo;\n $this->values['ambito'] = $ambito;\n $this->values['nombre'] = $nombre;\n $this->values['columna'] = $columna;\n $this->values['errores'] = $variables->getErrores();\n\n $archivoConfig = new Form($nombre);\n $columnasConfig = $archivoConfig->getNode('columns');\n unset($archivoConfig);\n $datos = $this->ponAtributos($variables->getColumn($columna), $columnasConfig[$columna]);\n $this->values['d'] = $datos;\n unset($variables);\n\n $template = $this->entity . '/formPlantillaVariables.html.twig';\n break;\n }\n } else\n $template = '_global/forbiden.html.twig';\n\n return array('template' => $template, 'values' => $this->values);\n }", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function doEdit()\n {\n $dt = new lmbDate();\n $this->dt_up = $dt->getStamp();\n\n $node_id = $this->request->getInteger('id');\n $this->node = $node_id;\n $category['node_id'] = $node_id;\n $category['title'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_TITLE);\n $category['description'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_DESCR);\n $category['identifier'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_URI);\n\n $this->dt_cr = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $category['date_create'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $category['date_update'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_UPDATE_DATE);\n $category['is_branch'] = TreeItem::getIsBranchByNodeId($node_id);\n\n $this->setFormDatasource($category, 'object_form');\n\n if($this->request->hasPost())\n {\n $this->_validateAndSave(false);\n //$this->_onAfterSave();\n }\n }", "function doEdit()\n {\n $dt = new lmbDate();\n $this->dt_up = $dt->getStamp();\n\n $node_id = $this->request->getInteger('id');\n $node['node_id'] = $node_id;\n $node['title'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_TITLE);\n $node['description'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_DESCR);\n $node['identifier'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_URI);\n $node['price'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_PRICE);\n\n $this->dt_cr = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $node['date_create'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $node['date_update'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_UPDATE_DATE);\n $node['is_branch'] = TreeItem::getIsBranchByNodeId($node_id);\n\n $this->setFormDatasource($node, 'object_form');\n\n $criteria = new lmbSQLFieldCriteria('is_branch', 1);\n $criteria->addAnd('attr_id = '. TreeItem::ID_TITLE );\n $this->items = lmbActiveRecord :: find('TreeItem', $criteria);\n\n\n if($this->request->hasPost())\n {\n $this->_validateAndSave(false);\n //$this->_onAfterSave();\n }\n }", "function elife_article_markup_doi_edit_form_submit(&$form, &$form_state) {\n // Nothing.\n}", "function node_form(&$form_state, $node) {\n global $user;\n\n if (isset($form_state['node'])) {\n $node = $form_state['node'] + (array)$node;\n }\n if (isset($form_state['node_preview'])) {\n $form['#prefix'] = $form_state['node_preview'];\n }\n $node = (object)$node;\n foreach (array('body', 'title', 'format') as $key) {\n if (!isset($node->$key)) {\n $node->$key = NULL;\n }\n }\n if (!isset($form_state['node_preview'])) {\n node_object_prepare($node);\n }\n else {\n $node->build_mode = NODE_BUILD_PREVIEW;\n }\n\n // Set the id of the top-level form tag\n $form['#id'] = 'node-form';\n\n // Basic node information.\n // These elements are just values so they are not even sent to the client.\n foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => isset($node->$key) ? $node->$key : NULL,\n );\n }\n\n // Changed must be sent to the client, for later overwrite error checking.\n $form['changed'] = array(\n '#type' => 'hidden',\n '#default_value' => isset($node->changed) ? $node->changed : NULL,\n );\n // Get the node-specific bits.\n if ($extra = node_invoke($node, 'form', $form_state)) {\n $form = array_merge_recursive($form, $extra);\n }\n if (!isset($form['title']['#weight'])) {\n $form['title']['#weight'] = -5;\n }\n\n $form['#node'] = $node;\n\n // Add a log field if the \"Create new revision\" option is checked, or if the\n // current user has the ability to check that option.\n if (!empty($node->revision) || user_access('administer nodes')) {\n $form['revision_information'] = array(\n '#type' => 'fieldset',\n '#title' => t('Revision information'),\n '#collapsible' => TRUE,\n // Collapsed by default when \"Create new revision\" is unchecked\n '#collapsed' => !$node->revision,\n '#weight' => 20,\n );\n $form['revision_information']['revision'] = array(\n '#access' => user_access('administer nodes'),\n '#type' => 'checkbox',\n '#title' => t('Create new revision'),\n '#default_value' => $node->revision,\n );\n $form['revision_information']['log'] = array(\n '#type' => 'textarea',\n '#title' => t('Log message'),\n '#default_value' => (isset($node->log) ? $node->log : ''),\n '#rows' => 2,\n '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),\n );\n }\n\n // Node author information for administrators\n $form['author'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Authoring information'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 20,\n );\n $form['author']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored by'),\n '#maxlength' => 60,\n '#autocomplete_path' => 'user/autocomplete',\n '#default_value' => $node->name ? $node->name : '',\n '#weight' => -1,\n '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', t('Anonymous')))),\n );\n $form['author']['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored on'),\n '#maxlength' => 25,\n '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? $node->date : format_date($node->created, 'custom', 'Y-m-d H:i:s O'))),\n );\n\n if (isset($node->date)) {\n $form['author']['date']['#default_value'] = $node->date;\n }\n\n // Node options for administrators\n $form['options'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Publishing options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 25,\n );\n $form['options']['status'] = array(\n '#type' => 'checkbox',\n '#title' => t('Published'),\n '#default_value' => $node->status,\n );\n $form['options']['promote'] = array(\n '#type' => 'checkbox',\n '#title' => t('Promoted to front page'),\n '#default_value' => $node->promote,\n );\n $form['options']['sticky'] = array(\n '#type' => 'checkbox',\n '#title' => t('Sticky at top of lists'),\n '#default_value' => $node->sticky,\n );\n\n // These values are used when the user has no administrator access.\n foreach (array('uid', 'created') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => $node->$key,\n );\n }\n\n // Add the buttons.\n $form['buttons'] = array();\n $form['buttons']['submit'] = array(\n '#type' => 'submit',\n '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])),\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('node_form_submit'),\n );\n $form['buttons']['preview'] = array(\n '#type' => 'submit',\n '#value' => t('Preview'),\n '#weight' => 10,\n '#submit' => array('node_form_build_preview'),\n );\n if (!empty($node->nid) && node_access('delete', $node)) {\n $form['buttons']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 15,\n '#submit' => array('node_form_delete_submit'),\n );\n }\n $form['#validate'][] = 'node_form_validate';\n $form['#theme'] = array($node->type .'_node_form', 'node_form');\n return $form;\n}", "function mongo_node_operation_submit($form, &$form_state) {\n $operations = mongo_node_operations();\n $operation = $operations[$form_state['values']['operation']];\n\n $entities = array_filter($form_state['values']['entities']);\n $entity_type = $form_state['values']['entity_type'];\n if ($function = $operation['callback']) {\n // Add in callback arguments if present.\n if (isset($operation['callback arguments'])) {\n $args = array(\n $entity_type,\n $entities,\n $operation['callback arguments'],\n );\n }\n else {\n $args = array($entity_type, $entities);\n }\n call_user_func_array($function, $args);\n cache_clear_all();\n }\n}", "function mongo_node_admin_content($form, $form_state, $entity_type) {\n $settings = mongo_node_settings();\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n );\n\n $filters = mongo_node_filters($entity_type);\n $applied_filters = isset($_SESSION[$entity_type . '_filters']) ? $_SESSION[$entity_type . '_filters'] : array();\n\n foreach ($filters as $f_type_name => $f_type) {\n $form['filters'][$f_type_name] = array('#type' => 'select', '#title' => $f_type_name);\n foreach ($f_type as $f_name => $f_val) {\n $form['filters'][$f_type_name]['#options'][$f_name] = $f_val['label'];\n }\n }\n\n $items = array();\n $remaining_filters = array();\n foreach ($applied_filters as $app_filter) {\n $items[] = t('where %f_name is %f_val', array('%f_name' => $app_filter['#type'], '%f_val' => $app_filter['#value']));\n $conditions = $filters[$app_filter['#type']][$app_filter['#value']]['filters'];\n foreach ($conditions as $condition) {\n $remaining_filters[$condition['#type']]['#callback'] = $condition['#callback'];\n $remaining_filters[$condition['#type']]['#value'][] = $condition['#value'];\n }\n }\n\n $form['filters']['#description'] = theme('item_list', array('items' => $items));\n\n if (empty($applied_filters)) {\n $form['filters']['filter'] = array(\n '#type' => 'submit',\n '#value' => 'Filter',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n else {\n $form['filters']['refine'] = array(\n '#type' => 'submit',\n '#value' => 'Refine',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['undo'] = array(\n '#type' => 'submit',\n '#value' => 'Undo',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => 'Reset',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Update options'),\n );\n\n $operations = mongo_node_operations();\n foreach ($operations as $op => $op_set) {\n $options[$op] = $op_set['label'];\n }\n $form['options']['operation'] = array(\n '#type' => 'select',\n '#options' => $options,\n );\n\n $form['options']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Update'),\n '#validate' => array('mongo_node_operation_validate'),\n '#submit' => array('mongo_node_operation_submit'),\n );\n\n $query = new EntityFieldQuery();\n\n $query->entityCondition('entity_type', $entity_type)\n ->propertyOrderBy('created', 'DESC')\n ->pager(10);\n\n // Actually apply filters.\n foreach ($remaining_filters as $r_name => $r_values) {\n $query->{$r_values['#callback']}($r_name, $r_values['#value'], 'IN');\n }\n\n $result = $query->execute();\n\n $languages = language_list();\n $destination = drupal_get_destination();\n $header = array(\n 'title' => array('data' => t('Title'), 'field' => 'title'),\n 'type' => t('Type'),\n 'author' => t('Author'),\n 'status' => t('Status'),\n 'changed' => t('Updated'),\n 'language' => t('Language'),\n 'operations' => t('Operations'),\n );\n $options = array();\n\n if (isset($result[$entity_type])) {\n $ids = array_keys($result[$entity_type]);\n $entities = entity_load($entity_type, $ids);\n\n foreach ($result[$entity_type] as $id => $efq_entity) {\n $entity = entity_load($entity_type, array($id));\n $entity = reset($entity);\n\n $entity_uri = entity_uri($entity_type, $entity);\n\n $options[$id] = array(\n 'title' => array(\n 'data' => array(\n '#type' => 'link',\n '#title' => $entity->title,\n '#href' => $entity_uri['path'],\n ),\n ),\n 'type' => check_plain($settings[$entity_type]['bundles'][$entity->type]['label']),\n 'author' => theme('username', array('account' => $entity)),\n 'status' => $entity->status ? t('published') : t('not published'),\n 'changed' => format_date($entity->changed, 'short'),\n 'language' => ($entity->language == LANGUAGE_NONE) ? t('Language neutral') : $languages[$entity->language]->name,\n );\n\n $operations = array();\n $operations[] = l(t('edit'), $entity_uri['path'] . '/edit', array('query' => $destination));\n $operations[] = l(t('delete'), $entity_uri['path'] . '/delete', array('query' => $destination));\n\n $options[$id]['operations'] = theme('item_list', array('items' => $operations, 'attributes' => array('class' => 'inline')));\n }\n }\n\n $form['entities'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n '#empty' => t('No content available'),\n );\n\n $form['pager'] = array(\n '#theme' => 'pager',\n );\n\n return $form;\n}", "function ctools_block_content_type_edit_form_submit(&$form, &$form_state) {\n if (empty($form_state['subtype']) && isset($form_state['pane'])) {\n $form_state['pane']->subtype = $form_state['conf']['module'] . '-' . $form_state['conf']['delta'];\n unset($form_state['conf']['module']);\n unset($form_state['conf']['delta']);\n }\n}", "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n drupal_set_message(t('@label %title deleted',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title)\n )\n );\n }\n\n $form_state['redirect'] = '<front>';\n}", "public function updateSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id);\n $node->setSticky($form_state->getValue('sticky'));\n $node->setPublished($form_state->getValue('status'));\n $node->save();\n }", "public function editAction() {\n if($this->_getParam('id',false)) {\n $form = new ContentForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $updateData = $form->getValues();\n $where = array();\n $where[] = $this->_content->getAdapter()\n ->quoteInto('id = ?', $this->_getParam('id'));\n $oldData = $this->_content->fetchRow($this->_content\n ->select()->where('id= ?' , \n (int)$this->_getParam('id')))->toArray();\n $this->_helper->audit($updateData, $oldData, 'ContentAudit', \n $this->_getParam('id'), $this->_getParam('id'));\n $this->_content->update($updateData, $where);\n $this->_helper->solrUpdater->update('beocontent', \n $this->_getParam('id'), 'content'); \n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title') \n . '</em> successfully. It is now available for use.');\n $this->getCache()->clean(Zend_Cache::CLEANING_MODE_ALL);\n $this->_redirect('admin/content/');\n } else {\n $form->populate($this->_request->getPost());\n }\n } else {\n // find id is expected in $params['id']\n $id = (int)$this->_request->getParam('id', 0);\n if ($id > 0) {\n $content = $this->_content->fetchRow('id=' . (int)$id)->toArray();\n if($content) {\n $form->populate($content);\n } else {\n throw new Pas_Exception_Param($this->_nothingFound);\n }\n }\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "function pdfbulletin_edit_form(&$node, $form_state) {\n $type = node_get_types('type', $node);\n $pdfbulletin = $node->pdfbulletin;\n $form['pdfbulletin'] = array(\n '#type' => 'value',\n '#value' => $pdfbulletin,\n );\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => check_plain($type->title_label),\n '#required' => TRUE,\n '#default_value' => $node->title,\n '#weight' => -5,\n );\n\n $form['header_format'] = array(\n '#tree' => FALSE,\n );\n $form['header_format']['header'] = array(\n '#title' => t('Header'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->header,\n );\n $form['header_format']['format'] = filter_form($pdfbulletin->header_format, NULL, array('header_format'));\n\n $form['footer_format'] = array(\n '#tree' => FALSE,\n );\n $form['footer_format']['footer'] = array(\n '#title' => t('Footer'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->footer,\n );\n $form['footer_format']['format'] = filter_form($pdfbulletin->footer_format, NULL, array('footer_format'));\n\n $form['email_format'] = array(\n '#tree' => FALSE, \n );\n $form['email_format']['email'] = array(\n '#title' => t('Text for e-mail'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->email,\n );\n $form['email_format']['format'] = filter_form($pdfbulletin->email_format, NULL, array('email_format'));\n\n $form['empty_text_format'] = array(\n '#tree' => FALSE,\n );\n $form['empty_text_format']['empty_text'] = array(\n '#title' => t('Empty text'),\n '#type' => 'textarea',\n '#default_value' => $pdfbulletin->empty_text,\n '#description' => t('Text for e-mail if it is sent with an empty bulletin.'),\n );\n $form['empty_text_format']['format'] = filter_form($pdfbulletin->empty_text_format, NULL, array('empty_text_format'));\n\n $paper_sizes = pdfbulletin_util_settings('paper_size');\n $form['paper_size'] = array(\n '#title' => t('Paper size'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->paper_size,\n );\n foreach ($paper_sizes as $key => $value) {\n $form['paper_size']['#options'][$key] = t($key);\n }\n\n $css = pdfbulletin_css();\n $form['css_file'] = array(\n '#title' => t('Style'),\n '#type' => 'select',\n '#default_value' => $pdfbulletin->css_file,\n );\n foreach ($css as $key => $value) {\n $form['css_file']['#options'][$key] = check_plain($value);\n }\n\n\n return $form;\n}", "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function update() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->updateElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function cps_changeset_edit_form_submit($form, &$form_state) {\n $entity = $form_state['entity'];\n $entity->name = $form_state['values']['name'];\n $entity->description = $form_state['values']['description'];\n $entity->lock_in_select = $form_state['values']['lock_in_select'];\n\n if (!empty($entity->is_new)) {\n // Automatically move us to the new changeset context.\n cps_set_current_changeset($entity->changeset_id);\n\n // If there is a destination, we have to remove the changeset ID from it.\n if (!empty($_GET['destination'])) {\n // We used drupal_get_destination() before because it may not have been\n // calculated; to directly modify it we will then need to get the\n // (now cached) static.\n $_GET['destination'] = preg_replace(\"/changeset_id=[^&]+/\", 'changeset_id=' . $entity->changeset_id, $_GET['destination']);\n }\n }\n}", "function thumbwhere_contentcollection_edit_form($form, &$form_state, $thumbwhere_contentcollection) {\n\n // Add the default field elements.\n $form['fk_actor'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollection fk_actor'),\n '#default_value' => isset($thumbwhere_contentcollection->fk_actor) ? $thumbwhere_contentcollection->fk_actor : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_actor',\n );\n // Add the default field elements.\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollection title'),\n '#default_value' => isset($thumbwhere_contentcollection->title) ? $thumbwhere_contentcollection->title : 'Hello',\n // '#maxlength' => 255,\n // '#required' => TRUE,\n '#weight' => -5,\n );\n\n\n\n $form['data']['#tree'] = TRUE;\n\n /*\n $form['data']['sample_data'] = array(\n '#type' => 'checkbox',\n '#title' => t('An interesting thumbwhere_contentcollection switch'),\n '#default_value' => isset($thumbwhere_contentcollection->data['sample_data']) ? $thumbwhere_contentcollection->data['sample_data'] : 1,\n );\n */\n\n\n // Add the field related form elements.\n $form_state['thumbwhere_contentcollection'] = $thumbwhere_contentcollection;\n field_attach_form('thumbwhere_contentcollection', $thumbwhere_contentcollection, $form, $form_state);\n\n $form['actions'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('form-actions')),\n '#weight' => 400,\n );\n\n // We add the form's #submit array to this button along with the actual submit\n // handler to preserve any submit handlers added by a form callback_wrapper.\n $submit = array();\n\n if (!empty($form['#submit'])) {\n $submit += $form['#submit'];\n }\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save thumbwhere_contentcollection'),\n '#submit' => $submit + array('thumbwhere_contentcollection_edit_form_submit'),\n );\n\n // Do we show the delete button?\n if (!empty($thumbwhere_contentcollection->pk_contentcollection)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete thumbwhere_contentcollection'),\n '#suffix' => l(t('Cancel'), 'admin/thumbwhere/thumbwhere_contentcollections'),\n '#submit' => $submit + array('thumbwhere_contentcollection_form_submit_delete'),\n '#weight' => 45,\n );\n }\n\n // We append the validate handler to #validate in case a form callback_wrapper\n // is used to add validate handlers earlier.\n $form['#validate'][] = 'thumbwhere_contentcollection_edit_form_validate';\n return $form;\n}", "public function processAction() {\n\t\t$form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$request = $this->getRequest ();\n\t\t$attachment = $form->getElement ( 'attachments' );\n\t\t\n\t\t// Check if we have a POST request\n\t\tif (! $request->isPost ()) {\n\t\t\treturn $this->_helper->redirector ( 'list', 'invoices', 'admin' );\n\t\t}\n\t\t\n\t\t// Create the buttons in the edit form\r\n\t\t$this->view->buttons = array(\r\n\t\t\t\tarray(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\tarray(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\tarray(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)),\r\n\t\t);\n\t\t\n\t\tif ($form->isValid ( $request->getPost () )) {\n\t\t\t// Get the id \n\t\t\t$id = $this->getRequest ()->getParam ( 'invoice_id' );\n\t\t\t\n\t\t\t// Set the new values\n\t\t\tif (is_numeric ( $id )) {\n\t\t\t\t$this->invoices = Doctrine::getTable ( 'Invoices' )->find ( $id );\n\t\t\t}\n\t\t\t\n\t\t\t// Get the values posted\n\t\t\t$params = $form->getValues ();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t$this->invoices->invoice_date = Shineisp_Commons_Utilities::formatDateIn ( $params ['invoice_date'] );\n\t\t\t\t$this->invoices->number = $params ['number'];\n\t\t\t\t$this->invoices->order_id = $params ['order_id'];\n\t\t\t\t$this->invoices->note = $params ['note'];\n\t\t\t\t\n\t\t\t\t// Save the data\n\t\t\t\t$this->invoices->save ();\n\t\t\t\t$id = is_numeric ( $id ) ? $id : $this->invoices->getIncremented ();\n\n\t\t\t\t// Update formatted_number\n\t\t\t\tif ( $this->invoices->formatted_number != $params ['formatted_number'] || empty($this->invoices->formatted_number) ) {\n\t\t\t\t\t$this->invoices->formatted_number = !empty($params ['formatted_number']) ? $params ['formatted_number'] : Invoices::generateNumber($id);\t\n\t\t\t\t\t$this->invoices->save();\n\t\t\t\t}\n\t\t\t\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$this->_helper->redirector ( 'list', 'invoices', 'admin', array ('mex' => $this->translator->translate ( 'The invoice cannot be created. Please check all your input data and try again.' ), 'status' => 'danger' ) );\n\t\t\t}\n\t\t\t\n\t\t\t$this->_helper->redirector ( 'edit', 'invoices', 'admin', array ('id' => $id, 'mex' => $this->translator->translate ( 'The task requested has been executed successfully.' ), 'status' => 'success' ) );\n\t\t} else {\n\t\t\t$this->view->form = $form;\n\t\t\t$this->view->title = $this->translator->translate(\"Invoice Edit\");\n\t\t\t$this->view->description = $this->translator->translate(\"Here you can edit the selected invoice.\");\n\t\t\treturn $this->render ( 'applicantform' );\n\t\t}\n\t}", "function image_gallery_admin_edit($tid = NULL) {\r\n if ((isset($_POST['op']) && $_POST['op'] == t('Delete')) || isset($_POST['confirm'])) {\r\n return drupal_get_form('image_gallery_confirm_delete_form', $tid);\r\n }\r\n\r\n if (is_numeric($tid)) {\r\n $edit = (array) taxonomy_get_term($tid);\r\n }\r\n else {\r\n $edit = array(\r\n 'name' => '',\r\n 'description' => '',\r\n 'vid' => _image_gallery_get_vid(),\r\n 'tid' => NULL,\r\n 'weight' => 0,\r\n );\r\n }\r\n return drupal_get_form('image_gallery_admin_form', $edit);\r\n}", "function mongo_node_type_create_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n\n $set = mongo_node_settings();\n $set += mongo_node_type_default_settings($label, $machine_name);\n\n // @todo - redirect to entity type page\n mongo_node_settings_save($set);\n}", "function saveSubmit($args, $request) {\n\t\t$step = (int) array_shift($args);\n\t\t$articleId = (int) $request->getUserVar('articleId');\n\t\t$journal =& $request->getJournal();\n\n\t\t$this->validate($request, $articleId, $step);\n\t\t$this->setupTemplate($request, true);\n\t\t$article =& $this->article;\n\n\t\t$formClass = \"AuthorSubmitStep{$step}Form\";\n\t\timport(\"classes.author.form.submit.$formClass\");\n\n\t\t$submitForm = new $formClass($article, $journal, $request);\n\t\t$submitForm->readInputData();\n\n\t\tif (!HookRegistry::call('SubmitHandler::saveSubmit', array($step, &$article, &$submitForm))) {\n\n\t\t\t// Check for any special cases before trying to save\n\t\t\tswitch ($step) {\n\t\t\t\tcase 2:\n\t\t\t\t\tif ($request->getUserVar('uploadSubmissionFile')) {\n\t\t\t\t\t\t$submitForm->uploadSubmissionFile('submissionFile');\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tif ($request->getUserVar('addAuthor')) {\n\t\t\t\t\t\t// Add a sponsor\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\t\t\t\t\t\tarray_push($authors, array());\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\n\t\t\t\t\t} else if (($delAuthor = $request->getUserVar('delAuthor')) && count($delAuthor) == 1) {\n\t\t\t\t\t\t// Delete an author\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\tlist($delAuthor) = array_keys($delAuthor);\n\t\t\t\t\t\t$delAuthor = (int) $delAuthor;\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\t\t\t\t\t\tif (isset($authors[$delAuthor]['authorId']) && !empty($authors[$delAuthor]['authorId'])) {\n\t\t\t\t\t\t\t$deletedAuthors = explode(':', $submitForm->getData('deletedAuthors'));\n\t\t\t\t\t\t\tarray_push($deletedAuthors, $authors[$delAuthor]['authorId']);\n\t\t\t\t\t\t\t$submitForm->setData('deletedAuthors', join(':', $deletedAuthors));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_splice($authors, $delAuthor, 1);\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\n\t\t\t\t\t\tif ($submitForm->getData('primaryContact') == $delAuthor) {\n\t\t\t\t\t\t\t$submitForm->setData('primaryContact', 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ($request->getUserVar('moveAuthor')) {\n\t\t\t\t\t\t// Move an author up/down\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\t$moveAuthorDir = $request->getUserVar('moveAuthorDir');\n\t\t\t\t\t\t$moveAuthorDir = $moveAuthorDir == 'u' ? 'u' : 'd';\n\t\t\t\t\t\t$moveAuthorIndex = (int) $request->getUserVar('moveAuthorIndex');\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\n\t\t\t\t\t\tif (!(($moveAuthorDir == 'u' && $moveAuthorIndex <= 0) || ($moveAuthorDir == 'd' && $moveAuthorIndex >= count($authors) - 1))) {\n\t\t\t\t\t\t\t$tmpAuthor = $authors[$moveAuthorIndex];\n\t\t\t\t\t\t\t$primaryContact = $submitForm->getData('primaryContact');\n\t\t\t\t\t\t\tif ($moveAuthorDir == 'u') {\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex] = $authors[$moveAuthorIndex - 1];\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex - 1] = $tmpAuthor;\n\t\t\t\t\t\t\t\tif ($primaryContact == $moveAuthorIndex) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex - 1);\n\t\t\t\t\t\t\t\t} else if ($primaryContact == ($moveAuthorIndex - 1)) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex);\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$authors[$moveAuthorIndex] = $authors[$moveAuthorIndex + 1];\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex + 1] = $tmpAuthor;\n\t\t\t\t\t\t\t\tif ($primaryContact == $moveAuthorIndex) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex + 1);\n\t\t\t\t\t\t\t\t} else if ($primaryContact == ($moveAuthorIndex + 1)) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex);\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$submitForm->setData('authors', $authors);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\tif ($request->getUserVar('submitUploadSuppFile')) {\n\t\t\t\t\t\t$this->submitUploadSuppFile(array(), $request);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!isset($editData) && $submitForm->validate()) {\n\t\t\t\t$articleId = $submitForm->execute();\n\t\t\t\tHookRegistry::call('Author::SubmitHandler::saveSubmit', array(&$step, &$article, &$submitForm));\n\n\t\t\t\tif ($step == 5) {\n\t\t\t\t\t// Send a notification to associated users\n\t\t\t\t\timport('classes.notification.NotificationManager');\n\t\t\t\t\t$notificationManager = new NotificationManager();\n\t\t\t\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\n\t\t\t\t\t$article =& $articleDao->getArticle($articleId);\n\t\t\t\t\t$roleDao =& DAORegistry::getDAO('RoleDAO');\n\t\t\t\t\t$notificationUsers = array();\n\t\t\t\t\t$editors = $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getId());\n\t\t\t\t\twhile ($editor =& $editors->next()) {\n\t\t\t\t\t\t$notificationManager->createNotification(\n\t\t\t\t\t\t\t$request, $editor->getId(), NOTIFICATION_TYPE_ARTICLE_SUBMITTED,\n\t\t\t\t\t\t\t$article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId()\n\t\t\t\t\t\t);\n\t\t\t\t\t\tunset($editor);\n\t\t\t\t\t}\n\n\t\t\t\t\t$journal =& $request->getJournal();\n\t\t\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t\t\t$templateMgr->assign_by_ref('journal', $journal);\n\t\t\t\t\t// If this is an editor and there is a\n\t\t\t\t\t// submission file, article can be expedited.\n\t\t\t\t\tif (Validation::isEditor($journal->getId()) && $article->getSubmissionFileId()) {\n\t\t\t\t\t\t$templateMgr->assign('canExpedite', true);\n\t\t\t\t\t}\n\t\t\t\t\t$templateMgr->assign('articleId', $articleId);\n\t\t\t\t\t$templateMgr->assign('helpTopicId','submission.index');\n\t\t\t\t\t$templateMgr->display('author/submit/complete.tpl');\n\n\t\t\t\t} else {\n\t\t\t\t\t$request->redirect(null, null, 'submit', $step+1, array('articleId' => $articleId));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$submitForm->display();\n\t\t\t}\n\t\t}\n\t}", "public function getEditForm();", "public function actionEdit(){\n\t\t$form = $_POST;\n\t\t$id = $form['id'];\n\t\tunset($form['id']);\n\t\tunset($form['submit_']);\n\t\tif($form['active'] == 'on'){\n\t\t\t$form['active'] = 1;\n\t\t}\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('UPDATE core_pages SET ? WHERE id = ?', $form, $id);\n\t\t$this->redirect('pages:');\n\t}", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "protected function processForm(sfWebRequest $request, sfForm $form) {\n $collectionId = sfToolkit::getArrayValueForPath($form->getName(), 'parent_node_id');\n $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));\n if ($form->isValid()) {\n $asset_group = $form->save();\n\n $this->redirect('assetgroup/edit?id=' . $asset_group->getId() . '&c=' . $form->getOption('collectionID'));\n }\n }", "function update_node()\n\t{\n\t\t\n\t\t// @todo form validation properly\n\t\t$this->EE->load->library('form_validation');\n\t\t$this->EE->form_validation->set_rules('label', 'Label', 'required');\n\t\t\n\t\tif ($this->EE->form_validation->run('label') == FALSE)\n\t\t{\n\t\t show_error('\"Label\" is a required field');\n\t\t}\n\n\t\t$tree_id \t= $this->EE->input->post('tree_id');\n\t\t$is_root\t= $this->EE->input->post('is_root');\n\t\t\n\t\t$data = array();\n\t\t$data['label'] \t\t= htmlspecialchars($this->EE->input->post('label'), ENT_COMPAT, 'UTF-8');\n\t\t$data['template_path'] \t= $this->EE->input->post('template');\n\t\t$data['entry_id'] \t= $this->EE->input->post('entry_id');\n\t\t$data['node_id'] \t= $this->EE->input->post('node_id');\n\t\t$data['custom_url']\t= $this->EE->input->post('custom_url');\n\t\t$data['field_data']\t= ( is_array($this->EE->input->post('custom_fields')) ) ? base64_encode(serialize($this->EE->input->post('custom_fields'))) : '';\n\t\t\n\t\t$data = $this->EE->security->xss_clean($data);\n\t\t\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id);\n\t\t\n\t\t// are we adding a root node\n\t\tif($is_root)\n\t\t{\n\t\t\t// returns true if root has been added\n\t\t\tif($this->EE->ttree->insert_root($data))\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_success', $this->EE->lang->line('root_added'));\n\t\t\t}\n\t\t\t// we already have a root!\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_failure', lang('root_already_exists'));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// are we updating\n\t\telseif($data['node_id'])\n\t\t{\n\t\t\t$this->EE->ttree->update_node_by_node_id($data['node_id'], $data);\n\t\t}\n\t\t// we're inserting a new node\n\t\telse\n\t\t{\n\t\t\t$parent_lft = $this->EE->input->post('parent');\n\t\t\t$this->EE->ttree->append_node_last($parent_lft, $data);\n\t\t}\n\t\t\n\t\tunset($data);\n\t\t\n\t\t// insert our tree array\n\t\t$data['tree_array'] = base64_encode(serialize( $this->EE->ttree->tree_to_array() ));\n\t\t$data['last_updated'] = time();\n\t\t$this->EE->db->where('id', $tree_id);\n\t\t$this->EE->db->update('exp_taxonomy_trees', $data); \n\t\t\n\t\t$this->EE->functions->redirect($this->_base_url.AMP.'method=edit_nodes'.AMP.'tree_id='.$tree_id);\n\t\n\t}", "function elife_article_jumpto_edit_submit(&$form, &$form_state) {\n // Nothing.\n}", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }", "protected function handleFormAction(): void\n {\n $action = $_REQUEST['action'] ?? null;\n $editableColumns = $this->editableColumns();\n\n $isFormAction = in_array($action, ['edit', 'create']);\n $isAdmin = current_user_can('manage_options');\n $shouldSkip = 'GET' === $_SERVER['REQUEST_METHOD']\n || empty($_POST)\n || is_null($action);\n\n if ($shouldSkip || !$isFormAction || !$isAdmin) {\n return;\n }\n\n try {\n $this->validateEditableColumns($editableColumns, $_POST);\n } catch (\\Throwable $e) {\n $this->displayResourceNotice($e->getMessage());\n return;\n }\n\n $primaryKey = $this->newModel()->getPrimaryColumn();\n preg_match('/\\w+/', $_POST[$primaryKey] ?? '', $matches);\n\n $resourceId = $matches[0] ?? '';\n $values = $this->filterGuardedAttributes($editableColumns, $_POST);\n\n $model = !strlen($resourceId)\n ? $this->newModel()\n : $this->model::find($resourceId);\n\n $model->fill($values);\n $model->saveOrUpdate();\n\n $this->displayResourceNotice('Resource was updated', 'success');\n\n // to display the edit page after creating new resources\n if ($action === 'create') {\n $this->model = $model;\n }\n }", "function ds_extras_vd_bundle_form_submit($form, &$form_state) {\n\n // Save new bundle.\n $record = new stdClass();\n $record->vd = $form_state['values']['vd'];\n $record->label = $form['vd']['#options'][$record->vd];\n drupal_write_record('ds_vd', $record);\n\n // Clear entity cache and field info fields cache.\n cache_clear_all('field_info_fields', 'cache_field');\n cache_clear_all('entity_info', 'cache', TRUE);\n\n // Message and redirect.\n drupal_set_message(t('Bundle @label has been added.', array('@label' => $record->label)));\n $form_state['redirect'] = 'admin/structure/ds/vd';\n}", "public function getEditItemForm(){\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][1] == '0' && $_SESSION[PAGE_SESSIONID]['privileges']['articles'][3] == '0') die($this->text('dont_have_permission'));\n \n $this->datavalidator->addValidation('id','req',$this->text('e6'));\n $this->datavalidator->addValidation('id','numeric',$this->text('e7'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }\n \n $temp = dibi::query('SELECT * FROM ' . DB_TABLEPREFIX . 'ARTICLES WHERE id='.$this->data['id']);\n $article = $temp->fetchAssoc('id');\n if(count($temp) == 1){\n $article = $article[$this->data['id']];\n\n //testng if article is in category wehere user can add articles\n if(!$this->isPranetOfMenuitem($_SESSION[PAGE_SESSIONID]['privileges']['categoryaccess'],$article['id_menucategory'])) return array('state'=>'error','data'=> $this->text('t7'));\n\n $_SESSION['articles_dirname'] = $this->data['id'];\n $markup = '<div><h4 class=\"left\">'.$this->text('edit_article').'</h4>';\n $article['dirname'] = $article['id'];\n $markup .= $this->getForm('update',$article);\n $markup .= '</div>';\n return array('state'=>'ok','data'=> $markup);\n }else{\n return array('state'=>'error','data'=> $this->text('e29'));\n }\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 }", "function firstentity_person_edit($form , &$form_state , $person) {\n $form['name'] = array(\n '#type' => 'textfield',\n '#title' => 'name',\n '#default_value' => $person->name\n );\n\n $form['person'] = array(\n '#type' => 'value',\n '#value' => $person\n );\n $form['personality'] = array(\n '#type' => 'value',\n '#value' => $person->personality\n );\n field_attach_form( 'person' , $person , $form , $form_state );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['save'] = array(\n '#type' => 'submit',\n '#value' => 'save'\n );\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => 'delete',\n '#submit' => array('firstentity_person_edit_delete')\n );\n return $form;\n}", "function ding_panels_node_body_content_type_edit_form(&$form, &$form_state) {\n return $form;\n}", "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "function image_gallery_admin_form(&$form_state, $edit = array()) {\r\n $form['name'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Gallery name'),\r\n '#default_value' => $edit['name'],\r\n '#size' => 60,\r\n '#maxlength' => 64,\r\n '#description' => t('The name is used to identify the gallery.'),\r\n '#required' => TRUE,\r\n );\r\n $form['description'] = array(\r\n '#type' => 'textarea',\r\n '#title' => t('Description'),\r\n '#default_value' => $edit['description'],\r\n '#cols' => 60,\r\n '#rows' => 5,\r\n '#description' => t('The description can be used to provide more information about the image gallery.'),\r\n );\r\n $form['parent']['#tree'] = TRUE;\r\n $form['parent'][0] = _image_gallery_parent_select($edit['tid'], t('Parent'), 'forum');\r\n $form['weight'] = array(\r\n '#type' => 'weight',\r\n '#title' => t('Weight'),\r\n '#default_value' => $edit['weight'],\r\n '#delta' => 10,\r\n '#description' => t('When listing galleries, those with with light (small) weights get listed before containers with heavier (larger) weights. Galleries with equal weights are sorted alphabetically.'),\r\n );\r\n $form['vid'] = array(\r\n '#type' => 'hidden',\r\n '#value' => _image_gallery_get_vid(),\r\n );\r\n $form['submit'] = array(\r\n '#type' => 'submit',\r\n '#value' => t('Save'),\r\n );\r\n if ($edit['tid']) {\r\n $form['delete'] = array(\r\n '#type' => 'submit',\r\n '#value' => t('Delete'),\r\n );\r\n $form['tid'] = array(\r\n '#type' => 'hidden',\r\n '#value' => $edit['tid'],\r\n );\r\n }\r\n $form['#submit'][] = 'image_gallery_admin_submit';\r\n $form['#theme'][] = 'image_gallery_admin';\r\n return $form;\r\n}", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function layout_builder_post_update_routing_entity_form() {\n // Empty post-update hook.\n}", "protected function handlePageEditing() {}", "function legal_document_content_type_edit_form_submit($form, &$form_state) {\n $form_state['conf']['document'] = $form_state['values']['document'];\n $form_state['conf']['agree'] = $form_state['values']['agree'];\n $form_state['conf']['admin_title'] = $form_state['values']['admin_title'];\n}", "function opensky_form_islandora_scholar_embargo_form_alter (&$form, &$form_state, $form_id) {\n // dpm ('opensky_form_islandora_scholar_embargo_form_alter');\n\n $options = array(\n 'object' => t('Object-level embargo'),\n 'datastream' => t('Datastream'),\n );\n\n // add options for the object datastreams\n $pid = $form['pid']['#value'];\n $object = islandora_object_load($pid);\n foreach ($object as $datastream) {\n $options[$datastream->id] = $datastream->label;\n }\n\n // allowable options - these are the only \"embargop options\" allowed in opensky\n $allowed_options = array (\n 'object' => '',\n 'PDF' => '', // OPenSky added PDF to original \n 'OBJ' => '',\n 'PROXY_MP3' => '',\n );\n\n // reduce options to those allowable\n $options = array_intersect_key($options, $allowed_options);\n $form['dsid']['#options'] = $options;\n\n // stick opensky form submit handler in before islandora_scholar version\n module_load_include('inc', 'opensky', 'includes/utilities');\n // array_splice ($form['#submit'], 0, 0, 'opensky_embargo_form_submit');\n\n \n $form['#submit'] = array('opensky_embargo_form_submit');\n\n // dpm ($form);\n\n}", "public function formEdit(array $data): void\n {\n $uri = filter_var($data['uri'], FILTER_SANITIZE_STRIPPED);\n $post = (new article())->findByUri($uri);\n if (!$post) {\n redirect(\"/404\");\n }\n $this->view->show(\"edit\", [\n \"title\" => \"Editar artigo\",\n \"post\" => $post,\n \"categories\" => (new Category())->order(\"title ASC\")->find()->fetch(true)\n ]);\n }", "public function edit(Node $node)\n {\n //\n }", "public function index_onUpdateForm()\n\t{\n\t\t$record_id = post('record_id');\n\t\tparent::update($record_id);\n\t\t$this->controller->vars['record_id'] = $record_id;\n\t\treturn $this->makePartial('update');\n\t}", "public function editSettings() {\n $name = $this->schema->name();\n $form = new Fragment($name);\n\n if ($this->schema->newgroup()) { // définit dans la vue fields.php\n $form->hidden('type');\n // pour un nouveau groupe, il faut que le groupe soit créé avec le bon type\n // pour un groupe existant, inutile : on a déjà le bon type dans le schéma\n }\n\n $form->input('name')\n ->attribute('class', 'name')\n ->label(__('Nom du groupe', 'docalist-biblio'))\n ->description(__(\"Le nom du groupe doit être unique (ni un nom de champ, ni le nom d'un autre groupe).\", 'docalist-biblio'));\n\n $form->input('label')\n ->attribute('id', $name . '-label')\n ->attribute('class', 'label regular-text')\n ->label(__('Titre du groupe', 'docalist-biblio'))\n ->description(__(\"C'est le titre qui sera affiché dans la barre de titre du groupe et dans les options de l'écran de saisie. Valeur par défaut : type de la notice\", 'docalist-biblio'));\n\n $form->input('capability')\n ->attribute('id', $name . '-capability')\n ->attribute('class', 'capability regular-text')\n ->label(__('Droit requis', 'docalist-biblio'))\n ->description(__(\"Droit requis pour afficher ce groupe de champs. Ce groupe (et tous les champs qu'il contient) sera masqué si l'utilisateur ne dispose pas du droit indiqué. Si vous laissez vide, aucun test ne sera effectué.\", 'docalist-biblio'));\n\n $form->textarea('description')\n ->attribute('id', $name . '-description')\n ->attribute('class', 'description large-text')\n ->attribute('rows', 2)\n ->label(__(\"Texte d'introduction\", 'docalist-biblio'))\n ->description(__(\"Ce texte sera affiché entre la barre de titre et le premier champ du groupe. Vous pouvez utiliser cette zone pour donner des consignes de saisie ou toute autre information utile aux utilisateurs.\", 'docalist-biblio'));\n\n $form->select('state')\n ->attribute('id', $name . '-state')\n ->attribute('class', 'state')\n ->label(__(\"Etat initial du groupe\", 'docalist-biblio'))\n ->description(__(\"Dans l'écran de saisie, chaque utilisateur peut choisir comment afficher chacun des groupes : il peut replier ou déplier un groupe ou utiliser les options de l'écran de saisie pour masquer ou afficher certains groupes. Ce paramètre indique comment le groupe sera affiché initiallement (pour un nouvel utilisateur).\", 'docalist-biblio'))\n ->options([\n '' => __('Ouvert', 'docalist-biblio'),\n 'collapsed' => __('Replié', 'docalist-biblio'),\n 'hidden' => __('Masqué', 'docalist-biblio'),\n ])\n ->firstOption(false);\n\n $form->button(__('Supprimer ce groupe', 'docalist-biblio'))\n ->attribute('class', 'delete-group button right');\n\n return $form;\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 hydrateeditquestionformAction()\r\n {\r\n\r\n // Check Post\r\n if (!$this->getRequest()->isPost())\r\n die();\r\n\r\n $params = $this->getRequest()->getParams();\r\n $questionId = $params['questionId'];\r\n\r\n\r\n $question = new Application_Model_DbTable_FicheQuestion();\r\n $question = $question->getOneQuestionById($questionId);\r\n $this->_helper->json($question);\r\n\r\n }", "function mongo_node_add($entity_type, $bundle) {\n global $user;\n $set = mongo_node_settings();\n\n $entity = entity_create($entity_type, array(\n 'uid' => $user->uid,\n 'name' => (isset($user->name) ? $user->name : ''),\n 'type' => $bundle,\n 'language' => LANGUAGE_NONE,\n )\n );\n $form_id = $entity_type . '_' . $bundle . '_mongo_node_form';\n $output = drupal_get_form($form_id, $entity, $entity_type);\n\n return $output;\n}", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "function ef_notifications_form_node_form_alter(&$form, $form_state) {\n if (workbench_moderation_node_type_moderated($form['type']['#value'])) {\n $available = FALSE;\n // Workbench Moderation uses \"options\" fieldset in favor of \"revision information\"\n // if \"administer roles\" perm is given to content moderator.\n if (isset($form['revision_information']['workbench_moderation_state_new'])) {\n $wrapper_id = 'revision_information';\n $available = TRUE;\n }\n else if (isset($form['options']['workbench_moderation_state_new'])) {\n $wrapper_id = 'options';\n $available = TRUE;\n }\n\n if (!$available) {\n return;\n }\n\n $form[$wrapper_id]['workbench_moderation_state_new']['#ajax'] = array(\n 'callback' => 'ef_notifications_form_node_callback',\n 'wrapper' => 'wv-workflow-form-node',\n 'effect' => 'fade',\n 'event' => 'change',\n );\n\n $form[$wrapper_id]['workflow_email'] = array(\n '#prefix' => '<div id=\"wv-workflow-form-node\">',\n '#suffix' => '</div>',\n '#tree' => TRUE,\n );\n\n // Determine current state.\n if (isset($form['#node']->workbench_moderation['current']->state)) {\n $current_from_state = $form['#node']->workbench_moderation['current']->state;\n }\n else {\n $current_from_state = variable_get('workbench_moderation_default_state_' . $form['type']['#value'], workbench_moderation_state_none());\n }\n\n if ($current_from_state == workbench_moderation_state_published()) {\n $current_from_state = workbench_moderation_state_none();\n }\n\n // Initialize to the current state.\n $form_moderation_state = $current_from_state;\n if (empty($form_state['values'])) {\n $form_moderation_state = $current_from_state;\n }\n if (!empty($form_state['values']) &&\n isset($form_state['values']['workbench_moderation_state_new'])) {\n $form_moderation_state = $form_state['values']['workbench_moderation_state_new'];\n }\n if (!empty($form_state['values']) &&\n isset($form_state['values'][$wrapper_id]['workbench_moderation_state_new'])) {\n $form_moderation_state = $form_state['values'][$wrapper_id]['workbench_moderation_state_new'];\n }\n\n $ef_notifications = ef_notifications_get();\n foreach ($ef_notifications as $transition => $notification_roles) {\n foreach ($notification_roles as $rid => $notification_transition) {\n if ($notification_transition->from_name == $current_from_state\n && $notification_transition->to_name == $form_moderation_state) {\n ef_notifications_create_form_element($form, $notification_transition);\n }\n }\n }\n\n $form['actions']['submit']['#submit'][] = 'ef_notifications_notification_submit';\n }\n}", "function do_form(){\n\t\tob_start();\n\t\t\n\t\t$op = ($this->id_base == $this->id)? __('Add', JCF_TEXTDOMAIN) : __('Edit', JCF_TEXTDOMAIN);\n\t\t?>\n\t\t<div class=\"jcf_edit_field\">\n\t\t\t<h3 class=\"header\"><?php echo $op . ' ' . $this->title; ?></h3>\n\t\t\t<div class=\"jcf_inner_content\">\n\t\t\t\t<form action=\"#\" method=\"post\" id=\"jcform_edit_field\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $this->id; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_number\" value=\"<?php echo $this->number; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id_base\" value=\"<?php echo $this->id_base; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"fieldset_id\" value=\"<?php echo $this->fieldset_id; ?>\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->form( $this->instance );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// need to add slug field too\n\t\t\t\t\t\t\t$slug = esc_attr($this->slug);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('slug'); ?>\"><?php _e('Slug:', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('slug'); ?>\" name=\"<?php echo $this->get_field_name('slug'); ?>\" type=\"text\" value=\"<?php echo $slug; ?>\" />\n\t\t\t\t\t\t\t<br/><small><?php _e('Machine name, will be used for postmeta field name.', JCF_TEXTDOMAIN); ?></small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// enabled field\n\t\t\t\t\t\t\tif( $this->is_new ){\n\t\t\t\t\t\t\t\t$this->instance['enabled'] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('enabled'); ?>\">\n\t\t\t\t\t\t\t\t<input class=\"checkbox\" type=\"checkbox\" \n\t\t\t\t\t\t\t\t\t\tid=\"<?php echo $this->get_field_id('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tname=\"<?php echo $this->get_field_name('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tvalue=\"1\" <?php checked(true, @$this->instance['enabled']); ?> />\n\t\t\t\t\t\t\t\t<?php _e('Enabled', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"field-control-actions\">\n\t\t\t\t\t\t\t<div class=\"alignleft\">\n\t\t\t\t\t\t\t\t<?php if( $op != __('Add', JCF_TEXTDOMAIN) ) : ?>\n\t\t\t\t\t\t\t\t<a href=\"#remove\" class=\"field-control-remove\"><?php _e('Delete', JCF_TEXTDOMAIN); ?></a> |\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<a href=\"#close\" class=\"field-control-close\"><?php _e('Close', JCF_TEXTDOMAIN); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"alignright\">\n\t\t\t\t\t\t\t\t<?php echo print_loader_img(); ?>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save', JCF_TEXTDOMAIN); ?>\" class=\"button-primary\" name=\"savefield\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br class=\"clear\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\t\t\n\t\t$html = ob_get_clean();\n\t\treturn $html;\n\t}", "public function editAction() \n {\n $stepParam = $this->params()->fromRoute('step', 1);\n // Determine the current step.\n $step = 1;\n if ((isset($this->sessionContainer->userChoices[\"step\"]))&&($stepParam==2)) {\n $step = $this->sessionContainer->userChoices[\"step\"]; \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->userChoices = [];\n $this->sessionContainer->userChoices['step2Dirty'] = false;\n $this->sessionContainer->userChoices['step3Dirty'] = false;\n $this->sessionContainer->userChoices['step4Dirty'] = false;\n }\n \n // Create image holder.\n $files = null;\n $fileTitles = null;\n \n // Get post ID.\n $postId = (int)$this->params()->fromRoute('id', -1);\n \n // Create form.\n $form = new PostForm($step, $postId, $this->translator);\n \n // Validate input parameter\n if ($postId<0) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n \n // Find the existing post in the database.\n $post = $this->entityManager->getRepository(Post::class)\n ->findOneById($postId); \n if ($post == null) {\n $this->getResponse()->setStatusCode(404);\n return; \n } \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->userChoices[\"step$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->userChoices[\"step\"] = $step;\n }else{\n // Create the title file.\n $this->imageManager->createTitleFile($postId, $data);\n }\n \n // If we completed both steps.\n if ($step>4) {\n // Use post manager service update existing post.\n $this->postManager->updatePost($post, \n $this->sessionContainer->userChoices['step1']);\n $this->imageManager->saveTempFiles($post);\n $this->videoManager->saveTempFiles($post);\n $this->audioManager->saveTempFiles($post);\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'=>'edit',\n 'id'=>$postId, 'step'=>2]);\n\n }\n } else {\n \n if ($step==1) {\n $data = [\n 'title' => $post->getTitle(),\n 'description' => $post->getDescription(),\n 'content' => $post->getContent(),\n 'tags' => $this->postManager->convertTagsToString($post),\n 'status' => $post->getStatus()\n ];\n $form->setData($data);\n }\n\n }\n \n if ($step==2) {\n \n // Get the list of already saved files.\n $files = $this->imageManager->getTempFiles($postId, \n $this->sessionContainer->userChoices['step2Dirty']);\n $fileTitles = $this->imageManager->getTempFileTitles($postId, \n $this->sessionContainer->userChoices['step2Dirty']);\n $this->sessionContainer->userChoices['step2Dirty'] = true; \n }\n \n if ($step==3) {\n \n // Get the list of already saved files.\n $files = $this->videoManager->getTempFiles($postId, \n $this->sessionContainer->userChoices['step3Dirty']);\n $this->sessionContainer->userChoices['step3Dirty'] = true; \n } \n \n if ($step==4) {\n \n // Get the list of already saved files.\n $files = $this->audioManager->getTempFiles($postId, \n $this->sessionContainer->userChoices['step4Dirty']);\n $this->sessionContainer->userChoices['step4Dirty'] = true; \n } \n \n if (!$this->access('post.own.edit', ['post'=>$post])) {\n return $this->redirect()->toRoute('not-authorized');\n }\n \n // Render the view template.\n $viewModel = new ViewModel([\n 'files' => $files,\n 'fileTitles' => $fileTitles,\n 'form' => $form,\n 'post' => $post\n ]);\n $viewModel->setTemplate(\"application/post/edit$step\");\n \n return $viewModel;\n }", "function thumbwhere_contentcollectionitem_edit_form($form, &$form_state, $thumbwhere_contentcollectionitem) {\n\n // Add the default field elements.\n $form['fk_contentcollection'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollectionItem fk_contentcollection'),\n '#default_value' => isset($thumbwhere_contentcollectionitem->fk_contentcollection) ? $thumbwhere_contentcollectionitem->fk_contentcollection : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_contentcollection',\n );\n // Add the default field elements.\n $form['fk_content'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollectionItem fk_content'),\n '#default_value' => isset($thumbwhere_contentcollectionitem->fk_content) ? $thumbwhere_contentcollectionitem->fk_content : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_content',\n );\n // Add the default field elements.\n $form['weight'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereContentCollectionItem weight'),\n '#default_value' => isset($thumbwhere_contentcollectionitem->weight) ? $thumbwhere_contentcollectionitem->weight : 1,\n // '#maxlength' => 255,\n // '#required' => TRUE,\n '#weight' => -5,\n );\n\n\n\n $form['data']['#tree'] = TRUE;\n\n /*\n $form['data']['sample_data'] = array(\n '#type' => 'checkbox',\n '#title' => t('An interesting thumbwhere_contentcollectionitem switch'),\n '#default_value' => isset($thumbwhere_contentcollectionitem->data['sample_data']) ? $thumbwhere_contentcollectionitem->data['sample_data'] : 1,\n );\n */\n\n\n // Add the field related form elements.\n $form_state['thumbwhere_contentcollectionitem'] = $thumbwhere_contentcollectionitem;\n field_attach_form('thumbwhere_contentcollectionitem', $thumbwhere_contentcollectionitem, $form, $form_state);\n\n $form['actions'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('form-actions')),\n '#weight' => 400,\n );\n\n // We add the form's #submit array to this button along with the actual submit\n // handler to preserve any submit handlers added by a form callback_wrapper.\n $submit = array();\n\n if (!empty($form['#submit'])) {\n $submit += $form['#submit'];\n }\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save thumbwhere_contentcollectionitem'),\n '#submit' => $submit + array('thumbwhere_contentcollectionitem_edit_form_submit'),\n );\n\n // Do we show the delete button?\n if (!empty($thumbwhere_contentcollectionitem->pk_contentcollectionitem)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete thumbwhere_contentcollectionitem'),\n '#suffix' => l(t('Cancel'), 'admin/thumbwhere/thumbwhere_contentcollectionitems'),\n '#submit' => $submit + array('thumbwhere_contentcollectionitem_form_submit_delete'),\n '#weight' => 45,\n );\n }\n\n // We append the validate handler to #validate in case a form callback_wrapper\n // is used to add validate handlers earlier.\n $form['#validate'][] = 'thumbwhere_contentcollectionitem_edit_form_validate';\n return $form;\n}", "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "public function edit_postAction(){\n\t\t$info = $this->getPost(array('id','name', 'root_id', 'parent_id', 'sort'));\n\t\t\n\t\t//检测重复\n\t\t$area = Ola_Service_Area::getBy(array('name'=>$info['name']));\n\t\tif ($area && $area['id'] != $info['id']) $this->output(-1, $info['name'].'已存在.');\n\t\t\n\t\t$ret = Ola_Service_Area::update($info, $info['id']);\n\t\tif (!$ret) {\n\t\t $this->output(-1, '操作失败.');\n\t\t}\n\t\t$this->output(0, '操作成功.');\n\t}", "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 }", "function happywedding_node_form_submit($form, &$form_state) {\n global $user;\n //dpm($user);\n if ( !empty($form_state['nid']) && isset($_GET['vendor'] ) ) {\n \n $type = $form['type']['#value'];\n if (in_array('vendor', $user->roles)) {\n $basepath = 'bo/vendor/';\n } else {\n $basepath = 'node/';\n }\n //dpm($form);\n if($type=='news')\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type;\n else if($type=='product') {\n $query = array('category' => array());\n foreach($form[\"field_product_category\"][\"und\"][\"#value\"] as $key => $value){\n $query[\"category\"][] = $key; \n }\n $form_state['redirect'] = array( \n $basepath.$_GET['vendor'].'/categories/'.$type.'s' ,\n array('query' => $query ) \n );\n //dpm($form_state['redirect']);\n }else\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type.'s';\n }\n}", "public static function get_form($args, $nid, $response=null) {\n $reloadPath = self::get_reload_path();\n $auth = data_entry_helper::get_read_write_auth($args['website_id'], $args['password']);\n $r = \"<form method=\\\"post\\\" id=\\\"entry_form\\\" action=\\\"$reloadPath\\\">\\n\";\n $r .= $auth['write'];\n data_entry_helper::$entity_to_load = [];\n if (!empty($_GET['termlists_term_id'])) {\n data_entry_helper::load_existing_record($auth['read'], 'termlists_term', $_GET['termlists_term_id']);\n // map fields to their appropriate supermodels\n data_entry_helper::$entity_to_load['term:term'] = data_entry_helper::$entity_to_load['termlists_term:term'];\n data_entry_helper::$entity_to_load['term:id'] = data_entry_helper::$entity_to_load['termlists_term:term_id'];\n data_entry_helper::$entity_to_load['meaning:id'] = data_entry_helper::$entity_to_load['termlists_term:meaning_id'];\n if (function_exists('hostsite_set_page_title'))\n hostsite_set_page_title(lang::get('Edit {1}', data_entry_helper::$entity_to_load['term:term']));\n }\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'website_id',\n 'default' => $args['website_id']\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'termlists_term:id'\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'termlists_term:termlist_id',\n 'default' => $args['termlist_id']\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'termlists_term:preferred',\n 'default' => 't'\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'term:id'\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'term:language_id',\n 'default' => $args['language_id']\n ));\n $r .= data_entry_helper::hidden_text(array(\n 'fieldname' => 'meaning:id'\n ));\n // request automatic JS validation\n data_entry_helper::enable_validation('entry_form');\n $r .= data_entry_helper::text_input(array(\n 'label' => lang::get('Term'),\n 'fieldname' => 'term:term',\n 'helpText' => lang::get('Please provide the term'),\n 'validation' => array('required'),\n 'class' => 'control-width-5'\n ));\n $r .= \"<input type=\\\"submit\\\" name=\\\"form-submit\\\" id=\\\"delete\\\" value=\\\"Delete\\\" />\\n\";\n $r .= \"<input type=\\\"submit\\\" name=\\\"form-submit\\\" value=\\\"Save\\\" />\\n\";\n $r .= '<form>';\n self::set_breadcrumb($args);\n return $r;\n }", "function upitt_islandora_findingaids_relationships_admin_form_submit(array $form, array &$form_state) {\n drupal_set_message(t('The settings have been updated!'));\n $id = $form_state['triggering_element']['#id'];\n switch ($id) {\n case 'edit-submit':\n variable_set('upitt_islandora_findingaids_relationships_namespace_prefix', $form_state['values']['namespace_prefix']);\n break;\n\n case 'edit-reset':\n variable_del('upitt_islandora_findingaids_relationships_namespace_prefix');\n break;\n }\n}", "public function editFormAction()\n {\n\t\t$id = $this->params()->fromRoute(\"id\", \"\");\n\t\t$form_type = $this->params()->fromQuery(\"ftype\", \"\");\n\n\t\tif ($id == \"\")\n\t\t{\n\t\t\t//set error message\n\t\t\t$this->flashMessenger()->addErrorMessage(\"Form could not be loaded. Id is not set\");\n\t\t\t//redirect to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end if\n\n\t\t//load form data\n\t\t$objForm = $this->getFormAdminModel()->getForm($id);\n\n\t\t//load form\n\t\t$form = $this->getFormAdminModel()->getFormAdminForm($form_type);\n\n\t\t//save form type and remove option from form\n\t\t$fk_form_type_id = $objForm->get(\"fk_form_type_id\");\n\n\t\t//disable form type element\n\t\t$form->get(\"fk_form_type_id\")->setAttribute(\"disabled\", \"disabled\");\n\n\t\t//bind data to form\n\t\t$form->bind($objForm);\n\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost())\n\t\t{\n\t\t\t$arr_data = $request->getPost();\n\t\t\t$arr_data[\"fk_form_type_id\"] = $fk_form_type_id;\n\t\t\t$form->setData($arr_data);\n\n\t\t\tif ($form->isValid($request->getPost()))\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t//update the form\n\t\t\t\t\t$objForm = $form->getData();\n\t\t\t\t\t$objForm->set(\"id\", $id);\n\t\t\t\t\t$objForm->set(\"fk_form_type_id\", $fk_form_type_id);\n\n\t\t\t\t\t$objForm = $this->getFormAdminModel()->editForm($objForm);\n\n\t\t\t\t\t//set success message\n\t\t\t\t\t$this->flashMessenger()->addSuccessMessage(\"Form has been updated\");\n\n\t\t\t\t\t//redirect to index page\n\t\t\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t//set error message\n\t\t\t\t\t$form = $this->frontFormHelper()->formatFormErrors($form, $e->getMessage());\n\t\t\t\t}//end catch\n\t\t\t}//end if\n\t\t}//end if\n\n\t\tif ($objForm->get(\"id\") == \"\")\n\t\t{\n\t\t\t//reload form data\n\t\t\t$objForm = $this->getFormAdminModel()->getForm($id);\n\t\t}//end if\n\n\t\treturn array(\n\t\t\t\t\"form\" => $form,\n\t\t\t\t\"objForm\" => $objForm\n\t\t);\n }", "public function post_edit_submit() {\n\n $slug = in('slug'); // forum id ( slug ). It is only available on creating a new post.\n $post_ID = in('post_ID'); // post id. it is only available on updating a post.\n $title = in('title');\n $content = in('content');\n\n if ( empty( $slug ) && empty( $post_ID ) ) ferror(-50044, 'slug ( category_slug ) or post_ID are not provided');\n if ( ! $title ) ferror(-50045, 'post title is not provided');\n if ( ! $content ) ferror(-50046,'post content is not provided');\n $user_ID = $this->get_post_author();\n if ( empty($user_ID) ) ferror( -50047, \"login first\");\n\n if ( $post_ID ) { // update\n forum()->endIfNotMyPost( $post_ID );\n $this->setCategoryByPostID( $post_ID );\n }\n else { // new\n $this->setCategory( $slug );\n }\n $post = post()\n ->set('post_category', [ forum()->getCategory()->term_id ])\n ->set('post_title', $title)\n ->set('post_content', $content)\n ->set('post_status', 'publish');\n\n if ( $post_ID ) { // update\n $post_ID = $post\n ->set('ID', $post_ID)\n ->update();\n }\n else { // new\n $post_ID = $post\n ->set('post_author', $user_ID)\n ->create();\n }\n if ( ! is_integer($post_ID) ) ferror( -50048, \"Failed on post_create() : $post_ID\");\n\n\n // file upload\n preg_match_all(\"/http.*\\/data\\/upload\\/[^\\/]*\\/[^\\/]\\/[^'\\\"]*/\", $content, $ms);\n $files = $ms[0];\n // save uploaded files\n post()->meta( $post_ID, 'files', $files );\n\n\n // Save All extra input into post meta.\n post()->saveAllMeta( $post_ID );\n\n $this->response( [ 'slug' => forum()->getCategory()->slug, 'post_ID' => $post_ID ] );\n }", "public function addEditAction()\n {\n $form = $this->_getForm();\n\n $id = $this->_getPrimaryId();\n\n if ($this->getRequest()->isPost()) {\n $this->_handlePostAction();\n\n if ($form->isValid($this->getRequest()->getPost())) {\n $this->_processValidForm();\n }\n } else {\n if ($id) {\n $row = $this->_getRow($id);\n\n $form->setDefaults($row->toArray());\n }\n }\n\n if (!$id) {\n $url = $this->_getNewSubmitLocation();\n } else {\n $url = $this->_getEditSubmitLocation();\n }\n\n $form->setAction($this->view->url($url, null, true));\n\n $this->view->form = $form;\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 editAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING\n $sitereview = $post->getParent('sitereview_listing');\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Edit();\n\n\n $tagStr = '';\n foreach( $post->tags()->getTagMaps() as $tagMap ) {\n $tag = $tagMap->getTag();\n if( !isset($tag->text) ) continue;\n if( '' !== $tagStr ) $tagStr .= ', ';\n $tagStr .= $tag->text;\n }\n $form->populate(array(\n 'tags' => $tagStr,\n )); \n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n $form->populate($post->toArray());\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n\n try {\n $post->setFromArray($form->getValues());\n $post->modified_date = date('Y-m-d H:i:s');\n $post->save();\n\n //ADDING TAGS\n $values = $form->getValues();\n $keywords = '';\n if (isset($values['tags']) && !empty($values['tags'])) {\n $tags = preg_split('/[,]+/', $values['tags']);\n $tags = array_filter(array_map(\"trim\", $tags));\n $post->tags()->setTagMaps($viewer, $tags);\n\n foreach ($tags as $tag) {\n $keywords .= \" $tag\";\n }\n }\n\n //UPDATE KEYWORDS IN SEARCH TABLE\n if (!empty($keywords)) {\n Engine_Api::_()->getDbTable('search', 'core')->update(array('keywords' => $keywords), array('type = ?' => 'sitereview_post', 'id = ?' => $post->post_id));\n }\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRefresh' => true,\n ));\n }", "public function onEditField()\n {\n $name = post('code');\n $selection = FieldManager::findField($name);\n return $this->makePartial('update_field_form', ['selection' => $selection]);\n }", "public function updatejobformAction(){\n\t\ttry {\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\tif($request->isPost()){\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$job_id = $posts['job_id'];\n\t\t\t\t\n\t\t\t\t$orderTable = $sm->get('Order\\Model\\OrderTable');\t\t\t\t\n\t\t\t\t$jobDetails = (array)$orderTable->fetchJobDetails($job_id);\n\t\t\t\t\n\t\t\t\t$objInvoice = $sm->get('Invoice\\Model\\InvoiceTable');\n\t\t\t\t$invoiceItems = $objInvoice->fetchInvoiceItems($jobDetails['invoice_number']);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$jobForm = $sm->get('Order\\Form\\JobForm');\n\t\t\t\t$jobForm->get('id')->setValue($jobDetails['job_id']);\n\t\t\t\t$jobForm->get('order_id')->setValue($jobDetails['order_id']);\n\t\t\t\t$jobForm->get('owner_id')->setValue($jobDetails['owner_id']);\n\t\t\t\t$jobForm->get('exp_delivery_date')->setValue(date($config['formDateFormat'], strtotime($jobDetails['exp_delivery_date'])));\n\t\t\t\t$jobForm->get('job_save')->setLabel('Update');\n\t\t\t\t\n\t\t\t\t$viewRender = $sm->get('ViewRenderer');\n\t\t\t\t$htmlViewPart = new ViewModel();\n\t\t\t\t\n\t\t\t\t$userTable = $sm->get('Customer\\Model\\UsersTable');\n\t\t\t\t$ownerOptions = $userTable->fetchUsersForTasks();\n\t\t\t\t\n\t\t\t\t$htmlViewPart->setTemplate('order/index/jobform')\n\t\t\t\t\t\t\t ->setTerminal(true)\n\t\t\t\t\t\t\t ->setVariables(array('newJobForm' => $jobForm, 'jobDetails' => $jobDetails, 'invoice_items' => $invoiceItems, 'config' => $config, 'ownerOptions' => $ownerOptions));\n\t\t\t}\n\t\t\n\t\t\t$html = $viewRender->render($htmlViewPart);\t\n\t\t\t\n\t\t\treturn $this->getResponse()->setContent($html);\n } catch (Exception $e) {\n \\De\\Log::logApplicationInfo(\"Caught Exception: \" . $e->getMessage() . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__);\n }\n\t}", "function OnEditItem(){\n if (! $this->error) {\n if ($this->disabled_edit) {\n }\n if ($this->item_id != 0) {\n\n $this->_data = $this->Storage->{$this->GetItemMethod}(array(\n $this->key_field => $this->item_id));\n $form_data = $this->Request->Form;\n $this->_data = array_merge($this->_data, $this->Request->Form);\n if ($this->multilevel) {\n $this->parent_id = $this->_data[$this->parent_field];\n }\n }\n $this->OnBeforeCreateEditControl();\n $this->InitItemsEditControl();\n } //!error\n }", "public function _editField() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$field_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$field_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->get ( ( int ) $field_id );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t\n\t\t$this->setView ( 'edit_field' );\n\t\n\t}", "function acquia_marina_preprocess_gradapplication_node_form(&$vars) {\r\n\tprint \"<pre>\";\r\n//\tprint_r($vars['form']['group_personal_information']['field_first_name']['0']['value']['#size']);\r\n//\tprint_r ($vars['form']['group_personal_information']['field_place_of_birth']['0']['city']);\r\n//\tprint_r ($vars['form']['group_personal_information']['field_phone_primary']);\r\n//\tprint_r($vars['form']['group_international_information']);\r\n\tprint \"</pre>\";\r\n\t\r\n\tprint \"arg1: \". arg(1). \" \";\r\n\tprint \"arg2: \". arg(2). \" \";\r\n\tprint \"arg3: \". arg(3). \" \";\r\n\tprint \"arg4: \". arg(4). \" \";\r\n\t\r\n\t//buttons\r\n\t$vars['submit'] = drupal_render($vars['form']['buttons']['submit']);\r\n\t$vars['prev'] = drupal_render($vars['form']['buttons']['previous']);\r\n\t$vars['next'] = drupal_render($vars['form']['buttons']['next']);\r\n\t$vars['preview'] = drupal_render($vars['form']['buttons']['preview']);\r\n\t$vars['delete'] = drupal_render($vars['form']['buttons']['delete']);\r\n\t$vars['save'] = drupal_render($vars['form']['buttons']['save']);\r\n\t$vars['all_buttons'] = drupal_render($vars['form']['buttons']['all']);\r\n\r\nif(arg(3) == 1) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication');\r\n\t\r\n //personal information group\t\r\n\t//$vars['personal_information_group'] = drupal_render($vars['form']['group_personal_information']);\r\n\t$vars['first_name'] = drupal_render($vars['form']['group_personal_information']['field_first_name']);\r\n\t$vars['middle_name'] = drupal_render($vars['form']['group_personal_information']['field_middle_name']);\r\n\t$vars['last_name'] = drupal_render($vars['form']['group_personal_information']['field_last_name']);\r\n\t$vars['maiden_name'] = drupal_render($vars['form']['group_personal_information']['field_maiden_name']);\r\n\t$vars['email_address'] = drupal_render($vars['form']['group_personal_information']['field_email_address']);\r\n\t$vars['date_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_dob']);\r\n\t$vars['ssn'] = drupal_render($vars['form']['group_personal_information']['field_ssn']);\r\n\t$vars['gender'] = drupal_render($vars['form']['group_personal_information']['field_gender']);\r\n \r\n //place of birth group\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['city']['#title'] = 'City of Birth';\r\n\t$vars['city_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['city']);\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['province']['#title'] = 'State or Province of Birth';\r\n\t$vars['state_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['province']);\r\n\t$vars['form']['group_personal_information']['field_place_of_birth']['0']['country']['#title'] = 'Country of Birth';\r\n\t$vars['country_of_birth'] = drupal_render($vars['form']['group_personal_information']['field_place_of_birth']['0']['country']);\r\n\t$vars['form']['group_personal_information']['field_coc']['0']['country']['#title'] = 'Country of Citizenship';\r\n\t$vars['country_of_citizenship'] = drupal_render($vars['form']['group_personal_information']['field_coc']['0']['country']);\r\n\t$vars['residency_status'] = drupal_render($vars['form']['group_personal_information']['field_residency']);\r\n\t$vars['ethnic_background'] = drupal_render($vars['form']['group_personal_information']['field_ethnic']);\r\n \r\n //permanent address group\r\n\t$vars['form']['group_personal_information']['field_permanent_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['perm_street_1'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['street']);\r\n\t$vars['form']['group_personal_information']['field_permanent_address']['0']['additional']['#title'] = '';\r\n\t$vars['perm_street_2'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['additional']);\r\n\t$vars['perm_city'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['city']);\r\n\t$vars['perm_state'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['province']);\r\n\t$vars['perm_zip'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['postal_code']);\r\n\t$vars['perm_country'] = drupal_render($vars['form']['group_personal_information']['field_permanent_address']['0']['country']);\r\n \r\n //mailing address group\r\n\t$vars['form']['group_personal_information']['field_mailing_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['mail_street_1'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['street']);\r\n\t$vars['form']['group_personal_information']['field_mailing_address']['0']['additional']['#title'] = '';\r\n\t$vars['mail_street_2'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['additional']);\r\n\t$vars['mail_city'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['city']);\r\n\t$vars['mail_state'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['province']);\r\n\t$vars['mail_zip'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['postal_code']);\r\n\t$vars['mail_country'] = drupal_render($vars['form']['group_personal_information']['field_mailing_address']['0']['country']);\r\n \t\r\n //phone numbers\r\n\t$vars['phone_primary'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_primary']);\r\n\t$vars['phone_work'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_work']);\r\n\t$vars['phone_fax'] = drupal_render($vars['form']['group_phone_numbers']['field_phone_fax']);\r\n \r\n //other information\r\n\t$vars['student_type'] = drupal_render($vars['form']['group_other_info']['field_student_type']);\r\n\t$vars['entry_date'] = drupal_render($vars['form']['group_other_info']['field_entry_date']);\r\n\t$vars['entry_year'] = drupal_render($vars['form']['group_other_info']['field_entry_date_year']);\r\n\t\r\n\t//emergency contact information\r\n $vars['emergency_first'] = drupal_render($vars['form']['group_emergency']['field_e_fname']);\r\n\t$vars['emergency_last'] = drupal_render($vars['form']['group_emergency']['field_e_lname']);\r\n\t$vars['emergency_relation'] = drupal_render($vars['form']['group_emergency']['field_e_relationship']);\r\n\t$vars['emergency_phone'] = drupal_render($vars['form']['group_emergency']['field_e_phone']);\r\n\t\r\n\t$vars['form']['group_emergency']['field_e_address']['0']['street']['#title'] = 'Street Address';\r\n\t$vars['e_street_1'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['street']);\r\n\t$vars['form']['group_emergency']['field_e_address']['0']['additional']['#title'] = '';\r\n\t$vars['e_street_2'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['additional']);\r\n\t$vars['e_city'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['city']);\r\n\t$vars['e_state'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['province']);\r\n\t$vars['e_zip'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['postal_code']);\r\n\t$vars['e_country'] = drupal_render($vars['form']['group_emergency']['field_e_address']['0']['country']);\r\n\t\r\n\t//language information\r\n\t$vars['language'] = drupal_render($vars['form']['group_language']['field_language']);\r\n\t$vars['english'] = drupal_render($vars['form']['group_language']['field_english']);\r\n\r\n //crime information\r\n\t$vars['crime_radio'] = drupal_render($vars['form']['group_crime_info']['field_crime_radio']);\r\n\t$vars['crime'] = drupal_render($vars['form']['group_crime_info']['field_crime']);\r\n\t$vars['crime_doi'] = drupal_render($vars['form']['group_crime_info']['field_doi']);\r\n\t$vars['crime_explanation'] = drupal_render($vars['form']['group_crime_info']['field_explination']);\r\n}\r\n\r\nif(arg(3) == 2) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication2');\r\n\t\r\n\t//international information group\r\n\t//$vars['international_group'] = drupal_render($vars['form']['group_international_information']);\r\n\t//$vars['int'] = $vars['form']['group_international_information']['field_international_dep_citz'];\r\n\t$vars['international_radio'] = drupal_render($vars['form']['group_international_information']['field_international']);\r\n\t$vars['international_time'] = drupal_render($vars['form']['group_international_information']['field_international_time_us']);\r\n\t$vars['international_degree'] = drupal_render($vars['form']['group_international_information']['field_international_plan_degree']);\r\n\t$vars['international_where'] = drupal_render($vars['form']['group_international_information']['field_international_where']);\r\n\t$vars['international_subject'] = drupal_render($vars['form']['group_international_information']['field_international_subject']);\r\n\t$vars['international_when'] = drupal_render($vars['form']['group_international_information']['field_international_when']);\r\n\t$vars['international_grad'] = drupal_render($vars['form']['group_international_information']['field_international_after_grad']);\r\n\t$vars['international_employer'] = drupal_render($vars['form']['group_international_information']['field_international_employer']);\r\n\t\r\n\t//$vars['international_location'] = drupal_render($vars['form']['group_international_information']['field_international_location']);\r\n\t$vars['international_location_name'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['name']);\r\n\t$vars['international_location_street1'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['street']);\r\n\t$vars['form']['group_international_information']['field_international_location']['0']['additional']['#title'] = '';\r\n\t$vars['international_location_street2'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['additional']);\r\n\t$vars['international_location_city'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['city']);\r\n\t$vars['international_location_state'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['province']);\r\n\t$vars['international_location_zip'] = drupal_render($vars['form']['group_international_information']['field_international_location']['0']['postal_code']);\r\n\t\r\n\t$vars['international_start'] = drupal_render($vars['form']['group_international_information']['field_international_start']);\r\n\t$vars['international_dependants'] = drupal_render($vars['form']['group_international_information']['field_international_dependants']);\r\n\t$vars['international_dep_arrive'] = drupal_render($vars['form']['group_international_information']['field_international_dep_arrive']);\r\n\t$vars['international_dep_relation'] = drupal_render($vars['form']['group_international_information']['field_international_dep_relation']);\r\n\t$vars['international_dep_dob'] = drupal_render($vars['form']['group_international_information']['field_international_dep_dob']);\r\n\t$vars['form']['group_international_information']['field_international_dep_cob']['0']['country']['#title'] = t('Country of Birth');\r\n\t$vars['international_dep_cob'] = drupal_render($vars['form']['group_international_information']['field_international_dep_cob']['0']['country']);\r\n\t$vars['form']['group_international_information']['field_international_dep_citz']['0']['country'][\"#title\"] = t('Country of Citizenship');\r\n\t$vars['international_dep_citz'] = drupal_render($vars['form']['group_international_information']['field_international_dep_citz']['0']['country']);\r\n\t$vars['international_dep_fname'] = drupal_render($vars['form']['group_international_information']['field_international_e_first_name']);\r\n\t$vars['international_dep_lname'] = drupal_render($vars['form']['group_international_information']['field_international_e_last_name']);\r\n\t$vars['international_dep_street1'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['street']);\r\n\t$vars['form']['group_international_information']['field_international_e_addr']['0']['additional']['#title'] = '';\r\n\t$vars['international_dep_street2'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['additional']);\r\n\t$vars['international_dep_city'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['city']);\r\n\t$vars['international_dep_state'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['province']);\r\n\t$vars['international_dep_zip'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['postal_code']);\r\n\t$vars['form']['group_international_information']['field_international_e_addr']['0']['country']['#title'] = t('Country of Citizenship');\r\n\t$vars['international_dep_country'] = drupal_render($vars['form']['group_international_information']['field_international_e_addr']['0']['country']);\r\n}\r\n\r\nif(arg(3) == 3) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication3');\r\n\t\r\n\t//academic history group\r\n\t$vars['academic_history_group'] = drupal_render($vars['form']['group_academic_history']);\r\n\t$vars['int'] = $vars['form']['group_academic_history'];\r\n\t//$vars['applied'] = drupal_render($vars['form']['group_academic_history']['field_applied']);\r\n\t//$vars['app_date'] = drupal_render($vars['form']['group_academic_history']['field_applied_date']);\t\r\n}\r\n\r\nif(arg(3) == 4) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication4');\r\n\t\r\n}\r\n\r\nif(arg(3) == 5) {\r\n\t$vars['template_files'] = array('node-edit-gradapplication5');\r\n\t\r\n}\r\n\r\n\t$vars['whole_form'] = drupal_render($vars['form']);\r\n\t\t//print_r ($vars['form']['group_personal_information']);\r\n\t//\t$vars['form']['group_personal_information']['field_middle_name']['0']['value']['#suffix'] = '&#60;br/&#62;';\r\n\t//\tprint_r ($vars['form']['group_personal_information']['field_first_name']['0']['value']);\r\n\t//\t$vars['form']['group_personal_information']['field_ssn']['0']['value']['#size'] = 10;\r\n}", "function thumbwhere_contentcollection_edit_form_submit(&$form, &$form_state) {\n\n $thumbwhere_contentcollection = entity_ui_controller('thumbwhere_contentcollection')->entityFormSubmitBuildEntity($form, $form_state);\n // Save the thumbwhere_contentcollection and go back to the list of thumbwhere_contentcollections\n\n // Add in created and changed times.\n if ($thumbwhere_contentcollection->is_new = isset($thumbwhere_contentcollection->is_new) ? $thumbwhere_contentcollection->is_new : 0) {\n $thumbwhere_contentcollection->created = time();\n }\n\n $thumbwhere_contentcollection->changed = time();\n\n $thumbwhere_contentcollection->save($transaction);\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollections';\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}", "function cps_changeset_edit_form($form, &$form_state) {\n $entity = $form_state['entity'];\n\n $form['info']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Name'),\n '#description' => t('This will appear in the administrative interface to easily identify it.'),\n '#default_value' => $entity->name,\n '#required' => TRUE,\n );\n\n $form['info']['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $entity->description,\n );\n \n $form['info']['lock_in_select'] = array(\n '#type' => 'checkbox',\n '#title' => t('Lock in select'),\n '#description' => t('If checked all users will see this site version in the site version selector bar while unpublished.'),\n '#default_value' => $entity->lock_in_select,\n );\n\n $form['actions'] = array(\n '#type' => 'actions',\n );\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function hs_admin_content_preview_form_alter(&$form, &$form_state, $form_id)\n{\n $form_id_suffix = '_node_form';\n if ($form_id_suffix === substr($form_id, -strlen($form_id_suffix))) {\n form_load_include($form_state, 'inc', 'hs_admin', 'includes/hs_admin.content_preview');\n $form['actions']['preview']['#submit'] = array('hs_admin_content_preview_form_submit');\n\n $node = $form_state['node'];\n $module_path = drupal_get_path('module', 'hs_admin');\n\n if ($form_state['submitted']\n && isset($form_state['values']['op'])\n && $form_state['values']['op'] == t('Preview')\n ) {\n global $base_url;\n\n $nid_prefix = $node->nid > 0\n ? '/' . $node->nid\n : '';\n\n $preview_path = $base_url . '/node' . $nid_prefix . '/preview';\n\n drupal_add_js($module_path . '/js/hs_admin.content_preview.js');\n drupal_add_js(array('hsAdmin' => array(\n 'contentPreview' => array(\n 'path' => $preview_path,\n 'nid' => $node->nid,\n 'bringToTop' => TRUE,\n ),\n )), 'setting');\n }\n }\n}", "public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }", "function _dataone_admin_settings_submit($form, &$form_state) {\n global $base_url;\n\n // Let menu_execute_active_handler() know that a menu rebuild may be required.\n variable_set('menu_rebuild_needed', TRUE);\n\n // Register updated node document.\n drupal_set_message(t('Don\\'t forget to register your changes with DataONE'), 'warning');\n $register_url = $base_url . '/admin/config/services/dataone/register/';\n $selected_versions = variable_get(DATAONE_VARIABLE_API_VERSIONS);\n foreach ($selected_versions as $version => $label) {\n $register_version_url = $register_url . $version;\n drupal_set_message(t('Register @ver: !url', array('@ver' => $label, '!url' => $register_version_url)), 'warning');\n }\n\n}", "function psc_edit_form($form_id=null) {\n\tglobal $wpdb, $psc;\n\t\n\tif($form_id) {\n\t\t$form = $wpdb->get_results('SELECT * FROM '.$psc->forms.' WHERE id=\"'.$form_id.'\"');\n\t}\n\t\n\t$categories = $wpdb->get_results('SELECT * FROM '.$wpdb->prefix.'terms');\n\t$stati = array('pending', 'draft', 'published');\n\t$field_types = array('text', 'textarea', 'hidden', 'select', 'multiselect', 'radio', 'checkbox', 'file');\n\t\n\tif(isset($form) && count($form)===0) {\n\t\techo 'Sorry, but a form with that ID does not exist.';\n\t} else {\n\t\tif(isset($form[0]->data)) {\n\t\t\t$fields = unserialize($form[0]->data);\n\t\t} else {\n\t\t\t$form = array(\n\t\t\t\t(object) array(\n\t\t\t\t\t'name' => '',\n\t\t\t\t\t'slug' => '',\n\t\t\t\t\t'default_category' => '',\n\t\t\t\t\t'default_status' => 'pending',\n\t\t\t\t\t'thanks_url' => '',\n\t\t\t\t\t'captcha' => 0\n\t\t\t\t)\n\t\t\t);\n\t\t\t$fields = array();\n\t\t}\n\t\t// Edit the form!!\n\t\techo '\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br /></div>\n\t\t\t<h2>Edit Form</h2>';\n\t\t\tif($form_id) {\n\t\t\t\techo '<form name=\"post\" action=\"'.get_bloginfo('siteurl').'/wp-admin/admin.php?page=publicly-submitted-content/admin&action=edit_form&id='.$form_id.'\" method=\"post\" id=\"post\">';\n\t\t\t} else {\n\t\t\t\techo '<form name=\"post\" action=\"'.get_bloginfo('siteurl').'/wp-admin/admin.php?page=publicly-submitted-content/admin&action=new_form\" method=\"post\" id=\"post\">';\n\t\t\t}\n\t\t\twp_nonce_field('psc_nonce_field', 'psc_save');\n\t\t\techo '\n\t\t\t\t<div id=\"post-body\">\n\t\t\t\t\t<div id=\"post-body-content\">\n\t\t\t\t\t\t<div id=\"titlediv\">';\n\t\t\t\t\t\tif($form_id) { echo '<input type=\"hidden\" name=\"psc_id\" value=\"'.$form_id.'\" />'; }\n\t\t\t\t\t\techo '<div id=\"titlewrap\">\n\t\t\t\t\t\t\t\t<label class=\"hide-if-no-js\" style=\"visibility:hidden\" id=\"title-prompt-text\" for=\"title\">Enter name here</label>';\n\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\techo '<input type=\"text\" name=\"title\" size=\"30\" tabindex=\"1\" value=\"'.$form[0]->name.'\" id=\"title\" autocomplete=\"off\" />';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\techo '<input type=\"text\" name=\"title\" size=\"30\" tabindex=\"1\" value=\"\" id=\"title\" autocomplete=\"off\" />';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t\t<div id=\"edit-slug-box\">\n\t\t\t\t\t\t\t\t\t<strong>Slug:</strong> ';\n\t\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" id=\"form_slug\" name=\"slug\" value=\"'.$form[0]->slug.'\" /><span id=\"sample-permalink\">'.$form[0]->slug.'</span>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" id=\"form_slug\" name=\"slug\" value=\"\" /><span id=\"sample-permalink\"></span>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div id=\"form_edit_options\" class=\"postbox fieldItem\">\n\t\t\t\t\t\t\t\t<h3 class=\"hndle\"><span>Form Options</span></h3>\n\t\t\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t\t\t<div class=\"select\">\n\t\t\t\t\t\t\t\t\t\t<label for=\"default_category\">Default Category</label>\n\t\t\t\t\t\t\t\t\t\t<select name=\"default_category\" id=\"default_category\">';\n\t\t\t\t\t\t\t\t\t\tforeach($categories as $category) {\n\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$category->term_id.'\"';\n\t\t\t\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\t\t\t\tif($category->term_id==$form[0]->default_category) { echo ' selected=\"selected\"'; }\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tif($category->slug=='publicly_submitted_content') { echo ' selected=\"selected\"'; }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\techo '>'.$category->name.'</option>'.\"\\r\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\techo '</select>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"select\">\n\t\t\t\t\t\t\t\t\t\t<label for=\"default_status\">Default Status</label>\n\t\t\t\t\t\t\t\t\t\t<select name=\"default_status\" id=\"default_status\">';\n\t\t\t\t\t\t\t\t\t\tforeach($stati as $state) {\n\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$state.'\"';\n\t\t\t\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\t\t\t\tif($state==$form[0]->default_status) { echo ' selected=\"selected\"'; }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\techo '>'.ucfirst($state).'</option>'.\"\\r\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\techo '</select>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"checkbox\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\"';\n\t\t\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\t\t\tif($form[0]->captcha==1) { echo ' checked'; }\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo ' name=\"captcha\" id=\"captcha_option\" />';\n\t\t\t\t\t\t\t\t\t\techo '<label for=\"captcha_option\">Use Captcha?</label>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t\t\techo '<div id=\"psc_catcha_info\" style=\"display:none\">\n\t\t\t\t\t\t\t\t\t\t<p>You must enter a re:Captcha public &amp; private keys in order to utilize captcha.</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"public_key\" id=\"api_key\" value=\"'.get_option('psc_recaptch_public_key').'\" />\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"private_key\" id=\"private_key\" value=\"'.get_option('psc_recaptch_private_key').'\" />\n\t\t\t\t\t\t\t\t\t<div class=\"text\">\n\t\t\t\t\t\t\t\t\t\t<label for=\"thanks_url\">Thanks Redirect <span class=\"small\">(leave blank to not use a redirect or if the redirect is causing a blank page.)</span></label>\n\t\t\t\t\t\t\t\t\t\t<div class=\"thanksLink\">\n\t\t\t\t\t\t\t\t\t\t\t'.get_bloginfo('siteurl').'<input type=\"text\" name=\"thanks_url\" id=\"thanks_url\" value=\"';\n\t\t\t\t\t\t\t\t\t\t\tif($form_id) { echo $form[0]->thanks_url; }\n\t\t\t\t\t\t\t\t\t\t\techo '\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div id=\"major-publishing-actions\">\n\t\t\t\t\t\t\t\t<div id=\"delete-action\">\n\t\t\t\t\t\t\t\t\t<a class=\"submitdelete deletion\" href=\"#\">Delete Form</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div id=\"publishing-action\">\n\t\t\t\t\t\t\t\t\t<input name=\"save\" type=\"submit\" class=\"button-primary\" id=\"publish\" tabindex=\"5\" accesskey=\"p\" value=\"Save Form\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t<div id=\"normal-sortables\" class=\"meta-box-sortables ui-sortable fieldItems\">\n\t\t\t\t\t\t\t\t';\n\t\t\t\t\t\t\tif(!$form_id) {\n\t\t\t\t\t\t\t\t$key = 0;\n\t\t\t\t\t\t\t\techo '<div id=\"field'.$key.'item\" class=\"postbox fieldItem\">\n\t\t\t\t\t\t\t\t<div class=\"handlediv\" title=\"Click to toggle\"><br></div><h3 class=\"hndle\"><span>[Label]</span></h3>\n\t\t\t\t\t\t\t\t<div class=\"inside\" style=\"display:block;\">\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"deleteFieldItem\">Delete Field</a>\n\t\t\t\t\t\t\t\t\t<div class=\"text\"><label for=\"field'.$key.'label\">Label</label><input type=\"text\" name=\"data['.$key.'][label]\" class=\"fieldlabel\" id=\"field'.$key.'label\" value=\"\" /></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"text\"><label for=\"field'.$key.'slug\">Slug/ID/Name</label><input type=\"text\" name=\"data['.$key.'][slug]\" class=\"slugify\" id=\"field'.$key.'slug\" value=\"\" /></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"select\"><label for=\"field'.$key.'type\">Type</label><select name=\"data['.$key.'][type]\" class=\"fieldtype\" id=\"field'.$key.'type\">';\n\t\t\t\t\t\t\t\t\t\tforeach($field_types as $field_type) {\n\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$field_type.'\">';\n\t\t\t\t\t\t\t\t\t\t\tif($field_type=='file') { echo 'Image'; } else { echo ucfirst($field_type); }\n\t\t\t\t\t\t\t\t\t\t\techo '</option>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\techo '</select></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"text options\" style=\"display:none;\"><label for=\"field'.$key.'options\">Options</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"data['.$key.'][options]\" id=\"field'.$key.'options\" value=\"\" />\n\t\t\t\t\t\t\t\t\t<p class=\"small\">(comma separated list of options for select, multiselect, checkbox, and radio types)</p></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"checkbox\"><input type=\"checkbox\" name=\"data['.$key.'][required]\" id=\"field'.$key.'required\" /><label for=\"field'.$key.'required\">Required</label></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"checkbox\"><input type=\"checkbox\" name=\"data['.$key.'][maps_as]\" id=\"field'.$key.'maps_as\" /><label for=\"field'.$key.'maps_as\">Use this as the \"post content\"</label></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tforeach($fields as $key => $field) {\n\t\t\t\t\t\t\t\t\techo '<div id=\"field'.$key.'item\" class=\"postbox fieldItem closed\">\n\t\t\t\t\t\t\t\t\t<div class=\"handlediv\" title=\"Click to toggle\"><br></div><h3 class=\"hndle\"><span>'.$field['label'].'</span></h3>\n\t\t\t\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"deleteFieldItem\">Delete Field</a>\n\t\t\t\t\t\t\t\t\t\t<div class=\"text\"><label for=\"field'.$key.'label\">Label</label><input type=\"text\" name=\"data['.$key.'][label]\" class=\"fieldlabel\" id=\"field'.$key.'label\" value=\"'.$field['label'].'\" /></div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"text\"><label for=\"field'.$key.'slug\">Slug/ID/Name</label><input type=\"text\" name=\"data['.$key.'][slug]\" class=\"slugify\" id=\"field'.$key.'slug\" value=\"'.str_replace('psc_', '', $field['slug']).'\" /></div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"select\"><label for=\"field'.$key.'type\">Type</label><select name=\"data['.$key.'][type]\" class=\"fieldtype\" id=\"field'.$key.'type\">';\n\t\t\t\t\t\t\t\t\t\t\tforeach($field_types as $field_type) {\n\t\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$field_type.'\"';\n\t\t\t\t\t\t\t\t\t\t\t\tif($field_type==$field['type']) { echo ' selected=\"selected\"'; }\n\t\t\t\t\t\t\t\t\t\t\t\techo '>';\n\t\t\t\t\t\t\t\t\t\t\t\tif($field_type=='file') { echo 'Image'; } else { echo ucfirst($field_type); }\n\t\t\t\t\t\t\t\t\t\t\t\techo '</option>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo '</select></div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"text options\"';\n\t\t\t\t\t\t\t\t\t\tif(!in_array($field['type'], array('select', 'multiselect', 'radio', 'checkbox'))) {\n\t\t\t\t\t\t\t\t\t\t\techo ' style=\"display:none;\"';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo '><label for=\"field'.$key.'options\">Options</label>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"data['.$key.'][options]\" id=\"field'.$key.'options\" value=\"';\n\t\t\t\t\t\t\t\t\t\tif(isset($field['options']) && !empty($field['options'])) { echo implode(',', $field['options']); }\n\t\t\t\t\t\t\t\t\t\techo '\" />\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"small\">(comma separated list of options for select, multiselect, checkbox, and radio types)</p>\n\t\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"checkbox\"><input type=\"checkbox\" name=\"data['.$key.'][required]\" id=\"field'.$key.'required\"';\n\t\t\t\t\t\t\t\t\t\tif($field['required']=='true') {\n\t\t\t\t\t\t\t\t\t\t\techo ' checked';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo ' /><label for=\"field'.$key.'required\">Required</label></div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"checkbox\"><input type=\"checkbox\"';\n\t\t\t\t\t\t\t\t\t\tif(isset($field['maps_as']) && $field['maps_as']=='content') {\n\t\t\t\t\t\t\t\t\t\t\techo ' checked';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo ' name=\"data['.$key.'][maps_as]\" id=\"field'.$key.'maps_as\" /><label for=\"field'.$key.'maps_as\">Use this as the \"post content\"</label></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t</div><input type=\"hidden\" id=\"psckeycount\" value=\"'.($key+1).'\" />\n\t\t\t\t\t\t\t<a id=\"add_form_field\" class=\"preview button\" href=\"#\">Add form field</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</form>';\n\t}\n}", "public function createComponentEditForm(){\n $frm = $this->formFactory->create();\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n \n //query database for listing type\n $FE = $this->listings->isFE($listingID);\n $MS = $this->listings->isMultisig($listingID);\n \n //checkbox value rendering logic\n $checkVal = array();\n \n if ($MS){\n $checkVal[\"ms\"] = \"ms\";\n }\n \n if ($FE){\n $checkVal[\"fe\"] = \"fe\";\n }\n \n $this->lHelp->constructCheckboxList($frm)->setValue($checkVal);\n \n //discard option array\n unset($checkVal);\n\n $cnt = count ($this->postageOptions); \n $session = $this->hlp->sess(\"postage\");\n\n \n for ($i = 0; $i<$cnt; $i++){\n\n $frm->addText(\"postage\" . $i, \"Doprava\");\n $frm->addText(\"pprice\" . $i, \"Cena dopravy\");\n\n }\n \n //additional postage textboxes logic\n $counter = $session->counterEdit;\n $values = $session->values;\n \n if (!is_null($counter)){\n \n $frm->addGroup(\"Postage\");\n \n for ($i =0; $i<$counter; $i++){\n $frm->addText(\"postage\" .$i. \"X\", \"Doprava\"); \n $frm->addText(\"pprice\" .$i. \"X\", \"Cena\");\n }\n }\n \n $frm->addSubmit(\"submit\", \"Upravit\");\n $frm->addSubmit(\"add_postage\", \"Přidat dopravu\")->onClick[] = \n \n function() use($listingID) {\n \n //inline onlclick handler, that counts postage options\n $session = $this->hlp->sess(\"postage\");\n $counter = &$session->counterEdit;\n \n if ($counter <= self::MAX_POSTAGE_OPTIONS){\n $counter++;\n } else {\n $this->flashMessage(\"Dosáhli jste maxima poštovních možností.\");\n }\n \n $form = $this->getComponent(\"editForm\");\n $session->values = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:editListing\", $listingID);\n };\n \n $this->lHelp->fillForm($frm, $values); \n $frm->onSuccess[] = array($this, 'editSuccess');\n $frm->onValidate[] = array($this, 'editValidate');\n \n return $frm; \n }", "public function edit_submit() {\n if (User::is_logged_in()) {\n// check if form wasn't submitted for a second time\n if(isset($_POST['token']) && isset($_SESSION[$_POST['token']])) {\n unset($_SESSION[$_POST['token']]);\n\n if (isset($_POST['edit'])) {\n // edit post\n $change_picture = null;\n if (isset($_POST['form-change-picture']) && isset($_FILES['picture'])) {\n $change_picture = true;\n }\n Post::edit($_POST['description'], $_POST['category'], $_FILES['picture'], $_GET['post_id'], $change_picture);\n } else if (isset($_POST['delete'])) {\n //delete post\n Post::delete($_GET['post_id']);\n }\n } else {\n // form was submitted for the second time\n// redirect to home page\n call('posts', 'index');\n Message::info('Second attempt to submit a form was denied.');\n }\n }\n }", "function dolist_messages_mail_admin_bundle_form_submit($form, &$form_state) {\n\n $bundle = new stdClass();\n\n if(!$form_state['values']['locked']) {\n $bundle->bundle = trim($form_state['values']['bundle']);\n } else {\n $bundle->bundle = $form['#messages_bundle']->bundle;\n }\n\n $bundle->locked = 1;\n\n $bundle->name = trim($form_state['values']['name']);\n\n $variables = $form_state['values'];\n\n // Remove everything that's been saved already - whatever's left is assumed\n // to be a persistent variable.\n foreach ($variables as $key => $value) {\n if (isset($bundle->$key)) {\n unset($variables[$key]);\n }\n }\n\n unset($variables['form_token'], $variables['op'], $variables['submit'], $variables['delete'], $variables['reset'], $variables['form_id'], $variables['form_build_id']);\n\n\n $status = dolist_messages_mail_bundle_save($bundle);\n\n $t_args = array('%name' => $bundle->name);\n\n if ($status == SAVED_UPDATED) {\n drupal_set_message(t('The message bundle %name has been updated.', $t_args));\n }\n elseif ($status == SAVED_NEW) {\n drupal_set_message(t('The message bundle %name has been added.', $t_args));\n watchdog('node', 'Added message bundle %name.', $t_args, WATCHDOG_NOTICE, l(t('view'), 'admin/structure/dolist/messagesmail'));\n }\n\n $form_state['redirect'] = 'admin/structure/dolist/messagesmail';\n return;\n}", "public function hydrateeditcontactformAction()\r\n {\r\n\r\n // Check Post\r\n if (!$this->getRequest()->isPost())\r\n die();\r\n\r\n $params = $this->getRequest()->getParams();\r\n $contactId = $params['contactId'];\r\n\r\n $contacts = new Application_Model_DbTable_Contact();\r\n $contact = $contacts->fetchOne($contactId);\r\n $this->_helper->json($contact);\r\n\r\n }", "function lib4ridora_ingest_selector_form_submit(array $form, array &$form_state) {\n module_load_include('inc', 'xml_form_builder', 'includes/associations');\n module_load_include('inc', 'lib4ridora', 'includes/utilities');\n module_load_include('inc', 'lib4ridora', 'includes/citation.subtypes');\n $association_step_storage = &islandora_ingest_form_get_step_storage($form_state, 'xml_form_builder_association_step');\n $association_step_storage['journal_import_method'] = $form_state['values']['journal_import_method'];\n $association_step_storage['doi'] = $form_state['values']['doi'];\n $association_step_storage['ingest_selector'] = $form_state['values']['ingest_selector'];\n\n $subtype = $form_state['values']['ingest_selector'];\n $subtypes = lib4ridora_citation_form_subtypes();\n $form_name = $subtypes[$subtype]['form'];\n foreach (xml_form_builder_get_associations(array($form_name), array(), array('MODS')) as $key => $association) {\n // Update the content_model to be ir:citationCModel so that regardless of\n // the form used it will only have the ir:citationCModel.\n $association['content_model'] = \"ir:citationCModel\";\n $association_step_storage['association'] = $association;\n break;\n }\n if (!isset($association_step_storage['association'])) {\n form_set_error('ingest_selector', t('A form could not be determined for the selected publication type.'));\n }\n}", "public function editobject($data, Form $form, $request)\n {\n Versioned::set_stage('Stage');\n\n // allow extensions to change the object state just before creating.\n $this->extend('updateObjectBeforeEdit', $this->editObject);\n\n if ($this->editObject->hasMethod('onBeforeFrontendEdit')) {\n $this->editObject->onBeforeFrontendEdit($this);\n }\n\n try {\n $form->saveInto($this->editObject);\n } catch (ValidationException $ve) {\n $form->sessionMessage(\"Could not upload file: \" . $ve->getMessage(), 'bad');\n $this->redirect($this->data()->Link());\n return;\n }\n\n // get workflow\n $workflowID = $this->data()->WorkflowDefinitionID;\n $workflowDef = false;\n if ($workflowID && $this->editObject->hasExtension(WorkflowApplicable::class)) {\n if ($workflowDef = WorkflowDefinition::get()->byID($workflowID)) {\n $this->editObject->WorkflowDefinitionID = $workflowID;\n }\n }\n\n if (Extensible::has_extension($this->CreateType, Versioned::class)) {\n $this->editObject->write('Stage');\n if ($this->PublishOnCreate) {\n $this->editObject->doPublish();\n }\n } else {\n $this->editObject->write();\n }\n\n // start workflow\n if ($this->editObject->hasExtension(WorkflowApplicable::class)) {\n $svc = singleton(WorkflowService::class);\n $workflowForObj = $svc->getWorkflowFor($this->editObject);\n if (!$workflowForObj) {\n // Only start a workflow if not in the middle of one.\n $svc->startWorkflow($this->editObject);\n }\n }\n\n $this->extend('objectEdited', $this->editObject);\n // let the object be updated directly\n // if this is a versionable object, it'll be edited on stage\n $this->editObject->invokeWithExtensions('frontendEdited');\n\n $link = $this->data()->Link(\"edit/{$this->editObject->ID}\");\n $link = $link . (strpos($link, \"?\") !== false ? \"&\" : \"?\") . \"edited=1\";\n\n $this->redirect($link);\n }", "function guifi_domain_form_submit($form, &$form_state) {\n guifi_log(GUIFILOG_TRACE,'function guifi_domain_form_submit()',\n $form_state);\n\n if ($form_state['values']['id'])\n if (!guifi_domain_access('update',$form_state['values']['id']))\n {\n drupal_set_message(t('You are not authorized to edit this domain','error'));\n return;\n }\n\n switch ($form_state['clicked_button']['#value']) {\n case t('Reset'):\n drupal_set_message(t('Reset was pressed, ' .\n 'if there was any change, was not saved and lost.' .\n '<br />The domain information has been reloaded ' .\n 'from the current information available at the database'));\n drupal_goto('guifi/domain/'.$form_state['values']['id'].'/edit');\n break;\n case t('Save & continue edit'):\n case t('Save & exit'):\n\n $id = guifi_domain_save($form_state['values']);\n if ($form_state['clicked_button']['#value'] == t('Save & exit'))\n drupal_goto('guifi/domain/'.$id);\n drupal_goto('guifi/domain/'.$id.'/edit');\n break;\n default:\n guifi_log(GUIFILOG_TRACE,\n 'exit guifi_domain_form_submit without saving...',$form_state['clicked_button']['#value']);\n return;\n }\n\n}", "function main() {\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tprint_r($_POST);\n\t\t\techo \"<br />\";\n\t\t\t\n\t\t\t// Required Fields in the POST data //\t\t\t\n\t\t\tif ( !isset($_POST['_type']) ) return;\n\t\t\tif ( !isset($_POST['_subtype']) ) return;\n\t\t\tif ( !isset($_POST['_name']) ) return;\n\t\t\tif ( !isset($_POST['_mail']) ) return;\n\t\t\tif ( !isset($_POST['_password']) ) return;\n\t\t\tif ( !isset($_POST['_publish']) ) return;\n\t\n\t\t\t// Node Type //\n\t\t\t$type = sanitize_NodeType($_POST['_type']);\n\t\t\tif ( empty($type) ) return;\t\n\n\t\t\t$subtype = sanitize_NodeType($_POST['_subtype']);\n\t\n\t\t\t// Name/Title //\n\t\t\t$name = $_POST['_name'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Slug //\n\t\t\tif ( empty($_POST['_slug']) )\n\t\t\t\t$slug = $_POST['_name'];\n\t\t\telse\n\t\t\t\t$slug = $_POST['_slug'];\n\t\t\t$slug = sanitize_Slug($slug);\n\t\t\tif ( empty($slug) ) return;\n\t\t\t\n\t\t\t// TODO: Confirm slug is legal\n\t\t\t\t\n\t\t\t// Body //\n\t\t\t$body = $_POST['_body'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Do we publish? //\n\t\t\t$publish = mb_strtolower($_POST['_publish']) == \"true\";\n\t\t\t\n\t\t\t// Email //\n\t\t\t$mail = sanitize_Email($_POST['_mail']);\n\t\t\tif ( empty($mail) ) return;\n\n\t\t\t// Password //\n\t\t\t$password = $_POST['_password'];\n\t\t\tif ( empty($password) ) return;\n\n\t\n\t\t\t$id = node_Add(\n\t\t\t\t$type,$subtype,$slug,$name,$body,\n\t\t\t\t0,2,\n\t\t\t\t$publish\n\t\t\t);\n\t\t\t\n\t\t\tuser_Add($id,$mail,$password);\n\t\n\t\t\techo \"Added \" . $id . \".<br />\";\n\t\t\techo \"<br />\";\n\t\t}\n\t}", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function actionEdit()\n {\n $fieldId = (int)$this->post('id') | $this->get('id');\n $field = $this->seoFieldsModel->getField($fieldId);\n\n if (!$field) {\n clsCommon::redirect301('Location: ' . ADMIN_PATH . '/seofields');\n }\n\n if ($this->post()) {\n if (!clsSeoFields::validateFieldName($this->post('name'))) {\n $error = clsAdminCommon::getAdminMessage(\n 'error_field_az',\n ADMIN_ERROR_BLOCK,\n array('{%fieldname}' => 'Name')\n );\n $this->error->setError($error, 1, false, true);\n } else {\n $field->setName($this->post('name'));\n $updateRes = $this->seoFieldsModel->updateField($field);\n switch ($updateRes) {\n case clsSeoFields::STATUS_FIELD_ALREADY_EXISTS :\n $this->error->setError(\n 'Field with name ' . $field->getName() . ' already exists.',\n 1,\n false,\n true\n );\n break;\n case clsSeoFields::STATUS_FAIL :\n case clsSeoFields::STATUS_FIELD_NOT_EXISTS :\n $this->error->setError('Field has not been updated.', 1, false, true);\n break;\n default:\n $actionStatus = clsAdminCommon::getAdminMessage(\n 'succ_edit_entity',\n ADMIN_ERROR_BLOCK,\n array('{%entity}' => $this->entity, '{%entityname}' => $field->getName())\n );\n $this->error->setError($actionStatus, 1, true, true);\n clsCommon::redirect301('Location: ' . ADMIN_PATH . '/seofields/index');\n }\n }\n }\n $this->parser->field = $field;\n return $this->parser->render('@main/pages/seo/admin/seofields/edit.html');\n }", "function multisite_aggregate_type_form($form, &$form_state, $aggregate_type, $op = 'edit') {\n if ($op == 'clone') {\n $aggregate_type->label .= ' (cloned)';\n $aggregate_type->type = '';\n }\n\n $form['label'] = array(\n '#title' => t('Label'),\n '#type' => 'textfield',\n '#default_value' => $aggregate_type->label,\n '#description' => t('The human-readable name of this multisite aggregate type.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n $form['type'] = array(\n '#type' => 'machine_name',\n '#default_value' => isset($aggregate_type->type) ? $aggregate_type->type : '',\n '#maxlength' => 32,\n '#machine_name' => array(\n 'exists' => 'multisite_aggregate_get_types',\n 'source' => array('label'),\n ),\n '#description' => t('A unique machine-readable name for this multisite aggregate type. It must only contain lowercase letters, numbers, and underscores.'),\n );\n\n $form['source'] = array(\n '#type' => 'fieldset',\n '#title' => t('Source'),\n );\n // Only nodes are allowed for now\n $form['source']['source_type'] = array(\n '#type' => 'hidden',\n '#value' => 'node',\n );\n $form['source']['source_bundle'] = array(\n '#type' => 'select',\n '#title' => t('Node bundle'),\n '#options' => node_type_get_names(),\n '#default_value' => !empty($aggregate_type->source_bundle),\n );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save aggregate type'),\n '#weight' => 40,\n );\n return $form;\n}", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}" ]
[ "0.7503424", "0.72289693", "0.66206306", "0.65316916", "0.6489455", "0.64525265", "0.64298", "0.63958144", "0.6388495", "0.6169524", "0.6124327", "0.61211413", "0.60745347", "0.6058325", "0.5982858", "0.5959377", "0.5955767", "0.5938314", "0.59210277", "0.5911633", "0.5896756", "0.5875314", "0.58536404", "0.5815118", "0.5804993", "0.5777878", "0.5773557", "0.5771843", "0.5771723", "0.57537663", "0.5746488", "0.5734428", "0.57192445", "0.5716483", "0.5709501", "0.5701156", "0.568079", "0.5680277", "0.5659611", "0.5658646", "0.5647339", "0.56469893", "0.56388384", "0.5601356", "0.5591847", "0.5585158", "0.5584921", "0.5581813", "0.5571217", "0.55559224", "0.55523163", "0.55477035", "0.5536538", "0.552485", "0.55188", "0.55123997", "0.54995096", "0.5494864", "0.54919374", "0.549177", "0.54915273", "0.5490657", "0.5490123", "0.5487787", "0.5486569", "0.54766756", "0.5467306", "0.5456461", "0.5446687", "0.5436567", "0.54318506", "0.54169977", "0.54167837", "0.54088765", "0.53943646", "0.53886026", "0.5388062", "0.53799736", "0.5377114", "0.5375497", "0.5372111", "0.53689367", "0.5364518", "0.5360285", "0.5355306", "0.53521174", "0.53473353", "0.5337693", "0.53352535", "0.53349876", "0.53324115", "0.5331498", "0.53234506", "0.5322554", "0.5320323", "0.5314758", "0.5305845", "0.5298011", "0.529225", "0.52895075" ]
0.75950235
0
Helper function Rename a mongo collection.
function _mongo_node_rename_collection($old_entity_type, $new_entity_type) { $mongodb = mongodb(); // Get connection and database name by forcing call to __toString(). $m = $mongodb->connection; $database = sprintf('%s', $mongodb); $admin_db = $m->admin; $res = $admin_db->command(array( "renameCollection" => $database . ".fields_current." . $old_entity_type, "to" => $database . ".fields_current." . $new_entity_type, )); $res = $admin_db->command(array( "renameCollection" => $database . "." . $old_entity_type . "_ids", "to" => $database . "." . $new_entity_type . "_ids", )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCollectionName($name);", "protected function dropCollection($name)\n {\n if ($this->mongodb) {\n try {\n $this->mongodb->createCommand()->dropCollection($name);\n } catch (Exception $e) {\n // shut down exception\n }\n }\n }", "public function createCollection($name) {}", "public function setMongo(&$collection) {\n $this->collection = $collection;\n }", "public function getCollectionName()\n {\n if (isset($this->collection)) {\n return $this->collection;\n }\n\n $reflector = new ReflectionClass($this);\n $str = new Str;\n\n return $str->lower(\n $str->plural(\n $str->snake(\n $reflector->getShortName()\n )\n )\n );\n }", "public function getName(): string\n {\n return 'mongo';\n }", "public static function factory($name)\n {\n return Mongo_Document::factory($name)->collection(TRUE);\n }", "public function rename_db($oldname, $newname) {\n return UPS_SUCCESS;\n }", "public function getCollectionName()\n {\n return $this->collectionName;\n }", "public function drop($collection_name) {\r\n\t\t$collection = $this->database->selectCollection($collection_name);\r\n\t\tvar_dump($collection);\r\n\t\treturn $collection->drop();\r\n\t}", "static protected function _createMongoCollection($config)\n {\n if(!isset($config['server'])){\n $server = \"mongodb://localhost:27017\";\n } else {\n $server = $config['server'];\n }\n if(!isset($config['options']) || !is_array($config['options'])){\n $options = array();\n } else {\n $options = $config['options'];\n }\n $mongo = new MongoDb($server, $options);\n return $mongo->selectDB($config['database'])\n ->selectCollection($config['collection']);\n }", "function getCollection($name);", "private function getDBCollection($collection)\n {\n return $this->database . '.' . $collection;\n }", "public static function collectionName()\n {\n return 'staff';\n }", "public function setCollection()\n {\n $cl = $this->nameCollection;\n $this->collection = self::$database->$cl;\n }", "function setupmongo(){\n $mongo = new MongoClient(\"mongodb://technicolor:testbed@localhost/backendtest\");\n $collection = $mongo->selectDB('backendtest')->selectCollection('user');\n return $collection;\n}", "static function drop($collection) {\n global $mongo;\n $col = $mongo->selectCollection(MONGODB_NAME, $collection);\n\n return $col->drop();\n }", "protected function dropFileCollection($name = 'fs')\n {\n if ($this->mongodb) {\n try {\n $this->mongodb->getFileCollection($name)->drop();\n } catch (Exception $e) {\n // shut down exception\n }\n }\n }", "public function setName(string $collection): self\n {\n $this->setOption('name', $collection);\n\n return $this;\n }", "public function collection(string $name): CollectionRef\n {\n return new CollectionRef(documents: $this, name: $name);\n }", "public static function collectionName(): string\n {\n return config('howToAddon.collection', 'how_to_addon_videos');\n }", "function setDbcoll($collection){\n $this->collection = $collection;\n $this->dbdotcoll = $this->mdb.'.'.$this->collection;\n }", "public function __get($name)\n {\n return new \\MongoCollection($this->getMongoDB(), $name);\n }", "function mongo_lite($collection, $name = 'default')\n\t{\n\t\t$connection = \\Hexcores\\MongoLite\\Connection::instance($name);\n\n\t\treturn new \\Hexcores\\MongoLite\\Query($connection->collection($collection));\n\t}", "protected function getCollectionName()\n {\n $configCollectionName = config('postman.collectionName');\n \n if (!empty($configCollectionName)) {\n \n return $configCollectionName;\n }\n \n return $this->ask('Enter collection name', 'LaravelPostman Collection');\n }", "public function getCollection($name) {}", "public function testCreateReplaceDocumentAndDeleteDocumentInExistingCollection()\n {\n $collectionName = $this->TESTNAMES_PREFIX . 'CollectionTestSuite-Collection';\n $requestBody = ['name' => 'Frank', 'bike' => 'vfr', '_key' => '1'];\n\n $document = new Document($this->client);\n\n /** @var HttpResponse $responseObject */\n $responseObject = $document->create($collectionName, $requestBody);\n $responseBody = $responseObject->body;\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertArrayNotHasKey('error', $decodedJsonBody);\n\n $this->assertEquals($collectionName . '/1', $decodedJsonBody['_id']);\n\n $requestBody = ['name' => 'Mike'];\n\n $document = new Document($this->client);\n\n $responseObject = $document->replace($collectionName . '/1', $requestBody);\n $responseBody = $responseObject->body;\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertArrayNotHasKey('error', $decodedJsonBody);\n\n $this->assertEquals($collectionName . '/1', $decodedJsonBody['_id']);\n\n $document = new Document($this->client);\n\n $responseObject = $document->get($collectionName . '/1', $requestBody);\n $responseBody = $responseObject->body;\n\n $this->assertArrayNotHasKey('bike', json_decode($responseBody, true));\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertEquals('Mike', $decodedJsonBody['name']);\n\n $this->assertEquals($collectionName . '/1', $decodedJsonBody['_id']);\n\n $responseObject = $document->delete($collectionName . '/1');\n $responseBody = $responseObject->body;\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertArrayNotHasKey('error', $decodedJsonBody);\n\n // Try to delete a second time .. should throw an error\n $responseObject = $document->delete($collectionName . '/1');\n $responseBody = $responseObject->body;\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertArrayHasKey('error', $decodedJsonBody);\n $this->assertEquals(true, $decodedJsonBody['error']);\n\n $this->assertEquals(true, $decodedJsonBody['error']);\n\n $this->assertEquals(404, $decodedJsonBody['code']);\n\n $this->assertEquals(1202, $decodedJsonBody['errorNum']);\n }", "protected function setCollection($collectionName)\n {\n if (!isset($this->_collection))\n {\n $db = Yii::app()->getComponent($this->connectionID);\n if (!($db instanceof EMongoDB))\n {\n throw new EMongoException('EMongoHttpSession.connectionID is invalid');\n }\n\n $this->_collection = $db->getDbInstance()->selectCollection($collectionName);\n }\n\n return $this->_collection;\n }", "public function collection($collection_name) {\n return $this->db->selectCollection(\\App\\Config::get('dbName'), $collection_name);\n }", "public function getTestCollection($drop = true)\n\t{\n\t\t$collection = $this->client->mongominify->test;\n\t\tif ($drop)\n\t\t{\n\t\t\t$collection->drop();\n\t\t}\n\t\treturn $collection;\n\t}", "public function edmsMongoCollection($collectionName,$dbName=null,$connectionId = null)\r\n\t{\r\n\t\tif (empty($dbName))\r\n\t\t\t$dbName = $this->edmsGetDbName($connectionId);\r\n\r\n\t\tif (empty($connectionId))\r\n\t\t\t$connectionId = $this->edmsGetConnectionId();\r\n\r\n\r\n\t\tif (!isset(self::$_collection))\r\n\t\t\tself::$_collection = array();\r\n\r\n\r\n\t\tif (!isset(self::$_collection[$connectionId][$dbName][$collectionName]))\r\n\t\t{\r\n\t\t\tif ($this->edmsIsDebugMode())\r\n\t\t \t self::edmsLog(\"Selecting collection: $collectionName.$dbName.$connectionId\",\r\n\t\t \t \t \"edms.debug.collection.$connectionId.$dbName.$collectionName\");\r\n\r\n\t\t\t$collection = $this->edmsMongoDb($dbName,$connectionId)->selectCollection($collectionName);\r\n\t\t\tself::$_collection[$connectionId][$dbName][$collectionName] = $collection;\r\n\t\t}\r\n\r\n\r\n\t\treturn self::$_collection[$connectionId][$dbName][$collectionName];\r\n\t}", "public function _dropCollection($collection = '') {\n $this->connTemp->selectCollection($collection)->drop();\n //add other cleanup if required\n return true; \n }", "public function setUp() {\n\t\t\t\t$m = new Mongo();\n\t\t\t\t$this->object = $m->selectCollection(\"phpunit\", \"c\");\n\t\t\t\t$this->object->drop();\n\t\t}", "public function getName()\n {\n return 'weasty_doctrine_collection';\n }", "public static function getCollectionClassName($className) {\n\t\ttx_pttools_assert::isNotEmptyString($className);\n\t\t\n\t\t// create object collection\n $collectionClassName = $className . 'Collection';\n\n // Fallback if collection class does not exist\n $collectionClassName = class_exists($collectionClassName) ? $collectionClassName : 'tx_tcaobjects_objectCollection';\n\t\t\n\t\treturn $collectionClassName;\n\t}", "public function getName()\n {\n return 'facile_mongo_db_extesion';\n }", "public function testRenameTo()\n {\n /*\n * remove all tables\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->fixture->getDBObject()->simpleQuery('DROP TABLE '. $table['Tables_in_'.$this->fixture->a['db_name']]);\n }\n\n /*\n * create fresh store and check tables\n */\n $this->fixture->setup();\n\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $this->dbConfig['db_table_prefix'].'_')\n );\n }\n\n /*\n * rename store\n */\n $prefix = 'new_store';\n $this->fixture->renameTo($prefix);\n\n /*\n * check for new prefixes\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $prefix)\n );\n }\n }", "static function MC($name) { # MongoCollection\n list($db, $col)=explode(\".\", $name, 2);\n return M()->$db->sequence;\n }", "public static function updateSynonymDefinitionCollectionClient($collection, $localeCode, $responseFields = null)\n\t{\n\t\t$url = SearchUrl::updateSynonymDefinitionCollectionUrl($localeCode, $responseFields);\n\t\t$mozuClient = new MozuClient();\n\t\t$mozuClient->withResourceUrl($url)->withBody($collection);\n\t\treturn $mozuClient;\n\n\t}", "private function showCollections()\n {\n $currentDB = $this->currentDB;\n if (!empty($currentDB)) {\n $collections = $this->mongoClient->selectDatabase($currentDB)->listCollections();\n foreach ($collections as $collection) {\n $this->cli->shout(' ' . $collection->getName());\n }\n } else {\n $this->cli->error('Please select db');\n }\n }", "public static function &collection($name)\n\t{\n\t\t$collection = null;\n\t\t$name = ucfirst($name);\n\t\t$class = self::COLLECTION_CLASS_PREFIX . $name;\n\t\t\n\t\tif(!class_exists($class) && is_file(COLLPATH . $name . EXT)) {\n\t\t\trequire COLLPATH . $name . EXT;\n\t\t}\n\t\t\n\t\tif(class_exists($class)) {\n\t\t\t$collection = new $class($name);\n\t\t\t\n\t\t\tif(!is_subclass_of($collection, self::COLLECTION_BASE_CLASS)) {\n\t\t\t\tthrow new BakedCarrotOrmException(\"Class $class is not subclass of \" . self::COLLECTION_BASE_CLASS);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$class_name = self::COLLECTION_BASE_CLASS;\n\t\t\t$collection = new $class_name($name);\n\t\t}\n\t\t\n\t\treturn $collection;\n\t}", "public function __construct($mongo, $collection_name = 'error_log')\n\t{\n\t\tif ($mongo instanceof Rest_Mongo)\n\t\t{\n\t\t\t$this->_mongo = $mongo;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_mongo = Rest_Mongo::instance($mongo);\n\t\t}\n\t\t$this->_collection_name = $collection_name;\n\t}", "public function dropCollections()\n {\n $collections = $this->dbo->listCollections();\n foreach ($collections as $collection) {\n $collection->drop();\n }\n }", "private function createCollectionIfNotExists(string $name): void\n {\n if (is_null($this->collections)) {\n $this->collections = array_map(function ($collection) {\n return $collection['name'];\n }, $this->searcher->listCollections());\n }\n\n // Create the index if it's not in the list\n if (!in_array($name, $this->collections)) {\n $this->logger->info('Creating collection ' . $name);\n $this->searcher->createCollection($name);\n $this->collections[] = $name;\n }\n }", "public function rename($newname);", "public static function setTable($name = ''){\n\t\tif(! self::$db){\n\t\t\tself::setDbName();\n\t\t}\n\t\tif($name){\n\t\t\treturn self::$collection = self::$db->$name;\n\t\t}else{\n\t\t\treturn self::$collection = self::$db->$table;\n\t\t}\n\t}", "public function switch_db(string $database = ''): Manager\n\t{\n\t\tif ($database == '')\n\t\t{\n\t\t\t$this->error('To switch MongoDB databases, a new database name must be specified', __METHOD__);\n\t\t}\n\t\t\n\t\treturn $this->reconnect(['config' => array_replace_recursive($this->config, ['connection' => ['db_name' => $database]])]);\n\t}", "static function save($collection, $data) {\n global $mongo;\n $col = $mongo->selectCollection(MONGODB_NAME, $collection);\n return $col->save($data);\n }", "static function copyToNewCollection($collection2) {\n //echo \"Edge::copyToNewCollection()\\n\";\n $collection2->drop();\n foreach (self::$collection->find([]) as $lim) {\n self::store2($collection2, $lim);\n }\n self::$collection->drop();\n }", "function get_collection_name($collection_id, $collections_data)\n{\n foreach ($collections_data['collections'] as $collection) {\n if ($collection['id'] == $collection_id) {\n return $collection['title'];\n }\n }\n\n return null;\n}", "public static function collection($collectionName, $host = null, $port = self::DEFAULT_PORT, $db = self::DEFAULT_DB) {\n return self::create($host, $port, $db)->selectCollection($collectionName);\n }", "function sync($coll,$db=NULL) {\n\t\tif (!in_array('mongo',get_loaded_extensions())) {\n\t\t\t// MongoDB extension not activated\n\t\t\ttrigger_error(sprintf(self::subst(self::TEXT_PHPExt),'mongo'));\n\t\t\treturn;\n\t\t}\n\t\tif (!$db)\n\t\t\t$db=self::$vars['DB'];\n\t\tif (method_exists($this,'beforeSync') && !$this->beforeSync())\n\t\t\treturn;\n\t\t// Initialize M2\n\t\tlist($this->db,$this->collection)=array($db,$coll);\n\t\tif (method_exists($this,'afterSync'))\n\t\t\t$this->afterSync();\n\t}", "public function c($name)\n\t{\n\t\tif (is_array($name))\n\t\t{\n\t\t\t$path = '';\n\t\t\tforeach ($name as $folder) { $path = $path.'/'.$folder; }\n\t\t\treturn new Collection($this, substr($path, 1));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new Collection($this, $name);\n\t\t}\n\t}", "public function testCreateUpdateDocumentAndDeleteDocumentInExistingCollection()\n {\n $collectionName = $this->TESTNAMES_PREFIX . 'CollectionTestSuite-Collection';\n $requestBody = ['name' => 'Frank', 'bike' => 'vfr', '_key' => '1'];\n\n $document = new Document($this->client);\n\n /** @var HttpResponse $responseObject */\n $responseObject = $document->create($collectionName, $requestBody);\n $responseBody = $responseObject->body;\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertArrayNotHasKey('error', $decodedJsonBody);\n\n $this->assertEquals($collectionName . '/1', $decodedJsonBody['_id']);\n\n $requestBody = ['name' => 'Mike'];\n\n $document = new Document($this->client);\n\n $responseObject = $document->update($collectionName . '/1', $requestBody);\n $responseBody = $responseObject->body;\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertArrayNotHasKey('error', $decodedJsonBody);\n\n $this->assertEquals($collectionName . '/1', $decodedJsonBody['_id']);\n\n $document = new Document($this->client);\n\n $responseObject = $document->get($collectionName . '/1', $requestBody);\n $responseBody = $responseObject->body;\n\n $this->assertArrayHasKey('bike', json_decode($responseBody, true));\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertEquals('Mike', $decodedJsonBody['name']);\n\n $this->assertEquals($collectionName . '/1', $decodedJsonBody['_id']);\n\n $responseObject = $document->delete($collectionName . '/1');\n $responseBody = $responseObject->body;\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertArrayNotHasKey('error', $decodedJsonBody);\n\n // Try to delete a second time .. should throw an error\n $responseObject = $document->delete($collectionName . '/1');\n $responseBody = $responseObject->body;\n\n $decodedJsonBody = json_decode($responseBody, true);\n\n $this->assertArrayHasKey('error', $decodedJsonBody);\n\n $this->assertEquals(true, $decodedJsonBody['error']);\n\n $this->assertEquals(404, $decodedJsonBody['code']);\n\n $this->assertEquals(1202, $decodedJsonBody['errorNum']);\n }", "function createorconnecttoCollection(string $collectionName) {\n $this->rekognition->createCollection([\n 'CollectionId' => $collectionName\n ]);\n return true;\n }", "public function getCollectionPath($database, $collection) {\n return join('.', [$database, $collection]);\n }", "public function getCollection($dbName, $collName){\n\t\t$db = $this->getDatabase($dbName);\n\t\t$collection = $db->$collName;\n\t}", "public static function collectionName()\n {\n return 'statsMemberDaily';\n }", "public function getCollectionName()\n\t{\n\t\treturn 'user.info';\n\t}", "protected function addCollection($name, $schema)\n {\n // @NOTE: this is the early implementation of cache\n // soon this will be change to cache\n $this->data['collections'][$name] = $schema;\n }", "public function collection($collection_id)\n {\n $url = preg_replace('/set/i', 'collection:' . $collection_id, $this->public_url);\n return $this->curl($url)->collection;\n }", "public function SetupMongo($host, $port, $dbName, $user, $pass)\n {\n die($this->Prints(\"Sorry, this option not yet supported.\"));\n }", "public function rename($newTableName)\r\n {\r\n\r\n }", "protected function collection($name)\n {\n return $this->db->{$this->config[$name]};\n }", "final public function underscoreToCamelCase($string)\n {\n $callback = function($matches) { return strtoupper($matches[1]); };\n\n return preg_replace_callback('/_([a-z])/', $callback, $string);\n\n }", "public function updateappname() \n\t{\n\t\ttry \n\t\t{\n\t\t\t// select mongoDB collection\n\t\t\t$func_collection \t= \t$this->mongo_db->db->func;\n\t\t\t// preparing data\n\t\t\t$prepare_data \t\t= \tarray(\n\t\t\t\t'$set' \t=> array(\n\t\t\t\t\t'application_name' => $this->application_name\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t// update to database\n\t\t\t$func_collection->update(array(\n\t\t\t\t'application_id' => $this->application_id\n\t\t\t\t),$prepare_data);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception $e) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function modifyCollection($collectionName, array $collectionOptions, array $options = [])\n {\n if (! isset($options['typeMap'])) {\n $options['typeMap'] = $this->typeMap;\n }\n\n $server = select_server($this->manager, $options);\n\n if (! isset($options['writeConcern']) && server_supports_feature($server, self::$wireVersionForWritableCommandWriteConcern) && ! is_in_transaction($options)) {\n $options['writeConcern'] = $this->writeConcern;\n }\n\n $operation = new ModifyCollection($this->databaseName, $collectionName, $collectionOptions, $options);\n\n return $operation->execute($server);\n }", "public function drop($collection) {\n $col = $this->db->selectCollection($collection);\n return $col->drop();\n }", "private function underscore(string $name)\n {\n $name = preg_replace_callback(\n '/[A-Z][A-Z]+/',\n function ($matches) {\n if (strlen($matches[0]) === 2) {\n return ucfirst(strtolower($matches[0]));\n } else {\n $lastChar = substr($matches[0], strlen($matches[0]) - 1, 1);\n $subject = substr($matches[0], 0, strlen($matches[0]) - 1);\n\n return ucfirst(strtolower($subject)).$lastChar;\n }\n },\n $name\n );\n\n return Inflector::tableize($name);\n }", "public function upload($image, $collection)\n {\n $new_name = md5(file_get_contents($image)) . '.' . $image->getClientOriginalExtension();\n $savePath = public_path('storage/' . $collection);\n\n if (!File::exists($savePath))\n File::makeDirectory($savePath);\n\n if (!$this->isExistsImage($collection, $new_name))\n $image->move($savePath, $new_name);\n\n return 'storage/' . $collection . '/' . $new_name;\n }", "protected function createMongoCollectionMock()\n {\n return m::mock(\\MongoDB\\Collection::class);\n }", "function rename_project( $user, $project, $new_name )\n {\n //Unimplemented\n }", "public function updateappname() \n \t{\n \t\ttry \n \t\t{\n\t\t\t// select mongoDB collection\n \t\t\t$app_collection \t= \t$this->mongo_db->db->used;\n\t\t\t// preparing data\n \t\t\t$prepare_data \t\t= \tarray(\n \t\t\t\t'$set' \t\t\t=> \t\tarray(\n \t\t\t\t\t'use_appname' \t=> \t$this->use_appname\n \t\t\t\t\t)\n \t\t\t\t);\n\t\t\t// update to database\n \t\t\t$app_collection->update(array(\n \t\t\t\t'use_appid' \t=> \t$this->use_appid\n \t\t\t\t),\n \t\t\t$prepare_data, array(\n \t\t\t\t'multiple' \t\t=> \ttrue\n \t\t\t\t)\n \t\t\t);\n \t\t\treturn true;\n \t\t} \n \t\tcatch (Exception $e) \n \t\t{\n \t\t\treturn false;\n \t\t}\n \t}", "public function createCollectionStatus(Collection $collection, int $newStatus): Collection;", "function update_collection($collection, $metadata = array(), $elementTexts = array())\n{\n $builder = new Builder_Collection(get_db());\n $builder->setRecord($collection);\n $builder->setRecordMetadata($metadata);\n $builder->setElementTexts($elementTexts);\n return $builder->build();\n}", "public function collectionNameGridFS()\r\n {\r\n if (empty($this->__collection_name_gridfs))\r\n {\r\n throw new \\Exception('Must specify a collection name for GridFS');\r\n }\r\n \r\n return $this->__collection_name_gridfs;\r\n }", "public function collectionPrefix()\r\n\t{\r\n\t\treturn 'fs';\r\n\t}", "public function getCollectionModelName()\n {\n return $this->_getDataAsString('collection_model');\n }", "public function getCollection($db_name = null, $collection = null) {\n\t\tif (is_null($collection)) {\n\t\t\tif ($this->getCollectionName() == '') {\n\t\t\t\tthrow new \\Exception('You have not set the collection name for ' . get_class($this));\n\t\t\t}\n\t\t\t$collection = $this->getCollectionName();\n\t\t}\n\t\tif (is_null($db_name)) {\n\t\t\t$db_name = $this->getDbName();\n\t\t}\n\t\tif (trim($collection) == '') {\n\t\t\t// Use the default database name according to the connection\n\t\t\t$collection = Controller::getInstance()->getContext()->getDatabaseManager()->getDatabase($db_name)->getParameter('database');\n\t\t}\n\t\treturn $this->getConnection($db_name)->$collection;\n\t}", "public static function collectionName()\n {\n return 'memberLogs';\n }", "protected function _getCollectionClass()\n\t{\n\t\treturn 'queen_skip/skip_collection';\n\t}", "public static function underscoresToCamelcase($string)\n {\n return ucfirst(preg_replace('|_([a-z])|e', 'strtoupper(\"$1\")', $string));\n }", "public function one($dbName, $collName){\n\t\t$connection = new MongoClient();\n\t\t$db = $connection->$dbName->$collName;\t\n\t\t$record = $db->findOne();\n\t}", "public function __construct() {\n $this->manager = new \\MongoDB\\Driver\\Manager(\"mongodb://localhost:27705\");\n $this->db_collection = 'lundbeck`.evaluation';\n }", "function deleteCollection(string $collectionName) {\n $this->rekognition->deleteCollection([\n 'CollectionId' => $collectionName\n ]);\n return true;\n }", "function ag_add_coll() {\n\tif(!isset($_POST['coll_name'])) {die('missing data');}\n\t$name = $_POST['coll_name'];\n\t\n\t$resp = wp_insert_term( $name, 'ag_collections', array( 'slug'=>sanitize_title($name)) );\n\t\n\tif(is_array($resp)) {die('success');}\n\telse {\n\t\t$err_mes = $resp->errors['term_exists'][0];\n\t\tdie($err_mes);\n\t}\n}", "public function getCollectionCarouselName()\n {\n return $this->collectionCarouselName;\n }", "public function saveCollection(){\n\t\tif($this->rest->_getRequestMethod() != 'POST'){\n\t\t\t$this->_notAuthorized();\n\t\t}\n\t\t#variable de respuesta\n\t\t$response = array('status' => 'Success');\n\t\t$collection = json_decode(file_get_contents('php://input'),true);\n\t\t#comprobamos si es nuevo o edicion\n\t\tif(!$collection['id_cobro']){\n\t\t\t#nuevo\n\t\t\t$status = $this->_validData($collection);\n\t\t\tif($status == 1){\n\t\t\t\t$this->db->insert($this->Table_, $collection);\n\t\t\t\t$response['msg'] = '3000';\n\t\t\t\t$response['data'] = $this->db->insert_id();\n\t\t\t}else{\n\t\t\t\t$response['msg'] = $status;\n\t\t\t}\n\t\t}else{\n\t\t\t#edicion\n\t\t\t$oldCollection = $collection;\n\t\t\t$this->db->where('id_cobro',$collection['id_cobro']);\n\t\t\t$this->Result_ = $this->db->get($this->Table_);\n\t\t\tif($this->Result_->num_rows() > 0){\n\t\t\t\tunset($collection['id_cobro']);\n\t\t\t\tunset($collection['registro']);\n\t\t\t\t$status = $this->_validData($collection);\n\t\t\t\tif($status == 1){\n\t\t\t\t\t#actualizamos el registro\n\t\t\t\t\t$this->db->where('id_cobro',$oldCollection['id_cobro']);\n\t\t\t\t\t$this->db->update($this->Table_, $collection);\n\t\t\t\t\t$response['msg'] = '3001';\n\t\t\t\t\t$response['data'] = $oldCollection;\n\t\t\t\t}else{\n\t\t\t\t\t$response['msg'] = $status;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$response['msg'] = '2001';\n\t\t\t}\n\t\t}\n\t\t#envio de respuesta\n\t\t$this->rest->_responseHttp($response,$this->CodeHttp_);\n\t}", "public function inflect($name)\n {\n $segments = [$this->namespace, $this->version, ucfirst($name)];\n\n return $this->namespace = implode('\\\\', array_filter($segments));\n }", "private function _renameDatabase($newDbName, $oldDbName) { \n try {\n $this->_openDbConnection();\n\n // neue Datenbank erstellen\n $this->_createDatabase($newDbName);\n\n // Datenbank exportieren\n $this->_exportDatabase($oldDbName, false);\n\n // Datenbank löschen\n $this->model->deleteDatabase($oldDbName); \n\n // Datenbank importieren\n $data = new stdClass();\n $data->database = $newDbName;\n $data->delete = true;\n $this->_importDatabase($data);\n \n $this->model->closeDbConnection($this->model->pdo);\n $return = true;\n } catch (Throwable $ex) {\n $return = $ex;\n }\n return $return;\n }", "protected function snakeToCamel(string $string): string\n {\n $elements = explode('_', $string);\n $elementCount = count($elements);\n $camelString = $elements[0];\n for ($i = 1; $i < $elementCount; $i++) {\n $camelString .= ucfirst($elements[$i]);\n }\n return $camelString;\n }", "public function getCollectionClass($useFQCN = true)\n {\n $class = $this->collectionClass;\n if (!$useFQCN && count($array = explode('\\\\', $class))) {\n $class = array_pop($array);\n }\n\n return $class;\n }", "public function getCollectionName()\n {\n return 'viewtable.coach';\n }", "function underscoreToCamelCase($str, $capitalise_first_char = false) {\n if($capitalise_first_char) {\n $str[0] = strtoupper($str[0]);\n }\n $func = create_function('$c', 'return strtoupper($c[1]);');\n return preg_replace_callback('/_([a-z])/', $func, $str);\n }", "function getNextSequence($name){\nglobal $collection;\n \n$retval = $collection->findAndModify(\n array('_id' => $name),\n array('$inc' => array(\"seq\" => 1)),\n null,\n array(\n \"new\" => true,\n )\n);\nreturn $retval['seq'];\n}", "function addMongo() {\n\n\n\t\tfor($i=0,$l=count($this->data);$i<$l;$i++) {\n\t\t\t$data = $this->data[$i];\n\t\t\t\n\t\t\t//$col->remove(array(\"martfilter\" => $data[\"code\"]));\n\n\n\t\t\tupload2s3gz(\"imf/\".$data[\"code\"], json_encode($data));\n\t\t\t/*try {\n\t\t\t\t$col->insert($data);\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$col->insert(array(\n\t\t\t\t\"martfilter\" => $data[\"code\"],\n\t\t\t\t\"name\" => $data[\"name\"],\n\t\t\t\t\"message\" => $e->getMessage(),\n\t\t\t\t\"data\" => array()\n\t\t\t\t));\n\t\t\t}*/\n\n\t\t}\n\t}", "function ag_del_coll() {\n\tif(!isset($_POST['coll_id'])) {die('missing data');}\n\t$id = addslashes($_POST['coll_id']);\n\t\n\t$resp = wp_delete_term( $id, 'ag_collections');\n\n\tif($resp == '1') {die('success');}\n\telse {die('error during the collection deletion');}\n}", "public function transform($collection)\n {\n $result = array();\n \n if ($collection) {\n foreach ($collection as $item) {\n $result[] = $item->getName();\n }\n }\n \n return implode($this->separator, $result);\n }", "public static function convertToCamelCase($string)\r\n {\r\n foreach(array('_', '-', '.') as $delimiter) {\r\n if(strstr($string, $delimiter)) {\r\n return implode('', array_map('ucfirst', explode($delimiter, $string)));\r\n }\r\n }\r\n return ucfirst($string);\r\n }", "public function getCollectionName() {\r\n\t\treturn 'survet_operate_log';\r\n\t}" ]
[ "0.6554234", "0.5911178", "0.5841201", "0.5796181", "0.57822454", "0.57485217", "0.57028073", "0.5685802", "0.5666897", "0.5641118", "0.5636572", "0.55369127", "0.55330616", "0.5511881", "0.54671305", "0.54500496", "0.5412006", "0.53969", "0.536967", "0.53045493", "0.5280285", "0.52563286", "0.52016014", "0.5191899", "0.51429015", "0.51201254", "0.5105611", "0.51049143", "0.5086376", "0.5080342", "0.5076138", "0.50756675", "0.5054344", "0.50436574", "0.5027543", "0.50071245", "0.5002367", "0.49829963", "0.49524447", "0.49270993", "0.4921354", "0.4915626", "0.4913542", "0.48923832", "0.4884113", "0.4875323", "0.4834183", "0.4822236", "0.48219797", "0.48159263", "0.48058042", "0.48041478", "0.47945148", "0.4789899", "0.4780321", "0.47476014", "0.47381246", "0.47357222", "0.47207445", "0.47078943", "0.46932268", "0.4689143", "0.4684507", "0.46809512", "0.46713373", "0.46708095", "0.46667615", "0.4645573", "0.464526", "0.46358663", "0.4632296", "0.46246758", "0.4604406", "0.4591755", "0.45904312", "0.45834246", "0.45767054", "0.45657647", "0.45652857", "0.45636526", "0.45630795", "0.4562858", "0.45625094", "0.45598483", "0.45463154", "0.4540234", "0.4538889", "0.45211902", "0.4517935", "0.4512354", "0.45093286", "0.44903383", "0.4487724", "0.4471003", "0.44684696", "0.44634938", "0.44624242", "0.4459272", "0.4450447", "0.4449448" ]
0.7404457
0
Helper function update entities type.
function _mongo_node_update_type($old_entity_type, $entity_type) { // Update collection names. _mongo_node_rename_collection($old_entity_type, $entity_type); // Update bundle name in mongo entities. $collection = mongodb_collection('fields_current', $entity_type); $result = $collection->update( array('_type' => $old_entity_type), array('$set' => array('_type' => $entity_type, 'type' => $entity_type)) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "function entity_info_alter_build(&$entity_info, $entity_type) {\n}", "public function getType(): EntityType;", "public function setType(EntityType $type);", "function nestedbox_core_entity_info_alter(array &$entity_info) {\n foreach (nestedbox_get_types() as $type => $info) {\n $entity_info['nestedbox']['bundles'][$type] = array(\n 'label' => $info->label,\n 'admin' => array(\n /* @see nestedbox_type_load() */\n 'path' => 'admin/structure/nestedbox-types/manage/%nestedbox_type',\n 'real path' => 'admin/structure/nestedbox-types/manage/' . $type,\n 'bundle argument' => 4,\n 'access arguments' => array('administer nestedbox types'),\n ),\n );\n }\n}", "public function setMappedEntityType($entity_type);", "function entity_rewrite($entity_type, &$entity)\n{\n $translate = entity_type_translate_array($entity_type);\n\n // By default, fill $entity['entity_name'] with name_field contents.\n if (isset($translate['name_field'])) { $entity['entity_name'] = $entity[$translate['name_field']]; }\n\n // By default, fill $entity['entity_shortname'] with shortname_field contents. Fallback to entity_name when field name is not set.\n if (isset($translate['shortname_field'])) { $entity['entity_shortname'] = $entity[$translate['name_field']]; } else { $entity['entity_shortname'] = $entity['entity_name']; }\n\n // By default, fill $entity['entity_descr'] with descr_field contents.\n if (isset($translate['descr_field'])) { $entity['entity_descr'] = $entity[$translate['descr_field']]; }\n\n // By default, fill $entity['entity_id'] with id_field contents.\n if (isset($translate['id_field'])) { $entity['entity_id'] = $entity[$translate['id_field']]; }\n\n switch($entity_type)\n {\n case \"bgp_peer\":\n // Special handling of name/shortname/descr for bgp_peer, since it combines multiple elements.\n\n if (Net_IPv6::checkIPv6($entity['bgpPeerRemoteAddr']))\n {\n $addr = Net_IPv6::compress($entity['bgpPeerRemoteAddr']);\n } else {\n $addr = $entity['bgpPeerRemoteAddr'];\n }\n\n $entity['entity_name'] = \"AS\".$entity['bgpPeerRemoteAs'] .\" \". $addr;\n $entity['entity_shortname'] = $addr;\n $entity['entity_descr'] = $entity['astext'];\n break;\n\n case \"sla\":\n $entity['entity_name'] = 'SLA #' . $entity['sla_index'];\n if (!empty($entity['sla_target']) && ($entity['sla_target'] != $entity['sla_tag']))\n {\n if (get_ip_version($entity['sla_target']) === 6)\n {\n $sla_target = Net_IPv6::compress($entity['sla_target'], TRUE);\n } else {\n $sla_target = $entity['sla_target'];\n }\n $entity['entity_name'] .= ' (' . $entity['sla_tag'] . ': ' . $sla_target . ')';\n } else {\n $entity['entity_name'] .= ' (' . $entity['sla_tag'] . ')';\n }\n $entity['entity_shortname'] = \"#\". $entity['sla_index'] . \" (\". $entity['sla_tag'] . \")\";\n break;\n\n case \"pseudowire\":\n $entity['entity_name'] = $entity['pwID'] . ($entity['pwDescr'] ? \" (\". $entity['pwDescr'] . \")\" : '');\n $entity['entity_shortname'] = $entity['pwID'];\n break;\n }\n}", "function hook_uuid_entities_features_export_entity_alter(&$entity, $entity_type) {\n\n}", "public function restoreEntityType() {\n $nid = $this->og_controller->og_node->nid;\n $path = \"private://dumper/restore.{$nid}/private://dumper/{$nid}/{$this->entity_type}\";\n foreach (file_scan_directory($path, '/\\.json/') as $file) {\n $this->restoreEntity($file->name);\n }\n }", "function entity_type_translate_array($entity_type)\n{\n $translate = $GLOBALS['config']['entities'][$entity_type];\n\n // Base fields\n // FIXME, not listed here: agg_graphs, metric_graphs\n $fields = array('name', // Base entity name\n 'name_multiple', // (Optional) Plural entity name\n 'table', // Table name\n 'table_fields', // Array with table fields\n //'state_table', // State table name (deprecated)\n //'state_fields', // Array with state fields (deprecated)\n 'humanize_function', // Humanize function name\n 'parent_type', // Parent table type\n 'parent_table', // Parent table name\n 'parent_id_field', // Main parent id field\n 'where',\n 'icon', // Entity icon\n 'graph');\n foreach ($fields as $field)\n {\n if (isset($translate[$field]))\n {\n $data[$field] = $translate[$field];\n }\n else if (isset($GLOBALS['config']['entities']['default'][$field]))\n {\n $data[$field] = $GLOBALS['config']['entities']['default'][$field];\n }\n }\n\n // Table fields\n $fields_table = array(// Common fields\n 'id',\n 'device_id',\n 'index',\n 'mib',\n 'object',\n 'oid',\n 'name',\n 'shortname',\n 'descr',\n 'ignore',\n 'disable',\n 'deleted',\n // Limits fields\n 'limit_high', // High critical limit\n 'limit_high_warn', // High warning limit\n 'limit_low', // Low critical limit\n 'limit_low_warn', // Low warning limit\n // Value fields\n 'value', // RAW value\n 'status', // Entity specific status name (\n 'event', // Event name (ok, alert, warning, etc..)\n 'uptime', // Uptime\n 'last_change', // Last changed time\n // Measured entity fields\n 'measured_type', // Measured entity type\n 'measured_id', // Measured entity id\n );\n if (isset($translate['table_fields']))\n {\n // New definition style\n foreach ($translate['table_fields'] as $field => $entry)\n {\n // Add old style name (ie 'id_field') for compatibility\n $data[$field . '_field'] = $entry;\n }\n }\n\n return $data;\n}", "function set_entity_attrib($entity_type, $entity_id, $attrib_type, $attrib_value, $device_id = NULL)\n{\n if (is_array($entity_id))\n {\n // Passed entity array, instead id\n $translate = entity_type_translate_array($entity_type);\n $entity = $entity_id;\n $entity_id = $entity[$translate['id_field']];\n }\n\n if (!$entity_id) { return NULL; }\n\n // If we're setting a device attribute, use the entity_id as the device_id\n if($entity_type == \"device\") { $device_id = $entity_id; }\n\n\n // If we don't have a device_id, try to work out what it should be\n if(!$device_id)\n {\n if(isset($entity) && isset($entity['device_id']))\n {\n $device_id = $entity['device_id'];\n } else {\n $entity = get_entity_by_id_cache($entity_type, $entity_id);\n $device_id = $entity['device_id'];\n }\n }\n if (!$device_id) { print_error(\"Enable to set attrib data : $entity_type, $entity_id, $attrib_type, $attrib_value, $device_id\"); return NULL; }\n\n if (isset($GLOBALS['cache']['entity_attribs'][$entity_type][$entity_id]))\n {\n // Reset entity attribs\n unset($GLOBALS['cache']['entity_attribs'][$entity_type][$entity_id]);\n }\n\n //if (dbFetchCell(\"SELECT COUNT(*) FROM `entity_attribs` WHERE `entity_type` = ? AND `entity_id` = ? AND `attrib_type` = ?\", array($entity_type, $entity_id, $attrib_type)))\n if (dbExist('entity_attribs', '`entity_type` = ? AND `entity_id` = ? AND `attrib_type` = ?', array($entity_type, $entity_id, $attrib_type)))\n {\n $return = dbUpdate(array('attrib_value' => $attrib_value), 'entity_attribs', '`entity_type` = ? AND `entity_id` = ? AND `attrib_type` = ?', array($entity_type, $entity_id, $attrib_type));\n } else {\n $return = dbInsert(array('device_id' => $device_id, 'entity_type' => $entity_type, 'entity_id' => $entity_id, 'attrib_type' => $attrib_type, 'attrib_value' => $attrib_value), 'entity_attribs');\n if ($return !== FALSE) { $return = TRUE; } // Note dbInsert return IDs if exist or 0 for not indexed tables\n }\n\n return $return;\n}", "public function updateEntityType($entityTypeId, $request)\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->urlSegment($entityTypeId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function setEntityTypes($types) {\n $this->entity_types = $types;\n }", "function mongo_node_mass_update($entity_type, $entities, $args) {\n foreach ($entities as $entity_id) {\n $entity = entity_get_controller($entity_type)->load(array($entity_id));\n $entity = reset($entity);\n // Skip if not updates.\n if (!isset($args['updates'])) {\n continue;\n }\n foreach ($args['updates'] as $p_name => $p_val) {\n $entity->$p_name = $p_val;\n }\n entity_save($entity_type, $entity);\n }\n}", "function _mongo_node_update_bundle($entity_type, $old_bundle, $bundle) {\n\n // Update bundle name in ids collection.\n $collection = mongodb_collection($entity_type . '_ids');\n\n $result = $collection->update(\n array('bundle' => $old_bundle),\n array('$set' => array('bundle' => $bundle))\n );\n\n // Update bundle name in mongo entities.\n $collection = mongodb_collection('fields_current', $entity_type);\n $result = $collection->update(\n array('_bundle' => $old_bundle, '_type' => $entity_type),\n array('$set' => array('_bundle' => $bundle, 'type' => $bundle))\n );\n}", "abstract protected function getEntityType(): string;", "function entity_type_translate($entity_type)\n{\n $data = entity_type_translate_array($entity_type);\n if (!is_array($data)) { return NULL; }\n\n return array($data['table'], $data['id_field'], $data['name_field'], $data['ignore_field'], $data['entity_humanize']);\n}", "public function getExtendedType()\n {\n return EntityType::class;\n }", "protected abstract function initializeEntityType(): string;", "public function saveType()\n {\n }", "function create_or_update_type($data) {\n return $this->save_type($data);\n }", "public function testUpdateFieldsWrongType(): void { }", "function getEntityType() {\n return $this->entity_type;\n }", "function schema_alter_build(&$schema, $entity_type) {}", "public function getEntityTypeId();", "private function loadTypes() {\n \n if(!empty($this->types)) return;\n \n $this->types = $this->doctrine\n ->getManager()\n ->getRepository('FenchyNoticeBundle:Type')\n ->getFilterTypes();\n }", "public function update($entity)\n {\n \n }", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function getEntityType();", "private function setEntityTypeFromArray(array $input, string $key = 'entity-type'): void\n {\n $this->entityType = is_null($entityType = ArrayAccess::getString($input, $key))\n ? new EntityType()\n : new EntityType($entityType);\n }", "public function Update($entity) {\n }", "function hook_entity_uuid_save($entity, $entity_type) {\n\n}", "function hook_entity_uuid_presave(&$entity, $entity_type) {\n\n}", "protected function updateEntity($entity)\n {\n }", "public function setType($type) :ISEntity\n {\n array_walk($this->types, function($name, $index) use ($type) {\n if($type === $name){\n $this->type = $index;\n }\n });\n if(is_null($this->type)) {\n if(isset($this->types[$type])) {\n $this->type = $type;\n }\n }\n return $this;\n }", "public function setType(){\n switch($this->security){\n case 'H':\n case 'L':\n case '0.0':\n $typeId = 2; // k-space\n break;\n case 'A':\n $typeId = 3; // a-space\n break;\n default:\n $typeId = 1; // w-space\n }\n\n /**\n * @var $type MapTypeModel\n */\n $type = $this->rel('typeId');\n $type->getById($typeId);\n $this->typeId = $type;\n }", "public function entityTypeId();", "function entity_property_info_alter_build(&$info, $entity_type) {\n}", "public function setType($type){ }", "public function getEntityTypeId() {\n return $this->entityType->id();\n }", "function changeSettingsType()\n\t{\n\t\tinclude_once(\"./Services/Administration/classes/class.ilSetting.php\");\n\t\t$old_type = ilSetting::_getValueType();\n\n\t\tif ($old_type == \"clob\")\n\t\t{\n\t\t\t$longer_settings = ilSetting::_getLongerSettings();\n\t\t\tif (count($longer_settings))\n\t\t\t{\n\t $this->longer_settings = $longer_settings;\n ilUtil::sendFailure($this->lng->txt(\"settings_too_long\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t \t$changed = ilSetting::_changeValueType('text');\n\t }\n\t }\n\t\telse\n\t\t{\n\t $changed = ilSetting::_changeValueType('clob');\n\t }\n\n\t\tif ($changed)\n\t\t{\n\t\t\tilUtil::sendInfo($this->lng->txt(\"settings_type_changed\"));\n\t\t}\n\n\t\t$this->displayTools();\n\t}", "public function getEntityType()\n {\n return $this->entity_type;\n }", "public function getEntityType()\n {\n return $this->entity_type;\n }", "public function save(Type $type) {\n $typeData = array(\n 'name_ET' => $type->getName()\n );\n\n if ($type->getNum()) {\n // The type has already been saved : update it\n $this->getDb()->update('eventtype', $typeData, array('num_ET' => $type->getNum()));\n } else {\n // The type has never been saved : insert it\n $this->getDb()->insert('eventtype', $typeData);\n // Get the id of the newly created type and set it on the entity.\n $id = $this->getDb()->lastInsertId();\n $type->setNum($id);\n }\n }", "function hook_realistic_dummy_content_api_class($entity, $type, array $filter = []) {\n return [\n // Insert class names for all classes which can modify entities for the\n // given type. These classes must exist, either through Drupal's\n // autoload system or be included explictely, and they must be\n // subclasses of RealisticDummyContentBase.\n '\\Drupal\\realistic_dummy_content_api\\includes\\RealisticDummyContentFieldModifier',\n ];\n}", "public function setUserEntityClass(array $data) {\n\t\t$clazz = null;\n\t\t$userType = $data['type'];\n\t\tswitch($userType) {\n\t\t\tcase Traveloti::AGENT_TYPE:\n\t\t\t\t$clazz = 'Base\\Model\\Agent';\n\t\t\t\tbreak;\n\t\t\tcase Traveloti::BLOGGER_TYPE:\n\t\t\t\t$clazz = 'Base\\Model\\Blogger';\n\t\t\t\tbreak;\n\t\t\tcase Traveloti::USER_TYPE:\n\t\t\tdefault:\n\t\t\t\t$clazz = $this->getOptions()->getUserEntityClass();\n\t\t\t\tbreak;\n\t\t}\n\t\t$this->getOptions()->setUserEntityClass($clazz);\n\t}", "public function getEntityTypeId(){\n $entityType = Mage::getModel('eav/entity_type')->loadByCode($this->_entityType);\n if (!$entityType->getId()){\n Mage::helper('connector')\n ->log(\"Entity type \" . $this->_entityType . \" undefined\", Zend_log::ERR);\n return false;\n }\n return $entityType->getId();\n }", "function annotation_admin_types() {\n $annotation_entity = entity_get_info('annotation');\n $bundles = $annotation_entity['bundles'];\n //dpm($bundles);\n $field_ui = module_exists('field_ui');\n $header = array(t('Name'), array('data' => t('Operations'), 'colspan' => $field_ui ? '4' : '2'));\n $rows = array();\n\n foreach ($bundles as $key => $bundle) {\n $type = check_plain($key);\n $name = check_plain($bundle['label']);\n $row = array($name . ' <small>' . t('(Machine name: @type)', array('@type' => $type)) . '</small><div class=\"description\">' . filter_xss_admin($bundle['description']) . '</div>');\n // Set the edit column.\n $row[] = array('data' => l(t('edit'), $bundle['admin']['real path']));\n /*\n if ($field_ui) {\n // Manage fields.\n $row[] = array('data' => l(t('manage fields'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/fields'));\n // Display fields.\n $row[] = array('data' => l(t('manage display'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/display'));\n }*/\n // Set the delete column.\n if ($bundle['custom']) {\n $row[] = array('data' => l(t('delete'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/delete'));\n }\n else {\n $row[] = array('data' => '');\n }\n\n $rows[] = $row;\n }\n\n $build['node_table'] = array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n //'#empty' => t('No content types available. <a href=\"@link\">Add content type</a>.', array('@link' => url('admin/structure/types/add'))),\n );\n\n return $build;\n}", "public function update($data, $type = '')\n {\n }", "abstract public function getEntityTypeCode();", "public static function update($event, $type, $object) {\n\t\t\n\t\tif ($object instanceof \\ElggEntity) {\n\t\t\tself::updateEntity($object);\n\t\t}\n\t\t\n\t\tself::checkComments($object);\n\t\tself::updateEntityForAnnotation($object);\n\t}", "public function patchEntityType($entityTypeId, $request)\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->urlSegment($entityTypeId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->patch()\n ->go();\n }", "function entity_type_inheritable_fields($entity_type) {\n}", "public function setType($type) {}", "public function update($type, $id = null);", "function dmlChangeColumnType () {\r\n\t\t// Create connection\r\n\t\t$conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\t$sql = \"ALTER TABLE tbldmlmapcontent MODIFY CntField7 MEDIUMTEXT\";\r\n\r\n\t\tif ($conn->query($sql) === TRUE) {\r\n\t\t\techo 1;\r\n\t\t} else {\r\n\t\t\techo 0;\r\n\t\t}\r\n\t\t\r\n\t\t$conn->close();\r\n\t}", "public function getEntityType()\n\t{\n\t\treturn $this->entity_type;\n\t}", "public function setEntityClass(?string $entityClass);", "public function getEntityTypes() {\n return $this->entity_types;\n }", "public function update(Request $request, Type $type)\n {\n //\n }", "public function update(Request $request, Type $type)\n {\n //\n }", "public function update($entity){ \n //TODO: Implement update record.\n }", "public function update($entity);", "public function update($entity);", "private function replaceDocumentTypeToAccessibleType(): void\n\t{\n\t\t$replaces = [\n\t\t\tStoreDocumentTable::TYPE_ARRIVAL => StoreDocumentTable::TYPE_STORE_ADJUSTMENT,\n\t\t\tStoreDocumentTable::TYPE_STORE_ADJUSTMENT => StoreDocumentTable::TYPE_ARRIVAL,\n\t\t];\n\n\t\tforeach ($replaces as $baseType => $anotherType)\n\t\t{\n\t\t\t$can = $this->accessController->checkByValue(ActionDictionary::ACTION_STORE_DOCUMENT_MODIFY, $baseType);\n\t\t\tif (!$can)\n\t\t\t{\n\t\t\t\t$this->canSelectDocumentType = false;\n\n\t\t\t\t// change current type\n\t\t\t\tif ($this->documentType === $baseType)\n\t\t\t\t{\n\t\t\t\t\t$can = $this->accessController->checkByValue(ActionDictionary::ACTION_STORE_DOCUMENT_MODIFY, $anotherType);\n\t\t\t\t\tif ($can)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->documentType = $anotherType;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function update_articaltypelist($id,$updatedarticalname){\n $sql22 = \"update artical_types set artical_type='$updatedarticalname' where id='$id'\";\n $result22 = mysqli_query($this->db,$sql22);\n return $result22;\n }", "protected function _normalize_entity_config($entity_type, $entity_config) {\n $entity_config['based_on'] = $entity_config['based_on'] ?? $entity_type;\n \n $based_on = $entity_config['based_on'];\n $entity_config['entity_type'] = $entity_type;\n $entity_config['model_type'] = $based_on;\n $entity_config['properties'] = $entity_config['properties'] ?? [ ];\n $all_properties = $entity_config['properties']['all'] ?? false;\n if (is_string($based_on) && isset($this->model_type_to_properties[ $based_on ])) {\n if (!$all_properties) $all_properties = $this->model_type_to_properties[ $based_on ];\n }\n if (is_array($all_properties)) {\n $all_properties = $this->_normalize_properties($all_properties);\n $entity_config['properties']['all'] = $all_properties;\n } else {\n $all_properties = [ ];\n }\n $entity_config['properties']['api_settable'] = ($entity_config['properties']['api_settable']??null) == '*' ? array_keys($all_properties) : $entity_config['properties']['api_settable']??null;\n $entity_config['properties']['api_gettable'] = ($entity_config['properties']['api_gettable']??null) == '*' ? array_keys($all_properties) : $entity_config['properties']['api_gettable']??null;\n $entity_config['properties']['required'] = $entity_config['properties']['required'] ?? null;\n \n $entity_config['relationships'] = $entity_config['relationships'] ?? [ ];\n if ($entity_config['relationships']) {\n $relationship_config = [ ];\n foreach ($entity_config['relationships'] as $index => $_relationship_config) {\n if (is_numeric($index)) {\n $index = $_relationship_config;\n $_relationship_config = [ ];\n }\n $relationship_config[ $index ] = $this->_normalize_relationship_index($entity_type, $index, $_relationship_config);\n }\n $entity_config['relationships'] = $relationship_config;\n }\n return $entity_config;\n }", "function _drush_behat_get_entity_field_types($entity_type) {\n $return = array();\n $fields = \\Drupal::entityManager()->getFieldStorageDefinitions($entity_type);\n foreach ($fields as $field_name => $field) {\n if (_drush_behat_is_field($entity_type, $field_name)) {\n $return[$field_name] = $field->getType();\n }\n }\n return $return;\n}", "public function getEntityTypeId() {\n return $this->entityTypeId;\n }", "function setEntity($entity_type, $entity_id) {\n $this->checkChange();\n\n // Ignore empty values.\n if (empty($entity_type) || empty($entity_id)) {\n return $this;\n }\n\n $this->entity_type = $entity_type;\n $this->entity_id = $entity_id;\n return $this;\n }", "function update_id_type($id_type_id = '')\n\t{\n\t\t$data['name']\t\t\t\t\t=\t$this->input->post('name');\n\t\t$data['timestamp']\t\t\t\t= \ttime();\n\t\t$data['updated_by']\t\t\t\t= \t$this->session->userdata('user_id');\n\n\t\t$this->db->where('id_type_id', $id_type_id);\n\t\t$this->db->update('id_type', $data);\n\n\t\t$this->session->set_flashdata('success', 'ID type has been updated successfully.');\n\n\t\tredirect(base_url() . 'id_type_settings', 'refresh');\n\t}", "function entity_type_inherited_fields($entity_type) {\n}", "function cps_changeset_publish_batch_update($changeset, $entity_type, &$context) {\n $changeset_id = $changeset->changeset_id;\n\n // Use the $context['sandbox'] at your convenience to store the\n // information needed to track progression between successive calls.\n if (empty($context['sandbox'])) {\n $entity_info = entity_get_info($entity_type);\n $context['sandbox'] = array();\n $context['sandbox']['progress'] = 0;\n $context['sandbox']['current_item'] = 0;\n $context['message'] = t('Marking unchanged @entity_type content', array('@entity_type' => $entity_info['label']));\n }\n\n $limit = 100;\n $count = cps_add_untracked_entities($changeset_id, $entity_type, $context['sandbox']['current_item'], $limit);\n\n $context['results']['changeset'] = $changeset;\n\n if (!$count) {\n $context['finished'] = TRUE;\n }\n else {\n $context['finished'] = FALSE;\n $context['sandbox']['current_item'] = $context['sandbox']['current_item'] + $count;\n }\n}", "public function set_type($type){\n // remove unwanted types -> they should not be send from client\n // -> reset keys! otherwise JSON format results in object and not in array\n $type = array_values(array_intersect(array_unique((array)$type), self::$connectionTypeWhitelist));\n\n // set EOL timestamp\n if( !in_array('wh_eol', $type) ){\n $this->eolUpdated = null;\n }elseif(\n in_array('wh_eol', $type) &&\n !in_array('wh_eol', (array)$this->type) // $this->type == null for new connection! (e.g. map import)\n ){\n // connection EOL status change\n $this->touch('eolUpdated');\n }\n\n return $type;\n }", "abstract public function getEntityTypeID();", "public function update(Entity $entity);", "function setContentType() {\n\n\t// GET START TIME\n\t$start = microtime_float();\n\tglobal $mg2;\n\n\t$writeOK = false;\n\n\t// READ DATABASE\n\tlist($readFolders, $readItems) = $mg2->readDB();\n\n\t// ARE THERE ITEM RECORDS?\n\tif ($readItems > 0) {\n\n\t\t// SET CONTENT TYPE\n\t\tforeach ($mg2->all_images as $key=>$record) {\n\t\t\t$mg2->all_images[$key][16] &= ~2047;\n\t\t\t$mg2->all_images[$key][16] |= $mg2->getContentCode(substr(strrchr($mg2->all_images[$key][6], '.'), 1));\n\t\t}\n\n\t\t// WRITE ITEM DATABASE\n\t\t$writeOK = $mg2->write_iDB('all');\n\t}\n\n\t// BUILD STATUS MESSAGE\n\t$takes = round(microtime_float() - $start,3);\n\t$message = 'Content type set in each item database record';\n\t$message.= ($writeOK)? ', it took '. $takes .' sek.':', Error!';\n\n\t// DISPLAY STATUS MESSAGE\n\t$mg2->displaystatus($message);\n}", "public function setup_types()\n {\n }", "function hook_uuid_entities_features_export_field_alter($entity_type, &$entity, $field, $instance, $langcode, &$items) {\n\n}", "function mongo_node_type_edit_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $old_entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_entity_type) {\n $set += mongo_node_type_default_settings($label, $machine_name);\n $set[$machine_name] = $set[$old_entity_type];\n unset($set[$old_entity_type]);\n\n // Update existing mongo entities with new entity type.\n _mongo_node_update_type($old_entity_type, $machine_name);\n }\n else {\n $set[$machine_name]['label'] = $label;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "public function set_type( $type ) {\n\t\t$this->set_prop( 'type', sanitize_title( $type ) ) ;\n\t}", "function entity_type_inheritable_properties($entity_type) {\n}", "protected function _assignTypesToField($types)\n\t{\n\t\t$field = $this->_record;\n\n\t\t/**\n\t\t * Override 'types' for core fields, since the core field must be assigned to all types\n\t\t * but alllow core fields 'voting', 'favourites, to selectively assigned to types\n\t\t */\n\t\tif ($field->iscore && !in_array($field->field_type, array('voting', 'favourites'), true))\n\t\t{\n\t\t\t$query = $this->_db->getQuery(true)\n\t\t\t\t->select('id')\n\t\t\t\t->from('#__flexicontent_types');\n\n\t\t\t$types = $this->_db->setQuery($query)->loadColumn();\n\t\t}\n\n\t\t/**\n\t\t * Store field to types relations\n\t\t * Try to avoid unneeded deletion and insertions\n\t\t */\n\n\t\t// First, delete existing types assignments no longer used by the field\n\t\t$query = $this->_db->getQuery(true)\n\t\t\t->delete('#__flexicontent_fields_type_relations')\n\t\t\t->where('field_id = ' . (int) $field->id);\n\n\t\tif (!empty($types))\n\t\t{\n\t\t\t$query->where('type_id NOT IN (' . implode(', ', $types) . ')');\n\t\t}\n\n\t\t$this->_db->setQuery($query)->execute();\n\n\t\t// Second, find type assignments of the field that did not changed\n\t\t$query = $this->_db->getQuery(true)\n\t\t\t->select('type_id')\n\t\t\t->from('#__flexicontent_fields_type_relations')\n\t\t\t->where('field_id = ' . (int) $field->id);\n\n\t\t$used = $this->_db->setQuery($query)->loadColumn();\n\n\t\t// Third, insert only the new records\n\t\tforeach ($types as $type)\n\t\t{\n\t\t\tif (!in_array($type, $used))\n\t\t\t{\n\t\t\t\t// Get last position of each field in each type\n\t\t\t\t$query = $this->_db->getQuery(true)\n\t\t\t\t\t->select('MAX(ordering) as ordering')\n\t\t\t\t\t->from('#__flexicontent_fields_type_relations')\n\t\t\t\t\t->where('type_id = ' . (int) $type);\n\n\t\t\t\t$ordering = $this->_db->setQuery($query)->loadResult();\n\n\t\t\t\t// Insert new type assignment using the next available ordering\n\t\t\t\t$ordering += 1;\n\n\t\t\t\t$query = $this->_db->getQuery(true)\n\t\t\t\t\t->insert('#__flexicontent_fields_type_relations')\n\t\t\t\t\t->columns(array(\n\t\t\t\t\t\t$this->_db->quoteName('field_id'),\n\t\t\t\t\t\t$this->_db->quoteName('type_id'),\n\t\t\t\t\t\t$this->_db->quoteName('ordering')\n\t\t\t\t\t))\n\t\t\t\t\t->values(\n\t\t\t\t\t\t(int) $field->id . ' , ' .\n\t\t\t\t\t\t(int) $type . ' , ' .\n\t\t\t\t\t\t(int) $ordering\n\t\t\t\t\t);\n\n\t\t\t\t$this->_db->setQuery($query)->execute();\n\t\t\t}\n\t\t}\n\t}", "function jornadas_entity_update($entity, $type) {\n if($type=='data_jornadas'){\n db_delete('jormada_tiempo_produccion')->condition('jid',$entity->jid)->execute();\n \n foreach ($entity->production_time as $lid => $element) {\n foreach ($element as $fid => $time) {\n db_insert('jormada_tiempo_produccion')->fields(array('jid'=>$entity->jid,'lid'=>$lid,'fid'=>$fid,'time'=>$time))->execute();\n\n }\n }\n }\n \n\n}", "protected function getRegisteredEntityTypes() {\n\t\tif (isset($this->entity_types)) {\n\t\t\treturn $this->entity_types;\n\t\t}\n\t\t\n\t\t$this->entity_types = tag_tools_rules_get_type_subtypes();\n\t\treturn $this->entity_types;\n\t}", "public function updateNode($type) {\n $this->current->updateType($type);\n }", "public function update(array $fields)\n {\n $type = Table\\ContentTypes::findById($fields['id']);\n if (isset($type->id)) {\n $contentType = (!empty($fields['content_type_other']) && ($fields['content_type'] == 'other')) ?\n $fields['content_type_other'] : $fields['content_type'];\n\n $type->name = $fields['name'];\n $type->content_type = $contentType;\n $type->strict_publishing = (int)$fields['strict_publishing'];\n $type->open_authoring = (int)$fields['open_authoring'];\n $type->in_date = (int)$fields['in_date'];\n $type->force_ssl = (int)$fields['force_ssl'];\n $type->order = (int)$fields['order'];\n $type->save();\n\n $this->data = array_merge($this->data, $type->getColumns());\n }\n }", "public function savePostType($post_type)\n {\n //if normal was selected - do nothing\n //if main was selected\n if ($post_type == 1){\n //check if there is a previous post with main tag and make it normal\n $current_main = Article::where('post_type', $post_type)->first();\n if ($current_main){\n $current_main->post_type = 0;\n $current_main->save();\n }\n }\n //if post up is selected\n //check if there is a previous post with post-up tag and make it normal\n //if not just change post type to post up\n if ($post_type == 2){\n //check if there is a previous post with main tag and make it normal\n $current_up = Article::where('post_type', $post_type)->first();\n if ($current_up){\n $current_up->post_type = 0;\n $current_up->save();\n }\n }\n //if post down is selected\n //check if there is a previous post with post-down tag and make it normal\n //if not just change post type to post down\n if ($post_type == 3){\n //check if there is a previous post with main tag and make it normal\n $current_down = Article::where('post_type', $post_type)->first();\n if ($current_down){\n $current_down->post_type = 0;\n $current_down->save();\n }\n }\n }", "public function getEntityType() {\n return $this->datasource()->getEntityType();\n }", "public static function setDatas($entity_type, $entity_id, $fields, $fields_values) {\n if($entity_type == \"node\") {\n $node = node_load($entity_id);\n\n $fields = explode(\",\", $fields);\n $fieldValues = explode(\",\", $fields_values);\n\n for ($i = 0; $i < count($fields); $i++) {\n\n $pos = strpos($fieldValues[$i], '_');\n\n if ($pos > 0) { // is a field\n $fieldValue = substr($fieldValues[$i], $pos+1, strlen($fieldValues[$i]));\n eval(\"\\$node->\" . $fields[$i] .\"['und'][0]['value'] = \\$node->\" . $fieldValue . \"['und'][0]['value'];\");\n }else {\n eval(\"\\$node->\" . $fields[$i] .\"['und'][0]['value'] = '\" . $fieldValues[$i] . \"';\");\n }\n }\n node_save($node);\n }\n }", "public function setEntityClass($entityClass);", "protected function updateNotificationTypes() {\n\t\t$sql = \"DELETE FROM\twcf\".WCF_N.\"_user_notification_event_notification_type\n\t\t\tWHERE\t\teventID = ?\n\t\t\t\t\tAND userID = ?\";\n\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\tWCF::getDB()->beginTransaction();\n\t\t$notificationTypes = array();\n\t\tforeach ($this->settings as $eventID => $settings) {\n\t\t\t$statement->execute(array(\n\t\t\t\t$eventID,\n\t\t\t\tWCF::getUser()->userID\n\t\t\t));\n\t\t\t\n\t\t\tif ($settings['type']) {\n\t\t\t\t$notificationTypes[$eventID] = $settings['type'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!empty($notificationTypes)) {\n\t\t\t$sql = \"INSERT INTO\twcf\".WCF_N.\"_user_notification_event_notification_type\n\t\t\t\t\t\t(userID, eventID, notificationTypeID)\n\t\t\t\tVALUES\t\t(?, ?, ?)\";\n\t\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\t\tforeach ($notificationTypes as $eventID => $type) {\n\t\t\t\t$statement->execute(array(\n\t\t\t\t\tWCF::getUser()->userID,\n\t\t\t\t\t$eventID,\n\t\t\t\t\t$type\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\tWCF::getDB()->commitTransaction();\n\t}", "private function setConfigEntities()\n {\n foreach ($this->entityMethods as $entity => $methodName) {\n $this->openEntity($entity);\n foreach ($this->generator->types as $objName => $objData) {\n if (in_array($objName, $this->generator->customTypes) === false) { // if this is not a custom type generate resources\n $excluded = false;\n foreach ($this->generator->excludedSubtypes as $type) {\n if (strpos($objName, $type) !== false) {\n $excluded = true;\n }\n }\n // if the type is among excluded - continue\n if ($excluded === true) {\n continue;\n }\n $this->setOptions($objName, $methodName);\n }\n }\n $this->closeEntities();\n }\n }", "function _wp_batch_update_comment_type()\n {\n }", "function updateMemberType($userId, $userType) {\r\n $sql = $this->db->prepare(\"UPDATE USER SET type=:user_type WHERE UserID=:user_id\");\r\n $sql->execute(array(\r\n 'user_type' => $userType,\r\n 'user_id' => $userId,\r\n ));\r\n return true;\r\n }", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);", "public function setType($type);" ]
[ "0.6912789", "0.65836614", "0.6572131", "0.6534108", "0.648626", "0.6399886", "0.6325793", "0.63029975", "0.6285561", "0.62635577", "0.6200354", "0.6191755", "0.6148646", "0.6144508", "0.60502535", "0.6000529", "0.5997764", "0.597976", "0.59766966", "0.59686095", "0.5955569", "0.5914679", "0.5895234", "0.58704174", "0.57984096", "0.5784975", "0.5782443", "0.5781503", "0.57778245", "0.57711", "0.57617676", "0.5732376", "0.57265085", "0.5720883", "0.5720777", "0.57022196", "0.56943303", "0.56929475", "0.566879", "0.5653168", "0.56503296", "0.5633336", "0.5633336", "0.56112266", "0.5605189", "0.5593331", "0.55897105", "0.55878127", "0.55816495", "0.5569762", "0.55574185", "0.55469304", "0.5541306", "0.55293804", "0.55259526", "0.55217683", "0.5516851", "0.5506367", "0.54979926", "0.5487262", "0.5487262", "0.5484173", "0.54835874", "0.54835874", "0.54742086", "0.5469574", "0.5463783", "0.54616344", "0.5456402", "0.54546607", "0.5451739", "0.5441798", "0.5438825", "0.54386395", "0.543806", "0.5436736", "0.5436084", "0.543446", "0.5426651", "0.54242927", "0.54226667", "0.5415018", "0.5411352", "0.54082394", "0.5407746", "0.5401493", "0.5400161", "0.5398523", "0.5397291", "0.5393589", "0.5360082", "0.53487676", "0.5344408", "0.53442544", "0.5343077", "0.53420097", "0.53420097", "0.53420097", "0.53420097", "0.53420097" ]
0.77196634
0
Helper function update entities bundle.
function _mongo_node_update_bundle($entity_type, $old_bundle, $bundle) { // Update bundle name in ids collection. $collection = mongodb_collection($entity_type . '_ids'); $result = $collection->update( array('bundle' => $old_bundle), array('$set' => array('bundle' => $bundle)) ); // Update bundle name in mongo entities. $collection = mongodb_collection('fields_current', $entity_type); $result = $collection->update( array('_bundle' => $old_bundle, '_type' => $entity_type), array('$set' => array('_bundle' => $bundle, 'type' => $bundle)) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function apachesolr_index_set_bundles($env_id, $entity_type, array $bundles) {\n $transaction = db_transaction();\n try {\n db_delete('apachesolr_index_bundles')\n ->condition('env_id', $env_id)\n ->condition('entity_type', $entity_type)\n ->execute();\n\n if ($bundles) {\n $insert = db_insert('apachesolr_index_bundles')\n ->fields(array('env_id', 'entity_type', 'bundle'));\n\n foreach ($bundles as $bundle) {\n $insert->values(array(\n 'env_id' => $env_id,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ));\n }\n $insert->execute();\n }\n }\n catch (Exception $e) {\n $transaction->rollback();\n // Re-throw the exception so we are aware of the failure.\n throw $e;\n }\n}", "public function update($entity)\n {\n \n }", "protected function updateEntity($entity)\n {\n }", "public function singleBundleEditWithOverrides() {\n $entityTypeInfo = $this->createEntityType();\n\n $title_overrides = [];\n foreach ($this->getConfigurableBaseFields() as $field) {\n $title_overrides[$field] = $this->randomMachineName(16);\n }\n\n $bundle_info = $this->createEntityBundle($entityTypeInfo['id'], '', $title_overrides);\n\n $new_title_overrides = [];\n foreach ($this->getConfigurableBaseFields() as $field) {\n $new_title_overrides[$field] = $this->randomMachineName(16);\n }\n\n $this->editEntityBundle($entityTypeInfo['id'], $bundle_info['type'], $this->randomMachineName(16), $new_title_overrides);\n }", "public function update(Entity $entity);", "public function update($entity);", "public function update($entity);", "public function Update($entity) {\n }", "public function update(Connection $connection): void\n {\n $connection->executeUpdate('\n CREATE TABLE IF NOT EXISTS `slaleye_product_bundler_bundle` (\n `id` BINARY(16) NOT NULL,\n `discount_type` VARCHAR(255) NOT NULL,\n `discount` DOUBLE NOT NULL,\n `stackable` TINYINT(1) NULL DEFAULT 0,\n `created_at` DATETIME(3) NOT NULL,\n `updated_at` DATETIME(3) NULL,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n ');\n // Product association Table\n $connection->executeUpdate('\n CREATE TABLE IF NOT EXISTS `slaleye_product_bundler_bundle_product` (\n `bundle_id` BINARY(16) NOT NULL,\n `product_id` BINARY(16) NOT NULL,\n `product_version_id` BINARY(16) NOT NULL,\n `created_at` DATETIME(3) NOT NULL,\n PRIMARY KEY (`bundle_id`, `product_id`, `product_version_id`),\n CONSTRAINT `fk.slaleye_pblr_bundle_product.bundle_id` FOREIGN KEY (`bundle_id`)\n REFERENCES `slaleye_product_bundler_bundle` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n CONSTRAINT `fk.slaleye_pblr_bundle_product.product_id_product_version_id` FOREIGN KEY (`product_id`, `product_version_id`)\n REFERENCES `product` (`id`, `version_id`) ON DELETE CASCADE ON UPDATE CASCADE\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n ');\n\n\n /* For every inherited field you have to add a binary column to the entity, which is used for saving the inherited information in a read optimized manner. */\n $this->updateInheritance($connection, 'product', 'slaleyePblrBundles');\n\n // Translation Table\n $connection->executeUpdate('\n CREATE TABLE IF NOT EXISTS `slaleye_product_bundler_bundle_translation` (\n `slaleye_product_bundler_bundle_id` BINARY(16) NOT NULL,\n `language_id` BINARY(16) NOT NULL,\n `name` VARCHAR(255),\n `created_at` DATETIME(3) NOT NULL,\n `updated_at` DATETIME(3) NULL,\n PRIMARY KEY (`slaleye_product_bundler_bundle_id`, `language_id`),\n CONSTRAINT `fk.slaleye_pblr_bundle_translation.bundle_id` FOREIGN KEY (`slaleye_product_bundler_bundle_id`)\n REFERENCES `slaleye_product_bundler_bundle` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n CONSTRAINT `fk.slaleye_pblr_bundle_translation.language_id` FOREIGN KEY (`language_id`)\n REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CASCADE\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n ');\n }", "public function update(DataObject $entity){\n }", "public function update(stubObject $entity);", "public function update($entity, $flush = false);", "private function executeExtraUpdates()\n {\n foreach ($this->extraUpdates as $oid => $update) {\n list ($entity, $changeset) = $update;\n $this->entityChangeSets[$oid] = $changeset;\n $this->getEntityPersister(get_class($entity))->update($entity);\n }\n $this->extraUpdates = [];\n }", "function mongo_node_mass_update($entity_type, $entities, $args) {\n foreach ($entities as $entity_id) {\n $entity = entity_get_controller($entity_type)->load(array($entity_id));\n $entity = reset($entity);\n // Skip if not updates.\n if (!isset($args['updates'])) {\n continue;\n }\n foreach ($args['updates'] as $p_name => $p_val) {\n $entity->$p_name = $p_val;\n }\n entity_save($entity_type, $entity);\n }\n}", "protected function loadEntitiesToUpdate($entity_ids) {\n return $this->entityTypeManager->getStorage($this->updateEntityType())->loadMultiple($entity_ids);\n }", "public function update($entity){ \n //TODO: Implement update record.\n }", "function apachesolr_index_node_bundles_changed($env_id, $existing_bundles, $new_bundles) {\n // Nothing to do for now.\n}", "protected function saveAndReplaceEntity()\n {\n $behavior = $this->getBehavior();\n $listId = [];\n while ($bunch = $this->_dataSourceModel->getNextBunch()) {\n $entityList = [];\n foreach ($bunch as $rowNum => $rowData) {\n if (!$this->validateRow($rowData, $rowNum)) {\n $this->addRowError(ValidatorInterface::ERROR_ID_IS_EMPTY, $rowNum);\n continue;\n }\n if ($this->getErrorAggregator()->hasToBeTerminated()) {\n $this->getErrorAggregator()->addRowToSkip($rowNum);\n continue;\n }\n $taskId= $rowData[self::TASK_ID];\n $listId[] = $taskId;\n $entityList[$taskId][] = [\n self::TASK_ID => $rowData[self::TASK_ID ],\n self::TASK_NAME => $rowData[self::TASK_NAME ],\n self::TASK_CONTENT => $rowData[self::TASK_CONTENT],\n self::START_DATE => $rowData[self::START_DATE ],\n self::END_DATE => $rowData[self::END_DATE ],\n self::STATUS => $rowData[self::STATUS ],\n self::ASSIGN_TO => $rowData[self::ASSIGN_TO ],\n self::PROGRESS => $rowData[self::PROGRESS ],\n self::DESCRIPTION => $rowData[self::DESCRIPTION ],\n self::PRIORITY => $rowData[self::PRIORITY ],\n self::CREATED_AT => $rowData[self::CREATED_AT ],\n self::UPDATED_AT => $rowData[self::UPDATED_AT ],\n self::USER_CREATED => $rowData[self::USER_CREATED],\n self::USER_UPDATED => $rowData[self::USER_UPDATED],\n ];\n }\n\n if (Import::BEHAVIOR_REPLACE == $behavior) {\n if ($listId) {\n if ($this->deleteEntityFinish(array_unique($listId), self::TABLE_ENTITY)) {\n $this->saveEntityFinish($entityList, self::TABLE_ENTITY);\n }\n }\n } elseif (Import::BEHAVIOR_APPEND == $behavior) {\n $this->saveEntityFinish($entityList, self::TABLE_ENTITY);\n }\n }\n\n return $this;\n }", "function _update($entity)\n {\n $key = $this->object->get_primary_key_column();\n return $this->object->_wpdb()->update($this->object->get_table_name(), $this->object->_convert_to_table_data($entity), array($key => $entity->{$key}));\n }", "function nestedbox_core_entity_info_alter(array &$entity_info) {\n foreach (nestedbox_get_types() as $type => $info) {\n $entity_info['nestedbox']['bundles'][$type] = array(\n 'label' => $info->label,\n 'admin' => array(\n /* @see nestedbox_type_load() */\n 'path' => 'admin/structure/nestedbox-types/manage/%nestedbox_type',\n 'real path' => 'admin/structure/nestedbox-types/manage/' . $type,\n 'bundle argument' => 4,\n 'access arguments' => array('administer nestedbox types'),\n ),\n );\n }\n}", "public function postUpdate($entity);", "public function updateSlugs(object $entity) :void\n {\n foreach($this->reader->getSlugProperties($entity) as $slugProperty)\n {\n $this->updateSlug($entity, $slugProperty);\n }\n }", "public function update($entity){\n\t\ttry {\n\t\t\t$data = $entity->toArray();\n\t\t\t$this->updateEmbedded($data,$entity);\n\t\t\t$theId = new MongoId($data['_id']);\n\t\t\tunset($data['_id']);\n\t\t\t$this->callBehavior('beforeUpdate',$data,$entity);\n\t\t\t$bulk = new BulkWrite();\n\t\t\t$bulk->update(['_id'=>$theId],$data);\n\t\t\t$this->manager->executeBulkWrite($this->dbName.'.'.$this->collectionName,$bulk);\n\t\t\t$this->callBehavior('afterUpdate',$data,$entity);\n\t\t} catch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function update(IEntity $entity);", "public function updateEntityData(EntityData $entityData);", "public function getMappingEntityBundle();", "public function updateBulkProductsInventorySource($products);", "public function patchEntities(iterable $entities, array $data, array $options = []): array;", "public function updateAction(Request $request, $id)\n{\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('gemaBundle:Productosprogramas')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Productosprogramas entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n $accion = ' ';\n $this->get(\"gema.utiles\")->traza($accion);\n $em->flush();\n\n \n \n\n \n return $this->redirect($this->generateUrl('admin_productosprogramas_edit', array('id' => $id)));\n \n}", "protected function afterImport($entities)\n {\n\n }", "public function updateBulkProductsInventory($products);", "public function update($entity)\n {\n $this->getObjectManager()->persist($entity);\n $this->getObjectManager()->flush();\n }", "protected function setupBundle() {\n if (empty($this->bundle)) {\n $this->bundle = $this->entityTypeId;\n }\n }", "public function entityUpdate(EntityInterface $entity) {\n $entity_type = $entity->getEntityTypeId();\n // If this isn't the enabled Recurly entity type, do nothing.\n if (\\Drupal::config('recurly.settings')->get('recurly_entity_type') !== $entity_type) {\n return;\n }\n\n // Check if this entity has a remote Recurly account that we should sync.\n $local_account = recurly_account_load(['entity_type' => $entity_type, 'entity_id' => $entity->id()], TRUE);\n if (!$local_account) {\n return;\n }\n\n // Check if any of the mapping tokens have changed.\n if (!$entity->getOriginalId() || !$original_entity = \\Drupal::entityManager()->getStorage($entity_type)->load($entity->getOriginalId())) {\n return;\n }\n $original_values = [];\n $updated_values = [];\n\n $recurly_token_manager = \\Drupal::service('recurly.token_manager');\n foreach ($recurly_token_manager->tokenMapping() as $recurly_field => $token) {\n $original_values[$recurly_field] = \\Drupal::token()->replace($token, [$entity_type => $original_entity], ['clear' => TRUE, 'sanitize' => FALSE]);\n $updated_values[$recurly_field] = \\Drupal::token()->replace($token, [$entity_type => $entity], ['clear' => TRUE, 'sanitize' => FALSE]);\n }\n $original_values['username'] = $original_entity->label();\n $updated_values['username'] = $entity->label();\n\n // If there are any changes, push them to Recurly.\n if ($original_values !== $updated_values) {\n try {\n $recurly_account = recurly_account_load(['entity_type' => $entity_type, 'entity_id' => $entity->id()]);\n $address_fields = [\n 'address1',\n 'address2',\n 'city',\n 'state',\n 'zip',\n 'country',\n 'phone',\n ];\n foreach ($updated_values as $field => $value) {\n if (strlen($value)) {\n if (in_array($field, $address_fields)) {\n // The Recurly PHP client doesn't check for nested objects when\n // determining what properties have changed when updating an\n // object. This works around it by re-assigning the address\n // property instead of directly modifying the address's fields.\n // This can be removed when\n // https://github.com/recurly/recurly-client-php/pull/80 is merged\n // in.\n //\n // $recurly_account->address->{$field} = $value;.\n $adr = $recurly_account->address;\n $adr->{$field} = $value;\n $recurly_account->address = $adr;\n }\n else {\n $recurly_account->{$field} = $value;\n }\n }\n }\n $recurly_account->update();\n }\n catch (\\Recurly_Error $e) {\n drupal_set_message($this->stringTranslation->translate('The billing system reported an error: \"@error\" To ensure proper billing, please correct the problem if possible or contact support.', ['@error' => $e->getMessage()]), 'warning');\n \\Drupal::logger('recurly')->error('Account information could not be sent to the Recurly, it reported \"@error\" while trying to update <a href=\"@url\">@title</a> with the values @values.', [\n '@error' => $e->getMessage(),\n '@title' => $entity->label(),\n '@url' => $entity->toUrl(),\n '@values' => print_r($updated_values, 1),\n ]);\n }\n }\n }", "protected function postUpdate($entity) {\n if (isset($entity['id'])) {\n ManagerHolder::get('StoreInventory')->createDefault($entity['id'], str_replace('Manager', '', self::class));\n }\n }", "public function persist($oneOrManyEntities): void;", "public function updateMany(array $entities)\n {\n $this->_em->getConnection()->beginTransaction();\n try {\n for($i = 0; $i < count($entities); $i++){\n $this->update($entities[$i]);\n }\n $this->_em->flush();\n $this->_em->getConnection()->commit();\n } catch (\\Exception $e) {\n $this->_em->getConnection()->rollback();\n $this->_em->close();\n if($e instanceof \\Etermax\\Db\\Doctrine\\Exception){\n $e->extendMsg('Verify the entity in the array position: ' . $i);\n } else {\n $e = new Exception(array(\n 'prop' => '@internalError', \n 'extend' => 'Verify the entity in the array position: ' . $i));\n }\n throw $e;\n } \n }", "function update(IContract $entity);", "public function postFlush()\n {\n foreach ($this->parametersMap as $map) {\n $map['entity']->setParameters($map['parameters']);\n }\n\n // reset parameters map\n $this->parametersMap = [];\n }", "public function save($oneOrManyEntities): void;", "function mongo_node_bundle_edit_form_submit($form, $form_state) {\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['bundle_type']['entity_type'];\n $old_bundle_type = $form_state['values']['bundle_type']['bundle'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_bundle_type) {\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n $set[$entity_type]['bundles'][$machine_name] = $set[$entity_type]['bundles'][$old_bundle_type];\n unset($set[$entity_type]['bundles'][$old_bundle_type]);\n\n // Update existing mongo entities with new bundle.\n //_mongo_node_update_bundle($entity_type, $old_bundle_type, $machine_name);\n }\n else {\n $set[$entity_type]['bundles'][$machine_name]['label'] = $label;\n $set[$entity_type]['bundles'][$machine_name]['description'] = $description;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "public function postFlush(PostFlushEventArgs $postFlushEventArgs)\n {\n if (!empty($this->products_to_update))\n {\n $em = $postFlushEventArgs->getEntityManager();\n\n // Update proucts\n foreach ($this->products_to_update as $key => $product)\n {\n // Check if list is empty\n if (empty($this->products_to_update))\n break;\n\n // Update product to fire off the event listeners\n if ($product instanceof Product)\n {\n $status_override = $product->getStatusOverride();\n\n if (!($status_override instanceof Status) || (($status_override instanceof Status) && $status_override->getId() != 3))\n {\n $product->setDateModified(new \\DateTime());\n $em->persist($product);\n }\n }\n\n unset($this->products_to_update[$key]);\n }\n\n $em->flush();\n }\n }", "public function update(array $data){\n $entity = $this->em->getReference($this->entity, $data['id']);\n //Peguei o que eu precisava, agora � necessario pupular o registro com os dados que vieram\n //do array data. E para isso vamos usar o hidrator.\n //Populando o entity\n (new Hydrator\\ClassMethods())->hydrate($data,$entity);\n \n $this->em->persist($entity);\n $this->em->flush();\n return $entity;\n }", "abstract public function bundle();", "protected function updateEntity($entity)\n {\n $enviarCorreo_publicado = false;\n $em = $this->getDoctrine()->getManager();\n $uow = $em->getUnitOfWork();\n $uow->computeChangeSets();\n $changeSet = $uow->getEntityChangeSet($entity);\n \n if ($changeSet) {\n if (array_key_exists(\"publicado\", $changeSet)) {\n if ($changeSet['publicado'][1] == true) {\n $enviarCorreo_publicado = true;\n }\n } \n }\n \n //verificio si se modificaron los comentarios\n $modificacion_comentarios=$entity->getComentarios()->isDirty(); \n $nuevos_comentarios=[];\n if($modificacion_comentarios){\n $nuevos_comentarios=$entity->getComentarios()->getInsertDiff();\n }\n \n \n parent::updateEntity($entity);\n \n\n // obtengo ahora el mail de soporte\n $soporte_mail = $this->getDoctrine()\n ->getRepository(Contenido::class)\n ->findOneByCodigo('soporte_mail');\n\n if ($soporte_mail) {\n $soporte_mail = $soporte_mail->getTexto();\n } else {\n $soporte_mail = '';\n }\n\n // obtengo ahora el nro de telefono del soporte \n $soporte_tel = $this->getDoctrine()\n ->getRepository(Contenido::class)\n ->findOneByCodigo('soporte_tel');\n if ($soporte_tel) {\n $soporte_tel = $soporte_tel->getTexto();\n } else {\n $soporte_tel = '';\n }\n\n\n if ($modificacion_comentarios) {\n //obtengo los nuevos comentarios\n \n //obtengo los usuarios y los colaboradores para notificarles de los comentarios\n $usuario=$entity->getUser();\n $colaboradores=[];\n if ($entity->getOng()) {\n $colaboradores=$entity->getOng()->getColaborators();\n }\n \n $usuarios=$colaboradores;\n $usuarios[]=$usuario;\n\n foreach ($usuarios as $user) {\n $message = (new \\Swift_Message('Nuevo comentario de noticia'))\n ->setFrom('[email protected]')\n ->setSubject('Nuevo comentario de noticia : '.$entity->getTitulo())\n ->setTo($user->getEmail())\n ->setBody(\n $this->renderView(\n 'mails/comentario_entrada.html.twig',\n array(\n 'soporte_tel' => $soporte_tel, \n 'soporte_mail'=> $soporte_mail,\n 'entrada'=>$entity,\n 'tipo'=>1,\n 'nuevos_comentarios'=>$nuevos_comentarios\n )\n ),\n 'text/html'\n );\n \n $this->get('mailer')->send($message);\n }\n }\n\n if ($enviarCorreo_publicado) {\n \n \n $usuarios=$this->getDoctrine()\n ->getRepository(User::class)\n ->findBy(['enabled'=>1]);\n \n // Envio correo\n foreach ($usuarios as $usuario) {\n \n $message = (new \\Swift_Message('Nueva noticia'))\n ->setFrom('[email protected]')\n ->setSubject('Nueva noticia: '.$entity->getTitulo())\n ->setTo($usuario->getEmail())\n ->setBody(\n $this->renderView(\n 'mails/nueva_entrada.html.twig',\n array(\n 'soporte_tel' => $soporte_tel, \n 'soporte_mail'=> $soporte_mail,\n 'tipo'=>1,\n 'entrada'=>$entity\n )\n ),\n 'text/html'\n );\n \n $this->get('mailer')->send($message);\n }\n }\n }", "protected function applyReplace(): void {\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t$to_tag = $this->to_tag;\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names) || elgg_is_empty($to_tag)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$batch = elgg_get_entities([\n\t\t\t'type_subtype_pairs' => $entity_types,\n\t\t\t'metadata_names' => $tag_names,\n\t\t\t'metadata_value' => $this->from_tag,\n\t\t\t'metadata_case_sensitive' => false,\n\t\t\t'limit' => false,\n\t\t\t'batch' => true,\n\t\t\t'batch_inc_offset' => false,\n\t\t]);\n\t\t\n\t\t/* @var $entity \\ElggEntity */\n\t\tforeach ($batch as $entity) {\n\t\t\t// check all tag fields\n\t\t\tforeach ($tag_names as $tag_name) {\n\t\t\t\t$value = $entity->$tag_name;\n\t\t\t\tif (elgg_is_empty($value)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_array($value)) {\n\t\t\t\t\t$value = [$value];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$found = false;\n\t\t\t\t$add = true;\n\t\t\t\t\n\t\t\t\tforeach ($value as $index => $v) {\n\t\t\t\t\tif (strtolower($v) === $this->from_tag) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tunset($value[$index]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($v === $to_tag) {\n\t\t\t\t\t\t// found replacement value, no need to add\n\t\t\t\t\t\t$add = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$found) {\n\t\t\t\t\t// this field doesn't contain the original value\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// only add new value if doesn't already contain this\n\t\t\t\tif ($add) {\n\t\t\t\t\t$value[] = $to_tag;\n\t\t\t\t\t\n\t\t\t\t\tif (($tag_name === 'tags') && tag_tools_is_notification_entity($entity->guid)) {\n\t\t\t\t\t\t// set tag as notified\n\t\t\t\t\t\ttag_tools_add_sent_tags($entity, [$to_tag]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// store new value\n\t\t\t\t$entity->$tag_name = $value;\n\t\t\t\t\n\t\t\t\t// let system know entity has been updated\n\t\t\t\t$entity->save();\n\t\t\t}\n\t\t}\n\t}", "function updateEntity($args = array(), $entity = '', $fields = array(),\n $where = array(), $notequal = array())\n {\n // $setParams = $args['setParams'];\n $setParams = array();\n $entity = (isset($args ['entity']) && !empty($args ['entity'])) ? $args ['entity']\n : $entity;\n $fields = (isset($args ['fields']) && !empty($args ['fields'])) ? $args ['fields']\n : $fields;\n $where = $this->generateWhere((isset($args ['where']) && !empty($args ['where']))\n ? $args ['where'] : $where, null,\n (isset($args ['notequal']) && !empty($args ['notequal'])) ? $args ['notequal']\n : $notequal );\n $items = '';\n foreach ($fields as $fkey => $fval) {\n // $items .= \"a.\" . $fkey . \"=\" . \"'$fval'\" . ',';\n $items .= \"a.\".$fkey.\"=\".\":$fkey\".',';\n $setParams [$fkey] = $fval;\n }\n // echo $items; exit;\n // echo \"<pre>\"; print_r($setParams); echo \"</pre>\"; exit;\n $items = substr($items, 0, - 1);\n\n $setParams += $where ['setParams'];\n // echo \"<pre>\"; print_r($setParams); echo \"</pre>\"; exit;\n // $where = $this->generateWhere($args['where']);\n $query = \"UPDATE $entity a SET $items WHERE \".$where ['where'];\n // echo $query; exit;\n $q = $this->_em->createQuery($query);\n $q->setParameters($setParams);\n $numUpdated = $q->execute();\n // return $numUpdated;\n return true;\n }", "public function postLoad($entity);", "abstract protected function getEntitiesToSync();", "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 }", "public function update($identifier, array $values, $flush = true);", "function jo($entity) {\n $entity->setEntityId(($entity->getEntityId() +1));\n }", "public function entitySave($entity) {\n farm_asset_save($entity);\n }", "abstract protected function prepareEntity(/*array*/ $entity_data);", "public function reload($entity);", "public function setRelatedBundlesForSimpleProducts($bundleProduct)\n {\n $selectionCollection = $bundleProduct->getTypeInstance(true)->getSelectionsCollection(\n $bundleProduct->getTypeInstance(true)->getOptionsIds($bundleProduct), $bundleProduct\n );\n foreach($selectionCollection as $option) {\n try {\n $_product = Mage::getModel('catalog/product')->load($option->getEntityId());\n if($_product->getId()) {\n $customLinkData = array();\n foreach($_product->getRelatedBundleCollection() as $customLink) {\n $customLinkData[$customLink->getLinkedProductId()]['position'] = $customLink->getPosition();\n }\n $customLinkData[$bundleProduct->getId()] = array('position' => 0);\n $_product->setRelatedBundleData($customLinkData)->save();\n Mage::getSingleton('adminhtml/session')->addSuccess('Added ' . $bundleProduct->getSku() . ' as a Related Bundle to product ' . $_product->getSku());\n }\n } catch(Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError('Could not set bundled product as Related Bundle for product ' . $option->getSku() . '; ' . $e->getMessage());\n }\n }\n\n }", "public function update($lote)\n {\n $em = $this->getEntityManager();\n $em->persist($em->merge($lote));\n $em->flush();\n }", "public function update(Entity $entity) {\n \t\n \tif (CPIQUtils::isMatriculadoLogged()) {\n \n $oMatriculado = CPIQUtils::getMatriculadoLogged();\n \n $entity->setMatriculado($oMatriculado);\n }\n else throw new GenericException( CPIQ_MSG_ENCOMIENDA_SIN_MATRICULADO );\n\t\t$entity->setFecha(date(DB_DEFAULT_DATETIME_FORMAT));\n\n\t\t/*$entity->setPrimero(CPIQ_ENCOMIENDA_TEXTO_PRIMERO);\n\t\n\t\t$entity->setSegundo(CPIQ_ENCOMIENDA_TEXTO_SEGUNDO);\n\t\t\n\t\t$entity->setTercero(CPIQ_ENCOMIENDA_TEXTO_TERCERO);\n\t\t\n\t\t$entity->setCuarto(CPIQ_ENCOMIENDA_TEXTO_CUARTO);\n\t\t\n\t\t$entity->setQuinto(CPIQ_ENCOMIENDA_TEXTO_QUINTO);\n\t\t\n\t\t$entity->setPosFirmaComitente(CPIQ_ENCOMIENDA_TEXTO_POS_FIRMA_COMITENTE);\n\t\t\n\t\t$entity->setSeguridadTexto(CPIQ_ENCOMIENDA_TEXTO_SEGURIDAD);\n\t\t\n\t\t$entity->setPiePagina(CPIQ_ENCOMIENDA_TEXTO_PIE_PAGINA);*/\n\t\t\n\t\t//$nroMatriculado = str_pad($entity->getMatriculado()->getOid(), CPIQ_NRO_DIGITOS_MATRICULADO, \"0\", STR_PAD_LEFT);\n\t\t//$nroEncomienda = str_pad($entity->getOid(), CPIQ_NRO_DIGITOS_ENCOMIENDA, \"0\", STR_PAD_LEFT);\n\t\t$managerEncomienda = ManagerFactory::getEncomiendaManager();\n\t\t$oEncomienda = $managerEncomienda->getObjectByCode($entity->getOid());\n\t\t$seguridad = $oEncomienda->getSeguridad();\n\t\t$oldVersion = substr($seguridad, -4); \n\t\t$nroVersion = str_pad(intval($oldVersion)+1, CPIQ_NRO_DIGITOS_VERSION, \"0\", STR_PAD_LEFT);\n\t\t$nroSeguridad = str_pad($entity->getOid().$entity->getMatriculado()->getOid(), CPIQ_NRO_DIGITOS_SEGURIDAD, \"0\", STR_PAD_LEFT);\n\t\t$entity->setNumero($oEncomienda->getNumero());\n\t\t$entity->setSeguridad($nroSeguridad.$nroVersion);\n \t\n \tparent::update($entity);\n //agregamos las entidades relacionadas.\n\t\t\n \t\n \t$encomiendaProfesionalDAO = DAOFactory::getEncomiendaProfesionalDAO();\n $encomiendaProfesionalDAO->deleteEncomiendaProfesionalPorEncomienda($entity->getOid());\n \n $encomiendaRegistroDAO = DAOFactory::getEncomiendaRegistroDAO();\n $encomiendaRegistroDAO->deleteEncomiendaRegistroPorEncomienda($entity->getOid());\n \n $encomiendaEspecialidadDAO = DAOFactory::getEncomiendaEspecialidadDAO();\n $encomiendaEspecialidadDAO->deleteEncomiendaEspecialidadPorEncomienda($entity->getOid());\n \t\n\t\t//profesionales\n\t\t$profesionales = $entity->getProfesionales();\n\t\tforeach ($profesionales as $encomiendaProfesional) {\n\t\t\t$encomiendaProfesional->setEncomienda( $entity );\n\t\t\t$oUser = CdtSecureUtils::getUserLogged();\n\t\t\t$encomiendaProfesional->setUser($oUser);\n\t\t\t$encomiendaProfesional->setFechaUltModificacion(date(DB_DEFAULT_DATETIME_FORMAT));\n\t\t\t$managerEncomiendaProfesional = new EncomiendaProfesionalManager();\n\t\t\t$managerEncomiendaProfesional->add($encomiendaProfesional);\n\t\t\t\n\t\t}\n\t\t\n\t\t$registros = $entity->getRegistros();\n\t\tforeach ($registros as $encomiendaRegistro) {\n\t\t\t$encomiendaRegistro->setEncomienda( $entity );\n\t\t\t$oUser = CdtSecureUtils::getUserLogged();\n\t\t\t$encomiendaRegistro->setUser($oUser);\n\t\t\t$encomiendaRegistro->setFechaUltModificacion(date(DB_DEFAULT_DATETIME_FORMAT));\n\t\t\t$managerEncomiendaRegistro = new EncomiendaRegistroManager();\n\t\t\t$managerEncomiendaRegistro->add($encomiendaRegistro);\n\t\t}\n\t\t\n\t\t$especialidades = $entity->getEspecialidades();\n\t\tforeach ($especialidades as $encomiendaEspecialidad) {\n\t\t\t$encomiendaEspecialidad->setEncomienda( $entity );\n\t\t\t$oUser = CdtSecureUtils::getUserLogged();\n\t\t\t$encomiendaEspecialidad->setUser($oUser);\n\t\t\t$encomiendaEspecialidad->setFechaUltModificacion(date(DB_DEFAULT_DATETIME_FORMAT));\n\t\t\t$managerEncomiendaEspecialidad = new EncomiendaEspecialidadManager();\n\t\t\t$managerEncomiendaEspecialidad->add($encomiendaEspecialidad);\n\t\t}\n }", "function complete($entity, stdClass $row) {\n $migrationData = $this->migrationData;\n // Parameter entityque is present.\n if (!empty($migrationData['entityqueue'])\n && (module_exists('entityqueue'))\n // Entity type for the element being migrated\n && (!empty($migrationData['entity_type']))\n // Loads queue as stated on parameters.\n && ($queue = entityqueue_subqueue_load($migrationData['entityqueue']))\n // Check if our entity is supported by this queue.\n && ($field_name = _entityqueue_get_target_field_name($migrationData['entity_type']))\n && ($instances = array_key_exists($field_name, field_info_instances('entityqueue_subqueue', $queue->queue)))\n ) {\n // Getting id for current entity\n list($id) = entity_extract_ids($migrationData['entity_type'], $entity);\n // Wrapper for entityqueue.\n $wrapper = entity_metadata_wrapper('entityqueue_subqueue', $queue);\n // Loading entity into entityqueue.\n $wrapper->{$field_name}[] = $id;\n $wrapper->save();\n }\n }", "public function getUpdateResponse($entity);", "public function flush()\n {\n $this->getEntityManager()->flush();\n }", "public function updateEntity($entityId, $request)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "function editEntity($cols, $entity_name) {\n\t$content = file_get_contents(ENTITY_PATH . $entity_name . '.php');\n\tpreg_match(\"/\\\\/\\\\*\\\\*.*?\\\\*\\\\//s\", $content, $matches);\n\n\tif(!$matches) {\n\t\treturn;\n\t}\n\n\t$old_properties = $matches[0];\n\n\t$new_properties = ' * ' . implode(' * ', $cols);\n\t$new_properties = \"/**\\n$new_properties */\\n\";\n\n\t$content = str_replace($old_properties, $new_properties, $content);\n\tfile_put_contents(ENTITY_PATH . $entity_name . '.php', $content);\n}", "public function itemUpdate(Event $event){\n $em = $this->getServiceLocator()->get('Omeka\\EntityManager');\n $entity = $event->getParam('entity');\n $request = $event->getParam('request');\n $operation = $request->getOperation();\n $error_store = $event->getParam('errorStore');\n\n if ($operation == 'update' ){\n $resource_id = $request->getId();\n\n if (array_key_exists('team', $request->getContent())){\n\n //array of team ids\n $teams = $request->getContent()['team'];\n\n //array of media ids\n $media_ids = [];\n foreach ($entity->getMedia() as $media):\n error_log('found a media. Id: ' . $media->getId());\n\n $media_ids[] = $media->getId();\n endforeach;\n\n //remove resource from all teams\n $team_resources = $em->getRepository('Teams\\Entity\\TeamResource')->findBy(['resource' => $resource_id]);\n foreach ($team_resources as $tr):\n $em->remove($tr);\n endforeach;\n\n\n\n //remove associated media from all teams\n foreach ($media_ids as $media_id):\n $team_resources = $em->getRepository('Teams\\Entity\\TeamResource')->findBy(['resource' => $media_id]);\n foreach ($team_resources as $tr):\n $em->remove($tr);\n endforeach;\n endforeach;\n $em->flush();\n\n //resource represented by the item in the resource table\n $resource = $em->getRepository('Omeka\\Entity\\Resource')\n ->findOneBy(['id' => $resource_id]);\n\n foreach ($teams as $team_id):\n $team = $em->getRepository('Teams\\Entity\\Team')->findOneBy(['id' => $team_id]);\n if (! $em->getRepository('Teams\\Entity\\TeamResource')\n ->findOneBy(['team'=>$team_id, 'resource'=>$resource_id])){\n $tr = new TeamResource($team, $resource);\n $em->persist($tr);}\n\n\n foreach ($media_ids as $media_id):\n error_log('this is a media id:' . $media_id);\n if (! $em->getRepository('Teams\\Entity\\TeamResource')\n ->findOneBy(['team'=>$team_id, 'resource'=>$media_id])){\n\n $m = $em->getRepository('Omeka\\Entity\\Resource')->findOneBy(['id'=>$media_id]);\n if ($m){\n $mtr = new TeamResource($team, $m);\n $em->persist($mtr);\n }\n\n }\n endforeach;\n endforeach;\n $em->flush();\n }\n }\n\n }", "private function updateProductVariants($params)\n {\n if ($params['variants']) {\n foreach ($params['variants'] as $productParams) {\n $product = Product::find($productParams['id']);\n $product->update($productParams);\n\n $product->status = $params['status'];\n $product->save();\n\n ProductInventory::updateOrCreate(['product_id' => $product->id], ['qty' => $productParams['qty']]);\n }\n }\n }", "private function setConfigEntities()\n {\n foreach ($this->entityMethods as $entity => $methodName) {\n $this->openEntity($entity);\n foreach ($this->generator->types as $objName => $objData) {\n if (in_array($objName, $this->generator->customTypes) === false) { // if this is not a custom type generate resources\n $excluded = false;\n foreach ($this->generator->excludedSubtypes as $type) {\n if (strpos($objName, $type) !== false) {\n $excluded = true;\n }\n }\n // if the type is among excluded - continue\n if ($excluded === true) {\n continue;\n }\n $this->setOptions($objName, $methodName);\n }\n }\n $this->closeEntities();\n }\n }", "public function addEntity($entity) {\n $this->entityManager->merge($entity);\n $this->entityManager->flush();\n }", "public function setEntity( $entity )\n {\n \n $this->entity = $entity;\n \n }", "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 static function postLoad(EntityStorageInterface $storage, array &$entities);", "public static function updateAll()\r\n\t{\r\n\t}", "public function update(PhpORM_Entity $entity)\n {\n $table = $this->getTable();\n $data = $entity->toArray();\n\n $id = $entity->id;\n unset($data['id']);\n\n $table->update($data, \"id = '$id'\");\n }", "function jornadas_entity_update($entity, $type) {\n if($type=='data_jornadas'){\n db_delete('jormada_tiempo_produccion')->condition('jid',$entity->jid)->execute();\n \n foreach ($entity->production_time as $lid => $element) {\n foreach ($element as $fid => $time) {\n db_insert('jormada_tiempo_produccion')->fields(array('jid'=>$entity->jid,'lid'=>$lid,'fid'=>$fid,'time'=>$time))->execute();\n\n }\n }\n }\n \n\n}", "public function refresh()\n {\n $this->entityManager->refresh($this);\n }", "public function flushChanges()\n {\n $this->om->flush();\n }", "private function updatePositions($entity)\n\t{\n\t\t/**\n\t\t * Searching for request hashtags in the scheme\n\t\t * attributename_hash\n\t\t*/\n\t\t$hashesValues=array();\n\t\tforeach($this->entity->fields as $k=>$v)\n\t\t{\n\t\t\tforeach($_REQUEST as $requestKey=>$requestValue)\n\t\t\t{\n\t\t\t\tif (ereg(\"{$v->name}_\",$requestKey) && ereg(\"{$this->formHash}\",$requestKey)) {\n\t\t\t\t\t$hash=preg_replace(\"/{$v->name}_/\",\"\",$requestKey);\n\t\t\t\t\tif(!in_array($hash,$hashesValues))\n\t\t\t\t\t{\n\t\t\t\t\t\t$hashesValues[]=$hash;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * for every found hashtag we have a relation to update\n\t\t */\n\t\tforeach($hashesValues as $k=>$hash)\n\t\t{\n\t\t\t/**\n\t\t\t * preparing update value conditions, first of all the primary key of the base entity\n\t\t\t */\n\t\t\t$values_conditions=array();\n\t\t\t$where_conditions=array();\n\t\t\n\t\t\t\n\t\t\t/**\n\t\t\t * for every field of the entity to update\n\t\t\t */\n\t\t\tforeach($this->entity->fields as $k=>$v)\n\t\t\t{\t/**\n\t\t\t\t* for every element of the request\n\t\t\t\t*/\n\t\t\t\tforeach($_REQUEST as $requestKey=>$requestValue)\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * if there's an element of the request compatible with the hash and the entity field\n\t\t\t\t\t */\n\t\t\t\t\tif (preg_match(\"/{$v->name}_{$hash}/\",$requestKey)&&!empty($v->name)) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * add it to values conditions\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif($v->name==$this->entity->fields[0]->name)\n\t\t\t\t\t\t\t$where_conditions[$v->name]=$requestValue;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$values_conditions[$v->name]=$requestValue;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\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/**\n\t\t\t * if check is passed update the entity\n\t\t\t */\n\t\t\tif(sizeof($where_conditions)>0 && sizeof($values_conditions)>0)\n\t\t\t{\n\t\t\t\t$this->entity->update($where_conditions,$values_conditions);\n\t\t\t}\n\t\t}\n\t}", "abstract protected function getEntitySetWithDefaults();", "public function testUpdateTranslationWithLocaleInEntity(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $article->set('_locale', 'fra');\n $article->set('title', 'Le titre');\n $table->save($article);\n $this->assertNull($article->get('_i18n'));\n\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $this->assertSame('First Article', $article->get('title'));\n $this->assertSame('First Article Body', $article->get('body'));\n\n $table->setLocale('fra');\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $this->assertSame('Le titre', $article->get('title'));\n $this->assertSame('First Article Body', $article->get('body'));\n }", "function hook_i18n_sync_options_alter(&$fields, $entity_type, $bundle_name) {\n\n}", "function amo_update($entity, $data, $search_similiar = false, $need_prepare = true)\n{\n if (substr($entity, -1) == 's') {\n $link = $entity;\n $many_items = true;\n } else {\n if ($entity == 'company') {\n $link = 'companies';\n } else {\n $link = $entity . 's';\n }\n }\n\n if (isset($data['search']) && !empty($data['search'])) {\n $search_similiar = true;\n }\n\n if ($need_prepare) {\n $item = prepare_data($entity, $data, $search_similiar);\n } else {\n $item = $data;\n }\n\n if ($item) {\n if (!$many_items) {\n $items = [$item];\n } else {\n $items = $item;\n }\n\n foreach ($items as $key => $item) {\n if (isset($item['id'])) {\n\n // no_update ставится в случае когда данные контакта совпадают с данными в амо.\n if ($item['no_update']) {\n return $item['id'];\n }\n\n $action_msg = 'Обновлён ';\n $ids_to_update[] = $item['id'];\n $item['updated_at'] = time(); // + 1000\n $sorted_data['update'][] = $item;\n\n } else {\n $ids_to_add[] = $item['id'];\n $action_msg = 'Добавлен ';\n $sorted_data['add'][] = $item;\n }\n }\n\n/* if (!empty($ids_to_update)) {\nlogw('Обновляем ' . $entity . ' id ' . implode(', ', $ids_to_update));\n}\n\nif (!empty($ids_to_add)) {\nlogw('Добавляем ' . $entity);\n}*/\n\n $output = run_curl($link, $sorted_data);\n\n if (!empty($output['_embedded']['items'])) {\n foreach ($output['_embedded']['items'] as $key => $value) {\n $updated_id[] = $value['id'];\n }\n } else {\n logw('Ошибка обновления');\n logw($output);\n return false;\n }\n\n if (!empty($updated_id)) {\n $updated_id_msg = implode(', ', $updated_id);\n } else {\n logw('Ошибка обновления ' . $entity);\n logw($output);\n return false;\n }\n\n if ($many_items) {\n logw('Обновлены ' . $entity . ' id ' . $updated_id_msg);\n return $updated_id;\n } else {\n logw($action_msg . $entity . ' id ' . $updated_id_msg);\n return $updated_id[0];\n }\n\n } else {\n logw('Ошибка: не получены данные от prepare_data');\n return false;\n }\n}", "protected function setEntities(iterable $entities): void\n {\n $this->entities = i\\iterable_to_array($entities, true);\n }", "function _mongo_node_update_type($old_entity_type, $entity_type) {\n // Update collection names.\n _mongo_node_rename_collection($old_entity_type, $entity_type);\n\n // Update bundle name in mongo entities.\n $collection = mongodb_collection('fields_current', $entity_type);\n $result = $collection->update(\n array('_type' => $old_entity_type),\n array('$set' => array('_type' => $entity_type, 'type' => $entity_type))\n );\n}", "function hook_uuid_entities_features_export_entity_alter(&$entity, $entity_type) {\n\n}", "protected function saveRelations($baseEntity)\n\t{\n\t\t$baseEntityPrimaryKeyName=$baseEntity->fields[0]->name;\n\t\t$baseEntityPrimaryKeyValue=$_REQUEST[$baseEntity->fields[0]->name];\n\n\t\t/**\n\t\t * if the main entity was correctly updated it's time to update her relations included in the requested\n\t\t * triggered forms (subforms).\n\t\t */\n\n\t\t/**\n\t\t * preparing update conditions, first of all the primary key of the base entity\n\t\t */\n\t\t$values_conditions=array(\"{$baseEntityPrimaryKeyName}_{$baseEntity->name}\"=>$baseEntityPrimaryKeyValue);\n\n\t\t/**\n\t\t * after it remove all occurences of the relations , they will be reinserted\n\t\t*/\n\t\t$this->entity->delete($values_conditions);\n\n\t\t/**\n\t\t * Searching for request hashtags in the scheme\n\t\t * attributename_hash\n\t\t*/\n\t\t$hashesValues=array();\n\t\tforeach($this->entity->fields as $k=>$v)\n\t\t{\n\t\t\tforeach($_REQUEST as $requestKey=>$requestValue)\n\t\t\t{\n\t\t\t\tif (ereg(\"{$v->name}_\",$requestKey) && ereg(\"{$this->formHash}\",$requestKey)) {\n\t\t\t\t\t$hash=preg_replace(\"/{$v->name}_/\",\"\",$requestKey);\n\t\t\t\t\tif(!in_array($hash,$hashesValues))\n\t\t\t\t\t{\n\t\t\t\t\t\t$hashesValues[]=$hash;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * for every found hashtag we have a relation to update\n\t\t */\n\t\tforeach($hashesValues as $k=>$hash)\n\t\t{\n\t\t\t/**\n\t\t\t * preparing update value conditions, first of all the primary key of the base entity\n\t\t\t */\n\t\t\t$values_conditions=array(\"{$baseEntityPrimaryKeyName}_{$baseEntity->name}\"=>$baseEntityPrimaryKeyValue);\n\t\t\t/**\n\t\t\t * security check to prevent errors in $_REQUEST\n\t\t\t*/\n\t\t\t$doInsert=false;\n\t\t\t/**\n\t\t\t * for every field of the entity to update\n\t\t\t */\n\t\t\tforeach($this->entity->fields as $k=>$v)\n\t\t\t{\t\n\t\t\t\tif($v->name!=\"id\")\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t* for every element of the request\n\t\t\t\t\t*/\n\t\t\t\t\tforeach($_REQUEST as $requestKey=>$requestValue)\n\t\t\t\t\t{\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * if there's an element of the request compatible with the hash and the entity field\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (preg_match(\"/{$v->name}_{$hash}/\",$requestKey)&&!empty($v->name) && $requestValue!=null && $requestValue!=0) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * add it to values conditions\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\techo '<br>requestvalue'.$requestValue;\n\t\t\t\t\t\t\t$values_conditions[$v->name]=$requestValue;\n\t\t\t\t\t\t\t$doInsert=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t * if check is passed update the entity\n\t\t\t */\n\t\t\tif($doInsert==true)\n\t\t\t{\n\t\t\t\techo '<br>inserting-->';\n\t\t\t\t$this->entity->save($values_conditions);\n\t\t\t}\n\t\t}\n\t}", "public function setEntities(array $entities)\n {\n $this->entities = $this->checkEntities($entities);\n }", "public function flushUpdates();", "function collections_update($item, $selected, $existing, $relationship) {\n$display .= 'collections_update ...<br>';\t\n\t$add = array_diff($selected, $existing);\n\t$rem = array_diff($existing, $selected);\n$display .= '$relationship: '.$relationship.'<br>';\n\t\n\t$add = array_unique($add);\n\t$add = array_values($add);\n\t$rem = array_unique($rem);\n\t$rem = array_values($rem);\n\t$guid_two = $item->getguid();\n\t\n\tforeach($add as $i){\n\t\t$guid_one = $i;\n\t\tif(!check_entity_relationship($guid_one, $relationship, $guid_two)){\n\t\t\tadd_entity_relationship($guid_one, $relationship, $guid_two);\n\t\t}\t\t\n\t}\n\tforeach($rem as $i){\n\t\t$guid_one = $i;\n\t\tremove_entity_relationship($guid_one, $relationship, $guid_two);\n\t}\n}", "function update () {\n\t\t$stm = DB::$pdo->prepare(\"update `generated_object` \n\t\t\t\t\t\t\t\t set {$generator_update_values} \n\t\t\t\t\t\t\t\t where `id`=:id\");\n\t\t// generator bind hook\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "protected function saveUpdateProducts()\r\n\t{\r\n\t\tif (count($this->newProducts) > 0) {\r\n\t\t\t// inserir as novas\r\n\t\t\tforeach ($this->newProducts as $product) {\r\n\t\t\t\t$result = $this->client->catalogProductUpdate($this->sessionid, $product->sku, $product);\r\n\t\t\t\t$this->log->addInfo('updated', array(\"sku\" => $product->sku, \"result\" => $result));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->newProducts = array();\r\n\t}", "protected function installEntities()\n {\n $sm = \\Core::make('Concrete\\Core\\Database\\DatabaseStructureManager');\n $entities = array('Concrete\\Core\\Entity\\File\\File');\n\n // Now we fill the rest of the class names recursively from the entity directory, since it's\n // entirely new\n $entityPath = DIR_BASE_CORE . '/' . DIRNAME_CLASSES . '/Entity';\n $iterator = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($entityPath, \\FilesystemIterator::SKIP_DOTS),\n \\RecursiveIteratorIterator::CHILD_FIRST\n );\n\n foreach ($iterator as $path) {\n if (!$path->isDir()) {\n $path = $path->__toString();\n if (substr(basename($path), 0, 1) != '.') {\n $path = str_replace(array($entityPath, '.php'), '', $path);\n $entities[] = 'Concrete\\Core\\Entity' . str_replace('/', '\\\\', $path);\n }\n }\n }\n\n $em = $this->connection->getEntityManager();\n $cmf = $em->getMetadataFactory();\n $metadatas = array();\n foreach ($cmf->getAllMetadata() as $meta) {\n if (in_array($meta->getName(), $entities)) {\n $metadatas[] = $meta;\n }\n }\n\n $sm->installDatabaseFor($metadatas);\n }", "public function setEntity( $entity )\n {\n\n $this->setEntityWbfsysEntityTag( $entity );\n\n }", "public function testUpdateModelSet()\n {\n }", "public function updateItems($products)\n {\n }", "public function complete($entity, $row) {\n yt_migration_image_caption_save($entity, $row, 'field_gallery_media');\n yt_migration_node_metatag_save($entity, $row);\n db_merge('node_gallery_relationship')\n ->key(array(\n 'nid' => $row->nid,\n 'ngid' => $row->gid,\n ))\n ->fields(array(\n 'weight' => $row->weight,\n ))\n ->execute();\n }", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function testUpdateStore()\n {\n\n }", "private function updateEntity(Site $siteService) {\n //We don't currently allow any access to unauthenticated users, so for now\n //we can simply refuse unauthenticated users. In the future we could look\n //to authenticate everything except 'GET' requests and then process 'GETs'\n //on a case by case basis.\n $this->checkUserAuthenticated();\n\n\n switch($this->entityType) {\n case 'site': {\n $this->updateSite($siteService);\n break;\n }\n case 'service': {\n $this->updateService($siteService);\n break;\n }\n case 'endpoint': {\n $this->updateEndpoint($siteService);\n break;\n }\n default: {\n $this->exceptionWithResponseCode(501,\n \"Updating \" . $this->entityType. \"s is not currently supported \" .\n \"through the API, for details of the currently supported methods \" .\n \"see: $this->docsURL\"\n );\n }\n }\n\n #TODO: return the entity that's been changed or created as $this->returnObject,\n # for now just return the no content http code (delete operations should\n # return nothing and a 204, others should return the changed object and a 200)\n $this->httpResponseCode = 204;\n }", "public function bundle();" ]
[ "0.623332", "0.6216402", "0.62133163", "0.6124402", "0.6114456", "0.6112794", "0.6112794", "0.60829264", "0.6059587", "0.598349", "0.5919275", "0.5845906", "0.58347076", "0.5807777", "0.57997024", "0.57898045", "0.5758896", "0.57507616", "0.574629", "0.57397", "0.57026", "0.56827366", "0.56574863", "0.56548464", "0.56398255", "0.5616999", "0.5611655", "0.55750275", "0.5564257", "0.5549896", "0.5547927", "0.5543605", "0.55427414", "0.55358595", "0.5506097", "0.5502548", "0.55011207", "0.54977256", "0.54605514", "0.54548323", "0.5434174", "0.54337263", "0.5425842", "0.5422174", "0.5421122", "0.53957504", "0.5365865", "0.53406554", "0.5336952", "0.532461", "0.5296047", "0.52956057", "0.5287518", "0.5283672", "0.5279505", "0.52774394", "0.52744484", "0.52588487", "0.5252027", "0.5227073", "0.5219267", "0.5218394", "0.5206588", "0.5205604", "0.5186048", "0.5173924", "0.5166845", "0.5162451", "0.5147229", "0.5144756", "0.5137898", "0.51270026", "0.51256883", "0.5125283", "0.51144695", "0.5104567", "0.5103732", "0.51029384", "0.5097561", "0.50969726", "0.50935864", "0.5092863", "0.5083779", "0.50791895", "0.50765216", "0.5069755", "0.5064555", "0.50615555", "0.50580424", "0.5057376", "0.50376695", "0.50349194", "0.50312376", "0.5028344", "0.5023183", "0.50216264", "0.50199074", "0.5016933", "0.50167084", "0.50112873" ]
0.6639322
0
Helper function if machine name exists.
function _mongo_node_bundle_exists($bundle) { $entity_type = arg(3); $set = mongo_node_settings(); if (isset($set[$entity_type]['bundles'][$bundle])) { return TRUE; } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isMachine($name);", "protected function validateMachineName($value) {\n if (preg_match(\"/^[a-z0-9\\_]+$/\", $value))\n return true;\n $this->setError(t(\"Invalid machine name (only a-z, 0-9, and _)\"));\n return false;\n }", "protected function generateMachineName() {\n return $this->args['machine_name'];\n }", "public function checkMachineName($value) {\n $query = \\Drupal::entityQuery('cohesion_custom_style');\n $query->condition('class_name', custom_style_class_prefix . $value);\n $entity_ids = $query->execute();\n\n return count($entity_ids) > 0;\n }", "function system_is_uname_registerd($uname)\n{\n\treturn(0);\n}", "public function getResourceMachineName();", "public function hasServer(string $name): bool {}", "public function getMachineName()\n {\n return $this->machineName;\n }", "public function checkUniqueMachineName($value) {\n\n $query = $this->entityTypeManager->getStorage('cohesion_custom_style')->getQuery();\n $query->condition('class_name', custom_style_class_prefix . $value);\n $entity_ids = $query->execute();\n\n return count($entity_ids) > 0;\n }", "function VMWare_detect() {\n\tglobal $g;\n\t$fc = '';\n\n\tif (file_exists(\"{$g['varlog_path']}/dmesg.boot\") !== false) {\n\t\t$fc = file_get_contents(\"{$g['varlog_path']}/dmesg.boot\");\n\t}\n\n\treturn (strpos($fc, \"<VMware Virtual\") !== false);\n}", "public function generateMachineName($input);", "public function checkMachineNameStatusChanged($spi_data) {\n return isset($spi_data['machine_name']) && $spi_data['machine_name'] != $this->acqtestSiteMachineName;\n }", "function gethostname(): string|false {}", "function check_software_name()\n {\n $q = $this->db\n ->where('action_type', \"install\")\n ->where('computer_ser', $this->input->post('computer'))\n ->where('name', $this->input->post('sw_name'))\n ->where('company_id', $this->session->userdata('company_id'))\n ->limit(1)->get('software');\n\n if ($q->num_rows == 1)\n {\n return true;\n\n } else {\n\n return false;\n }\n }", "public function check_availability_name_exist_add($name) {\n $result = $this->availabilityMaster_model->get_availability_manager_name($name);\n if ($result > 0) {\n return false;\n } else {\n return true;\n }\n }", "protected function generateMachineName() {\n $class_name = get_class($this);\n return self::machineFromClass($class_name);\n }", "function name_exists($str){\n\n\t\tif(strlen($str)<3 || strlen($str)>30){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} must be between 3 and 30 characters in length');\n\t\t\treturn false;\n\t\t}\n\t\t$nameExists = $this->DAO->entitySelection('station',array('nameStation'=>$str),TRUE);\n\t\tif($nameExists['data']){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} already exists');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "public function hasEnvironment($name);", "public function _isOnlineFromName()\n\t{\n\n\tswitch ( strtolower( $this->__deviceDetector( $this->sessionData['browser'] ) ) )\n\t\t{\n\t\t\tcase 'pc':\n\t\t\t\t$phrase = ' с ПК';\n\t\t\t\tbreak;\n\t\t\tcase 'tablet':\n\t\t\t\t$phrase = ' с Планшета';\n\t\t\t\tbreak;\n\t\t\tcase 'phone':\n\t\t\t\t$phrase = ' с Мобильного';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $phrase;\n\t}", "function isValidCodeMachine($codeMachine) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM Machine WHERE codeMachine LIKE :codeMachine\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'codeMachine' => $codeMachine\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\tif($request->rowCount() != 0)\n\t\treturn false;\n\treturn true;\n}", "function HostExist($HostServer) { //retourne 1 si une machine existe dans le fichier hosts\n// verifier si HostServer ne peut pas etre plus precis\n\t$filehost = '/etc/backuppc/hosts';\n\t$lignes = file(\"$filehost\");\n\tforeach ($lignes as $num =>$line) {\n\t\tif (preg_match(\"/^$HostServer\\s+/i\",$line)) {\n\t\t\treturn true;\n\t\t} \n\t}\n\treturn false;\n}", "public static function getSystemFromName() {}", "public function getMachineInformation($machine = null);", "private function createMachineName($human_name = '')\n {\n $machine_name = strtolower($human_name);\n // Remove special characters (remove the below line to support non latin characters)\n $machine_name = preg_replace('/[^a-z0-9_\\s-]/', '', $machine_name);\n // Cleanup multiple dashes or whitespaces\n $machine_name = preg_replace('/[\\s-]+/', ' ', $machine_name);\n // Replace whitespaces with underscores\n $machine_name = preg_replace('/[\\s]/', '_', $machine_name);\n\n return $machine_name;\n }", "public function host_exist() {\n return D( 'User/Host' )->host_exist_verifition( array( 'usr_login_id' => get_session_id() ) );\n }", "public function hasName()\n {\n return $this->get(self::NAME) !== null;\n }", "public function testMachineName() {\n // Visit the machine name test page which contains two machine name fields.\n $this->drupalGet('form-test/machine-name');\n\n // Test values for conversion.\n $test_values = [\n [\n 'input' => 'Test value !0-9@',\n 'message' => 'A title that should be transliterated must be equal to the php generated machine name',\n 'expected' => 'test_value_0_9_',\n ],\n [\n 'input' => 'Test value',\n 'message' => 'A title that should not be transliterated must be equal to the php generated machine name',\n 'expected' => 'test_value',\n ],\n ];\n\n // Get page and session.\n $page = $this->getSession()->getPage();\n\n // Get elements from the page.\n $title_1 = $page->findField('machine_name_1_label');\n $machine_name_1_field = $page->findField('machine_name_1');\n $machine_name_2_field = $page->findField('machine_name_2');\n $machine_name_1_wrapper = $machine_name_1_field->getParent();\n $machine_name_2_wrapper = $machine_name_2_field->getParent();\n $machine_name_1_value = $page->find('css', '#edit-machine-name-1-label-machine-name-suffix .machine-name-value');\n $machine_name_2_value = $page->find('css', '#edit-machine-name-2-label-machine-name-suffix .machine-name-value');\n $machine_name_3_value = $page->find('css', '#edit-machine-name-3-label-machine-name-suffix .machine-name-value');\n $button_1 = $page->find('css', '#edit-machine-name-1-label-machine-name-suffix button.link');\n\n // Assert all fields are initialized correctly.\n $this->assertNotEmpty($machine_name_1_value, 'Machine name field 1 must be initialized');\n $this->assertNotEmpty($machine_name_2_value, 'Machine name field 2 must be initialized');\n $this->assertNotEmpty($machine_name_3_value, 'Machine name field 3 must be initialized');\n\n // Assert that a machine name based on a default value is initialized.\n $this->assertJsCondition('jQuery(\"#edit-machine-name-3-label-machine-name-suffix .machine-name-value\").html() == \"yet_another_machine_name\"');\n\n // Field must be present for the rest of the test to work.\n if (empty($machine_name_1_value)) {\n $this->fail('Cannot finish test, missing machine name field');\n }\n\n // Test each value for conversion to a machine name.\n foreach ($test_values as $test_info) {\n // Set the value for the field, triggering the machine name update.\n $title_1->setValue($test_info['input']);\n\n // Wait the set timeout for fetching the machine name.\n $this->assertJsCondition('jQuery(\"#edit-machine-name-1-label-machine-name-suffix .machine-name-value\").html() == \"' . $test_info['expected'] . '\"');\n\n // Validate the generated machine name.\n $this->assertEquals($test_info['expected'], $machine_name_1_value->getHtml(), $test_info['message']);\n\n // Validate the second machine name field is empty.\n $this->assertEmpty($machine_name_2_value->getHtml(), 'The second machine name field should still be empty');\n }\n\n // Validate the machine name field is hidden. Elements are visually hidden\n // using positioning, isVisible() will therefore not work.\n $this->assertEquals(TRUE, $machine_name_1_wrapper->hasClass('visually-hidden'), 'The ID field must not be visible');\n $this->assertEquals(TRUE, $machine_name_2_wrapper->hasClass('visually-hidden'), 'The ID field must not be visible');\n\n // Test switching back to the manual editing mode by clicking the edit link.\n $button_1->click();\n\n // Validate the visibility of the machine name field.\n $this->assertEquals(FALSE, $machine_name_1_wrapper->hasClass('visually-hidden'), 'The ID field must now be visible');\n\n // Validate the visibility of the second machine name field.\n $this->assertEquals(TRUE, $machine_name_2_wrapper->hasClass('visually-hidden'), 'The ID field must not be visible');\n\n // Validate if the element contains the correct value.\n $this->assertEquals($test_values[1]['expected'], $machine_name_1_field->getValue(), 'The ID field value must be equal to the php generated machine name');\n\n $assert = $this->assertSession();\n $this->drupalGet('/form-test/form-test-machine-name-validation');\n\n // Test errors after with no AJAX.\n $assert->buttonExists('Save')->press();\n $assert->pageTextContains('Machine-readable name field is required.');\n // Ensure only the first machine name field has an error.\n $this->assertTrue($assert->fieldExists('id')->hasClass('error'));\n $this->assertFalse($assert->fieldExists('id2')->hasClass('error'));\n\n // Test a successful submit after using AJAX.\n $assert->fieldExists('Name')->setValue('test 1');\n $assert->fieldExists('id')->setValue('test_1');\n $assert->selectExists('snack')->selectOption('apple');\n $assert->assertWaitOnAjaxRequest();\n $assert->buttonExists('Save')->press();\n $assert->pageTextContains('The form_test_machine_name_validation_form form has been submitted successfully.');\n\n // Test errors after using AJAX.\n $assert->fieldExists('Name')->setValue('duplicate');\n $this->assertJsCondition('document.forms[0].id.value === \"duplicate\"');\n $assert->fieldExists('id2')->setValue('duplicate2');\n $assert->selectExists('snack')->selectOption('potato');\n $assert->assertWaitOnAjaxRequest();\n $assert->buttonExists('Save')->press();\n $assert->pageTextContains('The machine-readable name is already in use. It must be unique.');\n // Ensure both machine name fields both have errors.\n $this->assertTrue($assert->fieldExists('id')->hasClass('error'));\n $this->assertTrue($assert->fieldExists('id2')->hasClass('error'));\n }", "function lmb_env_has($name)\n{\n if(array_key_exists($name, $_ENV))\n {\n if($_ENV[$name] === LIMB_UNDEFINED)\n return false;\n else\n return true;\n }\n\n if(defined($name))\n return true;\n\n return false;\n}", "public function hasName()\n {\n return isset($this->name);\n }", "public static function Exists($name);", "function isvm() {\n\t$virtualenvs = array(\"vmware\", \"parallels\", \"qemu\", \"bochs\", \"plex86\", \"VirtualBox\");\n\texec('/bin/kenv -q smbios.system.product 2>/dev/null', $output, $rc);\n\n\tif ($rc != 0 || !isset($output[0])) {\n\t\treturn false;\n\t}\n\n\tforeach ($virtualenvs as $virtualenv) {\n\t\tif (stripos($output[0], $virtualenv) !== false) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "public function check_availability_manager_name_exist_edit() {\n $availability_id = $this->input->post('availability_id');\n $name = $this->input->post('name', true);\n $result = $this->availabilityMaster_model->get_availability_manager_name_edit($name);\n if (count($result) === 0) {\n $response = true;\n } else {\n if ($result[0]['id'] === $availability_id) {\n $response = true;\n } else {\n $response = false;\n }\n }\n return $response;\n }", "function TypeMachine() { // Test si backuppc est installe en local sur un Se3 ou un Slis ou une machine dediee\n\tif(is_dir(\"/usr/share/se3\")) {\n\t\treturn Se3;\n\t}\t\n\tif(file_exists(\"/etc/version_slis\")) {\n\t\treturn Slis;\n\t}\n\tif(is_dir(\"/usr/share/lcs\")) {\n\t\treturn Lcs;\n\t}\t\n}", "public function nameExists($name, $workflowId = null);", "function _name_check($str){\n }", "function valid_idsystem($str){\n\t\t$systemExists = $this->DAO->entitySelection('system',array('idSystem' => $str),TRUE);\n\t\tif($systemExists['data']){\n\t\t\t\treturn TRUE;\n\t }else{\n\t\t\t$this->form_validation->set_message('valid_idsystem','The field {field} doesnt exists');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function isExists(string $name): bool\n {\n return\n theme_path($name) !== false &&\n preg_match(config('theme-system.name_regex', '/(.[a-zA-Z0-9-_]+)/'), $name) !== false;\n }", "public function hasName(){\n return $this->_has(7);\n }", "public function hasName(){\n return $this->_has(7);\n }", "function isSetName($input) {\n return (preg_match(\"~(^[[:alnum:] -]+$)~\", $input));\n }", "function verify_username_availability($userName){\n $exists = false;\n if(get_user($userName)){\n $exists = true;\n }\n return $exists;\n}", "public function getAcquiaHostedMachineName() {\n $sub_data = $this->config('acquia_connector.settings')->get('subscription_data');\n\n if ($this->checkAcquiaHosted() && $sub_data) {\n $uuid = new StatusController();\n $sub_uuid = str_replace('-', '_', $uuid->getIdFromSub($sub_data));\n\n return $sub_uuid . '__' . $_SERVER['AH_SITE_NAME'];\n }\n }", "function is_dyndns_username($uname) {\n\tif (!is_string($uname))\n\treturn false;\n\n\tif (preg_match(\"/[^a-z0-9\\-.@_]/i\", $uname))\n\treturn false;\n\telse\n\treturn true;\n}", "public function getMachine()\n {\n return php_uname('m');\n }", "public function checkProductExistsByName()\n {\n $category = $this::find()\n ->select('id')\n ->where(['name' => $this->name])\n ->one();\n if($category !== NULL) {\n return true;\n }\n return false;\n }", "protected function isExist($word)\n {\n return (boolean) preg_match( \"/{$word}/i\", $this->excelRow->model_description);\n }", "function website_exists( $site ) {\n\n\t$websites = get_website_data();\n\n\tif ( isset( $websites[ $site ] ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n\n}", "private function validateCurrentHostname(): bool\n {\n // check that current base url is configured as an allowed hostname\n $baseUrl = $this->url->getBaseUrl();\n foreach ($this->getAllowedBypassHostnames() as $hostname) {\n if (strpos($baseUrl, $hostname) !== false) {\n return true;\n }\n }\n return false;\n }", "protected function _getMachine()\n {\n return $this->machine;\n }", "function valid_name($name) {\r\n\tif (empty($name)) \r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n }", "public function serviceExists(string $serviceName): bool;", "private function is_server_variable_set( $name ) {\n\t\treturn isset( $_SERVER[ $name ] );\n\t}", "function is_reserved_name($str) {\n\t\t$reserved = array('name','value','content','parent','rank','password','timestamp');\n\t\tif(empty($str) || in_array($str, $reserved)) return true;\n\t\treturn false;\n\t}", "public function is_existing($name) {\n $data = $this->get_names();\n\n foreach($data as $line){\n if ($line === $name) {\n return true;\n }\n }\n\n return false;\n }", "public function checkInputExists($name);", "public function hasReservedName()\n {\n return count($this->get(self::RESERVED_NAME)) !== 0;\n }", "public function hasName()\n {\n return $this->name !== null;\n }", "function is_hostname($hostname) {\n\tif (!is_string($hostname))\n\treturn false;\n\n\tif (preg_match(\"/^[a-z0-9\\-]+$/i\", $hostname))\n\treturn true;\n\telse\n\treturn false;\n}", "public function has_server( $key ) \n\t{\n\t\treturn array_key_exists( strtoupper($key), $this->SERVER );\n\t}", "public function hasExperimentName(){\n return $this->_has(2);\n }", "public function hasExperimentName(){\n return $this->_has(2);\n }", "public function exists($name);", "public function exists($name);", "public function exists($name);", "public function exists($name);", "public function exists($name);", "public function exists($name);", "function _is_localhost() {\n\t\treturn IMFORZA_Utils::is_localhost();\n\t}", "public static function exists($name)\r\n\t{\r\n\t\t$name = \\Filter::systemID($name);\r\n\t\treturn (array_key_exists($name, $_COOKIE) ? true : false);\r\n\t}", "public function hasName($platformId, $encodingId, $languageId, $nameId) {}", "function checkUserName()\r\n{\r\n\t// --------- GLOBALIZE ---------\r\n\tglobal $user,$utf8;\r\n\t// --------- CHECK ---------\r\n\t$name = $utf8->toUTF8(GET_INC('name'));\r\n\tif ( $user->uname_exist($name) )\r\n\t{\r\n\t\techo 1;\r\n\t}else{\r\n\t\techo 0;\r\n\t}\r\n}", "function name_exists($name){\n\t\t\t\n\t\t\t//var_dump($name);\n\t\t\tglobal $wpdb;\n\t\t\t$table = $wpdb->prefix.'users' ;\n\t\t\t$user_id = $wpdb->get_var( \"SELECT ID FROM $table WHERE user_login='$name'\" ) ;\n\t\t\t\n\t\t\t//return ($user_id) ? false: true ;\n\t\t\treturn $user_id ;\n\t\t}", "function EnsureServerExists($servername) {\r\n $server = new dkpServer();\r\n $server->loadFromDatabaseByName($servername);\r\n if ($server->id == \"\") {\r\n $server->name = $servername;\r\n $server->saveNew();\r\n }\r\n return $server;\r\n }", "function exists($name) {\n return isset($this->store[$name]);\n }", "function check_exists()\n\t{\n\t\t$name = url_title($this->input->post('name'));\n\n\t\t$exists = $this->content_type_model->check_exists(\n\t\t\t'name',\n\t\t\t$name,\n\t\t\t$this->input->post('id_content_type')\n\t\t);\n\n\t\t$this->xhr_output($exists);\n\t}", "function check_exists()\r\n\t{\r\n\t\t$name = url_title($this->input->post('name'));\r\n\r\n\t\t$exists = $this->item_definition_model->check_exists(\r\n\t\t\t'name',\r\n\t\t\t$name,\r\n\t\t\t$this->input->post('id_item_definition')\r\n\t\t);\r\n\r\n\t\t$this->xhr_output($exists);\r\n\t}", "public static function is_application_name($name)\r\n {\r\n return (preg_match('/^[a-z][a-z_]+$/', $name) > 0);\r\n }", "public static function module_exists($name) {\n\n\t\tif ($name == 'nos' || $name == 'app') {\n\t\t\treturn true;\n\t\t}\n\n\t\t\\Config::load(APPPATH.'data'.DS.'config'.DS.'app_installed.php', 'app_installed');\n\t\t$app_installed = \\Config::get('app_installed', array());\n\n\t\tif (isset($app_installed[$name])) {\n\t\t\treturn parent::module_exists($name);\n\t\t}\n\t\treturn false;\n\t}", "function check_membership($hostname='', $servicename='', $servicegroup_name='')\n{\n\tglobal $NagiosData;\n\t$hostgroups_objs = $NagiosData->getProperty('hostgroups_objs');\n\t$servicegroups_objs = $NagiosData->getProperty('servicegroups_objs');\n\n\t$hostname = trim($hostname);\n\t$servicename = trim($servicename);\n\t$servicegroup_name = trim($servicegroup_name);\n\n\t$memberships = array();\n\tif($hostname!='' && $servicename!='')\n\t{\n\t\t//search servicegroups array \n\t\t\n\t\t//create regexp string for 'host,service'\n\t\t$hostservice = \"$hostname,$servicename\";\n\t\t$hostservice_regex = preg_quote($hostservice, '/');\n\n\t\t//check regex against servicegroup 'members' index \n\t\tif ($servicegroup_name!='' && isset($servicegroups_objs[$servicegroup_name])) {\n\t\t\t$group = $servicegroups_objs[$servicegroup_name];\n\t\t\tif (preg_match(\"/$hostservice_regex/\", $group['members'])) {\n\t\t\t\t$str = isset($group['alias']) ? $group['alias'] : $group['servicegroup_name']; \n\t\t\t\t$memberships[] = $str;\n\t\t\t}\n\n\t\t} else {\n\t\t\tforeach($servicegroups_objs as $group)\n\t\t\t{\n\t\t\t\tif(isset($group['members']) && preg_match(\"/$hostservice_regex/\", $group['members']))\n\t\t\t\t{\n\t\t\t\t\t//use alias as default display name, else use groupname \n\t\t\t\t\t$str = isset($group['alias']) ? $group['alias'] : $group['servicegroup_name']; \n\t\t\t\t\t$memberships[] = $str;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//check for host membership \n\telseif($hostname!='' && $servicename=='')\n\t{\n\t\n\t\t$hostname_regex = preg_quote($hostname, '/');\n\t\tforeach($hostgroups_objs as $group)\n\t\t{\n\t\t\tif(isset($group['members']) && preg_match(\"/$hostname_regex/\", $group['members']))\n\t\t\t{\n\t\t\t\t//use alias as default display name, else use groupname \n\t\t\t\t$str = isset($group['alias']) ? $group['alias'] : $group['hostgroup_name'];\n\t\t\t\t$memberships[] = $str;\n\t\t\t}\n\t\t}\n\t}\n\t \n return empty($memberships) ? NULL : join(' ', $memberships);\n}", "public function hasName(){\n return $this->_has(1);\n }", "public function hasName(){\n return $this->_has(1);\n }", "public function hasName(){\n return $this->_has(1);\n }", "public function hasName(){\n return $this->_has(1);\n }", "public static function systemHas(string $key)\n {\n self::system($key, '');\n\n return self::$found;\n }", "public function serverExists(string $name): bool\n {\n $path = Util::makePath(self::getConfigValue(JSONDBConfig::CONFIG_STORAGE_PATH), \"servers\", $name);\n return file_exists($path) && is_dir($path);\n }", "function mongo_node_type_create_form_validate($form, $form_state) {\n $set = mongo_node_settings();\n $machine_name = $form_state['values']['name'];\n\n if (isset($set[$machine_name])) {\n form_set_error('name', t('Machine name @machine_name already exists', array('@machine_name' => $machine_name)));\n return FALSE;\n }\n return TRUE;\n}", "public function generateUniqueMachineName($input, callable $callback);", "function has($name);", "function has($name);", "function has($name);", "private function artifactExist($string) {\n\t\tglobal $artifacts;\n\n\t\tfor ($i = 0; $i < sizeof($artifacts); $i++) {\n\t\t\tif (strtolower($artifacts[$i]->attributes['name']) === strtolower($string)) return true;\n\t\t}\n\t\treturn false;\n\t}", "static public function getHostname(): string\n {\n return php_uname('n');\n }", "function has($name = '')\n {\n }", "public function hasName() {\n return $this->_has(1);\n }", "public function hasName() {\n return $this->_has(1);\n }", "public function hasName() {\n return $this->_has(1);\n }", "public function hasName() {\n return $this->_has(1);\n }", "public function hasName(){\r\n return $this->_has(6);\r\n }", "function domain_exists($domain, $path, $network_id = 1)\n {\n }", "public function exists($name)\n {\n return isset($this->services[$name]);\n }", "protected function generateMachineName($uri) {\n $parsed = parse_url(\"//{$uri}\");\n\n if (substr($parsed['host'], -9) === 'uiowa.edu') {\n // Don't use the suffix if the host equals uiowa.edu.\n $machineName = substr($parsed['host'], 0, -10);\n\n // Reverse the subdomains.\n $parts = array_reverse(explode('.', $machineName));\n\n // Unset the www subdomain - considered the same site.\n $key = array_search('www', $parts);\n if ($key !== FALSE) {\n unset($parts[$key]);\n }\n $machineName = implode('', $parts);\n }\n else {\n // This site has a non-uiowa.edu TLD.\n $parts = explode('.', $parsed['host']);\n\n // Unset the www subdomain - considered the same site.\n $key = array_search('www', $parts);\n if ($key !== FALSE) {\n unset($parts[$key]);\n }\n\n // Pop off the suffix to be used later as a prefix.\n $extension = array_pop($parts);\n\n // Reverse the subdomains.\n $parts = array_reverse($parts);\n $machineName = $extension . '-' . implode('', $parts);\n }\n\n return $machineName;\n }" ]
[ "0.7412608", "0.64426965", "0.606492", "0.6062058", "0.6057177", "0.5988294", "0.5776909", "0.5712959", "0.56961334", "0.56575686", "0.56463534", "0.5601881", "0.55832756", "0.5484777", "0.54744977", "0.5446809", "0.543575", "0.54186755", "0.53737575", "0.5371278", "0.5345347", "0.5317982", "0.52882904", "0.5274211", "0.52694345", "0.52359354", "0.5222098", "0.5221983", "0.522175", "0.52176577", "0.52156144", "0.52013826", "0.518753", "0.5154409", "0.5153283", "0.51443523", "0.51385015", "0.510953", "0.510953", "0.51085657", "0.51030487", "0.50812876", "0.5078017", "0.50746924", "0.5059084", "0.5045438", "0.50409", "0.50372463", "0.5023481", "0.5013707", "0.5003163", "0.49937633", "0.49814865", "0.49745277", "0.4974275", "0.49708423", "0.4961417", "0.49551308", "0.4934705", "0.492013", "0.492013", "0.4917767", "0.4917767", "0.4917767", "0.4917767", "0.4917767", "0.4917767", "0.49089003", "0.48988432", "0.4897812", "0.48955283", "0.48939586", "0.48895693", "0.4886801", "0.48854637", "0.4881041", "0.48772392", "0.4874212", "0.48711994", "0.48689988", "0.48689988", "0.48689988", "0.48689988", "0.4865395", "0.48571557", "0.4855806", "0.48555", "0.48507765", "0.48507765", "0.48507765", "0.48490697", "0.4849023", "0.48460954", "0.48351094", "0.48351094", "0.48351094", "0.48351094", "0.48338974", "0.48300523", "0.482889", "0.4828809" ]
0.0
-1
Form constructor for entity bundle delete.
function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) { $form = array(); $form['entity_type'] = array( '#type' => 'value', '#value' => $entity_type, ); $form['bundle'] = array( '#type' => 'value', '#value' => $bundle, ); $path = '/admin/structure/mongo-node/' . $entity_type; $extist_bundle_content = ''; $collection = mongodb_collection('fields_current', $entity_type); $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle)); if ($count) { $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count)); $extist_bundle_content .= '<br/><br/>'; } return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "function dolist_messages_mail_admin_bundle_delete_form($form, &$form_state, $bundle) {\n \n if(!$bundle) {\n drupal_set_message(t('Could not load bundle'), 'error');\n drupal_goto('admin/structure/dolist/messagesmail');\n }\n\n $form['type'] = array('#type' => 'value', '#value' => $bundle->bundle);\n $form['name'] = array('#type' => 'value', '#value' => $bundle->name);\n\n $message = t('Are you sure you want to delete the message bundle %bundle?', array('%bundle' => $bundle->name));\n $caption = '';\n $caption .= '<p>' . t('This action cannot be undone. Content using the bundle will be broken.') . '</p>';\n\n return confirm_form($form, $message, 'admin/structure/dolist/messagesmail', $caption, t('Delete'));\n}", "abstract function performDelete(Form $arg0);", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "private function createDeleteForm(VerbTranslation $verbTranslation)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('verbtranslation_delete', array('id' => $verbTranslation->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Superficie $superficie)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('superficie_delete', array('id' => $superficie->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function delete(DataObject $entity){\n }", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n drupal_set_message(t('@label %title deleted',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title)\n )\n );\n }\n\n $form_state['redirect'] = '<front>';\n}", "public function Delete($entity) {\n }", "private function createDeleteForm(NomDpa $nomdpa)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dpa_delete', array('id' => $nomdpa->getIddpa())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bien_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger'),))\n ->getForm()\n ;\n }", "function ds_extras_vd_bundle_remove($form, $form_state, $bundle, $label) {\n $form['#bundle'] = $bundle;\n $form['#label'] = $label;\n return confirm_form($form, t('Are you sure you want to remove bundle @label ?', array('@label' => $label)), 'admin/structure/ds/vd');\n}", "public function delete($entity)\n {\n \n }", "private function createDeleteForm(Bien $bien)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backend_bien_delete', array('id' => $bien->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private\n function createAnnonceeDeleteForm(Annonce $annonce)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annoncee_delete', array('id' => $annonce->getAnnonceId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Stable $stable)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('stable_delete', array('id' => $stable->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n $translated = $this->get('translator');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('configuracao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $translated->transChoice('txt.excluir',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-danger btn-lg')))\n ->getForm()\n ;\n }", "private function createDeleteForm(DatParteDesvio $datParteDesvio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partedesvio_delete', array('id' => $datParteDesvio->getIdparte())))\n ->setMethod('DELETE')\n ->getForm();\n }", "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Nomenclature $nomenclature)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_delete', array('id' => $nomenclature->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Component $component)\n {\n return $this->createFormBuilder()->setAction($this->generateUrl('component_delete', array('id' => $component->getId())))->setMethod('DELETE')->getForm();\n }", "private function createDeleteForm(LoteInsumo $loteInsumo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('loteinsumo_delete', array('id' => $loteInsumo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private\n function createPaiementDeleteForm(Paiement $paiement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annoncee_delete', array('id' => $paiement->getPaiementId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "public function deleteFormAction($id) {\n $form = $this->createDeleteForm($id);\n $entity = $this->getItem($id);\n\n return array(\n 'form' => $form->createView(),\n 'order' => $this->getOrder(),\n 'entity' => $this->getOrder()\n );\n }", "private function createDeleteForm(Outlet $outlet)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('/db2/outlet_delete', array('id' => $outlet->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Personnage $personnage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnage_delete', array('id' => $personnage->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function delete($entity);", "private function createDeleteForm(Reglement $reglement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reglement_delete', array('codeRegl' => $reglement->getCoderegl())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_objecttype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Orden $orden)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orden_delete', array('id' => $orden->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction() {\n \n }", "function ds_extras_vd_bundle_remove_submit($form, &$form_state) {\n\n $bundle = $form['#bundle'];\n $label = $form['#label'];\n\n // Remove bundle.\n db_delete('ds_vd')\n ->condition('vd', $bundle)\n ->execute();\n\n // Remove layout.\n db_delete('ds_layout_settings')\n ->condition('bundle', $bundle)\n ->execute();\n\n // Remove settings.\n db_delete('ds_field_settings')\n ->condition('bundle', $bundle)\n ->execute();\n\n // Remove from bundle settings.\n $bundle_settings = variable_get('field_bundle_settings', array());\n unset($bundle_settings['ds_views'][$bundle]);\n if (empty($bundle_settings['ds_views'])) {\n unset($bundle_settings['ds_views']);\n }\n variable_set('field_bundle_settings', $bundle_settings);\n\n // Clear entity cache and field info fields cache.\n cache_clear_all('field_info_fields', 'cache_field');\n cache_clear_all('entity_info', 'cache', TRUE);\n\n drupal_set_message(t('Bundle @label has been removed.', array('@label' => $label)));\n}", "private function createDeleteForm($id)\n { \n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_aula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "function travel_form_submit_delete($form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity.\n $entity = $form_state['entity'];\n $entity_uri = entity_uri('travel', $entity);\n $form_state['redirect'] = $entity_uri['path'] . '/delete';\n}", "private function createDeleteForm(Plateformes $plateforme)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_plateformes_delete', array('id' => $plateforme->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm ( Maileguak $maileguak )\n {\n return $this->createFormBuilder()\n ->setAction( $this->generateUrl( 'maileguak_delete', array ('id' => $maileguak->getId()) ) )\n ->setMethod( 'DELETE' )\n ->getForm();\n }", "protected function createComponentDeleteRate()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteRateSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "function travel_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('travel', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('travel', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(BulletinSoin $bulletinSoin)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bs_delete', array('id' => $bulletinSoin->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admtipoaporte_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Eliminar','attr'=>array('class'=>'btn btn-danger')))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Entrepot $entrepot)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entrepot_delete', array('idEntrepot' => $entrepot->getIdentrepot())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Barbeiro $barbeiro)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('barbeiro_delete', array('id' => $barbeiro->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Indicateur $indicateur) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('indicateur_delete', array('id' => $indicateur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admin_consulta_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Babysitter $babysitter)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('babysitter_delete', array('idbabysitter' => $babysitter->getIdbabysitter())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Contabilizar $contabilizar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contabilizar_delete', array('id' => $contabilizar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'pts_del')))\n ->setAction($this->generateUrl('morus_accetic_inventory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_missatges_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }", "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(Phoneboook $phoneboook)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('phoneboook_delete', array('id' => $phoneboook->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Atletas $atleta) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('atletas_delete', array('id' => $atleta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm( $entityName, $instance)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entity_delete',\n [\n 'entityName' => $entityName,\n 'id' => $instance->getId()\n ]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Personas $persona)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personas_delete', array('id' => $persona->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Imagen $imagen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('imagen_delete', array('id' => $imagen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dzialy_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Usuń Dział' , 'attr' => array('class' => 'btn btn-danger' , 'icon' => 'times fa-fw')))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('localbanner_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'title.sim', 'translation_domain' => 'messagesCommonBundle', 'attr' => array('class' => 'btn btn-success btn-lg bt-delete-foto')))\n ->getForm()\n ;\n }", "public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }", "private function createDeleteForm(Photos $photo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('photos_delete', array('id' => $photo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(SvCfgDisenio $SvCfgDisenio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Svcfgdisenio_delete', array('id' => $SvCfgDisenio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Proprietaire $proprietaire) {\n return $this->createFormBuilder\n ->setAction($this->generateUrl('post_admin_delete', array('id' => $proprietaire->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Entreprise $entreprise)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $entreprise->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function genDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'ct_del_form', 'style' => 'display:none')))\n ->setAction($this->generateUrl('morus_fas_contacts_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm();\n }", "public function deleted(FormPettyCash $formPettyCash)\n {\n //\n }", "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('medicamentossuministrados_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'btn')))\n ->getForm()\n ;\n }", "protected function createComponentDeletePrihozForm()\n {\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none');\n \n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->deletePrihozFormSucceeded;\n return $form;\n }", "private function createDeleteForm($id) {\n $session = $this->get(\"session\");\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hall_delete', array('id' => $id, )))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(CmsStzefBanners $cmsStzefBanner)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admstzef_banners_delete', array('id' => $cmsStzefBanner->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Person $person)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_person_delete', ['id' => $person->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Etablissements $etablissement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etablissements_delete', array('id' => $etablissement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('social_admin_resource_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => '删除','attr'=>[\n 'class'=>'btn btn-danger'\n ]))\n ->getForm()\n ;\n }", "private function createDeleteForm(Partido $partido) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partido_delete', ['id' => $partido->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pifeclassique_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "public function deleteAction()\n {\n $this->deleteParameters = $this->deleteParameters + $this->_deleteExtraParameters;\n\n parent::deleteAction();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('boncommandeligne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Pagos $pago)\n {\n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pagos_delete', array('id' => $pago->getIdpagos())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n \n }", "private function createDeleteForm(Hogar $hogar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hogar_delete', array('id' => $hogar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('galerias_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Fratura $fratura)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fratura_delete', array('id' => $fratura->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($slug)\n {\n return $this->createFormBuilder(array('slug' => $slug))\n ->add('slug', 'hidden')\n ->getForm();\n }", "private function createDeleteForm1($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('calendarcategories_delete', array('id' => $id)))\n ->setMethod('DELETE')\n /* ->add('submit', 'submit', array('label' => 'Delete')) */\n ->getForm()\n ;\n }", "private function createDeleteForm(Dependencia $dependencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dependencia_delete', array('id' => $dependencium->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Solicitud $solicitud)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tienda_solicitud_delete', array('id' => $solicitud->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Translator $translator)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('translator_delete', array('id' => $translator->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('product_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ligne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function actionDelete() {}", "public function actionDelete() {}", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('member_intrestconfig_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t->getForm()\n\t\t;\n\t}", "private function createDeleteForm(SettingsLlojiMbulesesBimore $settingsLlojiMbulesesBimore)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('settingsllojimbulesesbimore_delete', array('id' => $settingsLlojiMbulesesBimore->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction()\n {\n \n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('klasses_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }" ]
[ "0.65059566", "0.65002024", "0.64804673", "0.6416298", "0.64131904", "0.6307785", "0.62689507", "0.62194777", "0.6204152", "0.61482984", "0.6147878", "0.6127656", "0.6116169", "0.6108576", "0.6107843", "0.60805726", "0.60765046", "0.60756636", "0.60694903", "0.6067795", "0.60512495", "0.60494226", "0.60469997", "0.6043688", "0.602468", "0.6022592", "0.60202837", "0.60185194", "0.601413", "0.599728", "0.5989327", "0.5984471", "0.59789693", "0.59780896", "0.5975839", "0.5953284", "0.594891", "0.59464866", "0.59399694", "0.59379387", "0.5937788", "0.5934812", "0.5934729", "0.59331554", "0.59311604", "0.5928157", "0.5928156", "0.59255266", "0.59185827", "0.5917614", "0.5909214", "0.59068096", "0.59033304", "0.5902207", "0.5901774", "0.5897057", "0.58945906", "0.58942276", "0.5882313", "0.5876855", "0.5867442", "0.585571", "0.5855143", "0.5851522", "0.5851387", "0.5851345", "0.5850412", "0.5847198", "0.5841285", "0.5836896", "0.5835776", "0.58332", "0.5833099", "0.58320755", "0.5830052", "0.5829855", "0.58231425", "0.5822993", "0.5820191", "0.58198464", "0.5818869", "0.5818516", "0.58171123", "0.58168465", "0.5816798", "0.5816252", "0.5812411", "0.58111256", "0.5809827", "0.58081686", "0.58057904", "0.58030015", "0.5802202", "0.5802202", "0.5801422", "0.57997644", "0.57974035", "0.5797355", "0.5796511", "0.5795127" ]
0.6678628
0
Form submission handler for mongo_node_bundle_delete_form().
function mongo_node_bundle_delete_form_submit($form, $form_state) { $set = mongo_node_settings(); $entity_type = $form_state['values']['entity_type']; $bundle = $form_state['values']['bundle']; // Remove entity type. unset($set[$entity_type]['bundles'][$bundle]); mongo_node_settings_save($set); // Redirect to entity type admin. drupal_goto('admin/structure/mongo-node/' . $entity_type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n drupal_set_message(t('@label %title deleted',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title)\n )\n );\n }\n\n $form_state['redirect'] = '<front>';\n}", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "public function deleteSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id)->delete();\n }", "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "function node_form_delete_submit($form, &$form_state) {\n $destination = '';\n if (isset($_REQUEST['destination'])) {\n $destination = drupal_get_destination();\n unset($_REQUEST['destination']);\n }\n $node = $form['#node'];\n $form_state['redirect'] = array('node/'. $node->nid .'/delete', $destination);\n}", "function dolist_messages_mail_admin_bundle_delete_form_submit($form, &$form_state) {\n dolist_messages_mail_bundle_delete($form_state['values']['type']);\n\n $t_args = array('%name' => $form_state['values']['name']);\n drupal_set_message(t('The message bundle %name has been deleted.', $t_args));\n watchdog('node', 'Deleted message bundle %name.', $t_args, WATCHDOG_NOTICE);\n\n\n $form_state['redirect'] = 'admin/structure/dolist/messagesmail';\n return;\n}", "function dolist_messages_mail_admin_bundle_delete_form($form, &$form_state, $bundle) {\n \n if(!$bundle) {\n drupal_set_message(t('Could not load bundle'), 'error');\n drupal_goto('admin/structure/dolist/messagesmail');\n }\n\n $form['type'] = array('#type' => 'value', '#value' => $bundle->bundle);\n $form['name'] = array('#type' => 'value', '#value' => $bundle->name);\n\n $message = t('Are you sure you want to delete the message bundle %bundle?', array('%bundle' => $bundle->name));\n $caption = '';\n $caption .= '<p>' . t('This action cannot be undone. Content using the bundle will be broken.') . '</p>';\n\n return confirm_form($form, $message, 'admin/structure/dolist/messagesmail', $caption, t('Delete'));\n}", "function ds_extras_vd_bundle_remove_submit($form, &$form_state) {\n\n $bundle = $form['#bundle'];\n $label = $form['#label'];\n\n // Remove bundle.\n db_delete('ds_vd')\n ->condition('vd', $bundle)\n ->execute();\n\n // Remove layout.\n db_delete('ds_layout_settings')\n ->condition('bundle', $bundle)\n ->execute();\n\n // Remove settings.\n db_delete('ds_field_settings')\n ->condition('bundle', $bundle)\n ->execute();\n\n // Remove from bundle settings.\n $bundle_settings = variable_get('field_bundle_settings', array());\n unset($bundle_settings['ds_views'][$bundle]);\n if (empty($bundle_settings['ds_views'])) {\n unset($bundle_settings['ds_views']);\n }\n variable_set('field_bundle_settings', $bundle_settings);\n\n // Clear entity cache and field info fields cache.\n cache_clear_all('field_info_fields', 'cache_field');\n cache_clear_all('entity_info', 'cache', TRUE);\n\n drupal_set_message(t('Bundle @label has been removed.', array('@label' => $label)));\n}", "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "function delete() {\n\n $document = Doctrine::getTable('DocDocument')->find($this->input->post('doc_document_id'));\n $node = Doctrine::getTable('Node')->find($document->node_id);\n\n if ($document && $document->delete()) {\n//echo '{\"success\": true}';\n\n $this->syslog->register('delete_document', array(\n $document->doc_document_filename,\n $node->getPath()\n )); // registering log\n\n $success = 'true';\n $msg = $this->translateTag('General', 'operation_successful');\n } else {\n//echo '{\"success\": false}';\n $success = 'false';\n $msg = $e->getMessage();\n }\n\n $json_data = $this->json->encode(array('success' => $success, 'msg' => $msg));\n echo $json_data;\n }", "function multisite_aggregate_type_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/structure/multisite_aggregate_types/manage/' . $form_state['multisite_aggregate_type']->type . '/delete';\n}", "function thumbwhere_contentcollection_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollections/thumbwhere_contentcollection/' . $form_state['thumbwhere_contentcollection']->pk_contentcollection . '/delete';\n}", "abstract function performDelete(Form $arg0);", "function kala_revision_batch_delete_form() {\n // Initialize Vars.\n $form = array();\n\n // Date text field.\n $form['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Delete nodes revisions before this time.'),\n '#description' => t('Enter as a -1 day, 1-year, etc. Defaults to -90 days.'),\n '#default_value' => t('-90 days'),\n '#required' => TRUE,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Delete These Revisions!'),\n '#submit' => array('kala_revision_batch_delete_form_submit'),\n );\n\n return $form;\n}", "public function ajax_delete_field() {\n\t\tglobal $wpdb;\n\n\t\tif ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'visual_form_builder_delete_field' ) {\n\t\t\t$form_id = absint( $_REQUEST['form'] );\n\t\t\t$field_id = absint( $_REQUEST['field'] );\n\n\t\t\tcheck_ajax_referer( 'delete-field-' . $form_id, 'nonce' );\n\n\t\t\tif ( isset( $_REQUEST['child_ids'] ) ) {\n\t\t\t\tforeach ( $_REQUEST['child_ids'] as $children ) {\n\t\t\t\t\t$parent = absint( $_REQUEST['parent_id'] );\n\n\t\t\t\t\t// Update each child item with the new parent ID\n\t\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_parent' => $parent ), array( 'field_id' => $children ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Delete the field\n\t\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM $this->field_table_name WHERE field_id = %d\", $field_id ) );\n\t\t}\n\n\t\tdie(1);\n\t}", "function thumbwhere_contentcollectionitem_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollectionitems/thumbwhere_contentcollectionitem/' . $form_state['thumbwhere_contentcollectionitem']->pk_contentcollectionitem . '/delete';\n}", "public function actionDelete(){\n\t\t$form = $_POST;\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('DELETE FROM core_pages WHERE id = ?', $form['id']);\n\t\t$this->redirect('pages:');\n\t}", "function student_form_delete() {\n $id = arg(1);\n $num_deleted = db_delete('student')\n ->condition('st_id', $id)\n ->execute();\n if ($num_deleted) {\n drupal_set_message(t('entry has been deleted.'));\n drupal_goto(\"formlist\");\n }\n else {\n drupal_set_message(t('error in query'));\n }\n}", "function kala_revision_batch_delete_form_submit($form, &$form_state) {\n // Initalize vars.\n $operations = array();\n $values = $form_state['values'];\n\n // Grab the string date.\n if (isset($values['date'])) {\n $time = strtotime($values['date']);\n }\n\n // If we have the time, lets do this!\n if (isset($time)) {\n // Grab all vids before our time stamp.\n $sql = \"SELECT r.vid FROM {node_revision} r WHERE r.timestamp < :time ORDER BY r.timestamp DESC;\";\n $query = db_query($sql, array(':time' => $time));\n $vids = $query->fetchAllKeyed(0,0);\n $count = count($vids);\n\n // Throw our chunks into the batch.\n $chunks = array_chunk($vids, 50);\n foreach ($chunks as $chunk) {\n $operations[] = array(\"kala_revision_batch_delete_batch_process\", array($chunk, $count));\n }\n\n // Engage.\n $batch = array(\n 'title' => t('Deleting Revisions...'),\n 'init_message' => t('Grabbing Revisions to Delete.'),\n 'operations' => $operations,\n 'finished' => 'kala_revision_batch_delete_batch_finished',\n 'file' => drupal_get_path('module', 'kala_revision_batch_delete') . '/includes/kala_revision_batch_delete.batch.inc',\n );\n\n batch_set($batch);\n }\n}", "function bat_event_type_form_submit_delete(&$form, &$form_state) {\n $destination = array();\n if (isset($_GET['destination'])) {\n $destination = drupal_get_destination();\n unset($_GET['destination']);\n }\n\n $form_state['redirect'] = array('admin/bat/events/event_types/manage/' . $form_state['bat_event_type']->type . '/delete', array('query' => $destination));\n}", "function thumbwhere_contentcollection_delete_form_submit($form, &$form_state) {\n $thumbwhere_contentcollection = $form_state['thumbwhere_contentcollection'];\n\n thumbwhere_contentcollection_delete($thumbwhere_contentcollection);\n\n drupal_set_message(t('The thumbwhere_contentcollection %name has been deleted.', array('%name' => $thumbwhere_contentcollection->title)));\n watchdog('thumbwhere_contentcollection', 'Deleted thumbwhere_contentcollection %name.', array('%name' => $thumbwhere_contentcollection->title));\n\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollections';\n}", "function regional_content_form_block_custom_block_delete_alter(&$form, &$form_state) {\n $form['#submit'][] = 'regional_content_form_block_custom_block_delete_submit';\n}", "function bigbluebutton_admin_meeting_room_delete_form_submit($form, &$form_state) {\n\n\t//debug($form_state, \"form_state\", $print_r = TRUE);\n\n \tdb_delete('meeting_room')\n\t\t->condition('mid', $form_state['build_info']['args'][0])\n \t->execute();\n\n \tdrupal_set_message(t('Meeting room %meeting_room_name has been deleted.', array('%meeting_room_name' => $form_state['values']['meeting_room_name'])));\n\n \t$form_state['redirect'] = 'admin/config/system/bigbluebutton/meeting_room';\n\n}", "public function ajax_delete_field() {\n global $wpdb;\n\n if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'swpm_form_builder_delete_field') {\n $form_id = absint($_REQUEST['form']);\n $field_id = absint($_REQUEST['field']);\n\n check_ajax_referer('delete-field-' . $form_id, 'nonce');\n\n $field_key = $wpdb->get_var($wpdb->prepare(\"SELECT field_key FROM $this->field_table_name WHERE field_id=%d\", $field_id));\n if (SwpmFbUtils::is_mandatory_field($field_key)) {\n die('0'); // don't delete required fields\n }\n if (isset($_REQUEST['child_ids'])) {\n foreach ($_REQUEST['child_ids'] as $children) {\n $parent = absint($_REQUEST['parent_id']);\n\n // Update each child item with the new parent ID\n $wpdb->update($this->field_table_name, array('field_parent' => $parent), array('field_id' => $children));\n }\n }\n\n // Delete the field\n $wpdb->query($wpdb->prepare(\"DELETE FROM $this->field_table_name WHERE field_id = %d\", $field_id));\n }\n\n die(1);\n }", "function _mica_datasets_node_delete_confirm($form, &$form_state, $node) {\n if ($node->type === 'dataset') {\n $form['#node'] = $node;\n // Always provide entity id in the same form key as in the entity edit form.\n $form['nid'] = array('#type' => 'value', '#value' => $node->nid);\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $node->title)),\n 'node/' . $node->nid,\n t('It will also delete all its variables, queries and study connectors.')\n . '<br />' . t('This action cannot be undone.') . '<br /><br />',\n t('Delete'),\n t('Cancel')\n );\n }\n module_load_include('inc', 'node', 'node.pages');\n return node_delete_confirm($form, $form_state, $node);\n}", "function image_gallery_confirm_delete_form(&$form_state, $tid) {\r\n $term = taxonomy_get_term($tid);\r\n\r\n $form['tid'] = array('#type' => 'value', '#value' => $tid);\r\n $form['name'] = array('#type' => 'value', '#value' => $term->name);\r\n\r\n return confirm_form($form, t('Are you sure you want to delete the image gallery %name?', array('%name' => $term->name)), 'admin/content/image', t('Deleting an image gallery will delete all sub-galleries. This action cannot be undone.'), t('Delete'), t('Cancel'));\r\n}", "public function testDeleteForm() {\n $document = $this->createDocument();\n\n $document_name = $document->id();\n\n // Log in and check for existence of the created document.\n $this->drupalLogin($this->adminUser);\n $this->drupalGet('admin/structure/legal');\n $this->assertRaw($document_name, 'Document found in overview list');\n\n // Delete the document.\n $this->drupalPostForm('admin/structure/legal/manage/' . $document_name . '/delete', [], 'Delete');\n\n // Ensure document no longer exists on the overview page.\n $this->assertUrl('admin/structure/legal', [], 'Returned to overview page after deletion');\n $this->assertNoText($document_name, 'Document not found in overview list');\n }", "function travel_form_submit_delete($form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity.\n $entity = $form_state['entity'];\n $entity_uri = entity_uri('travel', $entity);\n $form_state['redirect'] = $entity_uri['path'] . '/delete';\n}", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "function node_delete_confirm(&$form_state, $node) {\n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $node->nid,\n );\n\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $node->title)),\n isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "function access_scheme_form_delete_submit($form, &$form_state) {\n if (isset($_GET['destination'])) {\n drupal_get_destination();\n unset($_GET['destination']);\n }\n $scheme = $form_state['scheme'];\n $form_state['redirect'] = 'admin/structure/access/' . str_replace('_', '-', $scheme->machine_name) . '/delete';\n}", "function thumbwhere_contentcollectionitem_delete_form_submit($form, &$form_state) {\n $thumbwhere_contentcollectionitem = $form_state['thumbwhere_contentcollectionitem'];\n\n thumbwhere_contentcollectionitem_delete($thumbwhere_contentcollectionitem);\n\n drupal_set_message(t('The thumbwhere_contentcollectionitem %name has been deleted.', array('%name' => $thumbwhere_contentcollectionitem->pk_contentcollectionitem)));\n watchdog('thumbwhere_contentcollectionitem', 'Deleted thumbwhere_contentcollectionitem %name.', array('%name' => $thumbwhere_contentcollectionitem->pk_contentcollectionitem));\n\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollectionitems';\n}", "function address_book_contact_deleteform_submit($form_id, $form_values) {\n $contact = address_book_contact_load($form_values['values']['cid']);\n\n // delete contact\n $delete_contact_query = db_delete('edu_contacts')\n ->condition('cid', $contact->cid)\n ->execute();\n\n //delete photo\n $photo = file_load($contact->photo);\n if ($photo) {\n file_delete($photo);\n }\n\n\n drupal_set_message(t('Contact deleted successful'));\n drupal_goto('address_book');\n}", "public function post_delete(){\n\t\t\t\n\t\t$data \t= \tFiledb::_rawurldecode(json_decode(stripcslashes(Input::get('data')), true));\n\n\t\tif($data[\"delete\"] == 'delete'){\n\t\t\t\n\t\t\t$status = Users::delete($data[\"id\"]);\n\n\t\t\treturn ($status) ? Utilites::success_message(__('forms.deleted_word')) : Utilites::fail_message(__('forms_errors.undefined'));\n\t\t}\n\t}", "function travel_type_form_submit_delete(&$form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity type.\n $form_state['redirect'] = 'admin/structure/travel/' . $form_state['travel_type']->type . '/delete';\n}", "function ds_extras_vd_bundle_remove($form, $form_state, $bundle, $label) {\n $form['#bundle'] = $bundle;\n $form['#label'] = $label;\n return confirm_form($form, t('Are you sure you want to remove bundle @label ?', array('@label' => $label)), 'admin/structure/ds/vd');\n}", "private function _do_delete() {\n\t\tif (g($_POST, 'delete')) {\n\t\t\tif (g($this->conf, 'disable.delete')) die('Forbidden');\n\t\t\t\n $path = g($this->conf, 'path');\n if (g($_POST, 'path'))\n $path = \\Crypt::decrypt(g($_POST, 'path'));\n \n $this->_validPath($path);\n \n\t\t\t$parent = dirname($path);\n\t\t\t\n\t\t\tif ($path == g($this->conf, 'type')) {\n\t\t\t\t$this->_msg('Cannot delete root folder', 'error');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ($this->_delete($this->_path($path))) {\n\t\t\t\t$this->_msg('Success delete ['.$path.']');\n\t\t\t\theader('location:'.$this->_url(['path' => $parent]));\n\t\t\t\tdie();\n\t\t\t} else {\n\t\t\t\t$this->_msg('Failed delete ['.$path.'] : please call your administator', 'error');\n\t\t\t}\n\t\t}\n\t}", "function travel_delete_form_submit($form, &$form_state) {\n // Delete the entity.\n $entity = $form_state['entity'];\n entity_delete('travel', entity_id('travel', $entity));\n\n // Redirect user.\n drupal_set_message(t('Entity %title deleted.', array('%title' => entity_label('travel', $entity))));\n $form_state['redirect'] = '<front>';\n}", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function deleteFormAction()\n {\n\t\t$id = $this->params()->fromRoute(\"id\");\n\t\tif ($id == \"\")\n\t\t{\n\t\t\t$this->flashMessenger()->addErrorMessage(\"Form could not be deleted. ID is not set\");\n\n\t\t\t//return to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end if\n\n\t\t//load data\n\t\ttry {\n\t\t\t$objForm = $this->getFormAdminModel()->fetchForm($id);\n\n\t\t\tif (!$objForm)\n\t\t\t{\n\t\t\t\t$this->flashMessenger()->addErrorMessage(\"A problem occurred. The requested form could not be laoded\");\n\t\t\t\t//return to index page\n\t\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t\t}//end if\n\t\t} catch (\\Exception $e) {\n\t\t\t//set error message\n\t\t\t$this->flashMessenger()->addErrorMessage($e->getMessage());\n\n\t\t\t//return to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end catch\n\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost())\n\t\t{\n\t\t\tif (strtolower($request->getPost(\"delete\")) == \"yes\")\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t$this->getFormAdminModel()->deleteForm($id);\n\n\t\t\t\t\t//set message\n\t\t\t\t\t$this->flashMessenger()->addSuccessMessage(\"Form deleted successfully\");\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t//set error message\n\t\t\t\t\t$this->flashMessenger()->addErrorMessage($this->frontControllerErrorHelper()->formatErrors($e));\n\t\t\t\t}//end catch\n\t\t\t}//end if\n\t\t\t\n\t\t\t//return to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end if\n\n\t\treturn array(\n\t\t\t\"objForm\" => $objForm,\n\t\t);\n }", "public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t//print_r ($_POST);\n\t\t\t\n\t\t\tif (isset($_POST[\"articleCheckbox\"]) && !empty($_POST[\"articleCheckbox\"]) && $_POST[\"command\"] == \"deleteSelected\"){\n\t\t\t\tforeach($_POST[\"articleCheckbox\"] as $record)\n\t\t\t\t{\n\t\t\t\t\tArticles::model()->deleteByPk($record);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// we only allow deletion via POST request\n\t\t\t\t$this->loadarticles()->delete();\n\t\t\t}\n\t\t\t$this->redirect(array('admin'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "public function actionDelete()\n {\n if (Yii::app()->getRequest()->getIsPostRequest()) {\n $id = $_POST['id'];\n /** @var $photo GalleryPhoto */\n $photo = GalleryPhoto::model()->findByPk($id);\n if ($photo !== null && $photo->delete()) echo 'OK';\n else echo 'FAIL';\n } else echo 'FAIL';\n }", "public function deleteAction($id)\n {\n $form = $this->createDeleteForm($id);\n $request = $this->getRequest();\n\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $entity = $em->getRepository('HegesAppNodeBundle:Node')->find($id);\n\n \n $nodename=$entity->getName();\n \n if (!$entity) {\n throw $this->createNotFoundException('NodeController :: deleteAction :: No existe un nodo con id '.$id);\n }\n\n $em->remove($entity);\n $em->flush();\n $this->get('session')->setFlash('notice', 'Los cambios se realizaron correctamente.');\n\n $logsource=\"hegesapp_log_app\";\n $hegesapplogentry = new HegesAppLog(\n $this->container->getParameter('hegesapp_log_dir').$this->container->getParameter($logsource),\n $this->container->get('security.context')->getToken()->getUser(),\n $logsource);\n \n $hegesapplogentry->HegesAppLogWriteToLog(\"El nodo \".$nodename.\" ha sido borrado.\");\n \n \n }\n\n return $this->redirect($this->generateUrl('node'));\n }", "function view9_lendingform_delete_confirm_submit($form, &$form_state) {\r\n if ($form_state['values']['confirm']) {\r\n $gallery = lendingform_load($form_state['values']['pid']);\r\n lendingform_delete($form_state['values']['pid']);\r\n watchdog(PROJECT_ENTITY, t(\"Project $gallery->pid was deleted\"));\r\n $form_state['redirect'] = 'gallery/' . $gallery->pid;\r\n } else {\r\n $form_state['redirect'] = 'gallerys';\r\n }\r\n}", "public function deleteFormSubmitted(Form $form)\r\n\t{\r\n\t\tif ($form[\"yes\"]->isSubmittedBy()) {\r\n\t\t\t// Get id of item to delete\r\n\t\t\t$id = $this->getParameter('id');\r\n\t\t\t// Delete item\r\n\t\t\t$model = $this->users;\r\n\t\t\t$model2 = $this->files;\r\n\t\t\t$allFiles = $model2->findByUser($id);\r\n\t\t\tif (count($allFiles) > 0) {\r\n\t\t\t\tforeach ($allFiles as $file) {\r\n\t\t\t\t\tif (file_exists('./files/' . $file->hash)) {\r\n\t\t\t\t\t\tunlink('./files/' . $file->hash);\r\n\t\t\t\t\t\t$model2->delete($file->id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$model->delete($id);\r\n\t\t\t// Create message and redirect back\r\n\t\t\t$this->flashMessage('User was successfully deleted.', 'success');\r\n\t\t\t$this->redirect('default');\r\n\t\t} else {\r\n\t\t\t$this->redirect('default');\r\n\t\t}\r\n\t}", "function do_delete(){\n\t\t// remove from fieldset:\n\t\t$fieldset = jcf_fieldsets_get( $this->fieldset_id );\n\t\tif( isset($fieldset['fields'][$this->id]) )\n\t\t\tunset($fieldset['fields'][$this->id]);\n\t\tjcf_fieldsets_update( $this->fieldset_id, $fieldset );\n\t\t\n\t\t// remove from fields array\n\t\tjcf_field_settings_update($this->id, NULL);\n\t}", "public function delete(array &$form, FormStateInterface $form_state) {\n $pid = $form_state->get('pid');\n $query = \\Drupal::database();\n $query->delete('pets_owners_storage')\n ->condition('pid', $pid)\n ->execute();\n $text = 'Record pid => ' . $pid . ' was removed from database.';\n \\Drupal::messenger()->addMessage($text);\n $form_state->setRedirect('pets_owners_storage.content');\n }", "public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }", "function thumbwhere_contentcollection_delete_form_wrapper($thumbwhere_contentcollection) {\n // Add the breadcrumb for the form's location.\n //thumbwhere_contentcollection_set_breadcrumb();\n return drupal_get_form('thumbwhere_contentcollection_delete_form', $thumbwhere_contentcollection);\n}", "function dh_cwsserviceareamap_form_submit_delete(&$form, &$form_state) {\n list($pg, $us, $id) = explode('/', $_GET['destination']);\n unset($_GET['destination']);\n drupal_goto(\n 'admin/content/dh_adminreg_feature/manage/' . $form_state['dh_adminreg_feature']->fid . '/delete',\n array('query' => array(\n 'destination' => $pg\n )\n ) \n );\n}", "function execute()\n\t{\n\t\t$this->obj_form = New form_input;\n\t\t$this->obj_form->formname = \"transaction_delete\";\n\t\t$this->obj_form->language = $_SESSION[\"user\"][\"lang\"];\n\n\t\t$this->obj_form->action = \"accounts/gl/delete-process.php\";\n\t\t$this->obj_form->method = \"post\";\n\t\t\n\n\t\t// general\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"code_gl\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"description\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t// hidden\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"id_transaction\";\n\t\t$structure[\"type\"]\t\t= \"hidden\";\n\t\t$structure[\"defaultvalue\"]\t= $this->id;\n\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t\n\t\t// confirm delete\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"delete_confirm\";\n\t\t$structure[\"type\"]\t\t= \"checkbox\";\n\t\t$structure[\"options\"][\"label\"]\t= \"Yes, I wish to delete this transaction and realise that once deleted the data can not be recovered.\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\n\t\t/*\n\t\t\tCheck that the transaction can be deleted\n\t\t*/\n\n\t\t// define submit field\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"submit\";\n\t\t$structure[\"type\"]\t\t= \"submit\";\n\t\t$structure[\"defaultvalue\"]\t= \"delete\";\n\t\t\t\t\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t\n\t\t// define subforms\n\t\t$this->obj_form->subforms[\"transaction_delete\"]\t= array(\"code_gl\", \"description\");\n\t\t$this->obj_form->subforms[\"hidden\"]\t\t= array(\"id_transaction\");\n\t\t\n\t\tif ($this->locked)\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t= array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t= array(\"delete_confirm\", \"submit\");\n\t\t}\n\n\t\t\n\t\t// fetch the form data\n\t\t$this->obj_form->sql_query = \"SELECT code_gl, description FROM `account_gl` WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$this->obj_form->load_data();\n\n\t}", "function regional_content_form_block_custom_block_delete_submit($form, &$form_state) {\n db_delete('regional_content_region')\n ->condition('module', 'block')\n ->condition('delta', $form_state['values']['bid'])\n ->execute();\n}", "function thumbwhere_contentcollection_delete_form($form, &$form_state, $thumbwhere_contentcollection) {\n $form_state['thumbwhere_contentcollection'] = $thumbwhere_contentcollection;\n\n $form['#submit'][] = 'thumbwhere_contentcollection_delete_form_submit';\n\n $form = confirm_form($form,\n t('Are you sure you want to delete thumbwhere_contentcollection %name?', array('%name' => $thumbwhere_contentcollection->title)),\n 'admin/thumbwhere/thumbwhere_contentcollections/thumbwhere_contentcollection',\n '<p>' . t('This action cannot be undone.') . '</p>',\n t('Delete'),\n t('Cancel'),\n 'confirm'\n );\n\n return $form;\n}", "public function deleteAction()\n {\n $itemGroupRowId = $this->getRequest()->getParam('containerRowId');\n \n //get eventId of the event to be deleted\n $itemGroupId = $this->getRequest()->getParam('containerId');\n\n // get form\n $form = $this->_model->getForm('delete');\n \n //set form action\n //define form action\n $form->setAction($this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'delete',\n 'containerId' => $itemGroupId,\n 'containerRowId' => $itemGroupRowId,\n ),\n \n 'event'\n ));\n \n $this->processDelete(\n $form, \n 'msg_itemgrouprow_deleted',\n $this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'index',\n 'containerId' => $itemGroupId),\n 'event'\n ),\n $itemGroupRowId\n );\n }", "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $curriculumdoc = Mage::getModel('bs_curriculumdoc/curriculumdoc');\n $curriculumdoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_curriculumdoc')->__('Curriculum Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('There was an error deleting curriculum doc.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Could not find curriculum doc to delete.')\n );\n $this->_redirect('*/*/');\n }", "function delete_assignment_form_submit_handler ($form, &$form_state) {\n sb_assignment_delete ( (object) $form_state['values'] );\n\n $selected = eto_user_load($form_state['values']['selected_uid']);\n $user = eto_user_load($form_state['values']['uid']);\n\n drupal_set_message(ucwords($form_state['values']['type']) . \" '\" \n\t\t . l($selected->name, \"users/\" . $selected->uid) \n\t\t . \"' deleted from \" \n\t\t . l($user->name, \"users/\" . $user->uid),\n\t\t \"success\");\n $form_state['redirect'] = 'eto/admin/assignments';\n}", "function execute()\n\t{\n\t\t$this->obj_form = New form_input;\n\t\t$this->obj_form->formname = \"chart_delete\";\n\t\t$this->obj_form->language = $_SESSION[\"user\"][\"lang\"];\n\n\t\t$this->obj_form->action = \"accounts/charts/delete-process.php\";\n\t\t$this->obj_form->method = \"post\";\n\t\t\n\n\t\t// general\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"code_chart\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"description\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t// hidden\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"id_chart\";\n\t\t$structure[\"type\"]\t\t= \"hidden\";\n\t\t$structure[\"defaultvalue\"]\t= $this->id;\n\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t\n\t\t// confirm delete\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"delete_confirm\";\n\t\t$structure[\"type\"]\t\t= \"checkbox\";\n\t\t$structure[\"options\"][\"label\"]\t= \"Yes, I wish to delete this account and realise that once deleted the data can not be recovered.\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\n\t\t// define submit field\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] = \"submit\";\n\t\t$structure[\"type\"]\t\t= \"submit\";\n\t\t$structure[\"defaultvalue\"]\t= \"delete\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t\n\t\t// define subforms\n\t\t$this->obj_form->subforms[\"chart_delete\"]\t= array(\"code_chart\", \"description\");\n\t\t$this->obj_form->subforms[\"hidden\"]\t\t= array(\"id_chart\");\n\n\t\tif ($this->locked)\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t= array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->obj_form->subforms[\"submit\"]\t\t= array(\"delete_confirm\", \"submit\");\n\t\t}\n\n\t\t\n\t\t// fetch the form data\n\t\t$this->obj_form->sql_query = \"SELECT code_chart, description FROM `account_charts` WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$this->obj_form->load_data();\n\t}", "public static function delete(){\n\t\tif(isset($_POST['formId']) && isset($_POST['personnalInformationName'])){\n\t\t\t$data = array(\n\t\t\t\t\"formId\" => $_POST['formId'],\n\t\t\t\t\"personnalInformationName\" => $_POST['personnalInformationName']\n\t\t\t);\n\t\t\techo json_encode(ModelAssocFormPI::delete($data));\n\t\t}else{\n\t\t\techo json_encode(false);\n\t\t}\n\t}", "function thumbwhere_contentcollectionitem_delete_form_wrapper($thumbwhere_contentcollectionitem) {\n // Add the breadcrumb for the form's location.\n //thumbwhere_contentcollectionitem_set_breadcrumb();\n return drupal_get_form('thumbwhere_contentcollectionitem_delete_form', $thumbwhere_contentcollectionitem);\n}", "function ting_visual_relation_delete_slide_confirm_form_submit($form, &$form_state) {\n // Perform the deletion\n $slide_id = $form_state['values']['slide_id'];\n $success = db_delete('ting_visual_relation_slides')\n ->condition('slide_id', $slide_id)\n ->execute();\n drupal_set_message('Slide deleted');\n $form_state['redirect'] = 'admin/config/ting/ting-visual-relation/app-settings';\n}", "public function deleteAction() {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('branch');\n }\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n //$del = $request->getPost()->get('del', 'No');\n $del = $request->getPost('del', 'Nein');\n\n if ($del == 'Ja') {\n //$id = (int) $request->getPost()->get('id');\n $id = (int) $request->getPost('id');\n $branch = $this->getEntityManager()->find('Branch\\Entity\\Branch', $id);\n if ($branch) {\n $this->getEntityManager()->remove($branch);\n $this->getEntityManager()->flush();\n }\n }\n\n // Redirect to list of albums\n /* return $this->redirect()->toRoute('default', array(\n 'controller' => 'album',\n 'action' => 'index',\n )); */\n // Redirect to list of albums\n return $this->redirect()->toRoute('branch');\n }\n\n return array(\n 'id' => $id,\n 'branch' => $this->getEntityManager()->find('Branch\\Entity\\Branch', $id)->getArrayCopy()\n );\n }", "function observation_delete_form($form, &$form_state, $observationdata = NULL) {\n\tassert(!empty($observationdata));\n\tdrupal_set_title(\n\t\tt(\n\t\t\t'Delete Observation @observation_organism from @observation_date.',\n\t\t\tarray('@observation_organism' => $observationdata['organism']['name_lang'] . '('\n\t\t\t\t\t\t\t. $observationdata['organism']['name_lat'] . ')',\n\t\t\t\t\t'@observation_date' => date('d.m.Y', $observationdata['observation']['date'])\n\t\t\t)));\n\n\t$question = t(\n\t\t'Are you sure that you want to delete this observation «@observation_organism»?',\n\t\tarray('@observation_organism' => $observationdata['organism']['name_lang'] . '('\n\t\t\t\t\t\t. $observationdata['organism']['name_lat'] . ')'\n\t\t));\n\t/* create a fieldset for the tabular data */\n\t$form['question'] = array(\n\t\t\t'#type' => 'markup',\n\t\t\t'#markup' => \"<p>$question</p>\"\n\t);\n\n\t$form['button'] = array(\n\t\t\t'#type' => 'submit',\n\t\t\t'#value' => t('Delete')\n\t);\n\treturn $form;\n}", "public function deleteAction(Request $request, $id)\n\t{\n\t\t$form = $this->createDeleteForm($id);\n\t\t$form->handleRequest($request);\n\n\t\t//echo '<pre>' . print_r('deleteAction();', true) . '</pre>';\n\t\tif ($form->isValid()) {\n\t\t\t//echo '<pre>' . print_r($child->getName(), true) . '</pre>';\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$entity = $em->getRepository('NovuscomCMFBundle:Element')->find($id);\n\t\t\tif (!$entity) {\n\t\t\t\tthrow $this->createNotFoundException('Unable to find Element entity.');\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Удаление превью пикчи\n\t\t\t */\n\t\t\t$this->deletePreviewPicture($entity);\n\n\n\t\t\t/**\n\t\t\t * Удаление файлов элемента\n\t\t\t */\n\t\t\t$this->deleteElementFiles($entity);\n\n\t\t\t//exit;\n\n\t\t\t$elementSection = $entity->getSection();\n\t\t\t$elementBlock = $entity->getBlock();\n\n\t\t\t$url = $this->generateUrl('admin_block_show', array('id' => $elementBlock->getId()));\n\n\t\t\t//if ($elementSection) {\n\t\t\tif (false) {\n\t\t\t\t$url = $this->generateUrl('admin_block_show_section', array('id' => $elementBlock->getId(), 'section_id' => $elementSection->getId()));\n\t\t\t}\n\n\t\t\t$em->remove($entity);\n\t\t\t$em->flush();\n\n\t\t} else {\n\t\t\t//echo '<pre>' . print_r($form->getErrors(), true) . '</pre>';\n\t\t}\n\n\t\treturn $this->redirect($url);\n\n\n\t}", "function vu_core_hubspot_map_delete_form($form, &$form_state) {\n $form['webform_field_name'] = [\n '#type' => 'textfield',\n '#title' => t('What is the webform field you want to delete?'),\n '#required' => TRUE,\n '#size' => 100,\n '#maxlength' => 100,\n ];\n\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#attributes' => ['onclick' => 'if(!confirm(\"Are you sure you want to delete this field?\")){return false;}'],\n ];\n\n $form['cancel'] = [\n '#type' => 'submit',\n '#value' => t('Cancel'),\n '#submit' => ['vu_core_hubspot_map_add_form_cancel'],\n '#limit_validation_errors' => [],\n ];\n\n return $form;\n}", "function ting_visual_relation_slide_form_delete($form, &$form_state) {\n // Pass along any destination parameter set from previous pages\n $destination = array();\n if (isset($_GET['destination'])) {\n $destination = drupal_get_destination();\n unset($_GET['destination']);\n }\n // Should allways be set since this is only available on the edit form.\n $slide_id = $form_state['slide']->slide_id;\n $path = 'admin/config/ting/ting-visual-relation/app-settings/' . $slide_id .'/delete';\n $form_state['redirect'] = array($path, array('query' => $destination));\n}", "function thumbwhere_contentcollectionitem_delete_form($form, &$form_state, $thumbwhere_contentcollectionitem) {\n $form_state['thumbwhere_contentcollectionitem'] = $thumbwhere_contentcollectionitem;\n\n $form['#submit'][] = 'thumbwhere_contentcollectionitem_delete_form_submit';\n\n $form = confirm_form($form,\n t('Are you sure you want to delete thumbwhere_contentcollectionitem %name?', array('%name' => $thumbwhere_contentcollectionitem->pk_contentcollectionitem)),\n 'admin/thumbwhere/thumbwhere_contentcollectionitems/thumbwhere_contentcollectionitem',\n '<p>' . t('This action cannot be undone.') . '</p>',\n t('Delete'),\n t('Cancel'),\n 'confirm'\n );\n\n return $form;\n}", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "public function postRemove($entity);", "public function AdminDeleteArticleProcess(Request $request) {\n\n $article = Article::find($request->article_id);\n $article->delete();\n return redirect()->route('admin-article');\n }", "public function actionDelete ()\n\t\t{\n\t\t\tif (Yii::$app->request->isAjax)\n\t\t\t{\n\t\t\t\t$id = Yii::$app->request->post('id');\n\t\t\t\t$menu = Menu::findOne($id);\n\t\t\t\tif ($menu !== null)\n\t\t\t\t{\n\t\t\t\t\tif (!$menu->deleteWithChildren())\n\t\t\t\t\t\techo Json::encode(current($menu->firstErrors));\n\t\t\t\t\telse\n\t\t\t\t\t\techo 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tYii::$app->end();\n\t\t}", "function btrClient_delterm_form_submit($form, &$form_state) {\n\n $sguid = check_plain(trim($form_state['values']['sguid']));\n btr_del_term($sguid);\n\n // redirect to the list of terms\n $lng = variable_get('btrClient_translation_lng', 'fr');\n drupal_goto(\"translations/search\",\n array('query' => array(\n 'lng' => $lng,\n 'project' => 'vocabulary',\n 'limit' => 10,\n )));\n}", "public function delete_meta()\n {\n # process the request which it must be post and ajax request\n if (request()->isPost() && request()->isAjax()) {\n \n $objectId = request()->getPost('object-id', 'int');\n $object = request()->getPost('object', 'alphanum');\n \n $this->setJsonResponse();\n\n $object = PostMeta::findFirstByMeta_id($objectId);\n\n if(!$object) {\n $this->jsonMessages['messages'][] = [\n 'type' => 'warning',\n 'content' => 'Object not found!'\n ];\n return $this->jsonMessages;\n }\n $object->delete();\n\n \n $this->jsonMessages['messages'][] = [\n 'type' => 'success',\n 'content' => 'Object has been deleted!'\n ];\n return $this->jsonMessages;\n \n\n }\n }", "function thumbwhere_host_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_hosts/thumbwhere_host/' . $form_state['thumbwhere_host']->pk_host . '/delete';\n}", "public function delete() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['delete']) && !empty($_POST['delete'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if (!$this->_model->delete(explode(\"/\", $this->_url)[1])) {\n echo \"error\";\n } else {\n echo \"good\";\n }\n }\n }\n }", "public function actionDelete($id)\n\t{\n\t\t// we only allow deletion via POST request\n\t\t$this->loadModel($id)->delete();\n\t\tYii::app()->user->setFlash(Yii::app()->cms->flashes['success'], Yii::t('CmsModule.core', 'Node deleted.'));\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif (!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : Yii::app()->homeUrl);\n\t}", "public function onDeleteField()\n {\n $code = post('code');\n FieldManager::deleteField($code);\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }", "function room_reservations_admin_settings_sms_delete_submit($form_id, &$form_state) {\n if ($form_state['clicked_button']['#value'] == t('Delete')) {\n $carrier = $form_state['values']['carrier'];\n $sql = \"\n DELETE FROM {room_reservations_variables}\n WHERE ID = %d\n \";\n $result = db_query($sql, $carrier);\n if (!$result) {\n drupal_set_message(t('The wireless carrier could not be deleted.'), \n 'error');\n }\n else {\n drupal_set_message(t('The wireless carrier has been deleted.'));\n }\n }\n}", "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //SET LAYOUT \n $this->_helper->layout->setLayout('default-simple');\n\n //GET CLAIM ID\n $claim_id = $this->_getParam('claim_id', 'null');\n\n //GET CLAIM ITEM\n $claim = Engine_Api::_()->getItem('sitepage_claim', $claim_id);\n if ($claim->user_id != Engine_Api::_()->user()->getViewer()->getIdentity()) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //GET FORM\n $this->view->form = $form = new Sitepage_Form_Deleteclaim();\n\n //CHECK FORM VALIDATION\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET CLAIM TABLE\n Engine_Api::_()->getDbtable('claims', 'sitepage')->delete(array('claim_id=?' => $claim_id));\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => true,\n 'format' => 'smoothbox',\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('You have successfully deleted your claim request.'))\n ));\n }\n }", "public function deleteAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n if (!($category_id = $this->_getParam('category_id'))) {\n die('No identifier specified');\n }\n\n //GENERATE FORM\n $form = $this->view->form = new Sitestorereview_Form_Admin_Ratingparameter_Delete();\n $form->setAction($this->getFrontController()->getRouter()->assemble(array()));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues();\n\n foreach ($values as $key => $value) {\n if ($value == 1) {\n $reviewcat_id = explode('reviewcat_name_', $key);\n $reviewcat = Engine_Api::_()->getItem('sitestorereview_reviewcat', $reviewcat_id[1]);\n\n Engine_Api::_()->sitestorereview()->deleteReviewCategory($reviewcat_id[1]);\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //DELETE THE REVIEW PARAMETERS\n $reviewcat->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n $this->renderScript('admin-ratingparameter/delete.tpl');\n }", "public function save_trash_delete_form() {\n global $wpdb;\n\n if (!isset($_REQUEST['action']) || !isset($_GET['page']))\n return;\n\n if ('swpm-form-builder' !== $_GET['page'])\n return;\n\n if ('delete_form' !== $_REQUEST['action'])\n return;\n\n $id = absint($_REQUEST['form']);\n\n check_admin_referer('delete-form-' . $id);\n\n // Delete form and all fields\n $wpdb->query($wpdb->prepare(\"DELETE FROM $this->form_table_name WHERE form_id = %d\", $id));\n $wpdb->query($wpdb->prepare(\"DELETE FROM $this->field_table_name WHERE form_id = %d\", $id));\n\n // Redirect to keep the URL clean (use AJAX in the future?)\n wp_redirect(add_query_arg('action', 'deleted', 'admin.php?page=swpm-form-builder'));\n exit();\n }", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "function path_admin_delete_confirm_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n path_admin_delete($form_state['values']['pid']);\n $form_state['redirect'] = 'admin/build/path';\n return;\n }\n}", "public function remove_form_field()\n\t{\n\t\t//Get logged in session admin id\n\t\t$user_id \t\t\t\t\t\t= ($this->session->userdata('user_id_hotcargo')) ? $this->session->userdata('user_id_hotcargo') : 1;\n\t\t$setting_data \t\t\t\t\t= $this->myaccount_model->get_account_data($user_id);\n\t\t$data['data']['setting_data'] \t= $setting_data;\n\t\t$data['data']['settings'] \t\t= $this->sitesetting_model->get_settings();\n\t\t$data['data']['dealer_id'] \t\t= $user_id;\n\t\t\n\t\t//getting all admin data \n\t\t$data['myaccount_data'] \t\t\t= $this->myaccount_model->get_account_data($user_id);\n\t\t\n\t\t\n\t\t//Get requested id to remove\n\t\t$field_id \t\t\t\t\t= $this->input->get('form_id');\n\t\t\n\t\t//deleting query\n\t\t$this->mongo_db->where(array('field_name' => $field_id));\n\t\tif($this->mongo_db->delete('form_fields'))\n\t\t\techo 1;\n\t\telse\n\t\t\techo 0;\n\t}", "public function deleteAction()\n {\n // delete file resources via Post array\n if ($this->_request->isPost()) {\n foreach ($this->_request->getPost('selectedFiles') as $fileUri) {\n $fileUri = rawurldecode($fileUri);\n $this->_deleteFile($fileUri);\n }\n\n $url = new OntoWiki_Url(array('controller' => 'files', 'action' => 'manage'), array());\n $this->_redirect((string)$url);\n } else if (isset($this->_request->setResource)) {\n // delete a resource via get setResource parameter\n $fileUri = rawurldecode($this->_request->setResource);\n $this->_deleteFile($this->_request->setResource);\n $this->_owApp->appendMessage(\n new OntoWiki_Message('File attachment deleted', OntoWiki_Message::SUCCESS)\n );\n $resourceUri = new OntoWiki_Url(array('route' => 'properties'), array('r'));\n $resourceUri->setParam('r', $this->_request->setResource, true);\n $this->_redirect((string)$resourceUri);\n } else {\n // action just requested without anything\n $this->_forward('manage', 'files');\n }\n }", "function execute()\n\t{\n\t\t$this->obj_form = New form_input;\n\t\t$this->obj_form->formname = \"user_delete\";\n\t\t$this->obj_form->language = $_SESSION[\"user\"][\"lang\"];\n\n\t\t$this->obj_form->action = \"user/user-delete-process.php\";\n\t\t$this->obj_form->method = \"post\";\n\t\t\n\n\t\t// general\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"username\";\n\t\t$structure[\"type\"]\t\t= \"text\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t// hidden\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"id_user\";\n\t\t$structure[\"type\"]\t\t= \"hidden\";\n\t\t$structure[\"defaultvalue\"]\t= $this->id;\n\t\t$this->obj_form->add_input($structure);\n\t\t\n\t\t\n\t\t// confirm delete\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"] \t= \"delete_confirm\";\n\t\t$structure[\"type\"]\t\t= \"checkbox\";\n\t\t$structure[\"options\"][\"label\"]\t= \"Yes, I wish to delete this user and realise that once deleted the data can not be recovered.\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\n\t\t// define submit field\n\t\t$structure = NULL;\n\t\t$structure[\"fieldname\"]\t\t= \"submit\";\n\t\t$structure[\"type\"]\t\t= \"submit\";\n\t\t$structure[\"defaultvalue\"]\t= \"delete\";\n\t\t$this->obj_form->add_input($structure);\n\n\n\t\t\n\t\t// define subforms\n\t\t$this->obj_form->subforms[\"user_delete\"]\t= array(\"username\");\n\t\t$this->obj_form->subforms[\"hidden\"]\t\t= array(\"id_user\");\n\t\t$this->obj_form->subforms[\"submit\"]\t\t= array(\"delete_confirm\", \"submit\");\n\n\t\t\n\t\t// fetch the form data\n\t\t$this->obj_form->sql_query = \"SELECT username FROM `users` WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$this->obj_form->load_data();\n\n\n\t}", "function travel_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('travel', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('travel', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "function view9_lendingform_delete_confirm($form, &$form_state, $gallery) {\r\n if (isset($form_state['gallery'])) {\r\n $gallery = $form_state['gallery'];\r\n }\r\n $form['#gallery'] = $gallery;\r\n // Always provide entity id in the same form key as in the entity edit form.\r\n $form['pid'] = array('#type' => 'value', '#value' => $gallery->pid);\r\n return confirm_form($form, t('Are you sure you want to delete this lendingform?'), 'gallerys', t('This action cannot be undone.'), t('Delete'), t('Cancel')\r\n );\r\n}", "function tripal_elasticsearch_delete_indices_form_submit($form, &$form_state) {\n $delete_indices = array_filter($form_state['values']['indices']);\n if (!empty($delete_indices)) {\n foreach ($delete_indices as $index) {\n try {\n libraries_load('elasticsearch-php');\n $elasticsearch_host = variable_get('elasticsearch_host');\n $client = Elasticsearch\\ClientBuilder::create()\n ->setHosts([$elasticsearch_host])\n ->build();\n $response = $client->indices()->delete(['index' => $index]);\n } catch (\\Exception $e) {\n $message = $e->getMessage();\n drupal_set_message($message, 'warning');\n }\n }\n }\n}", "public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }", "function admin_delete($node_id = '')\n\t{\n\t\tif(!$this->RequestHandler->prefers('json'))\n\t\t{\n\t\t\t$this->cakeError('error404');\n\t\t\treturn;\n\t\t}\n\n\t\tif(empty($node_id))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($node_id))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\t$node = $this->Navigation->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Navigation.id' => $node_id,\n\t\t\t),\n\t\t\t'recursive' => -1,\n\t\t));\n\t\tif(empty($node))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\t$response = array('success' => 1);\n\n\t\tif(!$this->Navigation->delete($node_id))\n\t\t{\n\t\t\t$response['success'] = 0;\n\t\t}\n\n\t\t$this->set('response', $response);\n\t}", "public function deleteDocumentAction()\n {\n try {\n $this->_helper->viewRenderer->setNoRender();\n\n // Les modèles\n $model_commission = new Model_DbTable_Commission();\n\n $commission = $model_commission->find($this->_request->id_commission)->current();\n\n // On supprime le fichier\n unlink(REAL_DATA_PATH.DS.'uploads'.DS.'documents_commission'.DS.$commission->DOCUMENT_CR);\n\n // On met à null dans la DB\n $commission->DOCUMENT_CR = null;\n $commission->save();\n\n $this->_helper->flashMessenger([\n 'context' => 'success',\n 'title' => 'Le document a bien été supprimé',\n 'message' => '',\n ]);\n } catch (Exception $e) {\n $this->_helper->flashMessenger([\n 'context' => 'error',\n 'title' => 'Erreur lors de la suppression du document',\n 'message' => $e->getMessage(),\n ]);\n }\n }", "public function del(){\n\t\t$this->OnlyAdmin();\n\t\tif($this->input->post()){\n\t\t$this->TicketModel->delet($this->input->post());\n\t\tredirect('index.php/ticket/lists');}\n\t}", "public function save_trash_delete_form() {\n\t\t// Handled in the process_bulk_actions() function in includes/class-forms-list.php\n\t}", "protected function _postDelete()\n\t{\n\t}", "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$component = $this->podb->from('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'))->limit(1)->fetch();\n\t\t\t$componentType = $component['type'];\n\t\t\tif ($componentType == 'component') {\n\t\t\t\t$folderinstall = 'component';\n\t\t\t} else {\n\t\t\t\t$folderinstall = 'widget';\n\t\t\t}\n\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component'].'/uninstall.php')) {\n\t\t\t\theader('location:admin.php?mod=component&act=uninstall&folder='.$component['component']);\n\t\t\t} else {\n\t\t\t\t$delete_dir = new PoDirectory();\n\t\t\t\tif ($component['active'] == 'Y') {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component']);\n\t\t\t\t} else {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/_'.$component['component']);\n\t\t\t\t}\n\t\t\t\tif ($delete_folder) {\n\t\t\t\t\t$query = $this->podb->deleteFrom('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_2'], 'admin.php?mod=component');\n\t\t\t\t} else {\n\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_4'], 'admin.php?mod=component');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function postEliminarcfamiliar(){\n $cfamiliar=Cuadrofamiliar::find(Input::get('id'));\n $id=$cfamiliar->user->id;\n CuadroFamiliar::destroy(Input::get('id'));\n return $this->recargarFormularios('users.psico.inicio.vermas.formularios.step-22',$id);\n }" ]
[ "0.80393004", "0.7939578", "0.73766434", "0.71545696", "0.7057786", "0.69853455", "0.6817365", "0.66699225", "0.66454107", "0.66023004", "0.64903253", "0.64874077", "0.6448774", "0.644205", "0.6392401", "0.63327026", "0.63049406", "0.6286109", "0.6284347", "0.62316376", "0.62115645", "0.6185209", "0.6162674", "0.61623716", "0.6145332", "0.61036223", "0.6102157", "0.6099109", "0.60839885", "0.6082817", "0.6075088", "0.6072276", "0.60642844", "0.60572946", "0.6010478", "0.59986603", "0.59966666", "0.5986903", "0.59811324", "0.5973362", "0.5972923", "0.5970865", "0.59663564", "0.59600484", "0.5959283", "0.59559166", "0.59527546", "0.5940627", "0.5940381", "0.5917387", "0.59085596", "0.5907259", "0.59052294", "0.59043705", "0.5900729", "0.5895543", "0.5883393", "0.5876075", "0.5871006", "0.58704203", "0.5852604", "0.5851151", "0.5833696", "0.5803379", "0.58014995", "0.57956547", "0.5782634", "0.5779635", "0.5777856", "0.5777689", "0.57654226", "0.5762302", "0.57616866", "0.57590127", "0.57587165", "0.5758226", "0.5758053", "0.5757607", "0.57374954", "0.5732575", "0.5730548", "0.57158655", "0.5710769", "0.57062525", "0.56978124", "0.569497", "0.56810516", "0.56785965", "0.5675575", "0.5673543", "0.5668451", "0.56653905", "0.566026", "0.5659328", "0.56541276", "0.56534195", "0.565041", "0.5649111", "0.56476367", "0.56459916" ]
0.7860396
2
Show all defined mongo entities to administer.
function mongo_node_entities() { $set = mongo_node_settings(); $base_path = 'admin/structure/mongo-node'; $header = array(t('Name'), array( 'data' => t('Operations'), 'colspan' => 3, ), ); foreach ($set as $entity_type => $settings) { $rows[] = array( array('data' => l($settings['label'], $base_path . '/' . $entity_type)), array('data' => l(t('edit'), $base_path . '/' . $entity_type . '/edit')), array('data' => l(t('delete'), $base_path . '/' . $entity_type . '/delete')), ); } $output = theme('table', array( 'rows' => $rows, 'header' => $header, 'empty' => t('No entities created yet.'), ) ); return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAll()\n {\n $objects = $this->repo->showAll();\n return view('admin.showAll', compact('objects') );\n }", "public function findAllAdmin() {\n\t\t\t$result = $this->createQuery()->execute();\n\t\t\treturn $result;\n\t\t}", "function findAllAdministrators() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM admins;'));\r\n\r\n\t}", "public function index()\n {\n return Admins::all();\n }", "public function all()\n {\n if (!$this->isLogged())\n {\n header('Location: ' . ROOT_URL);\n exit; \n }\n else{\n\n $this->oUtil->oAdd_Admins = $this->oModel->getAll();\n\n $this->oUtil->getView('admin');\n }\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('UserBundle:User')->findAllAdmin();\n\n return $this->render('AdminBundle:admin:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function admin_index() {\r\n\t\t$this->data = $this->{$this->modelClass}->find('all');\r\n }", "public function index()\n {\n return Entity::all();\n }", "public function index()\n {\n $admins = Admin::paginate(5);\n return AdminResourceCollection::collection($admins);\n }", "public function index()\n {\n $admin = Admin::simplePaginate(25);\n \n return new AdminResourceCollection($admin);\n }", "public function getAllEntities();", "public function showAllAction( Request $request)\n { $em = $this->getDoctrine()->getManager();\n\n $entrepots = $em->getRepository('GererEntrepotBundle:Entrepot')->findAll();\n\n\n return $this->render('@GererEntrepot/admin/index.html.twig', array(\n 'entrepots' => $entrepots,\n ));\n\n }", "function admin_index() {\n\t\t$this->Article->recursive = 0;\n\t\t$this->set('articles', $this->paginate());\n\t}", "public function showEntities()\n {\n return Entity::paginate(10);\n }", "function show_all()\n{\n\tsystem('clear');\n\tglobal $collection;\n\t$cursor = $collection->find();\n\t$cursor->sort(array('Login' => 1));\n\tforeach ($cursor as $document) {\n echo \"Login: \".$document[\"Login\"].\" Nom: \".$document[\"Nom\"]\n .\" Promo: \".$document[\"Promo\"].\" Email: \".$document[\"Email\"]\n .\" Téléphone: \".$document[\"Telephone\"].\"\\n\";\n }\necho \"\\n\";\n}", "function list()\n {\n print_r($this->collection);\n }", "public function index()\n {\n $this->allowedAdminAction();\n\n return $this->showAll(Organizador::all());\n }", "public function listAdminAction() {\n $dons = $this->getDoctrine()->getManager()->getRepository('EasyDonBundle:Don')->findAll();\n\n return $this->render('EasyDonBundle:Don:listAdmin.html.twig', array('dons' => $dons));\n }", "public function showAdmins() { \n\t\n return View('admin.admins');\n\t\t\t\n }", "public function indexAdmin()\n\t{\n\t\treturn ResourcesWorks::collection(Works::all());\n\t}", "public function indexAction() {\n $entities = $this\n ->_getRepository()\n ->findAllOrdered();\n\n return array(\n 'entities' => $entities,\n 'configtypes' => new ConfigTypes(),\n );\n }", "public function index(): Collection\n {\n return $this->repository->findAll();\n }", "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "function managementAdminAll(){\n $Admins = new \\Project\\Models\\ManagementAdminManager();\n $allAdmin = $Admins->allManagementAdmin();\n\n require 'app/views/back/managementAdmin.php';\n }", "public function getAll()\n {\n return Admin::paginate($this->pagination);\n }", "public function all()\n {\n $admins = User::all();\n return view('admin.index')->with('admins', $admins);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('RudakBlogBundle:Post')->getAdminIndexList();\n\n return $this->render('RudakBlogBundle:Post:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function admin_index() {\r\n \r\n $sucursales = $this->Sucursal->find(\"all\");\r\n $this->set(compact('sucursales'));\r\n \r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "private function showCollections()\n {\n $currentDB = $this->currentDB;\n if (!empty($currentDB)) {\n $collections = $this->mongoClient->selectDatabase($currentDB)->listCollections();\n foreach ($collections as $collection) {\n $this->cli->shout(' ' . $collection->getName());\n }\n } else {\n $this->cli->error('Please select db');\n }\n }", "public function showAllAction () {\n $products = $this->getDoctrine()\n ->getRepository('AppBundle:Product')\n ->findAll();\n\n return $this->render('product/list.html.twig', array(\n 'products' => $products,\n ));\n }", "static function getAllAdmin()\n {\n\n $con=Database::getConnection();\n $req=$con->prepare('SELECT * FROM admin a, partners p WHERE a.idPart=p._idPart');\n $req->execute(array());\n return $req->fetchAll();\n }", "public function showAll()\n {\n }", "public function showall()\n {\n }", "public function findAllEntities();", "public function fetchAllAdmin()\n {\n $stmt = $this->connection->pdo\n ->prepare(Finder::getSql(\"SELECT * FROM app_rooms\"));\n $stmt->execute();\n\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n yield Rooms::arrayToEntity($row, new Rooms());\n }\n }", "function show_images() {\n global $app;\n $images = new entities\\Image();\n $cursor = $images->getRange($app, 0);\n $posts = array();\n \n foreach ($cursor->toArray() as $post) {\n $posts[] = $post;\n }\n return $app['twig']->render('admin/admin_images.twig', array('images' => $posts));\n}", "public function findAllAction();", "function admin_index() {\n\n\t\t$this->User->recursive = 0;\n\n\t\t/**\n\t\t * Put all users in \"users\".\n\t\t * $users will be available in the view.\n\t\t */\n\t\t$this->set('users', $this->paginate());\n\n\t}", "public function index()\n {\n return AtendenteResource::collection(Atendente::all());\n }", "public function getAdmins()\n {\n $admins = Admin::all();\n return view('view_admins', compact('admins'));\n }", "public static function get_admins();", "public function index()\n {\n return Auto::with('type', 'organizations', 'employers', 'employers.position')->get();\n }", "public function all()\n {\n if (!$this->isLogged()) exit;\n $this->oUtil->getModel('Todo');\n $this->oModel = new \\TestProject\\Model\\Todo;\n\n $this->oUtil->oTodos = $this->oModel->getAll();\n\n $this->oUtil->getView('index');\n }", "public function entities(): Collection;", "function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }", "public function index()\n {\n\n $show_all=Collection::all();\n return view('AdminPanel.Collection.AllCollection',['show_All'=>$show_all]);\n }", "function admin_index() \r\n {\r\n \t// setting the layout for admin\r\n \t$this->layout = 'admin';\r\n \t$this->Product->recursive = 0;\r\n \t$this->set('products', $this->paginate());\r\n }", "public function index()\n {\n return alunos::all();\n }", "public function showAll(){\n\t\t\n\t\t//our tasks\n\t\t$this->set('tasks', $this->Task->find('all', array(\n\t\t\t'order' => array('Task.created_on'),\n\t\t)));\n\t\t\n\t\t//our statuses\n\t\t$this->set('statuses', $this->Task->Status->find('list'));\n\t\t\n\t\t//our locations\n\t\t$this->set('locations', $this->Task->Location->find('list'));\n\t\t\n\t\t//our keywords\n\t\t$this->set('keywords', $this->Task->Keyword->find('list'));\n\t\t\n\t\t//our link locations\n\t\t$linkLocation['/foundersFactory/tasks/'] = \"Show by Location\";\n\t\tforeach($this->Task->Location->find('list') as $key => $location){\n\t\t\t$linkLocation['/foundersFactory/tasks/showByLocation/'.$key] = $location;\n\t\t}\n\t\t$this->set('linkLocations', $linkLocation);\n\t}", "public function existingAdminList()\n {\n $groceries = $this->getList();\n return $this->renderExistingAdminList($groceries);\n }", "public function index() {\n return $this->view->render(\n 'admin/main.html.twig', [\n 'options' => $this->manager->all()\n ]\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CrudforgeBundle:Users')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Entreprise')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminCommonBundle:Configuracao')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }", "public function index()\n\t{\n\t\t$entities = DB::table('entities')->orderBy('id')->get();\n\t\t$branches = DB::table('branches')->get();\n\n\t\treturn View::make('entities.index')\n\t\t->with('title','entities')\n\t\t->with('entities', $entities)\n\t\t->with('branches', $branches)\n\t\t->with('active', 'entities');\n\t}", "function admin_index(){\r\n\t $this->__requireRole(ROLE_TUTOR);\r\n//\t $this->Scenariosetup->bindModel(array('hasOne' => array('Player')));\r\n\t $this->set('scenariosetups', $this->Scenariosetup->findAll());\r\n\t $this->set('usedParametersets', $this->UsedParameterset->findAll());\r\n\t $this->render();\r\n\t}", "function admin_index() {\n\t\t$this->Event->recursive = 0;\n\t\t$this->set('events',$this->paginate());\n\t}", "public function adminAll(){\n $orders = order::with('user')->withTrashed()->get();\n return view('Admin.Orders.all',compact('orders'));\n }", "public function mainAction() {\n return array(\n 'admins' => $this->get('snowcap_admin')->getAdmins(),\n );\n }", "function adminIndex(){\r\n\t\t$data = $this->paginate('AdminBooking');\r\n\t\t$this->set(compact('data'));\r\n\t}", "public function index()\n {\n return view('entity.index');\n }", "public function models()\n {\n $this->_display('models');\n }", "public function index()\n {\n return MonitoreoResource::collection(Monitoreo::all());\n //return MonitoreoResource::collection(Conexione::orderBy('ipe_id', 'asc')->get());\n }", "public function index()\n {\n // return collection of articles\n return ArticleResource::collection(Article::orderBy('created_at', 'desc')->paginate(6));\n }", "public function index()\n {\n $datas = Article::all();\n return view('article-admin', compact('datas'));\n }", "public function adminIndexAction()\r\n {\r\n $pages=$this->getDoctrine()->getRepository(\"AppBundle:Page\")->findAll();\r\n $view=array('pages' => $pages,\r\n );\r\n return $this->render('page/adminIndex.html.twig', $view);\r\n }", "public function admin_index()\n\t{\n\t\t$this->paginate['Role']['order'] = 'Role.id Desc';\n\t\t$this->set('roles', $this->paginate('Role'));\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BrainstrapBundlesFrontBundle:Object\\ObjectType')->findAll();\n\n return $this->render('BrainstrapBundlesFrontBundle:Object/ObjectType:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function admin() {\r\n $Conductor = new Conductor($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allCon = $Conductor->getAllUsers();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"Conductor/admin\", array(\"allCon\" => $allCon));\r\n \r\n }", "public function index()\n {\n return $this->repository->all();\n }", "public function index()\n {\n return $this->repository->all();\n }", "public function index()\n {\n return Repository::all();\n }", "public function allAdminList(){\n $result = $this->adminModel->getAllAdmin();\n foreach ($result as $row){\n $data[] = array('AdminID'=>$row->adminID,'Email'=>$row->email,'role'=>$row->type,\n );\n }\n $this->view('admins/allAdminList',$data);\n\n }", "public function index()\n {\n $models = Collection::make($this->repository->getAll([], true));\n\n $this->layout->content = View::make('translations.admin.index')\n ->withModels($models);\n }", "public function getAllUsers()\n {\n return \"users from mongo\";\n }", "public function showAllAction() \n\t{\n\t\t$productsManager = new ProductsManager();\n\t\t$this->viewData['products'] = $products = $productsManager -> getAll();\n\t\t$this->viewData['productsNumber'] = count($products);\n\t\t$this -> generateView('products/show-all.phtml');\n\t}", "public function admin_index() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array(\n 'User.username' => 'asc',\n ) ,\n 'conditions' => array(\n 'User.status' => 1,\n ),\n );\n $users = $this->paginate('User');\n $this->set(compact('users'));\n }", "public function index()\n {\n return Article::all();\n }", "public function index(){\n\n $this->_config = array(\n 'username'=>'mongo',\n 'password'=>'123456',\n 'host'=>'127.0.0.1',\n 'port'=>27017,\n );\n $mongo = $this->connect($this->_config);\n if(!$mongo){\n echo \"wrong\";exit;\n }\n \n // 选择一个数据库和要操作的集(如果没有数据库默认创建)\n $collection = $mongo->selectDB('admin')->selectCollection('content');\n //Q::printf($collection);\n \n //$db = $mongo->selectDB('admin');\n //$collection = new MongoCollection($db, 'test');\n //Q::printf($collection);\n\n \n // $collection2 = $mongo->selectCollection('admin', 'test');\n //$rows = $collection->find();\n //Q::printf($rows);\n //Q::printf($collection);\n //Q::printf($collection2);\n \n $content = array(\n 'title'=>'title',\n 'author'=>'admin',\n 'url'=>'http://www.cnblogs.com/wubaiqing/archive/2011/09/17/2179870.html',\n );\n \n $r = $collection->insert($content);\n if($r){\n echo '插入成功!';\n }else{\n echo '失败';\n }\n \n \n //$r = get_class_methods($mongo);\n //Q::printf($r);\n\n }", "public function index() {\n\t\treturn $this->repository->all();\n\t}", "public function index()\n {\n return [\n 'categories' => Category::getRepository()->allWithBrands(),\n 'brands' => Brand::getRepository()->findAll(),\n 'types' => Type::getRepository()->findAll()\n ];\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('JetBredaBundle:Alquiler')->findAll();\n\n return array('entities' => $entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('PrognozMagazineBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n //return ProductMaster::all();\n //return new ProductMasterResource(ProductMaster::find('1'));\n return ProductMasterResource::collection(ProductMaster::all());\n }", "public function index(){\n $artistes = $this->Artiste->findArtiste();\n\n $this->render('admin.artistes.index', compact('artistes'));\n }", "public function index()\n {\n return view('admins', ['admins' => User::all()]);\n }", "public function indexActionEntities() {\n return [];\n }", "public function index()\n {\n return UserTransformer::collection(User::all());\n }", "public function actionIndex()\n { \n $query = Admin::find()->where('a_id != 1');\n $page = new Pagination([\n 'totalCount' => $query->count(),\n 'defaultPageSize' => 5,\n ]);\n $admin = $query->limit($page->limit)->offset($page->offset)->asArray()->all();\n return $this->render('index', ['admin'=>$admin,'page'=>$page]);\n }", "public function getAdmins()\n {\n $query = $this->newQuery();\n $query->where('admin', true);\n\n return $this->doQuery($query, false, false);\n }", "public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }", "public function index()\n {\n return UsuarioResource::collection(Usuario::all());\n }", "public function actionIndexAdmin()\n {\n $searchModel = new AdminSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction() {\n // on récupère l'entity manager à l'aide du service Doctrine\n $em = $this->getDoctrine()->getManager();\n\n // on récupère le repository de Article et on lui demande \n // tous les articles\n $entities = $em->getRepository('HBBlogBundle:Article')->findAll();\n\n // on transmet la liste d'article au template en la nommant entities\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $articles = $em->getRepository('IrvyneBlogBundle:Article')->findAll();\n\n return array('entities' => $articles);\n }", "public function index()\n {\n $categories = Category::all();\n $categories->each(function ($categories) {\n $categories->entity;\n });\n return new CategoryCollection($categories);\n }", "public function index()\n {\n $articles = Article::all();\n\n return ArticlesResource::collection($articles);\n }", "public function allAdmin()\n {\n $user = auth()->user();\n\n $productos = Venta::where('estado', 1)->get();\n\n $arrProductos = array();\n foreach ($productos as $producto) {\n $arrProductos[] = array(\n $producto->nombre,\n ($producto->estado) ? 'Activo' : 'Inactivo',\n $producto->id,\n );\n }\n\n $response = array('draw' => 1, 'recordsTotal' => count($arrProductos), 'recordsFiltered' => count($arrProductos), 'data' => $arrProductos);\n\n return response()->json($response, 200);\n }" ]
[ "0.67338544", "0.66438824", "0.6639408", "0.65726495", "0.6551215", "0.64955777", "0.6485584", "0.6479486", "0.64198875", "0.6326081", "0.6307325", "0.6274499", "0.6237284", "0.61738837", "0.61732745", "0.6170904", "0.61017853", "0.6087415", "0.60782176", "0.60630286", "0.60231906", "0.601617", "0.60123044", "0.596701", "0.5965927", "0.59531456", "0.59138095", "0.5910899", "0.5904185", "0.5896983", "0.58856887", "0.58695835", "0.58671814", "0.58629084", "0.5862679", "0.5835137", "0.58292085", "0.58261895", "0.58245987", "0.58160895", "0.5811514", "0.5806013", "0.58012176", "0.5794539", "0.57906693", "0.57901335", "0.576594", "0.5763665", "0.5762069", "0.575922", "0.57572275", "0.5752315", "0.57501376", "0.5749767", "0.5748728", "0.57464665", "0.5746062", "0.5744556", "0.5740466", "0.57390434", "0.57373536", "0.5736594", "0.57323253", "0.57235426", "0.5711453", "0.5701465", "0.5698167", "0.5697716", "0.56882685", "0.5688176", "0.56817675", "0.56719583", "0.56719583", "0.5668652", "0.5662198", "0.56521964", "0.56493235", "0.56457025", "0.56323004", "0.5629456", "0.5629278", "0.562555", "0.56207484", "0.56205267", "0.56196624", "0.56191146", "0.56173927", "0.56150925", "0.5614643", "0.56086725", "0.5602075", "0.55997396", "0.5599605", "0.55896825", "0.55888546", "0.55875456", "0.55830735", "0.5583026", "0.5580953", "0.557443" ]
0.6673599
1
Show for a certain entity type all its bundles.
function mongo_node_bundles($entity_type) { $set = mongo_node_settings(); $base_path = 'admin/structure/mongo-node/' . $entity_type . '/manage'; $header = array(t('Name'), array( 'data' => t('Operations'), 'colspan' => 4, ), ); $rows = array(); foreach ($set[$entity_type]['bundles'] as $bundle => $bundle_settings) { $rows[] = array( array('data' => l($bundle_settings['label'], $base_path . '/' . $bundle)), array('data' => l(t('edit'), $base_path . '/' . $bundle . '/edit')), array('data' => l(t('manage fields'), $base_path . '/' . $bundle . '/fields')), array('data' => l(t('manage display'), $base_path . '/' . $bundle . '/display')), array('data' => l(t('delete'), $base_path . '/' . $bundle . '/delete')), ); } $output = theme('table', array( 'rows' => $rows, 'header' => $header, 'empty' => t('No entities created yet.'), ) ); return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bundles() {\n $bundles = $this->user->find(Auth::user()->id)->bundles()->get();\n return view('frontend.bundle.list_bundle', compact('bundles'));\n }", "public function bundleTags($entity_type_id, $bundle) {\n $storage = \\Drupal::entityTypeManager()->getStorage($entity_type_id);\n $entity_ids = $storage->getQuery()->accessCheck(TRUE)->condition('type', $bundle)->execute();\n $page = [];\n\n $entities = $storage->loadMultiple($entity_ids);\n foreach ($entities as $entity) {\n $page[$entity->id()] = [\n '#markup' => $entity->label(),\n ];\n }\n $page['#cache']['tags'] = [$entity_type_id . '_list:' . $bundle];\n return $page;\n }", "public function listing($entity_type) {\n\n $templates_ids = $this->entityTypeManager->getStorage('cohesion_content_templates')->getQuery()->execute();\n\n if ($templates_ids) {\n $candidate_template_storage = $this->entityTypeManager->getStorage('cohesion_content_templates');\n $candidate_templates = $candidate_template_storage->loadMultiple($templates_ids);\n $bundles = [];\n foreach ($candidate_templates as $entity) {\n if (!isset($bundles[$entity->get('entity_type')])) {\n $bundles[$entity->get('entity_type')] = $entity->get('entity_type');\n }\n }\n\n $entity_types = $this->entityTypeManager->getDefinitions();\n foreach ($bundles as $entity_type_name) {\n $entity_type = $entity_types[$entity_type_name];\n $types[$entity_type_name] = [\n 'label' => ($entity_type->get('bundle_label')) ? $entity_type->get('bundle_label') : $entity_type->get('label'),\n 'description' => t('Manage your @settings_label templates', ['@settings_label' => strtolower($entity_type->getLabel())]),\n 'add_link' => Link::createFromRoute($entity_type->getLabel(), 'entity.cohesion_content_templates.collection', ['content_entity_type' => $entity_type_name]),\n ];\n }\n\n $build = [\n '#theme' => 'entity_add_list',\n '#bundles' => $types,\n '#add_bundle_message' => t('There are no available content templates. Go to the batch import page to import the list of content templates.'),\n '#cache' => [\n 'contexts' => $this->entityTypeDefinition->getListCacheContexts(),\n 'tags' => $this->entityTypeDefinition->getListCacheTags(),\n ],\n ];\n\n return $build;\n }\n else {\n throw new NotFoundHttpException();\n }\n }", "public function indexByTypeAction($type)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('StriideInventoryBundle:Item')->findByType($type);\n\n return $this->render('StriideInventoryBundle:Item:indexByType.html.twig', array(\n 'entities' => $entities,\n 'type' => $type\n ));\n }", "#[Route(path: '/', name: 'typesepulture', methods: ['GET'])]\n public function index(): Response\n {\n $em = $this->managerRegistry->getManager();\n $entities = $em->getRepository(TypeSepulture::class)->findAll();\n\n return $this->render(\n '@Sepulture/type_sepulture/index.html.twig',\n [\n 'entities' => $entities,\n ]\n );\n }", "public function bundleOptions($entity_type) {\n $options = [];\n\n // @todo Remove hack.\n $bundle_info = \\Drupal::service('entity_type.bundle.info');\n foreach ($bundle_info ->getBundleInfo($entity_type->id()) as $bundle => $info) {\n if (!empty($info['label'])) {\n $options[$bundle] = $info['label'];\n }\n else {\n $options[$bundle] = $bundle;\n }\n }\n\n return $options;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BrainstrapBundlesFrontBundle:Object\\ObjectType')->findAll();\n\n return $this->render('BrainstrapBundlesFrontBundle:Object/ObjectType:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function showAllBetAction()\n {\n $em = $this->getDoctrine()->getManager();\n $bets = $em->getRepository('BetBundle:Bet')->findBy(array(),array('id' => 'DESC'),20);\n\n return $this->render('admin/showBet.html.twig', array(\n 'bets' => $bets,\n ));\n }", "function entity_bundle_label($entity_type, $bundle_name) {\n $labels = &drupal_static(__FUNCTION__, array());\n\n if (empty($labels)) {\n foreach (entity_get_info() as $type => $info) {\n foreach ($info['bundles'] as $bundle => $bundle_info) {\n $labels[$type][$bundle] = !empty($bundle_info['label']) ? $bundle_info['label'] : FALSE;\n }\n }\n }\n\n return $labels[$entity_type][$bundle_name];\n}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $types = $em->getRepository('SandraPokemonBundle:Types')->findAll();\n\n return $this->render('types/index.html.twig', array(\n 'types' => $types,\n ));\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n $this->view['jobtypes'] = $em->getRepository('AdminBundle:JMP\\JobType')->findAll();\n return $this->_render('AdminBundle:JMP:JobType\\index.html.twig');\n }", "public function showAllAction () {\n $products = $this->getDoctrine()\n ->getRepository('AppBundle:Product')\n ->findAll();\n\n return $this->render('product/list.html.twig', array(\n 'products' => $products,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppWebBundle:Catalogo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('InfectBackendBundle:Species')->findAll();\n\n return $this->render('InfectBackendBundle:Species:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "#[Route(path: '/{id}', name: 'typesepulture_show', methods: ['GET'])]\n public function show(TypeSepulture $type): Response\n {\n $deleteForm = $this->createDeleteForm($type->getId());\n\n return $this->render(\n '@Sepulture/type_sepulture/show.html.twig',\n [\n 'entity' => $type,\n 'delete_form' => $deleteForm->createView(),\n ]\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Cardtype')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "function nestedbox_core_entity_info_alter(array &$entity_info) {\n foreach (nestedbox_get_types() as $type => $info) {\n $entity_info['nestedbox']['bundles'][$type] = array(\n 'label' => $info->label,\n 'admin' => array(\n /* @see nestedbox_type_load() */\n 'path' => 'admin/structure/nestedbox-types/manage/%nestedbox_type',\n 'real path' => 'admin/structure/nestedbox-types/manage/' . $type,\n 'bundle argument' => 4,\n 'access arguments' => array('administer nestedbox types'),\n ),\n );\n }\n}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $typeSeances = $em->getRepository('MovibeBackendBundle:TypeSeance')->findAll();\n $pagination = $this->pagination($typeSeances,1000);\n\n $pages = array();\n $pages['Types de Séance '] = \"movibe_backend_typeSeance\";\n $this->breadcrumb($pages);\n\n return $this->render('MovibeBackendBundle:TypeSeance:index.html.twig', array(\n 'typeSeances' => $pagination,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $typeproduits = $em->getRepository('AppBundle:Typeproduit')->findAll();\n\n return $this->render('typeproduit/index.html.twig', array(\n 'typeproduits' => $typeproduits,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n // $all = $em->getRepository('NvCargaBundle:Bill')->findBy(['canceled'=>FALSE, 'maincompany'=> $maincompany])\n $all = $em->getRepository('NvCargaBundle:Bill')->createQueryBuilder('b')\n ->where('b.status != :status')\n ->andwhere('b.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany, 'status' => 'ANULADA'))\n ->orderBy('b.number', 'DESC')\n ->setMaxResults(500)\n ->getQuery()\n ->getResult();\n if ($type == \"MASTER\") {\n $entities = $all;\n } else {\n $entities = [];\n foreach ($all as $entity) {\n $guide = $entity->getGuides()->last();\n if ($guide->getAgency() === $agency()) {\n $entities[] = $entity;\n }\n }\n }\n return array(\n 'entities' => $entities,\n );\n\n }", "public function showAllAction( Request $request)\n { $em = $this->getDoctrine()->getManager();\n\n $entrepots = $em->getRepository('GererEntrepotBundle:Entrepot')->findAll();\n\n\n return $this->render('@GererEntrepot/admin/index.html.twig', array(\n 'entrepots' => $entrepots,\n ));\n\n }", "public function index()\n {\n $units = ProductUnit::orderBy('id','desc')->pluck('name','id');\n $bundles = ProductBundle::orderBy('id','desc')->pluck('name','id');\n return view('admin.product.index',compact('units','bundles'));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $brands = $em->getRepository('kiraxeAdminCrmBundle:Brand')->findAll();\n\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 for($i = 0; $i < count($brands); $i++) {\n $deleteForm[$brands[$i]->getName()] = $this->createDeleteForm($brands[$i])->createView();\n }\n\n return $this->render('brand/index.html.twig', array(\n 'brands' => $brands,\n 'tables' => $tableName,\n 'user' => $user,\n 'tableSettingsName' => $tableSettingsName,\n 'tableCars' => $tableCars,\n 'delete_form' => $deleteForm\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('InventarioBundle:Bien')->findAll();\n\n return $this->render('InventarioBundle:Bien:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $dictTypes = $em->getRepository('AppBundle:DictType')->findAll();\n\n return $this->render('dicttype/index.html.twig', array(\n 'dictTypes' => $dictTypes,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminCommonBundle:LocalBanner')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getAvailableBundles() {\n $options = [];\n $entityTypes = $this->getSupportedEntityTypes();\n\n foreach ($entityTypes as $entityType => $entityLabel) {\n $options[$entityLabel][$entityType] = \"$entityLabel (Default)\";\n\n $bundles = $this->entityTypeBundleInfo->getBundleInfo($entityType);\n\n foreach ($bundles as $bundleId => $bundleData) {\n $defaultsId = $entityType . '__' . $bundleId;\n $options[$entityLabel][$defaultsId] = $bundleData['label'];\n }\n }\n\n return $options;\n }", "function peanut_gene_bundle_instances_info($entity_type, $bundle) {\n $instances = array();\n\n if (isset($bundle->data_table) AND ($bundle->data_table == 'feature')) {\n /*\n *\n * 1. Begin GENE ASSEMBLY VERSION\n */\n $field_name = 'local__gene_assembly_version';\n $field_type = 'local__gene_assembly_version';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Assembly Version',\n 'description' => 'Gene Assembly Version Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => TRUE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_assembly_version_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_assembly_version_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n /*\n *\n * 2. Begin GENE MODEL BUILD\n */\n $field_name = 'local__gene_model_build';\n $field_type = 'local__gene_model_build';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Model Build',\n 'description' => 'Gene Model Build Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => TRUE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_model_build_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_model_build_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n /*\n *\n * 3. Begin GENE PROTEIN DOMAINS\n */\n $field_name = 'local__gene_protein_domains';\n $field_type = 'local__gene_protein_domains';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Protein Domains',\n 'description' => 'Gene Protein Domains Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => TRUE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_protein_domains_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_protein_domains_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n /*\n *\n * 4. Begin GENE EXPRESSION\n */\n $field_name = 'local__gene_expression';\n $field_type = 'local__gene_expression';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Expression',\n 'description' => 'Gene Expression Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => TRUE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_expression_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_expression_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n /*\n *\n * 5. Begin GENE SEQUENCES\n */\n $field_name = 'local__gene_sequences';\n $field_type = 'local__gene_sequences';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Sequences',\n 'description' => 'Gene Sequences Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_sequences_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_sequences_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 6. Begin GENE START\n */\n $field_name = 'local__gene_start';\n $field_type = 'local__gene_start';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Start',\n 'description' => 'Gene Start Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_start_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_start_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 7. Begin GENE END\n */\n $field_name = 'local__gene_end';\n $field_type = 'local__gene_end';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene End',\n 'description' => 'Gene End Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_end_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_end_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 8. Begin GENE Species\n */\n $field_name = 'local__gene_species';\n $field_type = 'local__gene_species';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Species',\n 'description' => 'Gene Species Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_species_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_species_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 9. Begin GENE Chromosome\n */\n $field_name = 'local__gene_chromosome';\n $field_type = 'local__gene_chromosome';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Chromosome',\n 'description' => 'Gene Chromosome Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_chromosome_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_chromosome_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 10. Begin GENE Name\n */\n $field_name = 'local__gene_name';\n $field_type = 'local__gene_name';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Name',\n 'description' => 'Gene Name Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_name_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_name_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 11. Begin GENE Description\n */\n $field_name = 'local__gene_description';\n $field_type = 'local__gene_description';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Description',\n 'description' => 'Gene Description Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_description_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_description_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n /*\n *\n * 12. Begin GENE Family\n */\n $field_name = 'local__gene_family';\n $field_type = 'local__gene_family';\n $instances[$field_name] = array(\n 'field_name' => $field_name,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle->name,\n 'label' => 'Gene Family',\n 'description' => 'Gene Family Desc.',\n 'required' => FALSE,\n 'settings' => array(\n 'auto_attach' => FALSE,\n // 'chado_table' => $bundle->data_table,\n // 'chado_column' => 'organism_id',\n // 'base_table' => $bundle->data_table,\n ),\n 'widget' => array(\n 'type' => 'local__gene_family_widget',\n 'settings' => array(),\n ),\n 'display' => array(\n 'default' => array(\n 'label' => 'hidden',\n 'type' => 'local__gene_family_formatter',\n 'settings' => array(),\n ),\n ),\n );\n\n\n } //end if isset()\n return $instances;\n}", "function showItems() {\n global $DB;\n\n $budgets_id = $this->fields['id'];\n\n if (!$this->can($budgets_id, READ)) {\n return false;\n }\n\n $iterator = $DB->request([\n 'SELECT' => 'itemtype',\n 'DISTINCT' => true,\n 'FROM' => 'glpi_infocoms',\n 'WHERE' => [\n 'budgets_id' => $budgets_id,\n 'NOT' => ['itemtype' => ['ConsumableItem', 'CartridgeItem', 'Software']]\n ],\n 'ORDER' => 'itemtype'\n ]);\n\n $number = count($iterator);\n\n echo \"<div class='spaced'><table class='tab_cadre_fixe'>\";\n echo \"<tr><th colspan='2'>\";\n Html::printPagerForm();\n echo \"</th><th colspan='4'>\";\n if ($number == 0) {\n echo __('No associated item');\n } else {\n echo _n('Associated item', 'Associated items', $number);\n }\n echo \"</th></tr>\";\n\n echo \"<tr><th>\".__('Type').\"</th>\";\n echo \"<th>\".__('Entity').\"</th>\";\n echo \"<th>\".__('Name').\"</th>\";\n echo \"<th>\".__('Serial number').\"</th>\";\n echo \"<th>\".__('Inventory number').\"</th>\";\n echo \"<th>\"._x('price', 'Value').\"</th>\";\n echo \"</tr>\";\n\n $num = 0;\n $itemtypes = [];\n while ($row = $iterator->next()) {\n $itemtypes[] = $row['itemtype'];\n }\n $itemtypes[] = 'Contract';\n $itemtypes[] = 'Ticket';\n $itemtypes[] = 'Problem';\n $itemtypes[] = 'Change';\n $itemtypes[] = 'Project';\n\n foreach ($itemtypes as $itemtype) {\n if (!($item = getItemForItemtype($itemtype))) {\n continue;\n }\n\n if ($item->canView()) {\n switch ($itemtype) {\n\n case 'Contract' :\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id',\n 'SUM' => 'glpi_contractcosts.cost AS value'\n ],\n 'FROM' => 'glpi_contractcosts',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_contractcosts' => 'contracts_id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_contractcosts.budgets_id' => $budgets_id,\n $item->getTable() . '.is_template' => 0\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'GROUPBY' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id'\n ],\n 'ORDERBY' => [\n $item->getTable() . '.entities_id',\n $item->getTable() . '.name'\n ]\n ];\n break;\n\n case 'Ticket' :\n case 'Problem' :\n case 'Change' :\n $costtable = getTableForItemType($item->getType().'Cost');\n\n $sum = new QueryExpression(\n \"SUM(\" . $DB->quoteName(\"$costtable.actiontime\") . \" * \" . $DB->quoteName(\"$costtable.cost_time\") . \"/\".HOUR_TIMESTAMP.\"\n + \" . $DB->quoteName(\"$costtable.cost_fixed\") . \"\n + \" . $DB->quoteName(\"$costtable.cost_material\") . \") AS \" . $DB->quoteName('value')\n );\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id',\n $sum\n ],\n 'FROM' => $costtable,\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n $costtable => $item->getForeignKeyField()\n ]\n ]\n ],\n 'WHERE' => [\n $costtable . '.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'GROUPBY' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id'\n ],\n 'ORDERBY' => [\n $item->getTable() . '.entities_id',\n $item->getTable() . '.name'\n ]\n ];\n break;\n\n case 'Project' :\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id',\n 'SUM' => 'glpi_projectcosts.cost AS value'\n ],\n 'FROM' => 'glpi_projectcosts',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_projectcosts' => 'projects_id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_projectcosts.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'GROUPBY' => [\n $item->getTable() . '.id',\n $item->getTable() . '.entities_id'\n ],\n 'ORDERBY' => [\n $item->getTable() . '.entities_id',\n $item->getTable() . '.name'\n ]\n ];\n break;\n\n case 'Cartridge' :\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.*',\n 'glpi_cartridgeitems.name',\n 'glpi_infocoms.value'\n ],\n 'FROM' => 'glpi_infocoms',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_infocoms' => 'items_id'\n ]\n ],\n 'glpi_cartridgeitems' => [\n 'ON' => [\n $item->getTable() => 'cartridgeitems_id',\n 'glpi_cartridgeitems' => 'id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_infocoms.itemtype' => $itemtype,\n 'glpi_infocoms.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'ORDERBY' => [\n 'entities_id',\n 'glpi_cartridgeitems.name'\n ]\n ];\n break;\n\n case 'Consumable' :\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.*',\n 'glpi_consumableitems.name',\n 'glpi_infocoms.value'\n ],\n 'FROM' => 'glpi_infocoms',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_infocoms' => 'items_id'\n ]\n ],\n 'glpi_consumableitems' => [\n 'ON' => [\n $item->getTable() => 'consumableitems_id',\n 'glpi_consumableitems' => 'id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_infocoms.itemtype' => $itemtype,\n 'glpi_infocoms.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'ORDERBY' => [\n 'entities_id',\n 'glpi_cartridgeitems.name'\n ]\n ];\n break;\n\n default:\n $criteria = [\n 'SELECT' => [\n $item->getTable() . '.*',\n 'glpi_infocoms.value',\n ],\n 'FROM' => 'glpi_infocoms',\n 'INNER JOIN' => [\n $item->getTable() => [\n 'ON' => [\n $item->getTable() => 'id',\n 'glpi_infocoms' => 'items_id'\n ]\n ]\n ],\n 'WHERE' => [\n 'glpi_infocoms.itemtype' => $itemtype,\n 'glpi_infocoms.budgets_id' => $budgets_id\n ] + getEntitiesRestrictCriteria($item->getTable()),\n 'ORDERBY' => [\n $item->getTable() . '.entities_id'\n ]\n ];\n if ($item->maybeTemplate()) {\n $criteria['WHERE'][$item->getTable() . '.is_template'] = 0;\n }\n\n if ($item instanceof Item_Devices) {\n $criteria['ORDERBY'][] = $item->getTable() .'.itemtype';\n } else {\n $criteria['ORDERBY'][] = $item->getTable() . '.name';\n }\n break;\n }\n\n $iterator = $DB->request($criteria);\n $nb = count($iterator);\n if ($nb > $_SESSION['glpilist_limit']) {\n echo \"<tr class='tab_bg_1'>\";\n $name = $item->getTypeName($nb);\n //TRANS: %1$s is a name, %2$s is a number\n echo \"<td class='center'>\".sprintf(__('%1$s: %2$s'), $name, $nb).\"</td>\";\n echo \"<td class='center' colspan='2'>\";\n\n $opt = ['order' => 'ASC',\n 'is_deleted' => 0,\n 'reset' => 'reset',\n 'start' => 0,\n 'sort' => 80,\n 'criteria' => [0 => ['value' => '$$$$'.$budgets_id,\n 'searchtype' => 'contains',\n 'field' => 50]]];\n\n echo \"<a href='\". $item->getSearchURL() . \"?\" .Toolbox::append_params($opt). \"'>\".\n __('Device list').\"</a></td>\";\n echo \"<td class='center'>-</td><td class='center'>-</td><td class='center'>-\".\n \"</td></tr>\";\n\n } else if ($nb) {\n for ($prem=true; $data = $iterator->next(); $prem=false) {\n $name = NOT_AVAILABLE;\n if ($item->getFromDB($data[\"id\"])) {\n if ($item instanceof Item_Devices) {\n $tmpitem = new $item::$itemtype_2();\n if ($tmpitem->getFromDB($data[$item::$items_id_2])) {\n $name = $tmpitem->getLink(['additional' => true]);\n }\n } else {\n $name = $item->getLink(['additional' => true]);\n }\n }\n echo \"<tr class='tab_bg_1'>\";\n if ($prem) {\n $typename = $item->getTypeName($nb);\n echo \"<td class='center top' rowspan='$nb'>\".\n ($nb>1 ? sprintf(__('%1$s: %2$s'), $typename, $nb) : $typename).\"</td>\";\n }\n echo \"<td class='center'>\".Dropdown::getDropdownName(\"glpi_entities\",\n $data[\"entities_id\"]);\n echo \"</td><td class='center\";\n echo (isset($data['is_deleted']) && $data['is_deleted'] ? \" tab_bg_2_2'\" : \"'\");\n echo \">\".$name.\"</td>\";\n echo \"<td class='center'>\".(isset($data[\"serial\"])? \"\".$data[\"serial\"].\"\" :\"-\");\n echo \"</td>\";\n echo \"<td class='center'>\".\n (isset($data[\"otherserial\"])? \"\".$data[\"otherserial\"].\"\" :\"-\").\"</td>\";\n echo \"<td class='center'>\".\n (isset($data[\"value\"]) ? \"\".Html::formatNumber($data[\"value\"], true).\"\"\n :\"-\");\n\n echo \"</td></tr>\";\n }\n }\n $num += $nb;\n }\n }\n\n if ($num>0) {\n echo \"<tr class='tab_bg_2'>\";\n echo \"<td class='center b'>\".sprintf(__('%1$s = %2$s'), __('Total'), $num).\"</td>\";\n echo \"<td colspan='5'>&nbsp;</td></tr> \";\n }\n echo \"</table></div>\";\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SiteSavalizeBundle:Company')->findAll();\n\n return $this->render('SiteSavalizeBundle:Company:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $superficies = $em->getRepository('EncuestaBundle:Superficie')->findAll();\n\n return $this->render('superficie/index.html.twig', array(\n 'superficies' => $superficies,\n ));\n }", "public function show2Action()\n {\n\n $em = $this->getDoctrine()->getManager();\n $categories = $em->getRepository('ProduitBundle:Categorie')->findAll();\n $produits = $em->getRepository('ProduitBundle:Produits')->findAll();\n\n\n return $this->render('@Produit/Front/Produit/produit.html.twig', array(\n \"produits\"=>$produits,'categories'=> $categories,\n ));\n\n }", "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //recupérer le repo\n $repository = $em->getRepository('InsatGl2Bundle:Personne');\n\n $personnes = $repository->findAll();\n\n\n return $this->render('@InsatGl2\\Personne\\show.html.twig',\n array(\n 'personnes'=> $personnes\n ));\n }", "public function viewProductAction(){\n $request = $this->getRequest();\n $session = $request->getSession();\n $company_id = $session->get('id');\n $role = $session->get('role');\n if ($role == 'company'){\n $em = $this->getDoctrine()->getEntityManager();\n $productsBrands = $em->getRepository('SiteSavalizeBundle:ProductBrand')->displayCompanyProducts($company_id);\n $brands = $this->getDoctrine()->getEntityManager()->getRepository('SiteSavalizeBundle:Brand')->findByCompany(array('id' =>$company_id));\n\n $p = array();\n $b = array();\n\n for($i=0; $i<count($brands); $i++)\n {\n $b[$i]= $brands[$i]->getName();\n }\n \n for($i=0; $i<count($productsBrands); $i++)\n {\n $p[$i] = $productsBrands[$i]->getProduct()->getName();\n }\n\n $repository = $this->getDoctrine()->getEntityManager()->getRepository('SiteSavalizeBundle:Category');\n $categories = $repository->categoryAutocomplete();\n }\n return $this->render('SiteSavalizeBundle:Company:newproduct.html.twig' , array(\n 'brands' => $b , 'products' => $p,\n 'categories' => $categories));\n \n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Entreprise')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function new_bundle() {\n \treturn view('frontend.bundle.new_bundle');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('FnxAdminBundle:Categoria')->findAll();\n\n return array('entities' => $entities);\n }", "protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $fitas = $em->getRepository('MRSBackupBundle:Fita')\n ->findBy(array(),array('unidade' => 'ASC',\n 'barCode' => 'ASC'));\n\n return $this->render('fita/index.html.twig', array(\n 'fitas' => $fitas,\n ));\n }", "public function locationshowAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countries = $em->getRepository('adminBundle:countries')->findAll();\n return $this->render(':Location:index.html.twig', array(\n 'countries' => $countries,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('StriideInventoryBundle:Item')->findAll();\n\n return $this->render('StriideInventoryBundle:Item:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "function apachesolr_index_set_bundles($env_id, $entity_type, array $bundles) {\n $transaction = db_transaction();\n try {\n db_delete('apachesolr_index_bundles')\n ->condition('env_id', $env_id)\n ->condition('entity_type', $entity_type)\n ->execute();\n\n if ($bundles) {\n $insert = db_insert('apachesolr_index_bundles')\n ->fields(array('env_id', 'entity_type', 'bundle'));\n\n foreach ($bundles as $bundle) {\n $insert->values(array(\n 'env_id' => $env_id,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ));\n }\n $insert->execute();\n }\n }\n catch (Exception $e) {\n $transaction->rollback();\n // Re-throw the exception so we are aware of the failure.\n throw $e;\n }\n}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $typeProducts = $em->getRepository('AdminBundle:TypeProduct')->findAll();\n \n $delete_form = $this->createFormBuilder()\n ->setAction($this->generateUrl('type_product_delete', array('id' => ':USER_ID')))\n ->setMethod('DELETE')\n ->getForm();\n\n return $this->render('AdminBundle:TypeProduct:index.html.twig', array(\n 'typeProducts' => $typeProducts,\n 'delete_form' => $delete_form->createView()\n ));\n }", "protected function buildFilters(&$form, FormStateInterface $form_state) {\n \\Drupal::moduleHandler()->loadInclude('views_ui', 'inc', 'admin');\n\n $bundles = $this->bundleInfoService->getBundleInfo($this->entityTypeId);\n // If the current base table support bundles and has more than one (like user).\n if (!empty($bundles) && $this->entityType && $this->entityType->hasKey('bundle')) {\n // Get all bundles and their human readable names.\n $options = ['all' => $this->t('All')];\n foreach ($bundles as $type => $bundle) {\n $options[$type] = $bundle['label'];\n }\n $form['displays']['show']['type'] = [\n '#type' => 'select',\n '#title' => $this->t('of type'),\n '#options' => $options,\n ];\n $selected_bundle = static::getSelected($form_state, ['show', 'type'], 'all', $form['displays']['show']['type']);\n $form['displays']['show']['type']['#default_value'] = $selected_bundle;\n // Changing this dropdown updates the entire content of $form['displays']\n // via AJAX, since each bundle might have entirely different fields\n // attached to it, etc.\n views_ui_add_ajax_trigger($form['displays']['show'], 'type', ['displays']);\n }\n }", "public function actionProducttype() {\n $data['type'] = ProductType::model()->findAll(\"\");\n $this->render('producttype',$data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('INHack20EquipoBundle:Componente')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('Area4CampeonatoBundle:Partido')->findAll();\n //$e_h_p = $em->getRepository('Area4CampeonatoBundle:Equipo_has_Partido')->findAll();\n\n return array('entities' => $entities);\n }", "function entity_type_label_plural($entity_type) {\n $controller = entity_toolbox_controller($entity_type);\n $helper = $controller->getToolboxHelper();\n\n return $helper->labelPlural();\n}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $areas = $em->getRepository('CpdgUsuarioBundle:Areas')->findAll();\n\n return $this->render('areas/index.html.twig', array(\n 'areas' => $areas,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $natures = $em->getRepository('GestionBundle:Nature')->findAll();\n\n return $this->render('nature/index.html.twig', array(\n 'natures' => $natures,\n ));\n }", "protected function defaultDisplayFiltersUser(array $form, FormStateInterface $form_state) {\n $filters = [];\n\n if (($type = $form_state->getValue(['show', 'type'])) && $type != 'all') {\n $bundle_key = $this->entityType->getKey('bundle');\n // Figure out the table where $bundle_key lives. It may not be the same as\n // the base table for the view; the taxonomy vocabulary machine_name, for\n // example, is stored in taxonomy_vocabulary, not taxonomy_term_data.\n \\Drupal::moduleHandler()->loadInclude('views_ui', 'inc', 'admin');\n $fields = Views::viewsDataHelper()->fetchFields($this->base_table, 'filter');\n $table = FALSE;\n if (isset($fields[$this->base_table . '.' . $bundle_key])) {\n $table = $this->base_table;\n }\n else {\n foreach ($fields as $field_name => $value) {\n if ($pos = strpos($field_name, '.' . $bundle_key)) {\n $table = substr($field_name, 0, $pos);\n break;\n }\n }\n }\n // Some entities have bundles but don't provide their bundle data on the\n // base table. In this case the entities wizard should provide a\n // relationship to the relevant data.\n // @see \\Drupal\\node\\Plugin\\views\\wizard\\NodeRevision\n if (!empty($table)) {\n $table_data = Views::viewsData()->get($table);\n // If the 'in' operator is being used, map the values to an array.\n $handler = $table_data[$bundle_key]['filter']['id'];\n $handler_definition = Views::pluginManager('filter')\n ->getDefinition($handler);\n if ($handler == 'in_operator' || is_subclass_of($handler_definition['class'], 'Drupal\\\\views\\\\Plugin\\\\views\\\\filter\\\\InOperator')) {\n $value = [$type => $type];\n }\n // Otherwise, use just a single value.\n else {\n $value = $type;\n }\n\n $filters[$bundle_key] = [\n 'id' => $bundle_key,\n 'table' => $table,\n 'field' => $bundle_key,\n 'value' => $value,\n 'entity_type' => $table_data['table']['entity type'] ?? NULL,\n 'entity_field' => $table_data[$bundle_key]['entity field'] ?? NULL,\n 'plugin_id' => $handler,\n ];\n }\n }\n\n return $filters;\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Categorie')->findAll();\n\n\n\n return $this->render('layout_back.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $areaIns = $em->getRepository('BrooterAdminBundle:AreaIn')->findAll();\n\n return $this->render('areain/index.html.twig', array(\n 'areaIns' => $areaIns,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $packs = $em->getRepository('KidzyBundle:Pack')->findAll();\n\n return $this->render('@Kidzy/pack/index.html.twig', array(\n 'packs' => $packs\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SkaphandrusAppBundle:SkIdentificationModule')->findAll();\n\n return $this->render('SkaphandrusAppBundle:SkIdentificationModule:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $combos = $em->getRepository('AppBundle:Combo')->findAll();\n\n return $this->render('combo/index.html.twig', array(\n 'combos' => $combos,\n ));\n }", "abstract public function bundle();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $situations = $em->getRepository('GEFORPlatformBundle:Situation')->findAll();\n\n return $this->render('situation/index.html.twig', array(\n 'situations' => $situations,\n ));\n }", "public function index()\n {\n return view('admin.product_types.index', ['types' => ProductType::all()]);\n }", "public function display_louer(){\n $bien = \\App\\Annonce_bien::where('type_annonce_id', 2)->take(6)->get();\n $type_b=\\App\\Type_bien::pluck('nom','id');\n $type_a=\\App\\Type_annonce::pluck('name','id');\n $region=\\App\\Region::pluck('nom','id');\n return view('menu.louer', compact('bien','type_b','type_a','region'));\n }", "public function indexAction()\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$translationBuyerTypes = $em->getRepository('UbidElectricityBundle:TranslationBuyerType')->findAll();\n\n\t\treturn $this->render('UbidElectricityBundle:TranslationBuyerType:index.html.twig', array(\n\t\t\t'translationBuyerTypes' => $translationBuyerTypes,\n\t\t));\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $tipoanuncios = $em->getRepository('AppBundle:Tipoanuncio')->findAll();\n\n return $this->render('tipoanuncio/index.html.twig', array(\n 'tipoanuncios' => $tipoanuncios,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('escuelaBundle:finanzasCategoria')->findAll();\n\n return $this->render('escuelaBundle:finanzasCategoria:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $production =$em->getRepository('UserBundle:User')->findBY(array('service'=>'PRODUCTION'));\n\n $entities = $em->getRepository('ProductionBundle:BonCommandeLigne')->findBY(array('affecter'=>'2'));\n\n return $this->render('ProductionBundle:BonCommandeLigne:index.html.twig', array(\n 'entities' => $entities,\n 'production' => $production,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $areas = $em->getRepository('AppBundle:Areas')\n ->findAllOrderedByName();\n\n return $this->render('areas/index.html.twig', array(\n 'areas' => $areas,\n ));\n }", "public function handle(TypeFormBuilder $builder)\n {\n $builder->setSections(\n [\n 'type' => [\n 'tabs' => [\n 'general' => [\n 'title' => 'anomaly.module.blocks::tab.general',\n 'fields' => [\n 'name',\n 'slug',\n 'description',\n 'category',\n ],\n ],\n 'content' => [\n 'title' => 'anomaly.module.blocks::tab.content',\n 'fields' => [\n 'content_layout',\n ],\n ],\n 'wrapper' => [\n 'title' => 'anomaly.module.blocks::tab.wrapper',\n 'fields' => [\n 'wrapper_layout',\n ],\n ],\n ],\n ],\n ]\n );\n }", "public function indexAction()\n {\n $entities= $this->get('product.manager')->findAll();\n\n\n return array(\n 'entities' => $entities,\n );\n }", "public function viewProductsAction() {\r\n $id = $this->getUser()->getId();\r\n $em=$this->getDoctrine()->getManager();\r\n $products=$em->getRepository('HologramBundle:Product')->findBy(array('idUser'=>$id,'etat'=>array('en attente','valider')));\r\n return $this->render('HologramBundle:Front:allProducts.html.twig',\r\n array('prod'=>$products)); \r\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GarnetTaxiBeBundle:Ligne')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return [\n 'categories' => Category::getRepository()->allWithBrands(),\n 'brands' => Brand::getRepository()->findAll(),\n 'types' => Type::getRepository()->findAll()\n ];\n }", "public function index()\n {\n $type = ProductType::all();\n return view('admincp.loaisanpham.list', ['type'=>$type]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $verbTranslations = $em->getRepository('AppBundle:VerbTranslation')->findAll();\n\n return $this->render('verbtranslation/index.html.twig', array(\n 'verbTranslations' => $verbTranslations,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SubscriptionBundle:SubscriptionBase')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $entities = $this->getEntityManager()\n ->getRepository('ArnmArtistBundle:Artist')\n ->findAll();\n\n return $this->render('ArnmArtistBundle:ArtistMgr:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $plateformes = $em->getRepository('AppBundle:Plateformes')->findAll();\n\n return $this->render('@App/Administration/plateformes/index.html.twig', array(\n 'plateformes' => $plateformes,\n ));\n }", "public function indexAction()\n\n {\n $em1 = $this->getDoctrine()->getManager();\n\n\n $modeles = $em1->getRepository(Offre::class)->findAll();\n\n return $this->render('testtestBundle:Default:listeoffre.html.twig', array('modeles' => $modeles));\n }", "public function index()\n {\n $entity = Auth::user()->entities()->first();\n\n if($entity) {\n $budget_type = $entity->budgetTypes()->first();\n }\n else {\n $entities = [];\n $entity = null;\n $budget_type = null;\n $budget_types = [];\n return view('home', compact('entities', 'entity', 'budget_types', 'budget_type'));\n }\n\n return $this->show($entity, $budget_type);\n }", "public function testFullViewModeMultipleBundles() {\n $assert_session = $this->assertSession();\n $page = $this->getSession()->getPage();\n\n $this->drupalLogin($this->drupalCreateUser([\n 'configure any layout',\n 'administer node display',\n ]));\n\n // Create one bundle with the full view mode enabled.\n $this->createContentType(['type' => 'full_bundle']);\n $this->drupalGet('admin/structure/types/manage/full_bundle/display/default');\n $page->checkField('display_modes_custom[full]');\n $page->pressButton('Save');\n\n // Create another bundle without the full view mode enabled.\n $this->createContentType(['type' => 'default_bundle']);\n $this->drupalGet('admin/structure/types/manage/default_bundle/display/default');\n\n // Enable Layout Builder for defaults and overrides.\n $page->checkField('layout[enabled]');\n $page->pressButton('Save');\n $page->checkField('layout[allow_custom]');\n $page->pressButton('Save');\n $assert_session->checkboxChecked('layout[allow_custom]');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BaseBundle:Feriado')->findAll();\n\n return $this->render('BaseBundle:Feriado:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $filtroActivo=0;\n //$entities = $em->getRepository('CrestaAulasBundle:Aula')->findAll();\n $aula = $em->getRepository('CrestaAulasBundle:Aula');\n $query = $aula ->createQueryBuilder('r')\n ->orderBy('r.piso', 'ASC')\n ->addOrderBy('r.nombre', 'ASC')\n ->getQuery();\n $entities = $query->getResult();\n\n\n if (!$entities){\n $entities=null;\n }\n else {\n $_SESSION['entities']=$entities;\n }\n return $this->render('CrestaAulasBundle:Aula:index.html.twig', array(\n 'entities' => $entities,\n 'filtroActivo' => $filtroActivo,\n ));\n }", "public function showAction() {\n $em = $this->getDoctrine()->getManager();\n\n $menu = $em->getRepository('MyAppEspritBundle:Menu')->findAll();\n $qb2 = $em->createQueryBuilder();\n $qb2->select('b')\n ->from('MyAppEspritBundle:Rubrique', 'b')\n ->orderBy('b.position');\n\n $query2 = $qb2->getQuery();\n $rubrique = $query2->getResult();\n return $this->render('MyAppEspritBundle:Menu:show.html.twig', array(\n 'menu' => $menu, 'rubrique' => $rubrique,\n ));\n }", "public function show(Entity $entity, $budget_type = null)\n {\n $entities = Auth::user()->entities()->get(['id', 'organization_name']);\n\n if($entity !== null){\n $budget_types = $entity->budgetTypes()->with('views')->get();\n } else {\n $budget_types = [];\n }\n\n if($budget_type === null && $entity !== null){\n $budget_type = $entity->budgetTypes()->with('views')->first();\n } else if($entity !== null) {\n $budget_type = $entity->budgetTypes()->with('views')->find($budget_type)->first();\n }\n\n if($entity !== null && Auth::user()->id != $entity->user_id){\n return view('error')->withErrors(['You don\\'t have permissions to access this resource.']);\n }\n\n return view('home', compact('entities', 'entity', 'budget_types', 'budget_type'));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $typeCharges = $em->getRepository('AppBundle:TypeCharge')->findAll();\n\n return $this->render('typecharge/index.html.twig', array(\n 'typeCharges' => $typeCharges,\n ));\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 indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SCRUMSwiftairBundle:Vluchten')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "protected function displayEntities()\n {\n $enities = $this->_proxyObject->getEntities();\n echo \"<br><br><table align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"width: 95%\\\">\";\n echo \"<tr><td align=\\\"center\\\" style=\\\"font-family: Calibri; \"\n . \"background-color: #97CC00\\\">Entities</td></tr>\";\n foreach ($enities as $entity)\n {\n echo \"<tr ><td style=\\\"font-family: Calibri; \"\n . \"background-color: #99CCFF\\\" border=\\\"1\\\">\";\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $entity\n . '&pagingAllowed=true'\n . \"&serviceUri=\"\n . $this->_uri\n . \"\\\">\"\n . $entity . \"</a>\";\n echo \"</td></tr>\";\n }\n echo \"</table><br><br>\";\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('INHack20InventarioBundle:Estado')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => ProductType::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getMappingEntityBundle();", "public function index()\n {\n $productType = $this->productTypeService->productTypeRepository->getPaginated();\n\n return view('admin.product_type.list', compact('productType'));\n }", "function annotation_admin_types() {\n $annotation_entity = entity_get_info('annotation');\n $bundles = $annotation_entity['bundles'];\n //dpm($bundles);\n $field_ui = module_exists('field_ui');\n $header = array(t('Name'), array('data' => t('Operations'), 'colspan' => $field_ui ? '4' : '2'));\n $rows = array();\n\n foreach ($bundles as $key => $bundle) {\n $type = check_plain($key);\n $name = check_plain($bundle['label']);\n $row = array($name . ' <small>' . t('(Machine name: @type)', array('@type' => $type)) . '</small><div class=\"description\">' . filter_xss_admin($bundle['description']) . '</div>');\n // Set the edit column.\n $row[] = array('data' => l(t('edit'), $bundle['admin']['real path']));\n /*\n if ($field_ui) {\n // Manage fields.\n $row[] = array('data' => l(t('manage fields'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/fields'));\n // Display fields.\n $row[] = array('data' => l(t('manage display'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/display'));\n }*/\n // Set the delete column.\n if ($bundle['custom']) {\n $row[] = array('data' => l(t('delete'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/delete'));\n }\n else {\n $row[] = array('data' => '');\n }\n\n $rows[] = $row;\n }\n\n $build['node_table'] = array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n //'#empty' => t('No content types available. <a href=\"@link\">Add content type</a>.', array('@link' => url('admin/structure/types/add'))),\n );\n\n return $build;\n}", "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $actualite = $em->getRepository('MyAppEspritBundle:Actualite')->findAll();\n\n return $this->render('MyAppEspritBundle:Actualite:show.html.twig', array(\n 'actualite' => $actualite,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n// $entities = $em->getRepository('uniRecetasBundle:ingrediente')->findAll();\n $entities = $em->getRepository('uniRecetasBundle:ingrediente')->findBy(\n array(), \n array('nombre' => 'ASC')\n );\n\n return $this->render('uniRecetasBundle:ingrediente:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('JetBredaBundle:Alquiler')->findAll();\n\n return array('entities' => $entities);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $mainGalleries = $em->getRepository('AppBundle:MainGallery')->findAll();\n\n return $this->render('@AppBundle/Resources/views/admin/maingallery/index.html.twig', array(\n 'mainGalleries' => $mainGalleries,\n ));\n }", "public function typeAction($type)\n {\n $em = $this->getDoctrine()->getManager(); \n $entities = $em->getRepository('ApplisunCompteBundle:Compte')->findBy(array('user' => $this->getUser(), 'type' => $type));\n \n return $this->render('ApplisunCompteBundle:Compte:index.html.twig', array(\n 'comptesCourant' => $entities,\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CBWarehouseBundle:Container')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $products = $em->getRepository('CelinaBundle:Product')->findAll();\n\n return $this->render('product/index.html.twig', array(\n 'products' => $products,\n ));\n }", "public function show(Type $type)\n {\n //\n }", "public function show(Type $type)\n {\n //\n }" ]
[ "0.70876724", "0.6725116", "0.63923025", "0.6293192", "0.61694837", "0.612593", "0.6121211", "0.6014721", "0.5982945", "0.5967028", "0.5932462", "0.5929955", "0.5836877", "0.5831712", "0.58022636", "0.5786125", "0.5760216", "0.5755756", "0.5738403", "0.5737353", "0.57142586", "0.5711888", "0.5690681", "0.56754214", "0.5662859", "0.56450605", "0.5635713", "0.5631422", "0.5624631", "0.561789", "0.5592985", "0.55750847", "0.5571368", "0.55680496", "0.5553126", "0.55481964", "0.5536427", "0.55290383", "0.55275303", "0.55235124", "0.55164987", "0.55094856", "0.5508796", "0.5505676", "0.55024433", "0.5501496", "0.54993445", "0.5498547", "0.54680246", "0.5461644", "0.5460802", "0.5453153", "0.5445768", "0.5445159", "0.5444698", "0.5442928", "0.5439837", "0.54348797", "0.5432734", "0.5431039", "0.5423927", "0.5423832", "0.54189944", "0.54182833", "0.54156065", "0.5411361", "0.5406625", "0.54013616", "0.5396403", "0.5396221", "0.53857553", "0.5385691", "0.53833956", "0.5383207", "0.5380138", "0.537912", "0.5377171", "0.5376145", "0.53729427", "0.53726935", "0.5372005", "0.53685224", "0.53679824", "0.5363462", "0.536318", "0.5361389", "0.5359718", "0.53561765", "0.5348078", "0.534756", "0.5347435", "0.5345004", "0.5342118", "0.5340122", "0.5339143", "0.5337041", "0.533687", "0.5334838", "0.5333667", "0.5333667" ]
0.6656393
2
Menu callback: content administration.
function mongo_node_admin_content($form, $form_state, $entity_type) { $settings = mongo_node_settings(); // Send entity type. $form['entity_type'] = array( '#type' => 'value', '#value' => $entity_type, ); $form['filters'] = array( '#type' => 'fieldset', '#title' => t('Show only items where'), ); $filters = mongo_node_filters($entity_type); $applied_filters = isset($_SESSION[$entity_type . '_filters']) ? $_SESSION[$entity_type . '_filters'] : array(); foreach ($filters as $f_type_name => $f_type) { $form['filters'][$f_type_name] = array('#type' => 'select', '#title' => $f_type_name); foreach ($f_type as $f_name => $f_val) { $form['filters'][$f_type_name]['#options'][$f_name] = $f_val['label']; } } $items = array(); $remaining_filters = array(); foreach ($applied_filters as $app_filter) { $items[] = t('where %f_name is %f_val', array('%f_name' => $app_filter['#type'], '%f_val' => $app_filter['#value'])); $conditions = $filters[$app_filter['#type']][$app_filter['#value']]['filters']; foreach ($conditions as $condition) { $remaining_filters[$condition['#type']]['#callback'] = $condition['#callback']; $remaining_filters[$condition['#type']]['#value'][] = $condition['#value']; } } $form['filters']['#description'] = theme('item_list', array('items' => $items)); if (empty($applied_filters)) { $form['filters']['filter'] = array( '#type' => 'submit', '#value' => 'Filter', '#submit' => array('mongo_node_filters_submit'), ); } else { $form['filters']['refine'] = array( '#type' => 'submit', '#value' => 'Refine', '#submit' => array('mongo_node_filters_submit'), ); $form['filters']['undo'] = array( '#type' => 'submit', '#value' => 'Undo', '#submit' => array('mongo_node_filters_submit'), ); $form['filters']['reset'] = array( '#type' => 'submit', '#value' => 'Reset', '#submit' => array('mongo_node_filters_submit'), ); } $form['options'] = array( '#type' => 'fieldset', '#title' => t('Update options'), ); $operations = mongo_node_operations(); foreach ($operations as $op => $op_set) { $options[$op] = $op_set['label']; } $form['options']['operation'] = array( '#type' => 'select', '#options' => $options, ); $form['options']['submit'] = array( '#type' => 'submit', '#value' => t('Update'), '#validate' => array('mongo_node_operation_validate'), '#submit' => array('mongo_node_operation_submit'), ); $query = new EntityFieldQuery(); $query->entityCondition('entity_type', $entity_type) ->propertyOrderBy('created', 'DESC') ->pager(10); // Actually apply filters. foreach ($remaining_filters as $r_name => $r_values) { $query->{$r_values['#callback']}($r_name, $r_values['#value'], 'IN'); } $result = $query->execute(); $languages = language_list(); $destination = drupal_get_destination(); $header = array( 'title' => array('data' => t('Title'), 'field' => 'title'), 'type' => t('Type'), 'author' => t('Author'), 'status' => t('Status'), 'changed' => t('Updated'), 'language' => t('Language'), 'operations' => t('Operations'), ); $options = array(); if (isset($result[$entity_type])) { $ids = array_keys($result[$entity_type]); $entities = entity_load($entity_type, $ids); foreach ($result[$entity_type] as $id => $efq_entity) { $entity = entity_load($entity_type, array($id)); $entity = reset($entity); $entity_uri = entity_uri($entity_type, $entity); $options[$id] = array( 'title' => array( 'data' => array( '#type' => 'link', '#title' => $entity->title, '#href' => $entity_uri['path'], ), ), 'type' => check_plain($settings[$entity_type]['bundles'][$entity->type]['label']), 'author' => theme('username', array('account' => $entity)), 'status' => $entity->status ? t('published') : t('not published'), 'changed' => format_date($entity->changed, 'short'), 'language' => ($entity->language == LANGUAGE_NONE) ? t('Language neutral') : $languages[$entity->language]->name, ); $operations = array(); $operations[] = l(t('edit'), $entity_uri['path'] . '/edit', array('query' => $destination)); $operations[] = l(t('delete'), $entity_uri['path'] . '/delete', array('query' => $destination)); $options[$id]['operations'] = theme('item_list', array('items' => $operations, 'attributes' => array('class' => 'inline'))); } } $form['entities'] = array( '#type' => 'tableselect', '#header' => $header, '#options' => $options, '#empty' => t('No content available'), ); $form['pager'] = array( '#theme' => 'pager', ); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spreadshop_admin_menu_entry($content) \n\t{\n add_menu_page(\"Spreadshop Admin\", \"Spreadshop\", 1, \"Spreadshop_Admin\", \"spreadshop_admin\"); \n\t}", "public function menu()\n\t{\n\t\t$partial = new Inoves_Partial('Content/view/menu/contentMain.phtml');\n\n\t\t$partial->slug = Inoves_URS::$params[0];\n\t\t\n\t\tInoves_View::prepend('#content', $partial);\n\t}", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function manage()\n\t{\n\t\tglobal $template, $errors, $db, $mod_loader, $security;\n\t\t\n\t\t$menuid = ( isset( $_GET[ 'menuid' ] ) ) ? intval( $_GET[ 'menuid' ] ) : 0;\n\t\t\n\t\tif ( $menuid != 0 )\n\t\t{\n\t\t\t$sql = \"SELECT * FROM \" . MORECONTENT_MENU_TABLE . \" WHERE menu_parent='$menuid'\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$submenus = $db->sql_fetchrowset( $result );\n\t\t\t\n\t\t\t$sql = \"SELECT m.*, c.* FROM \" . MORECONTENT_MENU_TABLE . \" m LEFT JOIN \" . MORECONTENT_CONTENT_TABLE . \" c ON c.menu_id=m.menu_id WHERE m.menu_id='$menuid' LIMIT 1\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$menu = $db->sql_fetchrow( $result );\n\t\t}else\n\t\t{\n\t\t\t$sql = \"SELECT * FROM \" . MORECONTENT_MENU_TABLE . \" WHERE menu_level='0'\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$submenus = $db->sql_fetchrowset( $result );\n\t\t\t\n\t\t\t$menu = array( 'menu_id' => 0, 'menu_parent' => 0, 'menu_level' => -1, 'menu_title' => $this->lang[ 'Menu_na' ], 'menu_content' => 0, 'id' => 0, 'content' => '' );\n\t\t}\n\t\t\n\t\t// get the editor\n\t\t$mods = $mod_loader->getmodule( 'editor', MOD_FETCH_NAME, NOT_ESSENTIAL );\n\t\t$mod_loader->port_vars( array( 'name' => 'editor1', 'quickpost' => FALSE, 'def_text' => stripslashes( $menu[ 'content' ] ) ) );\n\t\t$mod_loader->execute_modules( 0, 'show_editor' );\n\t\t$editor = $mod_loader->get_vars( array( 'editor_HTML', 'editor_WYSIWYG' ) );\n\t\t\n\t\t$frame = '<b><a href=\"%s\">%s</a></b> :: ';\n\t\t$parsed_submenus = '';\n\t\tif ( is_array( $submenus ) )\n\t\t{\n\t\t\tforeach ( $submenus as $sub )\n\t\t\t{\n\t\t\t\t$url = $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage&menuid=' . $sub[ 'menu_id' ] );\n\t\t\t\t$parsed_submenus .= sprintf( $frame, $url, $sub[ 'menu_title' ] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$template->assign_block_vars( 'manage', '', array(\n\t\t\t'L_TITLE' => $this->lang[ 'Manage_title' ],\n\t\t\t'L_EXPLAIN' => $this->lang[ 'Manage_explain' ],\n\t\t\t'L_TITLE2' => $this->lang[ 'Menu_title' ],\n\t\t\t'L_TITLE3' => $menu[ 'menu_title' ],\n\t\t\t'L_ADDMENU' => $this->lang[ 'Menu_add' ],\n\t\t\t'L_ADDTITLE' => $this->lang[ 'Menu_addtitle' ],\n\t\t\t'L_DELMENU' => $this->lang[ 'Menu_delete' ],\n\t\t\t'L_CHANGEMENU' => $this->lang[ 'Menu_change' ],\n\t\t\t'L_UP' => $this->lang[ 'Menu_up' ],\n\t\t\t\n\t\t\t'S_EDITOR' => $editor[ 'editor_HTML' ],\n\t\t\t'S_MENUS' => $parsed_submenus,\n\t\t\t'S_FORM_ACTION' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage2&menuid=' . $menu[ 'menu_id' ] . '&menulevel=' . $menu[ 'menu_level' ] ),\n\t\t\t\n\t\t\t'U_UP' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage&menuid=' . $menu[ 'menu_parent' ] ),\n\t\t) );\n\t\t$template->assign_switch( 'manage', TRUE );\n\t}", "protected function menus()\n {\n\n }", "protected function _menu()\n\t{\n\t\tif (ee()->view->disabled('ee_menu'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->view->cp_main_menu = ee()->menu->generate_menu();\n\t}", "function wp_admin_bar_new_content_menu($wp_admin_bar)\n {\n }", "public function modMenu() {}", "public function modMenu() {}", "public function modMenu() {}", "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 add_menus()\n {\n }", "public function onWpAdminMenu() {\n\t}", "static function adminMenuPage()\n {\n // Include the view for this menu page.\n include PROJECTEN_PLUGIN_ADMIN_VIEWS_DIR . '/admin_main.php';\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 }", "function handleAdminMenu ()\n\t{\n\t\tadd_meta_box( 'avhamazonmetabox01', 'AVH Amazon Short Code', array (&$this, 'createMetabox' ), 'post', 'normal' );\n\t\tadd_meta_box( 'avhamazonmetabox01', 'AVH Amazon Short Code', array (&$this, 'createMetabox' ), 'page', 'normal' );\n\t}", "function admin_menu() {\n\t\t// The designation of add_MANAGEMENT_page causes the menu item to be listed under the Tools menu!\n\t\tadd_management_page('Revitalize Orders Output', 'Revitalize Orders', 'edit_posts', basename(__FILE__), array(&$this, 'page_handler'));\n\t}", "function adminMenu() {\r\n\t\t// TODO: This does not only create the menu, it also (only?) *does* sth. with the entries.\r\n\t\t// But those actions must be done before the menu is created (due to the redirects).\r\n\t\t// !Split the function!\r\n\t\t//$page = add_submenu_page('admin.php', __('UWR Ergebnisse'), __('UWR Ergebnisse'), 'edit_posts', 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\t$page = add_submenu_page('uwr1menu', __('UWR Ergebnisse'), __('UWR Ergebnisse'), UWR1RESULTS_CAPABILITIES, 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\tadd_action( 'admin_print_scripts-' . $page, array('Uwr1resultsView', 'adminScripts') );\r\n\t}", "private function init_menu()\n {\n // it's a sample code you can init some other part of your page\n }", "public function initMenu()\n {\n add_menu_page(\n 'Flickr Group Gallery',\n 'Flickr Group Gallery',\n 'administrator',\n 'flickr-group-gallery',\n array($this, 'render'),\n 'dashicons-admin-generic'\n );\n }", "public function onAdminMenu()\n {\n foreach( $this->pages as $slug => $page ) {\n add_submenu_page(\n $page['parent'], L10n::__( $page['title'] ), \n L10n::__( $page['title_menu'] ), $page['capability'], \n $slug, array( $this, 'page' . ucfirst( $slug ) )\n );\n }\n }", "public function admin_menu(&$menu)\n {\n\n\t}", "public static function add_admin_menus()\n\t{\n\t}", "function admin_menu(){\n\t\t//Add the containing menu\n\t\tadd_menu_page(\n\t\t\t'Club Manager',\n\t\t\t'Club Manager',\n\t\t\t'clubMemberZone_access_memberZone',\n\t\t\t'clubMemberZone-memberZone',\n\t\t\tarray (&$this, 'load_view')\n\t\t\t//$this->pPlugin_url.'club-manager.png'\n\t\t\t);\n\n\t\t//add the submenus\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Zone membre',\t\t'Zone membre',\t\t'clubMemberZone_access_memberZone',\t'clubMemberZone-memberZone',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Mes groupes',\t\t'Mes groupes',\t\t'clubMemberZone_access_membership',\t'clubMemberZone-memberships',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Zone publication',\t'Zone publication',\t'clubMemberZone_access_publishZone',\t'clubMemberZone-publishZone',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Groupes',\t\t\t'Groupes',\t\t\t'clubMemberZone_edit_groups',\t\t\t'clubMemberZone-groups',\t\tarray(&$this, 'load_view'));\n\t}", "static function admin_init ()\n {\n add_menu_page(\n __x('People', 'admin menu page title'),\n __x('People', 'admin menu title'),\n 'read',\n 'epfl-people',\n null, // Render callback\n 'dashicons-calendar', // Icon type\n 70 // Position\n );\n }", "function ft_hook_menu() {}", "function mainMenu() \r\n\t\t{\r\n\t\t\tif($this->RequestAction('/external_functions/verifiedAccess/'.$this->Auth->user('id').\"/1/mainMenu\") == true)\r\n\t\t\t{\r\n\t\t\t\t$this->set('title_for_layout', 'Fondos por rendir :: Menu Principal');\r\n\t\t\t\t$this->set('userAdmin', $this->Auth->user('admin'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->Session->setFlash('No tienes permisos para ver esta pagina, consulta con el administrador del sistema.', 'flash_alert');\r\n\t\t\t\t$this->redirect(array('controller' => 'dashboard', 'action' => 'index'));\r\n\t\t\t}\r\n\t\t}", "protected function registerMenu()\n {\n }", "function add_admin_menu() {\n\t\t$this->readme_page = new Launchable_AdminPage();\n\n\t\t$this->menu_id = add_menu_page(\n\t\t\t__( 'Launchable Options', $this->text_domain ), // Page Title\n\t\t\t__( 'Launchable', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t$this->text_domain, // Slug\n\t\t\tarray(&$this->options_page, 'readme_page') );\n\n\t\t$this->options_page = new Launchable_AdminPage();\n\t\tadd_submenu_page(\n\t\t\t$this->text_domain, // Slug\n\t\t\t__( 'Readme', $this->text_domain ), // Page Title\n\t\t\t__( 'Readme', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t'launchable-readme',//$this->text_domain, // Menu Slug\n\t\t\tarray(&$this->readme_page, 'readme_page') );\n\t}", "public function page_setup(){\n add_menu_page( PLUGIN_NAME, PLUGIN_NAME, 'manage_options', sanitize_key(PLUGIN_NAME), array($this, 'admin_page'), $this->icon, 3 );\n }", "function admin_menu() {\n\t\tadd_menu_page(\n\t\t\t__( 'Display Sitewide Notice', 'mfsn' ),\n\t\t\t__( 'Sitewide Notice', 'mfsn' ),\n\t\t\t'edit_pages',\n\t\t\t'mfsn',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'settings_page_callback'\n\t\t\t),\n\t\t\t'dashicons-megaphone',\n\t\t);\n\t}", "function admin_menu() {\n\t\tif ( class_exists( 'Jetpack' ) )\n\t\t\tadd_action( 'jetpack_admin_menu', array( $this, 'load_menu' ) );\n\t\telse\n\t\t\t$this->load_menu();\n\t}", "protected function makeActionMenu() {}", "public function add_menu() {\n\t\tadd_menu_page( 'Custom Table', 'Custom Table', 'manage_options', 'custom-table', [ $this, 'display_page_contents' ] );\n\t}", "public function addMenu(){\n\t\tadd_menu_page(\n\t\t\t$this->plugin->name,\n\t\t\t$this->plugin->name,\n\t\t\t'publish_pages',\n\t\t\t$this->plugin->varName,\n\t\t\tarray($this, 'page'),\n\t\t\t$this->plugin->uri . 'assets/images/icn-menu.png'\n\t\t);\n\t}", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "public function create_menu()\n\t{\n\t\t$obj = $this; // PHP 5.3 doesn't allow $this usage in closures\n\n\t\t// Add main menu page\n\t\tadd_menu_page(\n\t\t\t'Testimonials plugin', // page title\n\t\t\t'Testimonials', // menu title\n\t\t\t'manage_options', // minimal capability to see it\n\t\t\t'jststm_main_menu', // unique menu slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('main_menu'); // render main menu page template\n\t\t\t},\n\t\t\tplugins_url('images/theater.png', dirname(__FILE__)), // dashboard menu icon\n\t\t\t'25.777' // position in the dahsboard menu (just after the Comments)\n\t\t);\n\t\t// Add help page\n\t\tadd_submenu_page(\n\t\t\t'jststm_main_menu', // parent page slug\n\t\t\t'Testimonials plugin help', // page title\n\t\t\t'What is this?', // menu title\n\t\t\t'manage_options', // capability\n\t\t\t'jststm_help', // slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('help_page');\n\t\t\t}\n\t\t);\n\t}", "function scfw_menu(){\n add_menu_page('SCFW - Order List', 'SCFW', 'manage_options', 'scfw-options', 'scfw_orders_list');\n add_submenu_page( 'scfw-options', 'Settings page title', 'Teste Ajax', 'manage_options', 'scfw-op-settings', 'scfw_theme_func_settings');\n add_submenu_page( 'scfw-options', 'FAQ page title', 'FAQ menu label', 'manage_options', 'scfw-op-faq', 'scfw_theme_func_faq');\n}", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "public function admin_menu_open() {\n\n\t\t$this->content = $this->render_template(\n\t\t\t'collections/js-holder.php', [\n\t\t\t\t'all_collections' => [],\n\t\t\t]\n\t\t);\n\t\t$this->header = $this->render_template( 'collections/header.php' );\n\t\techo $this->render_template( 'wrapper.php' );\n\n\t}", "function admin_template($content=\"\",$titlebar=\"\",$titlepage=\"\",$user=\"\",$menu=\"\",$plugin=\"\"){\n \n $titlebar = ($titlebar!=\"\") ? $titlebar : \"\";\n\t$titlepage = ($titlepage!=\"\") ? $titlepage : \"\";\n $plugin\t = ($plugin!=\"\") ? $plugin : \"\";\n $menu\t = ($menu!=\"\") ? $menu : \"\";\n $content\t= ($content!=\"\") ? $content : \"\";\n\n \n$menu = '\n<div class=\"menu-bar header-sm-height\" data-pages-init=\\'horizontal-menu\\' data-hide-extra-li=\"0\">\n <a href=\"#\" class=\"btn-link toggle-sidebar hidden-lg-up pg pg-close\" data-toggle=\"horizontal-menu\">\n </a>\n <ul>\n <li class=\" active\">\n <a href=\"home.php\">Dashboard</a>\n </li>\n <li>\n <a href=\"list_member.php\"><span class=\"title\">Members</span></a>\n </li>\n <li>\n <a href=\"javascript:;\"><span class=\"title\">Products</span>\n <span class=\" arrow\"></span></a>\n <ul class=\"\">\n <li class=\"\">\n <a href=\"list_products.php\">List Products</a>\n </li>\n <li class=\"\">\n <a href=\"list_categories.php\">List Categories</a>\n </li>\n\t\t\t\t<li class=\"\">\n <a href=\"list_sub_categories.php\">Sub Categories</a>\n </li>\n \n \n </ul>\n </li>\n \n <li class=\"\">\n <a href=\"list_transaction.php\">List Transaction</a>\n </li>\n \n </li>\n\t\t\t<li>\n <a href=\"javascript:;\"><span class=\"title\">Pages</span>\n <span class=\" arrow\"></span></a>\n <ul class=\"\">\n <li class=\"\">\n <a href=\"about_us.php\">About Us</a>\n </li>\n <li class=\"\">\n <a href=\"production.php\">Production</a>\n </li>\n\t\t\t\t<li class=\"\">\n <a href=\"buyers_guide.php\">Buyers Guide</a>\n </li>\n\t\t\t\t<li class=\"\">\n <a href=\"custom_guide.php\">Custom Guide</a>\n </li>\n\t\t\t\t<li class=\"\">\n <a href=\"payment_guide.php\">Payment Guide</a>\n </li>\n </ul>\n </li>\n\t\t\t<li>\n <a href=\"list_contact_us.php\">Incoming Contact Us</a>\n </li>\n \n </ul>\n <a href=\"#\" class=\"search-link d-flex justify-content-between align-items-center hidden-lg-up\" data-toggle=\"search\">Tap here to search <i class=\"pg-search float-right\"></i></a>\n </div>\n';\n \n \n$template = '\n<!DOCTYPE html>\n<html>\n <head>\n <meta http-equiv=\"content-type\" content=\"text/html;charset=UTF-8\" />\n <meta charset=\"utf-8\" />\n <title>'.$titlebar.' Seagods Wetsuit</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\" />\n <link rel=\"apple-touch-icon\" href=\"pages/ico/60.png\">\n <link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"pages/ico/76.png\">\n <link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"pages/ico/120.png\">\n <link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"pages/ico/152.png\">\n <link rel=\"icon\" type=\"image/x-icon\" href=\"favicon.ico\" />\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n <meta name=\"apple-touch-fullscreen\" content=\"yes\">\n <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"default\">\n <meta content=\"\" name=\"description\" />\n <meta content=\"\" name=\"author\" />\n <link href=\"assets/plugins/pace/pace-theme-flash.css\" rel=\"stylesheet\" type=\"text/css\" />\n <link href=\"assets/plugins/bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\" />\n <link href=\"assets/plugins/font-awesome/css/font-awesome.css\" rel=\"stylesheet\" type=\"text/css\" />\n <link href=\"assets/plugins/jquery-scrollbar/jquery.scrollbar.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />\n <link href=\"assets/plugins/select2/css/select2.min.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />\n <link href=\"assets/plugins/switchery/css/switchery.min.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />\n <link href=\"pages/css/pages-icons.css\" rel=\"stylesheet\" type=\"text/css\">\n <link class=\"main-stylesheet\" href=\"pages/css/pages.css\" rel=\"stylesheet\" type=\"text/css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"assets/css/paging.css\">\n\t\n\n\t\n\n\t'.$plugin.'\n </head>\n <body class=\"fixed-header horizontal-menu horizontal-app-menu dashboard\">\n <!-- START HEADER -->\n <div class=\"header\">\n <div class=\"container\">\n <div class=\"header-inner header-md-height\">\n <a href=\"#\" class=\"btn-link toggle-sidebar hidden-lg-up pg pg-menu\" data-toggle=\"horizontal-menu\">\n </a>\n <div class=\"\">\n <a href=\"#\" class=\"search-link hidden-md-down\" data-toggle=\"search\"></a>\n </div>\n <div class=\"d-flex align-items-center\">\n <!-- START User Info-->\n <div class=\"pull-left p-r-10 fs-14 font-heading hidden-md-down\">\n <span class=\"semi-bold\">'.$user.'</span>\n </div>\n <div class=\"dropdown pull-right sm-m-r-5\">\n <button class=\"profile-dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <span >\n <img src=\"assets/img/s-logo.png\" alt=\"\" width=\"32px\" >\n </span>\n </button>\n <div class=\"dropdown-menu dropdown-menu-right profile-dropdown\" role=\"menu\">\n <!--<a href=\"#\" class=\"dropdown-item\"><i class=\"pg-settings_small\"></i> Settings</a>\n <a href=\"#\" class=\"dropdown-item\"><i class=\"pg-outdent\"></i> Feedback</a>\n <a href=\"#\" class=\"dropdown-item\"><i class=\"pg-signals\"></i> Help</a>-->\n <a href=\"logout.php\" class=\"clearfix bg-master-lighter dropdown-item\">\n <span class=\"pull-left\">Logout</span>\n <span class=\"pull-right\"><i class=\"pg-power\"></i></span>\n </a>\n </div>\n </div>\n <!-- END User Info\n <a href=\"#\" class=\"header-icon pg pg-alt_menu btn-link m-l-10 sm-no-margin d-inline-block\" data-toggle=\"quickview\" data-toggle-element=\"#quickview\"></a>\n --></div>\n </div>\n <div class=\"header-inner justify-content-start header-lg-height title-bar\">\n <div class=\"brand inline align-self-end\">\n <img src=\"assets/img/s-logo.png\" style=\"width:35px;\" >\n </div>\n <h2 class=\"page-title align-self-end\">\n '.$titlepage.'\n </h2>\n </div>\n '.$menu.'\n </div>\n </div>\n\t\n\t<div class=\"page-container \">\n <!-- START PAGE CONTENT WRAPPER -->\n <div class=\"page-content-wrapper \">\n <!-- START PAGE CONTENT -->\n <div class=\"content sm-gutter\">\n <!-- START JUMBOTRON -->\n <div data-pages=\"parallax\">\n <div class=\" container no-padding container-fixed-lg\">\n <div class=\"inner\">\n <!-- START BREADCRUMB -->\n <ol class=\"breadcrumb\">\n <li class=\"breadcrumb-item\"><a href=\"home.php\">Home</a></li>\n <li class=\"breadcrumb-item active\">'.$titlepage.'</li>\n </ol>\n </div>\n </div>\n </div>\n\t\n '.$content.'\n\t\n\t<br><br>\n\t <div class=\" container container-fixed-lg footer\">\n <div class=\"copyright sm-text-center\">\n <p class=\"small no-margin pull-left sm-pull-reset\">\n <span class=\"hint-text\">SeaGods Administrator Page &copy; 2018 </span>\n <span class=\"font-montserrat\"></span>.\n <span class=\"hint-text\">All rights reserved. </span>\n <span class=\"sm-block\"><a href=\"#\" class=\"m-l-10 m-r-10\">Terms of use</a> <span class=\"muted\">|</span> <a href=\"#\" class=\"m-l-10\">Privacy Policy</a></span>\n </p>\n <p class=\"small no-margin pull-right sm-pull-reset\">\n Supported by <span class=\"hint-text\"> XtremeWeb Solution</span>\n </p>\n <div class=\"clearfix\"></div>\n </div>\n </div>\n <!-- END COPYRIGHT -->\n </div>\n <!-- END PAGE CONTENT WRAPPER -->\n </div>\n\t\n <!-- END PAGE CONTAINER -->\n <!--START QUICKVIEW -->\n <div id=\"quickview\" class=\"quickview-wrapper\" data-pages=\"quickview\">\n \n </div>\n \n \n <!-- END QUICKVIEW-->\n <!-- START OVERLAY -->\n <div class=\"overlay hide\" data-pages=\"search\">\n <!-- BEGIN Overlay Content !-->\n <div class=\"overlay-content has-results m-t-20\">\n <!-- BEGIN Overlay Header !-->\n <div class=\"container-fluid\">\n <!-- BEGIN Overlay Logo !\n <img class=\"overlay-brand\" src=\"assets/img/logo.png\" alt=\"logo\" data-src=\"assets/img/logo.png\" data-src-retina=\"assets/img/logo_2x.png\" width=\"78\" height=\"22\">\n <!-- END Overlay Logo !-->\n <!-- BEGIN Overlay Close !-->\n <a href=\"#\" class=\"close-icon-light overlay-close text-black fs-16\">\n <i class=\"pg-close\"></i>\n </a>\n <!-- END Overlay Close !-->\n </div>\n <!-- END Overlay Header !-->\n <div class=\"container-fluid\">\n <!-- BEGIN Overlay Controls !-->\n <input id=\"overlay-search\" class=\"no-border overlay-search bg-transparent\" placeholder=\"Search...\" autocomplete=\"off\" spellcheck=\"false\">\n <br>\n <div class=\"inline-block\">\n <div class=\"checkbox right\">\n <input id=\"checkboxn\" type=\"checkbox\" value=\"1\" checked=\"checked\">\n <label for=\"checkboxn\"><i class=\"fa fa-search\"></i> Search within page</label>\n </div>\n </div>\n <div class=\"inline-block m-l-10\">\n <p class=\"fs-13\">Press enter to search</p>\n </div>\n <!-- END Overlay Controls !-->\n </div>\n <!-- BEGIN Overlay Search Results, This part is for demo purpose, you can add anything you like !-->\n <div class=\"container-fluid\">\n <span>\n <strong>suggestions :</strong>\n </span>\n <span id=\"overlay-suggestions\"></span>\n <br>\n <div class=\"search-results m-t-40\">\n <p class=\"bold\">Pages Search Results</p>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <!-- BEGIN Search Result Item !-->\n \n <!-- END Search Result Item !-->\n <!-- BEGIN Search Result Item !-->\n \n <!-- END Search Result Item !-->\n <!-- BEGIN Search Result Item !-->\n \n <!-- END Search Result Item !-->\n </div>\n \n </div>\n </div>\n </div>\n <!-- END Overlay Search Results !-->\n </div>\n <!-- END Overlay Content !-->\n </div>\n <!-- END OVERLAY -->\n <!-- BEGIN VENDOR JS -->\n <script src=\"assets/plugins/feather-icons/feather.min.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/pace/pace.min.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/jquery/jquery-1.11.1.min.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/modernizr.custom.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/jquery-ui/jquery-ui.min.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/tether/js/tether.min.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/bootstrap/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/jquery/jquery-easy.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/jquery-unveil/jquery.unveil.min.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/jquery-ios-list/jquery.ioslist.min.js\" type=\"text/javascript\"></script>\n <script src=\"assets/plugins/jquery-actual/jquery.actual.min.js\"></script>\n <script src=\"assets/plugins/jquery-scrollbar/jquery.scrollbar.min.js\"></script>\n <script type=\"text/javascript\" src=\"assets/plugins/select2/js/select2.full.min.js\"></script>\n <script type=\"text/javascript\" src=\"assets/plugins/classie/classie.js\"></script>\n <script src=\"assets/plugins/switchery/js/switchery.min.js\" type=\"text/javascript\"></script>\n <!-- END VENDOR JS -->\n <!-- BEGIN CORE TEMPLATE JS -->\n <script src=\"pages/js/pages.min.js\"></script>\n <!-- END CORE TEMPLATE JS -->\n <!-- BEGIN PAGE LEVEL JS -->\n <script src=\"assets/js/scripts.js\" type=\"text/javascript\"></script>\n\t\n\t \n </body>\n</html>\n\n\n';\n\nreturn $template;\n}", "function wmdm_menu()\n {\n $page_title = __('Material Design Menu', 'wmdm');\n $menu_title = __('Material Design Menu', 'wmdm');\n $capability = 'manage_options';\n $menu_slug = 'wmdm-options';\n $function = array(&$this, 'wmdm_menu_contents');\n add_options_page($page_title, $menu_title, $capability, $menu_slug, $function);\n\n }", "protected function adminMenu()\n {\n \\add_submenu_page(\n 'options-general.php',\n \\esc_html__('WP REST API Cache', 'wp-rest-api-cache'),\n \\esc_html__('REST API Cache', 'wp-rest-api-cache'),\n self::CAPABILITY,\n self::MENU_SLUG,\n function () {\n $this->renderPage();\n }\n );\n }", "public function addMenuItem() {\n add_menu_page(__('Visual Chat', 'WP_Visual_Chat'), 'Visual Chat', 'visual_chat', 'vcht-console', array($this, 'viewChatBackend'), 'dashicons-format-chat');\n }", "function admin_menu() {\n\t\t// Set Admin Access Level\n\t\tif(!$this->options['access_level']): \n\t\t\t$access = 'edit_dashboard';\n\t\telse: \n\t\t\t$access = $this->options['access_level'];\n\t\tendif;\n\t\t\n\t\t// Create Menu Items \n\t\tadd_options_page('Escalate Network', 'Escalate Network', $access, 'escalate-network-options', array($this, 'settings_page'));\n\t}", "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 tekserve_celebros_menu() {\n\n\tadd_menu_page( 'Celebros', 'Celebros', 'edit_published_pages', 'tekserve_celebros_menu', 'tekserve_celebros_related_settings_menu_page', 'dashicons-search', '8.217' );\n\tadd_submenu_page( 'tekserve_celebros_menu', 'Test Celebros Functions', 'Test Celebros Functions', 'edit_published_pages', 'tekserve_celebros_test_panel_menu', 'tekserve_celebros_test_panel_menu_page');\n\n}", "public function add_menu()\n {\n add_options_page(__('Master Link Plugin Settings'), __('Master Link Plugin'), 'manage_options', 'master_link_plugin', array(\n &$this,\n 'plugin_settings_page'\n ));\n }", "public function add_menu() {\n\t\tadd_submenu_page(\n\t\t\t'edit.php?post_type=blicki',\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t'edit_others_posts',\n\t\t\t'blicki-show-diff',\n\t\t\tarray( $this, 'admin_suggestion_viewer' )\n\t\t);\n\t\tremove_submenu_page( 'edit.php?post_type=blicki', 'blicki-show-diff' );\n\t}", "public function admin_menu()\n\t\t{\n\t\t\tif (current_user_can('manage_options')):\n\t\t\t\t$this->hook_suffix = add_options_page(__('Mailgun', 'mailgun'), __('Mailgun', 'mailgun'),\n\t\t\t\t\t'manage_options', 'mailgun', array(&$this, 'options_page'));\n\t\t\t\tadd_options_page(__('Mailgun Lists', 'mailgun'), __('Mailgun Lists', 'mailgun'), 'manage_options',\n\t\t\t\t\t'mailgun-lists', array(&$this, 'lists_page'));\n\t\t\t\tadd_action(\"admin_print_scripts-{$this->hook_suffix}\", array(&$this, 'admin_js'));\n\t\t\t\tadd_filter(\"plugin_action_links_{$this->plugin_basename}\", array(&$this, 'filter_plugin_actions'));\n\t\t\t\tadd_action(\"admin_footer-{$this->hook_suffix}\", array(&$this, 'admin_footer_js'));\n\t\t\tendif;\n\t\t}", "function templ_add_admin_menu_()\r\n{\r\n\tdo_action('templ_add_admin_menu_');\r\n}", "public function menu( )\n {\n\n if( $this->view->isType( View::SUBWINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n }\n else if( $this->view->isType( View::MAINTAB ) )\n {\n $view = $this->view->newMaintab('WebfrapMainMenu', 'Default');\n $view->setLabel('Explorer');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTitle('Webfrap Main Menu');\n\n $view->setTemplate( 'webfrap/menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setData( DaoFoldermenu::get('webfrap/root',true) );\n\n }", "protected function getModuleMenu() {}", "protected function getModuleMenu() {}", "protected function getModuleMenu() {}", "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 }", "private function left_menu()\n\t\t{\n\t\t\t $page_name = functions::get_page_name();\n\t\t\techo '\n\t\t\t\t<ul>\n\t\t\t\t\t';\n\t\t\t\t\t\n\t\t\t\t\t$content_module = array('manage_content.php', 'register_content.php', 'manage_page_content.php', 'register_page_content.php','manage_content_option.php', 'register_content_option.php'\n\t\t\t\t\t,'manage_category.php', 'register_category.php');\n\t\t\t\t\tif(in_array($page_name, $content_module))\n\t\t\t\t\t{\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t<img src=\"images/icon-content.png\" alt=\"Manage CMS\" title=\"Manage CMS\" width=\"24\" height=\"24\" />\n\t\t\t\t\t\t<a href=\"manage_content.php\">CMS</a>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a href=\"manage_page_content.php\">Page Content</a></li>\n\t\t\t\t\t\t<li><a href=\"manage_category.php\">Category</a></li>\n\t\t\t\t\t\t\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</li>';\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<li><img src=\"images/icon-content.png\" alt=\"Manage CMS\" title=\"Manage CMS\" width=\"24\" height=\"24\" /><a href=\"manage_content.php\" >CMS</a></li>';\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\techo '<li><img src=\"images/icon-member.png\" alt=\"Manage Member\" title=\"Manage Member\" width=\"24\" height=\"24\" /><a href=\"manage_member.php\" >Member</a></li>\n\t\t\t\t\t<!--<li><img src=\"images/icon-property.png\" alt=\"Manage Property Type\" title=\"Manage Property Type\" width=\"24\" height=\"24\" /><a href=\"manage_property_type.php\" >Property Type</a></li>-->\n\t\t\t\t\t\n\t\t\t\t\t<li><img src=\"images/icon-property.png\" alt=\"Manage Hotel\" title=\"Manage Hotel\" width=\"24\" height=\"24\" /><a href=\"manage_hotel.php\" >Hotel</a></li>\n\t\t\t\t\t<li><img src=\"images/icon-restaurant.jpg\" alt=\"Manage Restaurant\" title=\"Manage Restaurant\" width=\"24\" height=\"24\" /><a href=\"manage_restaurant.php\" >Restaurant</a></li>\n\t\t\t\t\t<li><img src=\"images/icon-venue.png\" alt=\"Manage Venue\" title=\"Manage Venue\" width=\"24\" height=\"24\" /><a href=\"manage_venue.php\" >Venue</a></li>\n\t\t\t\t\t';\n\t\t\t\t\t\t\n\t\techo '</ul>';\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t}", "public function makeMenu() {}", "public function index()\n {\n $data = $this->user->getUserData();\n $data['title'] = 'Menu Management';\n $data['menu'] = $this->menu->getMenuByUser($data['role_id']);\n $data['submenu'] = $this->menu->getAllSubmenu();\n $this->template->load('menu/menuManagement', $data, 'menu/JS_menu');\n }", "public static function load() {\n\n\t\tadd_menu_page( self::TA_PAGE_TITLE, self::TA_TITLE, 'administrator', self::TA_SLUG, array(__CLASS__, 'makeAdmin'), self::asset('img/') . self::TA_ICON_URL, self::TA_POSITION );\n\t}", "public function menu_html()\n {\n echo '<h1>'.get_admin_page_title().'</h1>';\n echo '<p>Bienvenue sur la page d\\'accueil de la lettre d\\'informations.</p>';\n }", "function sr_frontpage_admin_menu() {\n add_menu_page(\n 'Home Sections',\n 'Home Sections',\n 'manage_options',\n 'front-sections',\n '',\n 'dashicons-admin-home',\n 40\n );\n}", "public function admin_page_init () {\n add_menu_page( __( 'Users List', 'ct-admin-list' ), __( 'Users list', 'ct-admin-list' ), 'list_users', 'ct-users-list', [ $this, 'list_page_content' ] );\n }", "public static function menu()\n\t\t\t{\n\t\t\t\t// Create menu tab\n\t\t\t\tadd_options_page(HE_PLUGINOPTIONS_NICK.' Plugin Options', HE_PLUGINOPTIONS_NICK, 'manage_options', HE_PLUGINOPTIONS_ID.'_options', array('HiddenEmpirePluginOptions', 'options_page'));\n\t\t\t}", "public function add_menu() {\n\n add_options_page('Форум phpbb3 :: администрирование', 'Форум phpbb3', 'manage_options', 'phpbb3', array($this, 'plugin_options'));\n }", "function admin_menu(){\t\tif(!empty($this->settings_manager->sections)){\n\t\t\tadd_theme_page(__('Theme Settings'), __('Theme Settings'), 'edit_theme_options', $this->options->option_name, array($this, 'theme_settings'));\n\t\t}\n\t}", "function network_admin_menu()\n {\n }", "function tt_add_menu_items(){\n\tadd_menu_page('Example Plugin List Table', 'List Table Example', 'activate_plugins', 'tt_list_test', 'tt_render_list_page');\n}", "private function menu()\n {\n $data['links'] = ['create', 'read', 'update', 'delete'];\n\n return $this->view->render($data, 'home/menu');\n }", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function admin_menu() {\n\t\tadd_menu_page( 'Sharaz setting', 'sharaz setting', 'manage_options', 'ss_page', array(\n\t\t\t$this,\n\t\t\t'plugin_page'\n\t\t), 'edit', 75 );\n\t}", "function menu() {\n\t\tadd_theme_page( __( 'Color Style Options', 'color-style-options' ), __( 'Color Style Options', 'color-style-options' ), 'edit_posts', __CLASS__, array( &$this, 'page' ) );\n\t}", "public function Menu() {\n $user_role = get_option('oxi_addons_user_permission');\n $role_object = get_role($user_role);\n $first_key = '';\n if (isset($role_object->capabilities) && is_array($role_object->capabilities)) {\n reset($role_object->capabilities);\n $first_key = key($role_object->capabilities);\n } else {\n $first_key = 'manage_options';\n }\n add_submenu_page('oxi-addons', 'Elementor Addons', 'Elementor Addons', $first_key, 'oxi-el-addons', [$this, 'oxi_addons_elementors']);\n }", "public function beforeContent() {\n\t\t$menu = $this->document->getElementById($this->id);\n\t\tif($menu) {\n\t\t\t$this->document->addCss('public/css/simplemenu.css');\n\t\t\t$menu->removeAttribute('style');\n\n\t\t\t$menuList = $this->document->createElement('ul');\n\n\t\t\t$rq = new RequestHandler(DEFAULTPAGE, $this->basepath);\n\n\t\t\tforeach($this->menuItems as $lbl => $page) {\n\t\t\t\t$li = $this->document->createElement('li');\n\t\t\t\t$a = $this->document->createElement('a', $lbl);\n\t\t\t\t$a->setAttribute('href', $this->basepath.'/'.$page);\n\t\t\t\tif($rq->getPage() == $page)\n\t\t\t\t\t$li->setAttribute('class', 'selected');\n\t\t\t\t$li->appendChild($a);\n\t\t\t\t$menuList->appendChild($li);\n\t\t\t}\n\t\t\t$menu->appendChild($menuList);\n\t\t}\n\t}", "function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}", "private function loadMenu()\n\t{\n\t\tglobal $txt, $context, $modSettings, $settings;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Menu.subs.php');\n\n\t\t// Define the menu structure - see subs/Menu.subs.php for details!\n\t\t$admin_areas = array(\n\t\t\t'forum' => array(\n\t\t\t\t'title' => $txt['admin_main'],\n\t\t\t\t'permission' => array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'index' => array(\n\t\t\t\t\t\t'label' => $txt['admin_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_home',\n\t\t\t\t\t\t'class' => 'i-home i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'credits' => array(\n\t\t\t\t\t\t'label' => $txt['support_credits_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_credits',\n\t\t\t\t\t\t'class' => 'i-support i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'maillist' => array(\n\t\t\t\t\t\t'label' => $txt['mail_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMaillist',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-envelope-blank i-admin',\n\t\t\t\t\t\t'permission' => array('approve_emails', 'admin_forum'),\n\t\t\t\t\t\t'enabled' => featureEnabled('pe'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'emaillist' => array($txt['mm_emailerror'], 'approve_emails'),\n\t\t\t\t\t\t\t'emailfilters' => array($txt['mm_emailfilters'], 'admin_forum'),\n\t\t\t\t\t\t\t'emailparser' => array($txt['mm_emailparsers'], 'admin_forum'),\n\t\t\t\t\t\t\t'emailtemplates' => array($txt['mm_emailtemplates'], 'approve_emails'),\n\t\t\t\t\t\t\t'emailsettings' => array($txt['mm_emailsettings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'news' => array(\n\t\t\t\t\t\t'label' => $txt['news_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageNews',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-post-text i-admin',\n\t\t\t\t\t\t'permission' => array('edit_news', 'send_mail', 'admin_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'editnews' => array($txt['admin_edit_news'], 'edit_news'),\n\t\t\t\t\t\t\t'mailingmembers' => array($txt['admin_newsletters'], 'send_mail'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'packages' => array(\n\t\t\t\t\t\t'label' => $txt['package'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\Packages\\\\Packages',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-package i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['browse_packages']),\n\t\t\t\t\t\t\t'installed' => array($txt['installed_packages']),\n\t\t\t\t\t\t\t'options' => array($txt['package_settings']),\n\t\t\t\t\t\t\t'servers' => array($txt['download_packages']),\n\t\t\t\t\t\t\t'upload' => array($txt['upload_packages']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'packageservers' => array(\n\t\t\t\t\t\t'label' => $txt['package_servers'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\Packages\\\\PackageServers',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-package i-admin',\n\t\t\t\t\t\t'hidden' => true,\n\t\t\t\t\t),\n\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_search',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-search i-admin',\n\t\t\t\t\t\t'select' => 'index'\n\t\t\t\t\t),\n\t\t\t\t\t'adminlogoff' => array(\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_endsession',\n\t\t\t\t\t\t'label' => $txt['admin_logoff'],\n\t\t\t\t\t\t'enabled' => empty($modSettings['securityDisable']),\n\t\t\t\t\t\t'class' => 'i-sign-out i-admin',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'config' => array(\n\t\t\t\t'title' => $txt['admin_config'],\n\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'corefeatures' => array(\n\t\t\t\t\t\t'label' => $txt['core_settings_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\CoreFeatures',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-cog i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'featuresettings' => array(\n\t\t\t\t\t\t'label' => $txt['modSettings_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageFeatures',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-switch-on i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'basic' => array($txt['mods_cat_features']),\n\t\t\t\t\t\t\t'layout' => array($txt['mods_cat_layout']),\n\t\t\t\t\t\t\t'pmsettings' => array($txt['personal_messages']),\n\t\t\t\t\t\t\t'karma' => array($txt['karma'], 'enabled' => featureEnabled('k')),\n\t\t\t\t\t\t\t'likes' => array($txt['likes'], 'enabled' => featureEnabled('l')),\n\t\t\t\t\t\t\t'mention' => array($txt['mention']),\n\t\t\t\t\t\t\t'sig' => array($txt['signature_settings_short']),\n\t\t\t\t\t\t\t'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => featureEnabled('cp')),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'serversettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_server_settings'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageServer',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-menu i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['general_settings']),\n\t\t\t\t\t\t\t'database' => array($txt['database_paths_settings']),\n\t\t\t\t\t\t\t'cookie' => array($txt['cookies_sessions_settings']),\n\t\t\t\t\t\t\t'cache' => array($txt['caching_settings']),\n\t\t\t\t\t\t\t'loads' => array($txt['loadavg_settings']),\n\t\t\t\t\t\t\t'phpinfo' => array($txt['phpinfo_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'securitysettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_security_moderation'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSecurity',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-lock i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['mods_cat_security_general']),\n\t\t\t\t\t\t\t'spam' => array($txt['antispam_title']),\n\t\t\t\t\t\t\t'moderation' => array($txt['moderation_settings_short'], 'enabled' => !empty($modSettings['warning_enable'])),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'theme' => array(\n\t\t\t\t\t\t'label' => $txt['theme_admin'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageThemes',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'custom_url' => getUrl('admin', ['action' => 'admin', 'area' => 'theme']),\n\t\t\t\t\t\t'class' => 'i-modify i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'admin' => array($txt['themeadmin_admin_title']),\n\t\t\t\t\t\t\t'list' => array($txt['themeadmin_list_title']),\n\t\t\t\t\t\t\t'reset' => array($txt['themeadmin_reset_title']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'current_theme' => array(\n\t\t\t\t\t\t'label' => $txt['theme_current_settings'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageThemes',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'custom_url' => getUrl('admin', ['action' => 'admin', 'area' => 'theme', 'sa' => 'list', 'th' => $settings['theme_id']]),\n\t\t\t\t\t\t'class' => 'i-paint i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'languages' => array(\n\t\t\t\t\t\t'label' => $txt['language_configuration'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageLanguages',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-language i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'edit' => array($txt['language_edit']),\n\t\t\t\t\t\t\t// 'add' => array($txt['language_add']),\n\t\t\t\t\t\t\t'settings' => array($txt['language_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'addonsettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_modifications'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\AddonSettings',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-puzzle i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['mods_cat_modifications_misc']),\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'layout' => array(\n\t\t\t\t'title' => $txt['layout_controls'],\n\t\t\t\t'permission' => array('manage_boards', 'admin_forum', 'manage_smileys', 'manage_attachments', 'moderate_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'manageboards' => array(\n\t\t\t\t\t\t'label' => $txt['admin_boards'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageBoards',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-directory i-admin',\n\t\t\t\t\t\t'permission' => array('manage_boards'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'main' => array($txt['boardsEdit']),\n\t\t\t\t\t\t\t'newcat' => array($txt['mboards_new_cat']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'postsettings' => array(\n\t\t\t\t\t\t'label' => $txt['manageposts'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePosts',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-post-text i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'posts' => array($txt['manageposts_settings']),\n\t\t\t\t\t\t\t'censor' => array($txt['admin_censored_words']),\n\t\t\t\t\t\t\t'topics' => array($txt['manageposts_topic_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'editor' => array(\n\t\t\t\t\t\t'label' => $txt['editor_manage'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageEditor',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-modify i-admin',\n\t\t\t\t\t\t'permission' => array('manage_bbc'),\n\t\t\t\t\t),\n\t\t\t\t\t'smileys' => array(\n\t\t\t\t\t\t'label' => $txt['smileys_manage'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSmileys',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-smiley i-admin',\n\t\t\t\t\t\t'permission' => array('manage_smileys'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'editsets' => array($txt['smiley_sets']),\n\t\t\t\t\t\t\t'addsmiley' => array($txt['smileys_add'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'editsmileys' => array($txt['smileys_edit'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'setorder' => array($txt['smileys_set_order'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'editicons' => array($txt['icons_edit_message_icons'], 'enabled' => !empty($modSettings['messageIcons_enable'])),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'manageattachments' => array(\n\t\t\t\t\t\t'label' => $txt['attachments_avatars'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageAttachments',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-paperclip i-admin',\n\t\t\t\t\t\t'permission' => array('manage_attachments'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['attachment_manager_browse']),\n\t\t\t\t\t\t\t'attachments' => array($txt['attachment_manager_settings']),\n\t\t\t\t\t\t\t'avatars' => array($txt['attachment_manager_avatar_settings']),\n\t\t\t\t\t\t\t'attachpaths' => array($txt['attach_directories']),\n\t\t\t\t\t\t\t'maintenance' => array($txt['attachment_manager_maintenance']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'managesearch' => array(\n\t\t\t\t\t\t'label' => $txt['manage_search'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSearch',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-search i-admin',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'weights' => array($txt['search_weights']),\n\t\t\t\t\t\t\t'method' => array($txt['search_method']),\n\t\t\t\t\t\t\t'managesphinx' => array($txt['search_sphinx']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\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'members' => array(\n\t\t\t\t'title' => $txt['admin_manage_members'],\n\t\t\t\t'permission' => array('moderate_forum', 'manage_membergroups', 'manage_bans', 'manage_permissions', 'admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'viewmembers' => array(\n\t\t\t\t\t\t'label' => $txt['admin_users'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMembers',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-user i-admin',\n\t\t\t\t\t\t'permission' => array('moderate_forum'),\n\t\t\t\t\t),\n\t\t\t\t\t'membergroups' => array(\n\t\t\t\t\t\t'label' => $txt['admin_groups'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMembergroups',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-users',\n\t\t\t\t\t\t'permission' => array('manage_membergroups'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'index' => array($txt['membergroups_edit_groups'], 'manage_membergroups'),\n\t\t\t\t\t\t\t'add' => array($txt['membergroups_new_group'], 'manage_membergroups'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permissions' => array(\n\t\t\t\t\t\t'label' => $txt['edit_permissions'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePermissions',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-lock i-admin',\n\t\t\t\t\t\t'permission' => array('manage_permissions'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'index' => array($txt['permissions_groups'], 'manage_permissions'),\n\t\t\t\t\t\t\t'board' => array($txt['permissions_boards'], 'manage_permissions'),\n\t\t\t\t\t\t\t'profiles' => array($txt['permissions_profiles'], 'manage_permissions'),\n\t\t\t\t\t\t\t'postmod' => array($txt['permissions_post_moderation'], 'manage_permissions', 'enabled' => $modSettings['postmod_active']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'ban' => array(\n\t\t\t\t\t\t'label' => $txt['ban_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageBans',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-thumbdown i-admin',\n\t\t\t\t\t\t'permission' => 'manage_bans',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'list' => array($txt['ban_edit_list']),\n\t\t\t\t\t\t\t'add' => array($txt['ban_add_new']),\n\t\t\t\t\t\t\t'browse' => array($txt['ban_trigger_browse']),\n\t\t\t\t\t\t\t'log' => array($txt['ban_log']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'regcenter' => array(\n\t\t\t\t\t\t'label' => $txt['registration_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageRegistration',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-user-plus i-admin',\n\t\t\t\t\t\t'permission' => array('admin_forum', 'moderate_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'register' => array($txt['admin_browse_register_new'], 'moderate_forum'),\n\t\t\t\t\t\t\t'agreement' => array($txt['registration_agreement'], 'admin_forum'),\n\t\t\t\t\t\t\t'privacypol' => array($txt['privacy_policy'], 'admin_forum'),\n\t\t\t\t\t\t\t'reservednames' => array($txt['admin_reserved_set'], 'admin_forum'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'sengines' => array(\n\t\t\t\t\t\t'label' => $txt['search_engines'],\n\t\t\t\t\t\t'enabled' => featureEnabled('sp'),\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSearchEngines',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-website i-admin',\n\t\t\t\t\t\t'permission' => 'admin_forum',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'stats' => array($txt['spider_stats']),\n\t\t\t\t\t\t\t'logs' => array($txt['spider_logs']),\n\t\t\t\t\t\t\t'spiders' => array($txt['spiders']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'paidsubscribe' => array(\n\t\t\t\t\t\t'label' => $txt['paid_subscriptions'],\n\t\t\t\t\t\t'enabled' => featureEnabled('ps'),\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePaid',\n\t\t\t\t\t\t'class' => 'i-credit i-admin',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => 'admin_forum',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'view' => array($txt['paid_subs_view']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\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'maintenance' => array(\n\t\t\t\t'title' => $txt['admin_maintenance'],\n\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'maintain' => array(\n\t\t\t\t\t\t'label' => $txt['maintain_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Maintenance',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-cog i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'routine' => array($txt['maintain_sub_routine'], 'admin_forum'),\n\t\t\t\t\t\t\t'database' => array($txt['maintain_sub_database'], 'admin_forum'),\n\t\t\t\t\t\t\t'members' => array($txt['maintain_sub_members'], 'admin_forum'),\n\t\t\t\t\t\t\t'topics' => array($txt['maintain_sub_topics'], 'admin_forum'),\n\t\t\t\t\t\t\t'hooks' => array($txt['maintain_sub_hooks_list'], 'admin_forum'),\n\t\t\t\t\t\t\t'attachments' => array($txt['maintain_sub_attachments'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'logs' => array(\n\t\t\t\t\t\t'label' => $txt['logs'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\AdminLog',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-comments i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'errorlog' => array($txt['errlog'], 'admin_forum', 'enabled' => !empty($modSettings['enableErrorLogging']), 'url' => getUrl('admin', ['action' => 'admin', 'area' => 'logs', 'sa' => 'errorlog', 'desc'])),\n\t\t\t\t\t\t\t'adminlog' => array($txt['admin_log'], 'admin_forum', 'enabled' => featureEnabled('ml')),\n\t\t\t\t\t\t\t'modlog' => array($txt['moderation_log'], 'admin_forum', 'enabled' => featureEnabled('ml')),\n\t\t\t\t\t\t\t'banlog' => array($txt['ban_log'], 'manage_bans'),\n\t\t\t\t\t\t\t'spiderlog' => array($txt['spider_logs'], 'admin_forum', 'enabled' => featureEnabled('sp')),\n\t\t\t\t\t\t\t'tasklog' => array($txt['scheduled_log'], 'admin_forum'),\n\t\t\t\t\t\t\t'pruning' => array($txt['pruning_title'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'scheduledtasks' => array(\n\t\t\t\t\t\t'label' => $txt['maintain_tasks'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageScheduledTasks',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-calendar i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'tasks' => array($txt['maintain_tasks'], 'admin_forum'),\n\t\t\t\t\t\t\t'tasklog' => array($txt['scheduled_log'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'mailqueue' => array(\n\t\t\t\t\t\t'label' => $txt['mailqueue_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMail',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-envelope-blank i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['mailqueue_browse'], 'admin_forum'),\n\t\t\t\t\t\t\t'settings' => array($txt['mailqueue_settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'reports' => array(\n\t\t\t\t\t\t'enabled' => featureEnabled('rg'),\n\t\t\t\t\t\t'label' => $txt['generate_reports'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Reports',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-pie-chart i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'repairboards' => array(\n\t\t\t\t\t\t'label' => $txt['admin_repair'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\RepairBoards',\n\t\t\t\t\t\t'function' => 'action_repairboards',\n\t\t\t\t\t\t'select' => 'maintain',\n\t\t\t\t\t\t'hidden' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t$this->_events->trigger('addMenu', array('admin_areas' => &$admin_areas));\n\n\t\t// Any files to include for administration?\n\t\tcall_integration_include_hook('integrate_admin_include');\n\n\t\t$menuOptions = array(\n\t\t\t'hook' => 'admin',\n\t\t);\n\n\t\t// Actually create the menu!\n\t\t$menu = new Menu();\n\t\t$menu->addMenuData($admin_areas);\n\t\t$menu->addOptions($menuOptions);\n\t\t$admin_include_data = $menu->prepareMenu();\n\t\t$menu->setContext();\n\t\tunset($admin_areas);\n\n\t\t// Make a note of the Unique ID for this menu.\n\t\t$context['admin_menu_id'] = $context['max_menu_id'];\n\t\t$context['admin_menu_name'] = 'menu_data_' . $context['admin_menu_id'];\n\n\t\t// Where in the admin are we?\n\t\t$context['admin_area'] = $admin_include_data['current_area'];\n\n\t\treturn $admin_include_data;\n\t}", "public function add_menu_items () {\n\t\t\n\t\t//add menu in wordpress dashboard\n\n\t\tadd_submenu_page(\n\t\t\t'ltple-settings',\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t'edit_pages',\n\t\t\t'edit.php?post_type=affiliate-commission'\n\t\t);\n\t\t\n\t\tadd_users_page( \n\t\t\t'All Affiliates', \n\t\t\t'All Affiliates', \n\t\t\t'edit_pages',\n\t\t\t'users.php?' . $this->parent->_base .'view=affiliates'\n\t\t);\n\t}", "public function menu() {\n\n\t\t// Check if this plugin is enabled\n\t\tif (!$this->plugin->enabled('CLEAR_CACHES') ||\n\t\t\t(!$this->plugin->enabled('CLEAR_CACHES_OPCACHE') && !$this->plugin->enabled('CLEAR_CACHES_NGINX') && !$this->plugin->enabled('CLEAR_CACHES_OBJECT'))) {\n\n\t\t\t// No modules enabled\n\t\t\treturn;\n\t\t}\n\n\t\t// Create submenu page\n\t\t$hook = add_submenu_page('options-general.php', 'Clear Caches', 'Clear Caches', 'manage_options', 'clear-caches', [$this, 'page']);\n\n\t\t// Add a load handler\n\t\tif (false !== $hook) {\n\t\t\tadd_action('load-'.$hook, [$this, 'onLoad']);\n\t\t}\n\t}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "private function adminContentArea(): void {\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n\n // Load Main Content Modal\n include \"admin\" . DS . \"modal.php\";\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n }", "public function add_menus() {\n add_action( 'admin_menu', array( 'Hotmembers3\\Admin_Pages_Creator', 'create_pages') );\n }", "public function action_index()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\t// Make sure the administrator has a valid session...\n\t\tvalidateSession();\n\n\t\t// Load the language and templates....\n\t\tTxt::load('Admin');\n\t\ttheme()->getTemplates()->load('Admin');\n\t\tloadCSSFile('admin.css');\n\t\tloadJavascriptFile('admin.js', array(), 'admin_script');\n\n\t\t// The Admin functions require Jquery UI ....\n\t\t$modSettings['jquery_include_ui'] = true;\n\n\t\t// No indexing evil stuff.\n\t\t$context['robot_no_index'] = true;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\n\t\t// Actually create the menu!\n\t\t$admin_include_data = $this->loadMenu();\n\t\t$this->buildLinktree($admin_include_data);\n\n\t\tcallMenu($admin_include_data);\n\t}", "function altlab_student_data_motherblog_menu(){\n\tadd_menu_page(\n\t\t'Mother Blog Student Data', \n\t\t'Student Data', \n\t\t'manage_options', \n\t\t'altlab_student_data_motherblog', \n\t\t'altlab_student_data_motherblog_options_page', \n\t\t'dashicons-chart-bar'\n\t\t); \n\n}", "public static function menu_init()\n\t\t{ \n\t\t\t\n\t\t\t# create db upon install \n register_activation_hook(__FILE__, array(__CLASS__, 'Install'));\n register_deactivation_hook(__FILE__, array(__CLASS__, 'Uninstall'));\n\t\t\t\n\t\t\t# physical data inputs\n\t\t\tadd_action( 'init',array( __CLASS__, 'menucategory_post_custom') );\n\t\t\tadd_action( 'admin_init', array( __CLASS__, 'menucat_metabox') );\n\t\t\tadd_action( 'admin_menu', array( __CLASS__,'menu_subpage_categories') );\n\t\t\tadd_action( 'admin_menu', array( __CLASS__,'menu_subpage_settings') );\n\t\t\t\n\t\t\t# manage custom posts\n\t\t\tadd_filter( 'manage_edit-'.self::$post_type.'_columns', array( __CLASS__,'edit_post_columns') ) ;\n\t\t\tadd_action( 'manage_'.self::$post_type.'_posts_custom_column',array( __CLASS__, 'manage_post_columns'), 10, 2 );\n\t\t\tadd_action( 'restrict_manage_posts', array( __CLASS__,'admin_posts_filter_restrict_manage_posts') );\n\t\t\tadd_filter( 'parse_query', array( __CLASS__,'parse_posts_filter') );\n\t\t\t\n # datasaving\n\t\t\tadd_action( 'save_post',array( __CLASS__, 'save_custom_post') );\n\t\t\t\n\t\t\t# ajax Requests\n\t\t\tadd_action('wp_ajax_add_category', array( __CLASS__,'func_ajax_add_category'));\n\t\t\tadd_action('wp_ajax_load_menu', array( __CLASS__,'func_ajax_load_menu'));\n\t\t\tadd_action('wp_ajax_delete_category', array( __CLASS__,'func_ajax_del_menu'));\n\t\t\tadd_action('wp_ajax_save_category', array( __CLASS__,'func_ajax_sav_menu'));\n\t\t\tadd_action('wp_ajax_save_setting', array( __CLASS__,'func_ajax_sav_setting'));\n\t\t\t\n\t\t\t# displaying output\n\t\t\tadd_filter('the_content',array( __CLASS__,'display_in_content'));\n\t\t\tadd_action( 'template_redirect',array( __CLASS__, 'display_in_redirect'));\n\t\t\t\n \n\t\t}", "public function createBackendMenu(){\n\t\tadd_menu_page( 'Stackoverflow', 'Stackoverflow', 'manage_options', 'stackoverflowStats', array($this, 'settingsPage') );\n\t}", "public function add_menu() {\n\t\t\tadd_menu_page(\n\t\t\t\t'Amazon Affiliate | Products',\n\t\t\t\t'Products',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\tarray( &$this, 'load_product_page' ),\n\t\t\t\tplugins_url( 'amz-affiliate/img/icon.png' ),\n\t\t\t\t50\n\t\t\t);\n\t\t\tadd_submenu_page(\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\t'Amazon Affiliate | Tables',\n\t\t\t\t'Tables',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/table.php',\n\t\t\t\tarray( &$this, 'load_table_page' )\n\t\t\t);\n\t\t}", "function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\t\"function\" => Array (\n\t\t\t\t\"2\" => \"Update typo3conf\",\n\t\t\t\t\"1\" => \"Check cluster health\",\n\t\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}", "public function admin_menu() {\n\t\t// Load abstract page class.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-page.php';\n\t\t// Load page classes.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-general.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-accounts.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-messages.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-categories.php';\n\n\t\t// Init menu classes.\n\t\tnew SocialFlow_Admin_Settings_General();\n\t\tnew SocialFlow_Admin_Settings_Accounts();\n\t\t// new SocialFlow_Admin_Settings_Categories.\n\t\t// new SocialFlow_Admin_Settings_Messages.\n\t}", "public function event()\n {\n return 'admin_menu';\n }", "function emb_menu_setup() {\n\t /*\n\t * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected\n\t * @param string $menu_title The text to be used for the menu\n\t * @param string $capability The capability required for this menu to be displayed to the user.\n\t * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)\n\t * @param callback $function The function to be called to output the content for this page.\n\t\t*/\n\t\tadd_menu_page ('Mobile Builder' , 'Easy Mobile Builder' , 'manage_options' , 'emb' , 'emb_admin_setting_gui' );\n\t}", "function at_try_menu()\n{\n add_menu_page('signup_list', //page title\n 'Sign Up List', //menu title\n 'manage_options', //capabilities\n 'Signup_List', //menu slug\n Signup_list //function\n );\n}" ]
[ "0.75816447", "0.751679", "0.7451049", "0.7451049", "0.7451049", "0.7363373", "0.7205725", "0.71880084", "0.71625173", "0.71401995", "0.71400595", "0.7139254", "0.7130263", "0.70999354", "0.7099162", "0.70788985", "0.70547605", "0.70543283", "0.702008", "0.69823855", "0.6970047", "0.69449955", "0.6940164", "0.6931287", "0.6912798", "0.6899622", "0.6858635", "0.68570185", "0.6856503", "0.68502545", "0.684339", "0.6829582", "0.68262774", "0.6826006", "0.68244296", "0.68068814", "0.6803965", "0.6788866", "0.6779404", "0.67779076", "0.6775603", "0.6752717", "0.67502546", "0.67402697", "0.6733918", "0.6732165", "0.67270994", "0.67207485", "0.67186403", "0.6703372", "0.6698271", "0.66846365", "0.6681405", "0.6680825", "0.6673946", "0.6673946", "0.66734546", "0.6664952", "0.6660912", "0.6653855", "0.6646441", "0.6646283", "0.6643249", "0.6641088", "0.66399294", "0.6639923", "0.66391456", "0.66385967", "0.66354805", "0.6634772", "0.66341716", "0.6625792", "0.6625652", "0.6625652", "0.6625323", "0.6621972", "0.66170835", "0.66069263", "0.66063565", "0.6604564", "0.66038656", "0.66021115", "0.65996355", "0.6589511", "0.6589511", "0.6589511", "0.6589511", "0.6589511", "0.6589511", "0.65840757", "0.6583478", "0.65754783", "0.65641606", "0.6559823", "0.6558464", "0.6557845", "0.65573305", "0.6556423", "0.6556143", "0.6554065", "0.65537596" ]
0.0
-1
Content administration page operations validate function.
function mongo_node_operation_validate($form, &$form_state) { if (!is_array($form_state['values']['entities']) || !count(array_filter($form_state['values']['entities']))) { form_set_error('', t('No items selected.')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_page()\n {\n }", "function validate_page()\n {\n }", "function admin_validate_edit_cms_ajax(){\r\r\n\t\t\r\r\n\t\t$this->layout = \"\";\r\r\n\t\t$this->autoRender = false;\r\r\n\t\tif($this->RequestHandler->isAjax()){\r\r\n\t\t\t$errors_msg = null;\r\r\n\t\t\tApp::import('Model','CmsPage');\r\r\n\t\t\t$this->CmsPage = new CmsPage();\r\r\n\t\t\t\r\r\n\t\t\t$data = $this->data;\r\r\n\t\t\tif(isset($data['CmsPage']['id'])){\r\r\n\t\t\t\t$data['CmsPage']['id'] = DECRYPT_DATA($data['CmsPage']['id']);\r\r\n\t\t\t}\r\r\n\t\t\t$errors = $this->CmsPage->valid_edit_cms($data);\r\r\n\t\t\tif ( is_array ( $this->data ) ){\r\r\n\t\t\t\tforeach ($this->data['CmsPage'] as $key => $value ){\r\r\n\t\t\t\t\tif( array_key_exists ( $key, $errors) ){\r\r\n\t\t\t\t\t\tforeach ( $errors [ $key ] as $k => $v ){\r\r\n\t\t\t\t\t\t\t$errors_msg .= \"error|$key|$v\";\r\r\n\t\t\t\t\t\t}\t\r\r\n\t\t\t\t\t}else {\r\r\n\t\t\t\t\t\t$errors_msg .= \"ok|$key\\n\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\techo $errors_msg;\r\r\n\t\t\tdie();\r\r\n\t\t}\t\r\r\n\t}", "function ValidateAdmin()\n\t{\n\t}", "protected function _validate() {\n\t}", "private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text('e11'));\n $this->datavalidator->addValidation('article_prologue','req',$this->text('e12'));\n $this->datavalidator->addValidation('article_prologue','maxlen=3000',$this->text('e13'));\n $this->datavalidator->addValidation('keywords','regexp=/^[^,\\s]{3,}(,? ?[^,\\s]{3,})*$/',$this->text('e32'));\n $this->datavalidator->addValidation('keywords','maxlen=500',$this->text('e33'));\n if($this->data['layout'] != 'g' && $this->data['layout'] != 'h'){ //if article is gallery dont need content\n $this->datavalidator->addValidation('article_content','req',$this->text('e14'));\n }\n $this->datavalidator->addValidation('id_menucategory','req',$this->text('e15'));\n $this->datavalidator->addValidation('id_menucategory','numeric',$this->text('e16'));\n $this->datavalidator->addValidation('layout','req',$this->text('e17'));\n $this->datavalidator->addValidation('layout','maxlen=1',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e19'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e20'));\n }\n //if user cannot publish articles check publish values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '1') {\n $this->datavalidator->addValidation('published','req',$this->text('e21'));\n $this->datavalidator->addValidation('published','numeric',$this->text('e22'));\n $this->datavalidator->addValidation('publish_date','req',$this->text('e23'));\n }\n $this->datavalidator->addValidation('topped','req',$this->text('e24'));\n $this->datavalidator->addValidation('topped','numeric',$this->text('e25'));\n $this->datavalidator->addValidation('homepage','req',$this->text('e30'));\n $this->datavalidator->addValidation('homepage','numeric',$this->text('e31'));\n $this->datavalidator->addValidation('showsocials','req',$this->text('e26'));\n $this->datavalidator->addValidation('showsocials','numeric',$this->text('e27'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }", "function validate_blog_form()\n {\n }", "function validatePage($action=false) {\n\n\t\tglobal $access_item;\n\t\tglobal $access_default;\n\t\t$point = $_SERVER[\"SCRIPT_FILENAME\"];\n\t\treturn $this->validatePoint($point, $action, $access_item, isset($access_default) ? $access_default : false);\n\t}", "function siteInformation_validate() {\n return true;\n}", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "function valid_action() {\n # of pages that are about that page (i.e. not admin\n # or recent changes)\n global $ACT;\n if($ACT == 'show') { return true; }\n if($ACT == 'edit') { return true; }\n if($ACT == 'revisions') { return true; }\n return false;\n }", "public function validateAction() {\n parent::validateAction();\n }", "public function validation();", "function validate()\n\t{\n\t}", "public function afterValidate() {\n if($_POST['content_en'] == '') $this->addError('content_en', Yii::t('base', 'You should fill post content for at least English language'));\n return parent::afterValidate();\n }", "public abstract function validation();", "function validate() {\n // @todo Remove module_load_include() call when moving to Drupal core.\n module_load_include('inc', 'fapitng', '/includes/fapitng.validate');\n foreach ($this->validate_callbacks as $callback => $info) {\n if (!call_user_func_array($callback, array_merge(array($this->value), $info['arguments']))) {\n $this->errors[] = $info['message'];\n }\n }\n if ($this->errors) {\n $this->request['invalid_elements'][$this->id] = $this;\n }\n $this->validateInputElements($this->children);\n\n if (!empty($this->request['invalid_elements'])) {\n $this->request['rebuild'] = TRUE;\n return FALSE;\n }\n return TRUE;\n }", "function validate() {\n $errors = parent::validate();\n // Verify that search fields are set up.\n $style_options = $this->get_option('style_options');\n if (!isset($style_options['search_fields'])) {\n $errors[] = t('Display \"@display\" needs a selected search fields to work properly. See the settings for the Entity Reference list format.', array('@display' => $this->display->display_title));\n }\n else {\n // Verify that the search fields used actually exist.\n //$fields = array_keys($this->view->get_items('field'));\n $fields = array_keys($this->handlers['field']);\n foreach ($style_options['search_fields'] as $field_alias => $enabled) {\n if ($enabled && !in_array($field_alias, $fields)) {\n $errors[] = t('Display \"@display\" uses field %field as search field, but the field is no longer present. See the settings for the Entity Reference list format.', array('@display' => $this->display->display_title, '%field' => $field_alias));\n }\n }\n }\n return $errors;\n }", "public static function validate() {}", "public function validationAction() {\n\n $video_type = $this->_getParam('type');\n $code = $this->_getParam('code');\n $ajax = $this->_getParam('ajax', false);\n $valid = false;\n\n //CHECK WHICH API SHOULD BE USED\n if ($video_type == \"youtube\") {\n $valid = $this->checkYouTube($code);\n }\n\n if ($video_type == \"vimeo\") {\n $valid = $this->checkVimeo($code);\n }\n\n $this->view->code = $code;\n $this->view->ajax = $ajax;\n $this->view->valid = $valid;\n }", "abstract public function validate();", "abstract public function validate();", "protected function validate()\n {\n }", "public function validate()\n\t{\n\t\t$errors = array();\n\t\t\n\t\t//make sure user is logged in\n\t\tif (empty($this->userid)) \n\t\t{\n\t\t\t$errors['userid'] = true;\n\t\t}\n\t\t\n\t\t//verify all info is provided\n\t\tif (isset($this->title))\n\t\t\t$this->title = strip_tags($this->title);\n\t\telse\n\t\t\t$errors['title'] = true;\n\t\t\t\n\t\tif (isset($this->description))\n\t\t\t$this->description = strip_tags($this->description);\n\t\telse\n\t\t\t$errors['description'] = true;\n\t\t\t\n\t\tif (isset($this->content))\n\t\t\t$this->content = strip_tags($this->content, \"<br><b>\");\n\t\telse\n\t\t\t$errors['content'] = true;\n\t\t\t\n\t\tif (isset($this->location))\n\t\t\t$this->location = strip_tags($this->location);\n\t\telse\n\t\t\t$errors['location'] = true;\n\t\t\n\t\tif (!isset($this->category))\n\t\t\t$errors['category'] = true;\n\t\t\t\n\t\tif (!isset($this->enddatetime))\n\t\t\t$errors['enddatetime'] = true;\n\t\t\n\t\t\n\t\t//If we made it here, all is valid\n\t\tif (count($errors) > 0)\n\t\t\treturn $errors;\n\t\telse\n\t\t\treturn NULL;\n\t}", "private function validate() {\n\t\tif (!$this->user->hasPermission('modify', 'module/bottomlistcategory')) {\n\t\t\t$this->error['warning'] = $this->language->get('error_permission');\n\t\t}\n\t\t\n\t\tif (!$this->error) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\t\n\t}", "function validate() {\n\t\timport('lib.pkp.classes.navigationMenu.NavigationMenuItem');\n\t\tif ($this->getData('menuItemType') && $this->getData('menuItemType') != \"\") {\n\t\t\tif ($this->getData('menuItemType') == NMI_TYPE_CUSTOM) {\n\t\t\t\tif (!preg_match('/^[a-zA-Z0-9\\/._-]+$/', $this->getData('path'))) {\n\t\t\t\t\t$this->addError('path', __('manager.navigationMenus.form.pathRegEx'));\n\t\t\t\t}\n\n\t\t\t\t$navigationMenuItemDao = DAORegistry::getDAO('NavigationMenuItemDAO');\n\n\t\t\t\t$navigationMenuItem = $navigationMenuItemDao->getByPath($this->_contextId, $this->getData('path'));\n\t\t\t\tif (isset($navigationMenuItem) && $navigationMenuItem->getId() != $this->navigationMenuItemId) {\n\t\t\t\t\t$this->addError('path', __('manager.navigationMenus.form.duplicatePath'));\n\t\t\t\t}\n\t\t\t} elseif ($this->getData('menuItemType') == NMI_TYPE_REMOTE_URL) {\n\t\t\t\tif(!filter_var($this->getData('url'), FILTER_VALIDATE_URL)) {\n\t\t\t\t\t$this->addError('url', __('manager.navigationMenus.form.customUrlError'));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addError('path', __('manager.navigationMenus.form.typeMissing'));\n\t\t}\n\n\t\treturn parent::validate();\n\t}", "public function validate()\n {\n require APP . 'view/_templates/header.php';\n require APP . 'view/login/validate.php';\n require APP . 'view/_templates/footer.php';\n }", "private function validate()\r\n {\r\n if (!$this->user->hasPermission('modify', 'module/promotion')) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n\r\n if (!$this->error) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public function validate(PageBlock $block): void;", "protected function mainValidation()\n {\n $this->validator->add(\n 'title',\n new StringLength([\n 'max' => 50\n ])\n );\n\n $this->validator->add(\n 'description',\n new StringLength([\n 'max' => 200,\n 'allowEmpty' => true\n ])\n );\n }", "function pluginValidaciones(){\n \t$url_acutal = basename($_SERVER['PHP_SELF']);\n \tif (\n strcasecmp($url_acutal, \"nuevo_usuario.php\") == 0 ||\n strcasecmp($url_acutal, \"establecimientos.php\") == 0 ||\n strcasecmp($url_acutal, \"modificacion_usuario.php\") == 0 ||\n strcasecmp($url_acutal, \"login.php\") == 0\n ){\n\n \t\techo \"\\n\";\n \t\techo \"<!-- plugin de validacion de datos --> \\n\";\n \t\techo '<script type=\"text/javascript\" src=\"assets/js/plugins/validador/jquery.validate.js\"></script>' . \"\\n\";\n \t\techo '<script type=\"text/javascript\" src=\"assets/js/plugins/validador/additional-methods.js\"></script>' . \"\\n\";\n \t\techo '<link href=\"assets/css/validate.css\" rel=\"stylesheet\" type=\"text/css\">' . \"\\n\";\n\n\n \t}\n }", "public function validateMakeBlog(){\n\n }", "public function validate()\n\t{\n\t\t$this->vars['errors'] = $this->validation_errors();\n\t}", "public function validate()\n\t{\n\t\t$valid = parent::validate();\n\n\t\tif ($valid)\n\t\t{\n\t\t\t$results = \\Event::trigger('content.onContentBeforeSave', array(\n\t\t\t\t'com_answers.question.question',\n\t\t\t\t&$this,\n\t\t\t\t$this->isNew()\n\t\t\t));\n\n\t\t\tforeach ($results as $result)\n\t\t\t{\n\t\t\t\tif ($result === false)\n\t\t\t\t{\n\t\t\t\t\t$this->addError(Lang::txt('Content failed validation.'));\n\t\t\t\t\t$valid = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $valid;\n\t}", "function adminCommentsWaiteValidate()\n {\n $userLogged = Auth::check(['administrateur']);\n\n $commentManager = new CommentManager();\n $listCommentsWaiteValidate = $commentManager->listCommentsWaiteValidate();\n\n require'../app/Views/backViews/comment/backAdminCommentsWaiteValidateView.php';\n }", "public function validate()\n {\n // TODO implement this\n }", "public function validate() {\n }", "public function validate() {\n }", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "function ValidateEdit()\n\t{\n\t}", "protected function validate() {\n if($this->title == ''){\n $this->errors[] = \"Title is required\";\n }\n\n if($this->content == ''){\n $this->errors[] = \"Content is required\";\n }\n\n if($this->published_at != '') {\n $date_time = date_create_from_format('Y-m-d H:i:s', $this->published_at);\n\n if($date_time === false){\n $this->errors[] = \"Invalid date and time.\";\n }else{\n $date_errors = date_get_last_errors();\n\n if($date_errors['warning_count'] > 0){\n $this->errors[] = \"Invalid date and time.\";\n }\n }\n }\n return empty($this->errors);\n }", "public function validate() {\r\n // Name - this is required\r\n if ($this->description == '') {\r\n $this->errors[] = 'Description is required';\r\n } \r\n \r\n // Category number - must be a number\r\n if (!is_numeric($this->category)) {\r\n $this->category = 0;\r\n } \r\n \r\n // Item number - must be a number\r\n if (!is_numeric($this->item)) {\r\n $this->item = 0;\r\n } \r\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "function inscription_jesa_manage_validate($form, &$form_state) {\n \n}", "public function beforeSave()\r\n {\r\n $pageToShow = $this->getData('fieldset_data')['which_page_to_show'];\r\n $inPage = $this->getData('fieldset_data')['include_pages'];\r\n $inPageUrl = $this->getData('fieldset_data')['include_pages_with_url'];\r\n\r\n if ($pageToShow == 1 && !($inPage || $inPageUrl)) {\r\n throw new Exception(__('Please enter the value into one of the following boxes: Include page(s) and Include Page(s) with URL contains.'));\r\n }\r\n\r\n return parent::beforeSave();\r\n }", "private function validate() {\n\t\n\t\t\treturn false;\n\t}", "protected function validation(){\t\t\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"mandoc\",\n\t\t\t\"domain\" => array('S', 'N'),\n\t\t\t\"required\" => true\n\t\t));\n\t\tif($this->validationHasFailed()==true){\n\t\t\treturn false;\n\t\t}\n\t}", "public function Validate() {return true;}", "public function validateCmsHierarchyAction()\n {\n $websiteId = null;\n $storeId = null;\n if ($this->_request->getPost('website')) {\n if ($website = $this->_storeManager->getWebsite($this->_request->getPost('website'))) {\n $websiteId = $website->getId();\n }\n }\n if ($this->_request->getPost('store')) {\n if ($store = $this->_storeManager->getStore($this->_request->getPost('store'))) {\n $storeId = $store->getId();\n $websiteId = $store->getWebsite()->getWebsiteId();\n }\n }\n if (!$this->_role->getIsAll()) {\n if (!$this->_role->hasExclusiveAccess([$websiteId]) || null === $websiteId) {\n if (!$this->_role->hasExclusiveStoreAccess([$storeId]) || null === $storeId) {\n $this->_forward();\n return false;\n }\n }\n }\n return true;\n }", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "function validate() {\n\t\t// If it's not required, there's nothing to validate\n\t\tif ( !$this->get_attribute( 'required' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$field_id = $this->get_attribute( 'id' );\n\t\t$field_type = $this->get_attribute( 'type' );\n\t\t$field_label = $this->get_attribute( 'label' );\n\n\t\t$field_value = isset( $_POST[$field_id] ) ? stripslashes( $_POST[$field_id] ) : '';\n\n\t\tswitch ( $field_type ) {\n\t\tcase 'email' :\n\t\t\t// Make sure the email address is valid\n\t\t\tif ( !is_email( $field_value ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s requires a valid email address', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t// Just check for presence of any text\n\t\t\tif ( !strlen( trim( $field_value ) ) ) {\n\t\t\t\t$this->add_error( sprintf( __( '%s is required', 'jetpack' ), $field_label ) );\n\t\t\t}\n\t\t}\n\t}", "function redmine_sso_admin_settings_validate($form, $form_state) {\n /**\n * TODO\n * check url\n * check if group exsists\n * check if project exsists\n */\n}", "function validate(){\n }", "function check_content(){\r\n if(!(strlen($_POST['first_name']) > 0 && strlen($_POST['last_name']) > 0 && strlen($_POST['email']) > 0 && strlen($_POST['headline']) > 0 && strlen($_POST['summary']) > 0)){\r\n\treturn 'All fields are required';\r\n }\r\n for($i = 1; $i<10 ; $i++ ){\r\n\tif(isset($_POST['year'.$i])){\r\n\t error_log('$_POST[year'.$i.']: '.$_POST['year'.$i]);\r\n\t if(strlen($_POST['year'.$i]) == 0){\r\n\t\treturn 'All fields are required';\r\n\t }\r\n\t if(!is_numeric($_POST['year'.$i])){\r\n\t\treturn 'Year must be a number';\r\n\t }\r\n\t}\r\n\tif(isset($_POST['desc'.$i]) && strlen($_POST['desc'.$i]) == 0){\r\n\t error_log('$_POST[desc'.$i.']: '.$_POST['desc'.$i]);\r\n\t return 'All fields are required';\r\n\t}\r\n\tif(isset($_POST['edu_year'.$i])){\r\n\t error_log('$_POST[edu_year'.$i.']: '.$_POST['edu_year'.$i]);\r\n\t if(strlen($_POST['edu_year'.$i]) == 0){\r\n\t\treturn 'All fields are required';\r\n\t }\r\n\t if(!is_numeric($_POST['edu_year'.$i])){\r\n\t\treturn 'Year must be a number';\r\n\t }\r\n\t}\r\n\tif(isset($_POST['edu_school'.$i]) && strlen($_POST['edu_school'.$i]) == 0){\r\n\t error_log('$_POST[edu_school'.$i.']: '.$_POST['edu_school'.$i]);\r\n\t return 'All fields are required';\r\n\t}\r\n }\r\n if(strpos($_POST['email'], '@') === false){\r\n\treturn 'Email address must contain @';\r\n }\r\n return true;\r\n}", "function validate() {\n\treturn true;\n}", "public function verifyAccess (\n\t)\t\t\t\t\t// RETURNS <void> redirects if user is not allowed editing access.\n\t\n\t// $contentForm->verifyAccess();\n\t{\n\t\tif(Me::$clearance >= 6) { return; }\n\t\t\n\t\t// Check if guest users are allowed to post on this site\n\t\tif(!$this->guestPosts) { $this->redirect(); }\n\t\t\n\t\t// Make sure you own this content\n\t\tif($this->contentData['uni_id'] != Me::$id)\n\t\t{\n\t\t\tAlert::error(\"Invalid User\", \"You do not have permissions to edit this content.\", 7);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\n\t\t\n\t\t// If this entry is set to official, guest submitters cannot change it any longer\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL)\n\t\t{\n\t\t\tAlert::saveInfo(\"Editing Disabled\", \"This entry is now an official live post, and cannot be edited.\");\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\n\t}", "function validate_blog_signup()\n {\n }", "function formValidation($page)\n{\n $errors = [];\n if (!empty($_POST)){\n\n $formIsValid = true;\n\n $name = strip_tags($_POST['name']);\n $email = strip_tags($_POST['email']);\n $content = strip_tags($_POST['content']);\n\n if(array_key_exists('subject', $_POST))\n {\n $subject = strip_tags($_POST['subject']);\n }\n if(array_key_exists('enterprise', $_POST))\n {\n $enterprise= strip_tags($_POST['enterprise']);\n }\n if(array_key_exists('location', $_POST))\n {\n $location= strip_tags($_POST['location']);\n }\n\n //Ici on a un tableau qui stocke nos éventuels messages d'erreur\n $errors = [];\n\n\n\t\t//On vérifie la validité de l'auteur\n if(empty($name)){\n //Si on note qu'on a trouvé une erreur, la commande suivante s'exécute \n $formIsValid = false;\n $errors[] = \"Veuillez renseigner votre nom !\";\n }\n //mb_strlen calcule la longueur d'une chaîne\n elseif(mb_strlen($name) <= 1){\n $formIsValid = false;\n $errors[] = \"Un nom sans plusieurs lettres n'est pas un nom !\";\n }\n elseif(mb_strlen($name) > 30){\n $formIsValid = false;\n $errors[] = \"Votre nom est trop long.\";\n }\n\n //validation de l'email\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n $formIsValid = false;\n $errors[] = \"Votre email n'est pas valide !\";\n }\n\n //validation du commentaire\n if(empty($content)){\n $formIsValid = false;\n $errors[] = \"Veuillez remplir le champ pour votre commentaire.\";\n }\n\n elseif(mb_strlen($content) <= 1 || mb_strlen($content) > 500){\n $formIsValid = false;\n $errors[] = \"Votre commentaire doit faire entre 1 et 500 caractères.\";\n }\n\n if(array_key_exists('subject', $_POST) && empty($subject)){\n $formIsValid = false;\n $errors[] = \"Veuillez renseigner le sujet de votre message.\";\n }\n\n elseif(array_key_exists('subject', $_POST) && mb_strlen($subject) > 60){\n $formIsValid = false;\n $errors[] = \"Le nom du sujet est trop long.\";\n }\n\n if(array_key_exists('enterprise', $_POST) && empty($enterprise)){\n $formIsValid = false;\n $errors[] = \"Veuillez renseigner le nom de l'entreprise.\";\n }\n\n elseif(array_key_exists('enterprise', $_POST) && mb_strlen($enterprise) > 100){\n $formIsValid = false;\n $errors[] = \"Le nom de l'entreprise est trop long.\";\n }\n\n if(array_key_exists('location', $_POST) && empty($location)){\n $formIsValid = false;\n $errors[] = \"Veuillez renseigner l'adresse de l'entreprise.\";\n }\n\n elseif(array_key_exists('location', $_POST) && mb_strlen($location) > 150){\n $formIsValid = false;\n $errors[] = \"L'adresse est trop longue\";\n }\n\n //si le formulaire est toujours valide... \n if ($formIsValid == true){\n\n if($page == 'message'){\n //La requête ajoute le nouveau message dans la base de données\n $sql = \"INSERT INTO message\n (name, email, subject, content)\n VALUES\n (:name, :email, :subject, :content)\";\n\n $pdo = DBConnection::getPdo();\n\n $stmt = $pdo->prepare($sql);\n $stmt->execute([\n \":subject\" => $subject,\n \":email\" => $email,\n \":name\" => $name,\n \":content\" => $content\n ]);\n }\n elseif($page == 'recommandation'){\n //La requête ajoute le nouveau message dans la base de données\n $sql = \"INSERT INTO recommandations\n (name, email, enterprise, location, content, date_created)\n VALUES\n (:name, :email, :enterprise, :location, :content, NOW())\";\n\n $pdo = DBConnection::getPdo();\n\n $stmt = $pdo->prepare($sql);\n $stmt->execute([\n \":enterprise\" => $enterprise,\n \":email\" => $email,\n \":name\" => $name,\n \":content\" => $content,\n \":location\" => $location\n ]);\n }\n }\n }\n \n return $errors;\n}", "public function isValid()\n\t{\n\t\tif (empty($this->titre)) $this->titre = \"TITRE A REMPLACER\";\n\t\telse $this->titre = trim (preg_replace('/\\s+/', ' ', $this->titre) ); // Suppression des espaces\n\t\tif (!empty($this->contenu)) $this->contenu = trim (preg_replace('/\\s+/', ' ', $this->contenu) ); // Suppression des espaces\n\t\tif (empty($this->statut)) $this->statut = 0;\n\t\tif (empty($this->id_type)) $this->id_type = 1;\n\t\tif (empty($this->id_membre)) $this->id_membre = 0;\n\t}", "public function validate(){\n\t return true;\n\t}", "public function validateRules();", "public function validation()\n\t{\n\t\t//\n\t\t\t\n\t\t\t\treturn true;\n\t\t\t\n\t}", "public function checkContentSectionForm()\n {\n $data = ipRequest()->getPost();\n $form = $this->contentSectionManagementForm();\n $data = $form->filterValues($data); //filter post data to remove any non form specific items\n $errors = $form->validate($data); //http://www.impresspages.org/docs/form-validation-in-php-3\n if ($errors) {\n //error\n $data = array(\n 'status' => 'error',\n 'errors' => $errors\n );\n } else {\n //success\n unset($data['aa']);\n unset($data['securityToken']);\n unset($data['antispam']);\n $data = array(\n 'status' => 'ok',\n 'data' => $data\n\n );\n }\n return new \\Ip\\Response\\Json($data);\n }", "abstract protected function validate(): bool;", "public function validate()\n {\n $this->validateNode($this->tree);\n }", "function validate()\n {\n if (!$this->ParentId && !$this->Content)\n throw Exception(\"ParentId and Content cannot both be NULL\");\n }", "protected function preValidate() {}", "public function validate() { return TRUE; }", "public function validate_fields() {\n \n\t\t//...\n \n }", "function validate_user_form()\n {\n }", "function get_search_validate()\r\n {\r\n return $this->get_search_form()->validate();\r\n }", "public function validate()\r\n\t\t{\r\n\t\t\t\r\n\t\t\treturn true;\r\n\r\n\t\t}", "public function check() {\n if (trim($this->title) == '') {\n $this->setError(JText::_('COM_COMMAND_ERR_TABLES_TITLE'));\n return false;\n }\n\n // check for valid URL\n if (JFilterInput::checkAttribute(array('href', $this->url))) {\n $this->setError(JText::_('COM_COMMAND_ERR_TABLES_PROVIDE_URL'));\n return false;\n }\n \n $this->url = CommandModelSite::conformUrl($this->url);\n\n // verify URL\n if (CommandModelSite::verifySite($this->url)) {\n $this->setError(JText::_('COM_COMMAND_ERR_TABLES_VERIFY_URL'));\n return false;\n }\n\n return true;\n }", "function validate() {\n\t return parent::validate();\n\t}", "function validate() {\n\t return parent::validate();\n\t}", "public function validate()\n {\n if ($this->amount <= 0) {\n $this->errors[0] = 'Wpisz poprawną kwotę!';\n }\n \n if (!isset($this->payment)) {\n $this->errors[1] = 'Wybierz sposób płatności!';\n }\n \n if (!isset($this->category)) {\n $this->errors[2] = 'Wybierz kategorię!';\n }\n }", "abstract public function runValidation();", "public static function validateAction()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 50),\n\t\t);\n\t}", "function culturefeed_pages_page_request_validated_admin($page, $request_type) {\n\n // Send request to become a validated admin.\n $success = FALSE;\n try {\n\n $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();\n $cf_pages->addValidatedadmin($page->getId());\n $message = t('Your request to become a validated administrator of this page is sent');\n $success = TRUE;\n \n }\n catch (Exception $e) {\n watchdog_exception('culturefeed_pages', $e);\n $message = t('The request could not be sent.');\n }\n\n if ($request_type == 'ajax') {\n $commands = array();\n\n if ($success) {\n $commands[] = ajax_command_html('#request_validated_adminship_link_' . $page->getId() . '_wrapper', $message);\n }\n\n ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));\n }\n else {\n drupal_set_message($message, $success ? 'status': 'error');\n drupal_goto();\n }\n\n}", "function validate( $data = FALSE )\r\n {\r\n // validate $data['status']. \"publish\" or \"drawt\" are accepted\r\n if( isset($data['status']) && ( ($data['status'] < 0) || ($data['status'] > 2) ) )\r\n {\r\n trigger_error(\"Wrong 'status' variable: \".$data['status'].\" Only 2 = 'publish' or 1 = 'drawt' are accepted.\\nFILE: \".__FILE__.\"\\nLINE: \".__LINE__, E_USER_ERROR);\r\n return SF_NO_VALID_ACTION;\r\n } \r\n // check if node exists\r\n if(isset($data['node']) && !file_exists(SF_BASE_DIR . 'data/navigation/'.$data['node']))\r\n {\r\n $this->B->$data['error'] = 'Node '.$data['node'].' dosent exists';\r\n return SF_NO_VALID_ACTION; \r\n } \r\n \r\n return SF_IS_VALID_ACTION;\r\n }", "function thumbwhere_contentcollection_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_actor\n $value = $form['fk_actor']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_actor'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_actor']);\n if (twCanDebug()) debug('fk_actor = ' . $value);\n // Validate fk fk_actor\n if (empty($value)) {\n form_set_error('fk_actor', t('Validation error, \\'fk_actor\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_actor\\' in is mandatory');\n }\n\n // Validate normaltitle\n $value = $form['title']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_contentcollection = $form_state['thumbwhere_contentcollection'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_contentcollection', $thumbwhere_contentcollection, $form, $form_state);\n \n \n \n}", "public function canManagePages();", "public function validated();", "function homeValidate() {\n\t\t$validate1 = array(\n\t\t\n\t\t/*'stock'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Stock Number')\n\t\t\t\t\t),\n\t\t\t\t\n\t\t 'name'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter name')\n\t\t\t\t\t),*/\n\t\t 'email'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Email')\n\t\t\t\t\t),\n\n\t\t 'contact'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Contact Number')\n\t\t\t\t\t),\n\t\t/*'make'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Make')\n\t\t\t\t\t),\n\t\t'model'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Model')\n\t\t\t\t\t),\n\t\t'part'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter part')\n\t\t\t\t\t),\n\t\t'year'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please choose year')\n\t\t\t\t\t),\n\t\t'country' => array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please choose country')\n\t\t\t\t\t),\n\t\t'comment' => array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter comment')\n\t\t\t\t\t),*/\n\t\t\n\t\t\t);\n\t\t$this->validate=$validate1;\n\t\treturn $this->validates();\n\t}", "private function validateInfoPage($page, $type) {\n $this->admin = $this->model('Admin');\n $this->admin->username = $_SESSION['adminUsername'];\n\n if($type) {\n // Variable used in various model methods\n $_POST['page_id'] = $page['id'];\n }\n\n $_POST['page_title'] = substr(strip_tags($_POST['page_title']), 0, 64);\n $_POST['page_url'] = filter_var(substr(htmlspecialchars(strip_tags($_POST['page_url'])), 0, 64), FILTER_SANITIZE_URL);\n $_POST['page_public'] = ($_POST['page_public'] == 1 ? 1 : 0);\n\n // Check if any field is empty\n if(empty($_POST['page_title']) || empty($_POST['page_url']) || empty($_POST['page_content'])) {\n $_SESSION['message'][] = ['error', $this->lang['all_fields_required']];\n }\n\n // Check if the page name already exists (exclude the current page)\n if($type) {\n if(in_array($_POST['page_url'], $page['url']) && $_POST['page_url'] != $page['id']) {\n $_SESSION['message'][] = ['error', sprintf($this->lang['page_url_exists'], $_POST['page_url'])];\n }\n } else {\n if(isset($page['url'])) {\n $_SESSION['message'][] = ['error', sprintf($this->lang['page_url_exists'], $_POST['page_url'])];\n }\n }\n }", "public function backendExtraValidate(){\n \n }", "public static function validate()\n\t{\n\t\tself::engine()->validate();\n\t}", "public function validation()\n {\n\n }", "function validate_forms()\r\n{\r\n\tglobal $alert,$db;\r\n\tif($_REQUEST['dont_save']!=1)\r\n\t{\r\n\t\t//Validations\r\n\t\t$alert = '';\r\n\t\t$fieldRequired \t\t= array($_REQUEST['review_author']);\r\n\t\t$fieldDescription \t= array('Review Author');\r\n\t\t$fieldEmail \t\t= array();\r\n\t\t$fieldConfirm \t\t= array();\r\n\t\t$fieldConfirmDesc \t= array();\r\n\t\t$fieldNumeric \t\t= array();\r\n\t\t$fieldNumericDesc \t= array();\r\n\t\t\r\n\t\t\r\n\t\tserverside_validation($fieldRequired, $fieldDescription, $fieldEmail, $fieldConfirm, $fieldConfirmDesc, $fieldNumeric, $fieldNumericDesc);\r\n\t}\r\n}" ]
[ "0.73652107", "0.73652107", "0.67072755", "0.66907024", "0.6670536", "0.66690695", "0.6592889", "0.65618914", "0.65471035", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6492113", "0.6416514", "0.6415128", "0.6400183", "0.63792807", "0.63736683", "0.6275745", "0.627454", "0.6266785", "0.6265327", "0.62615305", "0.6259062", "0.6259062", "0.62539583", "0.6253859", "0.62293243", "0.6210169", "0.6163321", "0.61544263", "0.6152759", "0.61150074", "0.60997075", "0.60932255", "0.6071855", "0.60681826", "0.6061995", "0.6052276", "0.60508096", "0.60508096", "0.6011346", "0.6002552", "0.6001928", "0.60006475", "0.5996279", "0.5996279", "0.59954864", "0.59724736", "0.59670746", "0.59604466", "0.595857", "0.5931494", "0.591978", "0.5913542", "0.59069467", "0.58952767", "0.5879043", "0.5875898", "0.5871851", "0.58707374", "0.58673036", "0.58598953", "0.5833389", "0.5806485", "0.5795899", "0.57925403", "0.5787609", "0.5786661", "0.5784164", "0.57837516", "0.5769037", "0.5762673", "0.57571113", "0.57522064", "0.5736697", "0.57354665", "0.573442", "0.573442", "0.5734012", "0.57306874", "0.5718199", "0.5711816", "0.57079303", "0.57032126", "0.5695147", "0.56905305", "0.5684535", "0.5665139", "0.56551206", "0.56478924", "0.5644001", "0.5639148" ]
0.0
-1
Content administration page operations submit function.
function mongo_node_operation_submit($form, &$form_state) { $operations = mongo_node_operations(); $operation = $operations[$form_state['values']['operation']]; $entities = array_filter($form_state['values']['entities']); $entity_type = $form_state['values']['entity_type']; if ($function = $operation['callback']) { // Add in callback arguments if present. if (isset($operation['callback arguments'])) { $args = array( $entity_type, $entities, $operation['callback arguments'], ); } else { $args = array($entity_type, $entities); } call_user_func_array($function, $args); cache_clear_all(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function submitPage() {}", "function index_action()\n {\n $this->object->enqueue_backend_resources();\n if ($token = $this->object->is_authorized_request()) {\n // Get each form. Validate it and save any changes if this is a post\n // request\n $tabs = array();\n $errors = array();\n $action = $this->object->_get_action();\n $success = $this->param('message');\n if ($success) {\n $success = $this->object->get_success_message();\n } else {\n $success = $this->object->is_post_request() ? $this->object->get_success_message() : '';\n }\n // First, process the Post request\n if ($this->object->is_post_request() && $this->has_method($action)) {\n $this->object->{$action}($this->object->param($this->context));\n }\n $index_template = $this->object->index_template();\n foreach ($this->object->get_forms() as $form) {\n $form->page = $this->object;\n $form->enqueue_static_resources();\n if ($this->object->is_post_request()) {\n if ($form->has_method($action)) {\n $form->{$action}($this->object->param($form->context));\n }\n }\n // This is a strange but necessary hack: this seemingly extraneous use of to_accordion_tab() normally\n // just means that we're rendering the admin content twice but NextGen Pro's pricelist and coupons pages\n // actually depend on echo'ing the $tabs variable here, unlike the 'nextgen_admin_page' template which\n // doesn't make use of the $tabs parameter at all.\n // TLDR: The next two lines are necessary for the pricelist and coupons pages.\n if ($index_template !== 'photocrati-nextgen_admin#nextgen_admin_page') {\n $tabs[] = $this->object->to_accordion_tab($form);\n }\n $forms[] = $form;\n if ($form->has_method('get_model') && $form->get_model()) {\n if ($form->get_model()->is_invalid()) {\n if ($form_errors = $this->object->show_errors_for($form->get_model(), TRUE)) {\n $errors[] = $form_errors;\n }\n $form->get_model()->clear_errors();\n }\n }\n }\n // Render the view\n $index_params = array('page_heading' => $this->object->get_page_heading(), 'tabs' => $tabs, 'forms' => $forms, 'errors' => $errors, 'success' => $success, 'form_header' => FALSE, 'header_message' => $this->object->get_header_message(), 'nonce' => M_Security::create_nonce($this->object->get_required_permission()), 'show_save_button' => $this->object->show_save_button(), 'model' => $this->object->has_method('get_model') ? $this->get_model() : NULL, 'logo' => $this->get_router()->get_static_url('photocrati-nextgen_admin#imagely_icon.png'));\n $index_params = array_merge($index_params, $this->object->get_index_params());\n $this->render_partial($index_template, $index_params);\n } else {\n $this->render_view('photocrati-nextgen_admin#not_authorized', array('name' => $this->object->name, 'title' => $this->object->get_page_title()));\n }\n }", "function submit() {\n\t\tThesisHandler::setupTemplate();\n\n\t\t$journal = &Request::getJournal();\n\t\t$journalId = $journal->getJournalId();\n\n\t\t$thesisPlugin = &PluginRegistry::getPlugin('generic', 'ThesisPlugin');\n\n\t\tif ($thesisPlugin != null) {\n\t\t\t$thesesEnabled = $thesisPlugin->getEnabled();\n\t\t}\n\n\t\tif ($thesesEnabled) {\n\t\t\t$thesisPlugin->import('StudentThesisForm');\n\n\t\t\t$templateMgr = &TemplateManager::getManager();\n\t\t\t$templateMgr->append('pageHierarchy', array(Request::url(null, 'thesis'), 'plugins.generic.thesis.theses'));\n\t\t\t$thesisDao = &DAORegistry::getDAO('ThesisDAO');\n\n\t\t\t$thesisForm = &new StudentThesisForm();\n\t\t\t$thesisForm->initData();\n\t\t\t$thesisForm->display();\n\n\t\t} else {\n\t\t\t\tRequest::redirect(null, 'index');\n\t\t}\n\t}", "public function postProcess()\n {\n $pageId = Tools::getValue('id_page');\n if (Tools::isSubmit('submitEditCustomHTMLPage') || Tools::isSubmit('submitEditCustomHTMLPageAndStay')) {\n if ($pageId == 'new')\n $this->processAdd();\n else\n $this->processUpdate();\n }\n else if (Tools::isSubmit('status'.$this->table)) {\n $this->toggleStatus();\n }\n else if (Tools::isSubmit('delete'.$this->table)) {\n $this->processDelete();\n }\n }", "public function postAction()\n {\n if ($this->_isAdmin){\n \n // Work out the type of action they want to perform\n switch($_POST['operation']){\n case 'update':\n $data = $this->_contentTypesModel->updateContentType(unserialize(base64_decode($_POST['data'])), $_POST['argOne']);\n break;\n case 'add':\n $data = $this->_contentTypesModel->addContentType(unserialize(base64_decode($_POST['data'])));\n break;\n case 'remove':\n $data = $this->_contentTypesModel->removeContentType(unserialize(base64_decode($_POST['data'])));\n break;\n default:\n $data = 'Operation not found';\n break;\n }\n \n $this->returnPostResult($data);\n \n }else{\n $this->returnNoAuth();\n }\n\n }", "public function perform()\n {\n // assign header var with css definitions\n $this->viewVar['htmlHeaderData'] .= $this->controllerLoader->defaultMainCss();\n $this->viewVar['htmlTitle'] .= ' Articles general settings';\n // select advanced link\n $this->viewVar['selectedMenuItem'] = 'advanced';\n\n $this->viewVar['error'] = array();\n $this->viewVar['status'] = array();\n\n $this->fields = array();\n\n $updateOptions = $this->httpRequest->getParameter('updateOptions', 'post', 'alnum');\n $cancel = $this->httpRequest->getParameter('cancel', 'post', 'alnum');\n $save = $this->httpRequest->getParameter('save', 'post', 'alnum');\n $status = $this->httpRequest->getParameter('status', 'get', 'alnum');\n\n if(!empty($updateOptions) || !empty($save))\n {\n if(true == $this->validatePostData())\n {\n $this->model->action( 'common','setConfigVar',\n array('data' => $this->fields,\n 'module' => 'article'));\n\n if(!empty($updateOptions))\n {\n $this->router->redirect( $this->controllerVar['adminWebController'].'/mod/default/cntr/advancedMain' );\n }\n else\n {\n $this->router->redirect( $this->controllerVar['adminWebController'].'/mod/article/cntr/options/status/saved' );\n }\n }\n }\n elseif(!empty($cancel))\n {\n // redirect to the parent node of my site\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/default/cntr/advancedMain');\n }\n elseif(!empty($status))\n {\n $this->viewVar['htmlTitle'] .= '. Status: updated settings';\n $this->viewVar['status'][] = 'Updated settings';\n }\n\n // assign view vars of options\n $this->viewVar['option'] = $this->config->getModuleArray( 'article' );\n }", "public function execute() {\n\n\t\tif (!Utils::getGet('action')) {\n\t\t\t$_GET['action'] = 'show';\n\t\t}\n\n\t\tif ($_GET['action'] == 'show') {\n\t\t\t$this->show();\n\t\t}\n\n\t\tif ($_GET['action'] == 'modification') {\n\t\t\tif (Utils::getGet('id')) {\n\t\t\t\t$id = Utils::getGet('id');\n\t\t\t\t$id = intval($_GET['id']);\n\t\t\t\t$this->modification($id);\n\t\t\t} else {\n\t\t\t\t$this->modificationAll();\n\t\t\t}\n\t\t}\n\n\t\tif ($_GET['action'] == 'cree') {\n\t\t\t$this->creePage();\n\t\t}\n\n\t\tif ($_GET['action'] == 'supprimer') {\n\t\t\tif (Utils::getGet('id')) {\n\t\t\t\t$id = Utils::getGet('id');\n\t\t\t\t$id = intval($_GET['id']);\n\t\t\t\t$this->souprimePage($id);\n\t\t\t} else {\n\t\t\t\t$this->modificationAll();\n\t\t\t}\n\t\t}\n\n\t}", "function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }", "public function perform()\n {\n // init template array to fill with node data\n $this->viewVar['title'] = '';\n // Init template form field values\n $this->viewVar['error'] = array();\n\n $this->viewVar['htmlTitle'] .= ' Add new simple text';\n\n $addtext = $this->httpRequest->getParameter('addtext', 'post', 'alnum');\n $cancel = $this->httpRequest->getParameter('cancel', 'post', 'alpha');\n\n if(false !== $cancel)\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/default/cntr/advancedMain');\n }\n\n\n // add node\n if( !empty($addtext) )\n {\n if(false !== ($id_text = $this->addText()))\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/misc/cntr/editText/id_text/'.$id_text);\n }\n }\n }", "function submit()\n {\n\t\t//all data is handled by submit2()\n }", "function post_submitbox_misc_actions()\n {\n }", "private function formSubmitted() {\n\t\t\t\n\t\t\t// connect db\n\t\t\t$this->db->replicaConnect(Database::getName($this->par['lang'], $this->par['project']));\n\t\t\t\n\t\t\t// build query for outgoing links\n\t\t\t$this->par['page'] = str_replace(' ', '_', $this->par['page']);\n\t\t\t$t1 = 'SELECT s.pl_title';\n\t\t\t$t1 .= ' FROM pagelinks s';\n\t\t\t$t1 .= ' INNER JOIN page tp ON (s.pl_title = tp.page_title AND s.pl_namespace = tp.page_namespace)';\n\t\t\t$t1 .= ' INNER JOIN page sp ON (s.pl_from = sp.page_id AND s.pl_namespace = sp.page_namespace AND sp.page_title = ?)';\n\t\t\t$t1 .= ' WHERE s.pl_namespace = 0';\n\t\t\t$t1 .= ' AND s.pl_from_namespace = 0';\n\t\t\t\n\t\t\t// execute query\n\t\t\t$q1 = $this->db->executePreparedQuery($t1, 's', $this->par['page']);\n\t\t\t\n\t\t\t// check for sql errors\n\t\t\tif (Database::checkSqlQueryObject($q1) === false) {\n\t\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t\t$this->page->addInline('p', 'SQL Error: ' . $this->db->error, 'iw-error');\n\t\t\t\t$this->page->closeBlock();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$r1 = Database::fetchResult($q1);\n\t\t\t\n\t\t\t// build query for incoming links\n\t\t\t$t2 = 'SELECT tp.page_title';\n\t\t\t$t2 .= ' FROM page tp';\n\t\t\t$t2 .= ' INNER JOIN pagelinks t ON (tp.page_id = t.pl_from AND t.pl_title = ? AND t.pl_namespace = 0 AND t.pl_from_namespace = 0)';\n\t\t\t$t2 .= ' WHERE tp.page_is_redirect = 0';\n\t\t\t\n\t\t\t// execute query\n\t\t\t$q2 = $this->db->executePreparedQuery($t2, 's', $this->par['page']);\n\n\t\t\t// check for sql errors\n\t\t\tif (Database::checkSqlQueryObject($q2) === false) {\n\t\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t\t$this->page->addInline('p', 'SQL Error: ' . $this->db->error, 'iw-error');\n\t\t\t\t$this->page->closeBlock();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$r2 = Database::fetchResult($q2);\n\t\t\t\n\t\t\t$out = [];\n\t\t\t$inc = [];\n\t\t\t$common = [];\n\t\t\t$noback = [];\n\t\t\t$nolink = [];\n\t\t\tforeach ($r1 as $l1) {\n\t\t\t\t$out[] = $l1['pl_title'];\n\t\t\t}\n\t\t\tforeach ($r2 as $l2) {\n\t\t\t\t$inc[] = $l2['page_title'];\n\t\t\t}\n\t\t\t\n\t\t\t// get arrays\n\t\t\t$common = array_intersect($out, $inc);\n\t\t\t$noback = array_diff($out, $inc);\n\t\t\t$nolink = array_diff($inc, $out);\n\t\t\t\n\t\t\t// sort arrays\n\t\t\tsort($common);\n\t\t\tsort($noback);\n\t\t\tsort($nolink);\n\t\t\t\n\t\t\t// close queries\n\t\t\t$q1->close();\n\t\t\t$q2->close();\n\t\t\t\n\t\t\t// open statistics area\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('h2', 'Statistics');\n\t\t\t\n\t\t\t$this->page->addInline('p', 'Page conjunction for ' . Hgz::buildWikilink($this->par['lang'], $this->par['project'], $this->par['page'], str_replace('_', ' ', $this->par['page']))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t. ' (' . Hgz::buildWikilink($this->par['lang'], $this->par['project'], 'Special:Whatlinkshere/' . $this->par['page'], 'What links here') . ')');\n\t\t\t\n\t\t\t// statistics\n\t\t\t$this->page->openBlock('p');\n\t\t\t$this->page->openBlock('ul');\n\t\t\t$this->page->addInline('li', count($out) . ' links on this page');\n\t\t\t$this->page->addInline('li', count($inc) . ' links to this page');\n\t\t\t$this->page->addInline('li', '<a href=\"#noback\">' . count($noback) . ' links on this page without backlinks</a>');\n\t\t\t$this->page->addInline('li', '<a href=\"#nolink\">' . count($nolink) . ' incoming links without corresponding outgoing links</a>');\n\t\t\t$this->page->addInline('li', '<a href=\"#mutual\">' . count($common) . ' mutual links</a>');\n\t\t\t$this->page->closeBlock(2);\n\t\t\t\n\t\t\t// open result area\n\t\t\t$this->page->closeBlock();\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('h2', 'Results');\n\t\t\t\n\t\t\t// no backlinks\n\t\t\tif (count($noback) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"noback\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles linked from ' . str_replace('_', ' ', $this->par['page']) . ' with no backlinks:');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($noback as $v1) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v1, str_replace('_', ' ', $v1)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\n\t\t\t// no wikilinks\n\t\t\tif (count($nolink) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"nolink\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles with links to ' . str_replace('_', ' ', $this->par['page']) . ' but no links from here:');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($nolink as $v2) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v2, str_replace('_', ' ', $v2)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\n\t\t\t// common links\n\t\t\tif (count($common) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"mutual\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles linked from ' . str_replace('_', ' ', $this->par['page']) . ' with backlinks (mutual links):');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($common as $v3) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v3, str_replace('_', ' ', $v3)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\t\t\t\n\t\t\t// close result area\n\t\t\t$this->page->closeBlock();\n\t\t}", "public function submit()\n {\n if ($_POST['name'] == 'preview') { $this->preview(); }\n elseif ($_POST['name'] == 'create') { $this->save(); }\n }", "function adminDefault() {\n\t\t// decide submit modes\n\t\t$GLOBALS['objCms']->initSubmitting(1,2); // save and save and close\n\t\n\t\t// initialize object content\n\t\t$this->content = new ContentFck();\n\t\t\n\t\t// load content corresponding to page\n\t\t$this->content->loadContent($GLOBALS['objPage']->id);\n\t\n\t\t// set script for form\n\t\t$this->content->initAdmin('full', 2);\n\t\t\n\t\t$this->setView('admin_form');\n\t\t\n\t}", "public function main()\n {\n $lang = $this->getLanguageService();\n // Access check...\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $access = is_array($this->pageinfo) ? 1 : 0;\n // Content\n $content = '';\n if ($this->id && $access) {\n // Initialize permission settings:\n $this->CALC_PERMS = $this->getBackendUser()->calcPerms($this->pageinfo);\n $this->EDIT_CONTENT = $this->contentIsNotLockedForEditors();\n\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);\n\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode('jumpToUrl', '\n function jumpToUrl(URL,formEl) {\n if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?)\n if (!TBE_EDITOR.isFormChanged()) {\n window.location.href = URL;\n } else if (formEl) {\n if (formEl.type==\"checkbox\") formEl.checked = formEl.checked ? 0 : 1;\n }\n } else {\n window.location.href = URL;\n }\n }\n ');\n $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '\n if (top.fsMod) {\n top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n top.fsMod.navFrameHighlightedID[\"web\"] = \"pages' . (int)$this->id . '_\"+top.fsMod.currentBank; ' . (int)$this->id . ';\n }\n ' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '\n function deleteRecord(table,id,url) { //\n window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[')\n . ' + table + \"][\" + id + \"][delete]=1&redirect=\" + encodeURIComponent(url) + \"&prErr=1&uPT=1\";\n return false;\n }\n ');\n\n // Find backend layout / columns\n $backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);\n if (!empty($backendLayout['__colPosList'])) {\n $this->colPosList = implode(',', $backendLayout['__colPosList']);\n }\n // Removing duplicates, if any\n $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));\n // Accessible columns\n if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {\n $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));\n // Match with the list which is present in the colPosList for the current page\n if (!empty($this->colPosList) && !empty($this->activeColPosList)) {\n $this->activeColPosList = array_unique(array_intersect(\n $this->activeColPosList,\n $this->colPosList\n ));\n }\n } else {\n $this->activeColPosList = $this->colPosList;\n }\n $this->activeColPosList = implode(',', $this->activeColPosList);\n $this->colPosList = implode(',', $this->colPosList);\n\n $content .= $this->getHeaderFlashMessagesForCurrentPid();\n\n // Render the primary module content:\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n $content .= '<form action=\"' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'imagemode' => $this->imagemode])) . '\" id=\"PageLayoutController\" method=\"post\">';\n // Page title\n $content .= '<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($this->getLocalizedPageTitle()) . '</h1>';\n // All other listings\n $content .= $this->renderContent();\n }\n $content .= '</form>';\n $content .= $this->searchContent;\n // Setting up the buttons for the docheader\n $this->makeButtons();\n // @internal: This is an internal hook for compatibility7 only, this hook will be removed without further notice\n if ($this->MOD_SETTINGS['function'] != 1 && $this->MOD_SETTINGS['function'] != 2) {\n $renderActionHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['renderActionHook'];\n if (is_array($renderActionHook)) {\n foreach ($renderActionHook as $hook) {\n $params = [\n 'deleteButton' => $this->deleteButton,\n ''\n ];\n $content .= GeneralUtility::callUserFunction($hook, $params, $this);\n }\n }\n }\n // Create LanguageMenu\n $this->makeLanguageMenu();\n } else {\n $this->moduleTemplate->addJavaScriptCode(\n 'mainJsFunctions',\n 'if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';'\n );\n $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n $view->assignMultiple([\n 'title' => $lang->getLL('clickAPage_header'),\n 'message' => $lang->getLL('clickAPage_content'),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n // Set content\n $this->moduleTemplate->setContent($content);\n }", "public function display_page_actions() {\n\t\tprintf(\n\t\t\t'<form action=\"%s\" method=\"post\">',\n\t\t\tesc_url( admin_url( 'admin-post.php?action=' . self::POST_ACTION_ID ) )\n\t\t);\n\n\t\techo '<input type=\"hidden\" name=\"page\" value=\"custom-table\"/>';\n\t\twp_nonce_field( self::POST_ACTION_ID );\n\n\t\techo '<p class=\"submit\">';\n\t\tsubmit_button(\n\t\t\tesc_html__( 'Add Entry', 'autowpdb-example-plugin' ),\n\t\t\t'primary',\n\t\t\t'add_entry',\n\t\t\tfalse\n\t\t);\n\t\tif ( ! empty( $this->table_contents ) ) {\n\t\t\techo ' ';\n\t\t\tsubmit_button(\n\t\t\t\tesc_html__( 'Delete Oldest Entry', 'autowpdb-example-plugin' ),\n\t\t\t\t'',\n\t\t\t\t'delete_entry',\n\t\t\t\tfalse\n\t\t\t);\n\t\t}\n\t\techo '</p>';\n\t\techo '</form>';\n\t}", "public function submit() {\n $post = Post::submit();\n require_once('view/posts/submit.php');\n \n \n }", "function admin_page() {\n\t\t$this->maybe_authorize();\n?>\n\t\t<div class=\"wrap ghupdate-admin\">\n\n\t\t\t<div class=\"head-wrap\">\n\t\t\t\t<?php screen_icon( 'plugins' ); ?>\n\t\t\t\t<h2><?php _e( 'Setup GitHub Updates' , 'github_plugin_updater' ); ?></h2>\n\t\t\t</div>\n\n\t\t\t<div class=\"postbox-container primary\">\n\t\t\t\t<form method=\"post\" id=\"ghupdate\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\tsettings_errors();\n\t\tsettings_fields( 'ghupdate' ); // includes nonce\n\t\tdo_settings_sections( 'github-updater' );\n?>\n\t\t\t\t</form>\n\t\t\t</div>\n\n\t\t</div>\n\t\t<?php\n\t}", "public function indexAction() {\n\n\t\tif ((version_compare(TYPO3_version, '7.6.8', '<'))) {\n\n\t\t\t$MCONF['name'] = 'web_toctoccommentsbeM1';\n\t\t\t$MCONF['script'] = '_DISPATCH';\n\n\t\t\t$MCONF['access'] = 'user,group';\n\t\t}\n\n\t\t$admincommand = $_POST['admincommand'];\n\n\t\t$ret = GeneralUtility::requireOnce(ExtensionManagementUtility::extPath('toctoc_comments') . 'Classes/Backend/BackendAjaxAdministration.php');\n\t\techo $ret;\n\t\texit;\n\t}", "function main()\t{\n\t\t\t\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t\t\t// Access check!\n\t\t\t\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t\t\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t\t\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t\t\t\t// Draw the header.\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t\t\t\t$this->doc->form='<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t\t\t\t// JavaScript\n\t\t\t\t\t\t$this->doc->JScode = '\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction confirmURL(text,URL){\n\t\t\t\t\t\t\t\t\tvar agree=confirm(text);\n\t\t\t\t\t\t\t\t\tif (agree) {\n\t\t\t\t\t\t\t\t\t\tjumpToUrl(URL);\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</script>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$this->doc->postCode='\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\n\t\t\t\t\t\t\t. $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t\t\t\t// Render content:\n\t\t\t\t\t\t$this->moduleContent();\n\n\n\t\t\t\t\t\t// ShortCut\n\t\t\t\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If no access or if ID == zero\n\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}", "public function theme_index_main($h)\n {\n // show message and exit if posting denied (determined in theme_index_top)\n if ($h->pageType == 'submit' && $h->vars['posting_denied']) {\n $h->showMessages();\n return true;\n }\n \n switch ($h->pageName)\n {\n // Submit Step 1\n case 'submit':\n case 'submit1':\n \n if ($h->vars['submission_closed'] || $h->vars['posting_denied']) {\n $h->showMessages();\n return true;\n }\n \n // display template\n $h->template('submit1');\n return true;\n break;\n \n // Submit Step 2\n case 'submit2':\n \n if ($h->vars['submission_closed'] || $h->vars['posting_denied']) {\n $h->showMessages();\n return true;\n }\n \n // settings\n $h->vars['submit_use_content'] = $h->vars['submit_settings']['content'];\n $h->vars['submit_content_length'] = $h->vars['submit_settings']['content_length'];\n $h->vars['submit_use_categories'] = $h->vars['submit_settings']['categories'];\n $h->vars['submit_use_tags'] = $h->vars['submit_settings']['tags'];\n $allowable_tags = $h->vars['submit_settings']['allowable_tags'];\n $h->vars['submit_allowable_tags'] = htmlentities($allowable_tags);\n \n // submitted data\n $h->vars['submit_editorial'] = $h->vars['submitted_data']['submit_editorial'];\n $h->vars['submit_orig_url'] = urldecode($h->vars['submitted_data']['submit_orig_url']);\n $h->vars['submit_title'] = htmlspecialchars(sanitize($h->vars['submitted_data']['submit_title'], 'tags'), ENT_QUOTES); \n $h->vars['submit_content'] = sanitize($h->vars['submitted_data']['submit_content'], 'tags', $allowable_tags);\n $h->vars['submit_post_id'] = $h->vars['submitted_data']['submit_id'];\n $h->vars['submit_category'] = $h->vars['submitted_data']['submit_category'];\n $h->vars['submit_tags'] = sanitize($h->vars['submitted_data']['submit_tags'], 'all');\n \n // strip htmlentities before showing in the form:\n $h->vars['submit_title'] = html_entity_decode($h->vars['submit_title']);\n $h->vars['submit_content'] = html_entity_decode($h->vars['submit_content']);\n $h->vars['submit_tags'] = html_entity_decode($h->vars['submit_tags']);\n \n // build category picker code\n if ($h->vars['submit_use_categories']) {\n $h->vars['submit_category_picker'] = $this->categoryPicker($h);\n }\n \n // display template\n $h->template('submit2');\n return true;\n break;\n \n // Submit Step 3\n case 'submit3':\n \n if ($h->vars['submission_closed'] || $h->vars['posting_denied']) {\n $h->showMessages();\n return true;\n }\n \n // need these for the post preview (which uses SB Base's sb_post.php template)\n $h->vars['use_content'] = $h->vars['submit_settings']['content'];\n $h->vars['summary_length'] = $h->vars['submit_settings']['summary_length'];\n $h->vars['editorial'] = true; // this makes the link unclickable\n \n // display template\n $h->template('submit3');\n return true;\n break;\n \n // Edit Post\n case 'edit_post': \n if ((isset($h->vars['post_deleted']) && $h->vars['post_deleted']) || (isset($h->vars['can_edit']) && !$h->vars['can_edit'])) {\n $h->showMessages();\n return true;\n }\n \n // settings\n $h->vars['submit_use_content'] = $h->vars['submit_settings']['content'];\n $h->vars['submit_content_length'] = $h->vars['submit_settings']['content_length'];\n $h->vars['submit_use_categories'] = $h->vars['submit_settings']['categories'];\n $h->vars['submit_use_tags'] = $h->vars['submit_settings']['tags'];\n $allowable_tags = $h->vars['submit_settings']['allowable_tags'];\n $h->vars['submit_allowable_tags'] = htmlentities($allowable_tags);\n \n $h->vars['submit_orig_url'] = $h->post->origUrl;\n $h->vars['submit_title'] = $h->post->title;\n $h->vars['submit_content'] = $h->post->content;\n $h->vars['submit_post_id'] = $h->post->id;\n $h->vars['submit_status'] = $h->post->status;\n $h->vars['submit_category'] = $h->post->category;\n $h->vars['submit_tags'] = $h->post->tags;\n \n $h->vars['submit_editorial'] = isset($h->vars['submitted_data']['submit_editorial']) ? $h->vars['submitted_data']['submit_editorial'] : '';\n $h->vars['submit_pm_from'] = $h->cage->get->testAlnumLines('from');\n $h->vars['submit_pm_search'] = $h->cage->get->getHtmLawed('search_value');\n $h->vars['submit_pm_filter'] = $h->cage->get->testAlnumLines('post_status_filter');\n $h->vars['submit_pm_page'] = $h->cage->get->testInt('pg');\n\t\t\t\t$h->vars['submit_pm_limit'] = $h->cage->get->testInt('pm_limit');\n \n // strip htmlentities before showing in the form:\n $h->vars['submit_title'] = $h->vars['submit_title'];\n $h->vars['submit_content'] = html_entity_decode($h->vars['submit_content']);\n $h->vars['submit_tags'] = html_entity_decode($h->vars['submit_tags']);\n \n // get status options for admin section\n $h->vars['submit_status_options'] = '';\n if ($h->currentUser->getPermission('can_edit_posts') == 'yes') {\n $statuses = $h->post->getUniqueStatuses($h); \n if ($statuses) {\n foreach ($statuses as $status) {\n if ($status != 'unsaved' && $status != 'processing' && $status != $h->vars['submit_status']) { \n $h->vars['submit_status_options'] .= \"<option value=\" . $status . \">\" . $status . \"</option>\\n\";\n }\n }\n }\n }\n \n // build category picker code\n if ($h->vars['submit_use_categories']) {\n $h->vars['submit_category_picker'] = $this->categoryPicker($h);\n }\n \n // display template\n $h->template('submit_edit');\n return true;\n break;\n \n // Submitted\n case 'submit_confirm':\n $h->showMessages();\n return true;\n break;\n }\n }", "function doAction() {\n\n\t\ttry {\n\t\t\t// Load the page definitition ...\n\t\t\t$pageDefinition = PageDefinition::fetch($this->context,\n\t\t\t\tRequest::post(\"page_definition_id\", Request::TYPE_INTEGER));\n\n\t\t\t// ... set the members ...\n\t\t\t$pageDefinition->title = Request::post(\n\t\t\t\t\"label\", Request::TYPE_STRING, new Str(\"\"));\n\t\t\t$pageDefinition->description = Request::post(\n\t\t\t\t\"description\", Request::TYPE_STRING, new Str(\"\"));\n\t\t\t$pageDefinition->action = Request::post(\n\t\t\t\t\"action\", Request::TYPE_STRING, new Str(\"\"));\n\t\t\t$pageDefinition->configOnly = Request::post(\n\t\t\t\t\"admin_only\", Request::TYPE_BOOLEAN);\n\t\t\t$pageDefinition->typeSet = Request::post(\n\t\t\t\t\"type_set\", Request::TYPE_INTEGER);\n\t\t\t$pageDefinition->defaultTabId = Request::post(\n\t\t\t\t\"default_tab_id\", Request::TYPE_INTEGER, -1);\n\n\t\t\t// ... and update the page definitition.\n\t\t\t$res = $pageDefinition->update();\n\n\t\t\t// Load the PageDefinititionHints::PARENT_PAGE_DEFINITION_COUNT\n\t\t\t// list ...\n\t\t\t$hnts = new PageDefinitionHints($this->context,\n\t\t\t\t$pageDefinition->id,\n\t\t\t\tPageDefinitionHints::PARENT_PAGE_DEFINITION_COUNT);\n\n\t\t\t// ... get the new values ...\n\t\t\tforeach ($hnts as $k=>$v) {\n\t\t\t\t$dat = $_POST[\"hint{$k}\"];\n\t\t\t\t$hnts[$k]->maxNoOfChildren =\n\t\t\t\t\tis_numeric($dat) ? intval($dat) : NULL;\n\t\t\t}\n\t\t\t// ... and update the list.\n\t\t\t$hnts->update();\n\n\t\t\t// Set action result.\n\t\t\t$this->setResult(self::SUCCESS);\n\n\t\t} catch(ApplicationException $e) {\n\n\t\t\t$this->setResult(self::FAIL, $e, $pageDefinition);\n\t\t}\n\t}", "public function submit()\n {\n // @todo remove $_REQUEST['do']\n $what = in('do');\n if ( empty($what) ) $what = in('forum');\n\n $forum_do_list = [\n 'ping',\n 'api',\n 'forum_create',\n 'forum_edit',\n 'forum_delete',\n 'setting_submit',\n 'edit_submit',\n 'post_edit_submit',\n 'post_delete_submit', // @todo implement ajax call.\n 'post_like',\n 'comment_like',\n 'comment_edit_submit', // @todo implement ajax call.\n 'comment_delete_submit', // @todo implement ajax call.\n 'file_upload', // @todo implement ajax call.\n 'file_delete', // @todo implement ajax call.\n 'blogger_getUsersBlogs',\n 'user_register',\n 'user_update',\n 'user_delete',\n 'user_check_session_id',\n 'user_login_check',\n 'login',\n 'logout',\n 'export',\n 'import_submit',\n 'ajax_search',\n ];\n\n if ( in_array( $what, $forum_do_list ) ) {\n $this->$what(); /// @Attention all the function here must end with wp_send_json_success/error()\n exit; // no effect...\n }\n /**\n else {\n $error = \"You cannot call the method - '$what' because the method is not listed on 'forum(do) list'.\";\n ferror( -4444, $error );\n }\n */\n\n\n }", "public function post_edit_submit() {\n\n $slug = in('slug'); // forum id ( slug ). It is only available on creating a new post.\n $post_ID = in('post_ID'); // post id. it is only available on updating a post.\n $title = in('title');\n $content = in('content');\n\n if ( empty( $slug ) && empty( $post_ID ) ) ferror(-50044, 'slug ( category_slug ) or post_ID are not provided');\n if ( ! $title ) ferror(-50045, 'post title is not provided');\n if ( ! $content ) ferror(-50046,'post content is not provided');\n $user_ID = $this->get_post_author();\n if ( empty($user_ID) ) ferror( -50047, \"login first\");\n\n if ( $post_ID ) { // update\n forum()->endIfNotMyPost( $post_ID );\n $this->setCategoryByPostID( $post_ID );\n }\n else { // new\n $this->setCategory( $slug );\n }\n $post = post()\n ->set('post_category', [ forum()->getCategory()->term_id ])\n ->set('post_title', $title)\n ->set('post_content', $content)\n ->set('post_status', 'publish');\n\n if ( $post_ID ) { // update\n $post_ID = $post\n ->set('ID', $post_ID)\n ->update();\n }\n else { // new\n $post_ID = $post\n ->set('post_author', $user_ID)\n ->create();\n }\n if ( ! is_integer($post_ID) ) ferror( -50048, \"Failed on post_create() : $post_ID\");\n\n\n // file upload\n preg_match_all(\"/http.*\\/data\\/upload\\/[^\\/]*\\/[^\\/]\\/[^'\\\"]*/\", $content, $ms);\n $files = $ms[0];\n // save uploaded files\n post()->meta( $post_ID, 'files', $files );\n\n\n // Save All extra input into post meta.\n post()->saveAllMeta( $post_ID );\n\n $this->response( [ 'slug' => forum()->getCategory()->slug, 'post_ID' => $post_ID ] );\n }", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\n\t\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\t\t$this->doc->postCode='\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 1;\n\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t</script>\n\t\t';\n\n\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->divider(5);\n\n\t\t// Render content:\n\t\t$this->moduleContent();\n\n\t\t// ShortCut\n\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t}\n\n\t\t$this->content.=$this->doc->spacer(10);\n\n\t}", "public function controlActions(){\n // Check if the tables are created.\n $this->mode = 'admin';\n $this->object = new $this->type();\n $this->titlePage = __((string)$this->object->info->info->form->title);\n $this->layout = (string)$this->object->info->info->form->layout;\n $this->menuInside = $this->menuInside();\n $ui = new NavigationAdmin_Ui($this);\n switch ($this->action) {\n default:\n header('Location: '.url($this->type.'/listAdmin', true));\n exit();\n break;\n case 'listAdmin':\n /**\n * This is the main action for the BackEnd. If we are in DEBUG mode\n * it will create the table automatically.\n */\n $this->checkLoginAdmin();\n $this->content = $this->listAdmin();\n return $ui->render();\n break;\n case 'insertView':\n /**\n * This is the action that shows the form to insert a record in the BackEnd.\n */\n $this->checkLoginAdmin();\n $this->content = $this->insertView();\n return $ui->render();\n break;\n case 'insert':\n /**\n * This is the action that inserts a record in the BackEnd.\n * If the insertion is successful it shows a form to check the record,\n * if not it creates a form with the errors to correct.\n */\n $this->checkLoginAdmin();\n $insert = $this->insert();\n if ($insert['success']=='1') {\n header('Location: '.url($this->type.'/insertCheck/'.$insert['id'], true));\n exit();\n } else {\n $this->messageError = __('errorsForm');\n $this->content = $insert['html'];\n return $ui->render();\n }\n break;\n case 'modifyView':\n case 'modifyViewCheck':\n case 'insertCheck':\n /**\n * This is the action that shows the form to check a record insertion.\n */\n $this->checkLoginAdmin();\n $this->message = ($this->action=='insertCheck' || $this->action=='modifyViewCheck') ? __('savedForm') : '';\n $this->content = $this->modifyView();\n return $ui->render();\n break;\n case 'modifyViewNested':\n /**\n * This is the action that shows the form to modify a record.\n */\n $this->checkLoginAdmin();\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n $this->content = $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modifyNested', true),\n 'class'=>'formAdmin formAdminModify',\n 'nested'=>true),\n array()));\n return $ui->render();\n break;\n case 'modify':\n case 'modifyNested':\n /**\n * This is the action that updates a record when updating it.\n */\n $this->checkLoginAdmin();\n $nested = ($this->action == 'modifyNested') ? true : false;\n $modify = $this->modify($nested);\n if ($modify['success']=='1') {\n if (isset($this->values['submit-saveCheck'])) {\n header('Location: '.url($this->type.'/modifyViewCheck/'.$modify['id'], true));\n } else {\n header('Location: '.url($this->type.'/listAdmin', true));\n }\n exit();\n } else {\n $this->messageError = __('errorsForm');\n $this->content = $modify['html'];\n return $ui->render();\n }\n break;\n case 'delete':\n /**\n * This is the action that deletes a record.\n */\n $this->checkLoginAdmin();\n if ($this->id != '') {\n $type = new $this->type();\n $object = $type->readObject($this->id);\n $object->delete();\n }\n header('Location: '.url($this->type.'/listAdmin', true));\n exit();\n break;\n case 'sortSave':\n /**\n * This is the action that saves the order of a list of records.\n * It is used when sorting using the BackEnd.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n $object = new $this->type();\n $newOrder = (isset($this->values['newOrder'])) ? $this->values['newOrder'] : array();\n $object->updateOrder($newOrder);\n break;\n case 'sortList':\n /**\n * This is the action that changes the order of the list.\n */\n $this->checkLoginAdmin();\n $object = new $this->type();\n $info = explode('_', $this->id);\n if (isset($info[1]) && $object->attributeInfo($info[1])!='') {\n $orderType = ($info[0]=='asc') ? 'asc' : 'des';\n Session::set('ord_'.$this->type, $orderType.'_'.$info[1]);\n }\n header('Location: '.url($this->type, true));\n exit();\n break;\n case 'addSimple':\n /**\n * This is the action that adds a simple record.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n $formObject = $this->type.'_Form';\n $form = new $formObject();\n return $form->createFormFieldMultiple();\n break;\n case 'multiple-delete':\n /**\n * This is the action that deletes multiple records at once.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n if (isset($this->values['list-ids'])) {\n $type = new $this->type();\n foreach ($this->values['list-ids'] as $id) {\n $object = $type->readObject($id);\n $object->delete();\n }\n }\n break;\n case 'multiple-activate':\n case 'multiple-deactivate':\n /**\n * This is the action that activates or deactivates multiple records at once.\n * It just works on records that have an attribute named \"active\",\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n if (isset($this->values['list-ids'])) {\n $primary = (string)$this->object->info->info->sql->primary;\n $where = '';\n foreach ($this->values['list-ids'] as $id) {\n $where .= $primary.'=\"'.$id.'\" OR ';\n }\n $where = substr($where, 0, -4);\n $active = ($this->action == 'multiple-activate') ? '1' : '0';\n $query = 'UPDATE '.Db::prefixTable($this->type).' SET active=\"'.$active.'\" WHERE '.$where;\n Db::execute($query);\n }\n break;\n case 'autocomplete':\n /**\n * This is the action that returns a json string with the records that match a search string.\n * It is used for the autocomplete text input.\n */\n $this->mode = 'json';\n $autocomplete = (isset($_GET['term'])) ? $_GET['term'] : '';\n if ($autocomplete!='') {\n $where = '';\n $concat = '';\n $items = explode('_', $this->id);\n foreach ($items as $itemIns) {\n $item = $this->object->attributeInfo($itemIns);\n $name = (string)$item->name;\n if (is_object($item) && $name!='') {\n $concat .= $name.',\" \",';\n $where .= $name.' LIKE \"%'.$autocomplete.'%\" OR ';\n }\n }\n $where = substr($where, 0, -4);\n $concat = 'CONCAT('.substr($concat, 0, -5).')';\n if ($where!='') {\n $query = 'SELECT '.(string)$this->object->info->info->sql->primary.' as idItem, \n '.$concat.' as infoItem\n FROM '.Db::prefixTable($this->type).'\n WHERE '.$where.'\n ORDER BY '.$name.' LIMIT 20';\n $results = array();\n $resultsAll = Db::returnAll($query);\n foreach ($resultsAll as $result) {\n $resultsIns = array();\n $resultsIns['id'] = $result['idItem'];\n $resultsIns['value'] = $result['infoItem'];\n $resultsIns['label'] = $result['infoItem'];\n array_push($results, $resultsIns);\n }\n return json_encode($results); \n }\n }\n break;\n case 'search':\n /**\n * This is the action that does the default \"search\" on a content object.\n */\n $this->checkLoginAdmin();\n if ($this->id != '') {\n $this->content = $this->listAdmin();\n return $ui->render();\n } else {\n if (isset($this->values['search']) && $this->values['search']!='') {\n $searchString = urlencode(html_entity_decode($this->values['search']));\n header('Location: '.url($this->type.'/search/'.$searchString, true));\n } else {\n header('Location: '.url($this->type.'/listAdmin', true));\n } \n }\n break;\n case 'export-json':\n /**\n * This is the action that exports the complete list of objects in JSON format.\n */\n $this->mode = 'ajax';\n $query = 'SELECT * FROM '.Db::prefixTable($this->type);\n $items = Db::returnAll($query);\n $file = $this->type.'.json';\n $options = array('content'=>json_encode($items), 'contentType'=>'application/json');\n File::download($file, $options);\n return '';\n break;\n }\n }", "function execute()\n {\n plugin::execute();\n\n /* Load templating engine */\n $smarty= get_smarty();\n $smarty->assign(\"scalixGroup\", set_post($this->scalixGroup));\n $display= \"\";\n\n /* Do we need to flip is_account state? */\n if (isset($_POST['modify_state'])){\n $this->is_account= !$this->is_account;\n }\n\n /* Show main page */\n $mailboxClasses = array(\"&nbsp;\", \"LIMITED\", \"FULL\");\n $serverLanguages= array(\"&nbsp;\", \"GERMAN\", \"ENGLISH\");\n\n /* Do we represent a valid account? */\n if (!$this->is_account && $this->parent === NULL){\n $display= \"<img alt=\\\"\\\" src=\\\"images/small-error.png\\\" align=\\\"middle\\\">&nbsp;<b>\".\n _(\"This account has no SCALIX extensions.\").\"</b>\";\n\n $display.= back_to_main();\n return ($display);\n }\n\n /* Show tab dialog headers */\n if ($this->parent !== NULL){\n if ($this->is_account){\n $display= $this->show_disable_header(_(\"Remove SCALIX account\"),\n _(\"This account has SCALIX synchronization enabled. You can disable it by clicking below.\"));\n } else {\n $display= $this->show_enable_header(_(\"Create SCALIX account\"), _(\"This account has SCALIX synchronization disabled. You can enable it by clicking below.\"));\n return ($display);\n }\n }\n\n /* Trigger forward add dialog? */\n if (isset($_POST['add_local_forwarder'])){\n $this->forward_dialog= TRUE;\n $this->dialog= TRUE;\n }\n\n /* Cancel forward add dialog? */\n if (isset($_POST['add_locals_cancel'])){\n $this->forward_dialog= FALSE;\n $this->dialog= FALSE;\n }\n\n\n $smarty->assign(\"mailboxClasses\", $mailboxClasses);\n $smarty->assign(\"serverLanguages\", $serverLanguages);\n foreach(array(\"perms\", \"scalixScalixObject\", \"scalixMailnode\", \"scalixAdministrator\", \"scalixMailboxAdministrator\",\n \"scalixServerLanguage\", \"scalixLimitMailboxSize\", \"scalixLimitOutboundMail\", \"scalixEmailAddress\",\n \"scalixLimitInboundMail\", \"scalixLimitNotifyUser\", \"scalixHideUserEntry\", \"scalixMailboxClass\") as $val){\n\n $smarty->assign(\"$val\", set_post($this->$val));\n }\n\n $tmp = $this->plInfo();\n foreach($tmp['plProvidedAcls'] as $name => $desc){\n $smarty->assign($name.\"ACL\", $this->getacl($name));\n }\n\n /* Fill checkboxes */\n if ($this->scalixAdministrator) {\n $smarty->assign(\"scalixAdministrator\", \"checked\");\n } else {\n $smarty->assign(\"scalixAdministrator\", \"\");\n }\n if ($this->scalixMailboxAdministrator) {\n $smarty->assign(\"scalixMailboxAdministrator\", \"checked\");\n } else {\n $smarty->assign(\"scalixMailboxAdministrator\", \"\");\n }\n if ($this->scalixLimitOutboundMail) {\n $smarty->assign(\"scalixLimitOutboundMail\", \"checked\");\n } else {\n $smarty->assign(\"scalixLimitOutboundMail\", \"\");\n }\n if ($this->scalixLimitInboundMail) {\n $smarty->assign(\"scalixLimitInboundMail\", \"checked\");\n } else {\n $smarty->assign(\"scalixLimitInboundMail\", \"\");\n }\n if ($this->scalixLimitNotifyUser) {\n $smarty->assign(\"scalixLimitNotifyUser\", \"checked\");\n } else {\n $smarty->assign(\"scalixLimitNotifyUser\", \"\");\n }\n if ($this->scalixHideUserEntry) {\n $smarty->assign(\"scalixHideUserEntry\", \"checked\");\n } else {\n $smarty->assign(\"scalixHideUserEntry\", \"\");\n }\n\n $display.= $smarty->fetch (get_template_path('generic.tpl', TRUE, dirname(__FILE__)));\n return ($display);\n }", "function publicDefault() {\n\t\n\t\t// if admin rights, redirect to admin page\n\t\tif ($GLOBALS['objUser']->hasAccess(5)) {\n\t\t\tTznUtils::redirect(CMS_WWW_URI.'admin/special.php?module=blog&action=edit&item='.intval($_REQUEST['item']));\n\t\t}\n\t\n\t\t$this->intro = new BlogPostIntro();\n\t\t$this->intro->loadContent($GLOBALS['objPage']->id);\n\t\t\n\t\tif ($this->intro->getOption('member_only') && !$GLOBALS['objUser']->isLoggedIn()) {\n\t\t\n\t\t\t$this->more = new CmsContent();\n\t\t\t$this->more->loadContent($GLOBALS['objPage']->id, 'noaccess');\n\t\t\n\t\t} else {\n\t\t\n\t\t\t// decide submit modes\n\t\t\t$GLOBALS['objCms']->initSubmitting(1,2); // save and save and close\n\t\t\n\t\t\t// initialize object content\n\t\t\t$this->content = new ContentBlog();\n\t\t\t\n\t\t\t// load item if editing\n\t\t\tif ($pItemId = intval($_REQUEST['item'])) {\n\t\t\t\t// error_log('editing #'.$pItemId);\n\t\t\t\t$this->content->loadByFilter('contentId='.$pItemId);\n\t\t\t}\n\t\t\t\n\t\t\t// initialize editor\n\t\t\tif ($GLOBALS['confModule']['blog_post']['post_full']) {\n\t\t\t\t$this->content->initAdmin('Full',2);\n\t\t\t} else {\n\t\t\t\t$this->content->initAdmin('Default',1);\n\t\t\t}\n\t\t\t\n\t\t\t$this->success = false;\n\t\t\t\n\t\t\tif ($GLOBALS['objCms']->submitMode) {\n\t\t\t\n\t\t\t\t$this->content->setHttpAuto();\n\t\t\t\tif ($this->content->check()) {\n\t\t\t\t\t$this->content->pageId = $GLOBALS['objPage']->id;\n\t\t\t\t\t$this->content->_join->setDtm('postDate','NOW');\n\t\t\t\t\t$this->content->save();\n\t\t\t\t\t$this->more = new CmsContent();\n\t\t\t\t\t$this->more->loadContent($GLOBALS['objPage']->id, 'confirm');\n\t\t\t\t\t$this->success = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (!$this->success) {\n\t\t\t\t// get form labels translations\n\t\t\t\t//include CMS_MODULE_PATH.'blog/language/fr.php';\n\t\t\t\t\n\t\t\t\t// set script for form\n\t\t\t\t$GLOBALS['objHeaders']->add('css','form.css');\n\t\t\t\t$GLOBALS['objHeaders']->add('jsScript','common.js');\n\t\t\t\t$GLOBALS['objHeaders']->add('jsScript','admin.js');\n\t\t\t\t$GLOBALS['objHeaders']->add('jsCalendar',array('cms_begin','cms_end'));\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t$this->setView('public');\n\t\n\t}", "function thumbwhere_contentcollection_edit_form_submit(&$form, &$form_state) {\n\n $thumbwhere_contentcollection = entity_ui_controller('thumbwhere_contentcollection')->entityFormSubmitBuildEntity($form, $form_state);\n // Save the thumbwhere_contentcollection and go back to the list of thumbwhere_contentcollections\n\n // Add in created and changed times.\n if ($thumbwhere_contentcollection->is_new = isset($thumbwhere_contentcollection->is_new) ? $thumbwhere_contentcollection->is_new : 0) {\n $thumbwhere_contentcollection->created = time();\n }\n\n $thumbwhere_contentcollection->changed = time();\n\n $thumbwhere_contentcollection->save($transaction);\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollections';\n}", "protected function handlePageEditing() {}", "public function index() {\n $content = $this->lcopun->copun_add_form();\n $this->template->full_admin_html_view($content);\n }", "function psc_manage_forms() {\n\tif(isset($_GET['action'])) {\n\t\tswitch($_GET['action']) {\n\t\t\tcase 'save_captcha_info':\n\t\t\t\tif(wp_verify_nonce($_POST['psc_catch_info'], 'psc_nonce_field')) {\n\t\t\t\t\tpsc_save_api_info($_POST);\n\t\t\t\t}\n\t\t\t\tpsc_admin_index();\n\t\t\t\tbreak;\n\t\t\tcase 'edit_form':\n\t\t\t\tif(isset($_GET['id'])) {\n\t\t\t\t\tif(wp_verify_nonce($_POST['psc_save'], 'psc_nonce_field') && $_POST['psc_id']==$_GET['id']) {\n\t\t\t\t\t\tpsc_save_form($_POST);\n\t\t\t\t\t}\n\t\t\t\t\tpsc_edit_form($_GET['id']);\n\t\t\t\t} else {\n\t\t\t\t\techo 'Error.';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'new_form':\n\t\t\t\tif(wp_verify_nonce($_POST['psc_save'], 'psc_nonce_field')) {\n\t\t\t\t\t$id = psc_save_form($_POST);\n\t\t\t\t}\n\t\t\t\tif(isset($id)) {\n\t\t\t\t\tpsc_edit_form($id);\n\t\t\t\t} else {\n\t\t\t\t\tpsc_edit_form();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\tpsc_admin_index();\n\t}\n\treturn true;\n}", "public function actionAdmin() {\n\t\ttry {\n\t\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.structure.controllers');\n\t\t\t$this->setCurrentNode($this->currentContent->node);\n\t\t\t$content = new FormContent();\n\t\t\t$content->targetContentId = $this->currentContent->contentId;\n\t\t\t$content->selected = false;\n\n\t\t\t$contentCriteriaBuilder = new CriteriaBuilder('content');\n\t\t\t$contentCriteriaBuilder->filterBy('contentId', $this->currentContent->contentId);\n\n\t\t\t$this->render('admin', array(\n\t\t\t\t'breadcrumb' => $this->buildBreadcrumb($this->currentContent->contentId),\n\t\t\t\t'mainMenu' => $this->buildMainMenu(2, 4),\n\t\t\t\t'content'=>$content,\n\t\t\t\t'sourceContent'=>$this->currentContent,\n\t\t\t\t'node' => $this->currentNode,\n\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false))\n\t\t\t));\n\t\t} catch(\\Exception $e) {\n\t\t\t\\Yii::log('Error in '.__METHOD__.'():'.$e->getMessage(), \\CLogger::LEVEL_ERROR, 'sweelix.yii1.admin.structure.controllers');\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function question_content() {\r\n $this->check_permission(19);\r\n $content_data['add'] = $this->check_page_action(19, 'add');\r\n\r\n $this->quick_page_setup(Settings_model::$db_config['adminpanel_theme'], 'adminpanel', $this->lang->line('question_content'), 'operation/question_content', 'header', 'footer', '', $content_data);\r\n }", "function nrelate_admin_do_page() { ?> \n\n\t\t<div id=\"nr-admin-settings\" class=\"postbox\">\n\t\t\t<h3 class=\"hndle\"><span><?php _e('Common settings for all nrelate products:')?></span></h3>\n\t\t\t\t<ul class=\"inside\">\n\t\t\t\t\t<?php $connectionstatus = update_nrelate_admin_data();\n\t\t\t\t\tif($connectionstatus !=\"Success\"){\n\t\t\t\t\t\techo \"<h1 style='color:red;font-size:16px;'>\".$connectionstatus.\"</h1>\";\n\t\t\t\t\t} ?>\n\t\t\t\t\t<form name=\"settings\" action=\"options.php\" method=\"post\" enctype=\"multipart/form-action\">\n\t\t\t\t\t\t<?php settings_fields('nrelate_admin_options'); ?>\n\t\t\t\t\t\t<?php do_settings_sections(__FILE__);?>\n\t\t\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t\t\t<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes','nrelate'); ?>\" <?php echo NRELATE_API_ONLINE ? '' : 'disabled=\"disabled\" title=\"Sorry nrelate\\'s api server is not available. Please try again later\"'; ?> />\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</form>\n\t\t\t\t</ul><!-- .inside -->\n\t\t</div><!-- #nr-admin-settings -->\n\t\t<script type=\"text/javascript\">getnrcode(\"<?php echo NRELATE_BLOG_ROOT; ?>\",\"<?php echo NRELATE_LATEST_ADMIN_VERSION; ?>\",\"<?php echo get_option('nrelate_key');?>\");</script>\n<?php\n\t\n\tupdate_nrelate_admin_data();\n}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\n\t\t\t// initialize doc\n\t\t$this->doc = t3lib_div::makeInstance('template');\n\t\t$this->doc->setModuleTemplate(t3lib_extMgm::extPath('ics_utopia') . 'mod3/mod_template.html');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$docHeaderButtons = $this->getButtons();\n\n\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t// Draw the form\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\t\t\t$docHeaderButtons['save'] = '';\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\n\t\t\t// compile document\n\t\t$markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);\n\t\t$markers['CONTENT'] = $this->content;\n\n\t\t\t\t// Build the <body> for the module\n\t\t$this->content = $this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);\n\t\t$this->content.= $this->doc->endPage();\n\t\t$this->content = $this->doc->insertStylesAndJS($this->content);\n\t\n\t}", "function perform()\r\n {\r\n // init variables (see private function below)\r\n $this->initVars();\r\n\r\n // Should we show and allow article comments and show the comment form\r\n //\r\n // $this->config->getModuleVar('article', 'use_comment') == 1\r\n // --------------------------------------------\r\n // global enables comments for all articles\r\n //\r\n // $this->config->getModuleVar('article', 'allow_comment') == 1\r\n // ----------------------------------------------\r\n // Allow comments for just this article\r\n //\r\n //\r\n // Do we show comments but not the add comment form?\r\n // Means: Visitors cant add no more comments\r\n //\r\n if($this->viewVar['article']['close_comment'] == 0)\r\n {\r\n $this->viewVar['showCommentForm'] = true;\r\n\r\n // add or preview comment\r\n if(!empty($this->previewComment))\r\n {\r\n $this->previewComment();\r\n }\r\n else\r\n {\r\n if(false !== ($num = $this->model->session->get('c_submit_number')))\r\n {\r\n $addComment = $this->httpRequest->getParameter( 'addComment'.$num, 'post', 'alnum' );\r\n if(false !== $addComment)\r\n {\r\n $this->addComment();\r\n }\r\n }\r\n else\r\n {\r\n \t// simple anti spam methode\r\n \t//\r\n $trial = $this->httpRequest->getParameter( 'trial', 'post', 'alnum' );\r\n if(false !== $trial)\r\n {\r\n $_txt = \"\\n################# Blog ####################\\n\";\r\n $_txt .= \"Date: \".date('Y-m-d H:i:s').\"\\n\";\r\n $_txt .= \"IP: \".$_SERVER[\"REMOTE_ADDR\"].\"\\n\";\r\n $_txt .= \"Agent: \".$_SERVER[\"HTTP_USER_AGENT\"].\"\\n\";\r\n $_txt .= \"Name: \".JapaCommonUtil::stripSlashes(trim($this->httpRequest->getParameter( 'cauthor', 'post', 'raw' )));\r\n $_txt .= \"\\nEmail: \".JapaCommonUtil::stripSlashes(trim($this->httpRequest->getParameter( 'cemail', 'post', 'raw' )));\r\n $_txt .= \"\\nBody: \".JapaCommonUtil::stripSlashes(trim($this->httpRequest->getParameter( 'cbody', 'post', 'raw' )));\r\n\r\n @error_log($_txt, 3, JAPA_APPLICATION_DIR . \"logs/wrong_button.log\");\r\n }\r\n }\r\n }\r\n\r\n $this->viewVar['c_submit_number'] = rand(1,19);\r\n $this->model->session->set('c_submit_number', $this->viewVar['c_submit_number']);\r\n\r\n // get article comments\r\n $this->model->action('article','comments',\r\n array('result' => & $this->viewVar['articleComments'],\r\n 'id_article' => (int)$this->viewVar['article']['id_article'],\r\n 'status' => array('=', 2),\r\n 'fields' => array('id_comment','pubdate',\r\n 'body','id_user',\r\n 'author','email','url') ));\r\n\r\n // add html code to comments\r\n foreach($this->viewVar['articleComments'] as & $comment)\r\n {\r\n $comment['body'] = $this->addHtmlToComments( $comment['body'] );\r\n }\r\n }\r\n }", "function handleAdministration() {\n if (! isset ($_POST[\"adminaction\"])) { // no administration needed\n return;\n }\n\n if (! $_SESSION[\"isadmin\"]) { // user is not admin\n showFrame(\"Příklady může upravovat pouze administrátor!\", false);\n return;\n }\n\n switch ($_POST[\"adminaction\"]) {\n case \"addproblem\":\n addProblem();\n break;\n\n case \"saveproblem\":\n saveProblem();\n break;\n\n case \"deleteproblem\":\n if (! isset ($_POST[\"deletecheck\"])) { // misclick protection\n showFrame(\"Při mazání musí být zaškrtnuto políčko <b>Smazat</b>.\", false);\n return;\n }\n deleteProblem();\n break;\n\n default:\n showFrame(\"Neplatná hodnota položky <b>adminaction</b>\", false);\n return;\n }\n}", "function ctools_ads_include_page_content_type_edit_form_submit($form, &$form_state) {\n foreach (array('page_name') as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n}", "public function adminActionPost() : object\n {\n $page = $this->app->page;\n $session = $this->app->session;\n $request = $this->app->request;\n $response = $this->app->response;\n $db = $this->app->db;\n $title = \"Redigera inlägg\";\n $doEdit = $request->getPost(\"doEdit\");\n if ($doEdit) {\n $contentId = $request->getPost(\"doEdit\");\n $db->connect();\n $sql = \"SELECT * FROM content WHERE id = ?;\";\n $resultset = $db->executeFetchAll($sql, [$contentId]);\n $session->set(\"content\", $resultset[0]);\n $session->set(\"adminid\", $contentId);\n $pretitle = $resultset[0]->title;\n $title = slugify($pretitle);\n return $response->redirect(\"cms/edit/{$title}\");\n }\n\n $page->add(\"cms/header\");\n $page->add(\"cms/admin\", [\n \"resultset\" => $resultset\n ]);\n \n return $page->render([\n \"title\" => $title\n ]);\n }", "function content_form($post_type,$post_id = '',$action='',$thankyou = array()){\n\t$app = \\Jolt\\Jolt::getInstance();\n\t//\tgrab blueprint based on content type..\n\t$blueprint = $app->store('blueprints');\n\t$blueprint = $blueprint[ $post_type ];\n//\tprint_r( $blueprint );\n\t$nonce = generate_nonce();\n\n\tif( isset($_POST['title']) ){\n//\t\tprint_r($_POST);\n\t\t$c_url = site_url().$_SERVER['REQUEST_URI'];\n\t\t$post \t\t\t\t= array();\n\t\t$post['title'] \t\t= $_POST['title'];\n\t\t$post['name'] \t\t= new_slug( slugify( $_POST['title'] ) );\n\t\t$post['type'] \t\t= $post_type;\n\t\t$post['user_id'] \t= '';\n\t\t$post['date'] \t\t= date('Y-m-d H:i:s');\n\t\t$post['modified']\t= date('Y-m-d H:i:s');\n\t\t$post['password'] \t= '';\n\t\t$post['status'] \t= 'draft';\t//\tregardless of post type, we never want a post actually published from here..\n\t\t$post['parent'] \t= 0;\n\t\t$post['guid'] \t\t= generate_uuid();\n\t\t$post['category'] \t= '';\n\t\t$restricted = array('_id','title','name','user_id','date','modified','guid','type','status','parent','password');\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\t//\tThere are fields we don't want to change... This makes sure we don't...\n\t\t\tif( in_array($restricted,$fname) )\tcontinue;\n\t\t\tif( !isset($_POST[ $fname ]) ){\n\t\t\t\tif( $field['type'] == 'related' ){\n\t\t\t\t\t$_POST[ $fname ] = array();\n\t\t\t\t}else{\n\t\t\t\t\t$_POST[ $fname ] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach($_POST as $k=>$v){\n\t\t\tif( isset($post[$k]) )\tcontinue;\n\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t$post[$k] = $v;\n\t\t}\n\t\tif( isset($_FILES) ){\n\t\t\tforeach($_FILES as $k=>$file){\n\t\t\t\tif( in_array($restricted,$k) )\tcontinue;\n\t\t\t\t$uploaddir = $this->app->store('upload_path');\n\t\t\t\t$uploadfile = $uploaddir . basename($file['name']);\n\t\t\t\t$uploadurl = $this->app->store('upload_url') . basename($file['name']);\n\t\t\t\tif( file_exists($uploadfile) ){\n\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t}else{\n\t\t\t\t\tif ( move_uploaded_file($file['tmp_name'], $uploadfile) ) {\n\t\t\t\t\t\t$post[$k] = $uploadurl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$app->db->insert('post', $post );\n\t\tunset($_POST);\n\t\tif( isset($thankyou['url']) ){\n\t\t\techo '<script>top.location.href=\"'.$thankyou['url'].'\";</script>';\n\t\t}else if( isset($thankyou['msg']) ){\n\t\t\techo '<p>'.$thankyou['msg'].'</p>';\n\t\t}else{\n\t\t\techo '<p><strong>Thank you, your post has been saved.</strong></p>';\n\t\t}\n\t}\n?>\n\t<form role=\"form\" method=\"POST\" action=\"<?php echo $action?>\" enctype=\"multipart/form-data\">\n\t<input type=\"hidden\" name=\"nonce\" value=\"<?php echo $nonce?>\" />\n\t<fieldset>\n\t\t<div class=\"form-group\">\n\t\t\t<label for=\"title\"><?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Title\")?></label>\n\t\t\t<input type=\"text\" class=\"form-control\" id=\"title\" name=\"title\" placeholder=\"<?=( isset($blueprint['titlelabel']) ? $blueprint['titlelabel'] : \"Enter Title\")?>\" value=\"<?php echo ( isset($post) ? $post['title'] : '');?>\" required>\n\t\t</div>\n<?php\n\t\tforeach($blueprint['fields'] as $fname=>$field ){\n\t\t\tif( $field['adminonly'] )\tcontinue;\n\t\t\tform_field($fname,$field,$post);\n\t\t}\n?>\n\t\t<button type=\"submit\" class=\"btn btn-primary\">Save</button>\n\t</fieldset>\n\t</form>\n<?php\n}", "function edit_page()\n\t{\n\t\tglobal $errors, $cache, $security, $basic_gui;\n\t\t\n\t\t// basic error check\n\t\tif ( !isset( $_POST[ 'submit_page' ] ) )\n\t\t{\n\t\t\t$errors->report_error( $this->lang[ 'Wrong_form' ], CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t// get data\n\t\t$title = ( isset( $_POST[ 'title' ] ) ) ? strval( $_POST[ 'title' ] ) : '';\n\t\t$lang = ( isset( $_POST[ 'language' ] ) ) ? strval( $_POST[ 'language' ] ) : '';\n\t\t$text = str_replace( '&nbsp;', ' ', $basic_gui->gennuline( ( isset( $_POST[ 'editor1' ] ) ) ? strval( $_POST[ 'editor1' ] ) : '' ) );\n\t\t$auth = ( isset( $_POST[ 'auth' ] ) ) ? intval( $_POST[ 'auth' ] ) : GUEST;\n\t\t$remove = ( isset( $_POST[ 'remove' ] ) && $_POST[ 'remove' ] == 'on' ) ? TRUE : FALSE;\n\t\t\n// \t\t$text = str_replace( \"\\n\", '<br />', $text );\n\t\t\n\t\tif ( empty( $title ) || empty( $text ) )\n\t\t{ // need these\n\t\t\t$errors->report_error( $this->lang[ 'No_data' ], GENERAL_ERROR );\n\t\t}\n\t\t\n\t\t// save to the array\n\t\tif ( !is_array( $this->pages_array[ $lang ] ) )\n\t\t{ // make it an array, just to be sure\n\t\t\t$this->pages_array[ $lang ] = array();\n\t\t}\n\t\tif ( !$remove )\n\t\t{\n\t\t\t$pag = array( 'content' => $text, 'auth' => $auth );\n\t\t\t$this->pages_array[ $lang ][ $title ] = $pag;\n\t\t}else\n\t\t{\n\t\t\tunset( $this->pages_array[ $lang ][ $title ] );\n\t\t}\n\t\t\n\t\t// now write it\n\t\t$this->save_pages();\n\t\t\n\t\t$errors->report_error( $this->lang[ 'Edited' ], MESSAGE );\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\">';\n\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL) {\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . intval($this->id) . ';\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br>\".$LANG->sL(\"LLL:EXT:lang/locallang_core.php:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content .= $this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content .= $this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content .= $this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "private function actions() {\n\n\t\t// Load plugin textdomain\n\t\tadd_action( 'init', array( $this, 'load_textdomain' ) );\n\n\t\t// Register our post type\n\t\tadd_action( 'init', array( $this, 'post_type' ) );\n\n\t\t// Modify the post type save messages\n\t\tadd_filter( 'post_updated_messages', array( $this, 'save_messages' ) );\n\n\t\t// Add Notice type to submit box\n\t\tadd_action( 'post_submitbox_start', array( $this, 'submit_box' ) );\n\n\t\t// Save notice Type\n\t\tadd_action( 'save_post', array( $this, 'save_type' ) );\n\n\t\t// Add notices to the top of forums and topics\n\t\tadd_action( 'bbp_template_before_forums_index', array( $this, 'show_notices' ) );\n\t\tadd_action( 'bbp_template_before_single_forum', array( $this, 'show_notices' ) );\n\t\tadd_action( 'bbp_template_before_single_topic', array( $this, 'show_notices' ) );\n\t}", "function admin_page(){\n \n $loaderImagePath = plugin_dir_url( __FILE__ ).'images/preloader-dots.gif';\n $this->processForm();\n\n $html = '';\n \n $html .= '<div class=\"wrap maincont\" align=\"center\">';\n $html .= '<p class=\"heading_title\">Rss Multi Updater</p>'; \n $html .= '<div class=\"aw_content_Section\">';\n\n $html .= '<form action=\"\" method=\"POST\">';\n $html .= $this->getBlogList();\n $html .= '&nbsp;&nbsp;';\n $html .= '<input type=\"hidden\" value=\"1\" name=\"rssMultiUpdate\">';\n $html .= '<div><input type=\"submit\" id=\"rmu_submit\" value=\"Update Rss\" class=\"submit_btn\"></div>';\n $html .= '<form>';\n $html .= '</div>'; \n $html .= '<div class=\"aw_content_message\">';\n $html .= '<div class=\"rmu_loader\"><img src=\"'.$loaderImagePath.'\"/></div>';\n $html .= '<div class=\"aw_message_Section\" id=\"rmu_update_message\">';\n $html .= '<div> <h1>Blog(s) Updated</h1> </div>';\n $html .= '</div>';\n $html .= '</div>';\n $html .= '</div>';\n\n echo $html;\n }", "function PostActions()\n {\n }", "function performDataAction()\n{\n\tglobal $ajax;\n\n\t// XXX Set one and delete the other. This directly ties into\n\t// what HTTP method is being used: POST or GET.\n\t$key = getPostValue('assignment');\n\t$step = getPostValue('assignstep');\n\n\t// Render page.\n\t$html = formPage($key, $step);\t\n\t$ajax->sendCommand(ajaxClass::CMD_WMAINPANEL, $html);\n}", "function main() {\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tprint_r($_POST);\n\t\t\techo \"<br />\";\n\t\t\t\n\t\t\t// Required Fields in the POST data //\t\t\t\n\t\t\tif ( !isset($_POST['_type']) ) return;\n\t\t\tif ( !isset($_POST['_subtype']) ) return;\n\t\t\tif ( !isset($_POST['_name']) ) return;\n\t\t\tif ( !isset($_POST['_mail']) ) return;\n\t\t\tif ( !isset($_POST['_password']) ) return;\n\t\t\tif ( !isset($_POST['_publish']) ) return;\n\t\n\t\t\t// Node Type //\n\t\t\t$type = sanitize_NodeType($_POST['_type']);\n\t\t\tif ( empty($type) ) return;\t\n\n\t\t\t$subtype = sanitize_NodeType($_POST['_subtype']);\n\t\n\t\t\t// Name/Title //\n\t\t\t$name = $_POST['_name'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Slug //\n\t\t\tif ( empty($_POST['_slug']) )\n\t\t\t\t$slug = $_POST['_name'];\n\t\t\telse\n\t\t\t\t$slug = $_POST['_slug'];\n\t\t\t$slug = sanitize_Slug($slug);\n\t\t\tif ( empty($slug) ) return;\n\t\t\t\n\t\t\t// TODO: Confirm slug is legal\n\t\t\t\t\n\t\t\t// Body //\n\t\t\t$body = $_POST['_body'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Do we publish? //\n\t\t\t$publish = mb_strtolower($_POST['_publish']) == \"true\";\n\t\t\t\n\t\t\t// Email //\n\t\t\t$mail = sanitize_Email($_POST['_mail']);\n\t\t\tif ( empty($mail) ) return;\n\n\t\t\t// Password //\n\t\t\t$password = $_POST['_password'];\n\t\t\tif ( empty($password) ) return;\n\n\t\n\t\t\t$id = node_Add(\n\t\t\t\t$type,$subtype,$slug,$name,$body,\n\t\t\t\t0,2,\n\t\t\t\t$publish\n\t\t\t);\n\t\t\t\n\t\t\tuser_Add($id,$mail,$password);\n\t\n\t\t\techo \"Added \" . $id . \".<br />\";\n\t\t\techo \"<br />\";\n\t\t}\n\t}", "public function run () {\n $PAGINATION_LIMIT = 10;\n $session = Session::getInstance ();\n $user = $session->getUser ();\n\n if (!$user || !$user->isAdmin ()) {\n $session->setMessage (\"Do not have permission to access\", Session::MESSAGE_ERROR);\n header (\"Location: \" . BASE_URL);\n return;\n }\n\n $page = (isset ($_GET[\"page\"]) && is_numeric ($_GET[\"page\"])) ? intval ($_GET[\"page\"]) : 1;\n if ($page < 1) {\n $page = 1;\n }\n $action = isset ($_GET[\"action\"]) ? trim ($_GET[\"action\"]) : \"\";\n\n $articleDAO = ArticleDAO::getInstance ();\n $article_array = $paginator_page = null;\n $content_title = \"\";\n \n if (!empty ($_POST) && !empty ($_POST[\"ids\"]) && !empty ($_POST[\"action\"])) {\n $action = isset ($_POST[\"action\"]) ? trim ($_POST[\"action\"]) : \"\";\n if (!strcmp ($action, \"delete\") == 0) {\n header (\"Location: \" . BASE_URL);\n return;\n }\n\n $status = $articleDAO->deleteByIds ($_POST[\"ids\"]);\n if ($status) {\n $session->setMessage (\"Selected pages deleted\");\n header (\"Location: {$_SERVER[\"PHP_SELF\"]}\");\n return;\n }\n else {\n $session->setMessage (\"Deletion failed\", Session::MESSAGE_ERROR);\n header (\"Location: {$_SERVER[\"PHP_SELF\"]}\");\n return;\n }\n }\n else if (strcmp ($action, \"delete\") == 0 && !empty ($_GET[\"ids\"])) {\n $content_title = \"Delete Articles\";\n $article_array = $articleDAO->allByIds ($_GET[\"ids\"]);\n }\n else if (strcmp ($action, \"delete\") == 0) {\n }\n else {\n $count = $articleDAO->count ();\n $paginator = new Paginator ($count, $PAGINATION_LIMIT);\n $paginator_page = $paginator->getPage ($page);\n $article_array = $articleDAO->all (array (\"limit\" => $paginator_page));\n }\n\n $this->template->render (array (\n \"title\" => \"Admin - Article Options\",\n \"main_page\" => \"article_options_tpl.php\",\n \"session\" => $session,\n \"article_array\" => $article_array,\n \"paginator_page\" => $paginator_page,\n \"action\" => $action,\n \"content_title\" => $content_title,\n ));\n }", "function mpm_page_admin() {\n\tglobal $wpdb;\n\tglobal $mpm_version;\n\tglobal $plugin_domain;\n\n\t//load translations\n\tload_plugin_textdomain($plugin_domain);\n?>\n\n<div class=\"wrap\">\n\t<div id=\"icon-tools\" class=\"icon32\"></div>\n\t<h2><?php _e('Mass Page Maker ' . $mpm_version, $plugin_domain);?></h2>\n\n<?php\tif (isset($_GET['action']) && $_GET['action'] == 'submit' && !empty($_POST)) {\n\t\t\t$result = mpm_process_inputs($_POST);\n\t\t\t$show = $result['show'];\n\t\t\tmpm_show_message($result['message']);\n\t\t} else\n\t\t\t$show = true;\n\tif ($show) { ?>\n\t<?php\n\tif (!get_option('mpm_hide_message'))\n\t\tmpm_show_message(__('As a result of WordPress plugin repository policies, this version of the plugin has now been limited to 10 posts or less using only the web interface. This public version has received user interface updates to make importing web posts easier, but to continue using CSV import, please purchase <a href=\"http://www.wesg.ca/wordpress-plugins/mass-page-maker-pro/\" target=\"_blank\">Mass Page Maker Pro</a>. If you\\'d prefer, you may continue to use the older version of the complete plugin <a href=\"http://www.wesg.ca/ft7\">available here</a>. <a href=\"#\" onclick=\"return mpm_dismiss_plugin_message()\">Dismiss Message</a>', $plugin_domain)); ?>\n\t<p><?php _e('From this page, you can create as many posts or pages as you like, but keep server capability and memory in mind. Customize every aspect of the pages using the options below. Use [+] to insert the incremental value for the pages. The increment can be used in the title, content, excerpt and menu order field.', $plugin_domain); ?></p>\n\t<p><?php _e('To keep the web interface straightforward, it no longer supports unique post titles, content or excerpts. To create unique pages, please use a CSV file.', $plugin_domain); ?></p>\n\t<p><?php _e('Set the post time for the future, past or present. Add a time interval for separating pages. For dates in the future, the pages are added to the publishing queue.', $plugin_domain); ?></p>\n\t<p><?php _e('You may use placeholders to enter standard information into the page title, page content, page excerpt using the web interface. Use <strong>[blog_title]</strong>, <strong>[blog_description]</strong>, <strong>[blog_url]</strong> or <strong>[page_title]</strong>.', $plugin_domain); ?></p>\n\t<p><?php _e('Using the core WordPress post creating system, this plugin has a fairly high post limit. The primary limit is your patience.', $plugin_domain);?></p>\n\t<p><?php _e('Plugin translations are welcome! Use Twitter or my website to get in contact and provide the required files.', $plugin_domain); ?></p>\n\n<?php wp_nonce_field('update-options'); ?>\n\n<form name=\"mass_page\" id=\"mass_page_form\" method=\"post\" action=\"<?php echo add_query_arg(array('action' => 'submit')); ?>\" enctype=\"multipart/form-data\">\n<input name=\"active-section\" value=\"\" id=\"active-section\" type=\"hidden\">\n\n\t\t<p><strong>* Required</strong></p>\n\t\t<table class=\"form-table\" border=\"0\" id=\"web-input\">\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Number of pages', $plugin_domain); ?>*</th>\n\t\t\t\t<td><input type=\"text\" name=\"number_pages\" size=\"4\" class=\"required\"> <span class=\"description\">Limit 10. To create more, please use <a href=\"http://www.wesg.ca/wordpress-plugins/mass-page-maker-pro/\">Mass Page Maker Pro</a></span></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Start of page increment', $plugin_domain); ?></td>\n\t\t\t\t<td><input type=\"text\" name=\"start_number\" size=\"4\"></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Starting page order', $plugin_domain); ?></th>\n\t\t\t\t<td><input type=\"text\" name=\"order\" size=\"4\"></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Starting date', $plugin_domain); ?></th><td><input type=\"text\" name=\"start_date\" id=\"start_date\" size=\"24\"> <span class=\"description\"><em><?php _e('Use the format YYYY-MM-DD HH:MM:SS', $plugin_domain); ?></span></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Post Interval', $plugin_domain); ?></th>\n\t\t\t\t<td><input type=\"text\" name=\"post_interval\" size=\"8\"> <span class=\"description\"><?php _e('Use the format HH:MM:SS', $plugin_domain); ?></span></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Page Title', $plugin_domain); ?>*</th>\n\t\t\t\t<td><input type=\"text\" name=\"page_title\" size=\"81\" class=\"required\"></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Page Content', $plugin_domain); ?></th>\n\t\t\t\t<td><textarea name=\"page_content\" cols=\"80\" rows=\"8\"></textarea></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Page Excerpt', $plugin_domain); ?></th>\n\t\t\t\t<td><textarea name=\"page_excerpt\" cols=\"80\" rows=\"8\"></textarea></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Page Category', $plugin_domain); ?></th>\n\t\t\t\t<td><input type=\"button\" class=\"button-secondary\" value=\"<?php _e(\"Add Category\", $plugin_domain); ?>\" onclick=\"addCategory()\"></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\" class=\"category-row\">\n\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t<td><?php wp_dropdown_categories(array('show_count' => 1, 'hide_empty' => 0, 'name' => 'categories[]')); ?></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Page Parent', $plugin_domain); ?></th>\n\t\t\t\t<td>\n\t\t\t\t\t<?php wp_dropdown_pages(array('show_option_no_change' => 'None', 'name' => 'parent_id')); ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php if ( 0 != count( get_page_templates() ) ) { ?>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<td><?php _e('Page Template') ?></td>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"page_template\" id=\"page_template\">\n\t\t\t\t\t\t<option value='default'><?php _e('Default Template'); ?></option>\n\t\t\t\t\t\t<?php page_template_dropdown(); ?>\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php } ?>\n\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Page type', $plugin_domain); ?></th>\n\t\t\t\t<td><?php mpm_post_types(); ?></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Comments Open', $plugin_domain); ?></th>\n\t\t\t\t<td><input type=\"checkbox\" name=\"comments\" value=\"1\" checked></td>\n\t\t\t</tr>\n\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Pings Open', $plugin_domain); ?></th>\n\t\t\t\t<td><input type=\"checkbox\" name=\"pings\" value=\"1\" checked></td>\n\t\t\t</tr>\n\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Page status', $plugin_domain); ?></th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"radio\" name=\"page_status\" value=\"publish\" checked>&nbsp;<?php _e('Published', $plugin_domain); ?>\n\t\t\t\t\t<input type=\"radio\" name=\"page_status\" value=\"draft\">&nbsp;<?php _e('Draft', $plugin_domain); ?>\n\t\t\t\t\t<input type=\"radio\" name=\"page_status\" value=\"pending\">&nbsp;<?php _e('Pending Review', $plugin_domain); ?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\"><?php _e('Page visibility', $plugin_domain); ?></th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"radio\" name=\"post_visibility\" value=\"public\" checked>&nbsp;<?php _e('Public', $plugin_domain); ?>\n\t\t\t\t\t<input type=\"radio\" name=\"post_visibility\" value=\"private\">&nbsp;<?php _e('Private', $plugin_domain); ?>\n\t\t\t\t\t<input type=\"radio\" name=\"post_visibility\" value=\"password\">&nbsp;<?php _e('Password', $plugin_domain); ?> <input type=\"text\" name=\"post_password\">\n\t\t\t\t\t<p class=\"sticky-options\"><input type=\"checkbox\" name=\"sticky_post\" value=\"1\"> <?php _e('Sticky post', $plugin_domain); ?></p>\n\t\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<td colspan=\"3\"><h4><?php _e('Custom Fields', $plugin_domain); ?></h4></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<td colspan=\"3\"><?php _e('Add custom fields to your posts, with a single key/value in their respective box. Each post will contain the same data, which is added to the <code>wp_postmeta</code> database table.', $plugin_domain); ?></td>\n\t\t\t</tr>\n\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<td colspan=\"3\"><input type=\"button\" id=\"add-custom-field\" onclick=\"addCustomField()\" value=\"Add Custom Field\" class=\"button-secondary\"></td>\n\t\t\t</tr>\n\n\t\t\t<tr valign=\"top\" id=\"meta-fields-section\">\n\t\t\t\t<th scope=\"row\" width=\"33%\"><?php _e('Name', $plugin_domain); ?></th>\n\t\t\t\t<th scope=\"row\"><?php _e('Value', $plugin_domain); ?></th>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\" class=\"meta-fields\">\n\t\t\t\t<td><textarea name=\"meta_keys[]\" cols=\"40\" rows=\"2\"></textarea></td>\n\t\t\t\t<td><textarea name=\"meta_values[]\" cols=\"40\" rows=\"2\"></textarea></td>\n\t\t\t</tr>\n\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<td colspan=\"3\" width=\"33%\"><h4><?php _e('Tags', $plugin_domain); ?></h4></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<td colspan=\"3\"><?php _e('All posts entered here will have the same tags. For separate tags on each post, use a CSV file with <a href=\"http://www.wesg.ca/wordpress-plugins/mass-page-maker-pro/\">Mass Page Maker Pro</a>.', $plugin_domain); ?></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<td colspan=\"3\"><input type=\"button\" id=\"add-tag-field\" onclick=\"addTagField()\" value=\"Add Tag\" class=\"button-secondary\"></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\" id=\"tag-fields-section\" class=\"tag-fields\">\n\t\t\t\t<td colspan=\"3\"><input name=\"tags_input[]\" type=\"text\" size=\"40\"></td>\n\t\t\t</tr>\n\n\n\t\t</table>\n\n<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"Submit\" value=\"<?php _e('Add Pages', $plugin_domain) ?>\" /></p>\n</form>\n<?php } ?>\n\n<div id=\"meta\">\n\t<p>\n\t\t<strong>Plugin by wesg</strong> &ndash;\n\t\t<a href=\"http://www.wesg.ca\" target=\"_blank\">www.wesg.ca</a> &ndash;\n\t\t<a href=\"http://twitter.com/wesgood\" target=\"_blank\">Twitter</a> &ndash;\n\t\t<a href=\"http://www.wesg.ca/wordpress-plugins/mass-page-maker/\" target=\"_blank\">Plugin Documentation</a> &ndash;\n\t\t<a href=\"http://www.wesg.ca/wordpress-plugins/\" target=\"_blank\">Complete plugin list</a> &ndash;\n\t\t<strong><a href=\"http://www.wesg.ca/wordpress-plugins/mass-page-maker-pro/\" target=\"_blank\">Get Mass Page Maker Pro</a></strong>\n\t</p>\n</div>\n\n</div>\n<?php\n}", "public function add_content() {\n $data['title'] = translate('add') . \" \" . translate('content_management');\n $this->load->view('admin/master/add_update_content', $data);\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 add(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$admin = $this->_map_posted_data();\n\t\t\t\t$this->adminrepository->insert($admin);\n\t\t\t\theader(\"Location: \".BASE_URL.\"admin/admin\");\n\n\t\t\t}else{\n\t\t\t\t$view_page =\"adminsview/add\";\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t\t}\n\t\t}", "function post_handler() {\r\n\r\n if ($this->action == 'new' or $this->action == 'edit') { # handle new-save\r\n # check permission first\r\n if ( ($this->action == 'new' and !$this->allow_new) or ($this->action == 'edit' and !$this->allow_edit) )\r\n die('Permission not given for \"'.$this->action.'\" action.');\r\n\r\n $_REQUEST['num_row'] = intval($_REQUEST['num_row']) > 0? intval($_REQUEST['num_row']): 1; # new row should get the number of row to insert from num_row\r\n # import suggest field into current datasource (param sugg_field[..]). note: suggest field valid for all rows\r\n if ($this->action == 'new')\r\n $this->import_suggest_field_to_ds();\r\n # only do this if post come from edit form. bground: browse mode now can contain <input>, which value got passed to edit/new mode\r\n if ($this->_save == '') { # to accomodate -1 (preview)\r\n\t\t\t\treturn False;\r\n\t\t\t}\r\n\r\n $this->import2ds(); # only do this if post come from edit form. bground: browse mode now can contain <input>, which value got passed to edit/new mode\r\n $this->db_count = $_REQUEST['num_row']; # new row should get the number of row to insert from num_row\r\n # check requirement\r\n\r\n if (!$this->validate_rows()) # don't continue if form does not pass validation\r\n return False;\r\n\r\n if ($this->action == 'new') {\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n if (!$this->check_datatype($i)) { # check duplicate index\r\n return False;\r\n }\r\n\r\n if (!$this->check_duplicate_index($i)) { # check duplicate index\r\n return False;\r\n }\r\n if (!$this->check_insert($i)) { # check insertion\r\n return False;\r\n }\r\n }\r\n\r\n if ($this->preview[$this->action] and $this->_save == -1) { # show preview page instead\r\n $this->_preview = True;\r\n return False;\r\n }\r\n\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n $this->insert($i);\r\n }\r\n\r\n if ($this->_go != '') {\r\n while (@ob_end_clean());\r\n header('Location: '.$this->_go);\r\n exit;\r\n }\r\n }\r\n elseif ($this->action == 'edit') {\r\n $this->populate($this->_rowid, True);\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n #~ if (!$this->check_duplicate_index($i)) { # check duplicate index\r\n #~ return False;\r\n #~ }\r\n if (!$this->check_update($i)) { # check insertion\r\n return False;\r\n }\r\n }\r\n\r\n if ($this->preview[$this->action] and $this->_save == -1) { # show preview page instead\r\n $this->_preview = True;\r\n return False;\r\n }\r\n\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n $this->update($i);\r\n }\r\n\r\n if ($this->_go != '') {\r\n #~ include('footer.inc.php');\r\n header('Location: '.$this->_go);\r\n exit;\r\n }\r\n }\r\n }\r\n elseif ($this->action == 'csv') {\r\n /* generate CSV representation of loaded datasource\r\n http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm\r\n */\r\n if (AADM_ON_BACKEND!=1)\r\n die('Permission not given for \"'.$this->action.'\" action.');\r\n $this->browse_rows = 0; # show all data\r\n $this->populate();\r\n $rows = array();\r\n $fields = array();\r\n foreach ($this->properties as $colvar=>$col) {\r\n $vtemp = $this->ds->{$colvar}[$i];\r\n $vtemp = str_replace('\"','\"\"',$vtemp);\r\n $vtemp = (strpos($vtemp,',') === false and strpos($vtemp,'\"') === false and strpos($vtemp,\"\\n\") === false)? $vtemp: '\"'.$vtemp.'\"';\r\n $fields[] = (strpos($col->label,',') === false)? $col->label: '\"'.$col->label.'\"';\r\n }\r\n $rows[] = join(',',$fields);\r\n for ($i = 0; $i < $this->db_count; $i++) {\r\n $fields = array();\r\n foreach ($this->properties as $colvar=>$col) {\r\n $vtemp = $this->ds->{$colvar}[$i];\r\n $vtemp = str_replace('\"','\"\"',$vtemp);\r\n $vtemp = (strpos($vtemp,',') === false and strpos($vtemp,'\"') === false and strpos($vtemp,\"\\n\") === false)? $vtemp: '\"'.$vtemp.'\"';\r\n $fields[] = $vtemp;\r\n }\r\n $rows[] = join(',',$fields);\r\n }\r\n #~ header('Content-type: application/vnd.ms-excel');\r\n header('Content-type: text/comma-separated-values');\r\n header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');\r\n header('Content-Disposition: inline; filename=\"dump.csv\"');\r\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\r\n header('Pragma: public');\r\n header('Expires: 0');\r\n\r\n echo join(\"\\r\\n\",$rows);\r\n exit();\r\n }\r\n else { # no-act handler, call its post function callbacks if available\r\n if (AADM_ON_BACKEND==1) {\r\n $callback = 'act_'.$this->action;\r\n if (method_exists($this, $callback)) {\r\n $this->$callback(True);\r\n }\r\n }\r\n }\r\n }", "public static function form_action_insert () \n {\n global $wpdb;\n\n $prefix = $wpdb->prefix;\n\n $inputs = input::post_is_object();\n \n $title = $inputs->title;\n $image= $inputs->image;\n $sub_title = $inputs->sub_title;\n $sub_two = $inputs->sub_two;\n $status = $inputs->status;\n $desc = $inputs->desc;\n\n \n $validate[] = self::form_action_empty_validate( 'title', 'empty' );\n $validate[] = self::form_action_empty_validate( 'image', 'empty' );\n $validate[] = self::form_action_empty_validate( 'sub_title', 'empty' );\n $validate[] = self::form_action_empty_validate( 'sub_two', 'empty' );\n $validate[] = self::form_action_empty_validate( 'status', 'empty' );\n\n if( isset( $inputs->submit_monitor ) ) \n {\n \n if( ! in_array( false, $validate ) ) \n {\n \n self::inserts( config::$tbls['table1'], \n array( 'title' => $title, 'image' => $image, 'sub_title' => $sub_title, 'sub_title_two' => $sub_two, 'status' => $status, 'desc' => $desc ), \n array( '%s', '%s', '%s', '%s', '%s', '%s' ) \n );\n\n $page = page_rounter::url( 'manage_wp_monitoring', false );\n\n redirect::filter( $page );\n\n }\n }\n }", "private function process_frontend_actions() {\n\t\t\n\t\tif(is_admin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif($this->is_working() && is_object($this->extras)) {\n\t\t\t$this->extras->page_load_actions();\n\t\t}\n\n\t\n\t}", "function ccontent_create()\n\t{\n\t\tlusers_require('content/create');\n\n\t\t$post_data = linput_post();\n\t\t$post_data['time'] = date('Y-m-d', strtotime($post_data['date'])) . ' ' . date('H:i:s', strtotime($post_data['time']));\n\n\t\tif (hform_validate(array('name', 'link', 'body')))\n\t\t{\n\t\t\t$content_created = mcontent_create($post_data);\n\t\t\t$cat_created = mcategories_create($post_data);\n\n\t\t\tif ($content_created && $cat_created)\n\t\t\t{\n\t\t\t\tlimage_upload_many(lconf_get('content', 'images'), $post_data['link']);\n\t\t\t\tlcache_delete_all();\n\t\t\t\thmessage_set(l('Content successfully created.'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($content_created) mcontent_delete($post_data['link']);\n\t\t\t\tif ($cat_created) mcategories_delete($post_data['link']);\n\t\t\t\thmessage_set(l('Content create error.') . ' ' . l('Link already in use.'));\n\t\t\t}\n\n\t\t\tluri_redirect('main/user/admin/content');\n\t\t}\n\t\telse luri_redirect('main/user/admin/content_create', l('All fields marked with * are required.'));\n\t}", "public function postsAction() {\n\n $params = $this->_request->getParams();\n $this->view->ajax_post = isset($params['ajax_post']) ? TRUE : FALSE;\n\n //Добавим путь к действию\n $this->_breadcrumbs->addStep($this->Translate('Список сообщений в блогах'));\n }", "public function edit_submit() {\n if (User::is_logged_in()) {\n// check if form wasn't submitted for a second time\n if(isset($_POST['token']) && isset($_SESSION[$_POST['token']])) {\n unset($_SESSION[$_POST['token']]);\n\n if (isset($_POST['edit'])) {\n // edit post\n $change_picture = null;\n if (isset($_POST['form-change-picture']) && isset($_FILES['picture'])) {\n $change_picture = true;\n }\n Post::edit($_POST['description'], $_POST['category'], $_FILES['picture'], $_GET['post_id'], $change_picture);\n } else if (isset($_POST['delete'])) {\n //delete post\n Post::delete($_GET['post_id']);\n }\n } else {\n // form was submitted for the second time\n// redirect to home page\n call('posts', 'index');\n Message::info('Second attempt to submit a form was denied.');\n }\n }\n }", "public function admin_action() {\n\t}", "public function admin_action() {\n\t}", "private function adminContentArea(): void {\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n\n // Load Main Content Modal\n include \"admin\" . DS . \"modal.php\";\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n }", "function mass_actions () {\n\t\t$OBJECT_NAME\t= \"help\";\n\n\t\tif (isset($_POST[\"delete\"])) {\n\t\t\t$CURRENT_OPERATION = \"delete\";\n\t\t} elseif (isset($_POST[\"close\"])) {\n\t\t\t$CURRENT_OPERATION = \"close\";\n\t\t} elseif (isset($_POST[\"activate\"])) {\n\t\t\t$CURRENT_OPERATION = \"activate\";\n\t\t} elseif (isset($_POST[\"mass_reply\"])) {\n\t\t\t$CURRENT_OPERATION = \"mass_reply\";\n\t\t}\n\t\t// Check if we determine current operation\n\t\tif (empty($CURRENT_OPERATION)) {\n\t\t\treturn _e(\"Please select operation\");\n\t\t}\n\t\t// Prepare ads ids\n\t\tforeach ((array)$_POST[\"items\"] as $cur_id) {\n\t\t\t$cur_id = intval($cur_id);\n\t\t\tif (empty($cur_id)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$items_ids[$cur_id] = $cur_id;\n\t\t}\n\t\t// Get tickets\n\t\tif (!empty($items_ids)) {\n\t\t\t$Q = db()->query(\"SELECT * FROM \".db('help_tickets').\" WHERE id IN(\".implode(\",\", $items_ids).\")\");\n\t\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t\t$tickets_infos[$A[\"id\"]]\t= $A;\n\t\t\t\t$emails[$A[\"email\"]]\t\t= _es($A[\"email\"]);\n\t\t\t}\n\t\t}\n\t\t// Get users details\n\t\tif (!empty($emails)) {\n\t\t\t$Q = db()->query(\"SELECT * FROM \".db('user').\" WHERE email IN('\".implode(\"','\", $emails).\"')\");\n\t\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t\t$users_infos[$A[\"email\"]] = $A;\n\t\t\t}\n\t\t}\n\t\t// Do get current admin info\n\t\t$admin_info = db()->query_fetch(\"SELECT * FROM \".db('admin').\" WHERE id=\".intval($_SESSION[\"admin_id\"]));\n\t\t$admin_name = $admin_info[\"first_name\"].\" \".$admin_info[\"last_name\"];\n\t\t// Switch between operation\n\t\t// ###########################################\n\t\tif ($CURRENT_OPERATION == \"delete\") {\n\n\t\t\tif (!empty($items_ids)) {\n\t\t\t\tdb()->query(\"DELETE FROM \".db('help_tickets').\" WHERE id IN(\".implode(\",\",$items_ids).\")\");\n\t\t\t}\n\n\t\t// ###########################################\n\t\t} elseif ($CURRENT_OPERATION == \"close\") {\n\n\t\t\tif (!empty($items_ids)) {\n\t\t\t\tdb()->query(\"UPDATE \".db('help_tickets').\" SET status='closed' WHERE id IN(\".implode(\",\",$items_ids).\")\");\n\t\t\t}\n\n\t\t// ###########################################\n\t\t} elseif ($CURRENT_OPERATION == \"activate\") {\n\n\t\t\tforeach ((array)$tickets_infos as $_id => $_ticket_info) {\n\t\t\t\t$user_info = $users_infos[$_ticket_info[\"email\"]];\n\t\t\t\tif (empty($user_info) \n\t\t\t\t\t|| $user_info[\"is_deleted\"] == 1\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Do activate user's account\n\t\t\t\tdb()->query(\"UPDATE \".db('user').\" SET active='1' WHERE id=\".intval($user_info[\"id\"]));\n\t\t\t\t// Prepare email\n\t\t\t\t$replace = array(\n\t\t\t\t\t\"user_name\"\t\t=> _prepare_html(_display_name($user_info)),\n\t\t\t\t\t\"user_login\"\t=> _prepare_html($user_info[\"login\"]),\n\t\t\t\t\t\"user_password\"\t=> _prepare_html($user_info[\"password\"]),\n\t\t\t\t);\n\t\t\t\t$message = tpl()->parse($_GET[\"object\"].\"/email_on_auto_activate\", $replace);\n\t\t\t\t// Do send mail\n\t\t\t\t$from_name = $this->ADD_ADMIN_NAME ? \"Admin \".SITE_ADVERT_NAME : SITE_ADMIN_NAME;\n\t\t\t\t$send_result = common()->send_mail(SITE_ADMIN_EMAIL_ADV, $from_name, $_ticket_info[\"email\"], $_ticket_info[\"email\"], \"Help ticket answer\", $message, nl2br($message));\n\t\t\t\t// Close ticket\n\t\t\t\tdb()->query(\"UPDATE \".db('help_tickets').\" SET status='closed' WHERE id=\".intval($_ticket_info[\"id\"]));\n\t\t\t\t// Do not close ticket if we have troubles with sending email\n\t\t\t\tif ($send_result) {\n\t\t\t\t} else {\n\t\t\t\t\t// comment that we have trouble with sending email\n\t\t\t\t\t$messqge = \"Error with sending confirmation email to user\";\n\t\t\t\t}\n\t\t\t\t// Add comment\n\t\t\t\tdb()->INSERT(\"comments\", array(\n\t\t\t\t\t\"object_name\"\t\t=> _es(\"help\"),\n\t\t\t\t\t\"object_id\"\t\t\t=> intval($_ticket_info[\"id\"]),\n\t\t\t\t\t\"user_id\"\t\t\t=> 0,\n\t\t\t\t\t\"user_name\"\t\t\t=> _es(\"Admin: \".$admin_name),\n\t\t\t\t\t\"text\" \t\t\t\t=> _es($message),\n\t\t\t\t\t\"add_date\"\t\t\t=> time(),\n\t\t\t\t\t\"active\"\t\t\t=> 1,\n\t\t\t\t));\n\t\t\t}\n\n\t\t// ###########################################\n\t\t} elseif ($CURRENT_OPERATION == \"mass_reply\") {\n\n\t\t\t// Get first site info\n\t\t\tif (is_array(_class('sites_info')->info))\t{\n\t\t\t\t$FIRST_SITE_INFO = array_shift(_class('sites_info')->info);\n\t\t\t}\n\t\t\t$processed_tickets_ids = array();\n\t\t\t// Process selected tickets\n\t\t\tforeach ((array)$tickets_infos as $_id => $_ticket_info) {\n\t\t\t\t// Prepare ticket id\n\t\t\t\t$TICKET_ID = $_ticket_info[\"ticket_key\"];\n// TODO: need to do something when text is empty\n\t\t\t\t// Prepare text to replay\n\t\t\t\t$replace_pairs = array(\n\t\t\t\t\t'%%user_name%%'\t\t=> !empty($user_info) ? _display_name($user_info) : $_ticket_info[\"name\"],\n\t\t\t\t\t'%%account_type%%'\t=> !empty($user_info) ? $this->_account_types[$user_info[\"group\"]] : \"\",\n\t\t\t\t);\n\t\t\t\t$PREPARED_TEXT = str_replace(\n\t\t\t\t\tarray_keys($replace_pairs), \n\t\t\t\t\tarray_values($replace_pairs), \n\t\t\t\t\t$_POST[\"reply_text\"]\n\t\t\t\t);\n\t\t\t\t// Do insert record\n\t\t\t\tdb()->INSERT(\"comments\", array(\n\t\t\t\t\t\"object_name\"\t\t=> _es($OBJECT_NAME),\n\t\t\t\t\t\"object_id\"\t\t\t=> intval($_ticket_info[\"id\"]),\n\t\t\t\t\t\"user_id\"\t\t\t=> 0,\n\t\t\t\t\t\"user_name\"\t\t\t=> _es(\"Admin: \".$admin_name),\n\t\t\t\t\t\"text\" \t\t\t\t=> _es($PREPARED_TEXT),\n\t\t\t\t\t\"add_date\"\t\t\t=> time(),\n\t\t\t\t\t\"active\"\t\t\t=> 1,\n\t\t\t\t));\n\t\t\t\t$RECORD_ID = db()->INSERT_ID();\n\t\t\t\t// Add activity points for registered user if needed\n\t\t\t\tif (!empty($_ticket_info[\"user_id\"])) {\n\t\t\t\t\tcommon()->_add_activity_points($_ticket_info[\"user_id\"], \"bug_report\", 1000, $RECORD_ID);\n\t\t\t\t}\n\t\t\t\t$replace = array(\n\t\t\t\t\t\"name\"\t\t\t\t=> _prepare_html($_ticket_info[\"name\"]),\n\t\t\t\t\t\"site_name\"\t\t\t=> _prepare_html($FIRST_SITE_INFO[\"name\"]),\n\t\t\t\t\t\"author_name\"\t\t=> _prepare_html($this->ADD_ADMIN_NAME ? SITE_ADVERT_NAME.\" Admin \".$admin_name : SITE_ADMIN_NAME),\n\t\t\t\t\t\"text\"\t\t\t\t=> _prepare_html($PREPARED_TEXT),\n\t\t\t\t\t\"ticket_id\"\t\t\t=> _prepare_html($TICKET_ID),\n\t\t\t\t\t\"ticket_url\"\t\t=> process_url(\"./?object=help&action=view_answers&id=\".$TICKET_ID, 1, $_ticket_info[\"site_id\"]),\n\t\t\t\t\t\"request_subject\"\t=> _prepare_html($_ticket_info[\"subject\"]),\n\t\t\t\t\t\"request_message\"\t=> _prepare_html($_ticket_info[\"message\"]),\n\t\t\t\t);\n\t\t\t\t$text\t\t= tpl()->parse($_GET[\"object\"].\"/email_to_user\", $replace);\n\t\t\t\t$email_from\t= SITE_ADMIN_EMAIL;\n\t\t\t\t$name_from\t= $this->ADD_ADMIN_NAME ? SITE_ADVERT_NAME.\" Admin \".$admin_name : SITE_ADMIN_NAME;\n\t\t\t\t$email_to\t= $_ticket_info[\"email\"];\n\t\t\t\t$name_to\t= _prepare_html($_ticket_info[\"name\"]);\n\t\t\t\t$subject\t= \"Response to support ticket #\".$TICKET_ID;\n\t\t\t\t$send_result= common()->send_mail($email_from, $name_from, $email_to, $name_to, $subject, $text, nl2br($text));\n\t\t\t\t// Store processed tickets ids\n\t\t\t\t$processed_tickets_ids[$_ticket_info[\"id\"]] = $_ticket_info[\"id\"];\n\t\t\t}\n\t\t\t// Mass change status on reply\n\t\t\tif (!empty($processed_tickets_ids)) {\n\t\t\t\tdb()->query(\n\t\t\t\t\t\"UPDATE \".db('help_tickets').\" \n\t\t\t\t\tSET status = '\".(!empty($_POST[\"reply_close\"]) ? \"closed\" : \"read\").\"' \n\t\t\t\t\tWHERE id IN(\".implode(\",\", $processed_tickets_ids).\")\"\n\t\t\t\t);\n\t\t\t}\n\n\t\t// ###########################################\n\t\t}\n\t\treturn js_redirect($_SERVER[\"HTTP_REFERER\"], 0);\n\t}", "function wpbm_post_submit(){\n global $wpdb;\n include( 'inc/ajax/wpbm-post-submit.php' );\n die();\n }", "function index_post() {\n $this->crud_post($this->post());\n }", "public function postAction() {}", "public function submission()\n {\n $title_field_id = 10;\n $content_short_field_id = 8;\n $content_long_field_id = 17;\n $auto_activate = 1;\n \n $this->load->model('language_m');\n $this->load->model('estate_m');\n $this->load->model('option_m');\n $this->load->model('file_m');\n $this->load->model('repository_m');\n \n $this->data['message'] = lang_check('Something is wrong with request');\n $this->data['success'] = FALSE;\n $this->data['token_available'] = FALSE;\n $POST = $this->input->get_post(NULL, TRUE);\n\n $POST = array_merge($_GET, $_POST);\n\n if(isset($POST['lang_code']))\n {\n $lang_id_selected = $this->language_m->get_id($POST['lang_code']);\n }\n \n $lang_id_def = $this->language_m->get_default_id();\n $lang_code_def = $this->language_m->get_code($lang_id_def);\n \n $token = $this->token_m->get_token($POST);\n \n if(is_object($token))\n $this->data['token_available'] = TRUE;\n \n //var_dump($POST);\n \n if(config_db_item('property_subm_disabled')==TRUE)\n {\n $this->data['message'] = lang_check('Registration disabled on server');\n }\n else if(isset($POST['lang_code']) && $lang_id_selected != $lang_id_def)\n {\n $this->data['message'] = lang_check('Only default lang is supported');\n }\n else if(is_object($token) && isset($POST['lang_code']) && isset($POST['input_address'], \n $POST['input_title'],\n $POST['input_description'],\n $POST['input_4']))\n {\n\n $existing_fields = $this->option_m->get_field_list($lang_id_def);\n\n // check if fields exists\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n if(!isset($existing_fields[$exp[1]]))\n { \n unset($POST['input_'.$exp[1]]);\n\n $this->data['message'] = lang_check('Field not found: #').$exp[1];\n echo json_encode($this->data);\n exit();\n }\n }\n }\n \n if(isset($POST['property_id']))\n {\n \n if(empty($POST['input_description']) || empty($POST['input_title']))\n {\n $this->data['message'] = lang_check('Please populate all fields!');\n echo json_encode($this->data);\n exit();\n }\n\n $this->load->library('session');\n\n // check permission for edit\n if($this->estate_m->check_user_permission($POST['property_id'], $token->user_id)>0)\n {\n\n // edit\n $data = array();\n $data['date'] = date('Y-m-d H:i:s');\n $data['date_modified'] = date('Y-m-d H:i:s');\n $data['address'] = $POST['input_address'];\n $data['search_values'] = $data['address'];\n \n // fetch gps\n $this->load->library('ghelper');\n $coor = $this->ghelper->getCoordinates($data['address']);\n $data['gps'] = $coor['lat'].', '.$coor['lng'];\n \n // other dynamic data\n $dynamic_data = array();\n $dynamic_data['agent'] = $token->user_id;\n \n // get title\n $dynamic_data[\"option\".$title_field_id.\"_\".$lang_id_def] = $POST['input_title'];\n \n // get description\n $dynamic_data[\"option\".$content_short_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n $dynamic_data[\"option\".$content_long_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n \n // prepare other fields\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(sw_count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n $dynamic_data[\"option\".$exp[1].\"_\".$lang_id_def] = $POST['input_'.$exp[1]];\n }\n }\n \n // save basic data\n $insert_id = $this->estate_m->save($data, $POST['property_id']);\n \n if(empty($insert_id))\n {\n echo 'EMPTY insert_id:<br />';\n echo $this->db->last_query();\n exit();\n }\n \n $this->config->set_item('multilang_on_qs', 0);\n \n $this->estate_m->save_dynamic($dynamic_data, $insert_id);\n \n // echo $this->db->last_query();\n \n if(!empty($insert_id))\n {\n $this->uploadfiles($insert_id);\n \n $this->data['message'] = lang_check('Listing saved');\n $this->data['success'] = TRUE;\n }\n else\n {\n $this->data['message'] = lang_check('Edit declined');\n }\n }\n\n }\n else\n {\n // add\n \n if(empty($POST['input_description']) || empty($POST['input_title']))\n {\n $this->data['message'] = lang_check('Please populate all fields!');\n echo json_encode($this->data);\n exit();\n }\n\n $data = array();\n $data['is_activated'] = $auto_activate;\n $data['date'] = date('Y-m-d H:i:s');\n $data['date_modified'] = date('Y-m-d H:i:s');\n $data['address'] = $POST['input_address'];\n $data['search_values'] = $data['address'];\n \n if($data['is_activated'])\n $data['date_activated'] = date('Y-m-d H:i:s');\n \n // fetch gps\n $this->load->library('ghelper');\n $coor = $this->ghelper->getCoordinates($data['address']);\n $data['gps'] = $coor['lat'].', '.$coor['lng'];\n \n // other dynamic data\n $dynamic_data = array();\n $dynamic_data['agent'] = $token->user_id;\n \n // get title\n $dynamic_data[\"option\".$title_field_id.\"_\".$lang_id_def] = $POST['input_title'];\n \n // get description\n $dynamic_data[\"option\".$content_short_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n $dynamic_data[\"option\".$content_long_field_id.\"_\".$lang_id_def] = $POST['input_description'];\n \n // prepare other fields\n foreach($POST as $key=>$val)\n {\n $exp = explode('_', $key);\n \n if(sw_count($exp) == 2 && $exp[0]=='input' && is_numeric($exp[1]))\n {\n $dynamic_data[\"option\".$exp[1].\"_\".$lang_id_def] = $POST['input_'.$exp[1]];\n }\n }\n\n // save basic data\n $insert_id = $this->estate_m->save($data, NULL);\n \n if(empty($insert_id))\n {\n echo 'EMPTY insert_id:<br />';\n echo $this->db->last_query();\n exit();\n }\n \n $this->config->set_item('multilang_on_qs', 0);\n \n $this->estate_m->save_dynamic($dynamic_data, $insert_id);\n \n // echo $this->db->last_query();\n \n if(!empty($insert_id))\n {\n $this->uploadfiles($insert_id);\n \n $this->data['message'] = lang_check('Listing added');\n $this->data['success'] = TRUE;\n }\n else\n {\n $this->data['message'] = lang_check('Added declined');\n }\n }\n } \n \n echo json_encode($this->data);\n exit();\n }", "function _submit_data()\n {\n\t$data = $this->get_data_from_post();\n\t\n\t//$data['photo'] = Modules::run('upload_manager/upload','image');\n\t$id = $this->uri->segment( 3 );\n\tif ( is_numeric( $id ) ) {\n\t $this->_update( $id, $data );\n\t redirect( 'auth/profile/' . $id );\n\t} else {\n\t $this->_insert( $data );\n\t redirect( 'auth/add_lecturer' );\n\t}\n }", "function culturefeed_pages_page_request_admin_membership_approved_submit($form, $form_state) {\n\n $page = $form_state['page'];\n $cf_user = $form_state['cf_user'];\n\n $drupal_uid = culturefeed_get_uid_for_cf_uid($cf_user->id, $cf_user->nick);\n\n $page_title = $page->getName();\n $page_path = culturefeed_search_detail_path('page', $page->getId(), $page_title);\n\n $message = t('!username successfully added as administrator of page !page.', array(\n '!username' => l($cf_user->nick, 'user/' . $drupal_uid),\n '!page' => l($page_title, $page_path),\n ));\n\n $success = TRUE;\n try {\n $instance = DrupalCultureFeed::getLoggedInUserInstance();\n $cf_pages = $instance->pages();\n $cf_pages->addAdmin($page->getId(), $cf_user->id, array('activityPrivate' => FALSE));\n }\n catch (Exception $e) {\n $success = FALSE;\n watchdog_exception('culturefeed_pages', $e);\n }\n\n if ($success) {\n drupal_set_message($message);\n }\n\n drupal_goto($page_path);\n\n}", "function submitAddStok()\n\t{\n\t\t# code...\n\t}", "abstract public function submit($data);", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('noDoc');\n\t\t$this->doc->styleSheetFile2 = $GLOBALS[\"temp_modPath\"] . 'style.css';\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\t\t$this->doc->postCode='\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 1;\n\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t</script>\n\t\t';\n\n\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,'');\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->spacer(5);\n\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t}\n\n\t\t$this->content.=$this->doc->spacer(10);\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"bigDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form='<form action=\"index.php?id='.$this->id.'\" method=\"POST\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br />\".$LANG->sL(\"LLL:EXT:lang/locallang_core.xml:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\t\n\t\t\texec('hostname',$ret);\n\t\t\t$ret=implode(\"\",$ret);\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\") .\" on: $ret\");\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "function action()\n\t{\n\t\t//Campos que se quieren excluir de la limpieza de código. Formato: nombreCampo1|nombreCampo2|nombreCampo3\n\t\t$excluir=\"\";\n\t\t$_REQUEST=$this->miInspectorHTML->limpiarPHPHTML($_REQUEST);\n\n\t\t$option=isset($_REQUEST['option'])?$_REQUEST['option']:\"list\";\n\n\t\t\n\t\tswitch($option){\n\t\t\tcase \"processNew\":\n\n\t\t\t\t$this->processNew();\n\t\n\t\t\t\tif(!$this->status){\n\t\t\t\t\t$mensaje=implode(\"<br/>\",$this->mensaje['error']);\t\n\t\t\t\t\t$this->redireccionar(\"falloRegistro\",array($mensaje,$this->data));\n\t\t\t\t}else{\n\t\t\t\t\t$mensaje=implode(\"<br/>\",$this->mensaje['exito']);\n\t\t\t\t\t$this->redireccionar(\"exitoRegistro\",array($mensaje));\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase \"processEdit\":\n\t\t\t\t$this->processEdit($_REQUEST['optionValue']);\n\t\t\t\t$this->redireccionar(\"exitoRegistro\",array($mensaje));\n\t\t\tbreak;\n\t\t\tcase \"processDelete\":\n\t\t\t\t$this->processDelete($_REQUEST['optionValue']);\n\t\t\tbreak;\n\t\t}\n\n\n\n\n\t}", "function affiche_form_edition($content,$idCom,$idPost)\r\n{\r\n\tif(isset($_SESSION['id']))\r\n\t{\r\n\t\tif(isadmin($_SESSION['id']))\r\n\t\t{\r\n\t\t\techo \"<form name='edit_com' action='controller/actions.php' method='post'>\";\r\n\t\t\t\techo \"<textarea name='commentaire' cols='50' row='30'>\".$content.\"</textarea></br>\";\r\n\t\t\t\techo \"<input name='id_com' type='hidden' value='\".$idCom.\"'/>\";\r\n\t\t\t\techo \"<input name='action' value='Editer com' type='submit'/>\";\r\n\t\t\t\techo \"<input type='hidden' name='url' value='?page=article&POST_ID=\".$idPost.\"'/>\";\r\n\t\t\techo \"</form>\";\r\n\t\t}\r\n\t}\r\n}", "public function addPage()\n\t{\n\t\tglobal $cfg;\n\t\t$data = $cfg['data'];\n\n\t\t// Load the content model\n\t\t$content = $this->load_model('Content');\n\n\t\t// Get all the available pages from database\n\t\t$pages[0] = '- New Page -'; \n\t\tforeach ($content->get_pages() as $key) \n\t\t{\n\t\t\t$pages[$key['id']] = $key['name'];\n\t\t}\n\n\t\t// Get all the available regions from the database\n\t\tforeach ($content->get_regions() as $key) {\n\t\t\t$regions[$key['id']] .= $key;\n\t\t}\n\n\t\t$form = new Form();\n\n\t\t$form->set_validate_rules(\"page\", \"Page name\", \"required\");\n\n\t\tif($form->validate())\n\t\t{\n\t\t\t$content = $this->load_model(\"Content\");\n\n\t\t\tif($_POST['page_id'] == 0)\n\t\t\t\t$content->insertPage();\n\t\t\telse\n\t\t\t\t$content->updatePage();\n\n\t\t\tredirect(\"content\");\n\t\t}\n\n\t\t$data['content']['main'] = \"<fieldset class='clearfix inline-block'><legend>New page</legend>\";\n\t\t$data['content']['main'] .= $form->start();\n\t\t$data['content']['main'] .= \"<lable>Parent page</lable>\";\n\t\t$data['content']['main'] .= $form->select($pages, array('style' => 'width:100%', 'name' => 'page_id'));\n\t\t$data['content']['main'] .= \"<lable>Page name</lable>\";\n\t\t$data['content']['main'] .= $form->input('text', array('style' => 'width:100%', 'name' => 'page'));\n\t\t$data['content']['main'] .= $form->input('submit', array('value' => 'Save', 'style' => 'width:100%'));\n\t\t$data['content']['main'] .= \"</form></fieldset>\";\n\t\t$data['content']['main'] .= $form->validate_error();\n\n\t\t$this->load_view('default', $data);\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\t\t\tif ($BE_USER->user['admin'] && !$this->id)\t{\n\t\t\t\t$this->pageinfo=array('title' => '[root-level]','uid'=>0,'pid'=>0);\n\t\t\t}\n\n\t\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br>'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t}\n\t\t}\n\t\t$this->content.=$this->doc->spacer(10);\n\t}", "public function process()\n\t{\n\t\tPhpfox::getUserParam('custom.can_manage_custom_fields', true);\n\t\t$bOrderUpdated = false;\n\t\t\n\t\tif (($iDeleteId = $this->request()->getInt('delete')) && Phpfox::getService('custom.group.process')->delete($iDeleteId))\n\t\t{\n\t\t\t$this->url()->send('admincp.custom', null, Phpfox::getPhrase('custom.custom_group_successfully_deleted'));\n\t\t}\n\t\t\n\t\tif (($aFieldOrders = $this->request()->getArray('field')) && Phpfox::getService('custom.process')->updateOrder($aFieldOrders))\n\t\t{\t\t\t\n\t\t\t$bOrderUpdated = true;\n\t\t}\n\t\t\n\t\tif (($aGroupOrders = $this->request()->getArray('group')) && Phpfox::getService('custom.group.process')->updateOrder($aGroupOrders))\n\t\t{\t\t\t\n\t\t\t$bOrderUpdated = true;\n\t\t}\t\t\n\t\t\n\t\tif ($bOrderUpdated === true)\n\t\t{\n\t\t\t$this->url()->send('admincp.custom', null, Phpfox::getPhrase('custom.custom_fields_successfully_updated'));\n\t\t}\n\t\t\n\t\t$this->template()->setTitle(Phpfox::getPhrase('custom.manage_custom_fields'))\n\t\t\t->setBreadcrumb(Phpfox::getPhrase('custom.manage_custom_fields'))\n\t\t\t->setPhrase(array(\n\t\t\t\t\t'custom.are_you_sure_you_want_to_delete_this_custom_option'\n\t\t\t\t)\n\t\t\t)\t\t\t\n\t\t\t->setHeader(array(\n\t\t\t\t\t'admin.js' => 'module_custom',\n\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.custom_set_url = function() { $Core.custom.url(\\'' . $this->url()->makeUrl('admincp.custom') . '\\'); };</script>',\n\t\t\t\t\t'jquery/ui.js' => 'static_script',\n\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.custom_admin_addSort = function(){$Core.custom.addSort();};</script>'\n\t\t\t\t)\n\t\t\t)\n\t\t\t->assign(array(\n\t\t\t\t\t'aGroups' => Phpfox::getService('custom')->getForListing()\n\t\t\t\t)\n\t\t\t);\n\t}", "public function indexAction() {\n //GET NAVIGATION\n $this->view->navigationStoreGlobal = Engine_Api::_()->getApi('menus', 'core')\n\t\t\t\t->getNavigation('sitestore_admin_main_settings', array(), 'sitestore_admin_main_global_store'); \n \n $this->view->hasLanguageDirectoryPermissions = $hasLanguageDirectoryPermissions = Engine_Api::_()->getApi('language', 'sitestore')->hasDirectoryPermissions();\n \n $sitestore_global_form_content = array('sitestore_location', 'sitestore_report', 'sitestore_share', 'sitestore_socialshare', 'sitestore_printer', 'sitestore_tellafriend', 'sitestore_captcha_post', 'sitestore_proximitysearch', 'sitestore_checkcomment_widgets', 'sitestore_sponsored_image', 'sitestore_sponsored_color', 'sitestore_feature_image', 'sitestore_featured_color', 'sitestore_store', 'sitestore_proximity_search_kilometer', 'sitestore_addfavourite_show', 'sitestore_title_truncation', 'sitestore_claimlink', 'sitestore_claim_show_menu', 'sitestore_contact', 'sitestore_requried_description', 'sitestore_status_show', 'sitestore_manageadmin', 'sitestore_layoutcreate', 'sitestore_communityads', 'sitestore_profile_fields', 'sitestore_locationfield', 'sitestore_price_field', 'sitestore_category_edit', 'sitestore_package_enable', 'submit', \"sitestore_payment_benefit\", 'sitestore_network', \"sitestore_networks_type\", \"sitestore_browseorder\", 'sitestore_requried_photo', 'sitestore_showmore', 'sitestore_show_menu', \"sitestore_default_show\", 'sitestore_map_sponsored', \"sitestore_photolightbox_show\", 'sitestore_photolightbox_bgcolor', 'sitestore_photolightbox_fontcolor', \"sitestore_map_city\", \"sitestore_addfavourite_show\", \"sitestore_map_zoom\", \"sitestore_feed_type\", \"sitestore_manifestUrlP\", \"sitestore_manifestUrlS\", \"sitestore_mylike_show\", \"sitestore_categorywithslug\", \"sitestoreshow_navigation_tabs\", \"sitestore_postedby\", \"sitestore_fs_markers\", \"sitestore_claim_email\", \"sitestore_css\",\"sitestore_code_share\",\"sitestore_postfbstore\", \"translation_file\", \"sitestore_description_allow\", \"sitestore_multiple_location\", \"sitestore_automatically_like\", \"language_phrases_stores\", \"language_phrases_store\", \"sitestore_tinymceditor\", \"sitestore_default_show\",\"seaocore_common_css\", \"sitestore_network\", \"send_cheque_to\", \"sitestoreproduct_weight_unit\", \"sitestoreproduct_navigationtabs\", \"is_sitestore_admin_driven\", \"sitestore_hide_left_container\", \"sitestore_show_tabs_without_content\", \"sitestore_payment_for_orders\", \"sitestore_allowed_payment_gateway\", \"sitestore_admin_gateway\", \"is_section_allowed\", \"sitestore_shipping_extra_content\", \"sitestore_virtual_product_shipping\", \"sitestore_publish_facebook\", \"sitestore_allow_printingtag\", \"sitestore_fixed_text\", \"sitestore_checkout_fixed_text_value\", \"sitestore_terms_conditions\", \"sitestore_slding_effect\",\"sitestore_minimum_shipping_cost\", \"sitestore_defaultpagecreate_email\", \"sitestore_package_information\", \"sitestore_package_view\", \"sitestoreproduct_paymentmethod\");\n \n $pluginName = 'sitestore';\n if (!empty($_POST[$pluginName . '_lsettings']))\n $_POST[$pluginName . '_lsettings'] = @trim($_POST[$pluginName . '_lsettings']); \n \n include_once APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license1.php';\n \n if ($this->getRequest()->isPost()) {\n if(!empty($_POST['sitestore_package_information'])) {\n if(Engine_Api::_()->getApi('settings', 'core')->hasSetting('sitestore_package_information')) {\n Engine_Api::_()->getApi('settings', 'core')->removeSetting('sitestore_package_information');\n }\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore.package.information', $_POST['sitestore_package_information']);\n }\n }\n $newLocation = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.map.city', \"World\");\n if(!empty($oldLocation) && !empty($newLocation))\n $this->setDefaultMapCenterPoint($oldLocation, $newLocation);\n }", "protected function AdminPage() {\n\t$oPathIn = fcApp::Me()->GetKioskObject()->GetInputObject();\n\t$oFormIn = fcHTTP::Request();\n\n\t$doSave = $oFormIn->GetBool('btnSave');\n\n\t// save edits before showing events\n\tif ($doSave) {\n\t $frm = $this->PageForm();\n\t $frm->Save();\n\t $this->SelfRedirect();\n\t}\n\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t // ($sGroupKey,$sKeyValue=TRUE,$sDispOff=NULL,$sDispOn=NULL,$sPopup=NULL)\n\t $oMenu->SetNode($ol = new fcMenuOptionLink('do','edit',NULL,NULL,'edit this record'));\n\n\t $doEdit = $ol->GetIsSelected();\n\n\t$frmEdit = $this->PageForm();\n\tif ($this->IsNew()) {\n\t $frmEdit->ClearValues();\n\t} else {\n\t $frmEdit->LoadRecord();\n\t}\n\t$oTplt = $this->PageTemplate();\n\t$arCtrls = $frmEdit->RenderControls($doEdit);\n\t\n\t$out = NULL;\n\t$arCtrls['!ID'] = $this->SelfLink();\n\tif ($doEdit) {\n\t $out .= \"\\n<form method=post>\";\n\t $arCtrls['!extra'] = '<tr>\t<td colspan=2><b>Edit notes</b>: <input type=text name=\"'\n\t .KS_FERRETERIA_FIELD_EDIT_NOTES\n\t .'\" size=60></td></tr>'\n\t ;\n\t $arCtrls['isType'] .= ' is a type';\n\t} else {\n\t $arCtrls['!extra'] = NULL;\n\t $arCtrls['isType'] = $this->IsType()?'type':'folder';\n\t}\n\n\t$oTplt->SetVariableValues($arCtrls);\n\t$out .= $oTplt->RenderRecursive();\n\t\n\tif ($doEdit) {\t \n\t $out .= <<<__END__\n<input type=submit name=\"btnSave\" value=\"Save\">\n<input type=reset value=\"Reset\">\n</form>\n__END__;\n\t}\n\treturn $out;\n }", "function submit()\n {\n }", "function submit()\n {\n }", "function submit()\n {\n }", "public function post_action() {\n\t\tcheck_ajax_referer( self::POST_ACTION_ID );\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( esc_html__( 'You are not allowed to do that.', 'autowpdb-example-plugin' ), '', 403 );\n\t\t}\n\n\t\t$add_entry = filter_input( INPUT_POST, 'add_entry', FILTER_SANITIZE_STRING );\n\t\t$delete_entry = filter_input( INPUT_POST, 'delete_entry', FILTER_SANITIZE_STRING );\n\n\t\tif ( null !== $add_entry ) {\n\t\t\t// Insert a new entry into the table.\n\t\t\t$result = $this->action_insert_entry();\n\n\t\t\t$this->action_insert_entry_message( $result );\n\t\t} elseif ( null !== $delete_entry ) {\n\t\t\t// Delete the oldest entry.\n\t\t\t$result = $this->action_delete_entry();\n\n\t\t\t$this->action_delete_entry_message( $result );\n\t\t} else {\n\t\t\t$this->invalid_action_message();\n\t\t}\n\n\t\tset_transient( 'settings_errors', get_settings_errors( self::POST_ACTION_ID ), 30 );\n\n\t\t$goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() );\n\t\twp_safe_redirect( esc_url_raw( $goback ) );\n\t\texit;\n\t}", "function newArticle() {\n\n $results = array();\n $results['pageTitle'] = \"Neuer Artikel | Ape Blog\";\n $results['formAction'] = \"newArticle\";\n\n if ( isset( $_POST['saveChanges'] ) ) {\n\n // User hat die Form ausgefüllt und auf Speicher gedrückt, so werden die Eingaben abgespeichert, \n // und mit der Funktion insert() auf die Datenbank geschrieben.\n $article = new Article;\n $article->storeFormValues( $_POST );\n $article->insert();\n header( \"Location: admin.php?status=changesSaved\" );\n\n } elseif ( isset( $_POST['cancel'] ) ) {\n\n // Wenn der User auf \"Abbrechen\" clickt, wird zurück zur Liste geleitet.\n header( \"Location: admin.php\" );\n } else {\n\n // User bekommt eine leere Form angezeigt.\n $results['article'] = new Article;\n require( TEMPLATE_PATH . \"/admin/editArticle.php\" );\n }\n\n}", "public static function render_manage()\n\t{\n\t// eventually - get it basically looking right first\n\t\n\t\tif (!current_user_can('edit_pages'))\n\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t\n\t\t//$list = new JHDataTablesList();\n\t\t//$list->prepare_items();\n\t\t\n\t\t?><div class=\"wrap\">\n\t\t\n<h2><?php print __( 'Manage Tables', 'jh-resource-collection' ); ?></h2>\n\n<form name=\"JHResourceCollectionAdmin\" method=\"post\" action=\"\">\n<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\n<input type=\"hidden\" name=\"page\" value=\"<?php echo $_REQUEST['page'] ?>\">\n\n<?php //$list->display() ?>\n\n<!--<p class=\"submit\">\n<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes') ?>\" />\n</p>-->\n\n</form>\n</div><?php\n\t}", "function ccontent_update()\n\t{\n\t\tlusers_require('content/update');\n\n\t\t$post_data = linput_post();\n\t\t$post_data['time'] = date('Y-m-d', strtotime($post_data['date'])) . ' ' . date('H:i:s', strtotime($post_data['time']));\n\n\t\tif (hform_validate(array('name', 'link', 'body')))\n\t\t{\n\t\t\t$cat = mcontent_get_cat($post_data['id']);\n\n\t\t\tlimage_upload_many(lconf_get('content', 'images'), $post_data['link']);\n\n\t\t\tmcontent_update($post_data['id'], $post_data);\n\t\t\t// Check if link is default uri and change default uri too if needed\n\t\t\tif ($cat['link'] == lconf_dbget('default_uri')) lcrud_update(llang_table('settings'), array('name' => 'default_uri'), array('value' => $post_data['link']));\n\t\t\t// Do not update name for category from here\n\t\t\tunset($post_data['name']);\n\t\t\tmcategories_update($cat['id'], $post_data);\n\t\t\t// Update comments too\n\t\t\tlcrud_update(llang_table('comments'), array('module' => CONT, 'module_item' => $cat['link']), array('module_item' => $post_data['link']));\n\n\t\t\tlcache_delete_all();\n\n\t\t\tluri_redirect('main/user/admin/content', l('Content successfully updated.'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$content = mcontent_read($post_data['id']);\n\t\t\tluri_sredirect(lroute_get_uri('main/user_item/admin/content_update') . '/' . $content['link'], l('All fields marked with * are required.'));\n\t\t}\n\t}", "public function displayPageAddForm(){\n\n // Vérifie les données de champs dupliqués\n $this->handleDuplicateFields();\n\n // Vérifie les données post envoyées\n $this->handleAdd();\n\n // If there ia a modify var\n if(isset($_GET['modify']) && !empty($_GET['modify'])){\n\n $form = get_post($_GET['modify']);\n if($this->isForm($_GET['modify'])){\n\n $formMetas = get_post_meta($_GET['modify']);\n $formArgs = get_post_meta($_GET['modify'],'form-args');\n $formFields = get_post_meta($_GET['modify'],'form-fields');\n $submitArgs = get_post_meta($_GET['modify'],'form-submit-args');\n $formSendArgs = get_post_meta($_GET['modify'],'form-send-args');\n }else\n unset($form);\n\n }\n require_once __DIR__ . '/templates/add.php';\n\n }", "public function process()\n\t{\n\t\tif ($aOrder = $this->request()->getArray('order'))\n\t\t{\n\t\t\tif (Phpfox::getService('marketplace.category.process')->updateOrder($aOrder))\n\t\t\t{\n\t\t\t\t$this->url()->send('admincp.marketplace', null, Phpfox::getPhrase('marketplace.category_order_successfully_updated'));\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif ($iDelete = $this->request()->getInt('delete'))\n\t\t{\n\t\t\tif (Phpfox::getService('marketplace.category.process')->delete($iDelete))\n\t\t\t{\n\t\t\t\t$this->url()->send('admincp.marketplace', null, Phpfox::getPhrase('marketplace.category_successfully_deleted'));\n\t\t\t}\n\t\t}\n\t\n\t\t$this->template()->setTitle(Phpfox::getPhrase('marketplace.manage_categories'))\n\t\t\t->setBreadCrumb('Modules', '#modules')\n\t\t\t->setBreadcrumb('Marketplace', $this->url()->makeUrl('admincp.marketplace'), true)\n\t\t\t->setPhrase(array(\n\t\t\t\t\t'marketplace.are_you_sure_this_will_delete_all_listings_that_belong_to_this_category_and_cannot_be_undone'\n\t\t\t\t)\n\t\t\t)\n\t\t\t->setHeader(array(\n\t\t\t\t\t'jquery/ui.js' => 'static_script',\n\t\t\t\t\t'admin.js' => 'module_marketplace',\n\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.mrktAdminUrl = function() { $Core.marketplace.url(\\'' . $this->url()->makeUrl('admincp.marketplace') . '\\'); };</script>'\n\t\t\t\t)\n\t\t\t)\n\t\t\t->assign(array(\n\t\t\t\t\t'sCategories' => Phpfox::getService('marketplace.category')->display('admincp')->get()\n\t\t\t\t)\n\t\t\t);\t\n\t}", "function action_index()\n\t{\n\t\t$subforms = array(\n\t\t\t\\Artefacts\\Subform_Description::forge(),\n\t\t\t\\Artefacts\\Subform_Owner::forge(),\n\t\t\t\\Artefacts\\Subform_File::forge(),\n\t\t\t\\Quotes\\Subform_Worksub::forge(),\n\t\t\t\\Quotes\\Subform_Quote::forge(),\n \\Receipts\\Subform_Receipt::forge(),\n \\Jobs\\Subform_Jobs::forge(),\n \\Invoices\\Subform_Invoices::forge(),\n \\Files\\Subform_Files::forge()\n\t\t);\n\n\t\t$vsubforms = array();\n\t\tforeach($subforms as $subform)\n\t\t{\n\t\t\tif(isset($vsubforms[$subform->get_prefix()]))\n\t\t\t{\n\t\t\t\tthrow new \\FuelException('Specified subform prefix already exists in subform test.');\n\t\t\t}\n\t\t\t$vsubforms[$subform->get_prefix()] = $subform->render(); \n\t\t}\n\n\t\t//update\n\t\tif(\\Input::post('save'))\n\t\t{\n\t\t\tforeach ($subforms as $subform) \n\t\t\t{\n\t\t\t\t$subform->update(\\Input::post($subform->get_prefix()));\n\t\t\t}\n\t\t}\n \n\n\t\tif (\\Input::post('save') ) \n\t\t{\n\t\t\tif(\\Input::param('lock'))\n {\n //return \\Message::set('error', 'Form locked has been changed'); \n $tab = \\Input::param('lock');\n \\Response::redirect(\\Uri::create('mainform/index/?tab='.$tab.'&quote_id='.$_GET['quote_id']));\n }else{\n return \\Message::set('success', 'Successfully saved..!') . \\Response::redirect(\\Uri::create('mainform/index/?tab=0&quote_id='.$_GET['quote_id']));\n } \n }\n \n if ( \\Input::post('cancel')) \n\t\t{\n\t\t\treturn \\Response::redirect(Helper_App::url_from_tab(\\Input::get('active_tab')));\n \n\t\t}\n\n\t\t$view = \\View::forge('mainform');\n if(\\Input::param('wind')){\n $this->set_iframe_template();\n }\n\t\t$view->set('subforms', $vsubforms, false);\n\t\t$this->template->body_classes = array('contact_un');\n\t\t$this->template->content = $view;\t\t\n\t}", "public function handleDataSubmission() {}", "public function addFormSubmitted($form){\n\t\t$section = $this->session->getNamespace('web');\n\t\t\n\t\t$values = $form->getValues();\n\t\t$core_pages = array(\n\t\t\t\t'name' => $values->name,\n\t\t\t\t'title' => $values->title,\n\t\t\t\t'metadata' => $values->metadata,\n\t\t\t\t'rewrite' => $values->rewrite,\n\t\t\t\t'core_modules_id' => $values->module,\n\t\t\t\t'home' => $values->home,\n\t\t\t\t'active' => $values->active,\n\t\t\t\t'order' => $values->order,\n\t\t\t\t'core_webs_id' => $section->id\n\t\t\t);\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('INSERT INTO core_pages', $core_pages);\n\t\t\n\t\t\n\t\t$section = $this->session->getNamespace('web');\n\t\t$db = $this->context->getService('database');\n\t\t$res = $db->table('core_pages')->where('core_webs_id', $section->id)->select('core_pages.id')->fetchPairs('id');\n\t\t$i = 0;\n\t\t$pages = array();\n\t\tforeach($res as $r){\n\t\t\t$pages[$i++] = $r['id'];\t\n\t\t}\n\t\t$section->pages = $pages;\n\t\t\n\t\t\n\t\t$id = $db->query('SELECT MAX(id) AS id FROM core_pages')->fetch();\n\t\t$module = $db->table('core_modules')->where('id', $values->module)->fetch();\n\t\t$page = array(\n\t\t\t\t'id' => $id[0],\n\t\t\t\t'name' => $values->name\n\t\t\t);\n\t\t$db->exec('INSERT INTO '.$module['module_name'], $page);\n\t\t$_url = $module['presenter'].':';\n\t\techo $_url;\n\t\t$this->redirect($_url, array('open' => $id[0]));\n\t}", "function Page_Main() {\r\n\t\tglobal $objForm, $Language, $gsFormError;\r\n\t\tglobal $gbSkipHeaderFooter;\r\n\r\n\t\t// Check modal\r\n\t\t$this->IsModal = (@$_GET[\"modal\"] == \"1\" || @$_POST[\"modal\"] == \"1\");\r\n\t\tif ($this->IsModal)\r\n\t\t\t$gbSkipHeaderFooter = TRUE;\r\n\r\n\t\t// Load key from QueryString\r\n\t\tif (@$_GET[\"Id_Pase\"] <> \"\") {\r\n\t\t\t$this->Id_Pase->setQueryStringValue($_GET[\"Id_Pase\"]);\r\n\t\t}\r\n\r\n\t\t// Set up Breadcrumb\r\n\t\t$this->SetupBreadcrumb();\r\n\r\n\t\t// Process form if post back\r\n\t\tif (@$_POST[\"a_edit\"] <> \"\") {\r\n\t\t\t$this->CurrentAction = $_POST[\"a_edit\"]; // Get action code\r\n\t\t\t$this->LoadFormValues(); // Get form values\r\n\t\t} else {\r\n\t\t\t$this->CurrentAction = \"I\"; // Default action is display\r\n\t\t}\r\n\r\n\t\t// Check if valid key\r\n\t\tif ($this->Id_Pase->CurrentValue == \"\") {\r\n\t\t\t$this->Page_Terminate(\"pase_establecimientolist.php\"); // Invalid key, return to list\r\n\t\t}\r\n\r\n\t\t// Validate form if post back\r\n\t\tif (@$_POST[\"a_edit\"] <> \"\") {\r\n\t\t\tif (!$this->ValidateForm()) {\r\n\t\t\t\t$this->CurrentAction = \"\"; // Form error, reset action\r\n\t\t\t\t$this->setFailureMessage($gsFormError);\r\n\t\t\t\t$this->EventCancelled = TRUE; // Event cancelled\r\n\t\t\t\t$this->RestoreFormValues();\r\n\t\t\t}\r\n\t\t}\r\n\t\tswitch ($this->CurrentAction) {\r\n\t\t\tcase \"I\": // Get a record to display\r\n\t\t\t\tif (!$this->LoadRow()) { // Load record based on key\r\n\t\t\t\t\tif ($this->getFailureMessage() == \"\") $this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\r\n\t\t\t\t\t$this->Page_Terminate(\"pase_establecimientolist.php\"); // No matching record, return to list\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tCase \"U\": // Update\r\n\t\t\t\t$sReturnUrl = $this->GetViewUrl();\r\n\t\t\t\tif (ew_GetPageName($sReturnUrl) == \"pase_establecimientolist.php\")\r\n\t\t\t\t\t$sReturnUrl = $this->AddMasterUrl($sReturnUrl); // List page, return to list page with correct master key if necessary\r\n\t\t\t\t$this->SendEmail = TRUE; // Send email on update success\r\n\t\t\t\tif ($this->EditRow()) { // Update record based on key\r\n\t\t\t\t\tif ($this->getSuccessMessage() == \"\")\r\n\t\t\t\t\t\t$this->setSuccessMessage($Language->Phrase(\"UpdateSuccess\")); // Update success\r\n\t\t\t\t\t$this->Page_Terminate($sReturnUrl); // Return to caller\r\n\t\t\t\t} elseif ($this->getFailureMessage() == $Language->Phrase(\"NoRecord\")) {\r\n\t\t\t\t\t$this->Page_Terminate($sReturnUrl); // Return to caller\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->EventCancelled = TRUE; // Event cancelled\r\n\t\t\t\t\t$this->RestoreFormValues(); // Restore form values if update failed\r\n\t\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Render the record\r\n\t\t$this->RowType = EW_ROWTYPE_EDIT; // Render as Edit\r\n\t\t$this->ResetAttrs();\r\n\t\t$this->RenderRow();\r\n\t}", "function submit_current_job()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\t#User has posted their current job details\n\t\tif(!empty($_POST['schoolid']))\n\t\t{\n\t\t\t$result = $this->_job->submit_current_job($this->input->post(NULL, TRUE));\n\t\t\t$data['msg'] = $result? \"Your job has been submitted for approval\": \"ERROR: Your job could not be submitted for approval.\";\n\t\t}\n\t\t\n\t\t$data['area'] = \"submit_current_job\";\n\t\t$this->load->view('job/addons', $data);\n\t}", "function Execute($formname,$nextformaction)\n {\n //$this->app->DBUpgrade->Checker('tabellenname');\n\n $this->FormList[$formname]->formaction=$nextformaction;\n $formaction = $this->app->Secure->GetGET(\"formaction\");\n\n // check for edit if id is online\n $pkname = $this->FormList[$formname]->pkname;\n if($this->FormList[$formname]->pkvalue==\"\")\n $this->FormList[$formname]->pkvalue=$this->app->Secure->GetGET($pkname);\n\n if($this->FormList[$formname]->pkvalue!=\"\" && $formaction==\"\")\n { \n $this->FormList[$formname]->getvaluesfromdb=true;\n }\n\n\n if($nextformaction==\"delete\")\n $formaction=\"delete\";\n \n switch($formaction)\n {\n case \"create\":\n\tif($this->MandatoryCheck($formname))\n\t{\n\t //print_r($this->GetAssocValueArray($formname));\n\t $this->InsertFormToDB($formname);\t\n\t $this->GoToLocation($formname);\n\t} \n\telse \n\t{\n\t // show mandatory msgs and given values\n\t $this->MandatoryErrors($formname);\n\t //$this->FillActualFields($formname);\n\t $this->PrintForm($formname);\n\t}\n break;\n case \"edit\":\n\tif($this->MandatoryCheck($formname))\n\t{\n\t //print_r($this->GetAssocValueArray($formname));\n\t //$this->FillActualFields($formname);\n\t $this->UpdateFormToDB($formname);\t\n\t $this->GoToLocation($formname);\n\t} \n\telse \n\t{\n\t // show mandatory msgs and given values\n\t $this->MandatoryErrors($formname);\n\t //$this->FillActualFields($formname);\n\t $this->PrintForm($formname);\n\t}\n break;\n\n case \"replace\":\n\tif($this->MandatoryCheck($formname))\n\t{\n\t //print_r($this->GetAssocValueArray($formname));\n\t if($this->FormList[$formname]->pkvalue==\"\")\n\t $this->InsertFormToDB($formname);\t\n\t else\n\t $this->UpdateFormToDB($formname);\t\n\t $this->GoToLocation($formname);\n\t} \n\telse \n\t{\n\t // show mandatory msgs and given values\n\t $this->MandatoryErrors($formname);\n\t //$this->FillActualFields($formname);\n\t $this->PrintForm($formname);\n\t}\n break;\n\n case \"delete\":\n\t// delete actual data\n\t$pkname=$this->FormList[$formname]->pkname;\n\t$pkvalue=$this->FormList[$formname]->pkvalue;\n\t$table=$this->FormList[$formname]->table;\n\t\n\t$pkvalue = $this->app->DB->Select(\"SELECT $pkname FROM `$table` \n\t WHERE userid='\".$this->app->User->GetID().\"' AND `$pkname`='$pkvalue' LIMIT 1\");\n\n\t$this->app->DB->Delete(\"DELETE FROM `$table` WHERE `$pkname`='$pkvalue' LIMIT 1\");\n\n\t$this->GoToLocation($formname);\n break;\n default:\n\t$this->PrintForm($formname);\n }\n \n }", "public function autosave() {\n\t $this->use_layout=false;\n\t $this->use_view=false;\n\t $content = new $this->model_class(Request::get(\"id\"));\n\t if($content->primval) {\n\t $content->update_attributes($_POST[\"cms_content\"]);\n\t echo date(\"H:i:s\");\n\t }else{\n\t throw new WXRoutingException('Tried to save in a non-existing database entry!', \"Page not found\", '404');\n\t }\n\t exit;\n\t}", "function thumbwhere_contentcollectionitem_edit_form_submit(&$form, &$form_state) {\n\n $thumbwhere_contentcollectionitem = entity_ui_controller('thumbwhere_contentcollectionitem')->entityFormSubmitBuildEntity($form, $form_state);\n // Save the thumbwhere_contentcollectionitem and go back to the list of thumbwhere_contentcollectionitems\n\n // Add in created and changed times.\n if ($thumbwhere_contentcollectionitem->is_new = isset($thumbwhere_contentcollectionitem->is_new) ? $thumbwhere_contentcollectionitem->is_new : 0) {\n $thumbwhere_contentcollectionitem->created = time();\n }\n\n $thumbwhere_contentcollectionitem->changed = time();\n\n $thumbwhere_contentcollectionitem->save($transaction);\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollectionitems';\n}", "public function actionEdit(){\n\t\t$form = $_POST;\n\t\t$id = $form['id'];\n\t\tunset($form['id']);\n\t\tunset($form['submit_']);\n\t\tif($form['active'] == 'on'){\n\t\t\t$form['active'] = 1;\n\t\t}\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('UPDATE core_pages SET ? WHERE id = ?', $form, $id);\n\t\t$this->redirect('pages:');\n\t}", "function plugin_options_form() {\n?>\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"save_metaboxes_general\" />\n<?php\n\t\t settings_fields( 'subpages_as_tabs_options' );\n\t\t do_settings_sections( 'subpage_tabs_plugin' );\n?>\n\n\t\t <input name=\"Submit\" type=\"submit\" value=\"<?php esc_attr_e( 'Save Changes' ); ?>\" />\n<?php\n\t\t}", "public function addContentData()\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_content?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_content?action=error');\n\t\t\t}\n\n\t\t}", "function _dataone_admin_settings_submit($form, &$form_state) {\n global $base_url;\n\n // Let menu_execute_active_handler() know that a menu rebuild may be required.\n variable_set('menu_rebuild_needed', TRUE);\n\n // Register updated node document.\n drupal_set_message(t('Don\\'t forget to register your changes with DataONE'), 'warning');\n $register_url = $base_url . '/admin/config/services/dataone/register/';\n $selected_versions = variable_get(DATAONE_VARIABLE_API_VERSIONS);\n foreach ($selected_versions as $version => $label) {\n $register_version_url = $register_url . $version;\n drupal_set_message(t('Register @ver: !url', array('@ver' => $label, '!url' => $register_version_url)), 'warning');\n }\n\n}" ]
[ "0.7391098", "0.6994369", "0.68740684", "0.6791515", "0.67127603", "0.6692319", "0.6666784", "0.6592971", "0.65409666", "0.65100205", "0.64858127", "0.64802134", "0.6475867", "0.64414793", "0.6438079", "0.641483", "0.63807654", "0.6366037", "0.6364764", "0.63596547", "0.63545674", "0.63206357", "0.6298252", "0.6280168", "0.6275258", "0.6274216", "0.6263345", "0.6223029", "0.6210614", "0.6197497", "0.61936307", "0.6186222", "0.61843175", "0.617033", "0.61641824", "0.6159065", "0.61503166", "0.61440146", "0.61422575", "0.61396044", "0.61364496", "0.61316323", "0.61242753", "0.6118396", "0.61114603", "0.6102053", "0.60950637", "0.6075485", "0.6059006", "0.60586125", "0.6054921", "0.60473436", "0.604599", "0.6044271", "0.60230535", "0.6021606", "0.60180736", "0.60176253", "0.60118294", "0.6008193", "0.6008193", "0.6008185", "0.59991956", "0.59942645", "0.59942317", "0.5991923", "0.5981578", "0.5975362", "0.59657794", "0.59609824", "0.5955139", "0.5953297", "0.59483397", "0.5948042", "0.5943634", "0.59394443", "0.5933894", "0.59321326", "0.59312624", "0.5928972", "0.59287775", "0.59287775", "0.59287775", "0.5928759", "0.59187347", "0.5914832", "0.5912445", "0.5909202", "0.5897553", "0.5895768", "0.5895319", "0.5891246", "0.58894837", "0.5887485", "0.5887022", "0.58833635", "0.58812314", "0.588035", "0.5877399", "0.5876146", "0.58749294" ]
0.0
-1
Operations for content administration page.
function mongo_node_operations() { $operations = array( 'publish' => array( 'label' => t('Publish selected content'), 'callback' => 'mongo_node_mass_update', 'callback arguments' => array('updates' => array('status' => 1)), ), 'unpublish' => array( 'label' => t('Unpublish selected content'), 'callback' => 'mongo_node_mass_update', 'callback arguments' => array('updates' => array('status' => 0)), ), 'delete' => array( 'label' => t('Delete selected content'), 'callback' => 'mongo_node_mass_delete', ), ); return $operations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function adminContentArea(): void {\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n\n // Load Main Content Modal\n include \"admin\" . DS . \"modal.php\";\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n }", "public function actionAdmin() {\n\t\ttry {\n\t\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.structure.controllers');\n\t\t\t$this->setCurrentNode($this->currentContent->node);\n\t\t\t$content = new FormContent();\n\t\t\t$content->targetContentId = $this->currentContent->contentId;\n\t\t\t$content->selected = false;\n\n\t\t\t$contentCriteriaBuilder = new CriteriaBuilder('content');\n\t\t\t$contentCriteriaBuilder->filterBy('contentId', $this->currentContent->contentId);\n\n\t\t\t$this->render('admin', array(\n\t\t\t\t'breadcrumb' => $this->buildBreadcrumb($this->currentContent->contentId),\n\t\t\t\t'mainMenu' => $this->buildMainMenu(2, 4),\n\t\t\t\t'content'=>$content,\n\t\t\t\t'sourceContent'=>$this->currentContent,\n\t\t\t\t'node' => $this->currentNode,\n\t\t\t\t'contentsDataProvider' => $contentCriteriaBuilder->getActiveDataProvider(array('pagination' => false))\n\t\t\t));\n\t\t} catch(\\Exception $e) {\n\t\t\t\\Yii::log('Error in '.__METHOD__.'():'.$e->getMessage(), \\CLogger::LEVEL_ERROR, 'sweelix.yii1.admin.structure.controllers');\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function admin_page()\n {\n }", "public function admin_page()\n {\n }", "function bit_admin_page() {\n\t//Creates admin page\n}", "public function add_content() {\n $data['title'] = translate('add') . \" \" . translate('content_management');\n $this->load->view('admin/master/add_update_content', $data);\n }", "public function adminPanel() {\n $posts = $this->postManager->getPosts();\n $comments = $this->commentManager->getFlaggedComments();\n $view = new View(\"Administration\");\n $view->generate(array('posts' => $posts, 'comments' => $comments));\n }", "public function question_content() {\r\n $this->check_permission(19);\r\n $content_data['add'] = $this->check_page_action(19, 'add');\r\n\r\n $this->quick_page_setup(Settings_model::$db_config['adminpanel_theme'], 'adminpanel', $this->lang->line('question_content'), 'operation/question_content', 'header', 'footer', '', $content_data);\r\n }", "function GetAdminSection()\n {\n return 'content';\n }", "public function admin_index() {\n\n\t\t\t/*get all data from table \"modules\"*/\n\t\t\t$modules=$this->Module->find(\"all\");\n\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Gestion\");\n\t\t\t$this->set(\"legend\", \"Modules manager\");\n\t\t\t$this->set(\"modules\", $modules);\n\t\t\t}", "public function config_page() {\n\t\trequire HS_DOCS_API_DIR_PATH . 'admin/views/admin-page.php';\n\t}", "public function adminActionGet() : object\n {\n $page = $this->app->page;\n $title = \"Redigera Inlägg\";\n $db = $this->app->db;\n $id = null;\n $doDelete = null;\n $doEdit = null;\n $db->connect();\n $sql = \"SELECT * FROM content;\";\n $resultset = $db->executeFetchAll($sql);\n\n $data = [\n \"resultset\" => $resultset ?? null,\n \"id\" => $id ?? null,\n \"doEdit\" => $doEdit ?? null,\n \"doDelete\" => $doDelete ?? null,\n \"content\" => $resultset\n ];\n \n $page->add(\"cms/header\");\n $page->add(\"cms/admin\", $data);\n \n return $page->render([\n \"title\" => $title\n ]);\n }", "public function Index() {\n $content = new CMContent();\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n $this->views->SetTitle('Sida')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'content' => null,\n ), 'primary')\n ->AddInclude(__DIR__ . '/../adminsidebar.tpl.php', array('is_authenticated'=>$this->user['isAuthenticated'], \n 'user'=>$this->user,'controllers'=>$controllers,'contents'=>$content->ListAll(array('type'=>'post', 'order-by'=>'title', 'order-order'=>'DESC')),), 'sidebar');\n }", "function my_admin_page_contents() {\n\t\t?>\n\t\t\t<h1>\n\t\t\t\tPage d'aministration du plugin de création de formulaire\n\t\t\t\t\n\t\t\t</h1>\n\t\t<?php\n\t}", "function adminDefault() {\n\t\t\n\t\t// load intro and options\n\t\t$this->content = new BlogPostIntro();\n\t\t$this->content->loadContent($GLOBALS['objPage']->id);\n\t\t\n\t\t// load confirmation\n\t\t$this->confirm = new CmsContent();\n\t\t$this->confirm->loadContent($GLOBALS['objPage']->id, 'confirm');\n\t\t\n\t\t// load no access message\n\t\t$this->noaccess = new CmsContent();\n\t\t$this->noaccess->loadContent($GLOBALS['objPage']->id, 'noaccess');\n\t\t\n\t\tif ($GLOBALS['confModule']['blog_post']['editor_full']) {\n\t\t\t$this->content->initAdmin('full',2);\n\t\t\t$this->confirm->initAdmin('full',2);\n\t\t\t$this->noaccess->initAdmin('full',2);\n\t\t} else {\n\t\t\t$this->content->initAdmin('Default',1);\n\t\t\t$this->confirm->initAdmin('Default',1);\n\t\t\t$this->noaccess->initAdmin('Default',1);\n\t\t}\n\t\t\n\t\t$this->data = new ContentBlogPost();\n\t\t$this->data->loadPostsList(true);\n\t\t\n\t\t// only if on page\n\t\t$GLOBALS['objCms']->initSubmitting(1,2); // save and save and close\n\n\t\t$this->baseLink = CMS_WWW_URI.'admin/special.php?module=blog';\n\t\t$this->setView('admin');\n\t\t\n\t}", "function manage()\n\t{\n\t\tglobal $template, $errors, $db, $mod_loader, $security;\n\t\t\n\t\t$menuid = ( isset( $_GET[ 'menuid' ] ) ) ? intval( $_GET[ 'menuid' ] ) : 0;\n\t\t\n\t\tif ( $menuid != 0 )\n\t\t{\n\t\t\t$sql = \"SELECT * FROM \" . MORECONTENT_MENU_TABLE . \" WHERE menu_parent='$menuid'\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$submenus = $db->sql_fetchrowset( $result );\n\t\t\t\n\t\t\t$sql = \"SELECT m.*, c.* FROM \" . MORECONTENT_MENU_TABLE . \" m LEFT JOIN \" . MORECONTENT_CONTENT_TABLE . \" c ON c.menu_id=m.menu_id WHERE m.menu_id='$menuid' LIMIT 1\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$menu = $db->sql_fetchrow( $result );\n\t\t}else\n\t\t{\n\t\t\t$sql = \"SELECT * FROM \" . MORECONTENT_MENU_TABLE . \" WHERE menu_level='0'\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$submenus = $db->sql_fetchrowset( $result );\n\t\t\t\n\t\t\t$menu = array( 'menu_id' => 0, 'menu_parent' => 0, 'menu_level' => -1, 'menu_title' => $this->lang[ 'Menu_na' ], 'menu_content' => 0, 'id' => 0, 'content' => '' );\n\t\t}\n\t\t\n\t\t// get the editor\n\t\t$mods = $mod_loader->getmodule( 'editor', MOD_FETCH_NAME, NOT_ESSENTIAL );\n\t\t$mod_loader->port_vars( array( 'name' => 'editor1', 'quickpost' => FALSE, 'def_text' => stripslashes( $menu[ 'content' ] ) ) );\n\t\t$mod_loader->execute_modules( 0, 'show_editor' );\n\t\t$editor = $mod_loader->get_vars( array( 'editor_HTML', 'editor_WYSIWYG' ) );\n\t\t\n\t\t$frame = '<b><a href=\"%s\">%s</a></b> :: ';\n\t\t$parsed_submenus = '';\n\t\tif ( is_array( $submenus ) )\n\t\t{\n\t\t\tforeach ( $submenus as $sub )\n\t\t\t{\n\t\t\t\t$url = $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage&menuid=' . $sub[ 'menu_id' ] );\n\t\t\t\t$parsed_submenus .= sprintf( $frame, $url, $sub[ 'menu_title' ] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$template->assign_block_vars( 'manage', '', array(\n\t\t\t'L_TITLE' => $this->lang[ 'Manage_title' ],\n\t\t\t'L_EXPLAIN' => $this->lang[ 'Manage_explain' ],\n\t\t\t'L_TITLE2' => $this->lang[ 'Menu_title' ],\n\t\t\t'L_TITLE3' => $menu[ 'menu_title' ],\n\t\t\t'L_ADDMENU' => $this->lang[ 'Menu_add' ],\n\t\t\t'L_ADDTITLE' => $this->lang[ 'Menu_addtitle' ],\n\t\t\t'L_DELMENU' => $this->lang[ 'Menu_delete' ],\n\t\t\t'L_CHANGEMENU' => $this->lang[ 'Menu_change' ],\n\t\t\t'L_UP' => $this->lang[ 'Menu_up' ],\n\t\t\t\n\t\t\t'S_EDITOR' => $editor[ 'editor_HTML' ],\n\t\t\t'S_MENUS' => $parsed_submenus,\n\t\t\t'S_FORM_ACTION' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage2&menuid=' . $menu[ 'menu_id' ] . '&menulevel=' . $menu[ 'menu_level' ] ),\n\t\t\t\n\t\t\t'U_UP' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage&menuid=' . $menu[ 'menu_parent' ] ),\n\t\t) );\n\t\t$template->assign_switch( 'manage', TRUE );\n\t}", "public function getContent()\n {\n Tools::redirectAdmin($this->context->link->getAdminLink('AdminBackupProSettings'));\n }", "function wlms_book_categories_manage_page_content()\n{\n global $wpdb;\n if( isset($_GET['manage']) && ($_GET['manage'] == 'add-book-categories') )\n {\n wlms_book_categories_content();\n }\n else\n {\n wlms_book_categories_list();\n }\n}", "public function main()\n {\n $lang = $this->getLanguageService();\n // Access check...\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $access = is_array($this->pageinfo) ? 1 : 0;\n // Content\n $content = '';\n if ($this->id && $access) {\n // Initialize permission settings:\n $this->CALC_PERMS = $this->getBackendUser()->calcPerms($this->pageinfo);\n $this->EDIT_CONTENT = $this->contentIsNotLockedForEditors();\n\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);\n\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode('jumpToUrl', '\n function jumpToUrl(URL,formEl) {\n if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?)\n if (!TBE_EDITOR.isFormChanged()) {\n window.location.href = URL;\n } else if (formEl) {\n if (formEl.type==\"checkbox\") formEl.checked = formEl.checked ? 0 : 1;\n }\n } else {\n window.location.href = URL;\n }\n }\n ');\n $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '\n if (top.fsMod) {\n top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n top.fsMod.navFrameHighlightedID[\"web\"] = \"pages' . (int)$this->id . '_\"+top.fsMod.currentBank; ' . (int)$this->id . ';\n }\n ' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '\n function deleteRecord(table,id,url) { //\n window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[')\n . ' + table + \"][\" + id + \"][delete]=1&redirect=\" + encodeURIComponent(url) + \"&prErr=1&uPT=1\";\n return false;\n }\n ');\n\n // Find backend layout / columns\n $backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);\n if (!empty($backendLayout['__colPosList'])) {\n $this->colPosList = implode(',', $backendLayout['__colPosList']);\n }\n // Removing duplicates, if any\n $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));\n // Accessible columns\n if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {\n $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));\n // Match with the list which is present in the colPosList for the current page\n if (!empty($this->colPosList) && !empty($this->activeColPosList)) {\n $this->activeColPosList = array_unique(array_intersect(\n $this->activeColPosList,\n $this->colPosList\n ));\n }\n } else {\n $this->activeColPosList = $this->colPosList;\n }\n $this->activeColPosList = implode(',', $this->activeColPosList);\n $this->colPosList = implode(',', $this->colPosList);\n\n $content .= $this->getHeaderFlashMessagesForCurrentPid();\n\n // Render the primary module content:\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n $content .= '<form action=\"' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'imagemode' => $this->imagemode])) . '\" id=\"PageLayoutController\" method=\"post\">';\n // Page title\n $content .= '<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($this->getLocalizedPageTitle()) . '</h1>';\n // All other listings\n $content .= $this->renderContent();\n }\n $content .= '</form>';\n $content .= $this->searchContent;\n // Setting up the buttons for the docheader\n $this->makeButtons();\n // @internal: This is an internal hook for compatibility7 only, this hook will be removed without further notice\n if ($this->MOD_SETTINGS['function'] != 1 && $this->MOD_SETTINGS['function'] != 2) {\n $renderActionHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['renderActionHook'];\n if (is_array($renderActionHook)) {\n foreach ($renderActionHook as $hook) {\n $params = [\n 'deleteButton' => $this->deleteButton,\n ''\n ];\n $content .= GeneralUtility::callUserFunction($hook, $params, $this);\n }\n }\n }\n // Create LanguageMenu\n $this->makeLanguageMenu();\n } else {\n $this->moduleTemplate->addJavaScriptCode(\n 'mainJsFunctions',\n 'if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';'\n );\n $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n $view->assignMultiple([\n 'title' => $lang->getLL('clickAPage_header'),\n 'message' => $lang->getLL('clickAPage_content'),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n // Set content\n $this->moduleTemplate->setContent($content);\n }", "public function getContent()\n {\n Tools::redirectAdmin($this->context->link->getAdminLink('AdminPayseraConfiguration'));\n }", "public function indexTypo3PageContent() {}", "public function show_admin_page() {\n\t\t$this->view->render();\n\t}", "public function adminIndexAction()\r\n {\r\n $pages=$this->getDoctrine()->getRepository(\"AppBundle:Page\")->findAll();\r\n $view=array('pages' => $pages,\r\n );\r\n return $this->render('page/adminIndex.html.twig', $view);\r\n }", "public function actionAdministration()\n\t{\n\t $this->render('index');\n\t}", "public function admin_page()\n {\n echo $this->return_admin_page();\n }", "public function index() {\n $this->view->title = 'Egyéb tartalom oldal';\n $this->view->description = 'Egyéb tartalom oldal description';\n\n\n $this->view->js_link[] = $this->make_link('js', ADMIN_JS, 'pages/content.js');\n\n $this->view->all_content = $this->content_model->all_content();\n\n $this->view->render('content/tpl_content');\n }", "function adminSpecial() {\n\t\t$this->adminDefault();\n\t\t$this->baseLink = CMS_WWW_URI.'admin/special.php?module=picture_gallery';\n\t\t$this->setView('admin_list');\n\t}", "public function register_admin_page()\n {\n }", "static function adminMenuPage()\n {\n // Include the view for this menu page.\n include PROJECTEN_PLUGIN_ADMIN_VIEWS_DIR . '/admin_main.php';\n }", "public function manage()\n {\n global $template;\n\n $template->set_filename('plugin_admin_content', dirname($this->getFileLocation()).\"/admin/amm_admin.tpl\");\n\n $pluginInfo=array(\n 'AMM_VERSION' => \"<i>\".$this->getPluginName().\"</i> \".l10n('gmaps_release').AMM_VERSION,\n 'PATH' => AMM_PATH\n );\n\n $template->assign('plugin', $pluginInfo);\n $template->assign('AMM_BODY_PAGE', '<p class=\"warnings\">'.sprintf(l10n('g002_gpc_not_up_to_date'),AMM_GPC_NEEDED, GPC_VERSION).'</p>');\n $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');\n }", "public function actionIndex() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.structure.controllers');\n\t\t$this->redirect(array(\n\t\t\t'content/detail',\n\t\t\t'contentId'=>\\Yii::app()->request->getParam('contentId', 0)\n\t\t));\n\t}", "function page_admincontrol() {\r\n\t\tglobal $admin_lang;\r\n\t\t//\r\n\t\t// get the coutnt of all pages\r\n\t\t//\r\n\t\t$sitedata_result = db_result(\"SELECT page_id FROM \" . DB_PREFIX . \"pages_content\");\r\n\t\t$page_count = mysql_num_rows($sitedata_result);\r\n\t\t//\r\n\t\t// get the count of all registered users\r\n\t\t//\r\n\t\t$users_result = db_result(\"SELECT user_id FROM \" . DB_PREFIX . \"users\");\r\n\t\t$users_count = mysql_num_rows($users_result);\r\n\t\t//\r\n\t\t// get the size of all tables with the prefix DB_PREFIX\r\n\t\t//\r\n\t\t$table_infos_result = db_result(\"SHOW TABLE STATUS\");\r\n\t\t$data_size = 0;\r\n\t\twhile($table_infos = mysql_fetch_object($table_infos_result)) {\r\n\t\t\tif(substr($table_infos->Name, 0, strlen(DB_PREFIX)) == DB_PREFIX)\r\n\t\t\t\t$data_size += $table_infos->Data_length + $table_infos->Index_length;\r\n\t\t}\r\n\t\r\n\t\t$out = \"<h3>AdminControl</h3><hr />\r\n\t<table>\r\n\t\t<tr><td>\" . $admin_lang['online since'] . \"</td><td>#DATUM</td></tr>\r\n\t\t<tr><td>\" . $admin_lang['registered users'] . \"</td><td>\" . $users_count . \"</td></tr>\r\n\t\t<tr><td>\" . $admin_lang['created pages'] . \"</td><td>\" . $page_count . \"</td></tr>\r\n\t\t<tr><td>\" . $admin_lang['database size'] . \"</td><td>\" . kbormb($data_size) . \"</td></tr>\r\n\t</table>\r\n\t\r\n\t<h3>Aktuelle Besucher</h3><hr />\r\n\t<table>\r\n\t\t<tr>\r\n\t\t\t<td>\".$admin_lang['name'].\"</td>\r\n\t\t\t<td>\".$admin_lang['page'].\"</td>\r\n\t\t\t<td>\".$admin_lang['last action'].\"</td>\r\n\t\t\t<td>\".$admin_lang['language'].\"</td>\r\n\t\t\t<td>\".$admin_lang['ip'].\"</td>\r\n\t\t\t<td>\".$admin_lang['host'].\"</td>\r\n\t\t</tr>\";\r\n\t\t\t//output all visitors surfing on the site\r\n\t\t\t$users_online_result = db_result(\"SELECT userid, page, lastaction, lang, ip, host FROM \" . DB_PREFIX . \"online\");\r\n\t\t\twhile($users_online = mysql_fetch_object($users_online_result)) {\r\n\t\t\t\tif($users_online->userid == 0)\r\n\t\t\t\t\t$username = $admin_lang['not registered'];\r\n\t\t\t\telse\r\n\t\t\t\t\t$username = getUserById($users_online->userid);\r\n\t\t\t\t//\r\n\t\t\t\t// FIXME: gethostbyaddr needes to much time if there are many users online\r\n\t\t\t\t//\r\n\t\t\t\t$out .= \"\\t\\t\\t<tr>\r\n\t\t\t<td>\".$username.\"</td>\r\n\t\t\t<td><a href=\\\"index.php?page=\".$users_online->page.\"\\\">\".$users_online->page.\"</a></td>\r\n\t\t\t<td>\" . date(\"d.m.Y H:i:s\", $users_online->lastaction).\"</td>\r\n\t\t\t<td>\" . $admin_lang[$users_online->lang] . \"</td>\r\n\t\t\t<td>\" . $users_online->ip . \"</td>\r\n\t\t\t<td>\" . $users_online->host . \"</td>\r\n\t\t</tr>\\r\\n\";\r\n\t\t\t}\r\n\r\n\t\t$out .= \"</table>\";\r\n\t\r\n\t\treturn $out;\r\n\t}", "public function index()\n {\n $this->title = 'Панель менеджера';\n $this->page = 'Главная';\n $content = view(config('settings.theme').'.admin.administrator.contentIndex')->render();\n $this->vars = array_add($this->vars,'content',$content);\n return $this->renderOutput();\n }", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "function admin()\n{\n global $app;\n\n $app->render('admin.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 1),\n 'isadmin' => is_admin()]);\n}", "public function displayContentOverview() {}", "public function load_admin_page()\n {\n include 'admin-page.html';\n }", "public function page(){\n\t\t$pageLoader = $this->plugin->library('Page');\n\t\t$pageLoader->load('admin/settings');\n\t}", "public function page() {\n\t\t$this->page = $this->plugin->factory->adminPage;\n\t\t$this->page->show();\n\t}", "public function indexAction()\n {\n $this->tag->setTitle(__('Admin panel'));\n $this->siteDesc = __('Admin panel');\n }", "public function adminindex() {\n $current_page = 'Admin';\n $content = \"<div class='alert alert-success'>The content of Admin Section</div>\";\n \n \n $menu = $this->buildmenu();//building a dynamic menu\n return view('pages.admin')->with('current_page', $current_page)\n ->with('page_content', $content)\n ->with('pages', $menu);\n }", "public function admin(){\n $data = array('page_title' => \"Admin home\");\n $this->view->load_admin('home/admin/admin_view', $data);\n }", "public function displayAdminPanel() {}", "public function adminActionPost() : object\n {\n $page = $this->app->page;\n $session = $this->app->session;\n $request = $this->app->request;\n $response = $this->app->response;\n $db = $this->app->db;\n $title = \"Redigera inlägg\";\n $doEdit = $request->getPost(\"doEdit\");\n if ($doEdit) {\n $contentId = $request->getPost(\"doEdit\");\n $db->connect();\n $sql = \"SELECT * FROM content WHERE id = ?;\";\n $resultset = $db->executeFetchAll($sql, [$contentId]);\n $session->set(\"content\", $resultset[0]);\n $session->set(\"adminid\", $contentId);\n $pretitle = $resultset[0]->title;\n $title = slugify($pretitle);\n return $response->redirect(\"cms/edit/{$title}\");\n }\n\n $page->add(\"cms/header\");\n $page->add(\"cms/admin\", [\n \"resultset\" => $resultset\n ]);\n \n return $page->render([\n \"title\" => $title\n ]);\n }", "public function admin()\n {\n $this->template_admin->displayad('admin');\n }", "public function index()\n {\n return view('admin.page_contents.page_content_list');\n }", "public function settingsPage()\n {\n include 'views/admin.php';\n }", "public function index(){\n $this->title = 'Articles management';\n $articles = $this->getArticles();\n $this->content = view(env('THEME').'.admin.articles_content')->with('articles', $articles)->render();\n return $this->renderOutput();\n }", "function adminDefault() {\n\t\t// decide submit modes\n\t\t$GLOBALS['objCms']->initSubmitting(1,2); // save and save and close\n\t\n\t\t// initialize object content\n\t\t$this->content = new ContentFck();\n\t\t\n\t\t// load content corresponding to page\n\t\t$this->content->loadContent($GLOBALS['objPage']->id);\n\t\n\t\t// set script for form\n\t\t$this->content->initAdmin('full', 2);\n\t\t\n\t\t$this->setView('admin_form');\n\t\t\n\t}", "function omn_superadmin_overview_page() {\n\n\tif( isset($_REQUEST['action']) ) {\n $action = $_REQUEST['action'];\n } else {\n $action = 'default';\n }\n \n switch( $action ) {\n case 'add':\n \tomn_superadmin_overview_page_add();\n \tbreak;\n case 'delete-notification':\n \tomn_delete_notification( $_GET['user'], $_GET['message'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'expire-message':\n \tomn_delete_notifications( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'delete-message':\n \tomn_delete_message( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n default:\n \tomn_superadmin_overview_page_default();\n \tbreak;\n }\n}", "public function admin_page()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n echo $this->return_admin_page();\n }", "public function action_index()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\t// Make sure the administrator has a valid session...\n\t\tvalidateSession();\n\n\t\t// Load the language and templates....\n\t\tTxt::load('Admin');\n\t\ttheme()->getTemplates()->load('Admin');\n\t\tloadCSSFile('admin.css');\n\t\tloadJavascriptFile('admin.js', array(), 'admin_script');\n\n\t\t// The Admin functions require Jquery UI ....\n\t\t$modSettings['jquery_include_ui'] = true;\n\n\t\t// No indexing evil stuff.\n\t\t$context['robot_no_index'] = true;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\n\t\t// Actually create the menu!\n\t\t$admin_include_data = $this->loadMenu();\n\t\t$this->buildLinktree($admin_include_data);\n\n\t\tcallMenu($admin_include_data);\n\t}", "function show_admin_content() {\n\n if($_SERVER['REQUEST_URI'] == \"/legale/admin/\" || $_SERVER['REQUEST_URI'] == \"/legale/admin/index.php\" ) {\n include(TEMPLATE_BACK . \"/dashboard.php\");\n }\n\n if(isset($_GET['post'])) {\n include(TEMPLATE_BACK . \"/post.php\");\n }\n\n if(isset($_GET['edit-post'])) {\n include(TEMPLATE_BACK . \"/edit-post.php\");\n }\n\n if(isset($_GET['delete-post'])) {\n include(TEMPLATE_BACK . \"/delete-post.php\");\n }\n\n if(isset($_GET['cons'])) {\n include(TEMPLATE_BACK . \"/cons.php\");\n }\n\n if(isset($_GET['view-con'])) {\n include(TEMPLATE_BACK . \"/view-con.php\");\n }\n\n if(isset($_GET['users'])) {\n include(TEMPLATE_BACK . \"/users.php\");\n }\n\n if(isset($_GET['logout'])) {\n include(TEMPLATE_BACK . \"/logout.php\");\n }\n\n}", "public function admin_page() {\n echo $this->generateView('main', []);\n }", "public function manageAction() {\n \n //GET NAVIGATION\n $this->view->navigationStore = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_sitestorereview'); \n //GET NAVIGAION\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestorereview_admin_main', array(), 'sitestorereview_admin_main_params');\n\n //SHOW REVIEW PARAMETERS\n $this->view->paginator = $paginator = Engine_Api::_()->getDbtable('reviewcats', 'sitestorereview')->reviewCatParams();\n\n $reviewcat_cat_array = array();\n foreach ($paginator as $item) {\n $reviewcat_cat_array[$item->category_id][0] = $item->category_name;\n $reviewcat_cat_array[$item->category_id][$item->reviewcat_id] = $item->reviewcat_name;\n }\n\n $this->view->reviewcat_cat_array = $reviewcat_cat_array;\n }", "function index()\n{\n $this->load->module('site_security');\n $this->site_security->_make_sure_is_admin();\n\n $data['query'] = $this->get('date');\n \n $data['flash'] = $this->session->flashdata('delete');\n $data['headline'] = 'Blog';\n $data['view_module'] = 'blog';\n $data['view_file'] = 'manage';\n $this->load->module('templates');\n $this->templates->admin($data);\n}", "public function Index() {\n $content = new CMContent();\n $this->views->SetTitle('Content Controller')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'contents' => $content->ListAll(),\n ));\n }", "function edit_do($id, $title, $pages, $content, $state, $advanced = FALSE, $options = array(), $head = ''){\r\n $access = $this->reg->db->GetCol('SELECT id\r\n FROM system__content\r\n WHERE user_id = ?\r\n AND id = ?', array($_SESSION['SYSTEM']['USER_ID'], $id[0]));\r\n\r\n // check that the user has access to the content\r\n if(count($access)){\r\n if($advanced[0]){\r\n // insert content\r\n $content = $this->reg->db->Execute('UPDATE system__content\r\n SET title = ?,\r\n url_slug = ?,\r\n content = ?,\r\n state = ?,\r\n advanced = ?,\r\n show_title = ?,\r\n show_date = ?,\r\n head = ?\r\n WHERE id = ?', array(trim($title[0]),\r\n $this->generate_url_slug($title[0]),\r\n $content[0],\r\n (($state[0] == '1') ? 'published' : 'draft'),\r\n 1,\r\n (in_array('show_title', $options)?1:0),\r\n (in_array('show_date', $options)?1:0),\r\n $head[0],\r\n $id[0]));\r\n }else{\r\n // insert content\r\n $content = $this->reg->db->Execute('UPDATE system__content\r\n SET title = ?,\r\n url_slug = ?,\r\n content = ?,\r\n state = ?,\r\n show_title = ?,\r\n show_date = ?\r\n WHERE id = ?', array(trim($title[0]),\r\n $this->generate_url_slug($title[0]),\r\n $content[0],\r\n (($state[0] == '1') ? 'published' : 'draft'),\r\n (($this->reg->config->is_set('post_show_title') && $this->reg->config->get('post_show_title'))?1:0),\r\n (($this->reg->config->is_set('post_show_date') && $this->reg->config->get('post_show_date'))?1:0),\r\n $id[0]));\r\n }\r\n\r\n // check that pages were passed\r\n if(count($pages)){\r\n // delete all pages to a navigation item\r\n $this->reg->db->Execute('DELETE FROM system__intersect__navigation_content\r\n WHERE content_id = ?', array($id[0]));\r\n\r\n // insert the pages/navigation intersects\r\n $content = array();\r\n $page = 'INSERT INTO system__intersect__navigation_content\r\n\t\t\t\t\t\t\t(content_id, navigation_id) VALUES ';\r\n\r\n // loop through all unique organizations and add them to the query\r\n $i = 1;\r\n $used_ids = array();\r\n foreach($pages as $value){\r\n if($value != '' && !in_array($value, $used_ids)){\r\n $used_ids[] = $value;\r\n if($i != 1){\r\n $page .= ', ';\r\n }\r\n $page .= '(?, ?)';\r\n $content[] = $id[0];\r\n $content[] = $value;\r\n $i++;\r\n }\r\n }\r\n\r\n // run query to add users posts to navigation item\r\n if(count($content)){\r\n $page = $this->reg->db->Execute($page, $content);\r\n }else{\r\n $page = TRUE;\r\n }\r\n }\r\n\r\n // return message of whether or not the edit was successful\r\n if(!$content && (isset($page) && !$page)){\r\n $_SESSION['SYSTEM']['MESSAGES']['error'][] = '<p>The content was not edited successfully. Please try again.</p>';\r\n }else{\r\n $_SESSION['SYSTEM']['MESSAGES']['success'][] = '<p>The content was edited successfully.</p>';\r\n }\r\n\r\n return TRUE;\r\n }else{\r\n $_SESSION['SYSTEM']['MESSAGES']['error'][] = '<p>You are not allowed to edit this content.</p>';\r\n return FALSE;\r\n }\r\n }", "function admin_page() {\n\t\t$this->maybe_authorize();\n?>\n\t\t<div class=\"wrap ghupdate-admin\">\n\n\t\t\t<div class=\"head-wrap\">\n\t\t\t\t<?php screen_icon( 'plugins' ); ?>\n\t\t\t\t<h2><?php _e( 'Setup GitHub Updates' , 'github_plugin_updater' ); ?></h2>\n\t\t\t</div>\n\n\t\t\t<div class=\"postbox-container primary\">\n\t\t\t\t<form method=\"post\" id=\"ghupdate\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\tsettings_errors();\n\t\tsettings_fields( 'ghupdate' ); // includes nonce\n\t\tdo_settings_sections( 'github-updater' );\n?>\n\t\t\t\t</form>\n\t\t\t</div>\n\n\t\t</div>\n\t\t<?php\n\t}", "public function page_default_administration()\n\t{\n\t\tFsb::$tpl->set_file('adm_index.html');\n\n\t\t// Les 5 derniers logs administratifs\n\t\t$logs = Log::read(Log::ADMIN, 5);\n\t\tforeach ($logs['rows'] AS $log)\n\t\t{\n\t\t\tFsb::$tpl->set_blocks('log', array(\n\t\t\t\t'STR' =>\t$log['errstr'],\n\t\t\t\t'INFO' =>\tsprintf(Fsb::$session->lang('adm_list_log_info'), htmlspecialchars($log['u_nickname']), Fsb::$session->print_date($log['log_time'])),\n\t\t\t));\n\t\t}\n\n\t\t// On affiche tous les comptes ?\n\t\t$show_all = (Http::request('show_all')) ? true : false;\n\n\t\t// Liste des comptes en attente de validation\n\t\t$sql = 'SELECT u_id, u_nickname, u_joined, u_register_ip\n\t\t\t\tFROM ' . SQL_PREFIX . 'users\n\t\t\t\tWHERE u_activated = 0\n\t\t\t\t\tAND u_confirm_hash = \\'.\\'\n\t\t\t\t\tAND u_id <> ' . VISITOR_ID . '\n\t\t\t\tORDER BY u_joined DESC\n\t\t\t\t' . (($show_all) ? '' : 'LIMIT 5');\n\t\t$result = Fsb::$db->query($sql);\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tFsb::$tpl->set_blocks('wait', array(\n\t\t\t\t'NICKNAME' =>\t\thtmlspecialchars($row['u_nickname']),\n\t\t\t\t'JOINED_IP' =>\t\tsprintf(Fsb::$session->lang('adm_joined_ip'), Fsb::$session->print_date($row['u_joined']), $row['u_register_ip']),\n\n\t\t\t\t'U_EDIT' =>\t\t\tsid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=user&amp;id=' . $row['u_id']),\n\t\t\t\t'U_VALIDATE' =>\t\tsid('index.' . PHPEXT . '?mode=validate&amp;id=' . $row['u_id']),\n\t\t\t));\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t// Liste des membres en ligne\n\t\t$sql = 'SELECT s.s_id, s.s_ip, s.s_page, s.s_user_agent, u.u_nickname, u.u_color, u.u_activate_hidden, b.bot_id, b.bot_name\n\t\t\tFROM ' . SQL_PREFIX . 'sessions s\n\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\tON u.u_id = s.s_id\n\t\t\tLEFT JOIN ' . SQL_PREFIX . 'bots b\n\t\t\t\tON s.s_bot = b.bot_id\n\t\t\tWHERE s.s_time > ' . intval(CURRENT_TIME - 300) . '\n\t\t\tORDER BY u.u_auth DESC, u.u_nickname, s.s_id';\n\t\t$result = Fsb::$db->query($sql);\n\t\t$id_array = array();\n\t\t$ip_array = array();\n\t\t$f_idx = $t_idx = $p_idx = array();\n\t\t$logged = array('users' => array(), 'visitors' => array());\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tif (!is_null($row['bot_id']) || $row['s_id'] == VISITOR_ID)\n\t\t\t{\n\t\t\t\tif (in_array($row['s_ip'], $ip_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\t$ip_array[] = $row['s_ip'];\n\t\t\t\t$type = 'visitors';\n\n\t\t\t\t// Les bots ont leur propre couleur\n\t\t\t\tif (!is_null($row['bot_id']))\n\t\t\t\t{\n\t\t\t\t\t$row['u_color'] = 'class=\"bot\"';\n\t\t\t\t\t$row['u_nickname'] = $row['bot_name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (in_array($row['s_id'], $id_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\t$id_array[] = $row['s_id'];\n\t\t\t\t$type = 'users';\n\t\t\t}\n\n\t\t\t// Position du membre sur le forum\n\t\t\t$id = null;\n\t\t\t$method = 'forums';\n\t\t\tif (strpos($row['s_page'], 'admin/') !== false)\n\t\t\t{\n\t\t\t\t$location = Fsb::$session->lang('adm_location_adm');\n\t\t\t\t$url = 'admin/index.' . PHPEXT;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$page = basename($row['s_page']);\n\t\t\t\t$url = '';\n\t\t\t\t$location = '';\n\t\t\t\tif (preg_match('#^index\\.' . PHPEXT . '\\?p=([a-z0-9_]+)(&.*?)*$#', $page, $match) || preg_match('#^(forum|topic|sujet)-([0-9]+)-([0-9]+)\\.html$#i', $page, $match))\n\t\t\t\t{\n\t\t\t\t\t$url = $match[0];\n\t\t\t\t\tswitch ($match[1])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'forum' :\n\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_forum');\n\t\t\t\t\t\t\tif (count($match) == 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$id = $match[2];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpreg_match('#f_id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($id) $f_idx[] = $id;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'topic' :\n\t\t\t\t\t\tcase 'sujet' :\n\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_topic');\n\t\t\t\t\t\t\tif (count($match) == 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\t$id = $match[2];\n\t\t\t\t\t\t\t\t$t_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (preg_match('#t_id=([0-9]+)#', $page, $match))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t\tif ($id) $t_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'posts';\n\t\t\t\t\t\t\t\tpreg_match('#p_id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t\tif ($id) $p_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'post' :\n\t\t\t\t\t\t\tpreg_match('#mode=([a-z_]+)#', $page, $mode);\n\t\t\t\t\t\t\tpreg_match('#id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\tswitch ($mode[1])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase 'topic' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_new');\n\t\t\t\t\t\t\t\t\tif ($id) $f_idx[] = $id;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'reply' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_reply');\n\t\t\t\t\t\t\t\t\tif ($id) $t_idx[] = $id;\n\t\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'edit' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_edit');\n\t\t\t\t\t\t\t\t\tif ($id) $p_idx[] = $id;\n\t\t\t\t\t\t\t\t\t$method = 'posts';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'mp' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_mp_write');\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'calendar_add' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_calendar_event');\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'calendar_edit' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_calendar_event_edit');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tif (Fsb::$session->lang('adm_location_' . $match[1]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_' . $match[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$location)\n\t\t\t\t{\n\t\t\t\t\t$location = Fsb::$session->lang('adm_location_index');\n\t\t\t\t\t$url = 'index.' . PHPEXT;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$logged[$type][] = array(\n\t\t\t\t'nickname' =>\t\tHtml::nickname($row['u_nickname'], $row['s_id'], $row['u_color']),\n\t\t\t\t'agent' =>\t\t\t$row['s_user_agent'],\n\t\t\t\t'ip' =>\t\t\t\t$row['s_ip'],\n\t\t\t\t'location' =>\t\t$location,\n\t\t\t\t'url' =>\t\t\tsid(ROOT . $url),\n\t\t\t\t'method' =>\t\t\t$method,\n\t\t\t\t'id' =>\t\t\t\t$id,\n\t\t\t);\n\n\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t// On recupere une liste des forums pour connaitre la position du membre sur le forum\n\t\t$forums = array();\n\t\tif ($f_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'forums f\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE f.f_id IN (' . implode(', ', $f_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$forums = Fsb::$db->rows($result, 'assoc', 'f_id');\n\t\t}\n\n\t\t// On recupere une liste des sujets pour connaitre la position du membre sur le forum\n\t\t$topics = array();\n\t\tif ($t_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name, t.t_id, t.t_title\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums f\n\t\t\t\t\t\tON f.f_id = t.f_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE t.t_id IN (' . implode(', ', $t_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$topics = Fsb::$db->rows($result, 'assoc', 't_id');\n\t\t}\n\n\t\t// On recupere une liste des messages pour connaitre la position du membre sur le forum\n\t\t$posts = array();\n\t\tif ($p_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name, p.p_id, t.t_id, t.t_title\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'posts p\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\t\tON p.t_id = t.t_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums f\n\t\t\t\t\t\tON f.f_id = p.f_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE p.p_id IN (' . implode(', ', $p_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$posts = Fsb::$db->rows($result, 'assoc', 'p_id');\n\t\t}\n\n\t\t// On affiche les membres en ligne\n\t\tforeach ($logged AS $type => $list)\n\t\t{\n\t\t\tif ($list)\n\t\t\t{\n\t\t\t\tFsb::$tpl->set_blocks('logged', array(\n\t\t\t\t\t'TITLE' =>\t\tFsb::$session->lang('adm_list_logged_' . $type),\n\t\t\t\t));\n\n\t\t\t\tforeach ($list AS $u)\n\t\t\t\t{\n\t\t\t\t\t// On definit si on cherche la liste des forums dans $forums ou $topics\n\t\t\t\t\t$m = $u['method'];\n\t\t\t\t\t$data_exists = ($u['id'] && isset(${$m}[$u['id']])) ? true : false;\n\t\t\t\t\t$topic_exists = ($data_exists && isset(${$m}[$u['id']]['t_title'])) ? true : false;\n\n\t\t\t\t\tFsb::$tpl->set_blocks('logged.u', array(\n\t\t\t\t\t\t'NICKNAME' =>\t\t$u['nickname'],\n\t\t\t\t\t\t'AGENT' =>\t\t\t$u['agent'],\n\t\t\t\t\t\t'IP' =>\t\t\t\t$u['ip'],\n\t\t\t\t\t\t'LOCATION' =>\t\t$u['location'],\n\t\t\t\t\t\t'URL' =>\t\t\t$u['url'],\n\t\t\t\t\t\t'CAT_NAME' =>\t\t($data_exists) ? ${$m}[$u['id']]['cat_name'] : null,\n\t\t\t\t\t\t'FORUM_NAME' =>\t\t($data_exists) ? ${$m}[$u['id']]['f_name'] : null,\n\t\t\t\t\t\t'TOPIC_NAME' =>\t\t($topic_exists) ? Parser::title(${$m}[$u['id']]['t_title']) : '',\n\t\t\t\t\t\t'U_CAT' =>\t\t\t($data_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=index&amp;cat=' . ${$m}[$u['id']]['cat_id']) : null,\n\t\t\t\t\t\t'U_FORUM' =>\t\t($data_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=forum&amp;f_id=' . ${$m}[$u['id']]['f_id']) : null,\n\t\t\t\t\t\t'U_TOPIC' =>\t\t($topic_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=topic&amp;t_id=' . ${$m}[$u['id']]['t_id']) : null,\n\t\t\t\t\t\t'U_IP' =>\t\t\tsid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=ip&amp;ip=' . $u['ip']),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// On verifie si le SDK n'a pas ete desactive\n\t\tif(intval(Fsb::$cfg->get('disable_sdk')))\n\t\t{\n\t\t\tFsb::$tpl->set_switch('sdk_disabled');\n\t\t}\n\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'FSB_SUPPORT' =>\t\t'http://www.fire-soft-board.com',\n\t\t\t'FSB_LANG_SUPPORT' =>\tFsb::$session->lang('fsb_lang_support'),\n\t\t\t'NEW_VERSION' =>\t\t(!is_last_version(Fsb::$cfg->get('fsb_version'), Fsb::$cfg->get('fsb_last_version'))) ? sprintf(Fsb::$session->lang('adm_fsb_new_version'), Fsb::$cfg->get('fsb_version'), Fsb::$cfg->get('fsb_last_version')) : null,\n\t\t\t'SHOW_ALL' =>\t\t\t$show_all,\n\t\t\t'ROOT_SUPPORT' => \t\tsprintf(Fsb::$session->lang('adm_root_support_active_explain'), 'index.' . PHPEXT . '?p=mods_manager'),\n\n\t\t\t'U_SHOW_ALL' =>\t\t\tsid('index.' . PHPEXT . '?show_all=true'),\n\t\t\t'U_CHECK_VERSION' =>\tsid('index.' . PHPEXT . '?mode=version'),\n\t\t));\n\t}", "function admin_index()\n\t{\n\t $this->set('pagetitle',\"Manage Pages\");\n\t $this->paginate=array('order'=>'Page.name ASC');\n\t $lists = $this->paginate('Page');\n\t $this->set('list', $lists);\n\t \n\t if((isset($this->data[\"Page\"][\"setStatus\"])))\n\t {\n\t\t$status = ife($_POST['active'],1,0);\n\t\t$record = $this->data[\"Page\"][\"Record\"];\n\t\t$CheckedList=$_POST['box1'];\n\t\t$controller= $this->params['controller'];\n\t\t$action='index'; \n\t\t$prefix='admin';\n\t\t$model='Page';\n\t\t$relation=null;\n\t\t\n\t\tswitch($status)\n\t\t{ \n\t\t case '1': \n\t\t\t$this->setStatus('1',$CheckedList,$model,$relation,$controller,$action,$prefix,$record); \n\t\t break;\n\t\t case '0':\n\t\t\t$this->setStatus('0',$CheckedList,$model,$relation,$controller,$action,$prefix,$record); \n\t\t break; \n\t\t}\n\t }\n\t}", "public function render_admin_page () {\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) wp_die(\"Nope.\");\n\n\t\tif (!class_exists('Thx_Sanitize')) require_once (dirname(__FILE__) . '/class_thx_sanitize.php');\n\t\tif (!class_exists('Thx_Template')) require_once (dirname(__FILE__) . '/class_thx_template.php');\n\n\t\tload_template(Thx_Template::plugin()->path('create_edit'));\n\t}", "public function index()\n {\n return Admin::content(function (Content $content) {\n\n $content->header(__('cms.entries.index_header'));\n $content->description(__('cms.entries.index_description'));\n\n $content->body($this->grid());\n });\n }", "public function action_index()\n\t{\n\t\tif ( ! Auth::instance()->logged_in('admin'))\n\t\t\tthrow new HTTP_Exception_403();\n\t\t\n\t\t// show admin page\n\t\t$companies = ORM::factory('company')->find_all();\n\t\t$this->template->content = View::factory('admin/admin')->bind('companies', $companies);\n\t\t\n\t}", "public function manage_about_us()\n\t{\n\t\t$data['page']='Manage About-us';\n $data['about_us']=$this->ref_pages->get_section_by_pageId(1);\n\t\t$view = 'admin/admin_manage_about_us';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function admin()\n {\n $this->view->books = $this->help->getBookList();\n $this->view->title = $this->lang->help->common;\n $this->display();\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "function spreadshop_admin_menu_entry($content) \n\t{\n add_menu_page(\"Spreadshop Admin\", \"Spreadshop\", 1, \"Spreadshop_Admin\", \"spreadshop_admin\"); \n\t}", "public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "function mmf_admin() {\n\t\tinclude('mmf_admin_page.php');\n\t}", "public function index()\n {\n $number_of_items = $this->calculate->getTotalOfItemsAdmin();\n if (null != $this->request->ifParameter(\"id\")) {\n $items_current_page = $this->request->getParameter(\"id\");\n } else {\n $items_current_page = 1;\n }\n $items = $this->item->getItemsForAdmin($items_current_page);\n $page_previous_items = $items_current_page - 1;\n $page_next_items = $items_current_page + 1;\n $number_of_items_pages = $this->calculate->getNumberOfPagesOfExtAdmin();\n $this->generateadminView(array(\n 'items' => $items,\n 'number_of_items' => $number_of_items,\n 'items_current_page' => $items_current_page,\n 'page_previous_items' => $page_previous_items,\n 'page_next_items' => $page_next_items,\n 'number_of_items_pages' => $number_of_items_pages\n ));\n }", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New', 'mailoptin'));\n $this->register_core_settings($instance);\n $instance->build(true, true);\n }", "protected function AdminPage() {\n\t$oPathIn = fcApp::Me()->GetKioskObject()->GetInputObject();\n\t$oFormIn = fcHTTP::Request();\n\n\t$doSave = $oFormIn->GetBool('btnSave');\n\n\t// save edits before showing events\n\tif ($doSave) {\n\t $frm = $this->PageForm();\n\t $frm->Save();\n\t $this->SelfRedirect();\n\t}\n\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t // ($sGroupKey,$sKeyValue=TRUE,$sDispOff=NULL,$sDispOn=NULL,$sPopup=NULL)\n\t $oMenu->SetNode($ol = new fcMenuOptionLink('do','edit',NULL,NULL,'edit this record'));\n\n\t $doEdit = $ol->GetIsSelected();\n\n\t$frmEdit = $this->PageForm();\n\tif ($this->IsNew()) {\n\t $frmEdit->ClearValues();\n\t} else {\n\t $frmEdit->LoadRecord();\n\t}\n\t$oTplt = $this->PageTemplate();\n\t$arCtrls = $frmEdit->RenderControls($doEdit);\n\t\n\t$out = NULL;\n\t$arCtrls['!ID'] = $this->SelfLink();\n\tif ($doEdit) {\n\t $out .= \"\\n<form method=post>\";\n\t $arCtrls['!extra'] = '<tr>\t<td colspan=2><b>Edit notes</b>: <input type=text name=\"'\n\t .KS_FERRETERIA_FIELD_EDIT_NOTES\n\t .'\" size=60></td></tr>'\n\t ;\n\t $arCtrls['isType'] .= ' is a type';\n\t} else {\n\t $arCtrls['!extra'] = NULL;\n\t $arCtrls['isType'] = $this->IsType()?'type':'folder';\n\t}\n\n\t$oTplt->SetVariableValues($arCtrls);\n\t$out .= $oTplt->RenderRecursive();\n\t\n\tif ($doEdit) {\t \n\t $out .= <<<__END__\n<input type=submit name=\"btnSave\" value=\"Save\">\n<input type=reset value=\"Reset\">\n</form>\n__END__;\n\t}\n\treturn $out;\n }", "public static function render_manage()\n\t{\n\t// eventually - get it basically looking right first\n\t\n\t\tif (!current_user_can('edit_pages'))\n\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t\n\t\t//$list = new JHDataTablesList();\n\t\t//$list->prepare_items();\n\t\t\n\t\t?><div class=\"wrap\">\n\t\t\n<h2><?php print __( 'Manage Tables', 'jh-resource-collection' ); ?></h2>\n\n<form name=\"JHResourceCollectionAdmin\" method=\"post\" action=\"\">\n<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\n<input type=\"hidden\" name=\"page\" value=\"<?php echo $_REQUEST['page'] ?>\">\n\n<?php //$list->display() ?>\n\n<!--<p class=\"submit\">\n<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes') ?>\" />\n</p>-->\n\n</form>\n</div><?php\n\t}", "public function manage_about_us()\n\t{\n\t\t$data['page']='Manage About-us';\n $data['about_us']=$this->ref_pages->get_section_by_pageId(1);\n\t\t$view = 'Admin/admin_manage_about_us';\n\t\techo Modules::run('Template/admin_template', $view, $data);\t\n\t}", "public function index($page_name) {\n $content_management=content_management::fetch_content($page_name);\n //$content_management=content_management::findOrFail($page_name);\n if(!$content_management){\n return abort(404);\n //resources/views/errors/404.blade.php\n }\n // $content_management=json_decode($content_management);\n\n // if(isset($_POST[\"update\"])){\n // self::content_update($page_name);\n // }\n \n //return view('admin.content_management.index', ['content_management' => Content_management::findOrFail($page_name)]);\n\n return view('admin.content_management.index', ['content_management' => $content_management]);\n }", "function admin_add_cms_page(){\r\r\n\t\t\r\r\n\t\t$this->layout='backend/backend';\r\r\n\t\t$this->set(\"title_for_layout\",ADD_CMS_PAGE);\r\r\n\t\tif(!empty($this->data)){\r\r\n\t\t\t\r\r\n\t\t\tApp::import(\"Model\",\"CmsPage\");\r\r\n\t\t\t$this->CmsPage = new CmsPage();\r\r\n\t\t\t$data = $this->data;\r\r\n\t\t\t$errors = $this->CmsPage->valid_edit_cms($data);\r\r\n\t\t\tif(count($errors) == 0){\r\r\n\t\t\t\tif($this->CmsPage->save($data)){\r\r\n\t\t\t\t\t$this->Session->setFlash(RECORD_SAVE, 'message/green');\r\r\n\t\t\t\t\t$this->redirect(array(\"controller\"=>\"settings\",\"action\"=>\"admin_cms_list\",\"admin\"=>true)); \r\r\n\t\t\t\t}else{\r\r\n\t\t\t\t\t$this->Session->setFlash(RECORD_ERROR, 'message/red');\r\r\n\t\t\t\t\t$this->redirect(array(\"controller\"=>\"coupons\",\"action\"=>\"edit\",$this->data['CmsPage']['id'],\"admin\"=>true));\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\t$this->set(\"errors\",$errors);\r\r\n\t\t}\r\r\n\t}", "public function admincp_index(){\n\t\tpermission_force_check('r');\n\t\t$default_func = 'created';\n\t\t$default_sort = 'DESC';\n\t\t$data = array(\n\t\t\t'module'=>$this->module,\n\t\t\t'module_name'=>$this->session->userdata('Name_Module'),\n\t\t\t'default_func'=>$default_func,\n\t\t\t'default_sort'=>$default_sort\n\t\t);\n\t\t$this->template->write_view('content','BACKEND/index',$data);\n\t\t$this->template->render();\n\t}", "public function administration() {\n\t\t$success = ( isset( $_SESSION['success'] ) ? $_SESSION['success'] : null );\n\t\t$error = ( isset( $_SESSION['error'] ) ? $_SESSION['error'] : null );\n\t\t$login = ( isset( $_SESSION['login'] ) ? $_SESSION['login'] : null );\n\t\t$myView = new View( 'administration' );\n\t\t$myView->renderView( array( 'success' => $success, 'error' => $error, 'login' => $login ) );\n\t}", "public function indexAdminAction()\n {\n\n $variable = \"page d accueil de l'admin\";\n\n\n return $this->render(\"@App/pages/accueilAdmin.html.twig\",\n [\n 'variable' => $variable\n ]\n\n );\n }", "function admin_menu() {\n\t\t// The designation of add_MANAGEMENT_page causes the menu item to be listed under the Tools menu!\n\t\tadd_management_page('Revitalize Orders Output', 'Revitalize Orders', 'edit_posts', basename(__FILE__), array(&$this, 'page_handler'));\n\t}", "function thumbwhere_contentcollection_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollection');\n return $controller->addPage();\n}", "public function admincp_index() {\n $toolBar = array('addNew', 'delete');\n getToolbar($this->module, $toolBar);\n\n $default_func = 'updated';\n $default_sort = 'DESC';\n $data = array(\n 'module' => $this->module,\n 'default_func' => $default_func,\n 'default_sort' => $default_sort\n );\n $this->template->write_view('content', 'BACKEND/index', $data);\n $this->template->render();\n }", "public function index()\n {\n return view('admin.content.edit', [\n \"socialMedias\" => SocialMedia::all(),\n \"meta\" => Meta::first(),\n \"menus\" => Menu::all(),\n 'categories' => NewsCategory::all(),\n ]);\n }", "public function admin_action() {\n\t}", "public function admin_action() {\n\t}", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-settings-page.php';\n }", "function wlms_manage_requested_books_page_content()\n{\n wlms_manage_requested_books_page_content_html();\n}", "function xanthia_admin_view()\n{\n\t/** Security check - important to do this as early as possible to avoid\n\t * potential security holes or just too much wasted processing. For the\n\t * main function we want to check that the user has at least edit privilege\n\t * for some item within this component, or else they won't be able to do\n\t * anything and so we refuse access altogether. The lowest level of access\n\t * for administration depends on the particular module, but it is generally\n\t * either 'edit' or 'delete'\n\t */\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n\t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n \t}\n\n\t// Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n \t}\n\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n $pnRender->assign('showhelp', pnModGetVar('Xanthia','help'));\n\n\t// Themes\n\t// Get a list of all themes in the themes dir\n\t$allthemes = pnModAPIFunc('Xanthia','user','getAllThemes');\n\t// Get a list of all themes in database\n\t$allskins = pnModAPIFunc('Xanthia','user','getAllSkins');\n\n\t$skins = array();\n if ($allskins) {\n\t foreach($allskins as $allskin) {\n\t $skins[] = $allskin['name'];\n\t }\n\t}\n\n // Generate an Authorization ID\n $authid = pnSecGenAuthKey();\n\t$pnRender->assign('authid', $authid);\n\n if ($allthemes){\n //Start Foreach\n foreach($allthemes as $themes) {\n // Add applicable actions\n $actions = array();\n\n \t\tswitch ($themes) {\n //If theme is active in Xanthia then show the edit theme link\n\t\t case in_array($themes, $skins):\n $state = 1;\n break;\n //If theme is not active in Xanthia then show the add theme link \n\t\t\t default:\n $state = 0;\n break;\n\t\t\t}\n \n\t $theme[] = array('state' => $state,\n\t\t\t\t\t\t 'themename' => $themes);\n //End Foreach\n }\n }\n\t$pnRender->assign('theme', $theme);\n // Return the output that has been generated to the template\n return $pnRender->fetch('xanthiaadminviewmain.htm');\n}", "function admin_cms_list(){\r\r\n\t\t\r\r\n\t\t$this->layout='backend/backend';\r\r\n\t\t$this->set(\"title_for_layout\",CMS_PAGE_LISTING);\r\r\n\t\tApp::import(\"Model\",\"CmsPage\");\r\r\n\t\t$this->CmsPage = new CmsPage();\r\r\n\t\t$conditions = array(\"CmsPage.is_deleted\"=>\"0\");\r\r\n\t\t\r\r\n\t\t$this->paginate = array('recursive'=>-1,'conditions'=>$conditions,'limit' =>CMS_PAGE_LIMIT,'order'=>array(\"CmsPage.page_order\"=>\"asc\"));\r\r\n\t\t$cms_page_data = $this->paginate('CmsPage'); \r\r\n\t\t$this->set('cms_page_data',$cms_page_data);\r\r\n\t}", "public function admincp_index(){\n\t\tmodules::run('admincp/chk_perm',$this->session->userdata('ID_Module'),'r',0);\n\t\t$default_func = 'created';\n\t\t$default_sort = 'DESC';\n\t\t$data = array(\n\t\t\t'module'=>$this->module,\n\t\t\t'module_name'=>$this->session->userdata('Name_Module'),\n\t\t\t'default_func'=>$default_func,\n\t\t\t'default_sort'=>$default_sort\n\t\t);\n\t\t$this->template->write_view('content','BACKEND/index',$data);\n\t\t$this->template->render();\n\t}", "public function actionIndex()\n\t{\n\t\t// do stuff that's not the main content?\n\t}", "public function administrator(){\n\t\t$this->verify();\n\t\t$data['title']=\"Administrator\";\n\t\t$data['admin_list']=$this->admin_model->fetch_admin();\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('administrator/administrator', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}", "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 }", "function admin_page_load() {\n\t\t$this->jetpack->admin_page_load();\n\t}", "public function pageAdmin()\r\n\t{\r\n\t\t// Donnees\r\n\t\t$eventId = Bn::getValue('event_id');\r\n\t\t$oEvent = new Oevent($eventId);\r\n\t\t$oExtras = new Oeventextra($eventId);\r\n\r\n\t\t// Controle de l'autorisation\r\n\t\tif ( $oEvent->getVal('ownerid') != Bn::getValue('user_id') && !Oaccount::isLoginAdmin() ) return false;\r\n\r\n\t\t// Preparer les champs de saisie\r\n\t\t$body = new Body();\r\n\r\n\t\t// Titres\r\n\t\t$t = $body->addP('', '', 'bn-title-2');\r\n\t\t$t->addBalise('span', '', LOC_ITEM_GENERAL);\r\n\r\n\t\t// Infos generales\r\n\t\t$form = $body->addForm('frmAdmin', BPREF_UPDATE_ADMIN, 'targetDlg');\r\n\t\t$form->getForm()->addMetadata('success', \"updated\");\r\n\t\t$form->getForm()->addMetadata('dataType', \"'json'\");\r\n\r\n\t\t$div = $form->addDiv('', 'bn-div-left');\r\n\t\t$edt = $div->addEdit('nameevent', LOC_LABEL_EVENT_NAME, $oEvent->getVal('name'), 255);\r\n\t\t$edt->tooltip(LOC_TOOLTIP_EVENT_NAME);\r\n\r\n\t\t$edt = $div->addEdit('place', LOC_LABEL_EVENT_PLACE, $oEvent->getVal('place'), 25);\r\n\t\t$edt->tooltip(LOC_TOOLTIP_EVENT_PLACE);\r\n\r\n\t\t$edt = $div->addEdit('dateevent', LOC_LABEL_EVENT_DATE, $oEvent->getVal('date'), 25);\r\n\t\t$edt->tooltip(LOC_TOOLTIP_EVENT_DATE);\r\n\r\n\t\t$edt = $div->addEdit('numauto', LOC_LABEL_EVENT_NUMAUTO, $oEvent->getVal('numauto'), 50);\r\n\r\n\t\t$edt = $div->addEdit('organizer', LOC_LABEL_EVENT_ORGANIZER, $oEvent->getVal('organizer'), 75);\r\n\t\t$edt->noMandatory();\r\n\t\t//$edt->tooltip(LOC_TOOLTIP_EVENT_ORGANIZER);\r\n\r\n\t\t/* Region */\r\n\t\t$cbo = $div->addSelect('regionid', LOC_LABEL_EVENT_REGION);\r\n\t\t//$cbo->tooltip(LOC_TOOLTIP_EVENT_REGION);\r\n\t\t$regs = Ogeo::getRegions(-1, LOC_LABEL_SELECT_REGION);\r\n\t\t$cbo->addOptions($regs, $oExtras->getVal('regionid'));\r\n\r\n\t\t/* Departement */\r\n\t\t$cbo = $div->addSelect('deptid', LOC_LABEL_EVENT_DPT);\r\n\t\t//$cbo->tooltip(LOC_TOOLTIP_EVENT_DPT);\r\n\t\t$codeps = Ogeo::getDepts(-1, LOC_LABEL_SELECT_DPT);\r\n\t\t$cbo->addOptions($codeps, $oExtras->getVal('deptid'));\r\n\r\n\t\t$d = $div->addDiv('', 'bn-div-line');\r\n\t\t$edt = $d->addEditDate('firstday', LOC_LABEL_EVENT_FIRSTDAY, Bn::date($oEvent->getVal('firstday'), 'd-m-Y'));\r\n\t\t$edt->addOption('onSelect', 'selectFirstDay');\r\n\t\t$edt->addOption('maxDate', 'new Date(' . Bn::date($oEvent->getVal('lastday'), 'Y,m-1,d') .')');\r\n\t\t$edt = $d->addEditDate('lastday', LOC_LABEL_EVENT_LASTDAY, Bn::date($oEvent->getVal('lastday'), 'd-m-Y'));\r\n\t\t$edt->addOption('onSelect', 'selectLastDay');\r\n\t\t$edt->addOption('minDate', 'new Date(' . Bn::date($oEvent->getVal('firstday'), 'Y,m-1,d') .')');\r\n\r\n\t\t$d->addBreak();\r\n\r\n\t\t$d = $form->addDiv('', 'bn-div-btn');\r\n\t\t$d->addButtonValid('', LOC_BTN_UPDATE);\r\n\r\n\t\t// Envoi au navigateur\r\n\t\t$body->display();\r\n\t\treturn false;\r\n\t}", "public function Index() {\n $content = new CMContent();\n $this->views->SetTitle('Page')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'content' => null,\n ));\n }", "public function admincp_index() {\n $toolBar = array('addNew', 'show', 'hide', 'delete');\n getToolbar($this->module, $toolBar);\n \n $default_func = 'created';\n $default_sort = 'DESC';\n $data = array(\n 'module' => $this->module,\n 'default_func' => $default_func,\n 'default_sort' => $default_sort\n );\n $this->template->write_view('content', 'BACKEND/index', $data);\n $this->template->render();\n }", "public function index() {\n\n // Add page scripts\n XCMS_Page::getInstance()->addScript(array(\n \"assets/scripts/backend/mng_articles.js\",\n \"assets/third-party/tinymce/tinymce.js\",\n \"assets/scripts/tinymce_config.js\"\n ));\n\n // Add page stylesheets\n XCMS_Page::getInstance()->addStylesheet(array(\n \"assets/css/backend/mng_articles.css\"\n ));\n\n // Show template\n $this->load->view(\"articles.tpl\", array(\n \"categories\" => (new CategoriesModel)->load()->toArray()\n ));\n\n }" ]
[ "0.741837", "0.74097395", "0.7119664", "0.7119664", "0.70954823", "0.69737273", "0.6914717", "0.68635476", "0.6860336", "0.68533176", "0.6827469", "0.6825064", "0.6816729", "0.6810954", "0.6801038", "0.6777734", "0.6772251", "0.67599267", "0.6692817", "0.66927224", "0.6686614", "0.6653096", "0.6646937", "0.66347516", "0.66288257", "0.6595239", "0.65873474", "0.6572473", "0.65450156", "0.65287524", "0.6525158", "0.65047675", "0.6488989", "0.6484042", "0.64714235", "0.6468444", "0.6466139", "0.645525", "0.6455181", "0.64550465", "0.6446168", "0.6430584", "0.6425586", "0.64227694", "0.641865", "0.6414137", "0.64095986", "0.6392702", "0.6385454", "0.63842875", "0.63809216", "0.6380898", "0.6342573", "0.63400716", "0.6312386", "0.63099205", "0.63019556", "0.629736", "0.62849355", "0.6284837", "0.6280938", "0.6278078", "0.62771654", "0.6266735", "0.625791", "0.62577105", "0.62531435", "0.62531435", "0.62531435", "0.62515634", "0.62440443", "0.6240748", "0.62375313", "0.62357026", "0.6235132", "0.62174267", "0.62164325", "0.6200898", "0.62002903", "0.6198395", "0.6189102", "0.618767", "0.61866885", "0.61747295", "0.6174717", "0.6171607", "0.6171395", "0.6171395", "0.61667264", "0.6164711", "0.6163867", "0.6162078", "0.6154699", "0.61499465", "0.6149695", "0.6148111", "0.6143323", "0.6143311", "0.61372876", "0.6134702", "0.6125759" ]
0.0
-1
Callbacks for operation select.
function mongo_node_mass_update($entity_type, $entities, $args) { foreach ($entities as $entity_id) { $entity = entity_get_controller($entity_type)->load(array($entity_id)); $entity = reset($entity); // Skip if not updates. if (!isset($args['updates'])) { continue; } foreach ($args['updates'] as $p_name => $p_val) { $entity->$p_name = $p_val; } entity_save($entity_type, $entity); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select(callable $callback);", "function callback_select(array $args)\n {\n }", "abstract function selectHook();", "public function select();", "public function select();", "public function select();", "protected static function select()\n {\n }", "public function Do_select_Example1(){\n\n\t}", "function qselect(){\r\n\t\t\r\n\t\r\n\t}", "public function select()\n {\n\n }", "protected function socketSelect() {}", "public function Do_Allselect_Example1(){\n\n\t}", "public function select(callable $function);", "protected function processSelect(\\Zend_Db_Select $select)\n { }", "function mSELECT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$SELECT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:116:3: ( 'select' ) \n // Tokenizer11.g:117:3: 'select' \n {\n $this->matchString(\"select\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function process(Select $select);", "private function _select(){\n $this->debugBacktrace();\n $parameter = $this->selectParam; //transfer to local variable.\n $this->selectParam = \"\"; //reset updateParam.\n\n \n \n $sql = \"\";\n if($this->hasRawSql){\n $sql = $parameter;\n $this->hasRawSql = false;\n }\n else{\n $tableName = $this->tableName;\n $this->tableName = \"\"; //reset.\n\n $columns = \"\";\n if(!isset($parameter) || empty($parameter)){\n $columns = \"*\";\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n else{\n //first check whether it has 'select' keyword\n $parameter = trim($parameter);\n $keyWord = substr($parameter,0,6);\n if(strtoupper($keyWord)==\"SELECT\") {\n $sql = $parameter;\n }\n else{\n $columns = $parameter;\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n }\n }\n\n \n $queryObject = $this->_perform_mysql_query($sql);\n \n if(empty($this->selectModifier)){\n //No select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $quantity = 0;\n $rows = array();\n switch ($this->fetchType){\n case \"fetch_object\":\n while ($row = mysqli_fetch_object($queryObject)) {\n if(isset($tableName)){\n $meta = new stdClass();\n $meta->type = $tableName;\n $row->__meta = $meta;\n }\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_assoc\":\n while ($row = mysqli_fetch_assoc($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_array\":\n while ($row = mysqli_fetch_array($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_row\":\n while ($row = mysqli_fetch_row($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_field\":\n while ($row = mysqli_fetch_field($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n }\n\n if($quantity>0){\n mysqli_free_result($queryObject);\n }\n\n return $rows;\n //<----No select modifier (first, firstOrDefault, single, singleOrDefault) found \n }\n else{ \n //select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $selectModifier = $this->selectModifier;\n $this->selectModifier = \"\";\n $row;\n switch($selectModifier){\n case \"first\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n break;\n \n case \"firstOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n break;\n\n case \"single\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n if($numRows > 1){\n throw new ZeroException(\"Multiple records found.\");\n }\n break;\n\n case \"singleOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n if($numRows > 1){\n return NULL;\n }\n break;\n }\n\n return $this->_prepareSingleRecord($queryObject);\n //<---- select modifier (first, firstOrDefault, single, singleOrDefault) found *212*062#\n }\n }", "public function select()\n {\n return curl_multi_select( $this->mh );\n }", "public function fewSelection()\n {\n $selection = func_num_args() > 0 ? func_get_args() : $this->fewSelection;\n\n return call_user_func_array([$this, 'select'], $selection);\n }", "function stream_select(&$readarray, &$writearray, &$exceptarray, $tv_sec, $tv_usec = null)\n {\n return stream_select($readarray, $writearray, $exceptarray, $tv_sec, $tv_usec);\n }", "abstract public function prepareSelect();", "protected function runSelect()\n {\n return $this->connection->select($this->toCypher(), $this->getBindings());\n }", "protected function runSelect()\n {\n return $this->connection->select(\n $this->toSql(),\n $this->getBindings(),\n $this->option->setUseWrite($this->useWritePdo)\n );\n }", "function run_select($sql, $params, $task, $calling_function) {\n $stmt = $this->db_connection->prepare($sql);\n $output = null;\n\n try {\n if ($params != null) {\n $stmt->execute($params);\n }\n else {\n $stmt->execute();\n }\n\n if ($task == \"fetch_column\") {\n $output = $stmt->fetchColumn();\n }\n else if ($task == \"fetch_all\") {\n $output = $stmt->fetchAll();\n }\n }\n catch(PDOException $e) {\n echo(\"PDO error from $calling_function:<br/>\" . $e->getMessage());\n }\n\n $stmt = null;\n return $output;\n }", "public function getLastSelect();", "function select_option()\r\n{}", "public function getSelect();", "public function getSelect();", "protected function parseOperation()\n {\n $operation = 'select';\n\n $queryParts = explode('/', $this->query);\n array_shift($queryParts);\n\n if (!count($queryParts)) {\n $this->operation = $operation;\n\n return;\n }\n\n if (in_array($queryParts[0], $this->operations, true)) {\n $operation = array_shift($queryParts);\n if (count($queryParts) && is_numeric($queryParts[0])) {\n $this->params['limit'] = array_shift($queryParts);\n }\n $this->identifier = implode(',', $queryParts);\n } else {\n $this->identifier = implode(',', $queryParts);\n }\n\n if (!empty($this->identifier)) {\n $operation = 'namedselect';\n }\n\n $this->operation = $operation;\n }", "public abstract function onPlayerSelect();", "abstract protected function _manageFetchOptions($select, $options);", "public function callback();", "protected function prepareSelectStatement() {}", "private function parseSelection() : \\GraphQL\\Language\\AST\\SelectionNode\n {\n }", "protected function ejecutarSelect($sql){ \n $conf = $_SESSION['config']['base'];\n $pass = \\Core\\Encriptador::desencriptar($conf['dbclaveAll']);\n $obd = new \\Core\\DataBase($conf['dbhost'], $conf['dbport'], $conf['dbuserAll'], $pass, $conf['dbdatabase']);\n $datos = $obd->select($sql);\n if(!empty($datos)){\n return $datos;\n }\n return 0;\n }", "public function getSelect()\n {\n throw new \\Exception('SELECT not ready');\n }", "public function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$_args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$_args);\n\t}", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "function runSelect($repo)\n{\n // Var Dumping each entity type to test select\n var_dump($repo->select(new ChocolateBar()));\n var_dump($repo->select(new Cookie()));\n var_dump($repo->select(new Noodle()));\n}", "function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$args);\n\t}", "function select($selection,$db) {\n\n\t\t$conn = new mysqli('localhost','id6847947_tadas','322559',$db);\n\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\n\t$result = $conn->query($selection);\n\treturn $result;\n}", "public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}", "public function setup_selected() {\n\t}", "function ffw_port_select_callback($args) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $html = '<select id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"/>';\n\n foreach ( $args['options'] as $option => $name ) :\n $selected = selected( $option, $value, false );\n $html .= '<option value=\"' . $option . '\" ' . $selected . '>' . $name . '</option>';\n endforeach;\n\n $html .= '</select>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "protected function postSelector()\n {\n }", "function select ($sql ,$conn) {\n\t\t$result = mysql_query($sql , $conn) ;\n\t\treturn $result ;\n\n\t}", "public function getOperationMade() {}", "public function sql_select_db() {}", "public function sql_select_db() {}", "public function select() \n {\n $this->select->execute();\n\n if ($this->select->errorCode() != 0) \n {\n print_r($this->select->errorInfo());\n }\n\n return $this->select->fetchAll();\n }", "public function walkSelectStatement(AST\\SelectStatement $selectStatement): void;", "function select($query)\n\t{\n\t\t\n\t\tglobal $connection;\n\t\t$resuts = $connection->query($query);\n\t\treturn $resuts;\n\t}", "protected abstract function getSelectStatement();", "protected abstract function getSelectStatement();", "function listadoSelect();", "final function select($selector = '*', DOMElement $context = null, $flag = XDT::SELECT_DESTROY) {\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECTION FLAG ======================= **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\tswitch ($flag) {\r\n\t\t\tcase XDT::SELECT_DESTROY: $this->xml_query = null; break;\r\n\t\t\tcase XDT::SELECT_FILTER: ; break;\r\n\t\t}\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECTION CONTEXT ==================== **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t if (isset($context)) {\r\n\t \t$all = $context->getElementsByTagName('*');\r\n\t \t$l = new XDTNodeList();\r\n\t \tforeach ($all as $node) {\r\n\t \t\t$l->add($node);\r\n\t \t}\r\n\t \t$this->xml_query = $l;\r\n\t\t //$this->xml_query = new XDTNodeList($context);\r\n\t\t //$this->xml_query = $this->xml_query->find(); \r\n\t\t}\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECT MULTIPLE ====================== **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\tif (preg_match('/[,]/', $selector)) return $this->mSelect($selector);\r\n\t\t\r\n\t\t$selector = $this->parse($selector); // Convert selector to code logic\r\n\t\t\r\n\t\t$chunks = preg_split('/[\\s>+]/', $selector, -1, PREG_SPLIT_NO_EMPTY);\r\n\t\t$glues = preg_split('/[^\\s>+]/', $selector, -1, PREG_SPLIT_NO_EMPTY);\r\n\t\t\r\n\t\tif (empty($glues)) return $this->query($selector);\r\n\t\t\r\n\t\t$this->xml_query = $this->query($chunks[0]);\r\n\t\t\r\n\t\tfor ($index = 1; $index < count($chunks); $index++) {\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Cast query result to NodeList.\r\n\t\t\t */\r\n\t\t\tif (is_object($this->xml_query) AND get_class($this->xml_query) === 'DOMElement') {\r\n\t\t\t\t$this->xml_query = new XDTNodeList($this->xml_query);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tswitch (trim($glues[$index-1])) {\r\n\t\t\t\tcase '': // Select descendent elements\r\n\t\t\t\t\t\r\n\t\t\t\t\t$list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) \r\n\t\t\t\t\t\tforeach ($node->getElementsByTagName('*') as $n) $list->add($n);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->xml_query = $list;\r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t\tcase '>': // Select children elements\r\n\t\t\t\t \r\n\t\t\t\t $list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) {\r\n\t\t\t\t\t\tforeach ($node->childNodes as $child) {\r\n\t\t\t\t\t\t\tif ($child->nodeType == 3) continue;\r\n\t\t\t\t\t\t\t$list->add($child);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$this->xml_query = $list; \r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t\tcase '+': // Select adjacent-element\r\n\t\t\t\t \r\n\t\t\t\t\t$list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) {\r\n\t\t\t\t\t\tforeach ($node->parentNode->childNodes as $child) {\r\n\t\t\t\t\t\t\tif ($child->nodeType == 3) continue;\r\n\t\t\t\t\t\t\t$list->add($child);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->xml_query = $list;\r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (is_object($this->xml_query) AND get_class($this->xml_query) === 'DOMElement') {\r\n\t\t\t$this->xml_query = new XDTNodeList($this->xml_query);\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->xml_query;\r\n\t}", "function callback_user_role_select(array $args)\n {\n }", "public function getFsSelection() {}", "public function selectAll()\n {\n\n }", "public function executeSelect(DBConnection $conn, Peer $peer, $jp= null, $buffered= true);", "public function select($fields=null) { if ($fields) $this->fields($fields); return $this->execute($this->get_select()); }", "function select() {\r\n\t\t$query = 'SELECT * FROM `subscribers`';\r\n\t\t\r\n\t\t$this->query = $query;\r\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "public function selectAllactor() {\n\t\t$this->dbAdapter->dbOpen();\n\t\t$result = $this->dbAdapter->actorSelectAll();\n\t\t$this->dbAdapter->dbClose();\n\t\t$this->error = $this->dbAdapter->lastError();\n\t\t\n\t\treturn $result;\t\t\n\t}", "public function onSelectPrefetchAllData();", "public function getSelectAction() : ?callable\n {\n return function (CliMenu $menu) {\n $this->showSubMenu($menu);\n };\n }", "public function testSelectWithFunction(): void\n {\n $this->_insert();\n $result = $this->connection->selectQuery(fields: 'id', table: 'ordered_uuid_items')\n ->where(function (QueryExpression $exp, Query $q) {\n return $exp->eq(\n 'id',\n $q->func()->concat(['48298a29-81c0-4c26-a7fb', '-413140cf8569'], []),\n 'ordered_uuid'\n );\n })\n ->execute()\n ->fetchAll('assoc');\n\n $this->assertCount(1, $result);\n $this->assertSame('4c2681c048298a29a7fb413140cf8569', $result[0]['id']);\n }", "public function select() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return $src->select($this);\r\n\t\treturn $this->source->select($this);\r\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "public function processSelect(Builder $query, $results);", "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "function wrapper_select_db($dbname) {\n\t\treturn $this->functions['select_db']($dbname, $this->link_id);\n\t}", "function select_data($query,$connect){\n\t$result = $connect->query($query);\n\treturn $result;\n}", "function querySelect($query) {\r\n\t\t\r\n\t\tif (strlen(trim($query)) < 0 ) {\r\n\t\t\ttrigger_error(\"Database encountered empty query string in querySelect function\",E_USER_ERROR);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif( !$this->connected ) \r\n\t\t\t$this->connect();\r\n\t\t\t\r\n\t\tif ($result = $this->socket->query($query)) {\r\n\t\t\t$this->recordsSelected = $result->num_rows;\r\n\t\t\t$this->databaseResults = $this->getData($result);\r\n\t\t\t$result->close();\t\t\t\r\n\t\t}\r\n\t\telseif($this->socket->errno!='')\r\n\t\t{\r\n\t\t\r\n\t\t\t$this->error( $sql.\"Error querying database: \". $this->socket->error,false);\r\n\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t\r\n\t\treturn $this->databaseResults;\r\n\t}", "private function executeAndFetchStatement($select){\n $this->statement = $this->connection->prepare($select);\n $this->statement->execute();\n $result = $this->statement->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "public function select($otros_votos);", "function exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '') {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->exec_SELECTquery_preProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\t$res = parent::exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->exec_SELECTquery_postProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\treturn $res;\n\t}", "function exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '') {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->exec_SELECTquery_preProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\t$res = parent::exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->exec_SELECTquery_postProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\treturn $res;\n\t}", "function get_selected()\n {\n }", "function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);", "function db_select($table, $column, $group, $ret)\n {\n $result = null;\n global $db_is_connected, $db;\n\t\tif (!$db_is_connected)\n\t\t{\n\t\t\tdb_connnect();\n\t\t}\n if (!$db_is_connected)\n {\t\n consol_message(\"Error: Could not connect to database.\");\n return FALSE;\n }else{\n $query = \"SELECT $column FROM $table $group;\";\n $rslt = $db->query($query);\n if (!$rslt)\n {\n consol_message($query.\" isn't correct .\");\n return FALSE;\n }else{\n while ($row = $rslt->fetch_assoc()) {\n $result[] = $row[\"$ret\"];\n }\n return $result;\n }\n }\n return FALSE;\n }", "function ffw_port_color_select_callback( $args ) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $html = '<select id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"/>';\n\n foreach ( $args['options'] as $option => $color ) :\n $selected = selected( $option, $value, false );\n $html .= '<option value=\"' . $option . '\" ' . $selected . '>' . $color['label'] . '</option>';\n endforeach;\n\n $html .= '</select>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "public function PgSelect($sql){\n $this->StartBD();\n $this->SQuery = $this->PgQuery($sql);\n if (!$this->SQuery){\n die(\"SELECT Erroneo!\");\n }\n $this->EndBD();\n }", "public function operations();", "public function callback_select( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $html = sprintf( '<select class=\"%1$s\" name=\"%2$s\" id=\"%2$s\" %3$s>', $size, $name_id, $disable );\n\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, selected( $value, $key, false ), $label );\n }\n\n $html .= sprintf( '</select>' );\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }", "public function testSelect()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->select(['a', 'b']));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['a', 'b'], $elasticQuery['_source']);\n\n $query->select(['c', 'd']);\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['a', 'b', 'c', 'd'], $elasticQuery['_source']);\n\n $query->select(['e', 'f'], true);\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['e', 'f'], $elasticQuery['_source']);\n }", "public function onPageLengthSelect(\\Closure $fx): void\n {\n $this->cb->set(function () use ($fx) {\n $ipp = isset($_GET['ipp']) ? (int) $_GET['ipp'] : null;\n $this->set($this->formatInteger($ipp));\n $reload = $fx($ipp);\n if ($reload) {\n $this->getApp()->terminateJson($reload);\n }\n });\n }", "public function map($sel, $callback)\n\t{\n\n\t\t$nodes = pq($sel);\n\t\t$this->data = [];\n\t\tforeach ($nodes as $node) {\n\t\t\t// node is a domelement\n\t\t\t$node = pq($node);\n\t\t\t$datum = $this->$callback($node);\n\t\t\t$this->data[] = $datum;\n\t\t}\n// $this->data = $data;\n\n\t\treturn $this;\n\t}", "function __select( $hidden = true ) {\n\t\t$data = '';\n\t\tif( $hidden === true ) {\n\t\t\t// use hyperv-vm.select.class\n\t\t\trequire_once($this->rootdir.'/plugins/hyperv/class/hyperv-vm.select.class.php');\n\t\t\t$controller = new hyperv_vm_select($this->htvcenter, $this->response);\n\t\t\t$controller->actions_name = $this->actions_name;\n\t\t\t$controller->tpldir = $this->tpldir;\n\t\t\t$controller->message_param = $this->message_param;\n\t\t\t$controller->lang = $this->lang['select'];\n\t\t\t$data = $controller->action();\n\t\t}\n\t\t$content['label'] = $this->lang['select']['tab'];\n\t\t$content['value'] = $data;\n\t\t$content['target'] = $this->response->html->thisfile;\n\t\t$content['request'] = $this->response->get_array($this->actions_name, 'select' );\n\t\t$content['onclick'] = false;\n\t\tif($this->action === 'select'){\n\t\t\t$content['active'] = true;\n\t\t}\n\t\treturn $content;\n\t}", "public function selectArticle()\n\t{\n\t}", "public function getChoicesCallback();", "public function testSelect()\n {\n $connection = new MockConnection($this->mockConnector, $this->mockCompiler);\n $select = $connection->select();\n\n $this->assertInstanceOf(Query\\Select::class, $select);\n $this->assertEquals($connection, $select->connection);\n }", "public function select( $select ) {\n $args = func_get_args();\n\n $this->_type = self::TYPE_SELECT;\n\n foreach( $args AS $arg ) {\n $this->_select[] = $arg;\n }\n\n return $this;\n }", "final public function select($db, $tb)\r\n\t{\r\n\r\n\t\t$this->db = $db;\r\n\t\t$this->tb = $tb;\r\n\t}", "function pg_select($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC, int $result_type = PGSQL_ASSOC)\n{\n error_clear_last();\n $result = \\pg_select($connection, $table_name, $assoc_array, $options, $result_type);\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n return $result;\n}", "function test_select($urabe, $body)\n{\n $sql = $body->sql_select;\n $result = $urabe->select($sql);\n $result->message = \"Urabe test selection query with default parser\";\n return $result;\n}", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }" ]
[ "0.721117", "0.71609926", "0.6908219", "0.6744716", "0.6744716", "0.6744716", "0.6429232", "0.63148093", "0.62806994", "0.6259463", "0.6248305", "0.6094883", "0.60862833", "0.59205896", "0.5835924", "0.5811498", "0.5771971", "0.5693358", "0.55812496", "0.5570643", "0.5499443", "0.54740435", "0.54457927", "0.5428433", "0.53871554", "0.5365134", "0.5304855", "0.5304855", "0.529537", "0.5286308", "0.52125174", "0.5210126", "0.51967424", "0.5184792", "0.5180104", "0.5173606", "0.5166505", "0.5164295", "0.5158155", "0.51437753", "0.51297057", "0.512778", "0.51177156", "0.50986767", "0.506337", "0.50543845", "0.50421625", "0.5032955", "0.5032162", "0.49993208", "0.49947968", "0.49842277", "0.49655607", "0.49655607", "0.494813", "0.49438167", "0.4929528", "0.49214074", "0.4916114", "0.48981842", "0.489289", "0.48912966", "0.48773837", "0.48773837", "0.48728657", "0.48703402", "0.48585027", "0.48397163", "0.4835556", "0.48330507", "0.48330507", "0.48330507", "0.48145762", "0.48025724", "0.48025724", "0.47997892", "0.47907257", "0.47839776", "0.47694653", "0.4767625", "0.47585207", "0.47585207", "0.47570992", "0.4732915", "0.4714117", "0.47129267", "0.47028103", "0.4699626", "0.46871817", "0.46855086", "0.4684927", "0.46821573", "0.46794248", "0.46671116", "0.46624804", "0.46515816", "0.46490344", "0.46388432", "0.4638488", "0.46318197", "0.4627364" ]
0.0
-1
Callbacks for operation select.
function mongo_node_mass_delete($entity_type, $entities) { entity_delete_multiple($entity_type, $entities); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select(callable $callback);", "function callback_select(array $args)\n {\n }", "abstract function selectHook();", "public function select();", "public function select();", "public function select();", "protected static function select()\n {\n }", "public function Do_select_Example1(){\n\n\t}", "function qselect(){\r\n\t\t\r\n\t\r\n\t}", "public function select()\n {\n\n }", "protected function socketSelect() {}", "public function Do_Allselect_Example1(){\n\n\t}", "public function select(callable $function);", "protected function processSelect(\\Zend_Db_Select $select)\n { }", "function mSELECT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$SELECT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:116:3: ( 'select' ) \n // Tokenizer11.g:117:3: 'select' \n {\n $this->matchString(\"select\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function process(Select $select);", "private function _select(){\n $this->debugBacktrace();\n $parameter = $this->selectParam; //transfer to local variable.\n $this->selectParam = \"\"; //reset updateParam.\n\n \n \n $sql = \"\";\n if($this->hasRawSql){\n $sql = $parameter;\n $this->hasRawSql = false;\n }\n else{\n $tableName = $this->tableName;\n $this->tableName = \"\"; //reset.\n\n $columns = \"\";\n if(!isset($parameter) || empty($parameter)){\n $columns = \"*\";\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n else{\n //first check whether it has 'select' keyword\n $parameter = trim($parameter);\n $keyWord = substr($parameter,0,6);\n if(strtoupper($keyWord)==\"SELECT\") {\n $sql = $parameter;\n }\n else{\n $columns = $parameter;\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n }\n }\n\n \n $queryObject = $this->_perform_mysql_query($sql);\n \n if(empty($this->selectModifier)){\n //No select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $quantity = 0;\n $rows = array();\n switch ($this->fetchType){\n case \"fetch_object\":\n while ($row = mysqli_fetch_object($queryObject)) {\n if(isset($tableName)){\n $meta = new stdClass();\n $meta->type = $tableName;\n $row->__meta = $meta;\n }\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_assoc\":\n while ($row = mysqli_fetch_assoc($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_array\":\n while ($row = mysqli_fetch_array($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_row\":\n while ($row = mysqli_fetch_row($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_field\":\n while ($row = mysqli_fetch_field($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n }\n\n if($quantity>0){\n mysqli_free_result($queryObject);\n }\n\n return $rows;\n //<----No select modifier (first, firstOrDefault, single, singleOrDefault) found \n }\n else{ \n //select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $selectModifier = $this->selectModifier;\n $this->selectModifier = \"\";\n $row;\n switch($selectModifier){\n case \"first\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n break;\n \n case \"firstOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n break;\n\n case \"single\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n if($numRows > 1){\n throw new ZeroException(\"Multiple records found.\");\n }\n break;\n\n case \"singleOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n if($numRows > 1){\n return NULL;\n }\n break;\n }\n\n return $this->_prepareSingleRecord($queryObject);\n //<---- select modifier (first, firstOrDefault, single, singleOrDefault) found *212*062#\n }\n }", "public function select()\n {\n return curl_multi_select( $this->mh );\n }", "public function fewSelection()\n {\n $selection = func_num_args() > 0 ? func_get_args() : $this->fewSelection;\n\n return call_user_func_array([$this, 'select'], $selection);\n }", "function stream_select(&$readarray, &$writearray, &$exceptarray, $tv_sec, $tv_usec = null)\n {\n return stream_select($readarray, $writearray, $exceptarray, $tv_sec, $tv_usec);\n }", "abstract public function prepareSelect();", "protected function runSelect()\n {\n return $this->connection->select($this->toCypher(), $this->getBindings());\n }", "protected function runSelect()\n {\n return $this->connection->select(\n $this->toSql(),\n $this->getBindings(),\n $this->option->setUseWrite($this->useWritePdo)\n );\n }", "function run_select($sql, $params, $task, $calling_function) {\n $stmt = $this->db_connection->prepare($sql);\n $output = null;\n\n try {\n if ($params != null) {\n $stmt->execute($params);\n }\n else {\n $stmt->execute();\n }\n\n if ($task == \"fetch_column\") {\n $output = $stmt->fetchColumn();\n }\n else if ($task == \"fetch_all\") {\n $output = $stmt->fetchAll();\n }\n }\n catch(PDOException $e) {\n echo(\"PDO error from $calling_function:<br/>\" . $e->getMessage());\n }\n\n $stmt = null;\n return $output;\n }", "public function getLastSelect();", "function select_option()\r\n{}", "public function getSelect();", "public function getSelect();", "protected function parseOperation()\n {\n $operation = 'select';\n\n $queryParts = explode('/', $this->query);\n array_shift($queryParts);\n\n if (!count($queryParts)) {\n $this->operation = $operation;\n\n return;\n }\n\n if (in_array($queryParts[0], $this->operations, true)) {\n $operation = array_shift($queryParts);\n if (count($queryParts) && is_numeric($queryParts[0])) {\n $this->params['limit'] = array_shift($queryParts);\n }\n $this->identifier = implode(',', $queryParts);\n } else {\n $this->identifier = implode(',', $queryParts);\n }\n\n if (!empty($this->identifier)) {\n $operation = 'namedselect';\n }\n\n $this->operation = $operation;\n }", "public abstract function onPlayerSelect();", "abstract protected function _manageFetchOptions($select, $options);", "public function callback();", "protected function prepareSelectStatement() {}", "private function parseSelection() : \\GraphQL\\Language\\AST\\SelectionNode\n {\n }", "protected function ejecutarSelect($sql){ \n $conf = $_SESSION['config']['base'];\n $pass = \\Core\\Encriptador::desencriptar($conf['dbclaveAll']);\n $obd = new \\Core\\DataBase($conf['dbhost'], $conf['dbport'], $conf['dbuserAll'], $pass, $conf['dbdatabase']);\n $datos = $obd->select($sql);\n if(!empty($datos)){\n return $datos;\n }\n return 0;\n }", "public function getSelect()\n {\n throw new \\Exception('SELECT not ready');\n }", "public function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$_args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$_args);\n\t}", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "function runSelect($repo)\n{\n // Var Dumping each entity type to test select\n var_dump($repo->select(new ChocolateBar()));\n var_dump($repo->select(new Cookie()));\n var_dump($repo->select(new Noodle()));\n}", "function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$args);\n\t}", "function select($selection,$db) {\n\n\t\t$conn = new mysqli('localhost','id6847947_tadas','322559',$db);\n\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t} \n\n\t$result = $conn->query($selection);\n\treturn $result;\n}", "public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}", "public function setup_selected() {\n\t}", "function ffw_port_select_callback($args) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $html = '<select id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"/>';\n\n foreach ( $args['options'] as $option => $name ) :\n $selected = selected( $option, $value, false );\n $html .= '<option value=\"' . $option . '\" ' . $selected . '>' . $name . '</option>';\n endforeach;\n\n $html .= '</select>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "protected function postSelector()\n {\n }", "function select ($sql ,$conn) {\n\t\t$result = mysql_query($sql , $conn) ;\n\t\treturn $result ;\n\n\t}", "public function getOperationMade() {}", "public function sql_select_db() {}", "public function sql_select_db() {}", "public function select() \n {\n $this->select->execute();\n\n if ($this->select->errorCode() != 0) \n {\n print_r($this->select->errorInfo());\n }\n\n return $this->select->fetchAll();\n }", "public function walkSelectStatement(AST\\SelectStatement $selectStatement): void;", "function select($query)\n\t{\n\t\t\n\t\tglobal $connection;\n\t\t$resuts = $connection->query($query);\n\t\treturn $resuts;\n\t}", "protected abstract function getSelectStatement();", "protected abstract function getSelectStatement();", "function listadoSelect();", "final function select($selector = '*', DOMElement $context = null, $flag = XDT::SELECT_DESTROY) {\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECTION FLAG ======================= **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\tswitch ($flag) {\r\n\t\t\tcase XDT::SELECT_DESTROY: $this->xml_query = null; break;\r\n\t\t\tcase XDT::SELECT_FILTER: ; break;\r\n\t\t}\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECTION CONTEXT ==================== **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t if (isset($context)) {\r\n\t \t$all = $context->getElementsByTagName('*');\r\n\t \t$l = new XDTNodeList();\r\n\t \tforeach ($all as $node) {\r\n\t \t\t$l->add($node);\r\n\t \t}\r\n\t \t$this->xml_query = $l;\r\n\t\t //$this->xml_query = new XDTNodeList($context);\r\n\t\t //$this->xml_query = $this->xml_query->find(); \r\n\t\t}\r\n\t\t\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\t/** ================ SELECT MULTIPLE ====================== **/\r\n\t\t/** ------------------------------------------------------- **/\r\n\t\tif (preg_match('/[,]/', $selector)) return $this->mSelect($selector);\r\n\t\t\r\n\t\t$selector = $this->parse($selector); // Convert selector to code logic\r\n\t\t\r\n\t\t$chunks = preg_split('/[\\s>+]/', $selector, -1, PREG_SPLIT_NO_EMPTY);\r\n\t\t$glues = preg_split('/[^\\s>+]/', $selector, -1, PREG_SPLIT_NO_EMPTY);\r\n\t\t\r\n\t\tif (empty($glues)) return $this->query($selector);\r\n\t\t\r\n\t\t$this->xml_query = $this->query($chunks[0]);\r\n\t\t\r\n\t\tfor ($index = 1; $index < count($chunks); $index++) {\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Cast query result to NodeList.\r\n\t\t\t */\r\n\t\t\tif (is_object($this->xml_query) AND get_class($this->xml_query) === 'DOMElement') {\r\n\t\t\t\t$this->xml_query = new XDTNodeList($this->xml_query);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tswitch (trim($glues[$index-1])) {\r\n\t\t\t\tcase '': // Select descendent elements\r\n\t\t\t\t\t\r\n\t\t\t\t\t$list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) \r\n\t\t\t\t\t\tforeach ($node->getElementsByTagName('*') as $n) $list->add($n);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->xml_query = $list;\r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t\tcase '>': // Select children elements\r\n\t\t\t\t \r\n\t\t\t\t $list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) {\r\n\t\t\t\t\t\tforeach ($node->childNodes as $child) {\r\n\t\t\t\t\t\t\tif ($child->nodeType == 3) continue;\r\n\t\t\t\t\t\t\t$list->add($child);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$this->xml_query = $list; \r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t\tcase '+': // Select adjacent-element\r\n\t\t\t\t \r\n\t\t\t\t\t$list = new XDTNodeList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($this->xml_query as $node) {\r\n\t\t\t\t\t\tforeach ($node->parentNode->childNodes as $child) {\r\n\t\t\t\t\t\t\tif ($child->nodeType == 3) continue;\r\n\t\t\t\t\t\t\t$list->add($child);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->xml_query = $list;\r\n\t\t\t\t\t$this->xml_query = $this->query($chunks[$index]); break;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (is_object($this->xml_query) AND get_class($this->xml_query) === 'DOMElement') {\r\n\t\t\t$this->xml_query = new XDTNodeList($this->xml_query);\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->xml_query;\r\n\t}", "function callback_user_role_select(array $args)\n {\n }", "public function getFsSelection() {}", "public function selectAll()\n {\n\n }", "public function executeSelect(DBConnection $conn, Peer $peer, $jp= null, $buffered= true);", "public function select($fields=null) { if ($fields) $this->fields($fields); return $this->execute($this->get_select()); }", "function select() {\r\n\t\t$query = 'SELECT * FROM `subscribers`';\r\n\t\t\r\n\t\t$this->query = $query;\r\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "public function selectAllactor() {\n\t\t$this->dbAdapter->dbOpen();\n\t\t$result = $this->dbAdapter->actorSelectAll();\n\t\t$this->dbAdapter->dbClose();\n\t\t$this->error = $this->dbAdapter->lastError();\n\t\t\n\t\treturn $result;\t\t\n\t}", "public function onSelectPrefetchAllData();", "public function getSelectAction() : ?callable\n {\n return function (CliMenu $menu) {\n $this->showSubMenu($menu);\n };\n }", "public function testSelectWithFunction(): void\n {\n $this->_insert();\n $result = $this->connection->selectQuery(fields: 'id', table: 'ordered_uuid_items')\n ->where(function (QueryExpression $exp, Query $q) {\n return $exp->eq(\n 'id',\n $q->func()->concat(['48298a29-81c0-4c26-a7fb', '-413140cf8569'], []),\n 'ordered_uuid'\n );\n })\n ->execute()\n ->fetchAll('assoc');\n\n $this->assertCount(1, $result);\n $this->assertSame('4c2681c048298a29a7fb413140cf8569', $result[0]['id']);\n }", "public function select() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return $src->select($this);\r\n\t\treturn $this->source->select($this);\r\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "public function processSelect(Builder $query, $results);", "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "function wrapper_select_db($dbname) {\n\t\treturn $this->functions['select_db']($dbname, $this->link_id);\n\t}", "function select_data($query,$connect){\n\t$result = $connect->query($query);\n\treturn $result;\n}", "function querySelect($query) {\r\n\t\t\r\n\t\tif (strlen(trim($query)) < 0 ) {\r\n\t\t\ttrigger_error(\"Database encountered empty query string in querySelect function\",E_USER_ERROR);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif( !$this->connected ) \r\n\t\t\t$this->connect();\r\n\t\t\t\r\n\t\tif ($result = $this->socket->query($query)) {\r\n\t\t\t$this->recordsSelected = $result->num_rows;\r\n\t\t\t$this->databaseResults = $this->getData($result);\r\n\t\t\t$result->close();\t\t\t\r\n\t\t}\r\n\t\telseif($this->socket->errno!='')\r\n\t\t{\r\n\t\t\r\n\t\t\t$this->error( $sql.\"Error querying database: \". $this->socket->error,false);\r\n\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t\r\n\t\treturn $this->databaseResults;\r\n\t}", "private function executeAndFetchStatement($select){\n $this->statement = $this->connection->prepare($select);\n $this->statement->execute();\n $result = $this->statement->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "public function select($otros_votos);", "function exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '') {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->exec_SELECTquery_preProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\t$res = parent::exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->exec_SELECTquery_postProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\treturn $res;\n\t}", "function exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '') {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->exec_SELECTquery_preProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\t$res = parent::exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->exec_SELECTquery_postProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\treturn $res;\n\t}", "function get_selected()\n {\n }", "function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);", "function db_select($table, $column, $group, $ret)\n {\n $result = null;\n global $db_is_connected, $db;\n\t\tif (!$db_is_connected)\n\t\t{\n\t\t\tdb_connnect();\n\t\t}\n if (!$db_is_connected)\n {\t\n consol_message(\"Error: Could not connect to database.\");\n return FALSE;\n }else{\n $query = \"SELECT $column FROM $table $group;\";\n $rslt = $db->query($query);\n if (!$rslt)\n {\n consol_message($query.\" isn't correct .\");\n return FALSE;\n }else{\n while ($row = $rslt->fetch_assoc()) {\n $result[] = $row[\"$ret\"];\n }\n return $result;\n }\n }\n return FALSE;\n }", "function ffw_port_color_select_callback( $args ) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $html = '<select id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"/>';\n\n foreach ( $args['options'] as $option => $color ) :\n $selected = selected( $option, $value, false );\n $html .= '<option value=\"' . $option . '\" ' . $selected . '>' . $color['label'] . '</option>';\n endforeach;\n\n $html .= '</select>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "public function PgSelect($sql){\n $this->StartBD();\n $this->SQuery = $this->PgQuery($sql);\n if (!$this->SQuery){\n die(\"SELECT Erroneo!\");\n }\n $this->EndBD();\n }", "public function operations();", "public function callback_select( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $html = sprintf( '<select class=\"%1$s\" name=\"%2$s\" id=\"%2$s\" %3$s>', $size, $name_id, $disable );\n\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, selected( $value, $key, false ), $label );\n }\n\n $html .= sprintf( '</select>' );\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }", "public function testSelect()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->select(['a', 'b']));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['a', 'b'], $elasticQuery['_source']);\n\n $query->select(['c', 'd']);\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['a', 'b', 'c', 'd'], $elasticQuery['_source']);\n\n $query->select(['e', 'f'], true);\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['e', 'f'], $elasticQuery['_source']);\n }", "public function onPageLengthSelect(\\Closure $fx): void\n {\n $this->cb->set(function () use ($fx) {\n $ipp = isset($_GET['ipp']) ? (int) $_GET['ipp'] : null;\n $this->set($this->formatInteger($ipp));\n $reload = $fx($ipp);\n if ($reload) {\n $this->getApp()->terminateJson($reload);\n }\n });\n }", "public function map($sel, $callback)\n\t{\n\n\t\t$nodes = pq($sel);\n\t\t$this->data = [];\n\t\tforeach ($nodes as $node) {\n\t\t\t// node is a domelement\n\t\t\t$node = pq($node);\n\t\t\t$datum = $this->$callback($node);\n\t\t\t$this->data[] = $datum;\n\t\t}\n// $this->data = $data;\n\n\t\treturn $this;\n\t}", "function __select( $hidden = true ) {\n\t\t$data = '';\n\t\tif( $hidden === true ) {\n\t\t\t// use hyperv-vm.select.class\n\t\t\trequire_once($this->rootdir.'/plugins/hyperv/class/hyperv-vm.select.class.php');\n\t\t\t$controller = new hyperv_vm_select($this->htvcenter, $this->response);\n\t\t\t$controller->actions_name = $this->actions_name;\n\t\t\t$controller->tpldir = $this->tpldir;\n\t\t\t$controller->message_param = $this->message_param;\n\t\t\t$controller->lang = $this->lang['select'];\n\t\t\t$data = $controller->action();\n\t\t}\n\t\t$content['label'] = $this->lang['select']['tab'];\n\t\t$content['value'] = $data;\n\t\t$content['target'] = $this->response->html->thisfile;\n\t\t$content['request'] = $this->response->get_array($this->actions_name, 'select' );\n\t\t$content['onclick'] = false;\n\t\tif($this->action === 'select'){\n\t\t\t$content['active'] = true;\n\t\t}\n\t\treturn $content;\n\t}", "public function selectArticle()\n\t{\n\t}", "public function getChoicesCallback();", "public function testSelect()\n {\n $connection = new MockConnection($this->mockConnector, $this->mockCompiler);\n $select = $connection->select();\n\n $this->assertInstanceOf(Query\\Select::class, $select);\n $this->assertEquals($connection, $select->connection);\n }", "public function select( $select ) {\n $args = func_get_args();\n\n $this->_type = self::TYPE_SELECT;\n\n foreach( $args AS $arg ) {\n $this->_select[] = $arg;\n }\n\n return $this;\n }", "final public function select($db, $tb)\r\n\t{\r\n\r\n\t\t$this->db = $db;\r\n\t\t$this->tb = $tb;\r\n\t}", "function pg_select($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC, int $result_type = PGSQL_ASSOC)\n{\n error_clear_last();\n $result = \\pg_select($connection, $table_name, $assoc_array, $options, $result_type);\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n return $result;\n}", "function test_select($urabe, $body)\n{\n $sql = $body->sql_select;\n $result = $urabe->select($sql);\n $result->message = \"Urabe test selection query with default parser\";\n return $result;\n}", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }" ]
[ "0.721117", "0.71609926", "0.6908219", "0.6744716", "0.6744716", "0.6744716", "0.6429232", "0.63148093", "0.62806994", "0.6259463", "0.6248305", "0.6094883", "0.60862833", "0.59205896", "0.5835924", "0.5811498", "0.5771971", "0.5693358", "0.55812496", "0.5570643", "0.5499443", "0.54740435", "0.54457927", "0.5428433", "0.53871554", "0.5365134", "0.5304855", "0.5304855", "0.529537", "0.5286308", "0.52125174", "0.5210126", "0.51967424", "0.5184792", "0.5180104", "0.5173606", "0.5166505", "0.5164295", "0.5158155", "0.51437753", "0.51297057", "0.512778", "0.51177156", "0.50986767", "0.506337", "0.50543845", "0.50421625", "0.5032955", "0.5032162", "0.49993208", "0.49947968", "0.49842277", "0.49655607", "0.49655607", "0.494813", "0.49438167", "0.4929528", "0.49214074", "0.4916114", "0.48981842", "0.489289", "0.48912966", "0.48773837", "0.48773837", "0.48728657", "0.48703402", "0.48585027", "0.48397163", "0.4835556", "0.48330507", "0.48330507", "0.48330507", "0.48145762", "0.48025724", "0.48025724", "0.47997892", "0.47907257", "0.47839776", "0.47694653", "0.4767625", "0.47585207", "0.47585207", "0.47570992", "0.4732915", "0.4714117", "0.47129267", "0.47028103", "0.4699626", "0.46871817", "0.46855086", "0.4684927", "0.46821573", "0.46794248", "0.46671116", "0.46624804", "0.46515816", "0.46490344", "0.46388432", "0.4638488", "0.46318197", "0.4627364" ]
0.0
-1
List mongo entity administration filters that can be applied.
function mongo_node_filters($entity_type) { $filters = array( 'status' => array( 'any' => array( 'label' => 'Any', ), 'published' => array( 'label' => 'Published', 'filters' => array( array( '#type' => 'status', '#value' => 1, '#callback' => 'propertyCondition', ), ), ), 'not_published' => array( 'label' => 'Not published', 'filters' => array( array( '#type' => 'status', '#value' => 0, '#callback' => 'propertyCondition', ), ), ), ), 'type' => array( 'any' => array( 'label' => 'Any', ), ), ); $set = mongo_node_settings(); $bundles = $set[$entity_type]['bundles']; foreach ($bundles as $bundle_name => $bundle_settings) { $filters['type'][$bundle_name] = array( 'label' => $bundle_settings['label'], 'filters' => array( array( '#type' => 'bundle', '#value' => $bundle_name, '#callback' => 'entityCondition', ), ), ); } return $filters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'rights', // perform access control for CRUD operations\n\t\t);\n\t}", "public function filters()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'rights', // perform access control for CRUD operations\r\n\t\t);\r\n\t}", "public function getAllFilters();", "public function getFilters();", "public function filters()\n {\n return [\n \n ];\n }", "public function getFilters(): FilterCollection;", "public function filters()\n\t{\n\t\t// return the filter configuration for this controller, e.g.:\n\t\treturn array(\n\t\t\t// 'inlineFilterName',\n\t\t\t// array(\n\t\t\t// \t'class'=>'path.to.FilterClass',\n\t\t\t// \t'propertyName'=>'propertyValue',\n\t\t\t// ),\n // 'accessControl', // perform access control for CRUD operations\n // 'postOnly + delete', // we only allow deletion via POST request\n\t\t);\n\t}", "public function allowedFilters()\n {\n return [];\n }", "public function filters()\r\n {\r\n return array(\r\n 'accessControl', // perform access control for CRUD operations\r\n );\r\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function filters()\n {\n return array(\n 'accessControl', /// perform access control for CRUD operations\n array(\n 'application.filters.UserLoginFilter + index, AdminPositionCode, CrearPosition ',/*cuando no estas logeado*/\n ),\n array(\n 'application.filters.UserUpdateFilter + index, AdminPositionCode, CrearPosition',\n )\n );\n }", "public function filters() \n {\n return array(\n 'accessControl', // perform access control for CRUD operations\n );\n }", "public function filters()\n {\n return array( 'accessControl' ); // perform access control for CRUD operations\n }", "public function getFilters()\n {\n return array();\n }", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t);\n\t}", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t);\n\t}", "function xh_listFilters()\r\n\t{\r\n\t}", "public function filters() {\n return array(\"accessControl\");\n }", "public function getFilters(): array;", "public function getFilters() \n {\n return $this->filters;\n }", "public static function getFilterList()\n {\n return ['onePageFilter'];\n }", "private function allowsFilter()\n {\n return config('dingoquerymapper.allowFilters');\n }", "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'media.adminlist.configurator.filter.name');\n $this->addFilter('contentType', new ORM\\StringFilterType('contentType'), 'media.adminlist.configurator.filter.type');\n $this->addFilter('updatedAt', new ORM\\NumberFilterType('updatedAt'), 'media.adminlist.configurator.filter.updated_at');\n $this->addFilter('filesize', new ORM\\NumberFilterType('filesize'), 'media.adminlist.configurator.filter.filesize');\n }", "public function GetFilters ();", "abstract protected function getFilters();", "public function filters() {\n\t\treturn array(\n\t\t\t'accessControl',\n\t\t);\n\t}", "public function getFilters(): array\n {\n return [];\n }", "public function getFilters()\r\n {\r\n return $this->filters;\r\n }", "public function filters() {\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t\t'postOnly + delete', // we only allow deletion via POST request\n\t\t);\n\t}", "public function getFilters(): array;", "public function filters(): array\n {\n return [\n WhereIdIn::make($this),\n WhereIn::make('namespace')->delimiter(','),\n WhereIn::make('slug'),\n ];\n }", "public function filters(){\r\r\n\t\treturn CMap::mergeArray(parent::filters(),array(\r\r\n\t\t\t\r\r\n\t\t));\r\r\n\t}", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return $this->filters;\n }", "public function filters()\n\t{\n\t\t// return the filter configuration for this controller, e.g.:\n\t\treturn array(\n\t\t 'accessControl'\n\t\t);\n\t}", "public function getFilterables()\n {\n return $this->filterables;\n }", "public function getFilters(): array\n {\n return $this->filters;\n }", "public function filters(){\n\t\treturn array( 'accessControl' );\n\t}", "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'kuma_menu.menu.adminlist.filter.name');\n }", "public function getFilters() \r\n\t{\r\n\t\treturn $this->_filters;\r\n\t}", "public static function alm_get_all_filters(){\n global $wpdb;\n \t$prefix = esc_sql( ALM_FILTERS_PREFIX );\n \t$options = $wpdb->options;\n \t$t = esc_sql( \"$prefix%\" );\n \t$sql = $wpdb -> prepare ( \"SELECT option_name FROM $options WHERE option_name LIKE '%s'\", $t );\n \t$filters = $wpdb -> get_col( $sql );\n\n \t$filters = ALMFilters::alm_remove_filter_license_options($filters);\n\n \treturn $filters;\n }", "public function getFilters(): array\n {\n return [\n new TwigFilter('sonata_urlsafeid', [$this, 'getUrlsafeIdentifier']),\n ];\n }", "public function filters() {\n\n return array(\n 'accessControl', // perform access control for CRUD operations\n 'postOnly + delete' // we only allow deletion via POST request\n );\n }", "protected function filters(): array\n {\n return $this->filters;\n }", "public function getFilters()\n {\n return [\n new \\Twig_SimpleFilter('country', [$this, 'getCountry']),\n new \\Twig_SimpleFilter('language', [$this, 'getLanguage']),\n new \\Twig_SimpleFilter('locale_date', [$this, 'getLocaleDate']),\n ];\n }", "private function filters() {\n\n\n\t}", "public function filters()\n\t{\n \treturn array(\n \t\t'accessControl'\n\t\t);\n\t}", "public function filters() {\n return array(\n 'accessControl',\n );\n }", "public function getFilter();", "public function getFilter();", "public function getFilter(){ }", "public function getFilters()\n {\n return [\n 'setting' => new TwigFilter(\n 'setting',\n [$this, 'settingFilter'],\n []\n ),\n ];\n }", "public function getFilters()\n {\n return [\n new \\Twig_SimpleFilter('getBarMsgs', [$this, 'getRedisMsgs']),\n new \\Twig_SimpleFilter('json_decode', [$this, 'jsonDecode']),\n new \\Twig_SimpleFilter('routeExists', [$this, 'routeExists'])\n ];\n }", "public function getFilters()\n {\n return array_merge(parent::getFilters(), array(\n 'date' => new \\Twig_Filter_Function('ionic_date'),\n 'relativedate' => new \\Twig_Filter_Function('ionic_date_rel'),\n 'specialdate' => new \\Twig_Filter_Function('ionic_date_special'),\n 'url' => new \\Twig_Filter_Function('url'),\n 'nl2br_noescape' => new \\Twig_Filter_Function('nl2br'),\n 'limit' => new \\Twig_Filter_Function('Str::limit'),\n 'md5' => new \\Twig_Filter_Function('md5'),\n 'addslashes' => new \\Twig_Filter_Function('addslashes')\n ));\n }", "public function getFilter(): array\n {\n return $this->model->getFilter();\n }", "public function getFilters()\n {\n return array(\n new Twig_SimpleFilter('raw', 'twig_raw_filter', array('is_safe' => array('all'))),\n );\n }", "public function getInfoFilters(): array\n {\n return $this->definition->getFilterableColumns();\n }", "public function filters(): array\n {\n return [\n new DefaultSorted('created_at', 'desc')\n ];\n }", "public function getFilters() {\n $filters = [];\n\n // Add a default filter on the publishing status field, if available.\n if ($this->entityType && is_subclass_of($this->entityType->getClass(), EntityPublishedInterface::class)) {\n $field_name = $this->entityType->getKey('published');\n $this->filters = [\n $field_name => [\n 'value' => TRUE,\n 'table' => $this->base_table,\n 'field' => $field_name,\n 'plugin_id' => 'boolean',\n 'entity_type' => $this->entityTypeId,\n 'entity_field' => $field_name,\n ],\n ] + $this->filters;\n }\n\n $default = $this->filter_defaults;\n\n foreach ($this->filters as $name => $info) {\n $default['id'] = $name;\n $filters[$name] = $info + $default;\n }\n\n return $filters;\n }", "function getSupportedFilters() {\n return array('event' => array(\n 'event_type_id' => array(\n 'form_field_name' => 'event_type_id',\n 'operator' => 'IN',\n ))\n );\n }", "public function getFilters()\n {\n return array(\n 'sortable' => new \\Twig_Filter_Method($this, 'sortable', array('is_safe' => array('html'))),\n 'paginate' => new \\Twig_Filter_Method($this, 'paginate', array('is_safe' => array('html')))\n );\n }", "public function getFilters() {\n\t\treturn array(\n\t\t\tnew Twig_SimpleFilter('trans', '__'),\n\t\t\tnew Twig_SimpleFilter('c', '__c'),\n\t\t\tnew Twig_SimpleFilter('d', '__d'),\n\t\t\tnew Twig_SimpleFilter('dc', '__dc'),\n\t\t\tnew Twig_SimpleFilter('n', '__n')\n\t\t);\n\t}", "public function getFilterParameters(): array;", "public function getFilters()\n {\n return [\n new TwigFilter('dump', 'dump'),\n new TwigFilter('dd', 'dd'),\n ];\n }", "public function filters()\n {\n return array(\n 'accessControl', // perform access control for CRUD operations\n 'postOnly + delete', // we only allow deletion via POST request\n );\n }", "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl', // perform access control for CRUD operations\n\t\t\t'postOnly + delete', // we only allow deletion via POST request\n\t\t);\n\t}", "public function filterOptionsAction(){\n $em = $this->getDoctrine()->getManager();\n\n $entities = $this->getUser()->getBooks();\n\n $deleteForms = [];\n foreach ($entities as $entity) {\n $deleteForms[$entity->getId()] = $this->createDeleteForm($entity->getId())->createView();\n }\n\n return array(\n 'entities' => $entities,\n 'deleteForms' => $deleteForms,\n );\n }", "public function filters()\n {\n $filters = [];\n $filters['name'] = ['trim', 'empty_string_to_null', 'capitalize'];\n $filters['email'] = ['trim', 'empty_string_to_null', 'lowercase'];\n return $filters;\n }", "public function filters()\n {\n return [\n \"info.gravatar\" => \"trim|cast:boolean\",\n \"info.first_name\" => \"trim|strip_tags|cast:string\",\n \"info.last_name\" => \"trim|strip_tags|cast:string\",\n \"info.gender\" => \"trim|strip_tags|cast:string\",\n \"info.birthday\" => \"trim|strip_tags|cast:string\",\n \"info.mobile_phone\" => \"trim|strip_tags|cast:string\",\n \"info.address\" => \"trim|strip_tags|cast:string\",\n \"info.city\" => \"trim|strip_tags|cast:string\",\n \"info.country\" => \"trim|strip_tags|cast:string\",\n\n \"info.username\" => \"trim|strip_tags|cast:string\",\n \"info.displayname\" => \"trim|strip_tags|cast:string\",\n \"info.email\" => \"trim|strip_tags|cast:string\",\n \"info.password\" => \"trim|strip_tags|cast:string\",\n\n \"action\" => \"trim|strip_tags|cast:string\",\n \"_token\" => \"trim|strip_tags|cast:string\",\n \"_method\" => \"trim|strip_tags|cast:string\"\n ];\n }", "protected function getFilterable()\n {\n return [];\n }", "public function getRepositoryFilterable(): array\n {\n return self::FILTERABLE;\n }", "public function getFilters()\n {\n return array(\n 'shortenUrl' => new \\Twig_SimpleFilter('shorten_url', 'shortenUrl'),\n );\n }", "public function getFilters () {\n $filters = array( 'word_limiter' => new Twig_Filter_Function( 'twig_word_limiter_filter', array( 'needs_environment' => true ) ) );\n\n return $filters;\n }", "public static function GET_FILTER(): array\n\t{\n\t\treturn self::$filters;\n\t}", "public function createDefaultListFinderFilters(){\n \n $filters = array();\n \n $filters['id'] = new EqualsFilter('id', 'text', array(\n 'label' => 'ID'\n ));\n \n return $filters;\n \n }", "public function getFilter(): array\n {\n return $this->filter;\n }", "public function getFilter(): array\n {\n return $this->filter;\n }", "public function getFilters()\n\t{\n\t\treturn [\n\t\t\tnew \\Twig_SimpleFilter('basename', 'basename'),\n\t\t\tnew \\Twig_SimpleFilter('get_class', 'get_class'),\n\t\t\tnew \\Twig_SimpleFilter('json_decode', 'json_decode'),\n\t\t\tnew \\Twig_SimpleFilter('_', 'echo'),\n\t\t];\n\t}", "public function getFilters()\n {\n return $this->getOptions()\n ->joinWith('taxGroup.lang')\n ->joinWith('lang');\n }", "public function getRepositoryFilterable(): array\n\t{\n\t\treturn self::FILTERABLE;\n\t}", "public function getElasticaFilters()\n {\n return $this->elasticaFilters;\n }", "public function getFilters()\n {\n $filters = array(\n // formatting filters\n new Twig_SimpleFilter('date', 'twig_date_format_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('format', 'sprintf'),\n new Twig_SimpleFilter('replace', 'strtr'),\n new Twig_SimpleFilter('number_format', 'twig_number_format_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('abs', 'abs'),\n // encoding\n new Twig_SimpleFilter('url_encode', 'twig_urlencode_filter'),\n new Twig_SimpleFilter('json_encode', 'twig_jsonencode_filter'),\n new Twig_SimpleFilter('convert_encoding', 'twig_convert_encoding'),\n // string filters\n new Twig_SimpleFilter('title', 'twig_title_string_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('upper', 'strtoupper'),\n new Twig_SimpleFilter('lower', 'strtolower'),\n new Twig_SimpleFilter('striptags', 'strip_tags'),\n new Twig_SimpleFilter('trim', 'trim'),\n new Twig_SimpleFilter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))),\n // array helpers\n new Twig_SimpleFilter('join', 'twig_join_filter'),\n new Twig_SimpleFilter('split', 'twig_split_filter'),\n new Twig_SimpleFilter('sort', 'twig_sort_filter'),\n new Twig_SimpleFilter('merge', 'twig_array_merge'),\n new Twig_SimpleFilter('batch', 'twig_array_batch'),\n // string/array filters\n new Twig_SimpleFilter('reverse', 'twig_reverse_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('length', 'twig_length_filter', array('needs_environment' => true)),\n new Twig_SimpleFilter('slice', 'twig_slice', array('needs_environment' => true)),\n new Twig_SimpleFilter('first', 'twig_first', array('needs_environment' => true)),\n new Twig_SimpleFilter('last', 'twig_last', array('needs_environment' => true)),\n // iteration and runtime\n new Twig_SimpleFilter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')),\n new Twig_SimpleFilter('keys', 'twig_get_array_keys_filter'),\n // escaping\n new Twig_SimpleFilter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),\n new Twig_SimpleFilter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')),\n );\n if (function_exists('mb_get_info')) {\n $filters[] = new Twig_SimpleFilter('upper', 'twig_upper_filter', array('needs_environment' => true));\n $filters[] = new Twig_SimpleFilter('lower', 'twig_lower_filter', array('needs_environment' => true));\n }\n return $filters;\n }", "public function getFilters()\r\n {\r\n\r\n return array(new \\Twig_SimpleFilter('montantTva', array($this, 'montantTva')));\r\n }", "function get_filters($init_data = true) {\n //no filters by default\n return array();\n }", "public function getFilters()\n\t{\n\t\treturn array(\n\t\t\tnew \\Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),\n\t\t\t// @deprecated 3.2.0 Uses twig's JS escape method instead of addslashes\n\t\t\tnew \\Twig_SimpleFilter('addslashes', 'addslashes'),\n\t\t);\n\t}", "public function getFilters()\n {\n return array_filter($this->request->only($this->filters));\n }", "public function getFilterOptions()\n {\n return $this->getOptions()\n ->joinWith(['lang','taxGroup'])\n ->where(['is_filter' => true]);\n }", "public function getFilters() : array\n {\n return $this->getLoader()->getFilters();\n }", "public function getFilters()\n {\n $filters = [];\n\n $filters[] = new \\Twig_Filter('date_format', [$this, 'filterDateFormat']);\n $filters[] = new \\Twig_Filter('truncate', 'b_truncate');\n $filters[] = new \\Twig_Filter('nl2p', 'b_nl2p', ['is_safe' => ['html']]);\n $filters[] = new \\Twig_Filter('human_file_size', 'b_human_file_size');\n $filters[] = new \\Twig_Filter('json_decode', 'json_decode');\n\n return $filters;\n }", "public function addFilters()\n {\n }", "public function getFilters()\n {\n return array(\n 'safe' => new Twig_Filter_Function('twig_safe_filter', array('is_escaper' => true)),\n );\n }", "public function getFilters()\r\n {\r\n return array(\r\n 'localizeddate' => new Twig_Filter_Function('twig_localized_date_filter', array('needs_environment' => true)),\r\n );\r\n }", "public function getFilters(): array\n {\n return $this->request->only($this->filters);\n }" ]
[ "0.72582465", "0.7228641", "0.6834802", "0.6754441", "0.6688583", "0.6633112", "0.66118705", "0.65971446", "0.65966713", "0.65680695", "0.65680695", "0.6555706", "0.65507996", "0.6544781", "0.6539271", "0.6518539", "0.6518539", "0.6518094", "0.64543015", "0.64362013", "0.64213926", "0.64132136", "0.64032835", "0.6392346", "0.6355577", "0.63434315", "0.6330586", "0.63019437", "0.6280536", "0.62744766", "0.62204826", "0.6220467", "0.6213446", "0.62094826", "0.62094826", "0.62094826", "0.62094826", "0.62094826", "0.62094826", "0.62094826", "0.62094826", "0.62094826", "0.6209433", "0.61805147", "0.61586356", "0.6141854", "0.61396253", "0.6121175", "0.61171603", "0.6109068", "0.61042833", "0.6097167", "0.60715634", "0.6069651", "0.60679984", "0.6066836", "0.6059764", "0.6059764", "0.60548365", "0.6050493", "0.60386264", "0.60327995", "0.60276586", "0.6016265", "0.60160863", "0.60155874", "0.6007948", "0.60027033", "0.59943175", "0.5991956", "0.598911", "0.59854114", "0.59802854", "0.5975046", "0.5972881", "0.5967599", "0.59441054", "0.5916391", "0.5916385", "0.5909817", "0.59033376", "0.5890614", "0.5888574", "0.58854043", "0.58854043", "0.5869634", "0.58690786", "0.58638227", "0.5853759", "0.5850425", "0.58485615", "0.5847868", "0.5844599", "0.584118", "0.5839826", "0.5813525", "0.5800576", "0.5798527", "0.57952684", "0.5788797", "0.5779694" ]
0.0
-1
Mongo entity filter submit handler. It is used by the filter buttons in mongo_node_admin_content().
function mongo_node_filters_submit($form, &$form_state) { $entity_type = $form_state['values']['entity_type']; $filters = mongo_node_filters($entity_type); $op = strtolower($form_state['input']['op']); if ($op == 'reset') { // Remove all filters. unset($_SESSION[$entity_type . '_filters']); } elseif ($op == 'undo') { // Remove last filter. array_pop($_SESSION[$entity_type . '_filters']); } else { // Apply filters. foreach ($filters as $f_type => $f_val) { if (!isset($form_state['values'][$f_type]) || $form_state['values'][$f_type] == 'any') { continue; } $filter = $form_state['values'][$f_type]; if (!isset($_SESSION[$entity_type . '_filters'])) { $_SESSION[$entity_type . '_filters'] = array(); } $exists = FALSE; foreach ($_SESSION[$entity_type . '_filters'] as &$app_filter) { if ($app_filter['#type'] == $f_type && $app_filter['#value'] == $filter) { $exists = TRUE; break; } } // Skip filter if already applied. if ($exists) { continue; } // Add filter to session. $_SESSION[$entity_type . '_filters'][] = array( '#type' => $f_type, '#value' => $filter, ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_admin_content($form, $form_state, $entity_type) {\n $settings = mongo_node_settings();\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n );\n\n $filters = mongo_node_filters($entity_type);\n $applied_filters = isset($_SESSION[$entity_type . '_filters']) ? $_SESSION[$entity_type . '_filters'] : array();\n\n foreach ($filters as $f_type_name => $f_type) {\n $form['filters'][$f_type_name] = array('#type' => 'select', '#title' => $f_type_name);\n foreach ($f_type as $f_name => $f_val) {\n $form['filters'][$f_type_name]['#options'][$f_name] = $f_val['label'];\n }\n }\n\n $items = array();\n $remaining_filters = array();\n foreach ($applied_filters as $app_filter) {\n $items[] = t('where %f_name is %f_val', array('%f_name' => $app_filter['#type'], '%f_val' => $app_filter['#value']));\n $conditions = $filters[$app_filter['#type']][$app_filter['#value']]['filters'];\n foreach ($conditions as $condition) {\n $remaining_filters[$condition['#type']]['#callback'] = $condition['#callback'];\n $remaining_filters[$condition['#type']]['#value'][] = $condition['#value'];\n }\n }\n\n $form['filters']['#description'] = theme('item_list', array('items' => $items));\n\n if (empty($applied_filters)) {\n $form['filters']['filter'] = array(\n '#type' => 'submit',\n '#value' => 'Filter',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n else {\n $form['filters']['refine'] = array(\n '#type' => 'submit',\n '#value' => 'Refine',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['undo'] = array(\n '#type' => 'submit',\n '#value' => 'Undo',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => 'Reset',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Update options'),\n );\n\n $operations = mongo_node_operations();\n foreach ($operations as $op => $op_set) {\n $options[$op] = $op_set['label'];\n }\n $form['options']['operation'] = array(\n '#type' => 'select',\n '#options' => $options,\n );\n\n $form['options']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Update'),\n '#validate' => array('mongo_node_operation_validate'),\n '#submit' => array('mongo_node_operation_submit'),\n );\n\n $query = new EntityFieldQuery();\n\n $query->entityCondition('entity_type', $entity_type)\n ->propertyOrderBy('created', 'DESC')\n ->pager(10);\n\n // Actually apply filters.\n foreach ($remaining_filters as $r_name => $r_values) {\n $query->{$r_values['#callback']}($r_name, $r_values['#value'], 'IN');\n }\n\n $result = $query->execute();\n\n $languages = language_list();\n $destination = drupal_get_destination();\n $header = array(\n 'title' => array('data' => t('Title'), 'field' => 'title'),\n 'type' => t('Type'),\n 'author' => t('Author'),\n 'status' => t('Status'),\n 'changed' => t('Updated'),\n 'language' => t('Language'),\n 'operations' => t('Operations'),\n );\n $options = array();\n\n if (isset($result[$entity_type])) {\n $ids = array_keys($result[$entity_type]);\n $entities = entity_load($entity_type, $ids);\n\n foreach ($result[$entity_type] as $id => $efq_entity) {\n $entity = entity_load($entity_type, array($id));\n $entity = reset($entity);\n\n $entity_uri = entity_uri($entity_type, $entity);\n\n $options[$id] = array(\n 'title' => array(\n 'data' => array(\n '#type' => 'link',\n '#title' => $entity->title,\n '#href' => $entity_uri['path'],\n ),\n ),\n 'type' => check_plain($settings[$entity_type]['bundles'][$entity->type]['label']),\n 'author' => theme('username', array('account' => $entity)),\n 'status' => $entity->status ? t('published') : t('not published'),\n 'changed' => format_date($entity->changed, 'short'),\n 'language' => ($entity->language == LANGUAGE_NONE) ? t('Language neutral') : $languages[$entity->language]->name,\n );\n\n $operations = array();\n $operations[] = l(t('edit'), $entity_uri['path'] . '/edit', array('query' => $destination));\n $operations[] = l(t('delete'), $entity_uri['path'] . '/delete', array('query' => $destination));\n\n $options[$id]['operations'] = theme('item_list', array('items' => $operations, 'attributes' => array('class' => 'inline')));\n }\n }\n\n $form['entities'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n '#empty' => t('No content available'),\n );\n\n $form['pager'] = array(\n '#theme' => 'pager',\n );\n\n return $form;\n}", "public function requireFilterSubmit()\n\t{\n\t}", "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n \n if ($this->formFilters)\n {\n foreach ($this->formFilters as $filterKey => $formFilter)\n {\n $operator = isset($this->operators[$filterKey]) ? $this->operators[$filterKey] : 'like';\n $filterField = isset($this->filterFields[$filterKey]) ? $this->filterFields[$filterKey] : $formFilter;\n $filterFunction = isset($this->filterTransformers[$filterKey]) ? $this->filterTransformers[$filterKey] : null;\n \n // check if the user has filled the form\n if (isset($data->{$formFilter}) AND $data->{$formFilter})\n {\n // $this->filterTransformers\n if ($filterFunction)\n {\n $fieldData = $filterFunction($data->{$formFilter});\n }\n else\n {\n $fieldData = $data->{$formFilter};\n }\n \n // creates a filter using what the user has typed\n if (stristr($operator, 'like'))\n {\n $filter = new TFilter($filterField, $operator, \"%{$fieldData}%\");\n }\n else\n {\n $filter = new TFilter($filterField, $operator, $fieldData);\n }\n \n // stores the filter in the session\n TSession::setValue($this->activeRecord.'_filter', $filter); // BC compatibility\n TSession::setValue($this->activeRecord.'_filter_'.$formFilter, $filter);\n TSession::setValue($this->activeRecord.'_'.$formFilter, $data->{$formFilter});\n }\n else\n {\n TSession::setValue($this->activeRecord.'_filter', NULL); // BC compatibility\n TSession::setValue($this->activeRecord.'_filter_'.$formFilter, NULL);\n TSession::setValue($this->activeRecord.'_'.$formFilter, '');\n }\n }\n }\n \n TSession::setValue($this->activeRecord.'_filter_data', $data);\n TSession::setValue(get_class($this).'_filter_data', $data);\n \n // fill the form with data again\n $this->form->setData($data);\n \n $param=array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }", "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->inscricao_evento_id) AND ( (is_scalar($data->inscricao_evento_id) AND $data->inscricao_evento_id !== '') OR (is_array($data->inscricao_evento_id) AND (!empty($data->inscricao_evento_id)) )) )\n {\n\n $filters[] = new TFilter('inscricao_id', 'in', \"(SELECT id FROM inscricao WHERE evento_id = '{$data->inscricao_evento_id}')\");// create the filter \n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n }", "public function submit()\n {\n $this->find('css', '.filter-update')->click();\n }", "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->exemplar_id) AND ( (is_scalar($data->exemplar_id) AND $data->exemplar_id !== '') OR (is_array($data->exemplar_id) AND (!empty($data->exemplar_id)) )) )\n {\n\n $filters[] = new TFilter('exemplar_id', '=', $data->exemplar_id);// create the filter \n }\n\n if (isset($data->leitor_id) AND ( (is_scalar($data->leitor_id) AND $data->leitor_id !== '') OR (is_array($data->leitor_id) AND (!empty($data->leitor_id)) )) )\n {\n\n $filters[] = new TFilter('leitor_id', '=', $data->leitor_id);// create the filter \n }\n\n if (isset($data->dt_emprestimo) AND ( (is_scalar($data->dt_emprestimo) AND $data->dt_emprestimo !== '') OR (is_array($data->dt_emprestimo) AND (!empty($data->dt_emprestimo)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '>=', $data->dt_emprestimo);// create the filter \n }\n\n if (isset($data->dt_emprestimo_final) AND ( (is_scalar($data->dt_emprestimo_final) AND $data->dt_emprestimo_final !== '') OR (is_array($data->dt_emprestimo_final) AND (!empty($data->dt_emprestimo_final)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '<=', $data->dt_emprestimo_final);// create the filter \n }\n\n if (isset($data->dt_previsao) AND ( (is_scalar($data->dt_previsao) AND $data->dt_previsao !== '') OR (is_array($data->dt_previsao) AND (!empty($data->dt_previsao)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '>=', $data->dt_previsao);// create the filter \n }\n\n if (isset($data->dt_prevista_final) AND ( (is_scalar($data->dt_prevista_final) AND $data->dt_prevista_final !== '') OR (is_array($data->dt_prevista_final) AND (!empty($data->dt_prevista_final)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '<=', $data->dt_prevista_final);// create the filter \n }\n\n if (isset($data->dt_devolucao) AND ( (is_scalar($data->dt_devolucao) AND $data->dt_devolucao !== '') OR (is_array($data->dt_devolucao) AND (!empty($data->dt_devolucao)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '>=', $data->dt_devolucao);// create the filter \n }\n\n if (isset($data->dt_devolucao_final) AND ( (is_scalar($data->dt_devolucao_final) AND $data->dt_devolucao_final !== '') OR (is_array($data->dt_devolucao_final) AND (!empty($data->dt_devolucao_final)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '<=', $data->dt_devolucao_final);// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n $this->onReload($param);\n }", "public function filter() {\r\n\t\t$this->resource->filter();\r\n\t}", "public function _post_filter()\n {\n }", "function mongo_node_operation_submit($form, &$form_state) {\n $operations = mongo_node_operations();\n $operation = $operations[$form_state['values']['operation']];\n\n $entities = array_filter($form_state['values']['entities']);\n $entity_type = $form_state['values']['entity_type'];\n if ($function = $operation['callback']) {\n // Add in callback arguments if present.\n if (isset($operation['callback arguments'])) {\n $args = array(\n $entity_type,\n $entities,\n $operation['callback arguments'],\n );\n }\n else {\n $args = array($entity_type, $entities);\n }\n call_user_func_array($function, $args);\n cache_clear_all();\n }\n}", "function simplenews_issue_filter_form_submit($form, &$form_state) {\n switch ($form_state['values']['op']) {\n case t('Filter'):\n $_SESSION['simplenews_issue_filter'] = array(\n 'newsletter' => $form_state['values']['newsletter'],\n );\n break;\n case t('Reset'):\n $_SESSION['simplenews_issue_filter'] = _simplenews_issue_filter_default();\n break;\n }\n}", "public function addFilterFormInput(): void;", "public function processFilter()\n {\n call_user_func($this->builder, $this);\n\n return $this->filter->execute();\n }", "public function action_filter()\n\t{\n\t\tif (Input::post()){\n\t\t\tif (Input::post('filter')){\n\n\t\t\t\trequire APPPATH.'likestv.php';\n\n\t\t\t\ttry {\n\n\t\t\t\t// Retrieve profile information since user is logged in\n\t\t\t\t\t$user_profile = $facebook->api('/me');\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t} catch (FacebookApiException $e) {\n\n\t\t\t\t error_log($e);\n\t\t\t\t $user = null;\n\n\t\t\t\t}\n\t\t\t\t$addfilter = Input::post('filter');\n\n\t\t\t\t// Creates database entry to be added to the database\n\t\t\t\t$preference = Model_Preference::forge(array(\n\t\t\t\t\t'username' => $user_profile[\"username\"],\n\t\t\t\t\t'filter' => $addfilter,\n\t\t\t\t));\n\t\t\t\t$preference and $preference->save();\n\t\t\t\t$this->template->title = 'Channel Filter';\n\t\t\t\t$this->template->content = View::forge('channels/filter');\n\t\t\t\tResponse::redirect('channels/');\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t// Filter redirects to channels if there is no post\n\t\t\tResponse::redirect('channels/');\n\t\t}\n\t}", "private function filters() {\n\n\n\t}", "public function indexForFilter(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $query = $this->{$this->main_model}->find();\n $this->CommonQuery->build_common_query($query,$user,[]); \n $q_r = $query->all();\n $items = array();\n foreach($q_r as $i){\n array_push($items,array(\n 'id' => $i->id, \n 'text' => $i->name\n ));\n } \n\n $this->set(array(\n 'items' => $items,\n 'success' => true,\n '_serialize' => array('items','success')\n ));\n }", "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new ProductFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('NiftyThriftyShopBundle:Product')->createQueryBuilder('e')->orderBy('e.productId', 'DESC');\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('ProductControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('ProductControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('ProductControllerFilter')) {\n $filterData = $session->get('ProductControllerFilter');\n $filterForm = $this->createForm(new ProductFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n if (count($data->relatorio_id) == 0)\n { \n TTransaction::open('bedevops');\n $conn = TTransaction::get();\n $result = $conn->query('SELECT * FROM relatorio WHERE user_id = '.TSession::getValue(\"userid\").' ORDER BY id DESC LIMIT 4');\n $objects = $result->fetchAll(PDO::FETCH_CLASS, \"stdClass\");\n foreach ($objects as $value) {\n array_push($data->relatorio_id,$value->id);\n }\n TTransaction::close();\n } \n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->categoria_id) AND ( (is_scalar($data->categoria_id) AND $data->categoria_id !== '') OR (is_array($data->categoria_id) AND (!empty($data->categoria_id)) )) )\n {\n\n $filters[] = new TFilter('categoria_id', '=', $data->categoria_id);// create the filter \n }\n\n if (count($data->relatorio_id) <= 4)\n {\n if (isset($data->relatorio_id) AND ( (is_scalar($data->relatorio_id) AND $data->relatorio_id !== '') OR (is_array($data->relatorio_id) AND (!empty($data->relatorio_id)) )) )\n {\n\n $filters[] = new TFilter('relatorio_id', 'in', $data->relatorio_id);// create the filter \n }\n } else {\n throw new Exception('Selecione no máximo 4 relatórios!');\n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n }", "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new RemitovolvoFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('SistemaAdminBundle:Remitovolvo')->createQueryBuilder('e');\n \n // Reset filter\n if ($request->getMethod() == 'POST' && $request->get('filter_action') == 'reset') {\n $session->remove('RemitovolvoControllerFilter');\n }\n \n // Filter action\n if ($request->getMethod() == 'POST' && $request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('RemitovolvoControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('RemitovolvoControllerFilter')) {\n $filterData = $session->get('RemitovolvoControllerFilter');\n $filterForm = $this->createForm(new RemitovolvoFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n \n return array($filterForm, $queryBuilder);\n }", "function path_admin_filter_form_submit_filter($form, &$form_state) {\n $form_state['redirect'] = 'admin/build/path/list/'. trim($form_state['values']['filter']);\n}", "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new EventDateFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('AtkRegistrationBundle:EventDate')->createQueryBuilder('e');\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('EventDateControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('EventDateControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('EventDateControllerFilter')) {\n $filterData = $session->get('EventDateControllerFilter');\n $filterForm = $this->createForm(new EventDateFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "private function processSearchForm($filter)\t{\n\t\ttrace('[CMD] '.__METHOD__);\n\n\t\t$formname = 'SearchForm';\n\t\t$choicesArray = array();\n\t\t$disableArray = array();\n\t\t$hideArray = array();\n\n\t\t$failArray = $this->formHandler->fillFormIntoObject($formname, $filter, $choicesArray, $disableArray, $hideArray);\n\t\t// check for failures\n\t\t$msgArray = array();\n\t\tforeach ($failArray as $item) {\n\t\t\t$msgArray[] = $item.' failed';\n\t\t}\n\n\t\t// HOOK: allow multiple hooks to evaluate piVars and manipulate msgArray\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['pt_gsauserreg']['pi5_hooks']['processSearchFormHook'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['pt_gsauserreg']['pi5_hooks']['processSearchFormHook'] as $className) {\n\t\t\t\t$hookObj = &t3lib_div::getUserObj($className);\n\t\t\t\t$msgArray = $hookObj->processSearchFormHook($this, $msgArray, $this->piVars);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->formHandler->checkObjectInForm($formname, $filter, $msgArray, $hideArray);\n\t}", "function mongo_node_filters($entity_type) {\n $filters = array(\n 'status' => array(\n 'any' => array(\n 'label' => 'Any',\n ),\n 'published' => array(\n 'label' => 'Published',\n 'filters' => array(\n array(\n '#type' => 'status',\n '#value' => 1,\n '#callback' => 'propertyCondition',\n ),\n ),\n ),\n 'not_published' => array(\n 'label' => 'Not published',\n 'filters' => array(\n array(\n '#type' => 'status',\n '#value' => 0,\n '#callback' => 'propertyCondition',\n ),\n ),\n ),\n ),\n 'type' => array(\n 'any' => array(\n 'label' => 'Any',\n ),\n ),\n );\n\n $set = mongo_node_settings();\n $bundles = $set[$entity_type]['bundles'];\n foreach ($bundles as $bundle_name => $bundle_settings) {\n $filters['type'][$bundle_name] = array(\n 'label' => $bundle_settings['label'],\n 'filters' => array(\n array(\n '#type' => 'bundle',\n '#value' => $bundle_name,\n '#callback' => 'entityCondition',\n ),\n ),\n );\n }\n return $filters;\n}", "public function global_filter_field_expr()\n {\n\n // filtering $_GET\n if (is_array(ctx()->getRequest()->get()) && ! empty(ctx()->getRequest()->get()))\n {\n foreach (ctx()->getRequest()->get() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->get($key, $this->_clean_input_field_expr($val));\n }\n }\n\n }\n\n // filtering $_POST\n if (is_array(ctx()->getRequest()->post()) && ! empty(ctx()->getRequest()->post()))\n {\n foreach (ctx()->getRequest()->post() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->post($key, $this->_clean_input_field_expr($val));\n }\n }\n }\n\n // filtering $_COOKIE\n if (is_array(ctx()->getRequest()->cookie()) && ! empty(ctx()->getRequest()->cookie()))\n {\n foreach (ctx()->getRequest()->cookie() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->cookie($key, $this->_clean_input_field_expr($val));\n }\n\n }\n }\n\n\n // filtering $_REQUEST\n if (is_array(ctx()->getRequest()->request()) && ! empty(ctx()->getRequest()->request()))\n {\n foreach (ctx()->getRequest()->request() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->request($key, $this->_clean_input_field_expr($val));\n }\n }\n }\n\n }", "public function filterAction()\r\n {\r\n \t/*\r\n \t * form needs to include:\r\n \t * \r\n \t * user id\r\n \t * task category\r\n \t * client id\r\n \t * project id\r\n \t * start date\r\n \t * end date\r\n \t */\r\n $this->view->allUsers = $this->userService->getUserList();\r\n $task = new Task();\r\n $this->view->categories = $task->constraints['category']->getValues();\r\n $this->view->clients = $this->clientService->getClients();\r\n \t $this->view->projects = new ArrayObject();\r\n $this->renderView('timesheet/filter.php'); \t\r\n }", "function dblog_filter_form_submit($form, &$form_state) {\n $op = $form_state['values']['op'];\n $filters = dblog_filters();\n switch ($op) {\n case t('Filter'):\n foreach ($filters as $name => $filter) {\n if (isset($form_state['values'][$name])) {\n $_SESSION['dblog_overview_filter'][$name] = $form_state['values'][$name];\n }\n }\n break;\n case t('Reset'):\n $_SESSION['dblog_overview_filter'] = array();\n break;\n }\n return 'admin/reports/dblog';\n}", "public function filterAction()\n\t{\n\t\t$userSession = new Container('fo_user');\n\t\t$this->layout('frontend');\n\t\t$request \t\t= $this->getRequest();\n\t\t$message\t\t= '';\n\t\t$errorMessage\t= '';\n\t\t\n\t\t//\tDestroy listing Session Vars\n\t\t$listingSession = new Container('fo_listing');\n\t\t/*\t$sessionArray\t= array();\n\t\tforeach($listingSession->getIterator() as $key => $value) {\n\t\t\t$sessionArray[]\t= $key;\n\t\t}\n\t\tforeach($sessionArray as $key => $value) {\n\t\t\t$listingSession->offsetUnset($value);\n\t\t}\t*/\n\t\t\n\t\tif ($request->isPost()) {\n\t\t\t$formData\t= $request->getPost();\n\t\t\t\n\t\t\tif(isset($formData['search'])) {\n\t\t\t\t//\tKeyword\n\t\t\t\tif($formData['search'] != '')\n\t\t\t\t\t$listingSession->keyword\t= $formData['search'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->keyword\t= '';\n\t\t\t\t\n\t\t\t\t//\tTrack Search Keyword Query\n\t\t\t\t$this->insertSearchQuery($listingSession->keyword);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t//\tCategory\n\t\t\t\tif(isset($formData['category']) && $formData['category'] != '')\n\t\t\t\t\t$listingSession->category\t= $formData['category'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->category\t= '';\n\t\t\t\t//\tRanking\n\t\t\t\tif(isset($formData['ranking']) && $formData['ranking'] != '')\n\t\t\t\t\t$listingSession->ranking\t= $formData['ranking'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->ranking\t= '';\n\t\t\t\t//\tLength\n\t\t\t\tif(isset($formData['length']) && $formData['length'] != '')\n\t\t\t\t\t$listingSession->length\t= $formData['length'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->length\t= '';\n\t\t\t\t//\tFriend\n\t\t\t\tif(isset($formData['friend']) && $formData['friend'] != '')\n\t\t\t\t\t$listingSession->friend\t= $formData['friend'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->friend\t= '';\n\t\t\t\t//\tSeen\n\t\t\t\tif(isset($formData['seen']) && $formData['seen'] != '')\n\t\t\t\t\t$listingSession->seen\t= $formData['seen'];\n\t\t\t\telse\n\t\t\t\t\t$listingSession->seen\t= '';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new ViewModel(array(\n\t\t\t'userObject'\t=> $userSession->userSession,\n\t\t\t'message'\t\t=> $message,\n\t\t\t'errorMessage'\t=> $errorMessage,\n\t\t\t'action'\t\t=> $this->params('action'),\n\t\t\t'controller'\t=> $this->params('controller'),\n\t\t));\n }", "public function onFilterArticle(\\Enlight_Event_EventArgs $args)\n {\n $subject = $args->getSubject();\n $filterBy = $subject->Request()->getParam('filterBy');\n\n list($sqlParams, $filterSql, $categorySql, $imageSQL, $order) = $args->getReturn();\n\n if ($filterBy === 'connect') {\n $imageSQL = '\n LEFT JOIN s_plugin_connect_items as connect_items\n ON connect_items.article_id = articles.id\n ';\n\n $filterSql .= ' AND connect_items.shop_id > 0 ';\n }\n\n return [$sqlParams, $filterSql, $categorySql, $imageSQL, $order];\n }", "function getFilters() {\r\n global $filterList;\r\n foreach ($filterList as $filter) {\r\n echo getSelectionOptions($filter);\r\n }\r\n echo '<button type=\"submit\" value=\"submit\">Save Filters</button>';\r\n }", "function mutate($filter,$field=[],$type=null)\n\t{\n\t\tif(count($filter)>0)\n\t\t{\n\t\t\tif($type==null)\n\t\t\t{\n\t\t\t\t$this->{$this->model}->mutate($filter,$field);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->{$this->model}->$type($filter,$field);\t\n\t\t\t}\n\t\t\t$this->json($this->post->success_mutation());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->json($this->post->fail());\n\t\t}\n\t}", "public function afterFilter()\n\t{\n\n\t}", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "public function postIndex()\n {\n $request = request()->except('_token');\n\n $validator = Validator::make($request,\n [\n 'filters.index' => 'required',\n 'filters.type' => 'required',\n ]);\n\n if ($validator->fails()) {\n return back()->with('error_message', 'Spiacenti, dovete selezionare almeno un indice ed una tipologia sulla quale effettuare l\\'operazione');\n }\n\n $index = trim($request['filters']['index']);\n $type = trim($request['filters']['type']);\n\n\n if ((!request()->has('id')) AND (request()->has('operation') AND request()->get('operation') !== \"create\")) {\n\n $page =1;\n if(request()->has('pagehit')) $page = (request()->input('pagehit') / (config('elasticquent.max_result','20')));\n\n\n $model = new GenericEntity($type, $index);\n\n $input = ['metadata'=>[]];\n if(request()->has('metadata'))$input = request()->only('metadata');\n\n\n try {\n\n $purgedInput = array_map('array_filter', $input);\n\n $results = $model->get($purgedInput['metadata'], [], $page);\n } catch (CouldNotConnectToHost $e) {\n return back()->with('error_message', 'Spiacenti, il servizio non è disponibile');\n } catch (EntityNotFoundException $e) {\n return back()->with('error_message', 'Spiacenti, nessun risultato trovato');\n }\n\n\n $finalResults = [];\n $element = [];\n $tableHead = ['id'];\n\n foreach ($results['hits']['hits'] as $result) {\n $finalResult = $result['_source'];\n foreach ($finalResult as $key => $item) {\n\n\n $element[$key] = $item;\n if (!in_array($key, $tableHead) and !is_array($item) and !(strpos($key, 'id'))) $tableHead[] = $key;\n\n }\n $element['id'] = $result['_id'];\n $finalResults[] = $element;\n }\n\n\n\n return view('admin.manage_entity.global_search', [\n 'indices' => $indices = $this->client->indices()->getMapping(),\n 'filters' => $request['filters'],\n 'results' => $finalResults,\n 'hits' => $results['hits']['total'],\n 'pagehit' => $page,\n 'tableHead' => $tableHead,\n 'type' => $type\n ]);\n\n } elseif (request()->has('operation') AND request()->get('operation') !== \"create\") {\n\n if (request()->has('id')) {\n if (request()->has('operation') AND request()->get('operation') === \"edit\") {\n return redirect()->to('/entity/edit/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n }\n if (request()->has('operation') AND request()->get('operation') === \"delete\") {\n return redirect()->to('/entity/delete/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n } else return redirect()->to('/entity/show/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n }\n } else {\n return redirect()->to('/entity/create/' . $index . '/' . $type);\n }\n }", "public function actionShowDataPost()\n {\n if (Yii::$app->request->post('filter') && Yii::$app->request->getIsAjax()) {\n $parameters = unserialize(trim(base64_decode(\n Yii::$app->getSecurity()->decryptByKey(\n $this->module->session['SimpleFilter'],\n Yii::$app->request->cookieValidationKey\n )\n )));\n\n $filterData = new FilterDataPostRequest([\n 'filter' => json_decode(Yii::$app->request->post('filter'), true),\n 'model' => $parameters['model'],\n 'query' => $parameters['query'],\n 'useCache' => $parameters['useCache'],\n 'useDataProvider' => $parameters['useDataProvider'],\n ]);\n $data = $filterData->getData();\n\n //set dynamic route for this action and dataProvider urls\n $this->setRoute($parameters['controllerRoute'], 'post', $data, $parameters['useDataProvider']);\n\n $ajaxViewParams = $parameters['ajaxViewParams'];\n $ajaxViewParams['simpleFilterData'] = $data;\n\n return $this->renderPartial('filter-data-wrapper', [\n 'viewFile' => $parameters['ajaxViewFile'], 'viewParams' => $ajaxViewParams\n ]);\n } else {\n throw new NotFoundHttpException(\"Page not found.\", 1);\n }\n }", "public function searchByFilter($filter)\n {\n }", "function __MB_TASKS_LIST_GetFilterEntities()\n{\n\t$oFieldOriginator = new CTaskFilterEntityUser(\n\t\t'TASKS_FILTER_BUILDER_PRESET_ORIGINATOR_NAME',\n\t\t'CREATED_BY'\n\t);\n\n\t$oFieldResponsible = new CTaskFilterEntityUser(\n\t\t'TASKS_FILTER_BUILDER_PRESET_RESPONSIBLE_NAME',\n\t\t'RESPONSIBLE_ID'\n\t);\n\n\t$oFieldCloser = new CTaskFilterEntityUser(\n\t\t'TASKS_FILTER_BUILDER_PRESET_CLOSER_NAME',\n\t\t'CLOSED_BY'\n\t);\n\n\t$oFieldPriority = new CTaskFilterEntity(\n\t\t'TASKS_FILTER_BUILDER_PRESET_PRIORITY_NAME',\n\t\t'PRIORITY',\n\t\tarray(\n\t\t\tarray(\n\t\t\t\t'name' => 'TASKS_FILTER_BUILDER_PRESET_PRIORITY_LOW',\n\t\t\t\t'value' => 0\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'TASKS_FILTER_BUILDER_PRESET_PRIORITY_MIDDLE',\n\t\t\t\t'value' => 1\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'TASKS_FILTER_BUILDER_PRESET_PRIORITY_HIGH',\n\t\t\t\t'value' => 2\n\t\t\t)\n\t\t)\n\t);\n\n\t$oFieldStatus = new CTaskFilterEntity(\n\t\t'TASKS_FILTER_BUILDER_PRESET_STATUS_NAME',\n\t\t'STATUS',\n\t\tarray(\n\t\t\tarray(\n\t\t\t\t'name' => 'TASKS_FILTER_BUILDER_PRESET_STATUS_ACTIVE',\n\t\t\t\t'value' => array(\n\t\t\t\t\tCTasks::METASTATE_VIRGIN_NEW,\n\t\t\t\t\tCTasks::METASTATE_EXPIRED,\n\t\t\t\t\tCTasks::STATE_NEW,\n\t\t\t\t\tCTasks::STATE_PENDING,\n\t\t\t\t\tCTasks::STATE_IN_PROGRESS,\n\t\t\t\t\tCTasks::STATE_DECLINED\n\t\t\t\t)\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'TASKS_FILTER_BUILDER_PRESET_STATUS_DEFERRED',\n\t\t\t\t'value' => CTasks::STATE_DEFERRED\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'TASKS_FILTER_BUILDER_PRESET_STATUS_DECLINED',\n\t\t\t\t'value' => CTasks::STATE_DECLINED\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'TASKS_FILTER_BUILDER_PRESET_STATUS_EXPIRED',\n\t\t\t\t'value' => CTasks::METASTATE_EXPIRED\n\t\t\t)\n\t\t)\n\t);\n\n\t$arFilterEntities = array(\n\t\t$oFieldOriginator,\n\t\t$oFieldResponsible,\n\t\t$oFieldCloser,\n\t\t$oFieldPriority,\n\t\t$oFieldStatus\n\t);\n\n\treturn ($arFilterEntities);\n}", "function getSubmissionFilter() {\n\t\treturn null;\n\t}", "public function handleFilters()\n\t{\n\t\t$profile = $this->profile;\n\n\t\t$data = Input::get('filteroption');\n\t\tforeach($data as &$value)\n\t\t{\n\t\t\t$value = (array) $value;\n\t\t}\n\n\t\t$this->profileService->syncProfileProperties($profile, $data);\n\n\t\treturn Redirect::action('datacollector.controller@index');\n\t}", "public function onKernelRequest(): void\n {\n $user = $this->em->getRepository(User::class)->findOneBy(['username' => 'jane.doe']);\n $filter = $this->em->getFilters()->enable('user_filter');\n $filter->setParameter('id', $user->getId());\n }", "public function execute()\n {\n /** @var \\Unit4\\Retailer\\Model\\ResourceModel\\Retailer\\Collection $collection */\n $collection = $this->collectionFactory->create();\n// $collection->addFieldToFilter('region_id',['eq'=>2]);\n $collection->addFilterByProduct(3);\n \\Zend_Debug::dump($collection->getData());\n\n }", "function postFilter($request){\r\n global $context;\r\n $i= new $this->model;\r\n\r\n if(!$this->authRequired){\r\n $i->supperUser();\r\n }\r\n\r\n foreach($request->post as $key=>$value){\r\n if($i->field_exists($key)){\r\n $i->where($key,$value);\r\n }\r\n }\r\n\r\n $data=$i->get();\r\n\r\n if($request->UseApi() ){\r\n json_success(\"Success\",$data);//where(['id','<','50'])->orderBy('id','desc')->limit(2,1)->\r\n }else{\r\n return $this->view(compact('data'));\r\n }\r\n }", "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new ChoferFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('ChoferesBundle:Chofer')\n ->createQueryBuilder('e')\n ->andWhere('e.estaActivo = TRUE');\n\n // Reset filter\n $session->remove('ChoferControllerFilter');\n\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('ChoferControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('ChoferControllerFilter')) {\n $filterData = $session->get('ChoferControllerFilter');\n $filterForm = $this->createForm(new ChoferFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( ProductsAttributes::grid() )->search ();\n\t}", "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new ObraFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('AcmeReservasBundle:Obra')->createQueryBuilder('e');\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('ObraControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('ObraControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('ObraControllerFilter')) {\n $filterData = $session->get('ObraControllerFilter');\n $filterForm = $this->createForm(new ObraFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "public function onFilter()\n {\n // $this->currentPageNumber = 1;\n return $this->onRefresh();\n }", "public function actionSetFilter()\n {\n $filter = $this->module->filter;\n\n //make css class for checkbox\n foreach ($filter as $key => $property) {\n if (isset($property['class'])) {\n if (is_array($property['class'])) {\n $filter[$key]['class'] = implode(' ', $property['class']);\n }\n } else {\n $filter[$key]['class'] = '';\n }\n }\n\n //set value for js ajax variable\n $useAjax = $this->module->useAjax ? 'true' : 'false';\n\n return $this->renderPartial('filter-list', ['filter' => $filter, 'useAjax' => $useAjax]);\n }", "public function filterEntity(object $object): void\n {\n $this->filterExecutor->filterEntity($object);\n }", "function cera_grimlock_search_post() {\n\t\tdo_action( 'grimlock_search_post' );\n\t}", "public function filter() {\n\t $this->model->filter(array(\"status\"=>array(0,1)));\n\t if(Request::post(\"section\")){\n\t $section = new CmsSection(Request::post(\"section\"));\n\t foreach($section->tree() as $section) $section_ids[] = $section->primval;\n\t $this->model->filter(array(\"cms_section_id\"=>$section_ids));\n }\n\t parent::filter();\n\t}", "function after_filter($action, $args) {\n }", "public function global_filtering()\n {\n // filtering $_GET\n if (is_array(ctx()->getRequest()->get()) && ! empty(ctx()->getRequest()->get()))\n {\n foreach (ctx()->getRequest()->get() as $key => $val)\n ctx()->getRequest()->get($this->_clean_input_keys($key) , $this->_clean_input_data($val));\n }\n\n // filtering $_POST\n if (is_array(ctx()->getRequest()->post()) && ! empty(ctx()->getRequest()->post()))\n {\n foreach (ctx()->getRequest()->post() as $key => $val){\n ctx()->getRequest()->post($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n }\n\n\n // filtering $_COOKIE\n if (is_array(ctx()->getRequest()->cookie()) && ! empty(ctx()->getRequest()->cookie()))\n {\n foreach (ctx()->getRequest()->cookie() as $key => $val)\n ctx()->getRequest()->cookie($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n\n // filtering $_REQUEST\n if (is_array(ctx()->getRequest()->request()) && ! empty(ctx()->getRequest()->request()))\n {\n foreach (ctx()->getRequest()->request() as $key => $val){\n ctx()->getRequest()->request($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n }\n }", "public function filter(Request $request)\n {\n $data['status'] = $request->query('status');\n $data['validated'] = $request->query('validated');\n return $this->legalEntityRepository->getAllEntities($data);\n \n }", "function edit() {\n $this->wireframe->print_button = false;\n \n \tif($this->active_filter->isNew()) {\n \t $this->httpError(HTTP_ERR_NOT_FOUND);\n \t} // if\n \t\n \tif(!$this->active_filter->canEdit($this->logged_user)) {\n \t $this->httpError(HTTP_ERR_FORBIDDEN);\n \t} // if\n \t\n \t$filter_data = $this->request->post('filter');\n \tif(!is_array($filter_data)) {\n \t $filter_data = array(\n \t 'name' => $this->active_filter->getName(),\n \t 'group_name' => $this->active_filter->getGroupName(),\n \t 'is_private' => $this->active_filter->getIsPrivate(),\n \t 'user_filter' => $this->active_filter->getUserFilter(),\n \t 'user_filter_data' => $this->active_filter->getUserFilterData(),\n \t 'date_filter' => $this->active_filter->getDateFilter(),\n \t 'date_from' => $this->active_filter->getDateFrom(),\n \t 'date_to' => $this->active_filter->getDateTo(),\n \t 'status_filter' => $this->active_filter->getStatusFilter(),\n \t 'project_filter' => $this->active_filter->getProjectFilter(),\n \t 'project_filter_data' => $this->active_filter->getProjectFilterData(),\n \t 'order_by' => $this->active_filter->getOrderBy(),\n \t 'objects_per_page' => $this->active_filter->getObjectsPerPage(),\n \t );\n \t} // if\n \t\n \t$this->smarty->assign('filter_data', $filter_data);\n \t\n \tif($this->request->isSubmitted()) {\n \t $old_name = $this->active_filter->getName();\n \t \n \t $this->active_filter->setAttributes($filter_data);\n \t \n \t $save = $this->active_filter->save();\n \t if($save && !is_error($save)) {\n \t flash_success(\"Filter ':name' has been updated\", array('name' => $old_name));\n \t $this->redirectToUrl($this->active_filter->getUrl());\n \t } else {\n \t $this->smarty->assign('errors', $save);\n \t } // if\n \t} // if\n }", "function RestoreFilterList() {\n\n\t\t// Return if not reset filter\n\t\tif (@$_POST[\"cmd\"] <> \"resetfilter\")\n\t\t\treturn FALSE;\n\t\t$filter = json_decode(ew_StripSlashes(@$_POST[\"filter\"]), TRUE);\n\t\t$this->Command = \"search\";\n\n\t\t// Field id\n\t\t$this->id->AdvancedSearch->SearchValue = @$filter[\"x_id\"];\n\t\t$this->id->AdvancedSearch->SearchOperator = @$filter[\"z_id\"];\n\t\t$this->id->AdvancedSearch->SearchCondition = @$filter[\"v_id\"];\n\t\t$this->id->AdvancedSearch->SearchValue2 = @$filter[\"y_id\"];\n\t\t$this->id->AdvancedSearch->SearchOperator2 = @$filter[\"w_id\"];\n\t\t$this->id->AdvancedSearch->Save();\n\n\t\t// Field name\n\t\t$this->name->AdvancedSearch->SearchValue = @$filter[\"x_name\"];\n\t\t$this->name->AdvancedSearch->SearchOperator = @$filter[\"z_name\"];\n\t\t$this->name->AdvancedSearch->SearchCondition = @$filter[\"v_name\"];\n\t\t$this->name->AdvancedSearch->SearchValue2 = @$filter[\"y_name\"];\n\t\t$this->name->AdvancedSearch->SearchOperator2 = @$filter[\"w_name\"];\n\t\t$this->name->AdvancedSearch->Save();\n\n\t\t// Field email\n\t\t$this->_email->AdvancedSearch->SearchValue = @$filter[\"x__email\"];\n\t\t$this->_email->AdvancedSearch->SearchOperator = @$filter[\"z__email\"];\n\t\t$this->_email->AdvancedSearch->SearchCondition = @$filter[\"v__email\"];\n\t\t$this->_email->AdvancedSearch->SearchValue2 = @$filter[\"y__email\"];\n\t\t$this->_email->AdvancedSearch->SearchOperator2 = @$filter[\"w__email\"];\n\t\t$this->_email->AdvancedSearch->Save();\n\n\t\t// Field companyname\n\t\t$this->companyname->AdvancedSearch->SearchValue = @$filter[\"x_companyname\"];\n\t\t$this->companyname->AdvancedSearch->SearchOperator = @$filter[\"z_companyname\"];\n\t\t$this->companyname->AdvancedSearch->SearchCondition = @$filter[\"v_companyname\"];\n\t\t$this->companyname->AdvancedSearch->SearchValue2 = @$filter[\"y_companyname\"];\n\t\t$this->companyname->AdvancedSearch->SearchOperator2 = @$filter[\"w_companyname\"];\n\t\t$this->companyname->AdvancedSearch->Save();\n\n\t\t// Field servicetime\n\t\t$this->servicetime->AdvancedSearch->SearchValue = @$filter[\"x_servicetime\"];\n\t\t$this->servicetime->AdvancedSearch->SearchOperator = @$filter[\"z_servicetime\"];\n\t\t$this->servicetime->AdvancedSearch->SearchCondition = @$filter[\"v_servicetime\"];\n\t\t$this->servicetime->AdvancedSearch->SearchValue2 = @$filter[\"y_servicetime\"];\n\t\t$this->servicetime->AdvancedSearch->SearchOperator2 = @$filter[\"w_servicetime\"];\n\t\t$this->servicetime->AdvancedSearch->Save();\n\n\t\t// Field country\n\t\t$this->country->AdvancedSearch->SearchValue = @$filter[\"x_country\"];\n\t\t$this->country->AdvancedSearch->SearchOperator = @$filter[\"z_country\"];\n\t\t$this->country->AdvancedSearch->SearchCondition = @$filter[\"v_country\"];\n\t\t$this->country->AdvancedSearch->SearchValue2 = @$filter[\"y_country\"];\n\t\t$this->country->AdvancedSearch->SearchOperator2 = @$filter[\"w_country\"];\n\t\t$this->country->AdvancedSearch->Save();\n\n\t\t// Field phone\n\t\t$this->phone->AdvancedSearch->SearchValue = @$filter[\"x_phone\"];\n\t\t$this->phone->AdvancedSearch->SearchOperator = @$filter[\"z_phone\"];\n\t\t$this->phone->AdvancedSearch->SearchCondition = @$filter[\"v_phone\"];\n\t\t$this->phone->AdvancedSearch->SearchValue2 = @$filter[\"y_phone\"];\n\t\t$this->phone->AdvancedSearch->SearchOperator2 = @$filter[\"w_phone\"];\n\t\t$this->phone->AdvancedSearch->Save();\n\n\t\t// Field skype\n\t\t$this->skype->AdvancedSearch->SearchValue = @$filter[\"x_skype\"];\n\t\t$this->skype->AdvancedSearch->SearchOperator = @$filter[\"z_skype\"];\n\t\t$this->skype->AdvancedSearch->SearchCondition = @$filter[\"v_skype\"];\n\t\t$this->skype->AdvancedSearch->SearchValue2 = @$filter[\"y_skype\"];\n\t\t$this->skype->AdvancedSearch->SearchOperator2 = @$filter[\"w_skype\"];\n\t\t$this->skype->AdvancedSearch->Save();\n\n\t\t// Field website\n\t\t$this->website->AdvancedSearch->SearchValue = @$filter[\"x_website\"];\n\t\t$this->website->AdvancedSearch->SearchOperator = @$filter[\"z_website\"];\n\t\t$this->website->AdvancedSearch->SearchCondition = @$filter[\"v_website\"];\n\t\t$this->website->AdvancedSearch->SearchValue2 = @$filter[\"y_website\"];\n\t\t$this->website->AdvancedSearch->SearchOperator2 = @$filter[\"w_website\"];\n\t\t$this->website->AdvancedSearch->Save();\n\n\t\t// Field linkedin\n\t\t$this->linkedin->AdvancedSearch->SearchValue = @$filter[\"x_linkedin\"];\n\t\t$this->linkedin->AdvancedSearch->SearchOperator = @$filter[\"z_linkedin\"];\n\t\t$this->linkedin->AdvancedSearch->SearchCondition = @$filter[\"v_linkedin\"];\n\t\t$this->linkedin->AdvancedSearch->SearchValue2 = @$filter[\"y_linkedin\"];\n\t\t$this->linkedin->AdvancedSearch->SearchOperator2 = @$filter[\"w_linkedin\"];\n\t\t$this->linkedin->AdvancedSearch->Save();\n\n\t\t// Field facebook\n\t\t$this->facebook->AdvancedSearch->SearchValue = @$filter[\"x_facebook\"];\n\t\t$this->facebook->AdvancedSearch->SearchOperator = @$filter[\"z_facebook\"];\n\t\t$this->facebook->AdvancedSearch->SearchCondition = @$filter[\"v_facebook\"];\n\t\t$this->facebook->AdvancedSearch->SearchValue2 = @$filter[\"y_facebook\"];\n\t\t$this->facebook->AdvancedSearch->SearchOperator2 = @$filter[\"w_facebook\"];\n\t\t$this->facebook->AdvancedSearch->Save();\n\n\t\t// Field twitter\n\t\t$this->twitter->AdvancedSearch->SearchValue = @$filter[\"x_twitter\"];\n\t\t$this->twitter->AdvancedSearch->SearchOperator = @$filter[\"z_twitter\"];\n\t\t$this->twitter->AdvancedSearch->SearchCondition = @$filter[\"v_twitter\"];\n\t\t$this->twitter->AdvancedSearch->SearchValue2 = @$filter[\"y_twitter\"];\n\t\t$this->twitter->AdvancedSearch->SearchOperator2 = @$filter[\"w_twitter\"];\n\t\t$this->twitter->AdvancedSearch->Save();\n\n\t\t// Field active_code\n\t\t$this->active_code->AdvancedSearch->SearchValue = @$filter[\"x_active_code\"];\n\t\t$this->active_code->AdvancedSearch->SearchOperator = @$filter[\"z_active_code\"];\n\t\t$this->active_code->AdvancedSearch->SearchCondition = @$filter[\"v_active_code\"];\n\t\t$this->active_code->AdvancedSearch->SearchValue2 = @$filter[\"y_active_code\"];\n\t\t$this->active_code->AdvancedSearch->SearchOperator2 = @$filter[\"w_active_code\"];\n\t\t$this->active_code->AdvancedSearch->Save();\n\n\t\t// Field identification\n\t\t$this->identification->AdvancedSearch->SearchValue = @$filter[\"x_identification\"];\n\t\t$this->identification->AdvancedSearch->SearchOperator = @$filter[\"z_identification\"];\n\t\t$this->identification->AdvancedSearch->SearchCondition = @$filter[\"v_identification\"];\n\t\t$this->identification->AdvancedSearch->SearchValue2 = @$filter[\"y_identification\"];\n\t\t$this->identification->AdvancedSearch->SearchOperator2 = @$filter[\"w_identification\"];\n\t\t$this->identification->AdvancedSearch->Save();\n\n\t\t// Field link_expired\n\t\t$this->link_expired->AdvancedSearch->SearchValue = @$filter[\"x_link_expired\"];\n\t\t$this->link_expired->AdvancedSearch->SearchOperator = @$filter[\"z_link_expired\"];\n\t\t$this->link_expired->AdvancedSearch->SearchCondition = @$filter[\"v_link_expired\"];\n\t\t$this->link_expired->AdvancedSearch->SearchValue2 = @$filter[\"y_link_expired\"];\n\t\t$this->link_expired->AdvancedSearch->SearchOperator2 = @$filter[\"w_link_expired\"];\n\t\t$this->link_expired->AdvancedSearch->Save();\n\n\t\t// Field isactive\n\t\t$this->isactive->AdvancedSearch->SearchValue = @$filter[\"x_isactive\"];\n\t\t$this->isactive->AdvancedSearch->SearchOperator = @$filter[\"z_isactive\"];\n\t\t$this->isactive->AdvancedSearch->SearchCondition = @$filter[\"v_isactive\"];\n\t\t$this->isactive->AdvancedSearch->SearchValue2 = @$filter[\"y_isactive\"];\n\t\t$this->isactive->AdvancedSearch->SearchOperator2 = @$filter[\"w_isactive\"];\n\t\t$this->isactive->AdvancedSearch->Save();\n\n\t\t// Field pio\n\t\t$this->pio->AdvancedSearch->SearchValue = @$filter[\"x_pio\"];\n\t\t$this->pio->AdvancedSearch->SearchOperator = @$filter[\"z_pio\"];\n\t\t$this->pio->AdvancedSearch->SearchCondition = @$filter[\"v_pio\"];\n\t\t$this->pio->AdvancedSearch->SearchValue2 = @$filter[\"y_pio\"];\n\t\t$this->pio->AdvancedSearch->SearchOperator2 = @$filter[\"w_pio\"];\n\t\t$this->pio->AdvancedSearch->Save();\n\n\t\t// Field google\n\t\t$this->google->AdvancedSearch->SearchValue = @$filter[\"x_google\"];\n\t\t$this->google->AdvancedSearch->SearchOperator = @$filter[\"z_google\"];\n\t\t$this->google->AdvancedSearch->SearchCondition = @$filter[\"v_google\"];\n\t\t$this->google->AdvancedSearch->SearchValue2 = @$filter[\"y_google\"];\n\t\t$this->google->AdvancedSearch->SearchOperator2 = @$filter[\"w_google\"];\n\t\t$this->google->AdvancedSearch->Save();\n\n\t\t// Field instagram\n\t\t$this->instagram->AdvancedSearch->SearchValue = @$filter[\"x_instagram\"];\n\t\t$this->instagram->AdvancedSearch->SearchOperator = @$filter[\"z_instagram\"];\n\t\t$this->instagram->AdvancedSearch->SearchCondition = @$filter[\"v_instagram\"];\n\t\t$this->instagram->AdvancedSearch->SearchValue2 = @$filter[\"y_instagram\"];\n\t\t$this->instagram->AdvancedSearch->SearchOperator2 = @$filter[\"w_instagram\"];\n\t\t$this->instagram->AdvancedSearch->Save();\n\n\t\t// Field account_type\n\t\t$this->account_type->AdvancedSearch->SearchValue = @$filter[\"x_account_type\"];\n\t\t$this->account_type->AdvancedSearch->SearchOperator = @$filter[\"z_account_type\"];\n\t\t$this->account_type->AdvancedSearch->SearchCondition = @$filter[\"v_account_type\"];\n\t\t$this->account_type->AdvancedSearch->SearchValue2 = @$filter[\"y_account_type\"];\n\t\t$this->account_type->AdvancedSearch->SearchOperator2 = @$filter[\"w_account_type\"];\n\t\t$this->account_type->AdvancedSearch->Save();\n\n\t\t// Field logo\n\t\t$this->logo->AdvancedSearch->SearchValue = @$filter[\"x_logo\"];\n\t\t$this->logo->AdvancedSearch->SearchOperator = @$filter[\"z_logo\"];\n\t\t$this->logo->AdvancedSearch->SearchCondition = @$filter[\"v_logo\"];\n\t\t$this->logo->AdvancedSearch->SearchValue2 = @$filter[\"y_logo\"];\n\t\t$this->logo->AdvancedSearch->SearchOperator2 = @$filter[\"w_logo\"];\n\t\t$this->logo->AdvancedSearch->Save();\n\n\t\t// Field profilepic\n\t\t$this->profilepic->AdvancedSearch->SearchValue = @$filter[\"x_profilepic\"];\n\t\t$this->profilepic->AdvancedSearch->SearchOperator = @$filter[\"z_profilepic\"];\n\t\t$this->profilepic->AdvancedSearch->SearchCondition = @$filter[\"v_profilepic\"];\n\t\t$this->profilepic->AdvancedSearch->SearchValue2 = @$filter[\"y_profilepic\"];\n\t\t$this->profilepic->AdvancedSearch->SearchOperator2 = @$filter[\"w_profilepic\"];\n\t\t$this->profilepic->AdvancedSearch->Save();\n\n\t\t// Field mailref\n\t\t$this->mailref->AdvancedSearch->SearchValue = @$filter[\"x_mailref\"];\n\t\t$this->mailref->AdvancedSearch->SearchOperator = @$filter[\"z_mailref\"];\n\t\t$this->mailref->AdvancedSearch->SearchCondition = @$filter[\"v_mailref\"];\n\t\t$this->mailref->AdvancedSearch->SearchValue2 = @$filter[\"y_mailref\"];\n\t\t$this->mailref->AdvancedSearch->SearchOperator2 = @$filter[\"w_mailref\"];\n\t\t$this->mailref->AdvancedSearch->Save();\n\n\t\t// Field deleted\n\t\t$this->deleted->AdvancedSearch->SearchValue = @$filter[\"x_deleted\"];\n\t\t$this->deleted->AdvancedSearch->SearchOperator = @$filter[\"z_deleted\"];\n\t\t$this->deleted->AdvancedSearch->SearchCondition = @$filter[\"v_deleted\"];\n\t\t$this->deleted->AdvancedSearch->SearchValue2 = @$filter[\"y_deleted\"];\n\t\t$this->deleted->AdvancedSearch->SearchOperator2 = @$filter[\"w_deleted\"];\n\t\t$this->deleted->AdvancedSearch->Save();\n\n\t\t// Field deletefeedback\n\t\t$this->deletefeedback->AdvancedSearch->SearchValue = @$filter[\"x_deletefeedback\"];\n\t\t$this->deletefeedback->AdvancedSearch->SearchOperator = @$filter[\"z_deletefeedback\"];\n\t\t$this->deletefeedback->AdvancedSearch->SearchCondition = @$filter[\"v_deletefeedback\"];\n\t\t$this->deletefeedback->AdvancedSearch->SearchValue2 = @$filter[\"y_deletefeedback\"];\n\t\t$this->deletefeedback->AdvancedSearch->SearchOperator2 = @$filter[\"w_deletefeedback\"];\n\t\t$this->deletefeedback->AdvancedSearch->Save();\n\n\t\t// Field account_id\n\t\t$this->account_id->AdvancedSearch->SearchValue = @$filter[\"x_account_id\"];\n\t\t$this->account_id->AdvancedSearch->SearchOperator = @$filter[\"z_account_id\"];\n\t\t$this->account_id->AdvancedSearch->SearchCondition = @$filter[\"v_account_id\"];\n\t\t$this->account_id->AdvancedSearch->SearchValue2 = @$filter[\"y_account_id\"];\n\t\t$this->account_id->AdvancedSearch->SearchOperator2 = @$filter[\"w_account_id\"];\n\t\t$this->account_id->AdvancedSearch->Save();\n\n\t\t// Field start_date\n\t\t$this->start_date->AdvancedSearch->SearchValue = @$filter[\"x_start_date\"];\n\t\t$this->start_date->AdvancedSearch->SearchOperator = @$filter[\"z_start_date\"];\n\t\t$this->start_date->AdvancedSearch->SearchCondition = @$filter[\"v_start_date\"];\n\t\t$this->start_date->AdvancedSearch->SearchValue2 = @$filter[\"y_start_date\"];\n\t\t$this->start_date->AdvancedSearch->SearchOperator2 = @$filter[\"w_start_date\"];\n\t\t$this->start_date->AdvancedSearch->Save();\n\n\t\t// Field end_date\n\t\t$this->end_date->AdvancedSearch->SearchValue = @$filter[\"x_end_date\"];\n\t\t$this->end_date->AdvancedSearch->SearchOperator = @$filter[\"z_end_date\"];\n\t\t$this->end_date->AdvancedSearch->SearchCondition = @$filter[\"v_end_date\"];\n\t\t$this->end_date->AdvancedSearch->SearchValue2 = @$filter[\"y_end_date\"];\n\t\t$this->end_date->AdvancedSearch->SearchOperator2 = @$filter[\"w_end_date\"];\n\t\t$this->end_date->AdvancedSearch->Save();\n\n\t\t// Field year_moth\n\t\t$this->year_moth->AdvancedSearch->SearchValue = @$filter[\"x_year_moth\"];\n\t\t$this->year_moth->AdvancedSearch->SearchOperator = @$filter[\"z_year_moth\"];\n\t\t$this->year_moth->AdvancedSearch->SearchCondition = @$filter[\"v_year_moth\"];\n\t\t$this->year_moth->AdvancedSearch->SearchValue2 = @$filter[\"y_year_moth\"];\n\t\t$this->year_moth->AdvancedSearch->SearchOperator2 = @$filter[\"w_year_moth\"];\n\t\t$this->year_moth->AdvancedSearch->Save();\n\n\t\t// Field registerdate\n\t\t$this->registerdate->AdvancedSearch->SearchValue = @$filter[\"x_registerdate\"];\n\t\t$this->registerdate->AdvancedSearch->SearchOperator = @$filter[\"z_registerdate\"];\n\t\t$this->registerdate->AdvancedSearch->SearchCondition = @$filter[\"v_registerdate\"];\n\t\t$this->registerdate->AdvancedSearch->SearchValue2 = @$filter[\"y_registerdate\"];\n\t\t$this->registerdate->AdvancedSearch->SearchOperator2 = @$filter[\"w_registerdate\"];\n\t\t$this->registerdate->AdvancedSearch->Save();\n\n\t\t// Field login_type\n\t\t$this->login_type->AdvancedSearch->SearchValue = @$filter[\"x_login_type\"];\n\t\t$this->login_type->AdvancedSearch->SearchOperator = @$filter[\"z_login_type\"];\n\t\t$this->login_type->AdvancedSearch->SearchCondition = @$filter[\"v_login_type\"];\n\t\t$this->login_type->AdvancedSearch->SearchValue2 = @$filter[\"y_login_type\"];\n\t\t$this->login_type->AdvancedSearch->SearchOperator2 = @$filter[\"w_login_type\"];\n\t\t$this->login_type->AdvancedSearch->Save();\n\n\t\t// Field accountstatus\n\t\t$this->accountstatus->AdvancedSearch->SearchValue = @$filter[\"x_accountstatus\"];\n\t\t$this->accountstatus->AdvancedSearch->SearchOperator = @$filter[\"z_accountstatus\"];\n\t\t$this->accountstatus->AdvancedSearch->SearchCondition = @$filter[\"v_accountstatus\"];\n\t\t$this->accountstatus->AdvancedSearch->SearchValue2 = @$filter[\"y_accountstatus\"];\n\t\t$this->accountstatus->AdvancedSearch->SearchOperator2 = @$filter[\"w_accountstatus\"];\n\t\t$this->accountstatus->AdvancedSearch->Save();\n\n\t\t// Field ispay\n\t\t$this->ispay->AdvancedSearch->SearchValue = @$filter[\"x_ispay\"];\n\t\t$this->ispay->AdvancedSearch->SearchOperator = @$filter[\"z_ispay\"];\n\t\t$this->ispay->AdvancedSearch->SearchCondition = @$filter[\"v_ispay\"];\n\t\t$this->ispay->AdvancedSearch->SearchValue2 = @$filter[\"y_ispay\"];\n\t\t$this->ispay->AdvancedSearch->SearchOperator2 = @$filter[\"w_ispay\"];\n\t\t$this->ispay->AdvancedSearch->Save();\n\n\t\t// Field profilelink\n\t\t$this->profilelink->AdvancedSearch->SearchValue = @$filter[\"x_profilelink\"];\n\t\t$this->profilelink->AdvancedSearch->SearchOperator = @$filter[\"z_profilelink\"];\n\t\t$this->profilelink->AdvancedSearch->SearchCondition = @$filter[\"v_profilelink\"];\n\t\t$this->profilelink->AdvancedSearch->SearchValue2 = @$filter[\"y_profilelink\"];\n\t\t$this->profilelink->AdvancedSearch->SearchOperator2 = @$filter[\"w_profilelink\"];\n\t\t$this->profilelink->AdvancedSearch->Save();\n\n\t\t// Field source\n\t\t$this->source->AdvancedSearch->SearchValue = @$filter[\"x_source\"];\n\t\t$this->source->AdvancedSearch->SearchOperator = @$filter[\"z_source\"];\n\t\t$this->source->AdvancedSearch->SearchCondition = @$filter[\"v_source\"];\n\t\t$this->source->AdvancedSearch->SearchValue2 = @$filter[\"y_source\"];\n\t\t$this->source->AdvancedSearch->SearchOperator2 = @$filter[\"w_source\"];\n\t\t$this->source->AdvancedSearch->Save();\n\n\t\t// Field agree\n\t\t$this->agree->AdvancedSearch->SearchValue = @$filter[\"x_agree\"];\n\t\t$this->agree->AdvancedSearch->SearchOperator = @$filter[\"z_agree\"];\n\t\t$this->agree->AdvancedSearch->SearchCondition = @$filter[\"v_agree\"];\n\t\t$this->agree->AdvancedSearch->SearchValue2 = @$filter[\"y_agree\"];\n\t\t$this->agree->AdvancedSearch->SearchOperator2 = @$filter[\"w_agree\"];\n\t\t$this->agree->AdvancedSearch->Save();\n\n\t\t// Field balance\n\t\t$this->balance->AdvancedSearch->SearchValue = @$filter[\"x_balance\"];\n\t\t$this->balance->AdvancedSearch->SearchOperator = @$filter[\"z_balance\"];\n\t\t$this->balance->AdvancedSearch->SearchCondition = @$filter[\"v_balance\"];\n\t\t$this->balance->AdvancedSearch->SearchValue2 = @$filter[\"y_balance\"];\n\t\t$this->balance->AdvancedSearch->SearchOperator2 = @$filter[\"w_balance\"];\n\t\t$this->balance->AdvancedSearch->Save();\n\n\t\t// Field job_title\n\t\t$this->job_title->AdvancedSearch->SearchValue = @$filter[\"x_job_title\"];\n\t\t$this->job_title->AdvancedSearch->SearchOperator = @$filter[\"z_job_title\"];\n\t\t$this->job_title->AdvancedSearch->SearchCondition = @$filter[\"v_job_title\"];\n\t\t$this->job_title->AdvancedSearch->SearchValue2 = @$filter[\"y_job_title\"];\n\t\t$this->job_title->AdvancedSearch->SearchOperator2 = @$filter[\"w_job_title\"];\n\t\t$this->job_title->AdvancedSearch->Save();\n\n\t\t// Field projects\n\t\t$this->projects->AdvancedSearch->SearchValue = @$filter[\"x_projects\"];\n\t\t$this->projects->AdvancedSearch->SearchOperator = @$filter[\"z_projects\"];\n\t\t$this->projects->AdvancedSearch->SearchCondition = @$filter[\"v_projects\"];\n\t\t$this->projects->AdvancedSearch->SearchValue2 = @$filter[\"y_projects\"];\n\t\t$this->projects->AdvancedSearch->SearchOperator2 = @$filter[\"w_projects\"];\n\t\t$this->projects->AdvancedSearch->Save();\n\n\t\t// Field opportunities\n\t\t$this->opportunities->AdvancedSearch->SearchValue = @$filter[\"x_opportunities\"];\n\t\t$this->opportunities->AdvancedSearch->SearchOperator = @$filter[\"z_opportunities\"];\n\t\t$this->opportunities->AdvancedSearch->SearchCondition = @$filter[\"v_opportunities\"];\n\t\t$this->opportunities->AdvancedSearch->SearchValue2 = @$filter[\"y_opportunities\"];\n\t\t$this->opportunities->AdvancedSearch->SearchOperator2 = @$filter[\"w_opportunities\"];\n\t\t$this->opportunities->AdvancedSearch->Save();\n\n\t\t// Field isconsaltant\n\t\t$this->isconsaltant->AdvancedSearch->SearchValue = @$filter[\"x_isconsaltant\"];\n\t\t$this->isconsaltant->AdvancedSearch->SearchOperator = @$filter[\"z_isconsaltant\"];\n\t\t$this->isconsaltant->AdvancedSearch->SearchCondition = @$filter[\"v_isconsaltant\"];\n\t\t$this->isconsaltant->AdvancedSearch->SearchValue2 = @$filter[\"y_isconsaltant\"];\n\t\t$this->isconsaltant->AdvancedSearch->SearchOperator2 = @$filter[\"w_isconsaltant\"];\n\t\t$this->isconsaltant->AdvancedSearch->Save();\n\n\t\t// Field isagent\n\t\t$this->isagent->AdvancedSearch->SearchValue = @$filter[\"x_isagent\"];\n\t\t$this->isagent->AdvancedSearch->SearchOperator = @$filter[\"z_isagent\"];\n\t\t$this->isagent->AdvancedSearch->SearchCondition = @$filter[\"v_isagent\"];\n\t\t$this->isagent->AdvancedSearch->SearchValue2 = @$filter[\"y_isagent\"];\n\t\t$this->isagent->AdvancedSearch->SearchOperator2 = @$filter[\"w_isagent\"];\n\t\t$this->isagent->AdvancedSearch->Save();\n\n\t\t// Field isinvestor\n\t\t$this->isinvestor->AdvancedSearch->SearchValue = @$filter[\"x_isinvestor\"];\n\t\t$this->isinvestor->AdvancedSearch->SearchOperator = @$filter[\"z_isinvestor\"];\n\t\t$this->isinvestor->AdvancedSearch->SearchCondition = @$filter[\"v_isinvestor\"];\n\t\t$this->isinvestor->AdvancedSearch->SearchValue2 = @$filter[\"y_isinvestor\"];\n\t\t$this->isinvestor->AdvancedSearch->SearchOperator2 = @$filter[\"w_isinvestor\"];\n\t\t$this->isinvestor->AdvancedSearch->Save();\n\n\t\t// Field isbusinessman\n\t\t$this->isbusinessman->AdvancedSearch->SearchValue = @$filter[\"x_isbusinessman\"];\n\t\t$this->isbusinessman->AdvancedSearch->SearchOperator = @$filter[\"z_isbusinessman\"];\n\t\t$this->isbusinessman->AdvancedSearch->SearchCondition = @$filter[\"v_isbusinessman\"];\n\t\t$this->isbusinessman->AdvancedSearch->SearchValue2 = @$filter[\"y_isbusinessman\"];\n\t\t$this->isbusinessman->AdvancedSearch->SearchOperator2 = @$filter[\"w_isbusinessman\"];\n\t\t$this->isbusinessman->AdvancedSearch->Save();\n\n\t\t// Field isprovider\n\t\t$this->isprovider->AdvancedSearch->SearchValue = @$filter[\"x_isprovider\"];\n\t\t$this->isprovider->AdvancedSearch->SearchOperator = @$filter[\"z_isprovider\"];\n\t\t$this->isprovider->AdvancedSearch->SearchCondition = @$filter[\"v_isprovider\"];\n\t\t$this->isprovider->AdvancedSearch->SearchValue2 = @$filter[\"y_isprovider\"];\n\t\t$this->isprovider->AdvancedSearch->SearchOperator2 = @$filter[\"w_isprovider\"];\n\t\t$this->isprovider->AdvancedSearch->Save();\n\n\t\t// Field isproductowner\n\t\t$this->isproductowner->AdvancedSearch->SearchValue = @$filter[\"x_isproductowner\"];\n\t\t$this->isproductowner->AdvancedSearch->SearchOperator = @$filter[\"z_isproductowner\"];\n\t\t$this->isproductowner->AdvancedSearch->SearchCondition = @$filter[\"v_isproductowner\"];\n\t\t$this->isproductowner->AdvancedSearch->SearchValue2 = @$filter[\"y_isproductowner\"];\n\t\t$this->isproductowner->AdvancedSearch->SearchOperator2 = @$filter[\"w_isproductowner\"];\n\t\t$this->isproductowner->AdvancedSearch->Save();\n\n\t\t// Field states\n\t\t$this->states->AdvancedSearch->SearchValue = @$filter[\"x_states\"];\n\t\t$this->states->AdvancedSearch->SearchOperator = @$filter[\"z_states\"];\n\t\t$this->states->AdvancedSearch->SearchCondition = @$filter[\"v_states\"];\n\t\t$this->states->AdvancedSearch->SearchValue2 = @$filter[\"y_states\"];\n\t\t$this->states->AdvancedSearch->SearchOperator2 = @$filter[\"w_states\"];\n\t\t$this->states->AdvancedSearch->Save();\n\n\t\t// Field cities\n\t\t$this->cities->AdvancedSearch->SearchValue = @$filter[\"x_cities\"];\n\t\t$this->cities->AdvancedSearch->SearchOperator = @$filter[\"z_cities\"];\n\t\t$this->cities->AdvancedSearch->SearchCondition = @$filter[\"v_cities\"];\n\t\t$this->cities->AdvancedSearch->SearchValue2 = @$filter[\"y_cities\"];\n\t\t$this->cities->AdvancedSearch->SearchOperator2 = @$filter[\"w_cities\"];\n\t\t$this->cities->AdvancedSearch->Save();\n\n\t\t// Field offers\n\t\t$this->offers->AdvancedSearch->SearchValue = @$filter[\"x_offers\"];\n\t\t$this->offers->AdvancedSearch->SearchOperator = @$filter[\"z_offers\"];\n\t\t$this->offers->AdvancedSearch->SearchCondition = @$filter[\"v_offers\"];\n\t\t$this->offers->AdvancedSearch->SearchValue2 = @$filter[\"y_offers\"];\n\t\t$this->offers->AdvancedSearch->SearchOperator2 = @$filter[\"w_offers\"];\n\t\t$this->offers->AdvancedSearch->Save();\n\t\t$this->BasicSearch->setKeyword(@$filter[EW_TABLE_BASIC_SEARCH]);\n\t\t$this->BasicSearch->setType(@$filter[EW_TABLE_BASIC_SEARCH_TYPE]);\n\t}", "public function executeSearch(sfWebRequest $request)\n {\n\n $this->is_specimen_search = false;\n // Initialize the order by and paging values: order by collection_name here\n $this->setCommonValues('specimensearch', 'collection_name', $request);\n // Modify the s_url to call the searchResult action when on result page and playing with pager\n $this->s_url = 'specimensearch/search'.'?is_choose='.$this->is_choose;\n\n // Initialize filter\n $this->form = new SpecimensFormFilter(null,array('user' => $this->getUser()));\n // If the search has been triggered by clicking on the search button or with pinned specimens\n \n $this->search_request=$request;\n \n //ftheeten 2018 04 17 modified for GET parameters (keep query state)\n if(($request->getParameter('specimen_search_filters','') !== '' ) || $request->hasParameter('pinned') )\n {\n if($request->isMethod('post'))\n {\n // Store all post parameters\n $criterias = $request->getPostParameters();\n }\n //ftheeten 2018 04 17 modified for GET parameters\n elseif($request->isMethod('get'))\n {\n\n $criterias = $request->getGetParameters();\n }\n // If pinned specimens called\n if($request->hasParameter('pinned'))\n {\n\t // Get all ids pinned\n $ids = implode(',',$this->getUser()->getAllPinned('specimen') );\n if($ids == '')\n $ids = '0';\n $this->is_pinned_only_search = true;\n // Set the list of ids as criteria\n $criterias['specimen_search_filters']['spec_ids'] = $ids;\n\n }\n // If instead it's a call to a stored specimen search\n elseif($request->hasParameter('spec_search'))\n {\n // Get the saved search concerned\n $saved_search = Doctrine::getTable('MySavedSearches')->getSavedSearchByKey($request->getParameter('spec_search'), $this->getUser()->getId());\n // Forward 404 if we don't get the search requested\n $this->forward404Unless($saved_search);\n\n $criterias['specimen_search_filters']['spec_ids'] = $saved_search->getSearchedIdString();\n if($criterias['specimen_search_filters']['spec_ids'] == '')\n $criterias['specimen_search_filters']['spec_ids'] = '0';\n $this->is_specimen_search = $saved_search->getId();\n }\n $this->form->bind($criterias['specimen_search_filters']) ;\n }\n // If search_id parameter is given it means we try to open an already saved search with its criterias\n elseif($request->getParameter('search_id','') != '')\n {\n // Get the saved search asked\n $saved_search = Doctrine::getTable('MySavedSearches')->getSavedSearchByKey($request->getParameter('search_id'), $this->getUser()->getId()) ;\n // If not available, not found -> forward on 404 page\n $this->forward404Unless($saved_search);\n\n if($saved_search->getIsOnlyId())\n $this->is_specimen_search = $saved_search->getId();\n // Get all search criterias from DB\n $criterias = $saved_search->getUnserialRequest();\n // Transform all visible fields stored as a string with | as separator and store it into col_fields field\n $criterias['specimen_search_filters']['col_fields'] = implode('|',$saved_search->getVisibleFieldsInResult()) ;\n // If data were set, in other terms specimen_search_filters array is available...\n if(isset($criterias['specimen_search_filters']))\n {\n // Bring all the required/necessary widgets on page\n Doctrine::getTable('Specimens')->getRequiredWidget($criterias['specimen_search_filters'], $this->getUser()->getId(), 'specimensearch_widget');\n if($saved_search->getisOnlyId() && $criterias['specimen_search_filters']['spec_ids']=='')\n $criterias['specimen_search_filters']['spec_ids'] = '0';\n $this->form->bind($criterias['specimen_search_filters']) ;\n }\n \n }\n\n if($this->form->isBound())\n {\n if ($this->form->isValid())\n {\n $this->getUser()->storeRecPerPage( $this->form->getValue('rec_per_page'));\n // When criteria parameter is given, it means we go back to criterias\n if($request->hasParameter('criteria'))\n {\n $this->setTemplate('index');\n // Bring all the required/necessary widgets on page\n Doctrine::getTable('Specimens')->getRequiredWidget($criterias['specimen_search_filters'], $this->getUser()->getId(), 'specimensearch_widget');\n $this->loadWidgets();\n return;\n }\n else\n {\n $this->spec_lists = Doctrine::getTable('MySavedSearches')\n ->getListFor($this->getUser()->getId(), 'specimen');\n if($this->orderBy==\"col_peoples\")\n {\n $this->orderBy=\"(SELECT p.formated_name_indexed from people p where id= spec_coll_ids[1])\";\n }\n elseif($this->orderBy==\"don_peoples\")\n {\n $this->orderBy=\"(SELECT p.formated_name_indexed from people p where id= spec_don_sel_ids[1])\";\n }\n \n $query = $this->form->getQuery()->orderby($this->orderBy . ' ' . $this->orderDir. ', id');\n //If export is defined export it!\n $this->field_to_show = $this->getVisibleColumns($this->getUser(), $this->form);\n \n\t\t if($request->getParameter('export','') != '')\n {\n $this->specimensearch = $query->limit(1000)->execute();\n $this->setLayout(false);\n $this->loadRelated();\n $this->getResponse()->setHttpHeader('Pragma: private', true);\n $this->getResponse()->setHttpHeader('Content-Disposition',\n 'attachment; filename=\"export.csv\"');\n $this->getResponse()->setContentType(\"application/force-download text/csv\");\n $this->setTemplate('exportCsv');\n return ;\n }\n // Define in one line a pager Layout based on a pagerLayoutWithArrows object\n // This pager layout is based on a Doctrine_Pager, itself based on a customed Doctrine_Query object (call to the getExpLike method of ExpeditionTable class)\n\n \n $pager = new DarwinPager($query,\n $this->currentPage,\n $this->form->getValue('rec_per_page')\n );\n // Replace the count query triggered by the Pager to get the number of records retrieved\n $count_q = clone $query;\n\t\n $count_q->select(\" count(s.id), count(distinct s.id) as distinct_records, count(distinct s.ig_num) as count_ig\")->removeDqlQueryPart('orderby')->from(\"SpecimensStoragePartsView s\")->limit(0);\n\t\t\n if($this->form->with_group) {\n\t\t\t $count_q->select(\" count(s.id), count(distinct s.id) as distinct_records, count(distinct s.ig_num) as count_ig\")->removeDqlQueryPart('groupby')->from(\"SpecimensStoragePartsView s\")->limit(0);\n \n }\n\t\t $count_q2=clone $count_q;\n\t\t $count_q2->select('sum(s.specimen_count_min) as sum_specimen_count_min,sum(s.specimen_count_max) as sum_specimen_count_max ')->from(\"Specimens s\");\n\t\t $resultset_count_details =$count_q2->fetchOne(array(), Doctrine_Core::HYDRATE_ARRAY);\n\t\t\n\t\t \n\t\t \n\t\t \n // Initialize an empty count query\n $counted = new DoctrineCounted();\n // Define the correct select count() of the count query\n $counted->count_query = $count_q;\n\t\t \n\t\t \n // And replace the one of the pager with this new one\n $pager->setCountQuery($counted);\n $this->pagerLayout = new PagerLayoutWithArrows($pager,\n new Doctrine_Pager_Range_Sliding(array('chunk' => $this->pagerSlidingSize)),\n $this->getController()->genUrl($this->s_url.$this->o_url).'/page/{%page_number}'\n );\n // Sets the Pager Layout templates\n $this->setDefaultPaggingLayout($this->pagerLayout);\n // If pager not yet executed, this means the query has to be executed for data loading\n\n\n //if (! $this->pagerLayout->getPager()->getExecuted())\n $this->specimensearch = $this->pagerLayout->execute();\n\t\t//$counted2->execute();\n\t\t\n\t\t\t$this->pagerLayout->getPager()->additional_count=array_merge($counted->all_results , $resultset_count_details);\n //Load Codes and related for each item\n $this->loadRelated();\n\n $this->field_to_show = $this->getVisibleColumns($this->getUser(), $this->form);\n $this->defineFields($this->source);\n \n //ftheeten 2016 06 08 save query for report (via save searc)\n //$this->queryToSave = $this->form->getQuery();\n $this->setParamsToSaveQuery();\n return $request->isXmlHttpRequest()? $this->renderPartial('searchSuccess'): null;\n \n } \n } \n }\n\n $this->setTemplate('index');\n if(isset($criterias['specimen_search_filters']))\n Doctrine::getTable('Specimens')->getRequiredWidget($criterias['specimen_search_filters'], $this->getUser()->getId(), 'specimensearch_widget');\n $this->loadWidgets();\n\n }", "public function requireFilterSubmit_result()\n\t{\n\t\treturn false;\n\t}", "public function setFilter($filter){ }", "public function apply_filters_in_request() {\n\n\t\t\t$args = jet_smart_filters()->query->get_query_args();\n\n\t\t\tif ( ! $args ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_filter( 'jet-engine/listing/grid/posts-query-args', array( $this, 'add_query_args' ), 10, 2 );\n\n\t\t}", "function _custom_teasers_views_add_filter(&$handler, $teaser_view) {\n $filters = array(\n 'status' => array(\n 'operator' => '=',\n 'value' => '1',\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'status',\n 'table' => 'node',\n 'field' => 'status',\n 'relationship' => 'none',\n ),\n 'type' => array(\n 'operator' => 'in',\n 'value' => array(\n 'teaser' => 'teaser',\n ),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n ),\n 'view_name' => array(\n 'operator' => 'in',\n 'value' => array(\n $teaser_view['name'] => $teaser_view['name'],\n ),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array(\n 'operator' => FALSE,\n 'label' => '',\n ),\n 'id' => 'view_name',\n 'table' => 'custom_teasers',\n 'field' => 'view_name',\n 'relationship' => 'none',\n ),\n );\n\n // Currently, the only supported filters are per-node-type.\n // 'all' is actually just a passthrough option that doesn't apply\n // filtering beyond the standard 'published' check.\n $filter = $teaser_view['filter'];\n if (strstr($filter, 'node') !== FALSE && $type = end(explode(':', $filter))) {\n $filters['type'] = array(\n 'operator' => 'in',\n 'value' => array($type => $type),\n 'group' => '0',\n 'exposed' => FALSE,\n 'expose' => array('operator' => FALSE, 'label' => ''),\n 'id' => 'type',\n 'table' => 'node',\n 'field' => 'type',\n 'relationship' => 'none',\n );\n }\n \n $handler->override_option('filters', $filters);\n}", "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "public function filter()\n\t{\n\t //$this->form_validation->set_rules('tag','Tag','required');\n\t\tif(!$this->input->post('tag'))\n\t\t{\n\t\t\t$data=$this->am->getArticleData();\n\t\t\t$data['TagData']=$this->am->getTagData();\n \t\t$data['error']='Select Any Tag First';\n\t\t\tget_view('article','Read with e_learn',$data);\n\t\t}\n\t\telse\n\t\t{\n \t\t//get all Article details\n \t\t$wherein=implode(\", \",array_values($this->input->post('tag')));\n \t\t$data=$this->am->getFilteredArticleData($wherein);\n \t\t$data['TagData']=$this->am->getTagData();\n \t\tget_view('article','Read with e_learn',$data);\n \t}\t\n\t}", "function islandora_collection_search_form_submit($form, &$form_state) {\n $form_state['rebuild'] = TRUE;\n $search_string = $form_state['values']['islandora_simple_search_query'];\n // Replace the slash so url doesn't break.\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string = islandora_solr_replace_slashes($search_string);\n $collection_select = isset($form_state['values']['collection_select']) ?\n $form_state['values']['collection_select'] :\n FALSE;\n\n // Using edismax by default.\n $query = array('type' => 'edismax');\n if (isset($collection_select) && $collection_select !== 'all') {\n $query['cp'] = $collection_select;\n }\n drupal_goto('islandora/search/' . $search_string, array('query' => $query));\n}", "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Invoices::grid() )->search ();\n\t}", "public function run()\n {\n $collection = Mage::getResourceModel('aw_layerednavigation/filter_collection')\n ->addFieldToFilter('type', array('eq' => AW_Layerednavigation_Model_Source_Filter_Type::DECIMAL_PRICE_CODE))\n ;\n $priceFilterModel = $collection->getFirstItem();\n\n if (!$priceFilterModel->getId()) {\n $priceFilterData = array(\n 'title' => Mage::helper('aw_layerednavigation')->__('Price'),\n 'type' => AW_Layerednavigation_Model_Source_Filter_Type::DECIMAL_PRICE_CODE,\n 'is_enabled' => 1,\n 'is_enabled_in_search' => 1,\n 'code' => $this->getUniqueCode('price'),\n 'position' => 0,\n 'display_type' => AW_Layerednavigation_Model_Source_Filter_Display_Type::RANGE_CODE,\n 'image_position' => AW_Layerednavigation_Model_Source_Filter_Image_Position::TEXT_ONLY_CODE,\n 'is_row_count_limit_enabled' => self::IS_ROW_COUNT_LIMIT_STATUS,\n 'row_count_limit' => self::ROW_COUNT_LIMIT,\n 'additional_data' => array(),\n );\n $priceFilterModel->setData($priceFilterData)->save();\n }\n }", "function get_filter_form(Table $table) {\n return $table->renderFilter();\n}", "protected function processFilters()\n {\n $this->filters = [];\n foreach ($this->params as $key => $value) {\n $this->parser->setAlias('_' . $this->contentType);\n $filter = $this->parser->getFilter($key, $value);\n if ($filter) {\n $this->addFilter($filter);\n }\n }\n }", "function run()\r\n {\r\n $this->view = Request :: get(self :: PARAM_SHARED_VIEW);\r\n if (is_null($this->view))\r\n {\r\n $this->view = self :: SHARED_VIEW_OTHERS_OBJECTS;\r\n }\r\n\r\n $trail = BreadcrumbTrail :: get_instance();\r\n\r\n $this->action_bar = $this->get_action_bar();\r\n $this->form = new RepositoryFilterForm($this, $this->get_url());\r\n $output = $this->get_content_objects_html();\r\n\r\n $session_filter = Session :: retrieve('filter');\r\n\r\n if ($session_filter != null && ! $session_filter == 0)\r\n {\r\n if (is_numeric($session_filter))\r\n {\r\n $condition = new EqualityCondition(UserView :: PROPERTY_ID, $session_filter);\r\n $user_view = RepositoryDataManager :: get_instance()->retrieve_user_views($condition)->next_result();\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get('Filter', null, Utilities :: COMMON_LIBRARIES) . ': ' . $user_view->get_name()));\r\n }\r\n else\r\n {\r\n $trail->add(new Breadcrumb($this->get_url(), Translation :: get('Filter', null, Utilities :: COMMON_LIBRARIES) . ': ' . Utilities :: underscores_to_camelcase(($session_filter))));\r\n }\r\n }\r\n\r\n $this->display_header($trail, false, true);\r\n\r\n echo $this->action_bar->as_html();\r\n echo '<br />' . $this->form->display() . '<br />';\r\n echo $output;\r\n echo ResourceManager :: get_instance()->get_resource_html(BasicApplication :: get_application_web_resources_javascript_path(RepositoryManager :: APPLICATION_NAME) . 'repository.js');\r\n\r\n $this->display_footer();\r\n }", "public function executeSearch(sfWebRequest $request)\n {\n \n// // Forward to a 404 page if the method used is not a post\n $this->forward404Unless($request->isMethod('post'));\n $this->setCommonValues('specimen', 'collection_name', $request);\n $item = $request->getParameter('searchSpecimen',array(''));\n // Instantiate a new specimen form\n $this->form = new SpecimensSelfFormFilter(array('caller_id'=>$item['caller_id']));\n // Triggers the search result function\n $this->searchResults($this->form, $request);\n }", "private static function _getFilter() {}", "public function filter($filter)\n {\n }", "abstract function query( $p_filter_input );", "function filter($request) {\n\t\t//$model = singleton($this->modelClass);\n\t\t$context = $this->dataObject->getDefaultSearchContext();\n\t\t$value = $request->getVar('q');\n\t\t$results = $context->getResults(array(\"Name\"=>$value));\n\t\theader(\"Content-Type: text/plain\");\n\t\tforeach($results as $result) {\n\t\t\techo $result->Name . \"\\n\";\n\t\t}\t\t\n\t}", "public function applyFilterSearch() {\n\t\t$this->table->writeFilterToSession();\n\t\t$this->table->resetOffset();\n\t\t$this->search();\n\t}", "public function distribution() {\n if (isset($_POST[\"filter\"])) {\n $this->admin_filter();\n }\n if (isset($_POST[\"add\"])) {\n $this->add_media();\n }\n if (isset($_POST[\"delete\"])) {\n $this->delete_media();\n }\n if (isset($_POST[\"modify\"])) {\n $this->modify_media();\n }\n }", "function showPostFilterPanel(){\r\n\t\techo \"<div class='filterPanel'>\";\r\n\t\techo \"<form id='orderForm' class='orderBy' action='#' method='POST'>\";\r\n\t\techo \"<div>\";\r\n\t\techo \"<label class='filterLabel'>Ordina per: </label>\";\r\n\t\techo \"<select name='filter'>\";\r\n\t\techo \"<option value='title'>Titolo</option>\";\r\n\t\techo \"<option value='date'>Data</option>\";\r\n\t\techo \"<option value='comment'>Commenti</option>\";\r\n\t\techo \"<option value='like'>Likes</option>\";\r\n\t\techo \"<option value='dislike'>Dislikes</option>\";\r\n\t\techo \"</select>\";\r\n\t\techo \"<label class='filterLabel'>Crescente <input type='radio' name='order' value='asc' checked></label>\";\r\n\t\techo \"<label class='filterLabel'>Decrescente <input type='radio' name='order' value='desc'></label>\";\r\n\t\techo \"</div>\";\r\n\t\techo \"<button type='submit' class='button smallButton' name='sort'>Ordina</button>\";\r\n\t\techo \"</form>\";\r\n\t\techo \"</div>\";\r\n\t}", "function beforeFilter() {\n }", "private function handleTagFilter()\n {\n $this->tagFilterEnabled = false;\n\n switch ($this->enableTagFilter) {\n // fall-through is intentional here, setting of tagFilterEnabled to true is valid for both cases\n case self::TAG_FILTER_ON_OVERFLOW:\n if (!($this->totalCount > $this->limit)) {\n break;\n }\n case self::TAG_FILTER_ALWAYS:\n $this->tagFilterEnabled = true;\n }\n\n if ($this->tagFilterEnabled) {\n $this->addJs('/plugins/' . Plugin::DIRECTORY_KEY . '/assets/js/jquery.mark.min.js');\n }\n }", "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//$this->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//$this->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "public function filter()\n {\n $filter_name = Input::get('filter_name');\n\n Session::put('admin_child_filter_name', $filter_name);\n\n return Redirect::route('admin.child.index');\n }", "public function postSavefilters()\n {\n if (Request::ajax())\n {\n\t\t\t$datatoblob = json_decode(Input::get('selectedvalues'), true);\n //serialization\n $checkuserid = Auth::id();\n $autheduser = User::find(Auth::id());\n $objforuser = new stdClass;\n $objforuser->data = json_encode($datatoblob);\n $objforuser->is_array = is_array($datatoblob); // doing this for proper deserialize\n $objforuser_json = json_encode($objforuser);\n $autheduser->filters_patient = json_encode($objforuser);\n if ($autheduser->forceSave())\n {\n return 'success';\n }else\n {\n return 'nope';\n }\n } else\n {\n return false;\n }\n }", "public function findByFilter($filter) {\n $query = $this->createQuery();\n //$query->getQuerySettings()->setRespectEnableFields(false);\n $query->getQuerySettings()->setEnableFieldsToBeIgnored(array());\n $query->getQuerySettings()->setIncludeDeleted(false);\n $query->getQuerySettings()->setRespectStoragePage(false);\n \n\n $constraints = array();\n if($filter->keyword) {\n $keywordConstraints = array();\n $keywordConstraints[] = $query->like('title', '%'.$filter->keyword.'%');\n $keywordConstraints[] = $query->like('abstract', '%'.$filter->keyword.'%');\n $keywordConstraints[] = $query->like('bodytext', '%'.$filter->keyword.'%');\n $constraints[] = $query->logicalOr($keywordConstraints);\n }\n if($filter->area) {\n $constraints[] = $query->contains('areas', $filter->area);\n }\n if($filter->industry) {\n $constraints[] = $query->contains('industries', $filter->industry);\n }\n if($filter->technology) {\n $constraints[] = $query->contains('technologies', $filter->technology);\n }\n if($filter->theme) {\n $constraints[] = $query->contains('themes', $filter->theme);\n }\n if($filter->year) {\n $minDate = mktime(0, 0, 0, 1, 1, $filter->year);\n $maxDate = mktime(23, 59, 59, 12, 31, $filter->year);\n $constraints[] = $query->greaterThanOrEqual('article_date', $minDate);\n $constraints[] = $query->lessThanOrEqual('article_date', $maxDate);\n }\n\n if(count($constraints)) {\n \n $query->matching(\n $query->logicalAnd($constraints)\n );\n \n \n \n//$queryParser = $this->objectManager->get(\\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Storage\\Typo3DbQueryParser::class);\n//\\TYPO3\\CMS\\Extbase\\Utility\\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL());\n//\n//\\TYPO3\\CMS\\Extbase\\Utility\\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getParameters());\n\n\n\n return $query->matching(\n $query->logicalAnd($constraints)\n )\n ->execute();\n \n }\n else {\n return $this->findAll();\n }\n }", "public function handleDataSubmission() {}", "protected function handleGetFiltered() {\n\t\t\tif ($this->verifyRequest('GET') && $this->verifyParams()) {\n\t\t\t\textract($this->getResultParams());\n\t\t\t\t\n\t\t\t\t$strFilterBy = $this->objUrl->getFilter('by');\n\t\t\t\t$mxdFilter = str_replace('.' . $this->strFormat, '', $this->objUrl->getSegment(3));\n\t\t\t\t\n\t\t\t\tif ($strFilterBy == 'username') {\n\t\t\t\t\tAppLoader::includeUtility('DataHelper');\n\t\t\t\t\t$mxdFilter = DataHelper::getUserIdByUsername($mxdFilter);\n\t\t\t\t\t$strFilterBy = 'userid';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($strFilterBy == 'userid') {\n\t\t\t\t\t$blnCached = $this->loadFromCache($strNamespace = sprintf(AppConfig::get('UserEventNamespace'), $mxdFilter));\n\t\t\t\t} else {\n\t\t\t\t\t$blnCached = $this->loadFromCache();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (empty($blnCached)) {\n\t\t\t\t\t$objUserEvent = $this->initModel();\n\t\t\t\t\tswitch ($strFilterBy) {\n\t\t\t\t\t\tcase 'userid':\n\t\t\t\t\t\t\t$blnResult = $objUserEvent->loadByUserId($mxdFilter, $arrFilters, false);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($blnResult) {\n\t\t\t\t\t\t$this->blnSuccess = true;\n\t\t\t\t\t\tif ($objUserEvent->count()) {\n\t\t\t\t\t\t\t$this->arrResult = array(\n\t\t\t\t\t\t\t\t'events' => $this->formatEvents($objUserEvent),\n\t\t\t\t\t\t\t\t'total' => $objUserEvent->count()\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->arrResult = array(\n\t\t\t\t\t\t\t\t'events' => array(),\n\t\t\t\t\t\t\t\t'total' => 0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (isset($blnCached)) { \n\t\t\t\t\t\t\tif (isset($strNamespace)) {\n\t\t\t\t\t\t\t\t$this->saveToCache($this->intCacheExpire, $strNamespace);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->saveToCache($this->intCacheExpire);\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\ttrigger_error(AppLanguage::translate('There was an error loading the event data'));\n\t\t\t\t\t\t$this->error();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error(400);\n\t\t\t}\n\t\t}", "abstract public function filters();", "abstract public function prepareFilters();", "public function addFilters()\n {\n }", "function drupal_custom_filter_views_data_alter(&$data) {\n $data[\"node\"][\"drupal_custom_filter_handler\"] = array(\n \"title\" => t(\"Drupal Custom Filter\"),\n \"help\" => t(\"Performs some custom filtering on nodes in the view.\"),\n \"filter\" => array(\n \"handler\"=>\"drupal_custom_filter_handler\",\n ),\n );\n}", "public function filter(Request $request )\n \n {\n $filter_1=$request->user()->id;\n $filter_2=$request->post_category_id ;\n $filter_3=$request->status;\n $filter_date=$request->updated_at;\n //Put $this $Field->value >>> If Field not Use , fill values='none' ! .\n $field_1='author_id'; \n $field_2='post_category_id';\n $field_3='status';\n $field_date='updated_at';\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])->get()\n :false\n :false;\n \n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_1, '=', $filter_1)\n ->get()\n :false\n :false;\n \n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_2, '=', $filter_2)\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_3, '=', $filter_3)\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3]\n ])\n ->orWhere($field_date, 'like', '%'.$filter_date.'%')\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2]\n \n ])\n ->orWhere([\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->get()\n :false\n :false; \n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_3, '=', $filter_3]\n \n ])\n ->orWhere([\n [$field_2, '=', $filter_2],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_date, 'like', '%'.$filter_date.'%']\n \n ])\n ->orWhere([\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3]\n ])\n ->get()\n :false\n :false;\n\n return view('author.post.post-filter',['post_list'=>$post_list]);\n }", "function simplenews_issue_filter_form() {\n // Current filter selections in $session var; stored at form submission\n // Example: array('newsletter' => 'all')\n $session = isset($_SESSION['simplenews_issue_filter']) ? $_SESSION['simplenews_issue_filter'] : _simplenews_issue_filter_default();\n $filters = simplenews_issue_filters();\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only newsletters which'),\n );\n\n // Filter values are default\n $form['filters']['newsletter'] = array(\n '#type' => 'select',\n '#title' => $filters['newsletter']['title'],\n '#options' => $filters['newsletter']['options'],\n '#default_value' => $session['newsletter'],\n );\n $form['filters']['buttons']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Filter'),\n '#prefix' => '<span class=\"spacer\" />',\n );\n // Add Reset button if filter is in use\n if ($session != _simplenews_issue_filter_default()) {\n $form['filters']['buttons']['reset'] = array(\n '#type' => 'submit',\n '#value' => t('Reset'),\n );\n }\n\n return $form;\n}", "private function setFilter()\n {\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\n }", "public function run()\n {\n \n\n\n\n $filter = new Filter();\n $filter->name = \"Activity\";\n $filter->description = \"Category filter for product colors\";\n $filter->active = true;\n $filter->user_id = 1;\n $filter->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Activity')->first()->id;\n $page->name = 'Training';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Activity')->first()->id;\n $page->name = 'Running';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Activity')->first()->id;\n $page->name = 'Fishing';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Activity')->first()->id;\n $page->name = 'Gardening';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Activity')->first()->id;\n $page->name = 'Hiking';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Activity')->first()->id;\n $page->name = 'Racing';\n $page->save();\n \n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Activity')->first()->id;\n $page->name = 'Workwear';\n $page->save();\n \n $filter = new Filter();\n $filter->name = \"Colors\";\n $filter->description = \"Category filter for product colors\";\n $filter->active = true;\n $filter->user_id = 1;\n $filter->save();\n\n $page = new Attribute();\n $page->name = \"Colors\";\n $page->description = \"Attribute for product colors\";\n $page->active = true;\n $page->user_id = 1;\n $page->save();\n\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Black';\n $page->hex = '#000';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'Black';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Arctic White';\n $page->hex = 'white';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'White';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Storm Gray';\n $page->hex = '#878c93';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'gray';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Polar Blue';\n $page->hex = '#2781c2';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'polar-blue';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Midnight Blue';\n $page->hex = '#1b3c68';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'midnight-blue';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Gray Twist';\n $page->hex = '#74787d';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'gray-twist';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Baja Red';\n $page->hex = '#f94845';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'baja-red';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Charged Coral Twist';\n $page->hex = '#f94845';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'charged-coral-twist';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Teal Teal Punch Twist';\n $page->hex = '#24a2a8';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'teal-teal-punch-twist';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Colors')->first()->id;\n $page->value = 'Cabana Green';\n $page->hex = '#009a71';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Colors')->first()->id;\n $page->name = 'cabana-green';\n $page->save();\n\n\n $filter = new Filter();\n $filter->name = \"Sizes\";\n $filter->description = \"Category filter for product sizes\";\n $filter->active = true;\n $filter->user_id = 1;\n $filter->save();\n\n $page = new Attribute();\n $page->name = \"Sizes\";\n $page->description = \"Attribute for product sizes\";\n $page->active = true;\n $page->user_id = 1;\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Sizes')->first()->id;\n $page->value = 'XS';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Sizes')->first()->id;\n $page->name = 'XS';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Sizes')->first()->id;\n $page->value = 'S';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Sizes')->first()->id;\n $page->name = 'S';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Sizes')->first()->id;\n $page->value = 'M';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Sizes')->first()->id;\n $page->name = 'M';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Sizes')->first()->id;\n $page->value = 'L';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Sizes')->first()->id;\n $page->name = 'L';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Sizes')->first()->id;\n $page->value = 'XL';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Sizes')->first()->id;\n $page->name = 'XL';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Sizes')->first()->id;\n $page->value = 'XXL';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Sizes')->first()->id;\n $page->name = 'XXL';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Sizes')->first()->id;\n $page->value = 'XXXL';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Sizes')->first()->id;\n $page->name = 'XXXL';\n $page->save();\n\n $page = new AttributeValue();\n $page->attribute_id = Attribute::where('name', 'Sizes')->first()->id;\n $page->value = 'XXXXL';\n $page->save();\n\n $page = new FilterTag();\n $page->filter_id = Filter::where('name', 'Sizes')->first()->id;\n $page->name = 'XXXXL';\n $page->save();\n\n\n \n }", "function current_filter()\n {\n }", "public function executeChoose(sfWebRequest $request)\n {\n $this->setLevelAndCaller($request);\n // Initialization of the Search expedition form\n $this->form = new SpecimensSelfFormFilter(array('caller_id'=>$this->caller_id));\n // Remove surrounding layout\n $this->setLayout(false);\n }", "public function filter($queryBuilder, FormInterface $form): void;", "function filter_method_name()\r\n\t{\r\n\t\t// TODO:\tDefine your filter method here\r\n\t}", "public function onSubmit()\n {\n $this->prepareComponent();\n\n $this->defaultSuffix = 'pc-table-body';\n\n $searchWidgetName = $this->toolbarWidget->searchWidget->getName();\n $searchTerm = post($searchWidgetName);\n $this->toolbarWidget->searchWidget->setActiveTerm($searchTerm);\n $this->listWidget->setSearchTerm($searchTerm);\n\n $this->listWidget->setSearchOptions([\n 'mode' => $this->toolbarWidget->searchWidget->mode,\n 'scope' => $this->toolbarWidget->searchWidget->scope,\n ]);\n\n $this->listWidget->prepareVars();\n\n $data = [\n 'componentOptions' => $this->options,\n 'listWidget' => $this->listWidget\n ];\n\n /*\n * Save or reset search term in session\n */\n $this->setActiveTerm(post($this->toolbarWidget->searchWidget->getName()));\n\n /*\n * Trigger class event, merge results as viewable array\n */\n $params = func_get_args();\n //In result there is a return of refreshTableBody method\n $result = $this->fireEvent('pc.list.search.submit', [$params]);\n if ($result && is_array($result)) {\n $result = call_user_func_array('array_merge', $result);\n }\n\n return $this->refreshListTable();\n }", "function get_form_filter() {\n\n $val_ = new OrSysvalue();\n if (!is_null($var_)) {\n foreach ($val_->filter AS $id => $value) {\n //echo '$id [ ' . $id . ' ] = [ ' . $value . ' ] <br>' ;\n if ($id != 'filter_by') {\n if (!$this->filter_use[$id]) {\n $my_filter = new OrFieldHidden($id, 'val_filter[' . $id . ']');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n\n if ($val_->compare[$id] == 'BETWEEN' OR $val_->message[$id . '_II'] != '') {\n $my_filter = new OrFieldHidden($id . '_II', 'val_msg[' . $id . '_II]');\n $my_filter->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_filter->get_tag();\n }\n }\n $my_compare = new OrFieldHidden('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[auto_post]->set(true);\n $my_filter_tag .= $my_compare->get_tag();\n }\n }\n }\n\n\n /* $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_body');\n $my_table->set_col(' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n $my_table->set_row(); */\n $my_table = (' ค้นหา ' . $this->get_control_filter() . ' เรียง ' . $this->get_control_order() . ' ' . $this->get_button_filter() . $my_filter_tag );\n return $my_table;\n }", "public function edit(Filter $filter)\n {\n //\n }", "function minorite_exposed_filters($variables) {\n return drupal_render_children($variables['form']);\n}" ]
[ "0.6391795", "0.63402665", "0.60834455", "0.5925225", "0.58937114", "0.5856125", "0.5801112", "0.5790417", "0.5740966", "0.5717158", "0.56784385", "0.56057435", "0.5585326", "0.5578976", "0.5576083", "0.5572961", "0.55641407", "0.55086225", "0.5496539", "0.548823", "0.54838896", "0.54813385", "0.54723823", "0.5471349", "0.54708767", "0.5463141", "0.54605085", "0.5458963", "0.5443064", "0.5443004", "0.5426095", "0.5405232", "0.53931403", "0.5376995", "0.536835", "0.5348118", "0.5333743", "0.53303885", "0.5326341", "0.532517", "0.53184015", "0.53137976", "0.53065467", "0.52766204", "0.5260858", "0.52532256", "0.5245437", "0.52436924", "0.52350897", "0.5233463", "0.52234566", "0.52186185", "0.5214853", "0.5208772", "0.5206538", "0.5206346", "0.5203638", "0.5203485", "0.51915085", "0.51915085", "0.5188065", "0.5177621", "0.5175852", "0.51713246", "0.51645327", "0.51629156", "0.5159895", "0.5159726", "0.5143962", "0.51413214", "0.5128505", "0.51246256", "0.5114258", "0.5112532", "0.5101441", "0.5097892", "0.5094168", "0.50914323", "0.50914323", "0.50887644", "0.50777227", "0.5073466", "0.5070537", "0.50623965", "0.5059585", "0.5057382", "0.50556076", "0.5051976", "0.50517416", "0.50502956", "0.5046823", "0.5046583", "0.50454026", "0.5045381", "0.50448185", "0.5033859", "0.502841", "0.50282925", "0.50278187", "0.5023557" ]
0.72924733
0
Page callback: Displays all entity bundle add links. Redirects if only one bundle found
function mongo_node_add_page() { $item = menu_get_item(); $content = system_admin_menu_block($item); if (count($content) == 1) { $item = array_shift($content); drupal_goto($item['href']); } return theme('admin_block_content', array('content' => $content)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_add()\n { \n // Render the page\n View::make($this->bundle . '::product.add')->render();\n }", "public function new_bundle() {\n \treturn view('frontend.bundle.new_bundle');\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollection_add_list', array('content' => $content));\n }", "function template_preprocess_multibanner_add_list(&$variables) {\n $variables['bundles'] = [];\n if (!empty($variables['content'])) {\n foreach ($variables['content'] as $bundle) {\n /** @var \\Drupal\\multibanner\\MultibannerBundleInterface $bundle */\n $variables['bundles'][$bundle->id()] = [\n 'type' => $bundle->id(),\n 'add_link' => Link::createFromRoute($bundle->label(), 'multibanner.add', ['multibanner_bundle' => $bundle->id()]),\n 'description' => [\n '#markup' => $bundle->getDescription(),\n ],\n ];\n }\n }\n}", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_host_add_list', array('content' => $content));\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollectionitem_add_list', array('content' => $content));\n }", "protected function getEntityAddURL($entity_type, $bundle) {\n return \"$entity_type/add/$bundle\";\n }", "function dashboard_bundles()\r\n{\r\n\t$Templatic_connector = New Templatic_connector;\r\n\trequire_once(TEVOLUTION_PAGE_TEMPLATES_DIR.'classes/main.connector.class.php' );\t\r\n\tif(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='extend') { \t\r\n\t\t$Templatic_connector->templ_extend();\r\n\t}else if(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='payment-gateways') { \t\r\n\t\t$Templatic_connector->templ_payment_gateway();\r\n\t}else if(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='system_status') { \t\r\n\t\t$Templatic_connector->templ_system_status();\r\n\t}\r\n\telse if((!isset($_REQUEST['tab'])&& @$_REQUEST['tab']=='') || isset($_REQUEST['tab']) && $_REQUEST['tab'] =='overview') { \t\r\n\t\t$Templatic_connector->templ_overview();\r\n\t\t$Templatic_connector->templ_dashboard_extends();\r\n\t}\r\n \r\n}", "public function bundles() {\n $bundles = $this->user->find(Auth::user()->id)->bundles()->get();\n return view('frontend.bundle.list_bundle', compact('bundles'));\n }", "public function beforeActionHook()\n {\n parent::beforeActionHook();\n\n // Bad \"breandcrumb x translator\" usage, @see https://github.com/mhujer/BreadcrumbsBundle/issues/26\n $this->breadcrumbs->addItem($this->translator->trans('title.horaro', [], 'horaro'), $this->generateUrl(\"horaro_schedule_list\"));\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 }", "function ds_extras_vd_bundle_form_submit($form, &$form_state) {\n\n // Save new bundle.\n $record = new stdClass();\n $record->vd = $form_state['values']['vd'];\n $record->label = $form['vd']['#options'][$record->vd];\n drupal_write_record('ds_vd', $record);\n\n // Clear entity cache and field info fields cache.\n cache_clear_all('field_info_fields', 'cache_field');\n cache_clear_all('entity_info', 'cache', TRUE);\n\n // Message and redirect.\n drupal_set_message(t('Bundle @label has been added.', array('@label' => $record->label)));\n $form_state['redirect'] = 'admin/structure/ds/vd';\n}", "function thumbwhere_contentcollection_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollection');\n return $controller->addPage();\n}", "protected function setupHookBundles()\n {\n $bundle = new Zikula_HookManager_SubscriberBundle(\n $this->name, 'subscriber.pages.ui_hooks.pages',\n 'ui_hooks',\n $this->__('Pages Hooks')\n );\n $bundle->addEvent('display_view', 'pages.ui_hooks.pages.display_view');\n $bundle->addEvent('form_edit', 'pages.ui_hooks.pages.form_edit');\n $bundle->addEvent('form_delete', 'pages.ui_hooks.pages.form_delete');\n $bundle->addEvent('validate_edit', 'pages.ui_hooks.pages.validate_edit');\n $bundle->addEvent('validate_delete', 'pages.ui_hooks.pages.validate_delete');\n $bundle->addEvent('process_edit', 'pages.ui_hooks.pages.process_edit');\n $bundle->addEvent('process_delete', 'pages.ui_hooks.pages.process_delete');\n $this->registerHookSubscriberBundle($bundle);\n\n $bundle = new Zikula_HookManager_SubscriberBundle(\n $this->name,\n 'subscriber.pages.filter_hooks.pagesfilter',\n 'filter_hooks', $this->__('Pages Filter Hooks')\n );\n $bundle->addEvent('filter', 'pages.filter_hooks.pages.filter');\n $this->registerHookSubscriberBundle($bundle);\n }", "function mongo_node_bundles($entity_type) {\n $set = mongo_node_settings();\n $base_path = 'admin/structure/mongo-node/' . $entity_type . '/manage';\n\n $header = array(t('Name'), array(\n 'data' => t('Operations'),\n 'colspan' => 4,\n ),\n );\n\n $rows = array();\n\n foreach ($set[$entity_type]['bundles'] as $bundle => $bundle_settings) {\n $rows[] = array(\n array('data' => l($bundle_settings['label'], $base_path . '/' . $bundle)),\n array('data' => l(t('edit'), $base_path . '/' . $bundle . '/edit')),\n array('data' => l(t('manage fields'), $base_path . '/' . $bundle . '/fields')),\n array('data' => l(t('manage display'), $base_path . '/' . $bundle . '/display')),\n array('data' => l(t('delete'), $base_path . '/' . $bundle . '/delete')),\n );\n }\n\n $output = theme('table', array(\n 'rows' => $rows,\n 'header' => $header,\n 'empty' => t('No entities created yet.'),\n )\n );\n\n return $output;\n}", "private function addBundle($bundle)\n {\n if (!in_array($bundle, $this->finalBundles)) {\n if ($bundle instanceof GravitonBundleInterface) {\n $this->bundleStack = array_merge(\n $this->bundleStack,\n $bundle->getBundles()\n );\n }\n\n $this->finalBundles[] = $bundle;\n }\n }", "function ds_extras_vd_manage($bundle = '', $action = '') {\n $entity_info = entity_get_info('ds_views');\n\n if (!empty($bundle) && isset($entity_info['bundles'][$bundle]) && $action == 'remove') {\n return drupal_get_form('ds_extras_vd_bundle_remove', $bundle, $entity_info['bundles'][$bundle]['label']);\n }\n\n if (!empty($bundle) && isset($entity_info['bundles'][$bundle]) && $action == 'display') {\n return ds_extras_vd_field_ui($bundle);\n }\n\n // Redirect to overview.\n drupal_set_message(t('No view found to layout.'));\n drupal_goto('admin/structure/ds/vd');\n}", "function abl_droploader_head_end($evt, $stp) {\n\t\tglobal $event, $step, $prefs, $abl_droploader_prefs;\n\n\t\tif (($event == 'image'\n\t\t\t&& (in_array($step, array('list', 'image_list', 'image_multi_edit', 'image_change_pageby', 'image_save', ''))))\n\t\t|| ($event == 'article'\n\t\t\t&& (in_array($step, array('create', 'edit'))))) {\n\t\t\t$abl_droploader_prefs = abl_droploader_load_prefs();\n\t\t\t$css = '';\n\t\t\tif (intval($abl_droploader_prefs['useDefaultStylesheet']) != 0) {\n\t\t\t\t$css .= '<link rel=\"stylesheet\" href=\"../res/css/abl.droploader-app.css\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\tif ($abl_droploader_prefs['customStylesheet'] != '') {\n\t\t\t\t$css .= '<link rel=\"stylesheet\" href=\"' . $abl_droploader_prefs['customStylesheet'] . '\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\tif ($css == '') {\n\t\t\t\t$css = '<link rel=\"stylesheet\" href=\"../res/css/abl.droploader-app.css\" type=\"text/css\" media=\"screen,projection\" />' . n;\n\t\t\t}\n\t\t\t$article_image_field_ids = '\"' . implode('\", \"', explode(',', $abl_droploader_prefs['articleImageFields'])) . '\"';\n\t\t\t$script = '<script type=\"text/javascript\">\n\tvar file_max_upload_size = ' . sprintf('%F', (intval($prefs['file_max_upload_size']) / 1048576)) . ';\n\tvar file_max_files = 5;\n\tvar image_max_upload_size = 1;\n\tvar image_max_files = ' . intval($abl_droploader_prefs['imageMaxUploadCount']) . ';\n\tvar reload_image_tab = ' . intval($abl_droploader_prefs['reloadImagesTab']) . ';\n\tvar article_image_field_ids = new Array(' . $article_image_field_ids . ');\n\tvar article_image_field = null;\n</script>\n<script src=\"../res/js/jquery.filedrop.js\" type=\"text/javascript\"></script>\n<script src=\"../res/js/jquery.droploader.js\" type=\"text/javascript\"></script>\n<script src=\"../res/js/abl.droploader-app.js\" type=\"text/javascript\"></script>' . n;\n\t\t\techo $css . $script;\n\t\t}\n\n\t}", "function thumbwhere_contentcollectionitem_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollectionitem');\n return $controller->addPage();\n}", "function thumbwhere_host_add_page() {\n $controller = entity_ui_controller('thumbwhere_host');\n return $controller->addPage();\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 }", "function mongo_node_bundle_create_form_submit($form, $form_state) {\n $entity_type = $form_state['values']['entity_type'];\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n\n // @todo - redirect to bundle type page.\n mongo_node_settings_save($set);\n}", "function aab_init() {\r\n elgg_register_action(\"aab/save\", __DIR__ . \"/actions/aab/save.php\");\r\n\t\r\n\t// register the ajax example action do_math\r\n elgg_register_action(\"aab/save\", __DIR__ . \"/actions/aab/do_math.php\");\r\n\r\n // register the page handler\r\n elgg_register_page_handler('aab', 'aab_page_handler');\r\n\r\n // register a hook handler to override urls\r\n elgg_register_plugin_hook_handler('entity:url', 'object', 'aab_set_url');\r\n\t\r\n\t// add a site navigation item\r\n\t$item = new ElggMenuItem('aab', elgg_echo('aab:aabs'), 'aab/all');\r\n\telgg_register_menu_item('site', $item);\r\n\t\r\n}", "protected function setupHookBundles()\n {\n // Subscriber bundles\n\n $bundle = new Zikula_HookManager_SubscriberBundle($this->name, 'subscriber.users.ui_hooks.user', 'ui_hooks', $this->__('User management hooks'));\n $bundle->addEvent('display_view', 'users.ui_hooks.user.display_view');\n \n $bundle->addEvent('form_edit', 'users.ui_hooks.user.form_edit');\n $bundle->addEvent('validate_edit', 'users.ui_hooks.user.validate_edit');\n $bundle->addEvent('process_edit', 'users.ui_hooks.user.process_edit');\n \n $bundle->addEvent('form_delete', 'users.ui_hooks.user.form_delete');\n $bundle->addEvent('validate_delete', 'users.ui_hooks.user.validate_delete');\n $bundle->addEvent('process_delete', 'users.ui_hooks.user.process_delete');\n $this->registerHookSubscriberBundle($bundle);\n \n $bundle = new Zikula_HookManager_SubscriberBundle($this->name, 'subscriber.users.ui_hooks.registration', 'ui_hooks', $this->__('Registration management hooks'));\n $bundle->addEvent('display_view', 'users.ui_hooks.registration.display_view');\n \n $bundle->addEvent('form_edit', 'users.ui_hooks.registration.form_edit');\n $bundle->addEvent('validate_edit', 'users.ui_hooks.registration.validate_edit');\n $bundle->addEvent('process_edit', 'users.ui_hooks.registration.process_edit');\n \n $bundle->addEvent('form_delete', 'users.ui_hooks.registration.form_delete');\n $bundle->addEvent('validate_delete', 'users.ui_hooks.registration.validate_delete');\n $bundle->addEvent('process_delete', 'users.ui_hooks.registration.process_delete');\n $this->registerHookSubscriberBundle($bundle);\n \n // Bundle for the login form\n $bundle = new Zikula_HookManager_SubscriberBundle($this->name, 'subscriber.users.ui_hooks.login_screen', 'ui_hooks', $this->__('Login form and block hooks'));\n $bundle->addEvent('form_edit', 'users.ui_hooks.login_screen.form_edit');\n $bundle->addEvent('validate_edit', 'users.ui_hooks.login_screen.validate_edit');\n $bundle->addEvent('process_edit', 'users.ui_hooks.login_screen.process_edit');\n $this->registerHookSubscriberBundle($bundle);\n\n // Bundle for the login block\n $bundle = new Zikula_HookManager_SubscriberBundle($this->name, 'subscriber.users.ui_hooks.login_block', 'ui_hooks', $this->__('Login form and block hooks'));\n $bundle->addEvent('form_edit', 'users.ui_hooks.login_block.form_edit');\n $bundle->addEvent('validate_edit', 'users.ui_hooks.login_block.validate_edit');\n $bundle->addEvent('process_edit', 'users.ui_hooks.login_block.process_edit');\n $this->registerHookSubscriberBundle($bundle);\n }", "public function addAction()\n {\n return $this->render('OCPlatformBundle:Default:index.html.twig', ['value' => 0]);\n }", "public function addAction()\n {\n global $em, $client, $repository;\n $client = new Client();\n $target = \"http://jobs-stages.letudiant.fr/jobs-etudiants/offres/domaines-2/regions-r3012874/page-1.html\";\n\n # Download the target (store) web page\n $crawler = $client->request('GET', $target);\n\n # Parse all the tables on the web page into an array\n $crawler = $crawler->filter('table');\n\n # Fill search results\n $em = $this->getDoctrine()->getManager();\n\n // createQueryBuilder automatically selects FROM MyBotBundle:Job\n // and aliases it to \"j\"\n $repository = $this->getDoctrine()\n ->getRepository('MyBotBundle:Job');\n\n\n $crawler->filter('tbody > tr')->each(\n function (Crawler $node) {\n global $em, $client, $repository;\n $title = trim($node->filter('td')->eq(1)->text());\n $query = $repository->createQueryBuilder('j')\n ->where('j.title = :title')\n ->setParameter('title', $title)\n ->getQuery();\n\n $job = $query->setMaxResults(1)->getOneOrNullResult();\n if (empty($job)) {\n // insert new job\n $entity = new Job();\n $entity->setTitle($title);\n $entity->setLocalisation(trim($node->filter('td')->eq(2)->text()));\n dump($node->filter('td')->eq(1)->text());\n $link = $node->filter('td > a')->link();\n dump($link, $client);\n $nodeMission = $client->click($link);\n $entity->setMission($nodeMission->filter('h4')->nextAll()->text());\n $em->persist($entity);\n }else {\n dump(\"Job omitted\",$job);\n }\n }\n );\n\n $em->flush();\n\n return $this->redirect($this->generateUrl('job'));\n }", "public function addPage()\n {\n $placements = array(\n array('id' => 'ads.leftbar.banner', 'name' => $this->translate->translate('Left Side')),\n array('id' => 'ads.rightbar.banner', 'name' => $this->translate->translate('Right Side'))\n );\n $this->putitem(\"placements\", $placements);\n\n $view_types = array(\n array('id' => 'serial', 'name' => 'Serial'),\n array('id' => 'carrousel', 'name' => 'Carroussel')\n );\n $this->putitem(\"view_types\", $view_types);\n\n parent::addPage();\n }", "public function archivetalinkcompleteAction() {\n\t\tPageTitle::setTitle($this->view, $this->_request);\n\t\t$session = new Zend_Session_Namespace('archivetalinkcomplete');\n\t\tif (!$session->ta_id) {\n\t\t\t$this->_redirect('/index');\n\t\t\treturn;\n\t\t}\n\t\t$this->view->lo_id = $session->lo_id;\n\t\t$this->view->ta_id = $session->ta_id;\n\t\tunset($session->lo_id);\n\t\tunset($session->ta_id);\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n // On récupére tous les liens\n $entities = $em->getRepository('IsmSiteBundle:Links')->findAll();\n\n return $this->render('IsmSiteBundle:Links:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function add() {\n $entityManager = \\Drupal::entityTypeManager();\n\n $type_id = \\Drupal::request()->query->get('type_id');\n $entity_id = \\Drupal::request()->query->get('entity_id');\n $lang = \\Drupal::request()->query->get('lang');\n $lang = !is_array($lang) ? [$lang] : $lang;\n\n \\Drupal::state()->set('smartcat_api_languages', $lang);\n\n $entity = $entityManager\n ->getStorage($type_id)\n ->load($entity_id);\n\n if (!$entity) {\n throw new NotFoundHttpException(\"Entity $type_id $entity_id not found\");\n }\n\n $selection = [];\n\n $langcode = $entity->language()->getId();\n $selection[$entity->id()][$langcode] = $langcode;\n\n $this->tempStore->set(\\Drupal::service('current_user')->id() . ':' . $type_id, $selection);\n $previousUrl = \\Drupal::request()->server->get('HTTP_REFERER');\n $base_url = Request::createFromGlobals()->getSchemeAndHttpHost();\n $destination = substr($previousUrl, strlen($base_url));\n\n return new RedirectResponse(\n Url::fromRoute('smartcat_translation_manager.settings_more',\n ['entity_type_id' => $type_id],\n ['query' => ['destination' => $destination]]\n )->toString()\n );\n }", "function lb_show_add_record_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'add',\n\t\t)\n\t);\n}", "public function add()\n {\n // get request\n $request = $this->getRequest()->request;\n // get product ID from request\n $product_id = $request['a'];\n // get product ids from session\n $compareProducts = $this->View()->getSession('compare')?$this->View()->getSession('compare'):array();\n\n if (!in_array($product_id, $compareProducts)) {\n $compareProducts[] = $product_id;\n }\n // set products to session\n $this->View()->setSession('compare', $compareProducts);\n\n // for ajax request\n if ($request['XHR']) {\n die(json_encode([\n 'success' => true,\n 'message' => $this->View()->translating('compare_item_set'),\n 'count' => count($compareProducts),\n ]));\n }\n\n Router::redirect('compare');\n }", "public function actionAdditionalListing()\n \t {\n \t \tob_start();\n \t \tYii::app()->theme='back';\n \n $rec=AdditionalServices::model()->findAll();\n \t \t$this->render('additionallisting',array('list'=>$rec));\n \t }", "public function Admin_Action_Default() {\n $user = &GetUser ();\n\n\t\t$userLists = $user->GetLists();\n\t\t$userListsId = array_keys($userLists);\n\t\tif (sizeof($userListsId) < 1) {\n\t\t\t$GLOBALS['Intro_Help'] = GetLang('Addon_dynamiccontenttags_Form_Intro');\n\t\t\t$GLOBALS['Intro'] = GetLang('Addon_dynamiccontenttags_ViewHeading');\n\t\t\t$GLOBALS['Lists_AddButton'] = '';\n\n\t\t\tif ($user->CanCreateList() === true) {\n\t FlashMessage(sprintf(GetLang('Addon_dynamiccontenttags_Tags_NoLists'), GetLang('Addon_dynamiccontenttags_ListCreate')), SS_FLASH_MSG_SUCCESS);\n\t $GLOBALS['Message'] = GetFlashMessages ();\n\t\t\t\t$GLOBALS['Lists_AddButton'] = $this->template_system->ParseTemplate('Dynamiccontenttags_List_Create_Button', true);\n\t\t\t} else {\n\t FlashMessage(sprintf(GetLang('Addon_dynamiccontenttags_Tags_NoLists'), GetLang('Addon_dynamiccontenttags_ListAssign')), SS_FLASH_MSG_SUCCESS);\n\t $GLOBALS['Message'] = GetFlashMessages ();\n\t\t\t}\n\t\t\t$this->template_system->ParseTemplate('Dynamiccontenttags_Subscribers_No_Lists');\n\t\t\treturn;\n\t\t}\n\n $this->template_system->Assign ( 'AdminUrl', $this->admin_url, false );\n $this->sortDetails = $this->GetSortDetails ();\n\n $this->perPage = intval($this->_getGETRequest('PerPageDisplay', 0));\n if (!$this->perPage) {\n $this->perPage = $this->GetPerPage();\n }\n $displayPage = $this->GetCurrentPage();\n if ($this->perPage != 'all') {\n $this->start = ($displayPage - 1) * $this->perPage;\n }\n $this->loadTags ();\n\n $numberOfTags = $this->getTagsSize ();\n\n $create_button = $this->template_system->ParseTemplate ( 'Create_Button', true, false );\n $this->template_system->Assign ( 'Tags_Create_Button', $create_button, false );\n\n $this->template_system->Assign ( 'ShowDeleteButton', true );\n\n $flash_messages = GetFlashMessages ();\n\n $this->template_system->Assign ( 'FlashMessages', $flash_messages, false );\n\n if (! isset ( $GLOBALS ['Message'] )) {\n $GLOBALS ['Message'] = '';\n }\n\n $userid = $user->Get ( 'userid' );\n if ($user->Admin ()) {\n $userid = 0;\n }\n\n if ($numberOfTags == 0) {\n $curr_template_dir = $this->template_system->GetTemplatePath ();\n\n $this->template_system->SetTemplatePath ( SENDSTUDIO_TEMPLATE_DIRECTORY );\n $GLOBALS ['Success'] = GetLang ( 'Addon_dynamiccontenttags_NoTagsListPage' );\n\n $msg = $this->template_system->ParseTemplate ( 'successmsg', true );\n $this->template_system->SetTemplatePath ( $curr_template_dir );\n\n $this->template_system->Assign ( 'Addon_Tags_Empty', $msg, false );\n\n $this->template_system->ParseTemplate ( 'manage_empty' );\n return;\n }\n\n $this->template_system->Assign ( 'ApplicationUrl', $this->application_url, false );\n\n $this->template_system->Assign ( 'EditPermission', true );\n\n $this->template_system->Assign ( 'DeletePermission', true );\n\n $paging = $this->SetupPaging ( $this->admin_url, $numberOfTags);\n $this->template_system->Assign ( 'Paging', $paging, false );\n $this->template_system->Assign ( 'DateFormat', GetLang ( 'DateFormat' ) );\n\n $tmpTags = array ();\n foreach ( $this->tags as $k => $v ) {\n \t$tmpUser = GetUser($v->getOwnerId());\n $tmpTags [$k] ['tagid'] = $v->getTagId ();\n $tmpTags [$k] ['name'] = $v->getName ();\n $tmpTags [$k] ['createdate'] = $v->getCreatedDate ();\n $tmpTags [$k] ['ownerid'] = $v->getOwnerId();\n $tmpTags [$k] ['ownerusername'] = $tmpUser->username;\n }\n\n $this->template_system->Assign ( 'tags', $tmpTags );\n $this->template_system->ParseTemplate ( 'manage_display' );\n\n }", "#[MenuItem(title: 'Accounts', menu: 'admin', activeCriteria: 'admin_security_', role: 'ROLE_ADMIN', sub: [\n new SubmenuItem(title: 'Gebruikers', path: 'admin_security_index'),\n new SubmenuItem(title: 'API', path: 'admin_security_client_index'),\n ])]\n #[Route('/', name: 'index', methods: ['GET', 'POST'])]\n public function indexAction(): Response\n {\n $accounts = $this->em->getRepository(LocalAccount::class)->findAll();\n\n return $this->render('admin/security/index.html.twig', [\n 'accounts' => $accounts,\n ]);\n }", "function OnAddItem(){\n $this->_data = $this->Request->Form;\n $this->OnBeforeCreateEditControl();\n if (! $this->error) {\n \t$this->InitItemsEditControl();\n if ($this->disabled_add) {\n if (strlen($this->host_library_ID)) {\n $this->library_ID = $this->host_library_ID;\n }\n /**\n * @todo fix here (recursion)\n */\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE[]=LIBRARY_DISABLED_ADD\" . \"&\" . $this->restore);\n }\n\n }\n }", "public function addRevision()\n {\n $this->check_sess($this->session->user_logged);\n\t\t$this->load->view('head');\n\t\t$this->load->view('sclerk_sidebar');\n\n\t\t$this->load->view('search_officer', $this->response);\n\t\t$this->load->view('footer');\n }", "public function add()\n\t{\n\t\tif (!parent::add())\n\t\t{\n\t\t\t// Redirect to the return page.\n\t\t\t$this->setRedirect($this->getReturnPage());\n\t\t}\n\t}", "public function add()\n\t{\n\t\tif (!parent::add())\n\t\t{\n\t\t\t// Redirect to the return page.\n\t\t\t$this->setRedirect($this->getReturnPage());\n\t\t}\n\t}", "public function setRelatedBundlesForSimpleProducts($bundleProduct)\n {\n $selectionCollection = $bundleProduct->getTypeInstance(true)->getSelectionsCollection(\n $bundleProduct->getTypeInstance(true)->getOptionsIds($bundleProduct), $bundleProduct\n );\n foreach($selectionCollection as $option) {\n try {\n $_product = Mage::getModel('catalog/product')->load($option->getEntityId());\n if($_product->getId()) {\n $customLinkData = array();\n foreach($_product->getRelatedBundleCollection() as $customLink) {\n $customLinkData[$customLink->getLinkedProductId()]['position'] = $customLink->getPosition();\n }\n $customLinkData[$bundleProduct->getId()] = array('position' => 0);\n $_product->setRelatedBundleData($customLinkData)->save();\n Mage::getSingleton('adminhtml/session')->addSuccess('Added ' . $bundleProduct->getSku() . ' as a Related Bundle to product ' . $_product->getSku());\n }\n } catch(Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError('Could not set bundled product as Related Bundle for product ' . $option->getSku() . '; ' . $e->getMessage());\n }\n }\n\n }", "public function listing($entity_type) {\n\n $templates_ids = $this->entityTypeManager->getStorage('cohesion_content_templates')->getQuery()->execute();\n\n if ($templates_ids) {\n $candidate_template_storage = $this->entityTypeManager->getStorage('cohesion_content_templates');\n $candidate_templates = $candidate_template_storage->loadMultiple($templates_ids);\n $bundles = [];\n foreach ($candidate_templates as $entity) {\n if (!isset($bundles[$entity->get('entity_type')])) {\n $bundles[$entity->get('entity_type')] = $entity->get('entity_type');\n }\n }\n\n $entity_types = $this->entityTypeManager->getDefinitions();\n foreach ($bundles as $entity_type_name) {\n $entity_type = $entity_types[$entity_type_name];\n $types[$entity_type_name] = [\n 'label' => ($entity_type->get('bundle_label')) ? $entity_type->get('bundle_label') : $entity_type->get('label'),\n 'description' => t('Manage your @settings_label templates', ['@settings_label' => strtolower($entity_type->getLabel())]),\n 'add_link' => Link::createFromRoute($entity_type->getLabel(), 'entity.cohesion_content_templates.collection', ['content_entity_type' => $entity_type_name]),\n ];\n }\n\n $build = [\n '#theme' => 'entity_add_list',\n '#bundles' => $types,\n '#add_bundle_message' => t('There are no available content templates. Go to the batch import page to import the list of content templates.'),\n '#cache' => [\n 'contexts' => $this->entityTypeDefinition->getListCacheContexts(),\n 'tags' => $this->entityTypeDefinition->getListCacheTags(),\n ],\n ];\n\n return $build;\n }\n else {\n throw new NotFoundHttpException();\n }\n }", "abstract public function bundle();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminCommonBundle:LocalBanner')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function bundleTags($entity_type_id, $bundle) {\n $storage = \\Drupal::entityTypeManager()->getStorage($entity_type_id);\n $entity_ids = $storage->getQuery()->accessCheck(TRUE)->condition('type', $bundle)->execute();\n $page = [];\n\n $entities = $storage->loadMultiple($entity_ids);\n foreach ($entities as $entity) {\n $page[$entity->id()] = [\n '#markup' => $entity->label(),\n ];\n }\n $page['#cache']['tags'] = [$entity_type_id . '_list:' . $bundle];\n return $page;\n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MesdHelpWikiBundle:Link')->findAll();\n\n return $this->render('MesdHelpWikiBundle:Link:list.html.twig', array(\n 'entities' => $entities,\n 'menu' => new Menu(),\n ));\n }", "private function _bindFrontEndEvents() {\n\n if(AstuteoToolkit::$plugin->getSettings()->includeFeEdit) {\n Event::on(\n View::class,\n View::EVENT_END_BODY,\n function (Event $e)\n {\n $element = Craft::$app->getUrlManager()->getMatchedElement();\n if (!$element) return;\n\n if (\n $this->_shouldLoadAssets()\n ) {\n echo '<a\n href=\"' . $element->cpEditUrl . '\"\n class=\"astuteo-edit-entry\"\n target=\"_blank\"\n rel=\"noopener\"\n >Edit Entry</a>';\n }\n }\n );\n }\n if ($this->_shouldLoadAssets() && !Craft::$app->request->getIsAjax() && !Craft::$app->request->getIsConsoleRequest()) {\n Craft::$app->getView()->registerAssetBundle(AstuteoToolkitAsset::class);\n }\n }", "function callbackAddLinks($hookName, $args) {\n\t\t$request =& $this->getRequest();\n\t\tif ($this->getEnabled() && is_a($request->getRouter(), 'PKPPageRouter')) {\n\t\t\t$templateManager = $args[0];\n\t\t\t$currentJournal = $templateManager->get_template_vars('currentJournal');\n\t\t\t$announcementsEnabled = $currentJournal ? $currentJournal->getSetting('enableAnnouncements') : false;\n\n\t\t\tif (!$announcementsEnabled) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$displayPage = $currentJournal ? $this->getSetting($currentJournal->getId(), 'displayPage') : null;\n\n\t\t\t// Define when the <link> elements should appear\n\t\t\t$contexts = 'frontend';\n\t\t\tif ($displayPage == 'homepage') {\n\t\t\t\t$contexts = array('frontend-index', 'frontend-announcement');\n\t\t\t} elseif ($displayPage == 'announcement') {\n\t\t\t\t$contexts = 'frontend-' . $displayPage;\n\t\t\t}\n\n\t\t\t$templateManager->addHeader(\n\t\t\t\t'announcementsAtom+xml',\n\t\t\t\t'<link rel=\"alternate\" type=\"application/atom+xml\" href=\"' . $request->url(null, 'gateway', 'plugin', array('AnnouncementFeedGatewayPlugin', 'atom')) . '\">',\n\t\t\t\tarray(\n\t\t\t\t\t'contexts' => $contexts,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$templateManager->addHeader(\n\t\t\t\t'announcementsRdf+xml',\n\t\t\t\t'<link rel=\"alternate\" type=\"application/rdf+xml\" href=\"'. $request->url(null, 'gateway', 'plugin', array('AnnouncementFeedGatewayPlugin', 'rss')) . '\">',\n\t\t\t\tarray(\n\t\t\t\t\t'contexts' => $contexts,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$templateManager->addHeader(\n\t\t\t\t'announcementsRss+xml',\n\t\t\t\t'<link rel=\"alternate\" type=\"application/rss+xml\" href=\"'. $request->url(null, 'gateway', 'plugin', array('AnnouncementFeedGatewayPlugin', 'rss2')) . '\">',\n\t\t\t\tarray(\n\t\t\t\t\t'contexts' => $contexts,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn false;\n\t}", "public function addAdminMenuPage()\n\t{\n\t\t$menuPage = &ModelAdminMenu::getScheme();\n\n\t\tforeach ( $menuPage as $menu ) {\n\t\t\t$callback = array_keys( $menu );\n\t\t\t$paramArr = array_values( $menu );\n\n\t\t\t$this->_adminMenuPage( $callback[0], $paramArr[0]['parameters'] );\n\t\t}\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n $repository = $em->getRepository('\\Acme\\bsceneBundle\\Entity\\Organization');\n\n \n $organizationList = $repository->findAll();\n if(count($organizationList) > 0)\n {\n \n return $this->render('AcmebsceneBundle:Organization:organizationList.html.twig',array('orgList' => $organizationList));\n }\n else \n {\n return $this->render('AcmebsceneBundle:Organization:organizationList.html.twig',array('orgList' => NULL,'errormessage' => \"No organization list found\"));\n\n }\n }", "protected function instantAdd() {\r\n\t\t$this->redirect(array('action' => 'edit', 'id' => $this->{$this->modelClass}->bsAdd()));\r\n }", "public function viewProductAction(){\n $request = $this->getRequest();\n $session = $request->getSession();\n $company_id = $session->get('id');\n $role = $session->get('role');\n if ($role == 'company'){\n $em = $this->getDoctrine()->getEntityManager();\n $productsBrands = $em->getRepository('SiteSavalizeBundle:ProductBrand')->displayCompanyProducts($company_id);\n $brands = $this->getDoctrine()->getEntityManager()->getRepository('SiteSavalizeBundle:Brand')->findByCompany(array('id' =>$company_id));\n\n $p = array();\n $b = array();\n\n for($i=0; $i<count($brands); $i++)\n {\n $b[$i]= $brands[$i]->getName();\n }\n \n for($i=0; $i<count($productsBrands); $i++)\n {\n $p[$i] = $productsBrands[$i]->getProduct()->getName();\n }\n\n $repository = $this->getDoctrine()->getEntityManager()->getRepository('SiteSavalizeBundle:Category');\n $categories = $repository->categoryAutocomplete();\n }\n return $this->render('SiteSavalizeBundle:Company:newproduct.html.twig' , array(\n 'brands' => $b , 'products' => $p,\n 'categories' => $categories));\n \n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $extras = $em->getRepository('AlbaBundle:Extra')->findAll();\n\n return $this->render('AlbaBundle:Extra:index.html.twig', array(\n 'extras' => $extras,\n ));\n }", "public function addAction()\r\n {\r\n $brokerForm = new BrokerForm();\r\n $brokerForm->get('submit')->setAttribute('label', 'Add');\r\n\r\n $addressForm = new AddressForm();\r\n\r\n //haal de Country Web Form op en vul de landen select box met aanwezige landen\r\n $addressForm = new AddressForm();\r\n //set countryname select options\r\n $countryOptions = $this->getEntityManager()\r\n ->getRepository('WwtgRealEstate\\Entity\\Country')\r\n ->selectOptionsArray();\r\n $addressForm->get('countryName')->setValueOptions($countryOptions);\r\n\r\n //set LocationName select options\r\n $locationOptions = $this->getEntityManager()\r\n ->getRepository('WwtgRealEstate\\Entity\\Location')\r\n ->selectOptionsArray();\r\n $addressForm->get('locationName')->setValueOptions($locationOptions);\r\n\r\n //set AreaName select options\r\n $areaOptions = $this->getEntityManager()\r\n ->getRepository('WwtgRealEstate\\Entity\\Area')\r\n ->selectOptionsArray();\r\n $addressForm->get('locationName')->setValueOptions($areaOptions);\r\n\r\n\r\n $request = $this->getRequest();\r\n if ($request->isPost()) {\r\n\r\n\r\n $broker = new Broker();\r\n $brokerForm->setInputFilter($broker->getInputFilter());\r\n $brokerForm->setData($request->getPost());\r\n\r\n $address = new Address();\r\n $addressForm->setInputFilter($address->getInputFilter());\r\n $addressForm->setData($request->getPost());\r\n\r\n if ($brokerForm->isValid() && $countryForm->isValid()) {\r\n\r\n $broker->populate($brokerForm->getData());\r\n\r\n\r\n $this->getEntityManager()->persist($broker);\r\n $this->getEntityManager()->flush();\r\n\r\n //redirect to list of albums\r\n return $this->redirect()->toRoute('real-estate');\r\n }\r\n }\r\n\r\n return array(\r\n 'brokerForm' => $brokerForm,\r\n 'addressForm' => $addressForm,\r\n );\r\n }", "public function addAction() {\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\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 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 addlinks(){\n Vtiger_Link::addLink(0, 'HEADERSCRIPT', 'LSWYSIWYG', 'modules/LSWYSIWYG/resources/WYSIWYG.js','','','');\n\n\t}", "public function home():Response {\n // $url = $this->generateUrl( 'app_bien_biensactifs', ['noproj'=>143]);\n // var_dump ($url); die ('test generateUrl');\n\n // recup du repository des biens\n $bienrep = $this->getDoctrine()->getRepository(Bien::class);\n // recup des biens\n $biens = $bienrep->findAll();\n\n\n return $this->render('Bien/listeBiens.html.twig', [ 'biens'=>$biens]);\n }", "public function indexAction() {\n\t\t$this->_helper->redirector ( 'list', 'invoices', 'admin' );\n\t}", "public function addAdminMenuEntries(): void {\n foreach ($this->adminPages as $page) {\n (new $page($this->container));\n }\n }", "public function indexAction() {\n //GET NAVIGATION\n $this->view->navigationStoreGlobal = Engine_Api::_()->getApi('menus', 'core')\n\t\t\t\t->getNavigation('sitestore_admin_main_settings', array(), 'sitestore_admin_main_global_store'); \n \n $this->view->hasLanguageDirectoryPermissions = $hasLanguageDirectoryPermissions = Engine_Api::_()->getApi('language', 'sitestore')->hasDirectoryPermissions();\n \n $sitestore_global_form_content = array('sitestore_location', 'sitestore_report', 'sitestore_share', 'sitestore_socialshare', 'sitestore_printer', 'sitestore_tellafriend', 'sitestore_captcha_post', 'sitestore_proximitysearch', 'sitestore_checkcomment_widgets', 'sitestore_sponsored_image', 'sitestore_sponsored_color', 'sitestore_feature_image', 'sitestore_featured_color', 'sitestore_store', 'sitestore_proximity_search_kilometer', 'sitestore_addfavourite_show', 'sitestore_title_truncation', 'sitestore_claimlink', 'sitestore_claim_show_menu', 'sitestore_contact', 'sitestore_requried_description', 'sitestore_status_show', 'sitestore_manageadmin', 'sitestore_layoutcreate', 'sitestore_communityads', 'sitestore_profile_fields', 'sitestore_locationfield', 'sitestore_price_field', 'sitestore_category_edit', 'sitestore_package_enable', 'submit', \"sitestore_payment_benefit\", 'sitestore_network', \"sitestore_networks_type\", \"sitestore_browseorder\", 'sitestore_requried_photo', 'sitestore_showmore', 'sitestore_show_menu', \"sitestore_default_show\", 'sitestore_map_sponsored', \"sitestore_photolightbox_show\", 'sitestore_photolightbox_bgcolor', 'sitestore_photolightbox_fontcolor', \"sitestore_map_city\", \"sitestore_addfavourite_show\", \"sitestore_map_zoom\", \"sitestore_feed_type\", \"sitestore_manifestUrlP\", \"sitestore_manifestUrlS\", \"sitestore_mylike_show\", \"sitestore_categorywithslug\", \"sitestoreshow_navigation_tabs\", \"sitestore_postedby\", \"sitestore_fs_markers\", \"sitestore_claim_email\", \"sitestore_css\",\"sitestore_code_share\",\"sitestore_postfbstore\", \"translation_file\", \"sitestore_description_allow\", \"sitestore_multiple_location\", \"sitestore_automatically_like\", \"language_phrases_stores\", \"language_phrases_store\", \"sitestore_tinymceditor\", \"sitestore_default_show\",\"seaocore_common_css\", \"sitestore_network\", \"send_cheque_to\", \"sitestoreproduct_weight_unit\", \"sitestoreproduct_navigationtabs\", \"is_sitestore_admin_driven\", \"sitestore_hide_left_container\", \"sitestore_show_tabs_without_content\", \"sitestore_payment_for_orders\", \"sitestore_allowed_payment_gateway\", \"sitestore_admin_gateway\", \"is_section_allowed\", \"sitestore_shipping_extra_content\", \"sitestore_virtual_product_shipping\", \"sitestore_publish_facebook\", \"sitestore_allow_printingtag\", \"sitestore_fixed_text\", \"sitestore_checkout_fixed_text_value\", \"sitestore_terms_conditions\", \"sitestore_slding_effect\",\"sitestore_minimum_shipping_cost\", \"sitestore_defaultpagecreate_email\", \"sitestore_package_information\", \"sitestore_package_view\", \"sitestoreproduct_paymentmethod\");\n \n $pluginName = 'sitestore';\n if (!empty($_POST[$pluginName . '_lsettings']))\n $_POST[$pluginName . '_lsettings'] = @trim($_POST[$pluginName . '_lsettings']); \n \n include_once APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license1.php';\n \n if ($this->getRequest()->isPost()) {\n if(!empty($_POST['sitestore_package_information'])) {\n if(Engine_Api::_()->getApi('settings', 'core')->hasSetting('sitestore_package_information')) {\n Engine_Api::_()->getApi('settings', 'core')->removeSetting('sitestore_package_information');\n }\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore.package.information', $_POST['sitestore_package_information']);\n }\n }\n $newLocation = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.map.city', \"World\");\n if(!empty($oldLocation) && !empty($newLocation))\n $this->setDefaultMapCenterPoint($oldLocation, $newLocation);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $mainGalleries = $em->getRepository('AppBundle:MainGallery')->findAll();\n\n return $this->render('@AppBundle/Resources/views/admin/maingallery/index.html.twig', array(\n 'mainGalleries' => $mainGalleries,\n ));\n }", "public function addSearchPageAction()\r\n\t{\r\n\t\t$firstLanguageDocument = $this->getFirstLanguageDocument();\r\n\r\n\t\t// Create document in tree for search\r\n\t\t$document = $this->createDocument('search', 'search', 'search', '', $firstLanguageDocument, 'Zoeken', true);\r\n\r\n\t\t// Add Document to website config\r\n\t\t$this->addWebsiteSetting('search_document', 'document', $document->getId());\r\n\r\n\t\t$this->_helper->json(\r\n\t\t\tarray(\r\n\t\t\t\t\"success\" => true,\r\n\t\t\t),\r\n\t\t\tfalse\r\n\t\t);\r\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 addLinks()\n {\n if (isset($_GET['page']) == 'bolsista'):\n $css = [\n plugins_url(Path::PLGCSS . 'bootstrap.min.css'),\n plugins_url(Path::PLGCSS . 'custom.css'),\n ];\n\n $js = [\n plugins_url(Path::PLGJS . 'bootstrap.min.js'),\n plugins_url(Path::PLGJS . 'js-view.js')\n ];\n $this->insertCSS($css);\n $this->insertJS($js);\n\n else:\n $css = [\n plugins_url(Path::PLGCSS . 'bootstrap.min.css'),\n plugins_url(Path::PLGCSS . 'custom.css')\n ];\n $js = [\n plugins_url(Path::PLGJS . 'bootstrap.min.js'),\n plugins_url(Path::PLGJS . 'js-view.js')\n ];\n $this->insertCSS($css);\n $this->insertJS($js);\n endif;\n }", "public function showAction($slug)\n\n\n {\n\n\n $em = $this->getDoctrine()->getManager();\n \n\n /*\n * i Get my current page\n */\n $page = $em->getRepository('ScoutBundle:Page')->findOneBySlug($slug);\n /*\n * i build translation link for my current page\n */\n\n // if(!empty( $pageslider))\n $pagesliders = $page->getSlider();\n if(!empty( $pagesliders))\n {$pageslider = $pagesliders;}\n else{\n $pageslider = $em->getRepository('ScoutBundle:Slider')->find(1); }\n\n \n $translationsLink = false;\n $translations = $page->getTranslations();\n\n if(!empty($translations) and count($translations) > 0){\n $translation = $translations[0]; //TODO : have to be dynamise if you want to manage more than 1 langage\n $translationsLink = $this->generateUrl('page_show',['_locale' => $translation->getLang(),'slug' => $translation->getSlug()]);\n }else{\n $translationsLink = $this->generateUrl('page_show',['_locale' => $page->getLang(),'slug' => $page->getSlug()]);}\n\n\n //die($page->getLang());\n //$lastestnews = $em->getRepository('WebBundle:Page')->findLatestNews($locale,$this->arrayCategoryNewsTitle[$locale]);\n //cant stay like this\n //$social = $em->getRepository(\"WebBundle:SocialEntry\")->findOneBy([],[\"publishedAt\" => \"DESC\"]);\n// if( $page->getLang() == $locale)\n// {\n// $pager = $page;\n// }else{\n//\n// $translations = $page->getTranslations();\n// if(!empty($translations)){\n// $pager = $translations[0];\n// }\n// }\n// $servicePages = $em->getRepository('ScoutBundle:Page')->findByCategoryName($locale, \"Service\");\n// $smartbuyPages = $em->getRepository('ScoutBundle:Page')->findByCategoryName($locale, \"Smartbuy\");\n\n return $this->render('page/show.html.twig', array(\n 'page' => $page,\n 'translationsLink' => $translationsLink,\n 'pageslider' => $pageslider\n ));\n\n\n }", "function performRedirect() {\n if($this->action == 'add' && !empty($this->request->data['VettingStep']['plugin'])) {\n // Redirect to the appropriate plugin to set up whatever it wants\n \n $pluginName = filter_var($this->request->data['VettingStep']['plugin'],FILTER_SANITIZE_SPECIAL_CHARS);\n $modelName = $pluginName;\n $pluginModelName = $pluginName . \".\" . $modelName;\n \n $target = array();\n $target['plugin'] = Inflector::underscore($pluginName);\n $target['controller'] = Inflector::tableize($modelName);\n $target['action'] = 'edit';\n $target[] = $this->_targetid;\n \n $this->redirect($target);\n } else {\n parent::performRedirect();\n }\n }", "public function indexAction()\n {\n $pagination = $this->common->getList('Links', null, 'position');\n return $this->render('SiteAdminBundle:Links:index.html.twig', array(\n 'pagination' => $pagination\n ));\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 jpa_menu_administrator()\n{\n add_menu_page(JPA_NOMBRE,JPA_NOMBRE,'manage_options',JPA_RUTA . '/admin/jpa-configuration.php');\n add_submenu_page(JPA_RUTA . '/admin/jpa-configuration.php','Add resource','Add resource','manage_options',JPA_RUTA . '/admin/jpa-add_resource.php');\n}", "public function index()\n {\n $this->permission->check_label('add_variant')->create()->redirect();\n\n $content = $this->lvariant->variant_add_form();\n $this->template_lib->full_admin_html_view($content);\n }", "public function add() {\r\n if(isset($this->data) && isset($this->data['Product'])) {\r\n $product = $this->Product->save($this->data);\r\n $this->set('response', array('Products' => $this->Product->findByProductid($product['Product']['ProductID'])));\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'view', $product['Product']['ProductID']), true);\r\n } else {\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'index'), true);\r\n }\r\n }", "protected function setupBundle() {\n if (empty($this->bundle)) {\n $this->bundle = $this->entityTypeId;\n }\n }", "function onAction()\n {\n// global $application;\n// $request = &$application->getInstance('Request');\n $pag_rows = modApiFunc('request', 'getValueByKey', 'rows');\n $pag_name = modApiFunc('request', 'getValueByKey', 'pgname');\n if (strpos($pag_name, 'Catalog_ProdsList_')===0)\n {\n\t if ($pag_rows > 99) $pag_rows = 99;\n $cid = intval(substr($pag_name, 18));\n modApiFunc('CProductListFilter','changeCurrentCategoryId',$cid);\n }\n elseif (strpos($pag_name, 'Manufacturer_ProdsList_')===0)\n {\n $mnf_id = intval(substr($pag_name, 23));\n modApiFunc('CProductListFilter', 'changeCurrentManufactureId', $mnf_id, true);\n }\n $this->pPaginator->setPaginatorPage($pag_name, 1);\n $this->pPaginator->setPaginatorRows($pag_name, $pag_rows);\n// $this->pPaginator->savePaginators();\n }", "public function indexAction() {\n\t\t\t$page_menu = $this->getPageMenu();\n\t\t\tif ( 'options' === $page_menu[ $this->getResultId() ]['type'] ) {\n\t\t\t\t$this->showOptions();\n\t\t\t} else {\n\t\t\t\t$this->showPage();\n\t\t\t}\n\t\t}", "function dolist_messages_mail_admin_bundle_form_submit($form, &$form_state) {\n\n $bundle = new stdClass();\n\n if(!$form_state['values']['locked']) {\n $bundle->bundle = trim($form_state['values']['bundle']);\n } else {\n $bundle->bundle = $form['#messages_bundle']->bundle;\n }\n\n $bundle->locked = 1;\n\n $bundle->name = trim($form_state['values']['name']);\n\n $variables = $form_state['values'];\n\n // Remove everything that's been saved already - whatever's left is assumed\n // to be a persistent variable.\n foreach ($variables as $key => $value) {\n if (isset($bundle->$key)) {\n unset($variables[$key]);\n }\n }\n\n unset($variables['form_token'], $variables['op'], $variables['submit'], $variables['delete'], $variables['reset'], $variables['form_id'], $variables['form_build_id']);\n\n\n $status = dolist_messages_mail_bundle_save($bundle);\n\n $t_args = array('%name' => $bundle->name);\n\n if ($status == SAVED_UPDATED) {\n drupal_set_message(t('The message bundle %name has been updated.', $t_args));\n }\n elseif ($status == SAVED_NEW) {\n drupal_set_message(t('The message bundle %name has been added.', $t_args));\n watchdog('node', 'Added message bundle %name.', $t_args, WATCHDOG_NOTICE, l(t('view'), 'admin/structure/dolist/messagesmail'));\n }\n\n $form_state['redirect'] = 'admin/structure/dolist/messagesmail';\n return;\n}", "function _wp_auto_add_pages_to_menu($new_status, $old_status, $post)\n {\n }", "public function addAction()\n {\n $manager = $this->getDI()->get('core_category_manager');\n $this->view->form = $manager->getForm();\n }", "public function init(){\r\n\t\t\tparent::init();\r\n\t\t\t$this->breadcrumbs->addStep('Account', $this->getUrl(null, 'account'));\r\n\t\t}", "function apachesolr_index_set_bundles($env_id, $entity_type, array $bundles) {\n $transaction = db_transaction();\n try {\n db_delete('apachesolr_index_bundles')\n ->condition('env_id', $env_id)\n ->condition('entity_type', $entity_type)\n ->execute();\n\n if ($bundles) {\n $insert = db_insert('apachesolr_index_bundles')\n ->fields(array('env_id', 'entity_type', 'bundle'));\n\n foreach ($bundles as $bundle) {\n $insert->values(array(\n 'env_id' => $env_id,\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ));\n }\n $insert->execute();\n }\n }\n catch (Exception $e) {\n $transaction->rollback();\n // Re-throw the exception so we are aware of the failure.\n throw $e;\n }\n}", "function invoice_mass_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'invoice_mass_add';\n $page_data['page_title'] = get_phrase('add_mass_invoice');\n $this->load->view('backend/index', $page_data);\n }", "public function on_page_view(){\n $this->runTemplateSubController();\n // lightbox enabled?\n if( (bool) $this->lightboxEnable ){\n $this->addHeaderItem( $this->getHelper('html')->css('flexry-lightbox.min.css', 'flexry') );\n if( (bool) $this->autoIncludeJsInFooter ){\n $this->addFooterItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }else{\n $this->addHeaderItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }\n }\n // output function to execute deferreds\n $this->addHeaderItem( $this->getHelper('html')->javascript('libs/modernizr.js', 'flexry') );\n $this->addFooterItem('<script type=\"text/javascript\">'.$this->getHelper('file')->getContents(DIR_PACKAGES . '/flexry/' . DIRNAME_BLOCKS . '/flexry_gallery/inline_script.js.txt').'</script>');\n }", "public function advertizeAction() {\n\t\t// Init variables\n\t\t$result = '';\n\t\t$yaml = new sfYamlParser();\n\n\t\t// Get settings\n\t\t$settings = $this->configurationManager->getConfiguration('Settings');\n\n\t\t$listOfUids = explode(',', $settings['listOfUid']);\n\t\tforeach ($listOfUids as $uid) {\n\t\t\t$feed = $this->feedRepository->findByUid($uid);\n\n\t\t\t$configuration = $yaml->parse($feed['configuration']);\n\t\t\t$this->checkConfiguration($configuration);\n\n\t\t\t$feedUrl = $configuration['baseURL'];\n\n\t\t\t/** @var $contentObject tslib_cObj */\n\t\t\t$config['returnLast'] = 'url';\n\t\t\t$config['parameter.']['data'] = 'leveluid:0';\n\t\t\t$config['additionalParams'] = '&type=9090&uid=' . $uid;\n\t\t\t$contentObject = $this->configurationManager->getcontentObject();\n\t\t\t$feedUrl =\n\n\t\t\t$result .= '<link rel=\"alternate\"\n\t\t\t\ttype=\"application/atom+xml\"\n\t\t\t\ttitle=\"' . $feed['title'] . '\"\n\t\t\t\thref=\"' . $contentObject->typolink('', $config) . '\" />' . chr(10);\n\t\t}\n\n\t\treturn $result;\n\t}", "public function indexAction()\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $em = $this->getDoctrine()->getManager(); \n $entities = $em->getRepository('SytemSGBundle:Grupos')->findAll();\n\n return $this->render('SytemSGBundle:Grupos:index.html.twig', array(\n 'entities' => $entities,\n ));\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 indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $links = $em->getRepository('AppBundle:Link')->findAll();\n $sheetdev = $em->getRepository('AppBundle:SheetDev')->findBy(array('id' => $links));\n $sheet = $em->getRepository('AppBundle:Sheet')->findBy(array('id' => $links));\n $delivery = $em->getRepository('AppBundle:Delivery')->findBy(array('id' => $links));\n $sheetdevdel = $em->getRepository('AppBundle:SheetDev')->findBy(array('id' => $delivery));\n $society = $em->getRepository('AppBundle:society')->findBy(array('id' => $sheetdevdel));\n\n return $this->render('link/index.html.twig', array(\n 'links' => $links,\n 'sheetdev' => $sheetdev,\n 'sheet' => $sheet,\n 'delivery' => $delivery,\n 'sheetdevdel' => $sheetdevdel,\n 'society' => $society\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager('db2');\n\n $outlets = $em->getRepository('BaseSynchronizeBundle:Outlet')->findAll();\n\n return $this->render('BaseSynchronizeBundle:Db2:Outlet/index.html.twig', array(\n 'outlets' => $outlets,\n ));\n }", "function axial_bottin_import_plugin_setup_menu(){\n\n //Principal menu item\n add_menu_page('Gestion Bottin', //Titre de la page\n 'Gestion Bottin', //Titre du menu\n 'manage_options', //capabilité\n 'bottin_index', //menu slug\n 'bottin_index', //function\n 'dashicons-phone' // icon\n );\n\n //IMPORT BOTTIN\n\n add_submenu_page(bottin_index,\n 'Import Bottin',\n 'Import Bottin',\n 'manage_options',\n 'axial_bottin_import-plugin',\n 'axial_bottin_import_init');//function\n\n //BOTTIN BIGENRE\n\n //submenu\n add_submenu_page(bottin_index,\n 'Liste Bigenre',\n 'Liste des bigenres',\n 'manage_options',\n 'get_table_bigenre',\n 'get_table_bigenre');//function\n\n //submenu CACHÉ\n add_submenu_page(null,\n 'Ajouter',\n 'Ajouter',\n 'manage_options',\n 'create_bigenre',\n 'create_bigenre');//function\n\n //submenu CACHÉ\n add_submenu_page(null,\n 'Update bottin bigenre',\n 'Update',\n 'manage_options',\n 'update_table_bigenre',\n 'update_table_bigenre');//function\n\n //BOTTIN DÉPARTEMENT SERVICE\n\n //submenu\n add_submenu_page(bottin_index,\n 'Bottin Département Service',\n 'Liste des départements et services',\n 'manage_options',\n 'get_table_dept',\n 'get_table_dept');//function\n\n //submenu CACHÉ\n add_submenu_page(null,\n 'Ajouter',\n 'Ajouter',\n 'manage_options',\n 'create_dept',\n 'create_dept');//function\n\n //submenu CACHÉ\n add_submenu_page(null,\n 'Update bottin deptServ',\n 'Update',\n 'manage_options',\n 'update_table_dept',\n 'update_table_dept');//function\n\n //BOTTIN EMAIL GÉNÉRIQUE\n\n //submenu\n add_submenu_page(bottin_index,\n 'Bottin email générique',\n 'Liste des courriels génériques',\n 'manage_options',\n 'get_table_email_generique',\n 'get_table_email_generique');//function\n\n //submenu CACHÉ\n add_submenu_page(null,\n 'Ajouter',\n 'Ajouter',\n 'manage_options',\n 'create_email_generique',\n 'create_email_generique');//function\n\n //submenu CACHÉ\n add_submenu_page(null,\n 'Update bottin deptServ',\n 'Update',\n 'manage_options',\n 'update_table_email',\n 'update_table_email');//function\n}", "public function onDisplayPagesEdit($event)\r\n {\r\n $item = $event->getArgument('item');\r\n $tabs = $event->getArgument('tabs');\r\n $content = $event->getArgument('content');\r\n \r\n $view = \\Dsc\\System::instance()->get('theme');\r\n $shop_content = $view->renderLayout('Shop/Admin/Views::listeners/fields_related_products.php');\r\n \r\n $tabs['shop'] = 'Shop';\r\n $content['shop'] = $shop_content;\r\n \r\n $event->setArgument('tabs', $tabs);\r\n $event->setArgument('content', $content);\r\n }", "function jr_ads_add_pages() {\r\n add_options_page('JR Ads', 'JR Ads', 'administrator', 'jr_ads', 'jr_ads_options_page');\r\n}", "public function bundle();", "function add()\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 edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=link&layout=edit&hidemainmenu=1', false));\n\t}", "function add()\n\t{\n\t\tif (!$this->checkLogin()) {\n\t\t\tredirect(base_url());\n\t\t}\n\n\t\t$pageData['header_title'] = APP_NAME . ' | Add Product';\n\t\t$pageData['page_title'] = 'Inventory Management';\n\t\t$pageData['parent_menu'] = 'inventory_management';\n\t\t$pageData['child_menu'] = 'add_new_product';\n\n\t\t//get branches\n\t\t$where = array('status_id =' => ACTIVE);\n\t\t$select = '*';\n\t\t$records = 2;\n\t\t$branches = $this->base_model->getCommon($this->branchesTable, $where, $select, $records);\n\t\t$pageData['branches'] = json_encode($branches);\n\t\t// print_r($branches);die;\n\t\t$this->load->view('admin/inventory_management/add', $pageData);\n\t}", "public function addAction(){\n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t}", "public function listView(): void\n {\n $this->_data = $this->_entity->fetch();\n if (!$this->special) {\n $newData = $this->_builder->submitCreate();\n if ($newData) {\n array_push($this->_data, $newData);\n }\n }\n require VF . \"{$this->route}/list.php\";\n require VF . \"{$this->route}/create.php\";\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $refDomaineSpecialites = $em->getRepository('ReferencielBundle:RefDomaineSpecialite')->findAll();\n\n return $this->render('@Referenciel/refdomainespecialite/index.html.twig', array(\n 'refDomaineSpecialites' => $refDomaineSpecialites,\n ));\n }", "public function indexAction() {\n $url = $this->request->getBaseUrl() . '/' . $this->node->getRoute();\n $this->response->setRedirect($url);\n }", "public function menuAction()\n\n {\n $listAdverts = array(\n array('id' => 2, 'title' => 'Recherche développeur Symfony2'),\n array('id' => 5, 'title' => 'Mission de webmaster'),\n array('id' => 1, 'title' => 'Offre de stage webdesigner'),\n );\n\n return $this->render(\n 'OCPlatformBundle:Advert:menu.html.twig',\n array('listAdverts' => $listAdverts)\n );\n\n }", "function node_add_page() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n return theme('node_add_list', $content);\n}", "function dolist_messages_mail_admin_bundle_form($form, &$form_state, $bundle = NULL) {\n\n if (!isset($bundle) && !$bundle) {\n // This is a new bundle\n $bundle = new stdClass();\n $bundle->name = '';\n $bundle->bundle = '';\n $bundle->locked = 0;\n } else {\n if(!$bundle) {\n drupal_set_message(t('Could not load bundle'), 'error');\n drupal_goto('admin/structure/dolist/messagesmail');\n }\n }\n\n $form['#messages_bundle'] = $bundle;\n\n $form['name'] = array(\n '#title' => t('Name'),\n '#type' => 'textfield',\n '#default_value' => $bundle->name,\n '#description' => t('The human-readable name of this bundle. It is recommended that this name begin with a capital letter and contain only letters, numbers, and spaces. This name must be unique.'),\n '#required' => TRUE,\n '#size' => 30,\n );\n\n if(!$bundle->locked) {\n\n $form['bundle'] = array(\n '#type' => 'machine_name',\n '#default_value' => $bundle->bundle,\n '#maxlength' => 32,\n '#disabled' => $bundle->locked,\n '#machine_name' => array(\n 'exists' => 'messages_bundle_load',\n ),\n '#description' => t('A unique machine-readable name for this paragraph bundle. It must only contain lowercase letters, numbers, and underscores.'),\n );\n }\n\n $form['locked'] = array(\n '#type' => 'value',\n '#value' => $bundle->locked,\n );\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save Message bundle'),\n '#weight' => 40,\n );\n\n return $form;\n}" ]
[ "0.606799", "0.6036074", "0.57965624", "0.57860816", "0.5754964", "0.5749019", "0.5675564", "0.5625833", "0.56165206", "0.5454767", "0.54438275", "0.54224145", "0.5415871", "0.5387076", "0.53594583", "0.5355363", "0.5319278", "0.5308089", "0.5283216", "0.526992", "0.5237428", "0.5192059", "0.5187662", "0.51858455", "0.51853424", "0.51838726", "0.51766384", "0.51736474", "0.5150485", "0.51467025", "0.5133256", "0.512774", "0.5120001", "0.50991094", "0.5089808", "0.5088518", "0.508385", "0.5079729", "0.5079729", "0.50716186", "0.50644934", "0.5056729", "0.50529075", "0.5051632", "0.50496864", "0.5048524", "0.504731", "0.504097", "0.5038727", "0.5035475", "0.50300264", "0.5026518", "0.5024998", "0.5023184", "0.50180805", "0.50110286", "0.50093347", "0.50086504", "0.5004655", "0.50039726", "0.500141", "0.49951285", "0.49814835", "0.4979344", "0.4973416", "0.49686652", "0.49621838", "0.49413434", "0.4941055", "0.49340814", "0.4931793", "0.4919546", "0.49188048", "0.4914012", "0.49138576", "0.49088198", "0.4907329", "0.490625", "0.4904411", "0.4903916", "0.4903369", "0.4902775", "0.48993656", "0.4898167", "0.48952317", "0.48943114", "0.48920935", "0.48795432", "0.4865747", "0.48633558", "0.48602498", "0.4859134", "0.48571244", "0.4857015", "0.48548645", "0.4852356", "0.485188", "0.4849477", "0.48491567", "0.4848635" ]
0.5485806
9
Returns a mongo entity submission form.
function mongo_node_add($entity_type, $bundle) { global $user; $set = mongo_node_settings(); $entity = entity_create($entity_type, array( 'uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $bundle, 'language' => LANGUAGE_NONE, ) ); $form_id = $entity_type . '_' . $bundle . '_mongo_node_form'; $output = drupal_get_form($form_id, $entity, $entity_type); return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormInObject()\n {\n $sExKey = null;\n\n if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {\n\n $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);\n $oModel = new $sModelName;\n\n $oEntity = new $this->_sSynchronizeEntity;\n $sPrimaryKey = LibEntity::getPrimaryKeyNameWithoutMapping($oEntity);\n $sMethodName = 'findOneBy'.$sPrimaryKey;\n $oCompleteEntity = call_user_func_array(array(&$oModel, $sMethodName), array($this->_iIdEntity));\n\n if (is_object($oCompleteEntity)) {\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n\t\t\t\t\tif ($sValue instanceof \\Venus\\lib\\Form\\Input && $sValue->getType() == 'submit') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio) {\n\n $sExKey = $sKey;\n $sKey = substr($sKey, 0, -6);\n }\n\n if ($sValue instanceof Form) {\n\n ;\n } else {\n\n $sMethodNameInEntity = 'get_'.$sKey;\n\t\t\t\t\t\tif (method_exists($oCompleteEntity, $sMethodNameInEntity)) {\n\t\t\t\t\t\t\t$mValue = $oCompleteEntity->$sMethodNameInEntity();\n\t\t\t\t\t\t}\n\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio && method_exists($this->_aElement[$sExKey], 'setValueChecked')) {\n\n $this->_aElement[$sExKey]->setValueChecked($mValue);\n } else if (isset($mValue) && method_exists($this->_aElement[$sKey], 'setValue')) {\n\n $this->_aElement[$sKey]->setValue($mValue);\n }\n }\n }\n }\n }\n\n $oForm = new \\StdClass();\n $oForm->start = '<form name=\"form'.$this->_iFormNumber.'\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"hidden\" value=\"1\" name=\"validform'.$this->_iFormNumber.'\">';\n $oForm->form = array();\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n if ($sValue instanceof Container) {\n\n $oForm->form[$sKey] = $sValue;\n } else {\n\n $oForm->form[$sKey] = $sValue->fetch();\n }\n }\n\n $oForm->end = '</form>';\n\n return $oForm;\n }", "public function getForm()\n {\n RETURN $this->strategy->getForm();\n }", "public function form(){\n\t\treturn $this->form;\n\t}", "public function getForm() {\n return $this->form;\n }", "function getForm() {\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new Task);\n\n $form->text('eid', 'Eid');\n $form->text('store', 'Store');\n $form->text('etype', 'Etype');\n $form->text('uid', 'Uid');\n $form->text('uname', 'Uname');\n $form->text('qq', 'Qq');\n $form->number('qtype', 'Qtype');\n $form->number('times', 'Times')->default(1);\n $form->textarea('content', 'Content');\n $form->text('deadline', 'Deadline');\n $form->file('file', 'File');\n $form->number('isok', 'Isok');\n $form->number('istag', 'Istag');\n $form->text('sid', 'Sid');\n $form->text('sname', 'Sname');\n $form->text('score', 'Score');\n\n return $form;\n }", "public function toForm(){\n return $this->form_builder()->form();\n }", "public function getForm()\n {\n return $this->form;\n }", "public function getForm()\n {\n return $this->form;\n }", "public function WidgetSubmissionForm()\n {\n $formSectionData = new DataObject();\n $formSectionData->Form = $this->AddForm($this->extensionType);\n $formSectionData->Content = $this->dataRecord->AddContent;\n return $formSectionData;\n }", "public function getForm();", "public function &getForm() {\n return $this->form;\n }", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "public function getForm()\n {\n return $this->_form;\n }", "public function getWebformSubmission() {\n return $this->submission;\n }", "protected function form()\n {\n $form = new Form(new SpecificationTemplate());\n\n $form->text('name', __('Name'));\n $form->keyValues('content', __('Content'));\n $form->number('sort', __('Sort'))->default(0);\n $form->switch('is_display', __('Is display'))->default(1);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Posts);\n\n $form->text('title', 'Title');\n $form->text('content', 'Content');\n $form->text('video_url', 'Video url');\n $form->switch('status', '审核状态')->states( [ \n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'primary'],\n 'on' => ['value' => 1, 'text' => '通过', 'color' => 'default']\n ]);\n $form->number('content_type', 'Content type');\n $form->number('member_id', 'Member id');\n return $form;\n }", "public function getForm()\n {\n return $this;\n }", "protected function form()\n {\n $form = new Form(new Posts());\n\n $form->text('title', __('Title'));\n $form->text('content', __('Content'));\n $form->number('author_id', __('Author id'));\n $form->number('is_locked', __('Is locked'));\n $form->number('is_locked_comments', __('Is locked comments'));\n $form->text('categories', __('Categories'));\n\n return $form;\n }", "function __generateForm($entity,$action=\"\",$label=\"\",$method=\"POST\"){\n\t$htmlForm = new HtmlForm(\n\t\t\tget_class($entity),\n\t\t\t$action,\n\t\t\tnull,\n\t\t\tnull,\n\t\t\tarray(\t'method'=>$method,\n\t\t\t\t\t\t'label'=>$label)\n\t\t\t);\n\t$htmlForm->generateFormForEntity($entity);\n\techo $htmlForm->serialize();\n}", "function getForm(){\r\n\t\t$data = [\r\n\t\t\t'EFORM' => [\r\n\t\t\t\t'formName' => $this->formName,\r\n\t\t\t\t'scope' => $this->scope,\r\n\t\t\t\t'_uid' => $this->uid,\r\n\t\t\t\t'elements' => $this->fields->getFormViewFields($this),\r\n\t\t\t\t'errors' => $this->errors,\r\n\t\t\t\t'buttons' => $this->buttons->get()\r\n\t\t\t]\r\n\t\t];\r\n\r\n\t\tif($this->actions){\r\n\t\t\t$data['EFORM']['actions'] = $this->actions->getForSmarty();\r\n\t\t}\r\n\t\tif(!empty($this->statuses)){\r\n\t\t\t$data['EFORM']['fieldStatuses'] = $this->statuses;\r\n\t\t}\r\n\r\n\t\t$view = new ViewElementClass();\r\n\t\t$view->type = 'form_start';\r\n\t\t$view->data = $data;\r\n\t\treturn $view;\r\n\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "public function get_form() {\n\t\treturn $this;\n\t}", "protected function form()\n {\n $form = new Form(new TaskOrder);\n\n $form->display('ID');\n $form->text('eid',\"快递单号\");\n $form->text('sname','客服名称');\n $form->select('store','快递网点')->options(storedatas(1));\n $form->select('etype','快递公司')->options(edatas());\n $form->display('Created at');\n $form->display('Updated at');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Procurement);\n\n $form->number('u_id', 'U id');\n $form->number('brand', 'Brand');\n $form->number('type', 'Type');\n $form->number('models', 'Models');\n $form->number('material', 'Material');\n $form->decimal('area', 'Area');\n $form->radio('status', '审核')->options(['0' => '待审核', '1'=> '通过','2'=>'未通过'])->default('0');\n $form->number('room_city', 'Room city');\n $form->text('address', 'Address');\n $form->number('brick_time', 'Brick time')->default(1);\n $form->text('images', 'Images');\n $form->number('ctime', 'Ctime');\n $form->number('utime', 'Utime');\n\n return $form;\n }", "public function getObject() {\n return $this->form->getObject();\n }", "public function getFormEntry()\n {\n return $this->form->getEntry();\n }", "public function form() \n\t{\n\t\treturn belongsTo('App\\Form'); \n\t}", "protected function form()\n {\n $form = new Form(new Article);\n\n $form->text('title', '标题')->rules('required', ['标题不可为空']);\n $form->cropper('cover', '封面')->uniqueName();\n $form->multipleImage('covers', '多封面')->help('可选');\n $form->select('category_id', '类型')->options(ArticleCategory::all()->pluck('title', 'id'));\n $form->number('read_count', '阅读数');\n $form->number('share_count', '分享数');\n $form->number('like_count', '喜欢数');\n $form->switch('cover_state', '是否显示多图封面');\n $form->datetime('show_at', '显示时间')->default(now());\n $form->textarea('desc', '描述');\n $form->UEditor('detail', '文章详情');\n\n $form->saving(function (Form $form) {\n $form->detail = str_replace('crossorigin=\"anonymous\"', '', $form->detail);\n });\n return $form;\n }", "public function getForm(): string\n {\n return $this->html;\n }", "private function getExportingForm()\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('post_exporter'))\n ->setMethod('GET')\n ->add('Export', SubmitType::class)\n ->getForm()\n ;\n }", "protected function form()\n {\n $option = QuestionType::getSelect();\n\n return Form::make(new Question(), function (Form $form) use ($option) {\n\n// $form->confirm('您确定要提交表单吗?');\n $form->display('id');\n $form->select('type')\n ->when([2, 3], function ($form) {\n $form->textarea('extra', '文章')->rows(4);\n })\n ->options($option)->default(1);\n\n $form->embedsTable('questions', '有关题目', function (NestedForm $form) {\n $form->text('question', '题干');\n $form->embedsTable('answers', '有关答案', function ($form) {\n $form->text('answer', '答案');\n $form->switch('is_correct', '正确答案');\n });\n });\n//\n// $form->number('sort', $form->getElementId())->default(50);\n// $form->switch('status')->default(1);\n//\n $form->display('created_at');\n $form->display('updated_at');\n });\n }", "protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }", "abstract function getForm();", "protected function form()\n {\n $form = new Form(new Community);\n\n $form->text('permalink', __('Permalink'));\n $form->text('eyecatch_path', __('Eyecatch path'));\n $form->text('name', __('Name'));\n $form->text('pref', __('Pref'));\n $form->text('information', __('Information'));\n $form->text('image1_path', __('Image1 path'));\n $form->text('image2_path', __('Image2 path'));\n $form->text('image3_path', __('Image3 path'));\n $form->text('video1_link', __('Video1 link'));\n $form->text('video2_link', __('Video2 link'));\n $form->text('video3_link', __('Video3 link'));\n $form->text('calendar', __('calendar'));\n $form->text('message_image_path', __('Message image path'));\n $form->text('message', __('Message'));\n $form->text('contact', __('Contact'));\n $form->text('facebook_link', __('Facebook link'));\n $form->text('instagram_link', __('Instagram link'));\n $form->text('website_link', __('Website link'));\n\n\n return $form;\n }", "function getForm()\n {\n return $this->getAttribute(\"form\");\n }", "protected function getForm() {\n $lUpdate = ($this -> mPhraseTyp == 'product') ? 'yes' : 'no';\n $this -> setParam('ref_update', $lUpdate);\n\n $lRet = '<div id=\"job_form\" class=\"frm\">'.LF;\n\t$lRet.= $this -> getFieldForm();\n $lRet.= '</div>' . LF;\n \n /*if($this -> mCanBuild) {\n $lRet.= '<div id=\"save_dialog\" title=\"Publish PDF\" style=\"display:none;\">'.LF;\n\t $lRet.= '<input id=\"templateId\" type=\"hidden\" value=\"\" />'.LF;\n $lRet.= '<iframe src=\"\" onload=\"javascript:GetEditor()\" id=\"chiliEditor\" class=\"dn\" style=\"width:100%;height:100%;\"></iframe>'.LF;\n $lRet.= '</div>'.LF;\n }*/\n \n $lDlg = new CJob_Cms_Content_Dialog($this -> mJobId, $this -> mSrc, $this -> mJob);\n $lRet.= $lDlg -> getContent();\n \n $lRet.= $lDlg -> getModals();\n \n return $lRet;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function get()\n {\n $object = $this->_object;\n $this->_object = $this->_form;\n return $object;\n }", "public static function getForm();", "protected function form()\n {\n $form = new Form(new News);\n\n $form->text('title', '题目');\n // $form->number('category_id', '分类');\n $form->select('category_id','分类')->options('/api/admin_categories');\n // $form->textarea('content', 'Content');\n $form->ueditor('content','新闻内容')->rules('required');\n // $form->text('thumbnail', '封面图');\n $form->image('thumbnail', '封面图')->move('public/uploads/thunbnails');\n $form->number('status', '状态');\n $form->number('read_count', '阅读次数');\n\n return $form;\n }", "protected function form()\n {\n return Admin::form(Article::class, function (Form $form) {\n\n $form->display('id', '文章id');\n $form->text('title', '标题');\n $form->text('author','作者')->value(config('admin.author'));\n $form->select('category_id', '类型')->options('/api/categories');\n $form->select('subject_id', '专题')->options('/api/subjects');\n $form->multipleSelect('tags')->options(Tag::all()->pluck('name', 'id'));\n $form->image('cover', '封面');\n $form->editor('body', '内容');\n $form->datetime('created_at');\n $form->datetime('updated_at');\n\n });\n }", "public function form() {\n\t\treturn array();\n\t}", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "public function getForm() {\n\t\treturn isset($this->attributes['form'])?$this->attributes['form']:null;\n\t}", "abstract protected function getForm();", "protected function form()\n {\n $form = new Form(new Blog());\n\n $form->text('title', __('Title'));\n $form->text('sub_title', __('Sub title'));\n $form->text('tag', __('Tag'));\n $form->textarea('body', __('Body'));\n $form->text('posted_by', __('Posted by'));\n $form->datetime('posted_at', __('Posted at'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new StudentsBooksRent);\n\n $form->number('private_book_id', __('Private book id'));\n $form->text('renter_name', __('Renter name'));\n $form->text('lender_name', __('Lender name'));\n $form->text('shared_book_name', __('Shared book name'));\n $form->text('shared_book_cover', __('Shared book cover'));\n $form->switch('statement', __('Statement'))->default(1);\n $form->datetime('rend_applied_at', __('Rend applied at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('rend_allowed_at', __('Rend allowed at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('rend_rejected_at', __('Rend rejected at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('return_applied_at', __('Return applied at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('return_confirm_at', __('Return confirm at'))->default(date('Y-m-d H:i:s'));\n $form->number('cast_beans', __('Cast beans'));\n $form->number('over_limit_days', __('Over limit days'));\n\n return $form;\n }", "protected function form()\n {\n return Admin::form(Article::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->text('slug','slugen');\n $form->text('title','标题');\n $form->editor('body','介绍');\n $form->select('category_id','分类')->options(ArticleCategory::allSelectOptions());\n $form->number('sort','排序');\n $form->image('thumbnail','缩略图')->uniqueName()->resize(400,600);\n $form->multipleImage('images','图集')->uniqueName()->removable()->resize(400,600);\n $form->text('view','模板名称');\n $states = [\n 'on' => ['value' => '1', 'text' => '是', 'color' => 'primary'],\n 'off' => ['value' => '0', 'text' => '否', 'color' => 'default'],\n ];\n $form->switch('status','状态')->states($states)->default(0);\n $form->number('click','点击次数');\n\n $form->hidden('created_by');\n $form->hidden('updated_by');\n $form->saving(function (Form $form){\n if(empty($form->created_by)) {\n $form->created_by = Admin::user()->id;\n }\n $form->updated_by = Admin::user()->id;\n });\n\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '更新时间');\n });\n }", "public function getFormContent()\n {\n return $this->form->getContent();\n }", "function &returnForm()\n\t{\n\t\treturn $this->form;\n\t}", "protected function form()\n {\n $form = new Form(new Member);\n\n $form->text('open_id', 'Open id');\n $form->text('wx_open_id', 'Wx open id');\n $form->text('access_token', 'Access token');\n $form->number('expires', 'Expires');\n $form->text('refresh_token', 'Refresh token');\n $form->text('unionid', 'Unionid');\n $form->text('nickname', 'Nickname');\n $form->switch('subscribe', 'Subscribe');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->switch('disablle', 'Disablle');\n $form->number('time', 'Time');\n $form->mobile('phone', 'Phone');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Product());\n\n $form->text('product_core', __('Product core'));\n $form->text('title', __('Title'));\n $form->text('long_title', __('Long title'));\n $form->text('bar_code', __('Bar code'));\n $form->number('category_id', __('Category id'));\n $form->switch('status', __('Status'));\n $form->select('audit_status', '审核状态')->options(\n [0 => '未进行审核', 1 => '审核已通过', 2 => '审核未通过']\n );\n $form->number('shop_id', __('Shop id'));\n $form->number('description_id', __('Description id'));\n $form->decimal('rating', __('Rating'));\n $form->number('sold_count', __('Sold count'));\n $form->number('review_count', __('Review count'));\n $form->decimal('price', __('Price'));\n $form->image('image', __('Image'));\n\n return $form;\n }", "protected function form()\n {\n $Adv=new Adv();\n $form = new Form($Adv);\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"text\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"select\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"select\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>[\"start_time\",\"end_time\"],\"title\"=>\"活动时间\",\"type\"=>\"datetimeRange\"),\n array(\"field\"=>\"font1\",\"title\"=>\"字段1\",\"type\"=>\"text\"),\n array(\"field\"=>\"font2\",\"title\"=>\"字段2\",\"type\"=>\"text\"),\n array(\"field\"=>\"font3\",\"title\"=>\"字段3\",\"type\"=>\"text\"),\n array(\"field\"=>\"font4\",\"title\"=>\"字段4\",\"type\"=>\"text\"),\n array(\"field\"=>\"font5\",\"title\"=>\"字段5\",\"type\"=>\"text\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"switch\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::set_form($form,$list_array);\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }", "public function getForm(): array\n {\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new Reply);\n\n\n // 我从哪里来.\n $form->number('fromId', '评论者ID');\n $form->text('fromName', '评论者姓名');\n $form->text('fromAvatar', '评论者头像');\n\n // 我要到哪里去.\n $form->number('toId', '被评论者ID');\n\n // 谢谢你带来远方的讯息.\n $form->text('contents', '评论内容');\n\n // 和回忆.\n $form->number('comment_id', '评论ID');\n\n // 那些关于他们的.\n $form->text('toName', '被评论者名称');\n\n // 和他们的.\n $form->text('toAvatar', '被评论者头像');\n\n\n return $form;\n }", "protected function form()\n {\n return Product::form(function (Form $form) {\n $form->display('id', 'ID');\n $form->text('title')->rules('required');\n $form->text('slug')->rules('required');\n $form->select('cat_id', 'Category')->options(Category::all()->pluck('title', 'id'));\n $form->image('photo');\n $form->wangeditor('fulldesc', 'Description');\n $form->text('cost');\n $form->textarea('meta_desc', 'Meta Description')->rows(2);\n $form->textarea('meta_key', 'Meta Keywords')->rows(2);\n $form->switch('status', 'Active');\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "protected function form()\n {\n $form = new Form(new MoneyOut);\n\n $form->display('id', __('ID'));\n $form->display('created_at', __('Created At'));\n $form->display('updated_at', __('Updated At'));\n\n return $form;\n }", "protected function form()\n {\n return new Form(new Attention);\n }", "protected function form()\n {\n return WebItem::form(function (Form $form) {\n $form->text('title', '標題')->rules('required');\n $form->text('tag', 'TAG');\n $form->image('picture', '封面照')->rules('required|dimensions:ratio=57/28')->help('封面照比例限制為1140:560 (寬:高)');\n $form->wangEditor('content', '內容');\n $states = [\n 'on' => ['value' => 1, 'text' => '開啟', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '關閉', 'color' => 'default'],\n ];\n $form->switch('display', '是否顯示')->states($states);\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n $form->disableReset();\n });\n }", "public final function getForm()\n {\n $config = $this->getLocalConfiguration();\n\n if(! array_key_exists('entity', $config))\n throw new MSFConfigurationNotFoundException($this->getMsfDataLoader()->getState(),'entity');\n\n $data = null;\n $undeserialized = $this->getUndeserializedMSFDataLoader();\n\n if(array_key_exists($this->getState(), $undeserialized))\n $data = $undeserialized[$this->getState()];\n\n\n if(! array_key_exists('action', $config)){\n $config['action'] = $this->getConfiguration()['__root'];\n }\n\n if(! array_key_exists('method', $config)){\n $config['method'] = $this->getConfiguration()['__method'];\n }\n\n if(! array_key_exists('formtype', $config)){\n if($this->getConfiguration()['__default_formType']){\n $shortname = (new \\ReflectionClass($config['entity']))->getShortName();\n try{\n $defaultNamespace = (new \\ReflectionClass(get_class($this)))->getNamespaceName();\n //Force autoload to fail if the form type is not in the Msf type namespace\n $dontFails = (new \\ReflectionClass($defaultNamespace.'\\\\'.$shortname.'Type'));\n }catch (\\Exception $e){\n if(! array_key_exists('__default_formType_path',$this->getConfiguration()))\n throw new \\Exception(\"Use of '__default_formType' requires to put FormType classes into the MSFType classpath or to provide namespace with '__default_formType_path'.\");\n $defaultNamespace = $this->getConfiguration()['__default_formType_path'];\n }\n $config['formtype'] = $defaultNamespace.'\\\\'.$shortname.'Type';\n }\n else\n throw new MSFConfigurationNotFoundException($this->getMsfDataLoader()->getState(),'formtype');\n }\n\n //Adding user fields\n $this->buildMSF();\n\n /**\n * ici, on pourrait regarder si une fonction init a été fournie. Si oui, utiliser son résultat comme\n * entrée de setcurrentForm()\n */\n $form = $this->getFormFactory()->create(\n $config['formtype'],\n $data,\n [\n 'action' => $config['action'],\n 'method' => $config['method'],\n ]\n );\n\n $this->setCurrentForm($form);\n\n if( ! $this->isAvailable($this->getLocalConfiguration()['after'])){\n $this->setConfigurationWith('__buttons_have_next',false);\n }\n if( ! $this->isAvailable($this->getLocalConfiguration()['before'])){\n $this->setConfigurationWith('__buttons_have_previous',false);\n }\n\n //var_dump($this->getConfiguration()); die;\n\n\n return $this->getCurrentForm();\n }", "public function form()\n {\n $form = new Form($this->model);\n\n $form->display('id', 'ID');\n\n $form->select('user_id', 'User')->rules('required')\n ->options(function () {\n $options = [];\n $users = User::all();\n\n if ($users) {\n foreach ($users as $user) {\n $options[$user->id] = $user->name;\n }\n }\n\n return $options;\n });\n $form->select('platform_id', 'Platform')->rules('required')\n ->options(function () {\n $options = [];\n $platforms = Platform::all();\n\n if ($platforms) {\n foreach ($platforms as $platform) {\n $options[$platform->id] = $platform->name;\n }\n }\n\n return $options;\n });\n $form->text('product_code','Product Code')->rules('required');\n $form->text('receipt','Receipt');\n $form->text('transaction_id','Transaction id');\n $form->text('signature','Signature');\n $form->text('order_id','Order id');\n $form->text('json_data','Json data');\n $form->text('propaty_code','Propaty Code');\n $form->datetime('expires_date', 'Expire Date')->rules('required');\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n\n return $form;\n }", "protected function form()\n {\n $form=new Form(new JudgeServer());\n\n $form->text('scode', __('admin.judgeservers.scode'))->rules('required|alpha_dash|min:3|max:20');\n $form->text('name', __('admin.judgeservers.name'))->required();\n $form->text('host', __('admin.judgeservers.host'))->required();\n $form->text('port', __('admin.judgeservers.port'))->required();\n $form->text('token', __('admin.judgeservers.token'))->required();\n $form->switch('available', __('admin.judgeservers.availability'));\n $form->select('oid', __('admin.judgeservers.oj'))->options(OJ::all()->pluck('name', 'oid'))->help(__('admin.judgeservers.help.onlinejudge'))->required();\n $form->hidden('status', __('admin.judgeservers.status'))->default(0);\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Feed());\n\n $form->text('url', __('URL Feed'));\n $form->text('domain', __('Dominio'));\n $form->select('id_author',__(\"Author\"))->options(Author::all()->pluck('name', 'id'));\n $form->select('type',__(\"Tipo Feed\"))->options([1 => \"Intro\", 2 => \"Completo\"]);\n\n return $form;\n }", "public function cs_generate_form() {\n global $post;\n }", "public function store()\n { $this->requestFormat();\n return $this->form()->store();\n }", "public function frmPostObject()\n\t{\t\t\t\t\t\t\t\n\t\t$form = $this->initTagsForm(\"frm_post\", \"saveFrmPostSettings\",\n\t\t\t\"advanced_editing_frm_post_settings\");\n\t\t\n\t\t$this->tpl->setContent($form->getHTML());\n\t}", "function mongo_node_form_submit(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state);\n $insert = empty($entity->mid);\n entity_save($entity_type, $entity);\n\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n if ($insert) {\n drupal_set_message(t('@label %title has been created.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n else {\n drupal_set_message(t('@label %title has been updated.',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title,\n )\n )\n );\n }\n\n $uri = entity_uri($entity_type, $entity);\n $form_state['redirect'] = drupal_get_path_alias($uri['path']);\n}", "protected function form()\n {\n $form = new Form(new V_MRQC_SSBRModel);\n\n $form->display('id', __('ID'));\n $form->display('created_at', __('Created At'));\n $form->display('updated_at', __('Updated At'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Milestone);\n\n $form->display('id', __('ID'));\n $form->text('version', __('Version'));\n $form->text('content', __('Content'));\n $form->textarea('detail', __('Detail'));\n $form->select('type', __('Type'))->options(Milestone::TYPE_MAP);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new ThemePoster());\n\n $form->select('domain_id', __('domain_id'))->options(DomainConfig::getDomainMap())->rules('required');\n $form->radio('type', __('type'))->options(ThemePoster::getTypeMap())->when(1, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Product::getCategoryMap()->toArray()))->rules('required');\n\n })->when(2, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Article::getCategoryMap()))->rules('required');\n\n });\n $form->text('title', __('title'))->rules('required');\n $form->text('alt', __('alt'))->rules('required');\n $form->image('site', '图片尺寸 1600*300')\n ->uniqueName()\n ->rules('required|max:150')->resize(1600, 300);\n $form->url('link', __('link'));\n $form->switch('is_show', __('is_show'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Dictionary());\n $form->disableViewCheck();\n $form->disableEditingCheck();\n $form->disableCreatingCheck();\n\n\n $form->select('type', __('Type'))->options(Dictionary::TYPES);\n $form->text('option', __('Title'))->required();\n $form->text('slug', __('Slug'))->rules('nullable|regex:/(\\w\\d\\_)*/', [\n 'regex' => 'Только латинские буквы и знаки подчеркивания',\n ]);\n $form->text('alternative', __('Alternative'));\n $form->switch('approved', __('Approved'))->default(1);\n $form->number('sort', __('Sort'));\n\n $form->saving(function (Form $form) {\n if ($form->slug === null) {\n $form->slug = Str::slug($form->option);\n }\n });\n return $form;\n }", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "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}", "protected function form()\n {\n $form = new Form(new SiteHelp);\n\n $form->select('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->options(SiteHelpCategory::pluck('name', 'id'));\n $form->text('title', __('site-help::help.title'));\n $form->number('useful', __('site-help::help.useful'))->default(0);\n $form->textarea('desc', __('site-help::help.desc'));\n $form->image('thumbnail', __('site-help::help.thumbnail'))\n ->removable()\n ->uniqueName()\n ->move('site-help');\n $form->UEditor('content', __('site-help::help.content'));\n $form->select('status', __('site-help::help.status.label'))\n ->default(1)\n ->options(__('site-help::help.status.value'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new MethodPrice);\n\n $form->display('id');\n $form->select('entity','Сущность')->options(Pest::all()->pluck('name','id'));\n return $form;\n }", "protected function form()\n {\n return Form::make(new GoodsSpec(), function (Form $form) {\n $form->display('id');\n $form->text('goods_id');\n $form->text('goods_specs');\n $form->text('specs_key');\n $form->text('goods_stock');\n $form->text('goods_price');\n $form->text('market_price');\n $form->text('spec_pic');\n \n $form->display('created_at');\n $form->display('updated_at');\n });\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}", "protected function form()\n {\n $form = new Form(new Subscribe());\n\n $form->text('number', __('商品编号'));\n $form->text('name', __('商品名称'));\n $form->text('subtitle', __('商品副标题'));\n $form->multipleImage('images', __('商品图片'))->removable();\n $form->text('price', __('单价'));\n $form->number('quantity', __('库存'));\n $form->text('valid_period', __('有效期'));\n $form->radio('status', __('状态'))->options([\n 1 => \"正常\",\n 10 => \"下架\",\n ])->default(1);\n $form->editor('content','内容');\n $form->number('integral', __('返还碳积分'));\n $form->text('emission', __('返还碳减排'));\n $form->text('place', __('地点'));\n $form->text('maintenance', __('养护'));\n $form->switch('recommend', __('是否推荐'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Feedback);\n\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Enseignant());\n\n $form->text('matricule', __('Matricule'));\n $form->text('nom', __('Nom'));\n $form->text('postnom', __('Postnom'));\n $form->text('prenom', __('Prenom'));\n $form->text('sexe', __('Sexe'));\n $form->text('grade', __('Grade'));\n $form->text('fonction', __('Fonction'));\n\n return $form;\n }", "function getInputForm() {\n\t\treturn new \\Flux\\Lead();\n\t}", "protected function form()\n {\n $form = new Form(new GithubRepositories());\n\n $form->text('name', __('项目名'));\n $form->text('full_name', __('项目全名'));\n $form->textarea('description', __('简介'));\n $form->textarea('owner', __('作者资料'));\n $form->textarea('html_url', __('网页地址'));\n $form->textarea('original_data', __('原始数据'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Work);\n\n $form->number('order_id', trans('Порядок'))->rules('required|integer|max:32767');\n\n $form\n ->multipleSelect('categories', trans('Категория'))\n ->options(\\App\\Category::all()->pluck('name', 'id'))\n ->rules('required');\n\n $form\n ->multipleSelect('services', trans('Service'))\n ->options(\\App\\DHIService::all()->pluck('title', 'id'));\n\n $form\n ->multipleSelect('workers', trans('Team'))\n ->options(\\App\\Worker::all()->pluck('name', 'id'));\n\n $form->text('name', trans('Название'))->rules('required|max:250');\n $form->text('short_name', trans('Краткое название'))->rules('required|max:250');\n $form->editor('description', trans('Описание'))->default(null);\n $form->image('cover', trans('Маленькая картинка'))\n ->rules('required')\n ->uniqueName();\n\n $form->image('small_image', trans('Картинка для ссылок'))\n ->uniqueName();\n\n $form->hasMany('photos', function (Form\\NestedForm $form) {\n $form->number('order_id');\n $form->image('link')\n ->uniqueName()\n ->removable();\n });\n\n\n return $form;\n }", "public function submission()\n {\n return Submission::where('assignment_id', $this->attributes['id'])->where('user_id', Auth::user()->id)->first();\n }", "public function form()\n {\n return Page::form(function (Form $form) {\n $form->display('id', 'ID');\n\n $form->select('parent_id', '父级菜单')->options(Page::selectOptions());\n $form->text('title', '标题')->rules('required');\n $form->ueditor('body', '内容')->help('选填项');\n $form->image('banner', 'Banner')->uniqueName()->help('选填项');\n\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n });\n }", "public function getForm() {\r\n if ($this->_form === null) {\r\n $this->_form = new $this->_formClass;\r\n }\r\n return $this->_form;\r\n }", "protected function form()\n {\n $form = new Form(new GuestBook);\n\n $form->textarea('body', __('Body'));\n $form->number('user_id', __('User id'));\n $form->number('guest_id', __('Guest id'));\n $form->number('guest_book_id', __('Guest book id'));\n\n return $form;\n }", "public function getForm()\n {\n return $this->getAncestorInstanceOf('FewAgency\\FluentForm\\FluentForm');\n }", "protected function form()\n {\n $form = new Form(new BorrowComment);\n\n $form->text('shared_book_name', __('Shared book name'));\n $form->text('student_name', __('Student name'));\n $form->image('student_avatar', __('Student avatar'));\n $form->textarea('content', __('Content'));\n\n return $form;\n }", "public function toApi(): FormResource;", "protected function form()\n {\n $form = new Form(new WechatMessage);\n\n $form->select('msg_type', '消息类型')\n ->options(WechatMessageController::getType())\n ->addElementClass('msg_type');\n $form->text('media_id', '素材id')\n ->addElementClass('media_id');\n $form->text('title', '标题')->required();\n $form->textarea('description', '描述/内容');\n $form->hasMany('news_item', '图文', function (Form\\NestedForm $form) {\n $form->text('title', '标题');\n $form->textarea('description', '描述');\n $form->file('image', '图片')->uniqueName();\n $form->text('url', '跳转URL');\n });\n //$form->textarea('news_item', 'News item');\n\n $form->saving(function (Form $form) {\n $newsItem = $form->news_item;\n if (is_array($newsItem)) {\n foreach ($newsItem as &$v) {\n if (empty($v['id'])) {\n unset($v['id']);\n }\n }\n $form->input('news_item', $newsItem);\n }\n });\n\n $this->showMediaJs();\n return $form;\n }", "public function form()\n {\n return $this->hasOne('App\\Form')->whereNull('deleted_at');\n }", "protected function form()\n {\n $form = new Form(new Order);\n\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BackPeopleInfo());\n\n $form->text('name', __('姓名'));\n $form->text('id_num', __('身份证号码'));\n $form->mobile('phone', __('手机号码'));\n $form->text('address', __('楼栋房号'));\n $form->text('originatin', __('始发地'));\n $form->date('back_date', __('返回日期'))->default(date('Y-m-d'));\n $form->date('isolate_date', __('隔离日期'))->default(date('Y-m-d'));\n $form->text('isolate_flag', __('解除隔离'))->default('否');\n $form->text('isolate_level', __('隔离等级'))->default('普通');\n $form->text('qrcode_flag', __('网格化管理'))->default('否');\n $form->text('vehicle_info', __('交通工具'));\n $form->text('remarks', __('备注'));\n\n return $form;\n }", "public function store()\n {\n return $this->form()->store();\n }", "public function store()\n {\n return $this->form()->store();\n }" ]
[ "0.68841326", "0.6682035", "0.66420656", "0.6575569", "0.657286", "0.6540874", "0.64872676", "0.6481667", "0.6481667", "0.6451737", "0.63655335", "0.6349057", "0.63418573", "0.63264304", "0.6258806", "0.62565213", "0.61998427", "0.61737174", "0.61565804", "0.61414826", "0.6095599", "0.6086682", "0.6082145", "0.6077975", "0.6076371", "0.6063906", "0.60619676", "0.60583913", "0.6057395", "0.6041377", "0.6037716", "0.60341585", "0.6028946", "0.6016089", "0.5967712", "0.5966014", "0.59638256", "0.5949296", "0.592999", "0.59274936", "0.5923984", "0.59169054", "0.59111273", "0.589886", "0.58973485", "0.58970755", "0.5894507", "0.5888204", "0.588189", "0.58672935", "0.5853471", "0.58370054", "0.5835989", "0.58300734", "0.58287746", "0.5822171", "0.5812424", "0.5812277", "0.5797348", "0.57967687", "0.57900983", "0.57846117", "0.57738185", "0.5772728", "0.5760502", "0.57536966", "0.57532257", "0.5746824", "0.57438284", "0.5741869", "0.57405126", "0.57389724", "0.5736052", "0.5729974", "0.5726066", "0.57260036", "0.57242674", "0.5719464", "0.57096505", "0.56990635", "0.5693532", "0.56845593", "0.56841666", "0.56814724", "0.5679001", "0.5678597", "0.56690764", "0.5664675", "0.56637937", "0.56625354", "0.5657772", "0.56527025", "0.5651857", "0.5650888", "0.56502515", "0.5647706", "0.5646574", "0.5644867", "0.5644728", "0.5638007", "0.5638007" ]
0.0
-1
Generate the mongo entity add/edit form array.
function mongo_node_form($form, &$form_state, $entity, $entity_type) { $form = array(); $form_state['entity_type'] = $entity_type; if (!isset($form_state[$entity_type])) { $form_state[$entity_type] = $entity; } else { $entity = $form_state[$entity_type]; } // Get title label name from properties if exists static $settings = array(); if(empty($settings)) { $settings = mongo_node_settings(); } $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title'); $form['title'] = array( '#type' => 'textfield', '#title' => $title, '#required' => TRUE, '#default_value' => isset($entity->title) ? $entity->title : '', ); $form['#attributes']['class'][] = 'mongo-node-form'; if (!empty($entity->type)) { // TODO -- add entity type with bundle. $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form'; } $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), '#weight' => 5, '#submit' => array('mongo_node_form_submit'), ); $form['#validate'][] = 'mongo_node_form_validate'; field_attach_form($entity_type, $entity, $form, $form_state); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddForm();", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }", "public static function getFormComponents(): array {\n return [\n 'title' => ['attr' => ['required' => true, 'maxlength' => AppConstants::INDEXED_STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'status' => ['type' => 'translated', 'attr' => ['required' => true, 'maxlength' => AppConstants::INDEXED_STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'startDate' => ['type' => 'date', 'attr' => ['required' => true]],\n 'endDate' => ['type' => 'date', 'attr' => ['required' => true]],\n 'price' => ['attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n 'type' => ['type' => 'translated', 'attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n // 'major_id' => ['type'=>'reference','attr' => ['maxlength' => AppConstants::STRINGS_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'requiredNumberOfUsers' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'appliedUsersCount' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'language' => ['details-type' => 'multi-data'],\n 'location' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'workHoursCount' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'willTakeCertificate' => ['type' => 'boolean', 'attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n // 'major' => [\n // 'type' => 'reference',\n // 'reference' => 'major.name',\n // 'displayColumn' => 'major.name',\n // ],\n 'company' => [\n 'type' => 'reference',\n 'reference' => 'company.name',\n 'displayColumn' => 'company.name',\n ],\n 'requiredNumberOfUsers' => ['attr' => ['max' => AppConstants::SMALL_INTEGER_MAXIMUM_VALUE]],\n 'briefDescription' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'fullDescription' => ['attr' => ['required' => true, 'maxlength' => AppConstants::TEXT_MAXIMUM_LENGTH, 'minlength' => AppConstants::STRINGS_MINIMUM_LENGTH]],\n 'majors' => ['details-type' => 'multi-data-majors'],\n\n ];\n }", "function mongo_node_entities() {\n $set = mongo_node_settings();\n $base_path = 'admin/structure/mongo-node';\n\n $header = array(t('Name'), array(\n 'data' => t('Operations'),\n 'colspan' => 3,\n ),\n );\n\n foreach ($set as $entity_type => $settings) {\n $rows[] = array(\n array('data' => l($settings['label'], $base_path . '/' . $entity_type)),\n array('data' => l(t('edit'), $base_path . '/' . $entity_type . '/edit')),\n array('data' => l(t('delete'), $base_path . '/' . $entity_type . '/delete')),\n );\n }\n\n $output = theme('table', array(\n 'rows' => $rows,\n 'header' => $header,\n 'empty' => t('No entities created yet.'),\n )\n );\n return $output;\n}", "public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }", "public function form() {\n\t\treturn array();\n\t}", "public function getEditForm();", "static function reviewEditFormArray($entity = null, $container_guid = null){\n\t\t$newEntity = ($entity == null);\n\t\tif ($newEntity){\n\t\t\t$date = $entity->date;\n\t\t}else{\n\t\t\t$date = date('M d, Y',strtotime(date(\"Y-m-d\",time()).\" +1 day\"));\n\t\t}\n\t\t$fieldArray = array(\n\t\t\t/*\n\t\t\t * Additional metadata:\n\t\t\t * - queue_not_sent\n\t\t\t * - queue_sent\n\t\t\t * - queue_error\n\t\t\t * - isSent\n\t\t\t * - date_ts\n\t\t\t * */\n\t\t\n\t\t\tarray(\n\t\t\t\t'name' => 'owner_guid',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'active' => $newEntity, //set owner only when new entity is created\n\t\t\t\t'value' => get_loggedin_userid(),\n\t\t\t\t'fixed' => get_loggedin_userid(),\n\t\t\t),\n/*\t\t\tarray(\n\t\t\t\t'name' => 'container_guid',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'active' => $newEntity,\n\t\t\t\t'value' => $container_guid),*/\n\t\t\tarray(\n\t\t\t\t'name' => 'access_id',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'value'=> ACCESS_PUBLIC\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'multilang' => false,\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => elgg_echo('vazco_newsletter:title'),//this was set automatically, you might need to change it\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'isSent',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'multilang' => false,\n\t\t\t\t'required' => false,\n\t\t\t\t//'value' => 1,\n\t\t\t\t//'checked' => $entity->isSent,\n\t\t\t\t'title' => elgg_echo('vazco_newsletter:issent'),//this was set automatically, you might need to change it\n\t\t\t\t'hint' => elgg_echo('vazco_newsletter:issent:hint'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'body',\n\t\t\t\t'type' => 'html',\n\t\t\t\t'multilang' => false,\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => elgg_echo('vazco_newsletter:body'),//this was set automatically, you might need to change it\n\t\t\t\t//'subtitle' => elgg_echo('vazco_newsletter:body:hint'),\n\t\t\t\t'help' => elgg_echo('vazco_newsletter:body:hint'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date',\n\t\t\t\t'type' => 'calendar',\n\t\t\t\t'required' => true,\n\t\t\t\t'value' => $date,\n\t\t\t\t'title' => elgg_echo('vazco_newsletter:date'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'isSent',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'required' => true,\n\t\t\t\t'active' => $newEntity,\n\t\t\t\t'value' => 0,\n\t\t\t),\n\t\t\t/*\n\t\t\tarray(\n\t\t\t\t'name' => 'tags',\n\t\t\t\t'type' => 'tags',\n\t\t\t\t'required' => false,\n\t\t\t\t'title' => elgg_echo('vazco_newsletter:tags'),//this was set automatically, you might need to change it\n\t\t\t),\n\t\t\t*/\n\t\t\t/*\n\t\t\tarray(\n\t\t\t\t'name' => 'image',\n\t\t\t\t'type' => 'file',\n\t\t\t\t'image' => true,\n\t\t\t\t'required' => $newEntity,\n\t\t\t\t'sizes' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t=> \"large\",\n\t\t\t\t\t\t\"width\"\t=> 200,\n\t\t\t\t\t\t\"height\"=> 200,\n\t\t\t\t\t\t\"enlarge\"=> false,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t=> \"medium\",\n\t\t\t\t\t\t\"width\"\t=> 100,\n\t\t\t\t\t\t\"height\"=> 100,\n\t\t\t\t\t\t\"enlarge\"=> false,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t=> \"small\",\n\t\t\t\t\t\t\"width\"\t=> 40,\n\t\t\t\t\t\t\"height\"=> 40,\n\t\t\t\t\t\t\"enlarge\"=> false,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t=> \"tiny\",\n\t\t\t\t\t\t\"width\"\t=> 25,\n\t\t\t\t\t\t\"height\"=> 25,\n\t\t\t\t\t\t\"enlarge\"=> false,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'title' => elgg_echo('vazco_advertisement:image_label'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'thumbs',\n\t\t\t\t'type' => 'file',\n\t\t\t\t'multi' => true,\n\t\t\t\t'limit' => 10,\n\t\t\t\t'image'=> true,\n\t\t\t\t'required' => false,\n\t\t\t\t'sizes'\t=> array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t\t=> \"tiny\",\n\t\t\t\t\t\t\"width\"\t\t=> 25,\n\t\t\t\t\t\t\"height\"\t=> 25,\n\t\t\t\t\t\t\"enlarge\"\t=> true,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t\t=> \"small\",\n\t\t\t\t\t\t\"width\"\t\t=> 40,\n\t\t\t\t\t\t\"height\"\t=> 40,\n\t\t\t\t\t\t\"enlarge\"\t=> true,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t\t=> \"medium\",\n\t\t\t\t\t\t\"width\"\t\t=> 100,\n\t\t\t\t\t\t\"height\"\t=> 100,\n\t\t\t\t\t\t\"enlarge\"\t=> false,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t\t=> \"big\",\n\t\t\t\t\t\t\"width\"\t\t=> 300,\n\t\t\t\t\t\t\"height\"\t=> 300,\n\t\t\t\t\t\t\"enlarge\"\t=> false,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"name\"\t\t=> \"large\",\n\t\t\t\t\t\t\"width\"\t\t=> 600,\n\t\t\t\t\t\t\"height\"\t=> 600,\n\t\t\t\t\t\t\"enlarge\"\t=> false,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\t'title' => elgg_echo('vazco_newsletter:thumb_image'),\n\t\t\t),\n\t\t\t*/\n\t\t\t);\n\t\treturn $fieldArray;\n }", "protected function addElements() \n {\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'nombre',\n 'options' => [\n 'label' => 'Usuario Adicional',\n ],\n ]);\n \n \n // Add \"telefono\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telefono',\n 'options' => [\n 'label' => 'Teléfono',\n ],\n ]);\n \n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email',\n 'options' => [\n 'label' => 'Mail',\n ],\n ]);\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'skype',\n 'options' => [\n 'label' => 'Skype',\n ],\n ]);\n \n // Add \"id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'id',\n 'options' => [\n 'label' => 'id',\n ],\n ]);\n \n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [\n 'value' => 'Create'\n ],\n ]);\n\n }", "function mongo_node_page_edit($entity_type, $entity) {\n $title = $entity->title;\n drupal_set_title($title);\n\n $content = array();\n $content = drupal_get_form('mongo_node_form', $entity, $entity_type);\n\n return $content;\n}", "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}", "public function getAdd()\n {\n return array(\n 'Currency.name' => array('type' => 'text', 'label' => __(\"Name\")),\n 'Currency.code' => array('type' => 'text', 'label' => __(\"Code\")),\n 'Currency.rate' => array('type' => 'text', 'label' => __(\"Rate\"))\n );\n }", "protected function addElements() \n { \n // Add \"nom\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'nom_parent',\n 'attributes' => [\n 'id' => 'nom_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Nom de famille:',\n ],\n ]);\n \n // Add \"prenom\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'prenom_parent',\n 'attributes' => [\n 'id' => 'prenom_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Prénom parent:',\n ],\n ]);\n \n // Add \"domicile\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'domicile',\n 'attributes' => [\n 'id' => 'domicile',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Domicile:',\n ],\n ]);\n \n // Add \"telephone_number\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telephone1',\n 'attributes' => [\n 'id' => 'telephone1'\n ],\n 'options' => [\n 'label' => 'Téléphone 1',\n ],\n ]);\n \n // Add \"telephone_number\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telephone2',\n 'attributes' => [\n 'id' => 'telephone2'\n ],\n 'options' => [\n 'label' => 'Téléphone 2',\n ],\n ]);\n \n // Add \"code eleve \" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email_parent',\n 'attributes' => [\n 'id' => 'email_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'E-mail:',\n ],\n ]);\n \n // Add \"comment\" field\n $this->add([ \n 'type' => 'textarea',\n 'name' => 'commentaire',\n 'options' =>[\n 'label' => 'Commentaires:',\n ],\n 'attributes' => [\n 'id' => 'commentaire',\n 'style' => 'width: 50%'\n ], \n ]);\n \n // Add the submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Enregistrer',\n 'id' => 'submitbutton',\n ],\n ]); \n \n }", "protected function createFormFields() {\n\t}", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function edit() \n {\n $post = Input::all();\n \n $bodyArrayKey = $this->model . '-Array';\n\t\tif(isset($post[$bodyArrayKey]) && !empty($post[$bodyArrayKey])) {\n $arrayInput = $post[$bodyArrayKey];\n\t\t\tparse_str($arrayInput, $output);\n $post[$this->model] = $output[$this->model] ;\n }\n \n $jsonKey = $this->model . '-Multiple';\n \n if(isset($post[$jsonKey]) && !empty($post[$jsonKey])) {\n $jsonInput = $post[$jsonKey];\n $arrayObject = json_decode($jsonInput);\n foreach($arrayObject as $key => $object) {\n $arrayObject[$key] = get_object_vars($object);\n }\n \n $post[$this->model] = $arrayObject;\n }\n \n $result = array();\n foreach ($post[$this->model] as $singlePost) {\n $singleResult = $this->updateSingleObject($singlePost);\n $result[] = $singleResult;\n }\n \n return $jsend = JSend\\JSendResponse::success($result);\n }", "public function getFormInObject()\n {\n $sExKey = null;\n\n if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {\n\n $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);\n $oModel = new $sModelName;\n\n $oEntity = new $this->_sSynchronizeEntity;\n $sPrimaryKey = LibEntity::getPrimaryKeyNameWithoutMapping($oEntity);\n $sMethodName = 'findOneBy'.$sPrimaryKey;\n $oCompleteEntity = call_user_func_array(array(&$oModel, $sMethodName), array($this->_iIdEntity));\n\n if (is_object($oCompleteEntity)) {\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n\t\t\t\t\tif ($sValue instanceof \\Venus\\lib\\Form\\Input && $sValue->getType() == 'submit') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio) {\n\n $sExKey = $sKey;\n $sKey = substr($sKey, 0, -6);\n }\n\n if ($sValue instanceof Form) {\n\n ;\n } else {\n\n $sMethodNameInEntity = 'get_'.$sKey;\n\t\t\t\t\t\tif (method_exists($oCompleteEntity, $sMethodNameInEntity)) {\n\t\t\t\t\t\t\t$mValue = $oCompleteEntity->$sMethodNameInEntity();\n\t\t\t\t\t\t}\n\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio && method_exists($this->_aElement[$sExKey], 'setValueChecked')) {\n\n $this->_aElement[$sExKey]->setValueChecked($mValue);\n } else if (isset($mValue) && method_exists($this->_aElement[$sKey], 'setValue')) {\n\n $this->_aElement[$sKey]->setValue($mValue);\n }\n }\n }\n }\n }\n\n $oForm = new \\StdClass();\n $oForm->start = '<form name=\"form'.$this->_iFormNumber.'\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"hidden\" value=\"1\" name=\"validform'.$this->_iFormNumber.'\">';\n $oForm->form = array();\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n if ($sValue instanceof Container) {\n\n $oForm->form[$sKey] = $sValue;\n } else {\n\n $oForm->form[$sKey] = $sValue->fetch();\n }\n }\n\n $oForm->end = '</form>';\n\n return $oForm;\n }", "public function addElementForm($add_options = NULL)\n {\n\t\t$fields = array(\"name\",\"last_name\", \"country\", \"web_url\", \"description\");\n\t\t$fields_types = array(\"text\", \"text\", \"text\", \"url\", \"texteditor\");\n\t\t$options = ($add_options != NULL )? $add_options : array(NULL, NULL, NULL, NULL, NULL);\n\t\t$items['entity'] = \"\\writer\";\n\t\t$items['fields'] = $fields;\n\t\t$items['options'] = $options;\n\t\t$items['fields_types'] = $fields_types;\n\t\treturn $items;\n\t}", "public function getEditFields(): array\n\t{\n\t\t$fields = [];\n\t\t$editFields = ['name'];\n\t\t$editFields[] = 'icon';\n\t\tif ($this->fieldModel->getModule()->isEntityModule()) {\n\t\t\tif (!$this->getId()) {\n\t\t\t\t$editFields[] = 'roles';\n\t\t\t}\n\t\t\t$editFields[] = 'description';\n\t\t\t$editFields[] = 'prefix';\n\t\t\tif ($this->fieldModel->getFieldParams()['isProcessStatusField'] ?? false) {\n\t\t\t\tif (\\App\\Db::getInstance()->getTableSchema($this->getTableName())->getColumn('time_counting')) {\n\t\t\t\t\t$editFields[] = 'time_counting';\n\t\t\t\t}\n\t\t\t\t$editFields[] = 'record_state';\n\t\t\t}\n\t\t\tif (15 === $this->fieldModel->getUIType()) {\n\t\t\t\t$editFields[] = 'close_state';\n\t\t\t}\n\t\t}\n\n\t\tforeach ($editFields as $fieldName) {\n\t\t\t$propertyModel = $this->getFieldInstanceByName($fieldName);\n\t\t\tif (null !== $this->get($fieldName)) {\n\t\t\t\t$propertyModel->set('fieldvalue', $this->get($fieldName));\n\t\t\t} elseif (($defaultValue = $propertyModel->get('defaultvalue')) !== null) {\n\t\t\t\t$propertyModel->set('fieldvalue', $defaultValue);\n\t\t\t}\n\t\t\t$fields[$fieldName] = $propertyModel;\n\t\t}\n\n\t\treturn $fields;\n\t}", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function postAdd($request){\r\n global $context;\r\n $data= new $this->model;\r\n foreach($data->fields as $key=>$field){\r\n if($field['type']!='One2many' && $field['type']!='Many2many' ){\r\n $data->data[$key]=$request->post[$key];\r\n }\r\n }\r\n\r\n if(!$data->insert()){\r\n if($request->isAjax()) return json_error($data->error);\r\n throw new \\Exception($data->error);\r\n }\r\n if($request->isAjax()) return json_success(\"Save Success !!\".$data->error,$data);\r\n\r\n\r\n redirectTo($context->controller_path.\"/all\");\r\n }", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public static function Form() : iterable\n {\n return [\n 'role_id' => '',\n 'staff_id' => '',\n 'full_name' => '',\n 'date_of_appointment' => '',\n 'status' => '',\n 'category' => '',\n 'phone_number' => '',\n 'highest_qualification' => '',\n 'branch_id' => '',\n 'email' => '',\n 'address' => '',\n 'gender' => '',\n 'referee_1' => '',\n 'referee_2' => '',\n 'referee_1_phone_no' => '',\n 'referee_2_phone_no' => '',\n 'date_of_birth' => '',\n 'nationality' => '',\n 'next_of_kin_name' => '',\n 'next_of_kin_phone_no' => '',\n 'guarantor_name' => '',\n 'guarantor_phone_no' => '',\n 'guarantor_address' => '',\n 'guarantor_relationship' => '',\n 'guarantor_name_2' => '',\n 'guarantor_phone_no_2' => '',\n 'guarantor_address_2' => '',\n 'guarantor_relationship_2' => '',\n 'cv' => '',\n ];\n }", "function getDataCollectionForms()\n{\n $dataForms = array();\n foreach($this->getScreens() as $screenName => $screen){\n if('editscreen' == strtolower(get_class($screen))){\n //remove unnecessary properties?\n\n //filter out screens without editable fields (we might support screens with grids later)\n $fields = $screen->Fields;\n $dataFields = array();\n\n foreach($fields as $fieldName => $field){\n //determine which screen fields to show\n if($field->isEditable()){\n $moduleField = $this->ModuleFields[$fieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $field->nonSaving = true;\n break;\n }\n $field->phrase = $moduleField->phrase;\n $dataFields[$fieldName] = $field;\n }\n\t\t\t\tif(count($field->Fields) > 0){\n foreach($field->Fields as $subFieldName => $subField){\n\n if($subField->isEditable()){\n $moduleField = $this->ModuleFields[$subFieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $subField->nonSaving = true;\n break;\n }\n $subField->phrase = $moduleField->phrase;\n $dataFields[$subFieldName] = $subField;\n }\n }\n }\n }\n if(count($dataFields) > 0){\n $dataForms[$screenName]['phrase'] = $screen->phrase;\n $dataForms[$screenName]['fields'] = $dataFields;\n }\n if(count($screen->Grids) > 0){\n $grids = $screen->Grids;\n foreach($grids as $gridName => $grid){\n if('editgrid' == strtolower(get_class($grid)) && $grid->dataCollectionForm){\n $subModule =& $this->SubModules[$grid->moduleID];\n $gridFields = array();\n\n foreach($grid->FormFields as $fieldName => $field){\n //determine which screen fields to show\n if($field->isEditable()){\n $moduleField = $subModule->ModuleFields[$fieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $field->nonSaving = true;\n break;\n }\n $field->phrase = $moduleField->phrase;\n $gridFields[$fieldName] = $field;\n }\n }\n\n $dataForms[$screenName]['moduleName'] = $subModule->Name;\n $dataForms[$screenName]['phrase'] = $screen->phrase;\n $dataForms[$screenName]['sub'][$grid->moduleID] = array(\n $grid->phrase,\n $gridFields\n );\n\n }\n }\n }\n }\n }\n return $dataForms;\n}", "protected function addElements() \n {\n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'title',\n 'options' => [\n 'label' => 'Title',\n ],\n ]);\n \n // Add \"parent_id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'parent_id', \n 'options' => [\n 'label' => 'Full Name',\n ],\n ]);\n \n if ($this->scenario == 'create') {\n \n\n }\n \n // Add \"status\" field\n $this->add([ \n 'type' => 'select',\n 'name' => 'status',\n 'options' => [\n 'label' => 'Status',\n 'value_options' => [\n 1 => 'Active',\n 2 => 'Retired', \n ]\n ],\n ]);\n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Create'\n ],\n ]);\n }", "function bodyAdd($request){\r\n global $context;\r\n $data= new $this->model;\r\n foreach($data->fields as $key=>$field){\r\n if($field['type']!='One2many' && $field['type']!='Many2many' ){\r\n $data->data[$key]=$request->body[$key];\r\n }\r\n }\r\n\r\n if(!$data->insert()){\r\n if($request->isAjax()) return json_error($data->error);\r\n throw new \\Exception($data->error);\r\n }\r\n if($request->isAjax()) return json_success(\"Save Success !!\".$data->error,$data);\r\n\r\n\r\n redirectTo($context->controller_path.\"/all\");\r\n }", "public function toFormArray() : array {\n $return = [];\n\n foreach ($this->toArray() as $component) {\n $return = array_merge($return, $component->toFormArray());\n }\n\n return $return;\n }", "protected function form()\n {\n return [];\n }", "protected function form()\n {\n return [];\n }", "public function hydrateeditquestionformAction()\r\n {\r\n\r\n // Check Post\r\n if (!$this->getRequest()->isPost())\r\n die();\r\n\r\n $params = $this->getRequest()->getParams();\r\n $questionId = $params['questionId'];\r\n\r\n\r\n $question = new Application_Model_DbTable_FicheQuestion();\r\n $question = $question->getOneQuestionById($questionId);\r\n $this->_helper->json($question);\r\n\r\n }", "public function __add_onetoone($form){\n\n if(!isset($form)){\n throw new Exception('__add_onetoone : param[form] not set!');\n }\n\n foreach ($this->onetoone as $filed => $model) {\n // 一对一 名称\n $filed_name = $this->model[$filed][0];\n\n // 一对一 表单字段\n $_model = new $model[0];\n\n foreach ($_model->get_field() as $value){\n if(array_key_exists($value, $_model->get_model())){\n // 是否需要校验\n $validate = in_array($value, $_model->get_front_validate());\n\n $type = $_model->get_model()[$value][1];\n\n $name = $_model->get_model()[$value][0];\n\n $join_key = array($filed, $value);\n $body_arr = array(join('_',$join_key), $name, $validate, false);\n\n if($type == 'select'){\n $relation = array();\n\n foreach ($_model->get_relations() as $o_key => $o_model_arrays){\n foreach ($o_model_arrays as $o_model_field => $o_model_array){\n\n // 数组的方式获取数据\n $method = '_rget_'.$o_model_array;\n\n foreach ($_model->$method() as $key => $value){\n $tmp['name'] = $value;\n $tmp['value'] = $key;\n\n array_push($relation, $tmp);\n }\n }\n }\n }\n $relation = isset($relation) ? $relation : '';\n\n $form->add_block($type, $filed_name, $body_arr, $relation);\n\n unset($relation);\n\n }\n }\n }\n }", "private function createFields(){\n //Human::log(\"------------- Create fields model \".$this->modelName);\n self::$yetInit[get_class($this)]=true;\n //let's init database.\n $modelName=get_class($this);\n $modelNameManager=$modelName.\"Manager\";\n if(!class_exists($modelNameManager)){\n $modelNameManager=\"DbManager\";\n }\n $rc=new ReflectionClass($modelName);\n $rc->setStaticPropertyValue(\"manager\", new $modelNameManager( $modelName ));\n \n //browse the class properties to find db fields and then store it in a good order (keys first, associations later)\n\t $fields=array();\n foreach ($rc->getProperties() as $field){\n if($field->isPublic()){\n\n\n //get the type from the @var type $field name comment...yes, I'm sure.\n $comments=$field->getDocComment();\n $details=CodeComments::getVariable($comments);\n\n $type=$details[\"type\"];\n $isVector=$details[\"isVector\"];\n $description=$details[\"description\"];\n $fieldName=$field->name;\n\n $fieldObject=$this->getDbField($fieldName,$type,$isVector);\n\n if($fieldObject){\n $fieldObject[\"comments\"]=$description;\n switch($fieldObject[\"type\"]){\n\n case \"OneToOneAssoc\":\n case \"NToNAssoc\":\n //associations at the end\n array_push($fields, $fieldObject);\n break;\n\n default :\n //classic fields at the beginning\n array_unshift($fields, $fieldObject);\n\n }\n\n }\n }\n }\n\t //create the fields\n\t foreach ($fields as $f){\n\t\t$f[\"options\"][Field::COMMENTS]=$f[\"comments\"];\n Field::create($modelName.\".\".$f[\"name\"],$f[\"type\"],$f[\"options\"]);\n //Human::log($this->modelName.\" Create field \".$f[\"name\"]);\n \n\t }\n \n\t //whooho!\n $this->db()->init(); \n }", "public function getCreateFields()\n {\n\n return array\n (\n 'wbfsys_entity_tag' => array\n (\n 'vid',\n 'id_entity',\n 'id_tag',\n 'm_version',\n ),\n 'embed_tag' => array\n (\n 'name',\n 'access_key',\n 'id_lang',\n 'm_parent',\n 'description',\n ),\n 'wbfsys_tag' => array\n (\n 'name',\n 'access_key',\n 'id_lang',\n 'm_parent',\n 'description',\n ),\n\n );\n\n }", "public static function get_input_fields() {\n\t\treturn array_merge(\n\t\t\tMediaItemCreate::get_input_fields(),\n\t\t\t[\n\t\t\t\t'id' => [\n\t\t\t\t\t'type' => [\n\t\t\t\t\t\t'non_null' => 'ID',\n\t\t\t\t\t],\n\t\t\t\t\t// translators: the placeholder is the name of the type of post object being updated\n\t\t\t\t\t'description' => sprintf( __( 'The ID of the %1$s object', 'wp-graphql' ), get_post_type_object( 'attachment' )->graphql_single_name ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'storeId' => function ($model) {\n return (string)$model->storeId;\n },\n 'phone', 'badge', 'name', 'gender', 'birthday','channel','qrcodeUrl',\n 'isActivated' => function ($model) {\n $status = $model->isActivated ? 'ENABLE' : 'DISABLE';\n return $status;\n },\n 'accountId' => function ($model) {\n return (string) $model->accountId;\n },\n 'createdAt' => function ($model) {\n return MongodbUtil::MongoDate2String($model->createdAt, 'Y-m-d H:i:s');\n },\n ]\n );\n }", "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 }", "private function _get_crud_for_index() {\t\t\n\t\t$data = array(\n\t\t\t'insert' => array(\n\t\t\t\tarray ('name' => 'name', 'label' => t('Role name'), 'type' => 'input',\n\t\t\t\t\t'rules' => array('unique', 'required', array('max_length' => 30, 'min_length' => 3), 'trim'),),\n\t\t\t),\n\t\t\t'select' => array(\n\t\t\t\tarray('name' => 'id', 'label' => 'ID', 'rules' => array('key', 'hidden', 'trim'),),\n\t\t\t\tarray('name' => 'name',\t'label' => t('Role name'), 'link' => 'example1/acl/screens/{id}', \n\t\t\t\t\t'rules' => array('trim', 'htmlspecialchars'),),\n\t\t\t),\n\t\t\t'update' => array(\n\t\t\t\tarray('name' => 'name',\t'label' => t('Role name'), 'type' => 'input', \n\t\t\t\t\t'rules' => array('unique', 'required', array('max_length' => 30, 'min_length' => 3), 'trim'),),\n\t\t\t),\n\t\t\t'delete' => array(\n\t\t\t\tarray('name' => 'name', 'label' => t('Role name'),),\n\t\t\t),\n 'search' => array('name' => t('Role name')),\n\t\t\t'datasource' => array(\n\t\t\t\t'table' => 'oci_roles',\n\t\t\t),\n\t\t\t'properties' => array(\n\t\t\t\t'name' => 'roles',\n\t\t\t\t'uri' => 'example1/roles/index',\n\t\t\t\t'index_column' => TRUE,\n\t\t\t\t'index_column_start' => 1,\n 'pagination' => TRUE,\n\t\t\t\t'pagination_per_page' => 5,\n\t\t\t\t'insert' => TRUE,\n\t\t\t\t'update' => TRUE,\n\t\t\t\t'delete' => TRUE,\n\t\t\t\t'crud_title' => NULL,\n\t\t\t\t'crud_form_title' => '<h2>'.t('List of Roles').'</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}", "public function initialize($entity = null, $options = array())\n {\n if (!isset($options['edit'])) {\n\n $elemento = new Text(\"formacion_id\");\n $this->add($elemento->setLabel(\"Id\"));\n } else {\n $this->add(new \\Phalcon\\Forms\\Element\\Hidden(\"formacion_id\"));\n }\n /*========================== ==========================*/\n $elemento = new Text('formacion_institucion',array('maxlength'=>50,'class'=>'form-control','required'=>'true','placeholder'=>'Ingrese el nombre de la institución'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Institución');\n $elemento->setFilters(array('striptags', 'string'));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'El nombre de la institución es requerido'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_gradoId', \\Curriculum\\Grado::find(), array(\n 'using' => array('grado_id', 'grado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el nivel'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Nivel');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Text('formacion_titulo',array('maxlength'=>50,'class'=>'form-control','placeholder'=>'Ingrese el nombre del Titulo','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Titulo');\n $elemento->setFilters(array('striptags', 'string'));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Select('formacion_estadoId', \\Curriculum\\Estado::find(), array(\n 'using' => array('estado_id', 'estado_nombre'),\n 'useEmpty' => true,\n 'emptyText' => 'Seleccionar ',\n 'emptyValue' => '',\n 'class'=>'form-control','required'=>'true'\n ));\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Seleccione el estado'\n ))\n ));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Estado');\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaInicio',array('class'=>'form-control','required'=>'true'));\n $elemento->setLabel('<strong class=\"font-rojo \"> * </strong>Fecha de Inicio');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha de inicio es requerida.'\n ))\n ));\n $this->add($elemento);\n /*========================== ==========================*/\n $elemento = new Date('formacion_fechaFinal',array('class'=>'form-control', 'disabled'=>''));\n $elemento->setLabel('Fecha Final');\n $elemento->addValidators(array(\n new PresenceOf(array(\n 'message' => 'La fecha final es requerida.'\n ))\n ));\n $this->add($elemento);\n\n }", "public function generateForm()\n {\n $form = \\Drupal::formBuilder()->getForm('\\Drupal\\demo\\Form\\DemoForm');\n \n $build = array();\n\n $build['enabled'] = array(\n '#type' => 'checkbox',\n '#title' => 'Activer'\n );\n\n $build['forms'] = array(\n 'form1' => $form,\n 'form2' => $form\n );\n\n return $build;\n }", "private function createEditForm(Element $entity)\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$request = $this->container->get('request_stack')->getCurrentRequest();\n\t\t$params = $request->get('_route_params');\n\t\t$block = $em->getRepository('NovuscomCMFBundle:Block')->find($params['block_id']);\n\n\t\t$epArray = array();\n\t\t$epDescription = array();\n\n\t\t/**\n\t\t * Пролучаем значения свойств типа \"строка\"\n\t\t */\n\t\t$ElementProperty = $em->getRepository('NovuscomCMFBundle:ElementProperty')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\tforeach ($ElementProperty as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t\t$epDescription[$ep->getProperty()->getId()][] = $ep->getDescription();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"дата/время\"\n\t\t */\n\t\t$ElementPropertyDT = $em->getRepository('NovuscomCMFBundle:ElementPropertyDT')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\t\tforeach ($ElementPropertyDT as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"файл\"\n\t\t */\n\t\t$ElementPropertyFile = $em->getRepository('NovuscomCMFBundle:ElementPropertyF')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\t$ElementPropertyFileId = array();\n\t\tforeach ($ElementPropertyFile as $epf) {\n\t\t\t$ElementPropertyFileId[$epf->getProperty()->getId()][$epf->getId()] = $epf->getFile()->getId();\n\t\t}\n\n\n\t\t/**\n\t\t * Устанавливаем значения для формы\n\t\t */\n\t\t$data = array(\n\t\t\t'VALUES' => $epArray,\n\t\t\t'DESCRIPTION' => $epDescription,\n\t\t\t'PROPERTY_FILE_VALUES' => $ElementPropertyFileId,\n\t\t\t'LIIP' => $this->get('liip_imagine.cache.manager'),\n\t\t\t'BLOCK_PROPERTIES' => $block->getProperty(),\n\t\t\t'ELEMENT_ENTITY' => $entity,\n\t\t\t'service.file' => $this->get('File'),\n\t\t);\n\n\n\t\t//$propertyForm = new ElementPropertyType($block->getProperty(), $em, $data, $request);\n\n\t\t//$formProperty = new FormProperty();\n\t\t//$formProperty->setValue('value of form property');\n\n\t\t/*$formElement = new FormElement();\n\t\t$formElement->setName($entity->getName());\n\t\t$formElement->setCode($entity->getCode());\n\t\t$formElement->setProperties($formProperty);*/\n\n\t\t$action_url = $this->generateUrl('admin_element_update', array('id' => $entity->getId(), 'block_id' => $params['block_id']));\n\t\tif (array_key_exists('section_id', $params)) {\n\t\t\t$action_url = $this->generateUrl('admin_element_update_in_section', array(\n\t\t\t\t'id' => $entity->getId(),\n\t\t\t\t'block_id' => $params['block_id'],\n\t\t\t\t'section_id' => $params['section_id']\n\t\t\t));\n\t\t}\n\t\t$form = $this->createForm(ElementType::class, $entity, array(\n\t\t\t'action' => $action_url,\n\t\t\t'method' => 'PUT',\n\t\t\t'em' => $em,\n\t\t\t'blockObject' => $block\n\t\t));\n\n\n\t\t$form->add('properties', ElementPropertyType::class,\n\t\t\tarray(\n\t\t\t\t//'entry_type' => ElementPropertyType::class,\n\t\t\t\t'label' => 'Свойства',\n\t\t\t\t'mapped' => false,\n\t\t\t\t//'by_reference' => false,\n\t\t\t\t//'allow_add' => true,\n\t\t\t\t//'allow_delete' => true,\n\t\t\t\t//'prototype' => true,\n\t\t\t\t'data' => $data,\n\t\t\t\t//'options' => array('asdasdasdasd'), // не работает\n\t\t\t));\n\n\t\t//$form->add('submit', SubmitType::class, array('label' => 'Сохранить', 'attr' => array('class' => 'btn btn-info')));\n\n\n\t\treturn $form;\n\t}", "function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "public function addElementForm($add_options = NULL)\n {\n \t$address_option_list = $this->getChoiceList(\"address\", \"street\", \"getIdAddress\"); \n\t\t$fields = array(\"latitude\", \"longitude\", \"select_address\", \"description\");\n\t\t$fields_types = array(\"text\", \"text\", \"choice\", \"textarea\");\n\t\t$options = ($add_options != NULL )? $add_options : array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNULL, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNULL, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\"choices\" => $address_option_list, \"placeholder\" => \"Select Address\"), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNULL\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t$items['entity'] = \"\\location\";\n\t\t$items['fields'] = $fields;\n\t\t$items['options'] = $options;\n\t\t$items['fields_types'] = $fields_types;\n\t\treturn $items;\n\t}", "function custom_entity_generate_form($form, $form_state, $name) {\n $form['entity_label'] = array(\n '#type' => 'value',\n '#value' => $name,\n );\n $form['kill_entities'] = array(\n '#type' => 'checkbox',\n '#title' => t('<strong>Delete all @name</strong> before generating new @name.', ['@name' => $name]),\n '#default_value' => FALSE,\n );\n\n $form['num_entities'] = array(\n '#type' => 'textfield',\n '#title' => t('How many @name would you like to generate?', ['@name' => $name]),\n '#default_value' => 50,\n '#size' => 10,\n );\n\n $form['title_length'] = array(\n '#type' => 'textfield',\n '#title' => t('Max word length of titles'),\n '#default_value' => 4,\n '#size' => 10,\n );\n\n unset($options);\n $options[LANGUAGE_NONE] = t('Language neutral');\n if (module_exists('locale')) {\n $options += locale_language_list();\n }\n $form['add_language'] = array(\n '#type' => 'select',\n '#title' => t('Set language on @name', ['@name' => $name]),\n '#multiple' => TRUE,\n '#disabled' => !module_exists('locale'),\n '#description' => t('Requires locale.module'),\n '#options' => $options,\n '#default_value' => array(LANGUAGE_NONE => LANGUAGE_NONE),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Generate'),\n );\n $form['#redirect'] = FALSE;\n\n return $form;\n}", "public function run()\n {\n FormDefination::create([\n \"name\"=>\"PRODUCT\",\n \"form_json\"=>'{\"PRODUCT NAME\":\"text\",\"PRODUCT CODE\":\"text\",\"PRODUCT COLOR\":\"text\",\"PRODUCT DESCRIPTION\":\"textarea\",\"PRODUCT PRICE\":\"number\",\"PRODUCT IMAGES\":\"file\",\"col\":\"2\",\"col_1\":\"2\",\"row\":\"3\",\"save\":\"Y\",\"cancel\":\"Y\",\"update\":\"Y\",\"delete\":\"Y\"}',\n ]);\n FormDefination::create([\n \"name\"=>\"CATEGORY\",\n \"form_json\"=>'{\"CATEGORY NAME\":\"text\",\"CATELOGUE NAME\":\"text\",\"CATTEGORY DESCRIPTION\":\"textarea\",\"col\":\"1\",\"col_1\":\"2\",\"row\":\"3\",\"save\":\"Y\",\"cancel\":\"Y\",\"update\":\"Y\",\"delete\":\"Y\"}',\n ]);\n FormDefination::create([\n \"name\"=>\"CATELOGUE\",\n \"form_json\"=>'{\"CATELOGUE NAME\":\"text\",\"CATELOGUE DESCRIPTION\":\"textarea\",\"col\":\"2\",\"col_1\":\"2\",\"row\":\"1\",\"save\":\"Y\",\"cancel\":\"Y\",\"update\":\"Y\",\"delete\":\"Y\"}',\n ]);\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "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}", "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}", "public function getFormFields() {\n $fields = array(\n 'shapes[]' => array(\n 'type' => 'select',\n 'multiplicate' => '5',\n 'values' => array(\n '-' => '-',\n 'cube' => 'cube',\n 'round' => 'round',\n )\n ),\n 'width[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Width'\n ),\n 'higth[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Higth'\n ),\n 'x_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'X position'\n ),\n 'y_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Y position'\n ),\n 'red[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color red',\n ),\n 'green[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color green',\n ),\n 'blue[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color blue',\n ),\n 'size[]' => array(\n 'type' => 'text',\n 'multiplicate' => '1',\n 'label' => 'Size holst'\n ),\n 'enable[]' => array(\n 'type' => 'checkbox',\n 'multiplicate' => '5',\n 'label' => 'enable'\n )\n );\n return $fields;\n }", "public function initialize($entity = null, $options = null)\n {\n if (isset($options['edit']) && $options['edit']) {\n $id = new Hidden('id');\n } else {\n $id = new Text('id');\n }\n\n $this->add($id);\n\n // //id reseller\n // $id_reseller= new Text('id_reseller', [\n // 'placeholder' => 'Id Reseller'\n // ]);\n //\n // $id_reseller->setLabel('Reseller');\n // // $id_reseller->addValidators([\n // // new PresenceOf([\n // // 'message' => 'Id Reseller is required'\n // // ])\n // // ]);\n // $this->add($id_reseller);\n\n //nama agen\n $nama_agen = new Text('nama_agen', [\n 'placeholder' => 'Nama Agen'\n ]);\n\n $nama_agen->setLabel('Nama Agen');\n\n $nama_agen->addValidators([\n new PresenceOf([\n 'message' => 'Nama Agen is required'\n ])\n ]);\n\n $this->add($nama_agen);\n\n\n //merk\n $merk = new Text('merk', [\n 'placeholder' => 'Merk'\n ]);\n\n $merk->setLabel('Merk');\n $merk->addValidators([\n new PresenceOf([\n 'message' => 'Merk is required'\n ])\n ]);\n\n $this->add($merk);\n\n\n //serial number\n $serial_number = new Text('serial_number', [\n 'placeholder' => 'Serial Number'\n ]);\n\n $serial_number->setLabel('Serial Number');\n $serial_number->addValidators([\n new PresenceOf([\n 'message' => 'Serial Number is required'\n ])\n ]);\n\n $this->add($serial_number);\n\n\n //lokasi\n $lokasi = new Text('lokasi', [\n 'placeholder' => 'Lokasi'\n ]);\n\n $lokasi->setLabel('Lokasi');\n $lokasi->addValidators([\n new PresenceOf([\n 'message' => 'Lokasi is required'\n ])\n ]);\n\n $this->add($lokasi);\n\n\n //alamat\n $alamat = new Text('alamat', [\n 'placeholder' => 'Alamat'\n ]);\n\n $alamat->setLabel('Alamat');\n $alamat->addValidators([\n new PresenceOf([\n 'message' => 'Alamat is required'\n ])\n ]);\n\n $this->add($alamat);\n\n // Save\n $this->add(new Submit('Save', [\n 'class' => 'btn btn-success',\n 'id'=> 'submit'\n ]));\n\n // Save\n $this->add(new Submit('Search', [\n 'class' => 'btn btn-success',\n 'id'=> 'submit'\n ]));\n\n //id_doctor\n $findreseller = Users::find([\"profilesId = '5'\"]);\n $id_reseller = new Select('id_reseller', $findreseller, [\n 'using' => [\n 'id',\n 'name'\n ],\n 'useEmpty' => true,\n 'emptyText' => '----Select Reseller----',\n 'emptyValue' => ''\n ]);\n $id_reseller->setLabel('Reseller *');\n $this->add($id_reseller);\n\n }", "public function createComponentEditForm(){\n $frm = $this->formFactory->create();\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n \n //query database for listing type\n $FE = $this->listings->isFE($listingID);\n $MS = $this->listings->isMultisig($listingID);\n \n //checkbox value rendering logic\n $checkVal = array();\n \n if ($MS){\n $checkVal[\"ms\"] = \"ms\";\n }\n \n if ($FE){\n $checkVal[\"fe\"] = \"fe\";\n }\n \n $this->lHelp->constructCheckboxList($frm)->setValue($checkVal);\n \n //discard option array\n unset($checkVal);\n\n $cnt = count ($this->postageOptions); \n $session = $this->hlp->sess(\"postage\");\n\n \n for ($i = 0; $i<$cnt; $i++){\n\n $frm->addText(\"postage\" . $i, \"Doprava\");\n $frm->addText(\"pprice\" . $i, \"Cena dopravy\");\n\n }\n \n //additional postage textboxes logic\n $counter = $session->counterEdit;\n $values = $session->values;\n \n if (!is_null($counter)){\n \n $frm->addGroup(\"Postage\");\n \n for ($i =0; $i<$counter; $i++){\n $frm->addText(\"postage\" .$i. \"X\", \"Doprava\"); \n $frm->addText(\"pprice\" .$i. \"X\", \"Cena\");\n }\n }\n \n $frm->addSubmit(\"submit\", \"Upravit\");\n $frm->addSubmit(\"add_postage\", \"Přidat dopravu\")->onClick[] = \n \n function() use($listingID) {\n \n //inline onlclick handler, that counts postage options\n $session = $this->hlp->sess(\"postage\");\n $counter = &$session->counterEdit;\n \n if ($counter <= self::MAX_POSTAGE_OPTIONS){\n $counter++;\n } else {\n $this->flashMessage(\"Dosáhli jste maxima poštovních možností.\");\n }\n \n $form = $this->getComponent(\"editForm\");\n $session->values = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:editListing\", $listingID);\n };\n \n $this->lHelp->fillForm($frm, $values); \n $frm->onSuccess[] = array($this, 'editSuccess');\n $frm->onValidate[] = array($this, 'editValidate');\n \n return $frm; \n }", "function mongo_node_add($entity_type, $bundle) {\n global $user;\n $set = mongo_node_settings();\n\n $entity = entity_create($entity_type, array(\n 'uid' => $user->uid,\n 'name' => (isset($user->name) ? $user->name : ''),\n 'type' => $bundle,\n 'language' => LANGUAGE_NONE,\n )\n );\n $form_id = $entity_type . '_' . $bundle . '_mongo_node_form';\n $output = drupal_get_form($form_id, $entity, $entity_type);\n\n return $output;\n}", "protected function setupUpdateOperation()\n {\n $plugin = $this->crud->getEntryWithLocale($this->crud->getCurrentEntryId());\n\n $fields = $plugin->options;\n\n CRUD::addField(['name' => 'fields', 'type' => 'hidden', 'value' => collect($fields)->implode('name', ',')]);\n\n foreach ($fields as $field) {\n CRUD::addField($field);\n }\n }", "public function makeFieldList() {}", "public function createModelFormFields(Zend_Form $form = NULL)\n\t{\n\t\t// Process the fields into an array\n\t\t$fields = $this->processFields();\n\n\t\tif (NULL !== $form) {\n\t\t\treturn $form->addElements($form);\n\t\t}\n\n\t\treturn $fields;\n\t}", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "public function editAction() {\n $entities = $this\n ->_getRepository()\n ->findAllOrdered();\n $entities = $this->_transformAllConfigEntities($entities);\n $form = $this->createForm(new ConfigType(), array(\n 'configentities' => $entities,\n ));\n\n return array(\n 'form' => $form->createView(),\n );\n }", "public function populateForm() {}", "function save() {\n //save the added fields\n }", "protected function forms()\r\n {\r\n $metaFileInfo = $this->getFormObj()->GetMetaFileInfo();\r\n $modulePath = $metaFileInfo['modules_path'];\r\n $modulePath = substr($modulePath,0,strlen($modulePath)-1);\r\n global $g_MetaFiles;\r\n php_grep(\"<EasyForm\", $modulePath);\r\n \r\n for ($i=0; $i<count($g_MetaFiles); $i++)\r\n {\r\n $g_MetaFiles[$i] = str_replace('/','.',str_replace(array($modulePath.'/','.xml'),'', $g_MetaFiles[$i]));\r\n $list[$i]['val'] = $g_MetaFiles[$i];\r\n $list[$i]['txt'] = $g_MetaFiles[$i];\r\n }\r\n\r\n return $list; \r\n }", "public function creataTypeArray()\n\t{\n\t\t$this->db->creataTypeArray();\n\t}", "protected function _prepareForm()\n\t{\n\n\t\t$intId = $this->getRequest()->getParam(SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID);\n\n\t\t$objEntity = new SDZeCOM_Aurednik_Model_Cms_Home_Entity ();\n\n\t\t$objEntity->load($intId);\n\n\t\t$objAttribute = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute ();\n\n\t\t$objAttributeValue = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute_Values ();\n\n\t\t$objEntityType = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Type ();\n\n\t\t$objForm = new Varien_Data_Form (\n\t\t\tarray(\n\t\t\t\t'id' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME,\n\t\t\t\t'action' => $this->getUrl('*/*/save'),\n\t\t\t\t'method' => 'post',\n\t\t\t\t'enctype' => 'multipart/form-data',\n\t\t\t\t'name' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME\n\t\t\t)\n\t\t);\n\n\t\t$this->setForm($objForm);\n\n\t\t$objForm->setUseContainer(true);\n\n\t\t//Set Enitty\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset('aurednik_cms_home_entity',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity')));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'required' => true,\n\t\t\t\t'value' => $objEntity->getId(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getEntity_name(),\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$field = $objFieldset->addField(SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store::TABLE_COLUMN_STORE_ID, 'multiselect', array(\n\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store :: TABLE_COLUMN_STORE_ID . ']',\n\t\t\t'label' => Mage::helper('cms')->__('Store View'),\n\t\t\t'title' => Mage::helper('cms')->__('Store View'),\n\t\t\t'required' => true,\n\t\t\t'value' => $objEntity->getStore_id(),\n\t\t\t'values' => Mage:: getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),\n\t\t));\n\n\t\t$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');\n\t\t$field->setRenderer($renderer);\n\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => true,\n\t\t\t\t'options' => $objEntityType->toOptionArray(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'value' => $objEntity->getType_id()\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => false,\n\t\t\t\t'options' => array(0 => Mage:: helper('admin')->__('No'), 1 => Mage:: helper('admin')->__('Yes')),\n\t\t\t\t'value' => $objEntity->getActive()\n\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getSort(),\n\t\t\t\t'class' => 'required-entry',\n\t\t\t\t'required' => true,\n\t\t\t));\n\n\t\t$objAttrCollection = $objAttribute->getCollection()->getByEntityTypeId($objEntity->getType_id());\n\n\t\tif ($objAttrCollection->count() == 0)\n\t\t{\n\t\t\tMage:: getSingleton('core/session')->addError(Mage:: helper('aurednik')->__('Error no attributes'));\n\t\t\t$this->getResponse()->sendResponse();\n\t\t}\n\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset(\n\t\t\t\t'aurednik_cms_home_entity_data',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity attribute data')\n\t\t\t\t)\n\t\t\t);\n\n\t\tforeach ($objAttrCollection as $objCurrentAttr)\n\t\t{\n\n\t\t\t$objEntityAttrValuesCollection = $objAttributeValue->getCollection()->getByEntityIdAndAttributeId($objEntity->getId(), $objCurrentAttr->getId());\n\n\t\t\tif ($objEntityAttrValuesCollection->count() > 0)\n\t\t\t{\n\n\t\t\t\tforeach ($objEntityAttrValuesCollection as $objCurrentAttrValue)\n\t\t\t\t{\n\n\t\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t\t$objCurrentAttrValue->getId(),\n\t\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t\t'value' => $objCurrentAttrValue->getAttribute_value(),\n\t\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t$objEntity->getId() . \"_\" . $objCurrentAttr->getId(),\n\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\treturn parent:: _prepareForm();\n\t}", "public function form()\n {\n \n return Admin::form(articleModel::class, function (Form $form) {\n $articlecats = articleCatModel::all()->toArray();\n $arr = array_pluck($articlecats, 'name', 'id');\n $form->select('cid','文章分类')->options($arr);\n $form->text('title','文章标题');\n// $form->textarea('content','文章内容');\n $form->editor('content','文章内容');\n $form->image('img','文章图片');\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '更新时间');\n });\n }", "public static function formData()\n {\n return [\n 'id',\n 'code',\n 'name',\n 'icon',\n 'position',\n 'link',\n 'parent_id' => [\n 'dropDownList' => [ 'list' => static::dataOptions('id', 'name') ]\n ],\n 'row_status' => [\n // 'radioList' => [ 'list' => [ 0 => 'Active', 1 => 'Disactive' ] ]\n 'dropDownList' => [ 'list' => [ 1 => 'Active', 0 => 'Disactive' ] ]\n ]\n ];\n }", "protected function _addFormArrayProvider()\n {\n $this->addContextProvider('array', function ($request, $data) {\n if (is_array($data['entity']) && isset($data['entity']['schema'])) {\n return new ArrayContext($request, $data['entity']);\n }\n });\n }", "public function handle(ActionFields $fields, Collection $models)\n {\n\n foreach ($models as $model) {\n\n $data = DB::table('confirmations')->where('id',$model->id)->first();\n\n $modeldata = json_decode($data->data); //json string to associative array\n\n if ($modeldata->name == 'Update') {\n $newmodel = $modeldata->model_type::find($modeldata->model_id);\n }else{\n $newmodel = new $modeldata->model_type;\n }\n\n \n\n $chagesdataobj = $modeldata->changes;\n\n $changedataarr = json_decode(json_encode($chagesdataobj), true); //object to associative array\n\n\n //echo \"<pre>\"; print_r($chagesdata); die;\n\n foreach ($changedataarr as $key => $value) {\n $newmodel->$key = $changedataarr[$key];\n }\n\n $newmodel->save();\n //$data = DB::table('confirmations')->where('id',$model->id)->first();\n\n // $modeldata = $model->data;\n\n // $newmodel = $modeldata->model_type::find($modeldata->model_id);\n\n // $chagesdata = json_decode($newmodel->changes,true);\n\n // foreach ($chagesdata as $key => $value) {\n // $newmodel->$key = $chagesdata[$key];\n // }\n\n // $newmodel->save();\n\n //echo \"<pre>\"; print_r($model); die;\n\n\n // $data = DB::table('action_events')->where('model_type',$model)->where('model_id',$model->id)->get()->last();\n\n // $changes = json_decode($data->changes);\n\n // $newmodel = $data->model_type::find($data->model_id);\n\n // $newmodel->title = $changes->title;\n\n // $newmodel->save();\n\n\n $model->is_checked = 1;\n\n $model->save();\n\n return Action::message('Confirmed');\n }\n\n }", "public function buildFields()\n {\n $this->addField('name', 'media.adminlist.configurator.name', true);\n $this->addField('contentType', 'media.adminlist.configurator.type', true);\n $this->addField('updatedAt', 'media.adminlist.configurator.date', true);\n $this->addField('filesize', 'media.adminlist.configurator.filesize', true);\n }", "function annotation_admin_types() {\n $annotation_entity = entity_get_info('annotation');\n $bundles = $annotation_entity['bundles'];\n //dpm($bundles);\n $field_ui = module_exists('field_ui');\n $header = array(t('Name'), array('data' => t('Operations'), 'colspan' => $field_ui ? '4' : '2'));\n $rows = array();\n\n foreach ($bundles as $key => $bundle) {\n $type = check_plain($key);\n $name = check_plain($bundle['label']);\n $row = array($name . ' <small>' . t('(Machine name: @type)', array('@type' => $type)) . '</small><div class=\"description\">' . filter_xss_admin($bundle['description']) . '</div>');\n // Set the edit column.\n $row[] = array('data' => l(t('edit'), $bundle['admin']['real path']));\n /*\n if ($field_ui) {\n // Manage fields.\n $row[] = array('data' => l(t('manage fields'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/fields'));\n // Display fields.\n $row[] = array('data' => l(t('manage display'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/display'));\n }*/\n // Set the delete column.\n if ($bundle['custom']) {\n $row[] = array('data' => l(t('delete'), 'admin/annotation/annotation_types/manage/' . check_plain($type) . '/delete'));\n }\n else {\n $row[] = array('data' => '');\n }\n\n $rows[] = $row;\n }\n\n $build['node_table'] = array(\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n //'#empty' => t('No content types available. <a href=\"@link\">Add content type</a>.', array('@link' => url('admin/structure/types/add'))),\n );\n\n return $build;\n}", "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'ORDER_NEW_TASK' => new Entity\\StringField('ORDER_NEW_TASK', array(\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}", "public function add(){\n $this->edit();\n }", "function makeAclOptions() {\n\t\tif($_POST['table'] && $_POST['fields']) {\n\t\t\treturn $this->_generator($_POST['table'],$_POST['fields']);\n\t\t}\n\t\telse { //TODO: localization\n\t \t$form = '<form action=\"\" method=\"post\">\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Tables:</td>\n\t\t\t\t\t\t<td><input type=\"text\" name=\"table\" /></td>\n\t\t\t\t\t\t<td>Fields:</td>\n\t\t\t\t\t\t<td><input type=\"text\" name=\"fields\" /></td>\n\t\t\t\t\t\t<td><input type=\"submit\" name=\"submit\" value=\"Generate crud Options\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t</form>';\n\t \treturn $form;\n\t\t}\n\t}", "public function __construct\n (\n $clientes_array = array(),\n $productosvariante_array = array(),\n $productos_generales_array = array()\n )\n {\n parent::__construct('PedidoMayoristaForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'idpedido',\n 'type' => 'Hidden',\n ));\n \n\n\n $this->add(array(\n 'name' => 'pedidomayorista_fechasolicitud',\n 'type' => 'Date',\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' =>1,\n\n ),\n ));\n\n $this->add(array(\n 'name' => 'pedidomayorista_fechaentrega',\n 'type' => 'Date',\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' =>2,\n\n ),\n ));\n\n\n $this->add(array(\n 'name' => 'pedidomayorista_nota',\n 'type' => 'TextArea',\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' => 5\n ),\n ));\n\n\n\n $this->add(array(\n 'name' => 'pedidomayorista_estatus',\n 'type' => 'Select',\n 'options' => array(\n \n 'value_options' => array(\n 'pendiente' => 'Pendiente',\n 'solicitado' => 'Solicitado',\n 'completado' => 'Completado',\n 'transito' => 'En tránsito',\n 'cancelado' => 'Cancelado',\n\n ),\n ),\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' =>4,\n\n ),\n ));\n\n\n $this->add(array(\n 'name' => 'idcliente',\n 'type' => 'Select',\n 'options' => array(\n \n 'value_options' => $clientes_array,\n ),\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' =>3,\n ),\n ));\n\n\n \n\n\n $this->add(array(\n 'name' => 'idproductovariante[]',\n 'type' => 'Select',\n 'options' => array(\n \n 'value_options' => $productosvariante_array, \n ),\n 'attributes' => array(\n 'required' => false,\n 'class' => '',\n \n\n \n ),\n ));\n\n $this->add(array(\n 'name' => 'productos_generales',\n 'type' => 'Select',\n 'options' => array(\n \n 'value_options' => $productos_generales_array, \n ),\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n\n\n \n ),\n ));\n \n\n \n }", "public function add() {\n\n $this->viewBuilder()->layout('admin');\n $doctor = $this->Admins->newEntity();\n if ($this->request->is('post')) {\n// if(!empty($this->request->data['allpermissions']))\n// {\n// $this->request->data['permissions'] = implode(',',$this->request->data['allpermissions']);\n// }\n $doctors = $this->Admins->patchEntity($doctor, $this->request->data);\n \n $this->request->data['created'] = gmdate(\"Y-m-d h:i:s\");\n $this->request->data['modified'] = gmdate(\"Y-m-d h:i:s\"); \n \n if ($this->Admins->save($doctors)) {\n $this->Flash->success(__('The Admin has been saved.'));\n //pr($this->request->data); pr($doctors); exit;\n return $this->redirect(['action' => 'index']);\n } else {\n $this->Flash->error(__('The Admin could not be saved. Please, try again.'));\n }\n } else {\n $this->request->data['first_name'] = '';\n $this->request->data['last_name'] = '';\n $this->request->data['phone'] = '';\n $this->request->data['username'] = '';\n $this->request->data['email'] = '';\n }\n //$this->loadModel('AdminMenus');\n //$menus = $this->AdminMenus->find()->all();\n $this->set(compact('doctor','menus'));\n $this->set('_serialize', ['doctor']);\n }", "function DBDataForm()\n {\n $this->ItemData();\n $this->ItemDataGroups();\n \n $this->InitActions();\n $this->SetPertains();\n\n return\n $this->ItemsForm_Run\n (\n array\n (\n \"FormTitle\" => $this->DBDataFormTitle(),\n \"ID\" => 2,\n \"Name\" => \"Datas\",\n \"Method\" => \"post\",\n \"Action\" => \n \"?Unit=\".$this->GetCGIVarValue(\"Unit\").\n \"&ModuleName=Events&Action=\".\n $this->CGI_Get(\"Action\").\n \"&Event=\".\n $this->GetGET(\"Event\")\n ,\n\n \"Anchor\" => \"TOP\",\n \"Uploads\" => FALSE,\n \"CGIGETVars\" => array(\"Group\",\"Datas\",\"Datas_Sort\",\"Datas_Reverse\"),\n\n\n \"Edit\" => 1,\n \"Update\" => 1,\n\n \"RowMethod\" => \"\",\n \"RowsMethod\" => \"Table_Rows\",\n \"RowMethod\" => \"\",\n \"RowsMethod\" => \"ItemsForm_ItemRows\",\n\n \"DefaultSorts\" => array(\"SortOrder\",\"ID\"),\n \"ReadWhere\" => array\n (\n \"Event\" => $this->Event(\"ID\"),\n \"Pertains\" => $this->ApplicationObj()->Pertains,\n ),\n\n \"IgnoreGETVars\" => array(\"CreateTable\"),\n \"UpdateCGIVar\" => \"Update\",\n \"UpdateCGIValue\" => 1,\n \"UpdateItems\" => array(),\n\n\n \"Group\" => $this->DBDataFormDataGroup(),\n\n \"Edit\" => 1,\n\n \"Items\" => array(),\n \"AddGroup\" => \"Basic\",\n \"AddItem\" => array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n \"Pertains\" => $this->ApplicationObj()->Pertains,\n \"Friend\" => 3, //default access to friend is edit\n ),\n \"AddDatas\" => array(\"Pertains\",\"DataGroup\",\"SqlKey\",\"Type\",\"SortOrder\",\"Text\",\"Text_UK\"),\n \"UniqueDatas\" => array(\"SqlKey\"),\n \"NCols\" => 20,\n \n \"DetailsMethod\" => \"DBDataFormDetailsCell\",\n \"DetailsSGroups\" => \"GetDetailsSGroups\",\n )\n ).\n $this->DBDataQuest().\n \"\";\n }", "public function createComponentEditForm()\n\t{\n\t\t$form = new Form;\n\t\t$form->addGroup();\n\t\t$form->addHidden('ID_leku');\n\t\t$form->addText('nazev_leku', 'Názov lieku')\n\t\t\t->addRule(Form::FILLED, 'Zadajte názov lieku');\n\t\t$form->addSelect('typ_leku', 'Typ lieku', self::MEDICINE_TYPE)\n\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setAttribute('class', 'form-control');\n\n\t\t$form->addGroup(\"Poisťovne\");\n\t\t$removeEvent = [$this, 'removeElementClicked'];\n\t\t$insurences = $form->addDynamic(\n\t\t\t'insurences',\n\t\t\tfunction (Container $insurence) use ($removeEvent) {\n\t\t\t\t$insurence->addHidden('ID_leku');\n\t\t\t\t$insurence->addSelect('ID_pojistovny', 'Poisťovňa', $this->insurenceManager->getInsurenceToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$insurence->addText('cena', 'Cena lieku')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Cena musí byť číslo');\n\t\t\t\t$insurence->addText('doplatek', 'Doplatok na liek')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Doplatok musí byť číslo');\n\t\t\t\t$insurence->addSelect('hradene', 'Typ lieku', array('hradene' => 'Hradený', 'nehradene' => 'Nehradený', 'doplatok' => 'Liek s doplatkom'))\n\t\t\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$removeBtn = $insurence->addSubmit('remove', 'Odstrániť poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$insurences->addSubmit('add', 'Pridať poisťovňu')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup(\"Pobočky\");\n\t\t$offices = $form->addDynamic(\n\t\t\t'offices',\n\t\t\tfunction (Container $office) use ($removeEvent) {\n\t\t\t\t$office->addHidden('ID_leku');\n\t\t\t\t$office->addSelect('ID_pobocky', 'Pobočka', $this->officeManager->getOfficesToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte pobočku')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$office->addText('pocet_na_sklade', 'Počet kusov')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setDefaultValue('1')\n\t\t\t\t\t->addRule(Form::INTEGER, 'Počet kusov musí byť číslo')\n\t\t\t\t\t->addRule(Form::RANGE, 'Počet kusov musí byť kladné číslo', array(0, null));\n\n\t\t\t\t$removeBtn = $office->addSubmit('remove', 'Odstrániť pobočku')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$offices->addSubmit('add', 'Pridať pobočku')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup('');\n\t\t$form->addSubmit('submit', 'Uložiť liek')\n\t\t\t->setAttribute('class', 'btn-primary')\n\t\t\t->onClick[] = [$this, 'submitElementClicked'];\n\n\t\treturn $this->bootstrapFormRender($form);\n\t}", "public function hydrateeditqualiteformAction()\r\n {\r\n\r\n // Check Post\r\n if (!$this->getRequest()->isPost())\r\n die();\r\n\r\n $params = $this->getRequest()->getParams();\r\n $qualiteId = $params['qualiteId'];\r\n\r\n\r\n $qualite = new Application_Model_DbTable_FicheQualite();\r\n $qualite = $qualite->getOneQualiteById($qualiteId);\r\n $this->_helper->json($qualite);\r\n\r\n }", "function create_inputs($id, $isRequired)\n{\n $inputs = get_application_inputs($id);\n\n $required = $isRequired? ' required' : '';\n\n foreach ($inputs as $input)\n {\n /*\n echo '<p>DataType::STRING = ' . \\Airavata\\Model\\AppCatalog\\AppInterface\\DataType::STRING . '</p>';\n echo '<p>DataType::INTEGER = ' . \\Airavata\\Model\\AppCatalog\\AppInterface\\DataType::INTEGER . '</p>';\n echo '<p>DataType::FLOAT = ' . \\Airavata\\Model\\AppCatalog\\AppInterface\\DataType::FLOAT . '</p>';\n echo '<p>DataType::URI = ' . \\Airavata\\Model\\AppCatalog\\AppInterface\\DataType::URI . '</p>';\n\n echo '<p>$input->type = ' . $input->type . '</p>';\n */\n\n switch ($input->type)\n {\n case DataType::STRING:\n echo '<div class=\"form-group\">\n <label for=\"experiment-input\">' . $input->name . '</label>\n <input type=\"text\" class=\"form-control\" name=\"' . $input->name .\n '\" id=\"' . $input->name .\n '\" placeholder=\"' . $input->userFriendlyDescription . '\"' . $required . '>\n </div>';\n break;\n case DataType::INTEGER:\n case DataType::FLOAT:\n echo '<div class=\"form-group\">\n <label for=\"experiment-input\">' . $input->name . '</label>\n <input type=\"number\" class=\"form-control\" name=\"' . $input->name .\n '\" id=\"' . $input->name .\n '\" placeholder=\"' . $input->userFriendlyDescription . '\"' . $required . '>\n </div>';\n break;\n case DataType::URI:\n echo '<div class=\"form-group\">\n <label for=\"experiment-input\">' . $input->name . '</label>\n <input type=\"file\" class=\"\" name=\"' . $input->name .\n '\" id=\"' . $input->name . '\" ' . $required . '>\n <p class=\"help-block\">' . $input->userFriendlyDescription . '</p>\n </div>';\n break;\n default:\n print_error_message('Input data type not supported!\n Please file a bug report using the link in the Help menu.');\n break;\n }\n }\n}", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function mongo_node_bundles($entity_type) {\n $set = mongo_node_settings();\n $base_path = 'admin/structure/mongo-node/' . $entity_type . '/manage';\n\n $header = array(t('Name'), array(\n 'data' => t('Operations'),\n 'colspan' => 4,\n ),\n );\n\n $rows = array();\n\n foreach ($set[$entity_type]['bundles'] as $bundle => $bundle_settings) {\n $rows[] = array(\n array('data' => l($bundle_settings['label'], $base_path . '/' . $bundle)),\n array('data' => l(t('edit'), $base_path . '/' . $bundle . '/edit')),\n array('data' => l(t('manage fields'), $base_path . '/' . $bundle . '/fields')),\n array('data' => l(t('manage display'), $base_path . '/' . $bundle . '/display')),\n array('data' => l(t('delete'), $base_path . '/' . $bundle . '/delete')),\n );\n }\n\n $output = theme('table', array(\n 'rows' => $rows,\n 'header' => $header,\n 'empty' => t('No entities created yet.'),\n )\n );\n\n return $output;\n}", "protected function form()\n { \n\t\t$id = $this->id;\n\t\t$xapp = $this->xapp;\n\t\t$tmpModel = config('xapp.table.'.$xapp->table.'.model');\n\t\t$model = new $tmpModel();\n\n\t\tif( $id ){\n\t\t\t$rs = $model->findOrFail($id);\n\t\t}else{\n\t\t\t$rs = false;\n\t\t}\n\t\t$form = new Form($model);\t\t\n\n\t\t//附加表添加,附加表须有form()\n\t\tforeach($xapp['sets']['base'] as $k=>$x){\n\t\t\t$tempclass = config(\"xapp.xappset.{$k}.ctrl.{$this->ctrl_sign}\") ?? '';\n\t\t\tif( $x && $tempclass && class_exists($tempclass) && method_exists($tempclass,'before_form') ){\n\t\t\t\t(new $tempclass())->before_form($form,$xapp,$rs);\n\t\t\t}\n\t\t}\n\n\n\t\t$tempclass = $xapp->ctrl[$this->ctrl_sign] ?? '';\n\t\tif( $tempclass && class_exists($tempclass) && method_exists($tempclass,'form')){\n\t\t\t(new $tempclass())->form($form,$xapp,$rs);\n\t\t}else{\n\t\t\t$tempclass = config('xapp.table.'.$xapp->table.'.ctrl.'.$this->ctrl_sign) ?? '';\n\t\t\tif( $tempclass && class_exists($tempclass) && method_exists($tempclass,'form')){\n\t\t\t\t(new $tempclass())->form($form,$xapp,$rs);\n\t\t\t}\n\t\t}\n\n\t\t//附加表添加,附加表须有form()\n\t\tforeach($xapp['sets']['base'] as $k=>$x){\n\t\t\t$tempclass = config(\"xapp.xappset.{$k}.ctrl.{$this->ctrl_sign}\") ?? '';\n\t\t\tif( $x && $tempclass && class_exists($tempclass) && method_exists($tempclass,'form') ){\n\t\t\t\t(new $tempclass())->form($form,$xapp,$rs);\n\t\t\t}\n\t\t}\n\n\t\t$form->hidden('xapp_id')->default($xapp['id']);\n\t\t\n return $form;\n }", "public function indexFields()\n {\n return [\n Text::make('ID')\n ->value($this->model->id),\n\n Link::make('Booking')\n ->value('Booking #' . $this->model->booking_id)\n ->url('bookings/' . $this->model->booking_id),\n\n Link::make('Customer')\n ->value($this->model->customer->name)\n ->url('customers/' . $this->model->customer_id),\n\n Text::make('Amount')\n ->value('$'.$this->model->amount),\n ];\n }", "public function getFormAttribs() \n\t {\n return [\n 'EMP_ID'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter ...']],\n 'EMP_NM'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter ...']],\n 'EMP_IMG'=>['type'=>Form::INPUT_TEXT],\n // 'actions'=>['type'=>Form::INPUT_RAW, 'value'=>Html::submitButton('Submit', ['class'=>'btn btn-primary'])];\n ];\n }", "public function cs_generate_form() {\n global $post;\n }", "public function fields(): array\n {\n return MyField::withSlug('name', MyField::withMeta([\n MyField::relation('categories')\n ->fromModel(ProductCategory::class, 'name')\n ->multiple(),\n MyField::uploadMedia(),\n MyField::input('price')\n ->step(0.001)\n ->required(),\n MyField::input('discount')\n ->step(0.001)\n ->required(),\n MyField::quill('body'),\n MyField::switcher('is_active')\n ->value(true)\n ]));\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(StudentRequest::class);\n CRUD::addField([\n 'name' => 'candidate_name',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'father_name',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'phone',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'address',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'cnic',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'label' => 'School Roll Number',\n 'name' => 'school_rollnumber',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'religion',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n $this->crud->addField([ // select_from_array\n 'name' => 'gender',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'label' => \"Gender\",\n 'type' => 'select_from_array',\n 'options' => ['male' => 'Male', 'female' => 'Female'],\n 'allows_null' => false,\n 'default' => 'male',\n // 'allows_multiple' => true, // OPTIONAL; needs you to cast this to array in your model;\n ]);\n $this->crud->addField(\n [ // date_picker\n 'name' => 'date_of_birth',\n 'type' => 'date_picker',\n 'label' => 'Date',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n // optional:\n 'date_picker_options' => [\n 'todayBtn' => 'linked',\n 'format' => 'dd-mm-yyyy',\n 'language' => 'en'\n ],\n ],\n );\n if (auth()->user()->can('manage_all_student')) {\n $this->crud->addField([\n 'label' => 'School',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'type' => 'relationship',\n 'name' => 'school_id', // the db column for the foreign key\n 'entity' => 'school', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => 'App\\Models\\School',\n\n ]);\n } else {\n $this->crud->addField([\n 'label' => 'School',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'type' => 'hidden',\n 'name' => 'school_id', // the db column for the foreign key\n 'value' => auth()->user()->school->id,\n\n ]);\n }\n\n $this->crud->addField([\n 'label' => \"Student Image\",\n 'name' => \"image\",\n 'type' => 'image',\n 'crop' => true, // set to true to allow cropping, false to disable\n 'aspect_ratio' => 0, // ommit or set to 0 to allow any aspect ratio\n // 'disk' => 's3_bucket', // in case you need to show images from a different disk\n // 'prefix' => 'uploads/images/profile_pictures/' // in case your db value is only the file name (no path), you can use this to prepend your path to the image src (in HTML), before it's shown to the user;\n ]);\n $this->crud->addFields(static::getFieldsArrayForLoginTab());\n\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n }", "protected function setupUpdateOperation()\n {\n CRUD::setValidation(StudentUpdateRequest::class);\n CRUD::addField([\n 'name' => 'candidate_name',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'father_name',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'phone',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'address',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'cnic',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'label' => 'School Roll Number',\n 'name' => 'school_rollnumber',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'religion',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n $this->crud->addField([ // select_from_array\n 'name' => 'gender',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'label' => \"Gender\",\n 'type' => 'select_from_array',\n 'options' => ['male' => 'Male', 'female' => 'Female'],\n 'allows_null' => false,\n 'default' => 'male',\n // 'allows_multiple' => true, // OPTIONAL; needs you to cast this to array in your model;\n ]);\n $this->crud->addField(\n [ // date_picker\n 'name' => 'date_of_birth',\n\n 'type' => 'date_picker',\n 'label' => 'Date',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n // optional:\n 'date_picker_options' => [\n 'todayBtn' => 'linked',\n 'format' => 'dd-mm-yyyy',\n 'language' => 'en'\n ],\n ],\n );\n $this->crud->addField([\n 'label' => \"Student Image\",\n 'name' => \"image\",\n 'type' => 'image',\n 'crop' => true, // set to true to allow cropping, false to disable\n 'aspect_ratio' => 0, // ommit or set to 0 to allow any aspect ratio\n // 'disk' => 's3_bucket', // in case you need to show images from a different disk\n // 'prefix' => 'uploads/images/profile_pictures/' // in case your db value is only the file name (no path), you can use this to prepend your path to the image src (in HTML), before it's shown to the user;\n ]);\n if (auth()->user()->can('manage_all_student')) {\n $this->crud->addField([\n 'label' => 'School',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'type' => 'relationship',\n 'name' => 'school_id', // the db column for the foreign key\n 'entity' => 'school', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => 'App\\Models\\School',\n\n ]);\n } else {\n $this->crud->addField([\n 'label' => 'School',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'type' => 'hidden',\n 'name' => 'school_id', // the db column for the foreign key\n 'value' => auth()->user()->school->id,\n\n ]);\n }\n }", "public function getFormCustomFields(){\n\t}", "public function configureFields(string $pageName): iterable\n {\n $entityId = '';\n if (Crud::PAGE_INDEX !== $pageName && Crud::PAGE_NEW !== $pageName) {\n /** @var Ulid $entityId */\n $entityId = $this->adminContextProvider->getContext()->getEntity()->getInstance()->getId();\n $entityId = $entityId->toBinary();\n }\n\n //# FIELDS INITIALIZATION:\n [$id, $createdAt, $updatedAt] = CrudDefaults::getAdminFields();\n $lvl = IntegerField::new('level')\n ->setLabel('Level')\n ->setFormTypeOption('disabled', 'disabled')\n ;\n $left = IntegerField::new('left')\n ->setLabel('Left')\n ->setFormTypeOption('disabled', 'disabled')\n ;\n $right = IntegerField::new('right')\n ->setLabel('Right')\n ->setFormTypeOption('disabled', 'disabled')\n ;\n $root = AssociationField::new('root')\n ->setCrudController(__CLASS__)\n ->setLabel('Root')\n ->setFormTypeOption('disabled', 'disabled')\n ;\n $name = TextField::new('name')\n ->setLabel('Имя')\n ;\n $project = AssociationField::new('project')\n ->setCrudController(ProjectCrudController::class)\n ->autocomplete()\n ->setLabel('Проект')\n ->setRequired(true)\n ;\n $keywords = AssociationField::new('keywords')\n ->setCrudController(KeywordCrudController::class)\n // ->autocomplete()\n ->setLabel('Ключи')\n ->setCustomOption('by_reference', false)\n ;\n // $subgroupsOnEdit = AssociationField::new('subgroups')\n // ->setCrudController(__CLASS__)\n // // ->autocomplete()\n // ->setLabel('Включает подгруппы')\n // ->setFormTypeOptions([\n // 'query_builder' => function (KeywordGroupRepository $repo) use ($entityId) {\n // return $repo->findAllExcludingAllSub($entityId);\n // },\n // ])\n // ->setHelp('Указывайте только дочернюю группу, без полной вложенности')\n// ->setQueryBuilder()\n ;\n // $supergroupOnEdit = AssociationField::new('supergroup')\n // ->setCrudController(__CLASS__)\n // // ->autocomplete()\n // ->setLabel('Входит в группы')\n // ->setFormTypeOptions([\n // 'query_builder' => function (KeywordGroupRepository $repo) use ($entityId) {\n // return $repo->findAllExcludingAllSuper($entityId);\n // },\n // ])\n // ->setHelp('Указывайте только родительскую группу, без полной вложенности')\n// ->setFormTypeOption('disabled', 'disabled')\n ;\n $subgroups = AssociationField::new('subgroups')\n ->setCrudController(__CLASS__)\n ->setLabel('Включает подгруппы')\n ;\n $supergroup = AssociationField::new('supergroup')\n ->setCrudController(__CLASS__)\n // ->autocomplete()\n ->setLabel('Родительская группа')\n ;\n // $nestingLvl = IntegerField::new('nestingLvl')\n // ->setLabel('Уровень вложенности группы')\n // ->setFormTypeOption('disabled', 'disabled')\n // ;\n // $isExcludedAsSub = BooleanField::new('isExcludedAsSub')\n // ->setLabel('Запретить как подгруппу')\n // ->setHelp('Исключить из списка при добавлении подгруппы в группах ключей')\n // ;\n\n //# FIELDS GROUPS (ORDER: index, new, details, form):\n $adminFieldsOnDetail = [\n FormField::addPanel('Информация для администратора'),\n $id,\n $root,\n // $depth,\n $createdAt,\n $updatedAt,\n ];\n $commonFormFields = [\n $name,\n $project,\n $keywords,\n $supergroup,\n $subgroups,\n ];\n //# FIELDS DISPLAY RULES PER PAGE NAME:\n if (Crud::PAGE_INDEX === $pageName) {\n return [\n ...$commonFormFields,\n // $isExcludedAsSub->setLabel('Корневая'),\n // $nestingLvl->setLabel('Вложенность'),\n $root,\n $createdAt,\n $updatedAt,\n ];\n }\n if (Crud::PAGE_NEW === $pageName) {\n return [\n ...$commonFormFields,\n // $isExcludedAsSub,\n ];\n }\n if (Crud::PAGE_EDIT === $pageName) {\n return [\n // $subgroupsOnEdit,\n // $supergroupOnEdit,\n // $name,\n // $project,\n // $keywords,\n ...$commonFormFields,\n // $isExcludedAsSub,\n $root,\n $lvl,\n $left,\n $right,\n ...$adminFieldsOnDetail,\n ];\n }\n\n return [\n ...$commonFormFields,\n // $isExcludedAsSub,\n $root,\n $lvl,\n $left,\n $right,\n ...$adminFieldsOnDetail,\n ];\n }", "function saveFieldsDatastoreAction()\n {\n $this->_helper->viewRenderer->setNoRender();\n \n Zend_Loader::loadClass('Table_FieldSummary');\n $fieldSummaryTable = new Table_FieldSummary();\n \n //echo \"data made it!\";\n //return;\n \n $cnt = 0;\n $recordArray = Zend_Json::decode($_REQUEST['datastore'], Zend_Json::TYPE_OBJECT);\n //Zend_Debug::dump($recordArray);\n foreach ($recordArray as $record) \n {\n //Zend_Debug::dump($record);\n $where = $fieldSummaryTable->getAdapter()->quoteInto('pk_field = ?', $record->pk_field);\n $data = array('field_type' => $record->field_type,\n 'field_label' => $record->field_label,\n 'prop_desc' => $record->prop_desc,\n 'prop_type' => $record->prop_type);\n $fieldSummaryTable->update($data, $where);\n ++$cnt;\n } \n echo $cnt;\n }", "function generateElementList($form) {\n\n\t$element_handler =& xoops_getmodulehandler('elements', 'formulize');\n\tforeach($form->getVar('elements') as $element) {\n\t\t$ele = $element_handler->get($element);\n\t\tif($ele->getVar('ele_type') != \"ib\" AND $ele->getVar('ele_type') != \"areamodif\" AND $ele->getVar('ele_type') != \"subform\"){\n\t\t\t$saveoptions[$ele->getVar('ele_id')] = $ele->getVar('ele_colhead') ? $ele->getVar('ele_colhead') : $ele->getVar('ele_caption');\n\t\t}\n\t}\n\treturn $saveoptions;\n}", "public function add()\n {\n $this->loadModel('SiVeriEntregas');\n $this->loadModel('Persons');\n $this->loadModel('SiLideres');\n $this->loadModel('SiPastores');\n $this->loadModel('MaPropiedades');\n //Objeto a llenar\n $verificacion = $this->SiVeriEntregas->newEntity();\n\n //POST que guarda la información agregada al formulario\n if ($this->request->is('post')) {\n $verificacion = $this->SiVeriEntregas->patchEntity($verificacion, $this->request->data);\n\n $verificaciondb = $this->SiVeriEntregas->find('all')->select(['Persona.documento'])\n ->where(['SiVeriEntregas.id_datos_basicos' => $this->request->data['id_datos_basicos'], 'SiVeriEntregas.status_id' => 1])\n ->contain(['Persona'])\n ->toArray();\n\n if (count($verificaciondb) > 0) {\n $this->Flash->error(__('La persona con documento ' . $verificaciondb[0]['Persona']['documento'] . ', ya tiene una verificación'));\n } else {\n $verificacion->id_estado_llamada = 251;\n $verificacion->status_id = 1;\n $verificacion->creator_id = $this->Auth->user()['id'];\n\n if ($this->SiVeriEntregas->save($verificacion)) {\n $this->addEncuesta($verificacion);\n $this->Flash->success(__('La verificación ha sido agregada.'), 'success');\n return $this->redirect(['action' => 'index']);\n }\n $this->Flash->error(__('No se pudo agregar la verificación.'));\n }\n }\n\n //Listas que se presentan en el formulario\n $lista1[] = array();\n unset($lista1[0]);\n $lista3[] = array();\n unset($lista3[0]);\n $lista4[] = array();\n unset($lista4[0]);\n $lista5[] = array();\n unset($lista5[0]);\n $lista9[] = array();\n\n $personsdb = $this->Persons->find()->select(['id', 'documento', 'nombres', 'apellidos'])\n ->where(['status_id' => 1])\n ->order(['nombres' => 'ASC']);\n foreach ($personsdb as $person) {\n $lista1[$person['id']] = $person['documento'] . ' | ' . $person['nombres'] . ' ' . $person['apellidos'];\n } //Lista de personas a verificar\n \n $lideresgt = $this->SiLideres->find()->select(['SiLideres.id', 'Persons.documento', 'Persons.nombres', 'Persons.apellidos'])\n ->where(['SiLideres.id_nivel' => 207, 'SiLideres.status_id' => 1])\n ->contain(['Persons'])\n ->order(['Persons.nombres' => 'ASC']);\n\n foreach ($lideresgt as $lidergt) {\n $lista2[$lidergt['id']] = $lidergt['person']['documento'] . ' | ' . $lidergt['person']['nombres'] . ' ' . $lidergt['person']['apellidos'];\n } //Lista para Lideres de GT\n\n $lideresdb = $this->SiLideres->find()->select(['SiLideres.id', 'Persons.documento', 'Persons.nombres', 'Persons.apellidos'])\n ->where(['SiLideres.id_nivel' => 209, 'SiLideres.status_id' => 1])\n ->contain(['Persons'])\n ->order(['Persons.nombres' => 'ASC']);\n\n foreach ($lideresdb as $lider) {\n $lista3[$lider['id']] = $lider['person']['documento'] . ' | ' . $lider['person']['nombres'] . ' ' . $lider['person']['apellidos'];\n } //Lista para Lideres de acompañamiento\n\n $pastoresdb = $this->SiPastores->find()->select(['SiPastores.id', 'Persons.documento', 'Persons.nombres', 'Persons.apellidos'])\n ->where(['SiPastores.status_id' => 1])\n ->contain(['Persons'])\n ->order(['Persons.nombres' => 'ASC']);\n\n foreach ($pastoresdb as $pastor) {\n $lista4[$pastor['id']] = $pastor['person']['documento'] . ' | ' . $pastor['person']['nombres'] . ' ' . $pastor['person']['apellidos'];\n } //Lista para pastores\n\n $liderconsolida = $this->SiLideres->find()->select(['SiLideres.id', 'Persons.documento', 'Persons.nombres', 'Persons.apellidos'])\n ->where(['SiLideres.id_nivel' => 1179, 'SiLideres.status_id' => 1])\n ->contain(['Persons'])\n ->order(['Persons.nombres' => 'ASC']);\n\n foreach ($liderconsolida as $liderco) {\n $lista5[$liderco['id']] = $liderco['person']['documento'] . ' | ' . $liderco['person']['nombres'] . ' ' . $liderco['person']['apellidos'];\n } //Lista para lideres de consolidación\n\n $lista6 = $lista1; //Lista para quien lo invito\n $lista7 = $this->properties(219); //Lista para tipo de entrega\n $lista8 = $this->properties(223); //Lista para fase de la entrega \n \n //Parametros que se envian a la vista\n $this->set(compact('verificacion', 'lista1', 'lista2', 'lista3', 'lista4', 'lista5', 'lista6', 'lista7', 'lista8'));\n }", "public function init() {\n $this->add([\n 'name' => 'id',\n 'type' => 'hidden'\n ]);\n\n $this->add([\n 'name' => 'title',\n 'type' => 'text'\n ]);\n\n $this->add([\n 'name' => 'text',\n 'type' => 'textarea'\n ]);\n }", "public function initialize($entity = null, $options = array())\n {\n\n //if (!isset($options['edit']) || !isset($options['new'])) {\n // $element = new Text(\"id\");\n // $this->add($element->setLabel(\"Id\"));\n //} else {\n $this->add(new Hidden(\"id\"));\n //}\n\n $make = new Select('make_id', Makes::find(), array(\n 'using' => array('id', 'name'),\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ));\n $make->setLabel('Make');\n $this->add($make);\n\n $user = new Select('user_id', Users::find(), array(\n 'using' => array('id', 'name'),\n 'useEmpty' => true,\n 'emptyText' => '...',\n 'emptyValue' => ''\n ));\n $user->setLabel('User');\n $this->add($user);\n\n\n\n $model = new Text(\"model\");\n $model->setLabel(\"Model\");\n $model->setFilters(array('striptags', 'string'));\n $model->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Name is required'\n ))\n ));\n $this->add($model);\n\n $condition = new Text(\"condition\");\n $condition->setLabel(\"Condition\");\n $condition->setFilters(array('striptags', 'string'));\n $condition->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Condition is required'\n ))\n ));\n $this->add($condition);\n\n $colour = new Text(\"colour\");\n $colour->setLabel(\"Colour\");\n $colour->setFilters(array('striptags', 'string'));\n $colour->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Colour is required'\n ))\n ));\n $this->add($colour);\n\n $style = new Text(\"style\");\n $style->setLabel(\"Style\");\n $style->setFilters(array('striptags', 'string'));\n $style->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Style is required'\n ))\n ));\n $this->add($style);\n\n $image = new Text(\"image\");\n $image->setLabel(\"Image\");\n $image->setFilters(array('striptags', 'string'));\n $image->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Image is required'\n ))\n ));\n $this->add($image);\n\n $price = new Text(\"price\");\n $price->setLabel(\"Price\");\n $price->setFilters(array('float'));\n $price->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Price is required'\n ))\n ));\n $this->add($price);\n\n $year = new Text(\"year\");\n $year->setLabel(\"Year\");\n $year->setFilters(array('float'));\n $year->addValidators(array(\n new PresenceOf(array(\n 'message' => 'Year is required'\n ))\n ));\n $this->add($year);\n }", "protected function addElements()\n {\n // Add \"latitude\" field\n $this->add([\n 'type' => 'text',\n 'name' => 'latitude',\n 'id' => 'latitude',\n 'options' => [\n 'label' => 'Latitude',\n ],\n ]);\n\n // Add \"longitude\" field\n $this->add([\n 'type' => 'text',\n 'name' => 'longitude',\n 'options' => [\n 'label' => 'Longitude',\n ],\n ]);\n\n // Add the Update button\n $this->add([\n 'type' => 'submit',\n 'name' => 'update',\n 'attributes' => [\n 'value' => 'Update'\n ],\n ]);\n }", "public function fields(): array\n {\n return [\n ID::make(),\n DateTime::make('createdAt')->sortable()->readOnly()->hidden(),\n DateTime::make('updatedAt')->sortable()->readOnly()->hidden(),\n Str::make('slug'),\n Str::make('name'),\n ];\n }", "protected function form()\n {\n return Admin::form(Article::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->text('slug','slugen');\n $form->text('title','标题');\n $form->editor('body','介绍');\n $form->select('category_id','分类')->options(ArticleCategory::allSelectOptions());\n $form->number('sort','排序');\n $form->image('thumbnail','缩略图')->uniqueName()->resize(400,600);\n $form->multipleImage('images','图集')->uniqueName()->removable()->resize(400,600);\n $form->text('view','模板名称');\n $states = [\n 'on' => ['value' => '1', 'text' => '是', 'color' => 'primary'],\n 'off' => ['value' => '0', 'text' => '否', 'color' => 'default'],\n ];\n $form->switch('status','状态')->states($states)->default(0);\n $form->number('click','点击次数');\n\n $form->hidden('created_by');\n $form->hidden('updated_by');\n $form->saving(function (Form $form){\n if(empty($form->created_by)) {\n $form->created_by = Admin::user()->id;\n }\n $form->updated_by = Admin::user()->id;\n });\n\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '更新时间');\n });\n }", "private function addElements(): void\n {\n // Add additional form fields\n $this->add([\n 'name' => 'masterFile',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'masterFile',\n 'class' => 'form-check-input',\n ],\n 'options' => [\n 'label' => 'Create master export file',\n 'label_attributes' => [\n 'class' => 'form-check-label',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'debugTranslations',\n 'type' => Checkbox::class,\n 'attributes' => [\n 'id' => 'debugTranslations',\n 'class' => 'form-check-input',\n ],\n 'options' => [\n 'label' => 'Create debug translations',\n 'label_attributes' => [\n 'class' => 'form-check-label',\n ],\n ],\n ]);\n }", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "function __generateForm($entity,$action=\"\",$label=\"\",$method=\"POST\"){\n\t$htmlForm = new HtmlForm(\n\t\t\tget_class($entity),\n\t\t\t$action,\n\t\t\tnull,\n\t\t\tnull,\n\t\t\tarray(\t'method'=>$method,\n\t\t\t\t\t\t'label'=>$label)\n\t\t\t);\n\t$htmlForm->generateFormForEntity($entity);\n\techo $htmlForm->serialize();\n}", "public function insert(){\n $formClass = $this->type.'_Form';\n $form = new $formClass($this->values);\n $errors = $form->isValid();\n $object = $form->get('object');\n if (empty($errors)) {\n try {\n $object->insert($this->values);\n } catch (Exception $e) {\n $form = new $formClass($this->values, array());\n $html = '<div class=\"message messageError\">\n '.$e->getMessage().'\n </div>\n '.$form->createForm($form->createFormFields(), array('action'=>url($this->type.'/insert', true), 'submit'=>__('save'), 'class'=>'formAdmin formAdminInsert'));\n return array('success'=>'0', 'html'=>$html);\n }\n $multipleChoice = (count((array)$this->object->info->info->form->multipleActions) > 0) ? true : false;\n $html = $object->showUi('Admin', array('userType'=>$this->login->get('type'), 'multipleChoice'=>$multipleChoice));\n return array('success'=>'1', 'html'=>$html, 'id'=>$object->id());\n } else {\n $form = new $formClass($this->values, $errors);\n $html = $form->createForm($form->createFormFields(), array('action'=>url($this->type.'/insert', true), 'submit'=>__('save'), 'class'=>'formAdmin formAdminInsert'));\n return array('success'=>'0', 'html'=>$html);\n }\n }", "protected function _getForm() \r\n\t{ \r\n\t\t$form = \"\";\r\n\t\t$allElementSets = $this->_getAllElementSets();\r\n\t\t$ignoreElements = array();\r\n\t\tforeach ($allElementSets as $elementSet) { //traverse each element set to create a form group for each\r\n\t\t\tif($elementSet['name'] != \"Item Type Metadata\") { // start with non item type metadata\r\n\t\t\t\t\r\n\t\t\t\t$form .= '<div id=\"' . text_to_id($elementSet['name']) . '-metadata\">';\r\n\t\t\t\t$form .= '<fieldset class=\"set\">';\r\n\t\t\t\t$form .= '<h2>' . __($elementSet['name']) . '</h2>';\r\n\t\t\t\t$form .= '<p class=\"element-set-description\" id=\"';\r\n\t\t\t\t$form .= html_escape(text_to_id($elementSet['name']) . '-description') . '\">';\r\n\t\t\t\t$form .= url_to_link(__($elementSet['description'])) . '</p>';\r\n\t\t\t\t\r\n\t\t\t\t$elements = $this->_getAllElementsInSet($elementSet['id']);\r\n\t\t\t\tforeach ($elements as $element) { //traverse each element in the set to create a form input for each in the form group\r\n\t\t\t\t\t$allElementValues = $this->_allElementValues($element['id'], $elements);\r\n\t\t\t\t\tif ((!in_array($element['id'], $ignoreElements)) && (count($allElementValues) > 1)) { // if the element has a value and has multiple inputs\r\n\t\t\t\t\t\t$form .= $this->_field($allElementValues, true);\r\n\t\t\t\t\t\tarray_push($ignoreElements, $element['id']);\r\n\t\t\t\t\t} else if (!in_array($element['id'], $ignoreElements)) { \r\n\t\t\t\t\t\t$form .= $this->_field($allElementValues, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$form .= \"</fieldset>\";\r\n\t\t\t\t$form .= \"</div>\";\r\n\t\t\t} else { // if item type metadata\r\n\t\t\t\t$item_types = get_records('ItemType', array('sort_field' => 'name'), 1000);\r\n\t\t\t\t$defaultItemType = $this->_helper->db->getTable('DefaultMetadataValue')->getDefaultItemType();\r\n\t\t\t\t$defaultItemTypeId = 0;\r\n\t\t\t\tif (!empty($defaultItemType)) {\r\n\t\t\t\t\t$defaultItemTypeId = intval($defaultItemType[0][\"text\"]);\r\n\t\t\t\t}\r\n\t\t\t\t$form .= '<div id=\"item-type-metadata-metadata\">';\r\n\t\t\t\t$form .= '<h2>' . __($elementSet['name']) . '</h2>';\r\n\t\t\t\t$form .= '<div class=\"field\" id=\"type-select\">';\r\n\t\t\t\t$form .= '<div class=\"two columns alpha\">';\r\n\t\t\t\t$form .= '<label for=\"item-type\">Item Type</label> </div>';\r\n\t\t\t\t$form .= '<div class=\"inputs five columns omega\">';\r\n\t\t\t\t$form .= '<select name=\"item_type_id\" id=\"item-type\">';\r\n\t\t\t\t$form .= '<option value=\"\">Select Below </option>';\r\n\t\t\t\tforeach ($item_types as $item_type) {\r\n\t\t\t\t\tif($item_type[\"id\"] == $defaultItemTypeId) {\r\n\t\t\t\t\t\t$form .= '<option value=\"' . $item_type['id'] . '\" selected=\"selected\">' . $item_type['name'] . '</option>';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$form .= '<option value=\"' . $item_type['id'] . '\">' . $item_type['name'] . '</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$form .= '</select> </div>';\r\n\t\t\t\t$form .= '<input type=\"submit\" name=\"change_type\" id=\"change_type\" value=\"Pick this type\" style=\"display: none;\">';\r\n\t\t\t\t$form .= '</div>';\r\n\t\t\t\t$form .= '<div id=\"type-metadata-form\">';\r\n\t\t\t\t$form .= '<div class=\"five columns offset-by-two omega\">';\r\n\t\t\t\t$form .= '<p class=\"element-set-description\">';\r\n\t\t\t\t$form .= '</p>';\r\n\t\t\t\t$form .= '</div>';\r\n\t\t\t\t$form .= '</div>';\r\n\t\t\t\t$form .= '</div>';\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n return $form;\r\n }" ]
[ "0.59969765", "0.59668356", "0.59434354", "0.5909509", "0.5900607", "0.5805662", "0.57287455", "0.57250273", "0.5683926", "0.56693876", "0.5658327", "0.56146044", "0.56030506", "0.5601319", "0.5598297", "0.55948204", "0.5556551", "0.5552996", "0.55227846", "0.5518935", "0.55184823", "0.55168307", "0.5503995", "0.5491635", "0.5470821", "0.5448351", "0.54463065", "0.54386705", "0.54386705", "0.54338866", "0.5400556", "0.53938234", "0.5375501", "0.53709126", "0.5369406", "0.5364099", "0.5357419", "0.5354798", "0.53519744", "0.5348588", "0.5348425", "0.53391355", "0.5334523", "0.53158265", "0.53155077", "0.5314894", "0.53110343", "0.5295768", "0.52905613", "0.5289295", "0.52839774", "0.5281759", "0.5276671", "0.5268681", "0.5259536", "0.52580523", "0.5250298", "0.5247443", "0.5233079", "0.5226526", "0.5224025", "0.52185", "0.5218326", "0.5211963", "0.52098286", "0.5207474", "0.5205951", "0.5204164", "0.5201277", "0.5200983", "0.5191903", "0.5184197", "0.51745903", "0.51738274", "0.51699805", "0.5163028", "0.5160789", "0.51590246", "0.51499134", "0.51483154", "0.51482797", "0.51481026", "0.5147178", "0.5147079", "0.5143449", "0.51421916", "0.51389647", "0.5133794", "0.5132932", "0.5130183", "0.512985", "0.5124884", "0.5123962", "0.5122017", "0.5116282", "0.5114666", "0.5111917", "0.51076967", "0.51049113", "0.51021916" ]
0.5554197
17
Mongo entity add/edit validate function.
function mongo_node_form_validate(&$form, &$form_state) { $entity_type = $form_state['entity_type']; $entity = $form_state[$entity_type]; field_attach_form_validate($entity_type, $entity, $form, $form_state); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateOnAdd( $entity ){\t\t\t\n\t\t//TODO unicidad (cliente )\n\t\t\n\t}", "abstract public function validate($entity);", "public function validate($entity)\n {\n }", "function validate_on_create() {}", "public function validate() \n\t{\t\t\n\t\tif(!$this->entity) \n\t\t{\n\t\t\t$method = 'validate' . $this->act;\n\n\t\t\t$rules = $this->{$method}();\n\n\t\t\tif(!empty($rules)) \n\t\t\t{\n\t\t\t\t$this->validator = Validator::make($this->input, $rules);\t\n\t\t\n\t\t\t\tif($this->validator->fails()) \n\t\t\t\t{\n\t\t\t\t\t$this->response['validation_errors'][] = $this->validator->errors();\n\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "function ValidateAdd()\n\t{\n\t}", "public function validateUpdate($obj);", "public abstract function validation();", "function validate_on_update() {}", "protected function _validate() {\n\t}", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "public function validate();", "abstract public function validate();", "abstract public function validate();", "public function validation();", "public function validate($data, $entity=null);", "public function save(){\n\n\t\t$this->_connect();\n\t\t$exists = $this->_exists();\n\n\t\tif($exists==false){\n\t\t\t$this->_operationMade = self::OP_CREATE;\n\t\t} else {\n\t\t\t$this->_operationMade = self::OP_UPDATE;\n\t\t}\n\n\t\t// Run Validation Callbacks Before\n\t\t$this->_errorMessages = array();\n\t\tif(self::$_disableEvents==false){\n\t\t\tif($this->_callEvent('beforeValidation')===false){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(!$exists){\n\t\t\t\tif($this->_callEvent('beforeValidationOnCreate')===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif($this->_callEvent('beforeValidationOnUpdate')===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generadores\n\t\t$className = get_class($this);\n\t\t$generator = null;\n\t\tif(EntityManager::hasGenerator($className)){\n\t\t\t$generator = EntityManager::getEntityGenerator($className);\n\t\t\t$generator->setIdentifier($this);\n\t\t}\n\n\t\t//LLaves foráneas virtuales\n\t\tif(EntityManager::hasForeignKeys($className)){\n\t\t\t$foreignKeys = EntityManager::getForeignKeys($className);\n\t\t\t$error = false;\n\t\t\tforeach($foreignKeys as $indexKey => $keyDescription){\n\t\t\t\t$entity = EntityManager::getEntityInstance($indexKey, false);\n\t\t\t\t$field = $keyDescription['fi'];\n\t\t\t\tif($this->$field==''){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$conditions = $keyDescription['rf'].' = \\''.$this->$field.'\\'';\n\t\t\t\tif(isset($keyDescription['op']['conditions'])){\n\t\t\t\t\t$conditions.= ' AND '.$keyDescription['op']['conditions'];\n\t\t\t\t}\n\t\t\t\t$rowcount = $entity->count($conditions);\n\t\t\t\tif($rowcount==0){\n\t\t\t\t\tif(isset($keyDescription['op']['message'])){\n\t\t\t\t\t\t$userMessage = $keyDescription['op']['message'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$userMessage = 'El valor de \"'.$keyDescription['fi'].'\" no existe en la tabla referencia';\n\t\t\t\t\t}\n\t\t\t\t\t$message = new ActiveRecordMessage($userMessage, $keyDescription['fi'], 'ConstraintViolation');\n\t\t\t\t\t$this->appendMessage($message);\n\t\t\t\t\t$error = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($error==true){\n\t\t\t\t$this->_callEvent('onValidationFails');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$notNull = $this->_getNotNullAttributes();\n\t\t$at = $this->_getDatesAtAttributes();\n\t\t$in = $this->_getDatesInAttributes();\n\t\tif(is_array($notNull)){\n\t\t\t$error = false;\n\t\t\t$numFields = count($notNull);\n\t\t\tfor($i=0;$i<$numFields;++$i){\n\t\t\t\t$field = $notNull[$i];\n\t\t\t\tif($this->$field===null||$this->$field===''){\n\t\t\t\t\tif(!$exists&&$field=='id'){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(!$exists){\n\t\t\t\t\t\tif(isset($at[$field])){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(isset($in[$field])){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$field = str_replace('_id', '', $field);\n\t\t\t\t\t$message = new ActiveRecordMessage(\"El campo $field no puede ser nulo ''\", $field, 'PresenceOf');\n\t\t\t\t\t$this->appendMessage($message);\n\t\t\t\t\t$error = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($error==true){\n\t\t\t\t$this->_callEvent('onValidationFails');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Run Validation\n\t\tif($this->_callEvent('validation')===false){\n\t\t\t$this->_callEvent('onValidationFails');\n\t\t\treturn false;\n\t\t}\n\n\t\tif(self::$_disableEvents==false){\n\t\t\t// Run Validation Callbacks After\n\t\t\tif(!$exists){\n\t\t\t\tif($this->_callEvent('afterValidationOnCreate')===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif($this->_callEvent('afterValidationOnUpdate')===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->_callEvent('afterValidation')===false){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Run Before Callbacks\n\t\t\tif($this->_callEvent('beforeSave')===false){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif($exists){\n\t\t\t\tif($this->_callEvent('beforeUpdate')===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif($this->_callEvent('beforeCreate')===false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($this->_schema){\n\t\t\t$table = $this->_schema.'.'.$this->_source;\n\t\t} else {\n\t\t\t$table = $this->_source;\n\t\t}\n\n\t\t$magicQuotesRuntime = get_magic_quotes_runtime();\n\t\t$dataType = $this->_getDataTypes();\n\t\t$primaryKeys = $this->_getPrimaryKeyAttributes();\n\t\t$dataTypeNumeric = $this->_getDataTypesNumeric();\n\t\tif($exists){\n\t\t\tif(self::$_dynamicUpdate==false){\n\t\t\t\t$fields = array();\n\t\t\t\t$values = array();\n\t\t\t\t$nonPrimary = $this->_getNonPrimaryKeyAttributes();\n\t\t\t\tforeach($nonPrimary as $np){\n\t\t\t\t\tif(isset($in[$np])){\n\t\t\t\t\t\t$this->$np = Date::now();\n\t\t\t\t\t}\n\t\t\t\t\t$fields[] = $np;\n\t\t\t\t\tif(is_object($this->$np)&&($this->$np instanceof DbRawValue)){\n\t\t\t\t\t\t$values[] = $this->$np->getValue();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif($this->$np===''||$this->$np===null){\n\t\t\t\t\t\t\t$values[] = 'NULL';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(!isset($dataTypeNumeric[$np])){\n\t\t\t\t\t\t\t\tif($dataType[$np]=='date'){\n\t\t\t\t\t\t\t\t\t$values[] = $this->_db->getDateUsingFormat($this->$np);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$values[] = '\\''.addslashes($this->$np).'\\'';\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$values[] = '\\''.addslashes($this->$np).'\\'';\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} else {\n\t\t\t\t$conditions = array();\n\t\t\t\tforeach($primaryKeys as $field){\n\t\t\t\t\t$conditions[] = $field.' = \\''.$this->field.'\\'';\n\t\t\t\t}\n\t\t\t\t$pkCondition = join(' AND ', $conditions);\n\t\t\t\t$existRecord = clone $this;\n\t\t\t\t$record = $existRecord->findFirst($pkCondition);\n\t\t\t\t$fields = array();\n\t\t\t\t$values = array();\n\t\t\t\t$nonPrimary = $this->_getNonPrimaryKeyAttributes();\n\t\t\t\tforeach($nonPrimary as $np){\n\t\t\t\t\tif(isset($in[$np])){\n\t\t\t\t\t\t$this->$np = $this->_db->getCurrentDate();\n\t\t\t\t\t}\n\t\t\t\t\tif(is_object($this->$np)){\n\t\t\t\t\t\tif($this->$np instanceof DbRawValue){\n\t\t\t\t\t\t\t$value = $this->$np->getValue();\n\t\t\t\t\t\t\tif($record->$np!=$value){\n\t\t\t\t\t\t\t\t$fields[] = $np;\n\t\t\t\t\t\t\t\t$values[] = $values;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new ActiveRecordException('El objeto instancia de \"'.get_class($this->$field).'\" en el campo \"'.$field.'\" es muy complejo, debe realizarle un \"cast\" a un tipo de dato escalar antes de almacenarlo');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif($this->$np===''||$this->$np===null){\n\t\t\t\t\t\t\tif($record->$np!==''&&$record->$np!==null){\n\t\t\t\t\t\t\t\t$fields[] = $np;\n\t\t\t\t\t\t\t\t$values[] = 'NULL';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(!isset($dataTypeNumeric[$np])){\n\t\t\t\t\t\t\t\tif($dataType[$np]=='date'){\n\t\t\t\t\t\t\t\t\t$value = $this->_db->getDateUsingFormat($this->$np);\n\t\t\t\t\t\t\t\t\tif($record->$np!=$value){\n\t\t\t\t\t\t\t\t\t\t$fields[] = $np;\n\t\t\t\t\t\t\t\t\t\t$values[] = $value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif($record->$np!=$this->$np){\n\t\t\t\t\t\t\t\t\t\t$fields[] = $np;\n\t\t\t\t\t\t\t\t\t\t$values[] = \"'\".addslashes($this->$np).\"'\";\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}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$success = $this->_db->update($table, $fields, $values, $this->_wherePk);\n\t\t} else {\n\t\t\t$fields = array();\n\t\t\t$values = array();\n\t\t\t$attributes = $this->getAttributes();\n\t\t\tforeach($attributes as $field){\n\t\t\t\tif($field!='id'){\n\t\t\t\t\tif(isset($at[$field])){\n\t\t\t\t\t\tif($this->$field==null||$this->$field===\"\"){\n\t\t\t\t\t\t\t$this->$field = $this->_db->getCurrentDate();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(isset($in[$field])){\n\t\t\t\t\t\t\t$this->$field = new DbRawValue('NULL');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$fields[] = $field;\n\t\t\t\t\tif(is_object($this->$field)){\n\t\t\t\t\t\tif($this->$field instanceof DbRawValue){\n\t\t\t\t\t\t\t$values[] = $this->$field->getValue();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new ActiveRecordException('El objeto instancia de \"'.get_class($this->$field).'\" en el campo \"'.$field.'\" es muy complejo, debe realizarle un \"cast\" a un tipo de dato escalar antes de almacenarlo');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(isset($dataTypeNumeric[$field])||$this->$field=='NULL'){\n\t\t\t\t\t\t\tif($this->$field===''||$this->$field===null){\n\t\t\t\t\t\t\t\t$values[] = 'NULL';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$values[] = addslashes($this->$field);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif($dataType[$field]=='date'){\n\t\t\t\t\t\t\t\tif($this->$field===null||$this->$field===''){\n\t\t\t\t\t\t\t\t\t$values[] = 'NULL';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$values[] = $this->_db->getDateUsingFormat(addslashes($this->$field));\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\tif($this->$field===null||$this->$field===''){\n\t\t\t\t\t\t\t\t\t$values[] = 'NULL';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif($magicQuotesRuntime==true){\n\t\t\t\t\t\t\t\t\t\t$values[] = \"'\".$this->$field.\"'\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$values[] = \"'\".addslashes($this->$field).\"'\";\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}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sequenceName = '';\n\t\t\tif($generator===null){\n\t\t\t\tif(count($primaryKeys)==1){\n\t\t\t\t\t// Hay que buscar la columna identidad aqui!\n\t\t\t\t\tif(!isset($this->id)||!$this->id){\n\t\t\t\t\t\tif(method_exists($this, 'sequenceName')){\n\t\t\t\t\t\t\t$sequenceName = $this->sequenceName();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$identityValue = $this->_db->getRequiredSequence($this->_source, $primaryKeys[0], $sequenceName);\n\t\t\t\t\t\tif($identityValue!==false){\n\t\t\t\t\t\t\t$fields[] = 'id';\n\t\t\t\t\t\t\t$values[] = $identityValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(isset($this->id)){\n\t\t\t\t\t\t\t$fields[] = 'id';\n\t\t\t\t\t\t\t$values[] = $this->id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$success = $this->_db->insert($table, $values, $fields);\n\t\t}\n\t\tif($this->_db->isUnderTransaction()==false){\n\t\t\tif($this->_db->getHaveAutoCommit()==true){\n\t\t\t\t$this->_db->commit();\n\t\t\t}\n\t\t}\n\t\tif($success){\n\t\t\tif($exists==true){\n\t\t\t\t$this->_callEvent('afterUpdate');\n\t\t\t} else {\n\t\t\t\tif($generator===null){\n\t\t\t\t\tif(count($primaryKeys)==1){\n\t\t\t\t\t\tif(isset($dataTypeNumeric[$primaryKeys[0]])){\n\t\t\t\t\t\t $lastId = $this->_db->lastInsertId($table, $primaryKeys[0], $sequenceName);\n\t\t\t\t\t\t if($lastId>0){\n\t\t\t\t\t\t\t $this->{$primaryKeys[0]} = $lastId;\n\t\t\t\t\t\t\t\t$this->findFirst($lastId);\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} else {\n\t\t\t\t\t//Actualiza el consecutivo para algunos generadores\n\t\t\t\t\t$generator->updateConsecutive($this);\n\t\t\t\t}\n\t\t\t\t$this->_callEvent('afterCreate');\n\t\t\t}\n\t\t\t$this->_callEvent('afterSave');\n\t\t\treturn $success;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function validate() {\n }", "public function validate() {\n }", "function before_validation_on_update() {}", "public function validation()\n {\n\n }", "function ValidateEdit()\n\t{\n\t}", "public function beforeValidationOnCreate()\n {\n\n }", "public function validateMakeBlog(){\n\n }", "public function validate()\n {\n // TODO implement this\n }", "public function validate()\n {\n }", "public function validate()\n {\n }", "public function save($validate = null);", "function validateOnAdd( $entity ){\n\t\t$username = $entity->getUsername();\n\t\t$criteria = new UserCriteria();\n\t\t$criteria->setUsername($username);\n\t\t$criteria->setOidNotEqual( $entity->getOid() );\n\t\t\n\t\t\n\t\t//Logger::log(\"oid del usuario \" . $entity->getOid(), __CLASS__);\n\t\t\n\t\t$count = $this->getCount($criteria);\n\t\t\n\t\tif( $count > 0){\n\t\t\tthrow new ServiceException( \"user.add.username.repetead\" );\n\t\t}\n\t\t\n\t\t\n\t}", "protected function validate()\n {\n// echo static::class;\n if (!isset($this->getProperty('raw_data')['_'])) {\n throw new InvalidEntity('Invalid entity data given: ' . json_encode($this->getRawData(), JSON_PRETTY_PRINT));\n }\n }", "function validate() {\n\t\t// execute the column validation \n\t\tparent::validate();\n\t\t\n\t\t// connection\t\t\n\t\t$conn = Doctrine_Manager::connection();\n\t\t\n\t\t// query for check if location exists\n\t\t$unique_query = \"SELECT id FROM company WHERE name = '\".$this->getName().\"' AND id <> '\".$this->getID().\"'\";\n\t\t$result = $conn->fetchOne($unique_query);\n\t\t// debugMessage($unique_query);\n\t\t// debugMessage(\"result is \".$result);\n\t\tif(!isEmptyString($result)){ \n\t\t\t$this->getErrorStack()->add(\"unique.name\", \"The name \".$this->getName().\" already exists. Please specify another.\");\n\t\t}\n\t}", "public static function validate() {}", "public function validate()\n\t{\n\t\t// Build the validation data\n\t\t$data = array();\n\n\t\tforeach ($this->_meta->fields as $field_name => $field)\n\t\t{\n\t\t\t$data[$field_name] = $this->get($field_name);\n\t\t}\n\n\t\t$data = Validation::factory($data);\n\n\t\t// Add rules\n\t\tforeach ($this->_meta->fields as $field_name => $field)\n\t\t{\n\t\t\tforeach ($field->rules as $rule)\n\t\t\t{\n\t\t\t\t$callback = Arr::get($rule, 0);\n\t\t\t\t$params = Arr::get($rule, 1);\n\n\t\t\t\t$data->rule($field_name, $callback, $params);\n\t\t\t}\n\t\t}\n\n\t\t// Bind :model parameters to this model so the validation callback\n\t\t// can have access to the model\n\t\t$data->bind(':model', $this);\n\n\t\t// If the data does not validate, throw an exception\n\t\tif ( ! $data->check())\n\t\t{\n\t\t\tthrow new DORM_Validation_Exception($this, $data);\n\t\t}\n\t}", "public static function validateExchangeModified()\n{\n return array(\n new Main\\Entity\\Validator\\Length(null, 196),\n );\n}", "public function save(&$entity){\n\t\t$data = $entity->toArray();\n\t\ttry {\n\t\t\tif(isset($entity->_id)&&(!empty($entity->_id))){\n\t\t\t\t$this->update($entity);\n\t\t\t}else{\n\t\t\t\t$this->insert($entity);\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (BulkWriteException $e) {\n\t\t\t\n\t\t\t$tmp = $e->getWriteResult()->getWriteErrors();\n\t\t\t$tmp = current($tmp);\n\t\t\tif($tmp->getCode()===11000){\n\t\t\t\t$var = explode('.', $tmp->getMessage());\n\t\t\t\t$var = explode(' ', $var[2]);\n\t\t\t\t$var = substr($var[0], 1);\n\t\t\t\t$entity->messageValidate[$var] = 'est deja utiliser';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function postSave($with_validation) {}", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "public function validate(){\r\n\t\tif(array_get($this->entity, array_get($this->validate, 'fieldName')) != $this->fieldValue){\r\n\t\t\tHmsException::occur($fieldName. '必须等于', $this->fieldValue);\r\n\t\t}\r\n\t}", "public static function validate()\n\t{\n\t\tself::engine()->validate();\n\t}", "function before_validation_on_create() {}", "public function preSave($with_validation) {}", "public function validate_fields() {\n \n\t\t//...\n \n }", "public function validate($entity)\n\t{\n\t\t// Create new validate using entity data\n\t\t$val = new Validate($entity->getData());\n\n\t\t// Go through each field and add rules to validator\n\t\t$count = 0;\n\t\tforeach ($this->fields as $field => $options)\n\t\t{\n\t\t\tif (isset($options['rules']))\n\t\t\t{\n\t\t\t\t$val->rules($options['rules']);\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\n\t\t// No rules so no point trying to validate\n\t\tif ($count == 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// Save the result\n\t\t$result = $val->check();\n\n\t\tif (!$result)\n\t\t{\n\t\t\t// Save the errors\n\t\t\t$this->errors = $val->errors();\n\t\t}\n\n\t\treturn $result;\n\t}", "public function checkIsValidForAdd_Update() {\n $errors = false;\n $building = new BUILDING_Model($this->idBuilding);\n if (strlen(trim($this->idBuilding)) == 0) {\n $errors= \"Building identifier is mandatory\";\n }else if (strlen(trim($this->idBuilding)) < 5) {\n $errors = \"Building identifier can't be less than 5 characters\";\n }else if (strlen(trim($this->idBuilding)) > 5) {\n $errors = \"Building identifier can't be larger than 5 characters\";\n }else if(!preg_match('/[A-Z0-9]/', $this->idBuilding)){\n $errors = \"Building identifier format is invalid\";\n }else if(!$building->existsBuilding()){\n $errors = \"There isn't a building with that identifier\";\n }else if (strlen(trim($this->idFloor)) == 0) {\n $errors= \"Floor identifier is mandatory\";\n }else if (strlen(trim($this->idFloor)) < 2) {\n $errors = \"Floor identifier can't be less than 2 characters\";\n }else if (strlen(trim($this->idFloor)) > 2) {\n $errors = \"Floor identifier can't be larger than 2 characters\";\n }else if(!preg_match('/[A-Z0-9]/', $this->idFloor)){\n $errors = \"Floor identifier format is invalid\";\n }else if (strlen(trim($this->nameFloor)) == 0) {\n $errors= \"Floor name is mandatory\";\n }else if (strlen(trim($this->nameFloor)) > 225) {\n $errors = \"Floor name can't be larger than 255 characters\";\n }else if(!preg_match('/[A-Za-zñÑ-áéíóúÁÉÍÓÚ\\s\\t-]/', $this->nameFloor)){\n $errors = \"Floor name format is invalid\";\n }else if (!preg_match('/^[0-9]{1,8}([.][0-9]{1,2}){0,1}?$/', $this->builtSurfaceFloor)) {\n $errors = \"Floor building surface can't be long than 99999999.99\";\n }else if (!preg_match('/^[0-9]{1,8}([.][0-9]{1,2}){0,1}?$/', $this->surfaceUsefulFloor)) {\n $errors = \"Floor useful surface can't be long than 99999999.99\";\n }else if($this->surfaceUsefulFloor > $this->builtSurfaceFloor){\n $errors = \"The usable surface can't be greater than the building surface\";\n }else if($this->getplanFloor(\"name\") !== ''){\n if(!$this->validateExtensionplan()){\n $errors = \"Floor plan extension is invalid\";\n }\n }\n return $errors;\n }", "protected function entityValidate($entity) {\n parent::entityValidate($entity);\n\n if (!isset($entity->uid) || !is_numeric($entity->uid)) {\n $entity->uid = $this->config['author'];\n }\n }", "public function isValid() {\n\n foreach ($this->entity as $nameColumn => $column) {\n\n $validate = null;\n // Se for chave primaria e tiver valor, valida inteiro somente sem nenhuma outra validacao.\n if ($column['contraint'] == 'pk' && $column['value']) {\n $validate = new Zend_Validate_Digits();\n } else {\n\n//______________________________________________________________________________ VALIDANDO POR TIPO DA COLUNA NO BANCO\n // Se tiver valor comeca validacoes de acordo com o tipo.\n // Se nao pergunta se é obrigatorio, se for obrigatorio valida.\n if ($column['value']) {\n // Se for inteiro\n if ($column['type'] == 'integer' || $column['type'] == 'smallint') {\n $validate = new Zend_Validate_Digits();\n // Se for data\n } else if ($column['type'] == 'numeric') {\n $column['value'] = str_replace('.', '', $column['value']);\n $column['value'] = (float) str_replace(',', '.', $column['value']);\n $validate = new Zend_Validate_Float();\n } else if ($column['type'] == 'date') {\n\n\t\t\t\t\t\t$posBarra = strpos($column['value'], '/');\n\t\t\t\t\t\t$pos = strpos($column['value'], '-');\n\t\t\t\t\t\tif ($posBarra !== false) {\n\t\t\t\t\t\t\t$date = explode('/', $column['value']);\n\t\t\t\t\t\t\tif (!checkdate($date[1], $date[0], $date[2])) {\n\t\t\t\t\t\t\t\t$this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($column['value'] . self::MSG_DATA_INVALIDA));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($pos !== false) {\n\t\t\t\t\t\t\t$date = explode('-', $column['value']);\n\t\t\t\t\t\t\tif (!checkdate($date[1], $date[2], $date[0])) {\n\t\t\t\t\t\t\t\t$this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($column['value'] . self::MSG_DATA_INVALIDA));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n // Se for texto\n } else if ($column['type'] == 'character' || $column['type'] == 'character varying') {\n\n // Se for Bollean\n } else if ($column['type'] == 'boolean') {\n\n // Se for texto\n } else if ($column['type'] == 'text') {\n \n } else if ($column['type'] == 'timestamp without time zone') {\n if (strpos($column['value'], '/')) {\n\n if (strpos($column['value'], ' ')) {\n $arrDate = explode(' ', $column['value']);\n\n // Validando a data\n $date = explode('/', $arrDate[0]);\n if (!checkdate($date[1], $arrDate[0], $date[2])) {\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($arrDate[0] . self::MSG_DATA_INVALIDA));\n }\n\n // Validando a hora\n $validateTime = new Zend_Validate_Date('hh:mm');\n $validateTime->isValid($arrDate[1]);\n if ($validateTime->getErrors()) {\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($arrDate[1] . self::MSG_DATA_HORA_INVALIDA));\n }\n } else {\n // Validando a data\n $date = explode('/', trim($column['value']));\n if (!checkdate($date[1], $date[0], $date[2])) {\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => ($column['value'] . self::MSG_DATA_INVALIDA));\n }\n }\n }\n }\n\n//______________________________________________________________________________ VALIDANDO POR LIMITE DA COLUNA NO BANCO\n // Validando quantidade de caracteres.\n if ($column['maximum']) {\n $validateMax = new Zend_Validate_StringLength(array('max' => $column['maximum']));\n $validateMax->isValid($column['value']);\n if ($validateMax->getErrors()) {\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => (reset($validateMax->getMessages())));\n }\n $validateMax = null;\n }\n } else {\n//______________________________________________________________________________ VALIDANDO POR NAO VAZIO DA COLUNA NO BANCO\n // Validando se nao tiver valor e ele for obrigatorio.\n if ($column['is_null'] == 'NO' && $column['contraint'] != 'pk') {\n $validate = new Zend_Validate_NotEmpty();\n }\n }\n\n//______________________________________________________________________________ VALIDANDO A CLOUNA E COLOCANDO A MENSAGEM\n if ($validate) {\n $validate->isValid($column['value']);\n if ($validate->getErrors()) {\n\t\t\t\t\t\t$msg = $validate->getMessages();\n $this->error[] = array(\"name\" => $nameColumn, \"msg\" => ( reset($msg) ));\n }\n\n $validate = null;\n }\n }\n }\n\t\t\n if ($this->error)\n return false;\n else\n return true;\n }", "public function validate(){\r\n $userInfo = wbUser::getSession();\r\n \r\n if ($this->actionType == 'CREATE'){\r\n // TODO : Write your validation for CREATE here\r\n $this->record['creation_date'] = date('Y-m-d');\r\n $this->record['created_by'] = $userInfo['user_name'];\r\n \r\n $this->record['updated_date'] = date('Y-m-d');\r\n $this->record['updated_by'] = $userInfo['user_name'];\r\n \r\n }else if ($this->actionType == 'UPDATE'){\r\n // TODO : Write your validation for UPDATE here\r\n $this->record['updated_date'] = date('Y-m-d');\r\n $this->record['updated_by'] = $userInfo['user_name'];\r\n }\r\n \r\n return true;\r\n }", "public function validated();", "public function validate(): void\n {\n }", "public function validate(): void\n {\n }", "public function validate(): void\n {\n }", "function thumbwhere_contentcollection_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_actor\n $value = $form['fk_actor']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_actor'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_actor']);\n if (twCanDebug()) debug('fk_actor = ' . $value);\n // Validate fk fk_actor\n if (empty($value)) {\n form_set_error('fk_actor', t('Validation error, \\'fk_actor\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_actor\\' in is mandatory');\n }\n\n // Validate normaltitle\n $value = $form['title']['#value'];\n // If we have no default value then we don't care much for checking for emptyness.\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_contentcollection = $form_state['thumbwhere_contentcollection'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_contentcollection', $thumbwhere_contentcollection, $form, $form_state);\n \n \n \n}", "protected function mainValidation()\n {\n $this->validator->add(\n 'title',\n new StringLength([\n 'max' => 50\n ])\n );\n\n $this->validator->add(\n 'description',\n new StringLength([\n 'max' => 200,\n 'allowEmpty' => true\n ])\n );\n }", "public function validate()\n {\n // query for validation information\n // set the validation flag\n // close database\n }", "abstract function validator();", "protected function validate()\n {\n }", "public function beforeValidate()\n \t{\n \t\tif ($this->isNewRecord) {\n \t\t} else {\n \t\t}\n\n \t\treturn parent::beforeValidate();\n \t}", "public static function validateInsert($data) {\n\t\t$v = parent::getValidationObject($data);\n\n\t\t//Set rules\n\t\t$v->rule('required', 'comment')->message(__('Comment is required!'))\n\t\t ->rule('lengthMin', 'comment', 1)->message(__('Comment size is too small!'))\n\t\t ->rule('required', 'model')->message(__('Model is required!'))\n\t\t ->rule('numeric', 'model')->message(__('Model must be numerical value!'))\n\t\t ->rule('required', 'foreign_id')->message(__('Foreign id is required!'))\n\t\t ->rule('numeric', 'foreign_id')->message(__('Foreign id must be numerical value!'));\n\n\t\t//Validate\n\t\treturn parent::validate($v, self::$__validationErrors);\n\t}", "public function save()\n {\n $data = $this->getSaveData();\n $errorString = '<h5 class=\"alert-heading\">Can\\'t save ' . $this->entityName . ' because of the following problems:</h5>';\n\n $errors = $this->checkRequiredColumns( $data );\n if ( !empty( $errors ) ) {\n return $this->addError( $errorString . HTMLTags::getListGroup( $errors ) );\n }\n\n if ( defined( 'DEBUG' ) && DEBUG === true ) {\n $dataToSave = !empty( $data ) ? $this->getDataHTMLTable( $data ) : 'None';\n $this->messages->add(\n 'Entity - ' . $this->entityName\n . '<br>Changed - ' . print_r( $this->changed, true )\n . '<br>Data to save - ' . $dataToSave\n . '<br>All column properties - ' . $dataToSave,\n 'info'\n );\n }\n $errors = $this->healthCheck();\n if ( !empty( $errors ) ) {\n return $this->addError( $errorString . HTMLTags::getListGroup( $errors ) );\n }\n if ( $this->exists ) {\n return $this->updateDBRow( $data );\n }\n $addRow = $this->addDBRow( $data );\n if ( is_int( $addRow ) ) {\n $this->id = $addRow;\n $this->exists = true;\n }\n return $addRow;\n }", "public function validate()\n {\n $messages = array();\n\n // ID\n if (!Validator::validateField($this->id, 'intVal')) {\n $messages[] = 'ID is invalid.';\n }\n\n // Email\n if (!Validator::validateField($this->email, 'email', array('notEmpty' => array(), 'required' => true))) {\n $messages[] = 'Email address is invalid.';\n }\n\n // Password - no need to validate as it is validated on set and isn't required for an update\n\n // First name\n if (!Validator::validateField($this->first_name, 'stringType', array(\n 'notEmpty' => array(),\n 'length' => array(1, 35),\n 'required' => true\n ))) {\n $messages[] = 'First name is required.';\n }\n\n // Last name\n if (!Validator::validateField($this->last_name, 'stringType', array(\n 'notEmpty' => array(),\n 'length' => array(1, 35),\n 'required' => true\n ))) {\n $messages[] = 'Last name is required.';\n }\n\n // Role\n if (!Validator::validateField($this->role, 'stringType', array(\n 'notEmpty' => array(),\n 'length' => array(1, 35),\n 'required' => true\n ))) {\n $messages[] = 'Role is required.';\n }\n\n // Status\n if (!Validator::validateField($this->status, 'slug', array(\n 'notEmpty' => array(),\n 'length' => array(1, 20),\n 'required' => true\n ))) {\n $messages[] = 'Status is not valid.';\n }\n\n if (!empty($messages)) {\n throw new ValidationException($messages);\n }\n }", "abstract function validate(): void;", "public function save($entity) : bool;", "public function validated(){\n\n return true;\n \n}", "public function validated(){\n\n return true;\n \n}", "public function validated(){\n\n return true;\n \n}", "public function validated(){\n\n return true;\n \n}", "function validate()\n\t{\n\t}", "public function validate()\n {\n throw new Fdap_Model_Exception(\"This function must be declared and completed in the concrete model class.\");\n }", "function validate(){\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}", "function validate_save_post()\n {\n }", "function before_validation(){}", "function after_validation_on_update() {}", "public function validate()\n\t{\n\t\t// Only validate changed data if it's an update\n\t\tif ($this->_loaded)\n\t\t{\n\t\t\t$data = $this->_changed;\n\t\t}\n\t\t// Validate all data on insert\n\t\telse\n\t\t{\n\t\t\t$data = $this->_changed + $this->_original;\n\t\t}\n\t\t\n\t\tif (empty($data))\n\t\t{\n\t\t\treturn $this;\n\t\t}\n\t\t\n\t\t// Create the validation object\n\t\t$data = Validate::factory($data);\n\t\t\n\t\t// Loop through all columns, adding rules where data exists\n\t\tforeach ($this->meta()->fields as $column => $field)\n\t\t{\n\t\t\t// Do not add any rules for this field\n\t\t\tif (!$data->offsetExists($column))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$data->label($column, $field->label);\n\n\t\t\tif ($field->filters)\n\t\t\t{\n\t\t\t\t$data->filters($column, $field->filters);\n\t\t\t}\n\n\t\t\tif ($field->rules)\n\t\t\t{\n\t\t\t\t$data->rules($column, $field->rules);\n\t\t\t}\n\n\t\t\tif ($field->callbacks)\n\t\t\t{\n\t\t\t\t$data->callbacks($column, $field->callbacks);\n\t\t\t}\t\t\t\n\t\t}\n\n\t\tif ($data->check())\n\t\t{\n\t\t\t// Insert filtered data back into the model\n\t\t\t$this->set($data->as_array());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Validate_Exception($data);\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function validator()\n {\n }", "function save(){\n if( !$this->validate() ){\n return false;\n }\n \n if($this->id){\n return $this->update();\n } else {\n return $this->create();\n }\n }", "public function before_insert(Model $obj) {\n\t\t$this->validate ( $obj );\n\t}", "public static function validateMark()\n{\n return array(\n new Main\\Entity\\Validator\\Length(null, 1),\n );\n}", "public function validate() {\n\t\t// field validation:\n\t\t$sw = $this->exists();\n\t\t$this->errors = validation::validate($this->new_data, $this->vrules, $sw);\n\t\tif ($this->errors) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// uniques:\n\t\tif ($this->errors = $this->check_uniques()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "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}", "function after_validation_on_create() {}", "public function checkIsValidForUpdate() {\n $errors = array();\n\n if (strlen($this->phone) >0 && !is_numeric($this->phone)){\n $errors[\"phone\"] = i18n(\"You must write a valid phone number\");\n }\n if (strlen($this->phone) < 1) {\n $errors[\"phone\"] = i18n(\"You must write a valid phone number\");\n }\n try{\n $this->checkIsValidForCreate();\n }catch(ValidationException $ex) {\n foreach ($ex->getErrors() as $key=>$error) {\n $errors[$key] = $error;\n }\n }\n if (sizeof($errors) > 0) {\n throw new ValidationException($errors, \"User is not valid\");\n }\n }", "public function valid(){ }", "public function validate() { return true; }", "abstract public function validate(): bool;", "public function Validate() {return true;}", "function save()\n {\n $this->form_validation->set_rules($this->_get_rules());\n\n if($this->form_validation->run()){\n $entity = $this->_from_form();\n $this->data['save'] = $this->model->insert_entry($entity);\n $this->data['action_performed'] = 'save';\n $this->success($entity);\n }\n else {\n $this->create();\n }\n }", "public static function validateStatus()\n{\n return array(\n new Main\\Entity\\Validator\\Length(null, 1),\n );\n}", "abstract protected function validate(): bool;", "private function validateInsert() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t\t// application id not 0\n\t}" ]
[ "0.6894728", "0.6702714", "0.667578", "0.6397669", "0.6164084", "0.6154304", "0.6153707", "0.61482984", "0.6070457", "0.5998407", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5985275", "0.5932703", "0.5932703", "0.59302646", "0.5924933", "0.5896538", "0.58277863", "0.58277863", "0.5814022", "0.5796835", "0.57717586", "0.5764487", "0.57632285", "0.57621616", "0.57509476", "0.57509476", "0.57451624", "0.5730689", "0.5719426", "0.5714655", "0.5712152", "0.57071626", "0.5704147", "0.5690137", "0.5686447", "0.56851995", "0.5669325", "0.5668432", "0.5662634", "0.5651785", "0.5638083", "0.5624013", "0.5622044", "0.5619794", "0.55815685", "0.55792874", "0.55791926", "0.55623305", "0.55623305", "0.55623305", "0.555872", "0.55547494", "0.55522174", "0.55298644", "0.55222136", "0.55043507", "0.5502678", "0.5495431", "0.5492173", "0.54362994", "0.5420438", "0.541839", "0.541839", "0.541839", "0.541839", "0.53967243", "0.53951615", "0.5394892", "0.5394284", "0.5388501", "0.5360304", "0.53602", "0.53578913", "0.53543496", "0.5350872", "0.53483236", "0.5347112", "0.5345785", "0.53455293", "0.533831", "0.53318715", "0.5330314", "0.5328401", "0.5324822", "0.5308392", "0.5307077", "0.53010565", "0.5295166", "0.52918804" ]
0.5836037
27
Form submit handler for mongo_node_form().
function mongo_node_form_submit(&$form, &$form_state) { $entity_type = $form_state['entity_type']; $entity = entity_ui_controller($entity_type)->entityFormSubmitBuildEntity($form, $form_state); $insert = empty($entity->mid); entity_save($entity_type, $entity); $info = entity_get_info($entity_type); $bundle_key = $info['bundle keys']['bundle']; $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label']; if ($insert) { drupal_set_message(t('@label %title has been created.', array( '@label' => $bundle_label, '%title' => $entity->title, ) ) ); } else { drupal_set_message(t('@label %title has been updated.', array( '@label' => $bundle_label, '%title' => $entity->title, ) ) ); } $uri = entity_uri($entity_type, $entity); $form_state['redirect'] = drupal_get_path_alias($uri['path']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_operation_submit($form, &$form_state) {\n $operations = mongo_node_operations();\n $operation = $operations[$form_state['values']['operation']];\n\n $entities = array_filter($form_state['values']['entities']);\n $entity_type = $form_state['values']['entity_type'];\n if ($function = $operation['callback']) {\n // Add in callback arguments if present.\n if (isset($operation['callback arguments'])) {\n $args = array(\n $entity_type,\n $entities,\n $operation['callback arguments'],\n );\n }\n else {\n $args = array($entity_type, $entities);\n }\n call_user_func_array($function, $args);\n cache_clear_all();\n }\n}", "function mongo_node_type_create_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n\n $set = mongo_node_settings();\n $set += mongo_node_type_default_settings($label, $machine_name);\n\n // @todo - redirect to entity type page\n mongo_node_settings_save($set);\n}", "function mongo_node_form($form, &$form_state, $entity, $entity_type) {\n $form = array();\n\n $form_state['entity_type'] = $entity_type;\n if (!isset($form_state[$entity_type])) {\n $form_state[$entity_type] = $entity;\n }\n else {\n $entity = $form_state[$entity_type];\n }\n\n // Get title label name from properties if exists\n static $settings = array();\n if(empty($settings)) {\n $settings = mongo_node_settings();\n }\n $title = isset($settings[$entity_type]['properties']['title']['label']) ? $settings[$entity_type]['properties']['title']['label'] : t('Title');\n\n $form['title'] = array(\n '#type' => 'textfield',\n '#title' => $title,\n '#required' => TRUE,\n '#default_value' => isset($entity->title) ? $entity->title : '',\n );\n\n $form['#attributes']['class'][] = 'mongo-node-form';\n if (!empty($entity->type)) {\n // TODO -- add entity type with bundle.\n $form['#attributes']['class'][] = 'mongo-node-' . $entity->type . '-form';\n }\n\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('mongo_node_form_submit'),\n );\n\n $form['#validate'][] = 'mongo_node_form_validate';\n field_attach_form($entity_type, $entity, $form, $form_state);\n\n return $form;\n}", "function mongo_node_type_edit_form_submit($form, $form_state) {\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $old_entity_type = $form_state['values']['entity_type'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_entity_type) {\n $set += mongo_node_type_default_settings($label, $machine_name);\n $set[$machine_name] = $set[$old_entity_type];\n unset($set[$old_entity_type]);\n\n // Update existing mongo entities with new entity type.\n _mongo_node_update_type($old_entity_type, $machine_name);\n }\n else {\n $set[$machine_name]['label'] = $label;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function main() {\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\tprint_r($_POST);\n\t\t\techo \"<br />\";\n\t\t\t\n\t\t\t// Required Fields in the POST data //\t\t\t\n\t\t\tif ( !isset($_POST['_type']) ) return;\n\t\t\tif ( !isset($_POST['_subtype']) ) return;\n\t\t\tif ( !isset($_POST['_name']) ) return;\n\t\t\tif ( !isset($_POST['_mail']) ) return;\n\t\t\tif ( !isset($_POST['_password']) ) return;\n\t\t\tif ( !isset($_POST['_publish']) ) return;\n\t\n\t\t\t// Node Type //\n\t\t\t$type = sanitize_NodeType($_POST['_type']);\n\t\t\tif ( empty($type) ) return;\t\n\n\t\t\t$subtype = sanitize_NodeType($_POST['_subtype']);\n\t\n\t\t\t// Name/Title //\n\t\t\t$name = $_POST['_name'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Slug //\n\t\t\tif ( empty($_POST['_slug']) )\n\t\t\t\t$slug = $_POST['_name'];\n\t\t\telse\n\t\t\t\t$slug = $_POST['_slug'];\n\t\t\t$slug = sanitize_Slug($slug);\n\t\t\tif ( empty($slug) ) return;\n\t\t\t\n\t\t\t// TODO: Confirm slug is legal\n\t\t\t\t\n\t\t\t// Body //\n\t\t\t$body = $_POST['_body'];\t// TODO: Sanitize\n\t\t\t\n\t\t\t// Do we publish? //\n\t\t\t$publish = mb_strtolower($_POST['_publish']) == \"true\";\n\t\t\t\n\t\t\t// Email //\n\t\t\t$mail = sanitize_Email($_POST['_mail']);\n\t\t\tif ( empty($mail) ) return;\n\n\t\t\t// Password //\n\t\t\t$password = $_POST['_password'];\n\t\t\tif ( empty($password) ) return;\n\n\t\n\t\t\t$id = node_Add(\n\t\t\t\t$type,$subtype,$slug,$name,$body,\n\t\t\t\t0,2,\n\t\t\t\t$publish\n\t\t\t);\n\t\t\t\n\t\t\tuser_Add($id,$mail,$password);\n\t\n\t\t\techo \"Added \" . $id . \".<br />\";\n\t\t\techo \"<br />\";\n\t\t}\n\t}", "function happywedding_node_form_submit($form, &$form_state) {\n global $user;\n //dpm($user);\n if ( !empty($form_state['nid']) && isset($_GET['vendor'] ) ) {\n \n $type = $form['type']['#value'];\n if (in_array('vendor', $user->roles)) {\n $basepath = 'bo/vendor/';\n } else {\n $basepath = 'node/';\n }\n //dpm($form);\n if($type=='news')\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type;\n else if($type=='product') {\n $query = array('category' => array());\n foreach($form[\"field_product_category\"][\"und\"][\"#value\"] as $key => $value){\n $query[\"category\"][] = $key; \n }\n $form_state['redirect'] = array( \n $basepath.$_GET['vendor'].'/categories/'.$type.'s' ,\n array('query' => $query ) \n );\n //dpm($form_state['redirect']);\n }else\n $form_state['redirect'] = $basepath.$_GET['vendor'].'/'.$type.'s';\n }\n}", "public function updateSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id);\n $node->setSticky($form_state->getValue('sticky'));\n $node->setPublished($form_state->getValue('status'));\n $node->save();\n }", "private function _handleFormPost()\n {\n // see submit.php\n // 'FILE_OBJECTS' => 'handle_file_post',\n // 'BASE64_ENCODED_FILE_OBJECTS' => 'handle_base64_encoded_file_post',\n // 'TRANSFER_IDS' => 'handle_transfer_ids_post'\n }", "public static abstract function postSubmit(Form $form);", "function node_form_submit_build_node($form, &$form_state) {\n // Unset any button-level handlers, execute all the form-level submit\n // functions to process the form values into an updated node.\n unset($form_state['submit_handlers']);\n form_execute_handlers('submit', $form, $form_state);\n $node = node_submit($form_state['values']);\n $form_state['node'] = (array)$node;\n $form_state['rebuild'] = TRUE;\n return $node;\n}", "function process() {\n // We always call the parent's method\n parent::process();\n $d = $this->getDocument();\n \n // We pass the form our request object and the location of us so the form\n // will make us handle the input (as actually we take care of processing\n // this form) - it could link to any other action as long as it is aware\n // of the form\n $form = new Form($this->getRequest(), new Location($this), Request::METHOD_POST);\n \n // This is how you prepare values for the radio buttons\n $radios = array('visa', 'master');\n \n // This is how we prepare the fields\n $form->addField('text1', new TextInputField('Your name here please', \n new RegexValidator('^[[:alpha:]]+[[:space:]][[:alpha:]]+$')));\n $form->addField('pass1', \n new TextInputField('', new RegexValidator('^[[:digit:]]{16}$'), TextInputField::PASSWORD));\n $form->addField('text2', new TextInputField('', null, TextInputField::TEXTAREA));\n $form->addField('check1', new CheckBoxInputField());\n $form->addField('payment', new RadioButtonInputField('visa', $radios));\n \n // Here we test if the form was correctly submitted\n if($form->isValidSubmission()) {\n // Normally, we would do something useful here and redirect to another page\n // since this form uses the POST method\n $d->setVariable('success', true);\n }\n \n // Here we place the form into the document variable so it can process it\n $d->setVariable('form', $form);\n }", "function mongo_node_bundle_edit_form_submit($form, $form_state) {\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $entity_type = $form_state['values']['bundle_type']['entity_type'];\n $old_bundle_type = $form_state['values']['bundle_type']['bundle'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n\n if ($machine_name != $old_bundle_type) {\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n $set[$entity_type]['bundles'][$machine_name] = $set[$entity_type]['bundles'][$old_bundle_type];\n unset($set[$entity_type]['bundles'][$old_bundle_type]);\n\n // Update existing mongo entities with new bundle.\n //_mongo_node_update_bundle($entity_type, $old_bundle_type, $machine_name);\n }\n else {\n $set[$entity_type]['bundles'][$machine_name]['label'] = $label;\n $set[$entity_type]['bundles'][$machine_name]['description'] = $description;\n }\n\n // Save settings.\n mongo_node_settings_save($set);\n return TRUE;\n}", "function mongo_node_form_validate(&$form, &$form_state) {\n $entity_type = $form_state['entity_type'];\n $entity = $form_state[$entity_type];\n field_attach_form_validate($entity_type, $entity, $form, $form_state);\n}", "function islandora_collection_search_form_submit($form, &$form_state) {\n $form_state['rebuild'] = TRUE;\n $search_string = $form_state['values']['islandora_simple_search_query'];\n // Replace the slash so url doesn't break.\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n $search_string = islandora_solr_replace_slashes($search_string);\n $collection_select = isset($form_state['values']['collection_select']) ?\n $form_state['values']['collection_select'] :\n FALSE;\n\n // Using edismax by default.\n $query = array('type' => 'edismax');\n if (isset($collection_select) && $collection_select !== 'all') {\n $query['cp'] = $collection_select;\n }\n drupal_goto('islandora/search/' . $search_string, array('query' => $query));\n}", "function mongo_node_bundle_create_form_submit($form, $form_state) {\n $entity_type = $form_state['values']['entity_type'];\n\n $label = $form_state['values']['label'];\n $machine_name = $form_state['values']['name'];\n $description = $form_state['values']['description'];\n\n $set = mongo_node_settings();\n $set[$entity_type]['bundles'] += mongo_node_bundle_default_settings($label, $machine_name, $description);\n\n // @todo - redirect to bundle type page.\n mongo_node_settings_save($set);\n}", "function submit() {\n foreach ($this->submit_callbacks as $callback) {\n call_user_func($callback, $this);\n }\n foreach ($this->children as $element) {\n $element->submit();\n }\n }", "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "function submit()\n {\n\t\t//all data is handled by submit2()\n }", "function lib4ridora_ingest_selector_form_submit(array $form, array &$form_state) {\n module_load_include('inc', 'xml_form_builder', 'includes/associations');\n module_load_include('inc', 'lib4ridora', 'includes/utilities');\n module_load_include('inc', 'lib4ridora', 'includes/citation.subtypes');\n $association_step_storage = &islandora_ingest_form_get_step_storage($form_state, 'xml_form_builder_association_step');\n $association_step_storage['journal_import_method'] = $form_state['values']['journal_import_method'];\n $association_step_storage['doi'] = $form_state['values']['doi'];\n $association_step_storage['ingest_selector'] = $form_state['values']['ingest_selector'];\n\n $subtype = $form_state['values']['ingest_selector'];\n $subtypes = lib4ridora_citation_form_subtypes();\n $form_name = $subtypes[$subtype]['form'];\n foreach (xml_form_builder_get_associations(array($form_name), array(), array('MODS')) as $key => $association) {\n // Update the content_model to be ir:citationCModel so that regardless of\n // the form used it will only have the ir:citationCModel.\n $association['content_model'] = \"ir:citationCModel\";\n $association_step_storage['association'] = $association;\n break;\n }\n if (!isset($association_step_storage['association'])) {\n form_set_error('ingest_selector', t('A form could not be determined for the selected publication type.'));\n }\n}", "function elife_article_markup_doi_edit_form_submit(&$form, &$form_state) {\n // Nothing.\n}", "function handle_form() {\n\t\tglobal $wpdb;\n\t\t\n\t\t// Exit if user not logged in\n\t\t// TODO: GET THIS WORKING TO AVOID NON-ADMINS USING IT\n/*\t\tif( ! is_user_logged_in() ) {\n\t\t\tcpd_not_logged_in_message();\n\t\t\treturn;\t\n\t\t}\n*/\n\t\t// Exit if the Cancel button was pressed, and redirect to page that lists all orgs\n\t\tif( isset( $_POST['submit'] ) && 'Cancel' == $_POST['submit'] ) {\n\t\t\t\n\t\t\t// TODO: Check destination\n\t\t\twp_safe_redirect( site_url() . '/admin/list-orgs' );\n\t\t\texit();\n\t\t}\n\n\t\t$org = new Organisation();\n\n\t\t$org->save_org_from_post();\n\t\t\n\t}", "function process_form()\n {\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}", "protected function _handle_forms()\n\t{\n\t\tif (!strlen($this->_form_posted)) return;\n\t\t$method = 'on_'.$this->_form_posted.'_submit';\n\n\t\tif (method_exists($this, $method))\n\t\t{\n\t\t\tcall_user_func(array($this, $method), $this->_form_action);\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($this->controls as $k=>$v)\n\t\t{\n\t\t\t$ctl = $this->controls[$k];\n\n\t\t\tif (method_exists($ctl, $method))\n\t\t\t{\n\t\t\t\t$ctl->page = $this;\n\t\t\t\tcall_user_func(array($ctl, $method), $this->_form_action);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (DEBUG) dwrite(\"Method '$method' not defined\");\n\t}", "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n drupal_set_message(t('@label %title deleted',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title)\n )\n );\n }\n\n $form_state['redirect'] = '<front>';\n}", "public function submitEvent();", "function node_form(&$form_state, $node) {\n global $user;\n\n if (isset($form_state['node'])) {\n $node = $form_state['node'] + (array)$node;\n }\n if (isset($form_state['node_preview'])) {\n $form['#prefix'] = $form_state['node_preview'];\n }\n $node = (object)$node;\n foreach (array('body', 'title', 'format') as $key) {\n if (!isset($node->$key)) {\n $node->$key = NULL;\n }\n }\n if (!isset($form_state['node_preview'])) {\n node_object_prepare($node);\n }\n else {\n $node->build_mode = NODE_BUILD_PREVIEW;\n }\n\n // Set the id of the top-level form tag\n $form['#id'] = 'node-form';\n\n // Basic node information.\n // These elements are just values so they are not even sent to the client.\n foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => isset($node->$key) ? $node->$key : NULL,\n );\n }\n\n // Changed must be sent to the client, for later overwrite error checking.\n $form['changed'] = array(\n '#type' => 'hidden',\n '#default_value' => isset($node->changed) ? $node->changed : NULL,\n );\n // Get the node-specific bits.\n if ($extra = node_invoke($node, 'form', $form_state)) {\n $form = array_merge_recursive($form, $extra);\n }\n if (!isset($form['title']['#weight'])) {\n $form['title']['#weight'] = -5;\n }\n\n $form['#node'] = $node;\n\n // Add a log field if the \"Create new revision\" option is checked, or if the\n // current user has the ability to check that option.\n if (!empty($node->revision) || user_access('administer nodes')) {\n $form['revision_information'] = array(\n '#type' => 'fieldset',\n '#title' => t('Revision information'),\n '#collapsible' => TRUE,\n // Collapsed by default when \"Create new revision\" is unchecked\n '#collapsed' => !$node->revision,\n '#weight' => 20,\n );\n $form['revision_information']['revision'] = array(\n '#access' => user_access('administer nodes'),\n '#type' => 'checkbox',\n '#title' => t('Create new revision'),\n '#default_value' => $node->revision,\n );\n $form['revision_information']['log'] = array(\n '#type' => 'textarea',\n '#title' => t('Log message'),\n '#default_value' => (isset($node->log) ? $node->log : ''),\n '#rows' => 2,\n '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.'),\n );\n }\n\n // Node author information for administrators\n $form['author'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Authoring information'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 20,\n );\n $form['author']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored by'),\n '#maxlength' => 60,\n '#autocomplete_path' => 'user/autocomplete',\n '#default_value' => $node->name ? $node->name : '',\n '#weight' => -1,\n '#description' => t('Leave blank for %anonymous.', array('%anonymous' => variable_get('anonymous', t('Anonymous')))),\n );\n $form['author']['date'] = array(\n '#type' => 'textfield',\n '#title' => t('Authored on'),\n '#maxlength' => 25,\n '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => !empty($node->date) ? $node->date : format_date($node->created, 'custom', 'Y-m-d H:i:s O'))),\n );\n\n if (isset($node->date)) {\n $form['author']['date']['#default_value'] = $node->date;\n }\n\n // Node options for administrators\n $form['options'] = array(\n '#type' => 'fieldset',\n '#access' => user_access('administer nodes'),\n '#title' => t('Publishing options'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#weight' => 25,\n );\n $form['options']['status'] = array(\n '#type' => 'checkbox',\n '#title' => t('Published'),\n '#default_value' => $node->status,\n );\n $form['options']['promote'] = array(\n '#type' => 'checkbox',\n '#title' => t('Promoted to front page'),\n '#default_value' => $node->promote,\n );\n $form['options']['sticky'] = array(\n '#type' => 'checkbox',\n '#title' => t('Sticky at top of lists'),\n '#default_value' => $node->sticky,\n );\n\n // These values are used when the user has no administrator access.\n foreach (array('uid', 'created') as $key) {\n $form[$key] = array(\n '#type' => 'value',\n '#value' => $node->$key,\n );\n }\n\n // Add the buttons.\n $form['buttons'] = array();\n $form['buttons']['submit'] = array(\n '#type' => 'submit',\n '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])),\n '#value' => t('Save'),\n '#weight' => 5,\n '#submit' => array('node_form_submit'),\n );\n $form['buttons']['preview'] = array(\n '#type' => 'submit',\n '#value' => t('Preview'),\n '#weight' => 10,\n '#submit' => array('node_form_build_preview'),\n );\n if (!empty($node->nid) && node_access('delete', $node)) {\n $form['buttons']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#weight' => 15,\n '#submit' => array('node_form_delete_submit'),\n );\n }\n $form['#validate'][] = 'node_form_validate';\n $form['#theme'] = array($node->type .'_node_form', 'node_form');\n return $form;\n}", "function ting_visual_relation_slide_form_submit($form, &$form_state) {\n $type = $form_state['values']['type'];\n $fields = array(\n 'name' => $form_state['values']['name'],\n 'type' => $type,\n );\n switch ($type) {\n case 'external':\n case 'circular':\n $fields['datawell_pid'] = $form_state['values']['datawell_pid'];\n break;\n case 'structural':\n $fields['search_query'] = $form_state['values']['search_query'];\n }\n // Determine if this is an update or insert\n $slide = isset($form_state['slide']) ? $form_state['slide'] : FALSE;\n if ($slide) {\n db_update('ting_visual_relation_slides')\n ->condition('slide_id', $slide->slide_id)\n ->fields($fields)\n ->execute();\n }\n else {\n db_insert('ting_visual_relation_slides')->fields($fields)->execute();\n }\n // Set message and go back to table overview\n drupal_set_message(t('Slide saved'));\n $form_state['redirect'] = 'admin/config/ting/ting-visual-relation/app-settings';\n}", "function _or_chart_admin_url_export_submit($form, &$form_state) {\n $nodes = array_filter($form_state['values']['nodes']);\n _or_chart_url_export_operation($form,$nodes);\n}", "public function handleDataSubmission() {}", "public function perform()\n {\n // init template array to fill with node data\n $this->viewVar['title'] = '';\n // Init template form field values\n $this->viewVar['error'] = array();\n\n $this->viewVar['htmlTitle'] .= ' Add new simple text';\n\n $addtext = $this->httpRequest->getParameter('addtext', 'post', 'alnum');\n $cancel = $this->httpRequest->getParameter('cancel', 'post', 'alpha');\n\n if(false !== $cancel)\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/default/cntr/advancedMain');\n }\n\n\n // add node\n if( !empty($addtext) )\n {\n if(false !== ($id_text = $this->addText()))\n {\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/misc/cntr/editText/id_text/'.$id_text);\n }\n }\n }", "function submit()\n {\n }", "function submit()\n {\n }", "function submit()\n {\n }", "function mongo_node_filters_submit($form, &$form_state) {\n $entity_type = $form_state['values']['entity_type'];\n $filters = mongo_node_filters($entity_type);\n\n $op = strtolower($form_state['input']['op']);\n\n if ($op == 'reset') {\n // Remove all filters.\n unset($_SESSION[$entity_type . '_filters']);\n }\n elseif ($op == 'undo') {\n // Remove last filter.\n array_pop($_SESSION[$entity_type . '_filters']);\n }\n else {\n // Apply filters.\n foreach ($filters as $f_type => $f_val) {\n if (!isset($form_state['values'][$f_type]) || $form_state['values'][$f_type] == 'any') {\n continue;\n }\n $filter = $form_state['values'][$f_type];\n if (!isset($_SESSION[$entity_type . '_filters'])) {\n $_SESSION[$entity_type . '_filters'] = array();\n }\n $exists = FALSE;\n foreach ($_SESSION[$entity_type . '_filters'] as &$app_filter) {\n if ($app_filter['#type'] == $f_type && $app_filter['#value'] == $filter) {\n $exists = TRUE;\n break;\n }\n }\n // Skip filter if already applied.\n if ($exists) {\n continue;\n }\n // Add filter to session.\n $_SESSION[$entity_type . '_filters'][] = array(\n '#type' => $f_type,\n '#value' => $filter,\n );\n }\n }\n}", "function mongo_node_type_edit_form($form, $form_state, $entity_type) {\n $set = mongo_node_settings();\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $entity_type,\n '#machine_name' => array(\n 'exists' => '_mongo_node_type_exists',\n 'source' => array('label'),\n ),\n );\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function process(&$dom, &$formnode) {\n\t\t$formerrors = $this->readform();\n\t\tif(count($formerrors) > 0) {\n\t\t\tforeach($formerrors as $error) {\n\t\t\t\t$node = $formnode->appendChild($dom->createElement(\"formerror\"));\n\t\t\t\t$node->setAttribute(\"type\", $error);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Attempt MySQL add\n\t\t$result = $this->ftpmirror->addmirror();\n\t\tif(PEAR::isError($result)) {\n\t\t\t$node = $formnode->appendChild($dom->createElement(\"error\"));\n\t\t\t$node->appendChild($dom->createTextNode($result->getMessage()));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Report success\n\t\tif($result) {\n\t\t\t$node = $formnode->appendChild($dom->createElement(\"added\"));\n\t\t\t$this->ftpmirror->add_to_node($dom, $node);\n\t\t\t$this->ftpmirror = new FTPMirror();\n\t\t}\n\n\t\treturn;\n\t}", "public function submit()\n {\n if ($_POST['name'] == 'preview') { $this->preview(); }\n elseif ($_POST['name'] == 'create') { $this->save(); }\n }", "public function callbackSubmit()\n {\n $reply = new Reply();\n $reply->setDb($this->di->get(\"db\"));\n $reply->find(\"id\", $this->form->value(\"id\"));\n $reply->delete();\n $this->di->get(\"response\")->redirect(\"comments\");\n }", "abstract public function submit($data);", "function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "public function mappingFormSubmit(array &$form, FormStateInterface $form_state);", "public function deleteSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id)->delete();\n }", "function cps_changeset_publish_changeset_form_submit($form, &$form_state) {\n // This is handled as a traditional submit method rather than my usual\n // preference of divorcing work from the form itself due to the nature\n // of batch API.\n $batch = array(\n 'operations' => array(\n array('cps_changeset_publish_batch_lock', array()),\n array('cps_changeset_publish_batch_entities', array($form_state['entity'])),\n ),\n 'finished' => 'cps_changeset_publish_batch_finished',\n 'title' => t('Publishing %changeset', array('%changeset' => $form_state['entity']->name)),\n 'file' => drupal_get_path('module', 'cps') . '/includes/forms.inc',\n );\n\n if (variable_get('cps_override_variables', FALSE)) {\n $batch['operations'][] = array('cps_changeset_publish_batch_variables', array());\n }\n\n foreach (cps_get_supported() as $entity_type) {\n // For every entity type we support, add another operation for that entity type.\n $batch['operations'][] = array('cps_changeset_publish_batch_update', array($form_state['entity'], $entity_type));\n }\n\n drupal_alter('cps_publish_changeset_batch', $batch, $form_state);\n\n batch_set($batch);\n\n $form_state['redirect'] = $form_state['entity']->uri();\n}", "function mongo_node_admin_content($form, $form_state, $entity_type) {\n $settings = mongo_node_settings();\n\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['filters'] = array(\n '#type' => 'fieldset',\n '#title' => t('Show only items where'),\n );\n\n $filters = mongo_node_filters($entity_type);\n $applied_filters = isset($_SESSION[$entity_type . '_filters']) ? $_SESSION[$entity_type . '_filters'] : array();\n\n foreach ($filters as $f_type_name => $f_type) {\n $form['filters'][$f_type_name] = array('#type' => 'select', '#title' => $f_type_name);\n foreach ($f_type as $f_name => $f_val) {\n $form['filters'][$f_type_name]['#options'][$f_name] = $f_val['label'];\n }\n }\n\n $items = array();\n $remaining_filters = array();\n foreach ($applied_filters as $app_filter) {\n $items[] = t('where %f_name is %f_val', array('%f_name' => $app_filter['#type'], '%f_val' => $app_filter['#value']));\n $conditions = $filters[$app_filter['#type']][$app_filter['#value']]['filters'];\n foreach ($conditions as $condition) {\n $remaining_filters[$condition['#type']]['#callback'] = $condition['#callback'];\n $remaining_filters[$condition['#type']]['#value'][] = $condition['#value'];\n }\n }\n\n $form['filters']['#description'] = theme('item_list', array('items' => $items));\n\n if (empty($applied_filters)) {\n $form['filters']['filter'] = array(\n '#type' => 'submit',\n '#value' => 'Filter',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n else {\n $form['filters']['refine'] = array(\n '#type' => 'submit',\n '#value' => 'Refine',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['undo'] = array(\n '#type' => 'submit',\n '#value' => 'Undo',\n '#submit' => array('mongo_node_filters_submit'),\n );\n $form['filters']['reset'] = array(\n '#type' => 'submit',\n '#value' => 'Reset',\n '#submit' => array('mongo_node_filters_submit'),\n );\n }\n\n $form['options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Update options'),\n );\n\n $operations = mongo_node_operations();\n foreach ($operations as $op => $op_set) {\n $options[$op] = $op_set['label'];\n }\n $form['options']['operation'] = array(\n '#type' => 'select',\n '#options' => $options,\n );\n\n $form['options']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Update'),\n '#validate' => array('mongo_node_operation_validate'),\n '#submit' => array('mongo_node_operation_submit'),\n );\n\n $query = new EntityFieldQuery();\n\n $query->entityCondition('entity_type', $entity_type)\n ->propertyOrderBy('created', 'DESC')\n ->pager(10);\n\n // Actually apply filters.\n foreach ($remaining_filters as $r_name => $r_values) {\n $query->{$r_values['#callback']}($r_name, $r_values['#value'], 'IN');\n }\n\n $result = $query->execute();\n\n $languages = language_list();\n $destination = drupal_get_destination();\n $header = array(\n 'title' => array('data' => t('Title'), 'field' => 'title'),\n 'type' => t('Type'),\n 'author' => t('Author'),\n 'status' => t('Status'),\n 'changed' => t('Updated'),\n 'language' => t('Language'),\n 'operations' => t('Operations'),\n );\n $options = array();\n\n if (isset($result[$entity_type])) {\n $ids = array_keys($result[$entity_type]);\n $entities = entity_load($entity_type, $ids);\n\n foreach ($result[$entity_type] as $id => $efq_entity) {\n $entity = entity_load($entity_type, array($id));\n $entity = reset($entity);\n\n $entity_uri = entity_uri($entity_type, $entity);\n\n $options[$id] = array(\n 'title' => array(\n 'data' => array(\n '#type' => 'link',\n '#title' => $entity->title,\n '#href' => $entity_uri['path'],\n ),\n ),\n 'type' => check_plain($settings[$entity_type]['bundles'][$entity->type]['label']),\n 'author' => theme('username', array('account' => $entity)),\n 'status' => $entity->status ? t('published') : t('not published'),\n 'changed' => format_date($entity->changed, 'short'),\n 'language' => ($entity->language == LANGUAGE_NONE) ? t('Language neutral') : $languages[$entity->language]->name,\n );\n\n $operations = array();\n $operations[] = l(t('edit'), $entity_uri['path'] . '/edit', array('query' => $destination));\n $operations[] = l(t('delete'), $entity_uri['path'] . '/delete', array('query' => $destination));\n\n $options[$id]['operations'] = theme('item_list', array('items' => $operations, 'attributes' => array('class' => 'inline')));\n }\n }\n\n $form['entities'] = array(\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n '#empty' => t('No content available'),\n );\n\n $form['pager'] = array(\n '#theme' => 'pager',\n );\n\n return $form;\n}", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "function form_submit($form, &$form_state) {\n }", "public function submitPage() {}", "private function formSubmitted() {\n\t\t\t\n\t\t\t// connect db\n\t\t\t$this->db->replicaConnect(Database::getName($this->par['lang'], $this->par['project']));\n\t\t\t\n\t\t\t// build query for outgoing links\n\t\t\t$this->par['page'] = str_replace(' ', '_', $this->par['page']);\n\t\t\t$t1 = 'SELECT s.pl_title';\n\t\t\t$t1 .= ' FROM pagelinks s';\n\t\t\t$t1 .= ' INNER JOIN page tp ON (s.pl_title = tp.page_title AND s.pl_namespace = tp.page_namespace)';\n\t\t\t$t1 .= ' INNER JOIN page sp ON (s.pl_from = sp.page_id AND s.pl_namespace = sp.page_namespace AND sp.page_title = ?)';\n\t\t\t$t1 .= ' WHERE s.pl_namespace = 0';\n\t\t\t$t1 .= ' AND s.pl_from_namespace = 0';\n\t\t\t\n\t\t\t// execute query\n\t\t\t$q1 = $this->db->executePreparedQuery($t1, 's', $this->par['page']);\n\t\t\t\n\t\t\t// check for sql errors\n\t\t\tif (Database::checkSqlQueryObject($q1) === false) {\n\t\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t\t$this->page->addInline('p', 'SQL Error: ' . $this->db->error, 'iw-error');\n\t\t\t\t$this->page->closeBlock();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$r1 = Database::fetchResult($q1);\n\t\t\t\n\t\t\t// build query for incoming links\n\t\t\t$t2 = 'SELECT tp.page_title';\n\t\t\t$t2 .= ' FROM page tp';\n\t\t\t$t2 .= ' INNER JOIN pagelinks t ON (tp.page_id = t.pl_from AND t.pl_title = ? AND t.pl_namespace = 0 AND t.pl_from_namespace = 0)';\n\t\t\t$t2 .= ' WHERE tp.page_is_redirect = 0';\n\t\t\t\n\t\t\t// execute query\n\t\t\t$q2 = $this->db->executePreparedQuery($t2, 's', $this->par['page']);\n\n\t\t\t// check for sql errors\n\t\t\tif (Database::checkSqlQueryObject($q2) === false) {\n\t\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t\t$this->page->addInline('p', 'SQL Error: ' . $this->db->error, 'iw-error');\n\t\t\t\t$this->page->closeBlock();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$r2 = Database::fetchResult($q2);\n\t\t\t\n\t\t\t$out = [];\n\t\t\t$inc = [];\n\t\t\t$common = [];\n\t\t\t$noback = [];\n\t\t\t$nolink = [];\n\t\t\tforeach ($r1 as $l1) {\n\t\t\t\t$out[] = $l1['pl_title'];\n\t\t\t}\n\t\t\tforeach ($r2 as $l2) {\n\t\t\t\t$inc[] = $l2['page_title'];\n\t\t\t}\n\t\t\t\n\t\t\t// get arrays\n\t\t\t$common = array_intersect($out, $inc);\n\t\t\t$noback = array_diff($out, $inc);\n\t\t\t$nolink = array_diff($inc, $out);\n\t\t\t\n\t\t\t// sort arrays\n\t\t\tsort($common);\n\t\t\tsort($noback);\n\t\t\tsort($nolink);\n\t\t\t\n\t\t\t// close queries\n\t\t\t$q1->close();\n\t\t\t$q2->close();\n\t\t\t\n\t\t\t// open statistics area\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('h2', 'Statistics');\n\t\t\t\n\t\t\t$this->page->addInline('p', 'Page conjunction for ' . Hgz::buildWikilink($this->par['lang'], $this->par['project'], $this->par['page'], str_replace('_', ' ', $this->par['page']))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t. ' (' . Hgz::buildWikilink($this->par['lang'], $this->par['project'], 'Special:Whatlinkshere/' . $this->par['page'], 'What links here') . ')');\n\t\t\t\n\t\t\t// statistics\n\t\t\t$this->page->openBlock('p');\n\t\t\t$this->page->openBlock('ul');\n\t\t\t$this->page->addInline('li', count($out) . ' links on this page');\n\t\t\t$this->page->addInline('li', count($inc) . ' links to this page');\n\t\t\t$this->page->addInline('li', '<a href=\"#noback\">' . count($noback) . ' links on this page without backlinks</a>');\n\t\t\t$this->page->addInline('li', '<a href=\"#nolink\">' . count($nolink) . ' incoming links without corresponding outgoing links</a>');\n\t\t\t$this->page->addInline('li', '<a href=\"#mutual\">' . count($common) . ' mutual links</a>');\n\t\t\t$this->page->closeBlock(2);\n\t\t\t\n\t\t\t// open result area\n\t\t\t$this->page->closeBlock();\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('h2', 'Results');\n\t\t\t\n\t\t\t// no backlinks\n\t\t\tif (count($noback) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"noback\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles linked from ' . str_replace('_', ' ', $this->par['page']) . ' with no backlinks:');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($noback as $v1) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v1, str_replace('_', ' ', $v1)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\n\t\t\t// no wikilinks\n\t\t\tif (count($nolink) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"nolink\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles with links to ' . str_replace('_', ' ', $this->par['page']) . ' but no links from here:');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($nolink as $v2) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v2, str_replace('_', ' ', $v2)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\n\t\t\t// common links\n\t\t\tif (count($common) != 0) {\n\t\t\t\t$this->page->addHTML('<span id=\"mutual\"></span>');\n\t\t\t\t$this->page->addInline('h3', 'Articles linked from ' . str_replace('_', ' ', $this->par['page']) . ' with backlinks (mutual links):');\n\t\t\t\t$this->page->openBlock('ul');\n\t\t\t\tforeach ($common as $v3) {\n\t\t\t\t\t$this->page->addInline('li', Hgz::buildWikilink($this->par['lang'], $this->par['project'], $v3, str_replace('_', ' ', $v3)));\n\t\t\t\t}\n\t\t\t\t$this->page->closeBlock();\n\t\t\t}\n\t\t\t\n\t\t\t// close result area\n\t\t\t$this->page->closeBlock();\n\t\t}", "function simplenews_admin_newsletter_form_submit($form, &$form_state) {\n //dpm($form_state);\n $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';\n if ($op == t('Delete')) {\n $form_state['redirect'] = 'admin/config/services/simplenews/categories/' . $form_state['values']['newsletter_id'] . '/delete';\n return;\n }\n\n $newsletter = $form_state['newsletter'];\n entity_form_submit_build_entity('simplenews_newsletter', $newsletter, $form, $form_state);\n\n switch (simplenews_newsletter_save($newsletter)) {\n case SAVED_NEW:\n drupal_set_message(t('Created new newsletter %name.', array('%name' => $newsletter->name)));\n watchdog('simplenews', 'Created new newsletter %name.', array('%name' => $newsletter->name, WATCHDOG_NOTICE, l(t('edit'), 'admin/config/services/simplenews/categories/' . $newsletter->newsletter_id . '/edit')));\n break;\n\n case SAVED_UPDATED:\n drupal_set_message(t('Updated newsletter %name.', array('%name' => $newsletter->name)));\n watchdog('simplenews', 'Updated newsletter %name.', array('%name' => $newsletter->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/config/services/simplenews/categories/' . $newsletter->newsletter_id . '/edit'));\n break;\n }\n\n $form_state['values']['newsletter_id'] = $newsletter->newsletter_id;\n $form_state['newsletter_id'] = $newsletter->newsletter_id;\n $form_state['redirect'] = 'admin/config/services/simplenews';\n}", "public function formSubmitHandler(Nette\\Application\\UI\\Form $form)\n\t{\n\t\t$this->receivedSignal = 'submit';\n\n\t\t// was form submitted?\n\t\tif ($form->isSubmitted()) {\n\t\t\t$values = $form->getValues();\n\n\t\t\tif ($form['filterSubmit']->isSubmittedBy()) {\n\t\t\t\t$this->handleFilter($values['filters']);\n\n\t\t\t} elseif ($form['pageSubmit']->isSubmittedBy()) {\n\t\t\t\t$this->handlePage($values['page']);\n\n\t\t\t} elseif ($form['itemsSubmit']->isSubmittedBy()) {\n\t\t\t\t$this->handleItems($values['items']);\n\n\t\t\t} elseif ($form['resetSubmit']->isSubmittedBy()) {\n\t\t\t\t$this->handleReset();\n\n\t\t\t} elseif ($form['operationSubmit']->isSubmittedBy()) {\n\t\t\t\tif (!is_array($this->onOperationSubmit)) {\n\t\t\t\t\tthrow new \\Nette\\InvalidStateException('No user defined handler for operations; assign valid callback to operations handler into DataGrid\\DataGrid::$operationsHandler variable.');\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthrow new \\Nette\\InvalidStateException('Unknown submit button.');\n\t\t\t}\n\n\t\t}\n\n\t\t$this->finalize();\n\t}", "public static function renderSubmit();", "function _dataone_admin_settings_submit($form, &$form_state) {\n global $base_url;\n\n // Let menu_execute_active_handler() know that a menu rebuild may be required.\n variable_set('menu_rebuild_needed', TRUE);\n\n // Register updated node document.\n drupal_set_message(t('Don\\'t forget to register your changes with DataONE'), 'warning');\n $register_url = $base_url . '/admin/config/services/dataone/register/';\n $selected_versions = variable_get(DATAONE_VARIABLE_API_VERSIONS);\n foreach ($selected_versions as $version => $label) {\n $register_version_url = $register_url . $version;\n drupal_set_message(t('Register @ver: !url', array('@ver' => $label, '!url' => $register_version_url)), 'warning');\n }\n\n}", "public function form_submission() {\n\n\t\t// Check to see if this is a new post or has already been created.\n\t\tif ( isset( $_POST['object_id'] ) && ( get_post_type( $_POST['object_id'] ) !== 'tm-events-entries' ) && ( $_POST['object_id'] < 0 ) ) {\n\t\t\tremove_query_arg( 'entry' );\n\t\t\twp_redirect( home_url( $path = 'nominate/entry' ) );\n\t\t}\n\n\t\t// If no form submission, bail.\n\t\tif ( empty( $_POST ) || ! isset( $_POST['submit-cmb'], $_POST['object_id'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if hidden form is present.\n\t\t// If it is then this has been submitted by a bot.\n\t\tif ( empty( $_POST ) || isset( $_POST['_nsa_entries_2016_hidden_check'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get CMB2 metabox object.\n\t\t$cmb = $this->get_current_form( $this->meta_prefix, 'fake-object-id' );\n\t\t$post_data = array();\n\n\t\t// Check security nonce.\n\t\tif ( ! isset( $_POST[ $cmb->nonce() ] ) || ! wp_verify_nonce( $_POST[ $cmb->nonce() ], $cmb->nonce() ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'security_fail', __( 'Security check failed.' ) ) );\n\t\t}\n\n\t\t// Check hidden box is NOT ticked.\n\t\tif ( ! isset( $_POST[ $cmb->nonce() ] ) || ! wp_verify_nonce( $_POST[ $cmb->nonce() ], $cmb->nonce() ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'security_fail', __( 'Security check failed.' ) ) );\n\t\t}\n\n\t\t// Check Post ID is valid.\n\t\t/*if ( (! is_int( $_POST['object_id'] ) ) || ( ! $_POST['object_id'] >= 0 ) || floor( $_POST['object_id'] ) !== $_POST['object_id'] ) {\n\t\t\treturn $cmb->prop( 'submission_error', new WP_Error( 'post_data_missing', __( 'Cannot submit your entry. Please try again' ) ) );\n\t\t}*/\n\n\t\t/**\n\t\t * Fetch sanitized values\n\t\t */\n\t\t$sanitized_values = $cmb->get_sanitized_values( $_POST );\n\n\t\t// Set our post data arguments.\n\t\t// If we are updating a post supply the id from our hidden field.\n\t\t$post_data['ID'] = absint( $_POST['object_id'] );\n\n\t\t$post_data['post_title'] = $sanitized_values['submitted_post_title'];\n\t\tunset( $sanitized_values['submitted_post_title'] );\n\t\t$post_data['post_content'] = '';\n\n\t\t// Set the post type we want to submit.\n\t\t$post_data['post_type'] = 'tm-events-entries';\n\t\t// Set the status of of post.\n\t\t$post_data['post_status'] = 'publish';\n\n\t\t// Create the new post.\n\t\t$new_submission_id = wp_insert_post( $post_data, true );\n\n\t\t// If we hit a snag, update the user.\n\t\tif ( is_wp_error( $new_submission_id ) ) {\n\t\t\treturn $cmb->prop( 'submission_error', $new_submission_id );\n\t\t} else {\n\n\t\t\t// Loop through remaining (sanitized) data, and save to post-meta.\n\t\t\tforeach ( $sanitized_values as $key => $value ) {\n\t\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t\t$value = array_filter( $value );\n\t\t\t\t\tif ( ! empty( $value ) ) {\n\t\t\t\t\t\tupdate_post_meta( $new_submission_id, $key, $value );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tupdate_post_meta( $new_submission_id, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove any previous entry query arguments.\n\t\t\tremove_query_arg( 'entry' );\n\n\t\t\t// Send confirmation email out.\n\t\t\t$confirm_email = $this->send_confirmation( $post_data['post_title'], $sanitized_values );\n\n\t\t\t/**\n\t\t\t * Redirect back to the form page with a query variable with the new post ID.\n\t\t\t * This will help double-submissions with browser refreshes\n\t\t\t */\n\t\t\twp_redirect(\n\t\t\t\tesc_url_raw(\n\t\t\t\t\tadd_query_arg(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'entry' => $new_submission_id,\n\t\t\t\t\t\t),\n\t\t\t\t\t\thome_url( '/nominate/confirm/' )\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\texit;\n\t\t}\n\n\t}", "function submit() {\n\t\tThesisHandler::setupTemplate();\n\n\t\t$journal = &Request::getJournal();\n\t\t$journalId = $journal->getJournalId();\n\n\t\t$thesisPlugin = &PluginRegistry::getPlugin('generic', 'ThesisPlugin');\n\n\t\tif ($thesisPlugin != null) {\n\t\t\t$thesesEnabled = $thesisPlugin->getEnabled();\n\t\t}\n\n\t\tif ($thesesEnabled) {\n\t\t\t$thesisPlugin->import('StudentThesisForm');\n\n\t\t\t$templateMgr = &TemplateManager::getManager();\n\t\t\t$templateMgr->append('pageHierarchy', array(Request::url(null, 'thesis'), 'plugins.generic.thesis.theses'));\n\t\t\t$thesisDao = &DAORegistry::getDAO('ThesisDAO');\n\n\t\t\t$thesisForm = &new StudentThesisForm();\n\t\t\t$thesisForm->initData();\n\t\t\t$thesisForm->display();\n\n\t\t} else {\n\t\t\t\tRequest::redirect(null, 'index');\n\t\t}\n\t}", "function guifi_domain_form_submit($form, &$form_state) {\n guifi_log(GUIFILOG_TRACE,'function guifi_domain_form_submit()',\n $form_state);\n\n if ($form_state['values']['id'])\n if (!guifi_domain_access('update',$form_state['values']['id']))\n {\n drupal_set_message(t('You are not authorized to edit this domain','error'));\n return;\n }\n\n switch ($form_state['clicked_button']['#value']) {\n case t('Reset'):\n drupal_set_message(t('Reset was pressed, ' .\n 'if there was any change, was not saved and lost.' .\n '<br />The domain information has been reloaded ' .\n 'from the current information available at the database'));\n drupal_goto('guifi/domain/'.$form_state['values']['id'].'/edit');\n break;\n case t('Save & continue edit'):\n case t('Save & exit'):\n\n $id = guifi_domain_save($form_state['values']);\n if ($form_state['clicked_button']['#value'] == t('Save & exit'))\n drupal_goto('guifi/domain/'.$id);\n drupal_goto('guifi/domain/'.$id.'/edit');\n break;\n default:\n guifi_log(GUIFILOG_TRACE,\n 'exit guifi_domain_form_submit without saving...',$form_state['clicked_button']['#value']);\n return;\n }\n\n}", "abstract public function _submitForm($form, $form_state);", "public function processForm(ServerData $server);", "function submit_all( $form ) {\n\n\t\t//$this->test();\n\t\t\n\t\t$this->submit_count( $form['doc_id'] );\n\n\t\t$this->submit_polls( $form['doc_id'], $form['google'], $form['salary'] );\n\n\t\t$this->submit_metrics( $form['doc_id'], $form['time_spent'], $form['histo'] );\n\n\t\tif( isset( $form['links']) ) {\n\n\t\t\t$this->submit_links( $form['doc_id'], $form['links'] );\n\n\t\t}\n\n\t}", "public function onSubmit();", "function handle($args)\n {\n parent::handle($args);\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $this->trySave();\n } else {\n $this->showForm();\n }\n }", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "function theme_node_form($form) {\n $output = \"\\n<div class=\\\"node-form\\\">\\n\";\n\n // Admin form fields and submit buttons must be rendered first, because\n // they need to go to the bottom of the form, and so should not be part of\n // the catch-all call to drupal_render().\n $admin = '';\n if (isset($form['author'])) {\n $admin .= \" <div class=\\\"authored\\\">\\n\";\n $admin .= drupal_render($form['author']);\n $admin .= \" </div>\\n\";\n }\n if (isset($form['options'])) {\n $admin .= \" <div class=\\\"options\\\">\\n\";\n $admin .= drupal_render($form['options']);\n $admin .= \" </div>\\n\";\n }\n $buttons = drupal_render($form['buttons']);\n\n // Everything else gets rendered here, and is displayed before the admin form\n // field and the submit buttons.\n $output .= \" <div class=\\\"standard\\\">\\n\";\n $output .= drupal_render($form);\n $output .= \" </div>\\n\";\n\n if (!empty($admin)) {\n $output .= \" <div class=\\\"admin\\\">\\n\";\n $output .= $admin;\n $output .= \" </div>\\n\";\n }\n $output .= $buttons;\n $output .= \"</div>\\n\";\n\n return $output;\n}", "function node_form_delete_submit($form, &$form_state) {\n $destination = '';\n if (isset($_REQUEST['destination'])) {\n $destination = drupal_get_destination();\n unset($_REQUEST['destination']);\n }\n $node = $form['#node'];\n $form_state['redirect'] = array('node/'. $node->nid .'/delete', $destination);\n}", "public function submit()\n {\n $this->waitFor(20000, function () {\n return $this->present();\n });\n $this->xpath($this->selectors['submit'])->click();\n $this->waitFor(20000, function () {\n return $this->xpath($this->selectors['formSubmitted']) !== null;\n });\n }", "public function getSetupForm() {\n\n /**\n * @todo find a beter way to do this\n */\n\n if(!empty($_POST['nodeId'])){\n $this->id = $_POST['nodeId'];\n }\n\n if (empty($this->id)) {\n $table = new HomeNet_Model_DbTable_Nodes();\n $this->id = $table->fetchNextId($this->house);\n }\n // $this->id = 50;\n\n $form = new HomeNet_Form_Node();\n $sub = $form->getSubForm('node');\n $id = $sub->getElement('node');\n $id->setValue($this->id);\n \n $table = new HomeNet_Model_DbTable_Nodes();\n $rows = $table->fetchAllInternetNodes();\n\n $uplink = $sub->getElement('uplink');\n\n foreach($rows as $value){\n $uplink->addMultiOption($value->id, $value->id);\n }\n\n\n return $form;\n }", "protected function processForm(sfWebRequest $request, sfForm $form) {\n $collectionId = sfToolkit::getArrayValueForPath($form->getName(), 'parent_node_id');\n $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));\n if ($form->isValid()) {\n $asset_group = $form->save();\n\n $this->redirect('assetgroup/edit?id=' . $asset_group->getId() . '&c=' . $form->getOption('collectionID'));\n }\n }", "function handlePOSTRequest() {\n if (array_key_exists('submitProjectionRequest', $_POST)) {\n handleProjectionRequest();\n }\n }", "function saveSubmit($args, $request) {\n\t\t$step = (int) array_shift($args);\n\t\t$articleId = (int) $request->getUserVar('articleId');\n\t\t$journal =& $request->getJournal();\n\n\t\t$this->validate($request, $articleId, $step);\n\t\t$this->setupTemplate($request, true);\n\t\t$article =& $this->article;\n\n\t\t$formClass = \"AuthorSubmitStep{$step}Form\";\n\t\timport(\"classes.author.form.submit.$formClass\");\n\n\t\t$submitForm = new $formClass($article, $journal, $request);\n\t\t$submitForm->readInputData();\n\n\t\tif (!HookRegistry::call('SubmitHandler::saveSubmit', array($step, &$article, &$submitForm))) {\n\n\t\t\t// Check for any special cases before trying to save\n\t\t\tswitch ($step) {\n\t\t\t\tcase 2:\n\t\t\t\t\tif ($request->getUserVar('uploadSubmissionFile')) {\n\t\t\t\t\t\t$submitForm->uploadSubmissionFile('submissionFile');\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tif ($request->getUserVar('addAuthor')) {\n\t\t\t\t\t\t// Add a sponsor\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\t\t\t\t\t\tarray_push($authors, array());\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\n\t\t\t\t\t} else if (($delAuthor = $request->getUserVar('delAuthor')) && count($delAuthor) == 1) {\n\t\t\t\t\t\t// Delete an author\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\tlist($delAuthor) = array_keys($delAuthor);\n\t\t\t\t\t\t$delAuthor = (int) $delAuthor;\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\t\t\t\t\t\tif (isset($authors[$delAuthor]['authorId']) && !empty($authors[$delAuthor]['authorId'])) {\n\t\t\t\t\t\t\t$deletedAuthors = explode(':', $submitForm->getData('deletedAuthors'));\n\t\t\t\t\t\t\tarray_push($deletedAuthors, $authors[$delAuthor]['authorId']);\n\t\t\t\t\t\t\t$submitForm->setData('deletedAuthors', join(':', $deletedAuthors));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_splice($authors, $delAuthor, 1);\n\t\t\t\t\t\t$submitForm->setData('authors', $authors);\n\n\t\t\t\t\t\tif ($submitForm->getData('primaryContact') == $delAuthor) {\n\t\t\t\t\t\t\t$submitForm->setData('primaryContact', 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ($request->getUserVar('moveAuthor')) {\n\t\t\t\t\t\t// Move an author up/down\n\t\t\t\t\t\t$editData = true;\n\t\t\t\t\t\t$moveAuthorDir = $request->getUserVar('moveAuthorDir');\n\t\t\t\t\t\t$moveAuthorDir = $moveAuthorDir == 'u' ? 'u' : 'd';\n\t\t\t\t\t\t$moveAuthorIndex = (int) $request->getUserVar('moveAuthorIndex');\n\t\t\t\t\t\t$authors = $submitForm->getData('authors');\n\n\t\t\t\t\t\tif (!(($moveAuthorDir == 'u' && $moveAuthorIndex <= 0) || ($moveAuthorDir == 'd' && $moveAuthorIndex >= count($authors) - 1))) {\n\t\t\t\t\t\t\t$tmpAuthor = $authors[$moveAuthorIndex];\n\t\t\t\t\t\t\t$primaryContact = $submitForm->getData('primaryContact');\n\t\t\t\t\t\t\tif ($moveAuthorDir == 'u') {\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex] = $authors[$moveAuthorIndex - 1];\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex - 1] = $tmpAuthor;\n\t\t\t\t\t\t\t\tif ($primaryContact == $moveAuthorIndex) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex - 1);\n\t\t\t\t\t\t\t\t} else if ($primaryContact == ($moveAuthorIndex - 1)) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex);\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$authors[$moveAuthorIndex] = $authors[$moveAuthorIndex + 1];\n\t\t\t\t\t\t\t\t$authors[$moveAuthorIndex + 1] = $tmpAuthor;\n\t\t\t\t\t\t\t\tif ($primaryContact == $moveAuthorIndex) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex + 1);\n\t\t\t\t\t\t\t\t} else if ($primaryContact == ($moveAuthorIndex + 1)) {\n\t\t\t\t\t\t\t\t\t$submitForm->setData('primaryContact', $moveAuthorIndex);\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$submitForm->setData('authors', $authors);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\tif ($request->getUserVar('submitUploadSuppFile')) {\n\t\t\t\t\t\t$this->submitUploadSuppFile(array(), $request);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!isset($editData) && $submitForm->validate()) {\n\t\t\t\t$articleId = $submitForm->execute();\n\t\t\t\tHookRegistry::call('Author::SubmitHandler::saveSubmit', array(&$step, &$article, &$submitForm));\n\n\t\t\t\tif ($step == 5) {\n\t\t\t\t\t// Send a notification to associated users\n\t\t\t\t\timport('classes.notification.NotificationManager');\n\t\t\t\t\t$notificationManager = new NotificationManager();\n\t\t\t\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\n\t\t\t\t\t$article =& $articleDao->getArticle($articleId);\n\t\t\t\t\t$roleDao =& DAORegistry::getDAO('RoleDAO');\n\t\t\t\t\t$notificationUsers = array();\n\t\t\t\t\t$editors = $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getId());\n\t\t\t\t\twhile ($editor =& $editors->next()) {\n\t\t\t\t\t\t$notificationManager->createNotification(\n\t\t\t\t\t\t\t$request, $editor->getId(), NOTIFICATION_TYPE_ARTICLE_SUBMITTED,\n\t\t\t\t\t\t\t$article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId()\n\t\t\t\t\t\t);\n\t\t\t\t\t\tunset($editor);\n\t\t\t\t\t}\n\n\t\t\t\t\t$journal =& $request->getJournal();\n\t\t\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t\t\t$templateMgr->assign_by_ref('journal', $journal);\n\t\t\t\t\t// If this is an editor and there is a\n\t\t\t\t\t// submission file, article can be expedited.\n\t\t\t\t\tif (Validation::isEditor($journal->getId()) && $article->getSubmissionFileId()) {\n\t\t\t\t\t\t$templateMgr->assign('canExpedite', true);\n\t\t\t\t\t}\n\t\t\t\t\t$templateMgr->assign('articleId', $articleId);\n\t\t\t\t\t$templateMgr->assign('helpTopicId','submission.index');\n\t\t\t\t\t$templateMgr->display('author/submit/complete.tpl');\n\n\t\t\t\t} else {\n\t\t\t\t\t$request->redirect(null, null, 'submit', $step+1, array('articleId' => $articleId));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$submitForm->display();\n\t\t\t}\n\t\t}\n\t}", "function submit_form($form)\n {\n }", "function submit($data, $form, $request) {\n\t\treturn $this->processForm($data, $form, $request, \"\");\n\t}", "function submit($data, $form, $request) {\n\t\treturn $this->processForm($data, $form, $request, \"\");\n\t}", "function handleFormSubmit($mode = null){\r\n\t\tif(!$this->buttons->isInit()){\r\n\t\t\t$this->buttons->createDefault();\r\n\t\t}\r\n\r\n// \t\t$this->fillWithData(null, true);\r\n\r\n\t\tif(!OBE_Http::isPostIs('_uid', $this->uid)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\t$ret = $this->isSubmit();\r\n\t\t\tif($ret === true){ // prisel submit\r\n\t\t\t\tif($data = $this->validate()){\r\n\t\t\t\t\t$this->fields->fillWithData($data); // handle access pre\r\n\t\t\t\t\tif(empty($this->errors)){\r\n\t\t\t\t\t\t$this->bSave = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn $this->getData(); // handle access post\r\n\t\t\t\t}\r\n\t\t\t}else if($ret === false){ // prisel cancel smazeme\r\n\t\t\t\t$this->fillWithData(null, true);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}catch(EFormEnd $e){\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "function dirtag_cms_form_action (&$this, $args)\n{\n $ui =& $app->ui;\n\n return $ui->url (new event ('form_parser'));\n}", "public function cs_generate_form() {\n global $post;\n }", "protected function onSubmit()\r {\r }", "function pickup_submit()\n\t{\n\t\t$year = $this->name . '_year';\n\t\t$month = $this->name . '_month';\n\t\t$day = $this->name . '_day';\n\t\tglobal $$year, $$month, $$day;\n\n\t\t$this->value = $$year . \".\" . $$month . \".\" . $$day;\n\t}", "public function public_form_response_handler() {\n\n\t\t$nonce = $_POST['_wpnonce'];\n if (!wp_verify_nonce( $nonce, 'submit_coinqvest_checkout_8b%kj@')) {\n exit; // Get out of here, the nonce is rotten!\n }\n\n\t\t$this->checkout_form = new Checkout_Form($this->plugin_name_url);\n\t\t$this->checkout_form->process_checkout();\n\n\t}", "function envision_wsclient_pane_checkout_form_submit($form, &$form_state, $checkout_pane, $order) {\n\n}", "protected function OnSubmit()\n {\n //tu codigo aqui\n }", "public function _report_form_submit()\n\t{\n\t\t$incident = Event::$data;\n\n\t\tif ($_POST)\n\t\t{\n\t\t\t$action_item = ORM::factory('actionable')\n\t\t\t\t->where('incident_id', $incident->id)\n\t\t\t\t->find();\n\t\t\t$action_item->incident_id = $incident->id;\n\t\t\t$action_item->actionable = isset($_POST['actionable']) ?\n\t\t\t\t$_POST['actionable'] : \"\";\n\t\t\t$action_item->action_taken = isset($_POST['action_taken']) ?\n\t\t\t\t$_POST['action_taken'] : \"\";\n\t\t\t$action_item->action_summary = $_POST['action_summary'];\n\t\t\t$action_item->save();\n\n\t\t}\n\t}", "public function formSubmit() {\n\n check_admin_referer('ncstate-wrap-authentication');\n\n $newOptions = array(\n 'autoCreateUser' => (bool)$_POST['nwa_autoCreateUser'],\n );\n\n update_option('ncstate-wrap-authentication', $newOptions);\n\n wp_safe_redirect(add_query_arg('updated', 'true', wp_get_referer()));\n }", "function mongo_node_bundle_edit_form($form, $form_state, $entity_type, $bundle) {\n\n $set = mongo_node_settings();\n\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#default_value' => $set[$entity_type]['bundles'][$bundle]['label'],\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#default_value' => $bundle,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $description = isset($set[$entity_type]['bundles'][$bundle]['description']) ? $set[$entity_type]['bundles'][$bundle]['description'] : '';\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $description,\n '#description' => t('Describe this bundle.'),\n );\n\n // Save entity type and bundle.\n $form['bundle_type'] = array(\n '#type' => 'value',\n '#value' => array(\n 'entity_type' => $entity_type,\n 'bundle' => $bundle,\n ),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function legal_document_content_type_edit_form_submit($form, &$form_state) {\n $form_state['conf']['document'] = $form_state['values']['document'];\n $form_state['conf']['agree'] = $form_state['values']['agree'];\n $form_state['conf']['admin_title'] = $form_state['values']['admin_title'];\n}", "public function test_formNodeAdded() : void\n {\n $form = $this->createForm();\n $form->onFormNodeAdded(array($this, 'callback_formNodeAdded'));\n $form->onNodeAdded(array($this, 'callback_nodeAdded'));\n\n $form->addText('foo');\n\n $this->assertTrue($this->formEventCalled);\n $this->assertTrue($this->containerEventCalled);\n }", "public function callbackSubmit()\n {\n $subject = $this->form->value(\"subject\");\n $text = $this->form->value(\"text\");\n $tags = \\preg_split('/[^\\w]+/u', $this->form->value(\"tags\"));\n\n $user = $this->di->get('user');\n\n if ($this->post->authorId != $user->id && !$user->isLevel(UserLevels::ADMIN)) {\n $this->di->get('flash')->setFlash(\"Nu är det nått skumt på gång...\", \"flash-warning\");\n return false;\n }\n\n $this->posts->upsert($this->post->id, $subject, $text, $tags);\n $this->di->get('flash')->setFlash(\"\\\"{$subject}\\\", har ändrats.\", \"flash-success\");\n\n return true;\n }", "public function submit() {\n $post = Post::submit();\n require_once('view/posts/submit.php');\n \n \n }", "public function callbackSubmit()\n {\n $answer = new Answer();\n $answer->setDb($this->di->get(\"dbqb\"));\n\n $filter = new TextFilter();\n\n $answer->title = $this->form->value(\"title\");\n $answer->body = $filter->doFilter($this->form->value(\"body\"), \"markdown\");\n $answer->questionid = $this->form->value(\"questionid\");\n $answer->userid = $this->form->value(\"userid\");\n $answer->save();\n\n // Update user rank - 3points for an answer\n $user = new User();\n $user->setDb($this->di->get(\"dbqb\"));\n $user->updateRank($answer->userid, 3);\n\n return true;\n }", "public function init()\n {\n $this->setMethod('post');\n \n $this->addElement('select', 'parentId', array(\n 'label' => 'Parent:',\n 'required' => true,\n \t'multioptions' => $this->_tree->getForm($this->_node->getId()),\n \t'value'\t=> array($this->_node->getParentId())\n ));\n \n $this->addElement('text', 'nodeName', array(\n 'label' => 'Titel ',\n 'required' => true,\n \t'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 30))\n ),\n 'value'\t=> ''.$this->_node->getNodeName()\n ));\n \n $this->addElement('text', 'nodeValue', array(\n 'label' => 'Link Url ',\n 'required' => true,\n \t'validators' => array(\n array('validator' => 'StringLength', 'options' => array(0, 30))\n ),\n 'value'\t=> ''.$this->_node->getNodeValue()\n ));\n \n \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Submit',\n ));\n\n }", "public function populateFromDOMNode(\\DOMElement $formNode) {\r\n foreach (array('name', 'id', 'class', 'action', 'enctype') as $attr) {\r\n $this->$attr = $formNode->hasAttribute($attr) ? $formNode->getAttribute($attr) : null;\r\n }\r\n $this->method = strtolower($formNode->getAttribute('method'));\r\n\r\n foreach ($this->search('.//input', $formNode) as $input) {\r\n $n = $this->getAttribute($input, 'name');\r\n //if ($n == '') continue;\r\n $v = $this->getAttribute($input, 'value');\r\n $typeAttr = $this->getAttribute($input, 'type');\r\n $type = ($typeAttr == null || $typeAttr == 'input') ? 'text' :\r\n preg_replace('/[^a-z]/', '', strtolower($this->getAttribute($input, 'type')));\r\n if (!in_array($type, self::supportedInputTypes())) {\r\n $this->warn(\"Found input field with unrecognized type, '$type'\");\r\n }\r\n if ($type == 'radio') {\r\n $value = $v === null ? \"on\" : $v; # Default value of \"on\" is used by web browsers\r\n if (empty($this->fields[$n])) {\r\n $field = $this->addField($n, new HtmlRadioButtonField());\r\n }\r\n $field->options[$value] = $value;\r\n $subField = new HtmlFormField(null, $value, $input);\r\n $field->optionLabels[$value] = $this->getLabel(null, $subField);\r\n $field->textAfter[$value] = $input->nextSibling ?\r\n trim($this->normalizeSpace($input->nextSibling->textContent)) : null;\r\n if ($this->getAttribute($input, 'checked')) {\r\n $field->value = $value;\r\n }\r\n $field->xmlNode = $input;\r\n } else if ($type == 'checkbox') {\r\n if ($v === null) $v = 'on'; // Default value of \"on\" is used by web browsers\r\n $isChecked = $this->getAttribute($input, 'checked') ? true : false;\r\n $this->addField($n, new HtmlCheckboxField($isChecked, $v, $input));\r\n } else if ($type == 'submit') {\r\n $field = $this->addField($n, new HtmlButtonField('submit', $v, $input));\r\n $field->buttonText = $v;\r\n } else if ($type == 'image') {\r\n $field = $this->addField($n, new HtmlButtonField('image', $v, $input));\r\n $field->buttonText = null;\r\n } else if ($type == 'button') {\r\n // XXX: How should <input type=\"button\" ... /> fields be dealt with ???\r\n } else {\r\n $this->addField($n, new HtmlTextField($type, $v === null ? '' : $v, $input));\r\n }\r\n }\r\n\r\n foreach ($this->search('.//select', $formNode) as $select) {\r\n $name = $select->getAttribute('name');\r\n if ($name == '') continue;\r\n $options = array();\r\n $defaultValue = null;\r\n foreach ($this->search('.//option', $select) as $option) {\r\n $innerContent = trim($this->normalizeSpace($option->textContent));\r\n $thisOptionValue = $this->getAttribute($option, 'value');\r\n if ($thisOptionValue === null) { $thisOptionValue = $innerContent; }\r\n if ($option->getAttribute('selected')) {\r\n $defaultValue = $thisOptionValue;\r\n } else if ($defaultValue === null) {\r\n $defaultValue = $thisOptionValue;\r\n }\r\n $options[$thisOptionValue] = $innerContent;\r\n }\r\n //if ($defaultValue === null) { $defaultValue = keys($options)[0]; }\r\n $this->addField($name, new HtmlSelectField($options, $defaultValue, $select));\r\n //$this->fields[$name]->xmlNode = $select;\r\n }\r\n\r\n foreach ($this->search('.//textarea', $formNode) as $textarea) {\r\n $name = $textarea->getAttribute('name');\r\n if ($name == '') continue;\r\n $this->addField($name, new HtmlFormField('textarea', $textarea->textContent, $textarea));\r\n //$this->fields[$name]->xmlNode = $textarea;\r\n }\r\n\r\n foreach ($this->search('.//button', $formNode) as $button) {\r\n $n = $this->getAttribute($button, 'name');\r\n //if ($n == '') continue;\r\n $v = $this->getAttribute($button, 'value');\r\n $t = $this->getAttribute($button, 'type');\r\n $type = $t ? $t : 'submit';\r\n $f = new HtmlButtonField($type, $v, $button);\r\n $f->buttonText = $button->textContent;\r\n $this->addField($n, $f);\r\n }\r\n\r\n foreach ($this->fields as $n => $f) {\r\n $this->fields[$n]->label = $this->getLabel($n, $f);\r\n }\r\n }", "public static function run () {\n\t\t\t$form = new FormHandler();\n\n\t\t\t$form->addValuesArray($_POST);\n\n\t\t\t# Add all the fields\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'title', \n\t\t\t\t'title'\t\t=> Lang::get('Site Title'),\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'url', \n\t\t\t\t'title'\t\t=> Lang::get('URL'),\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'thumb_url', \n\t\t\t\t'title'\t\t=> Lang::get('URL to Thumbnail')\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'content', \n\t\t\t\t'title'\t\t=> Lang::get('Description'), \n\t\t\t\t'type'\t\t=> 'textarea',\n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'author', \n\t\t\t\t'title'\t\t=> Lang::get('Your Name'), \n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'email', \n\t\t\t\t'title'\t\t=> Lang::get('And E-mail'), \n\t\t\t\t'required'\t=> true\n\t\t\t));\n\t\t\t$form->addField(array(\n\t\t\t\t'name'\t\t=> 'add_site_submit', \n\t\t\t\t'type'\t\t=> 'hidden', \n\t\t\t\t'value'\t\t=> '1'\n\t\t\t));\n\n\t\t\t# User is submitting form\n\t\t\t# Make sure form is valid (true => check for spam as well)\n\t\t\tif (isset($_POST['add_site_submit']) and $form->validate(true)) {\n\t\t\t\t# Add new site\n\t\t\t\tSites::insert(array(\n\t\t\t\t\t'author'\t\t=> $_POST['author'], \n\t\t\t\t\t'email'\t\t\t=> $_POST['email'], \n\t\t\t\t\t'title'\t\t\t=> $_POST['title'], \r\n\t\t\t\t\t'content'\t\t=> $_POST['content'], \r\n\t\t\t\t\t'thumb_url'\t\t=> isset($_POST['thumb_url']) ? $_POST['thumb_url'] : '', \r\n\t\t\t\t\t'url'\t\t\t=> $_POST['url'], \r\n\t\t\t\t\t'url_str'\t\t=> Router::urlize($_POST['title']), \n\t\t\t\t\t'pub_date'\t\t=> date('Y-m-d H:i:s')\n\t\t\t\t));\n\n\t\t\t\t# Redirect after POST\n\t\t\t\tredirect('?added_site');\r\n\t\t\t}\n\n\t\t\t# Form has been submitted\n\t\t\tif (isset($_GET['added_site'])) {\n\t\t\t\tself::$tplFile = 'ThankYou';\n\t\t\t}\n\t\t\t# Form has NOT been submitted\n\t\t\telse {\n\t\t\t\t# Assign form HTML to template vars\n\t\t\t\tself::$tplVars['form_html'] = $form->asHTML();\n\t\t\t}\n\t\t}", "function bbl_admin_award_SPP_1_submit($form, &$form_state) {\n $node_id = $form_state['values']['team_selected'];\n drupal_goto('bbl/' . $node_id . '/award');\n \n}", "function mongo_node_bundle_create_form($form, $form_state, $entity_type) {\n $form = array();\n\n $form['label'] = array(\n '#type' => 'textfield',\n '#title' => t('Entity type'),\n '#description' => t('The human readable name of the entity.'),\n );\n\n $form['name'] = array(\n '#type' => 'machine_name',\n '#required' => FALSE,\n '#machine_name' => array(\n 'exists' => '_mongo_node_bundle_exists',\n 'source' => array('label'),\n ),\n );\n\n $form['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#description' => t('Describe this bundle.'),\n );\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "function scfnode_form_add_association(&$form_state, $nid, $name) {\n $form = array();\n /*$form['cancel'] = array(\n '#type' => 'image_button',\n '#src' => drupal_get_path('module', 'scf') . '/images/icon-x.gif',\n '#attributes' => array(\n 'onclick' => \"$('#association-addtermdiv-\" . $name . \"').slideUp('slow');return false;\"\n ),\n '#executes_submit_callback' => FALSE,\n '#title' => 'Close'\n );*/\n \n /*$form['caption'] = array(\n '#type' => 'markup',\n '#value' => t('Add new term:')\n );*/\n \n $form['textfield'] = array(\n '#type' => 'textfield',\n '#autocomplete_path' => $name . '/autocomplete/title',\n '#size' => 20,\n '#id' => 'association-' . $name . '-text',\n '#name' => 'textfield',\n );\n $form['add'] = array(\n '#type' => 'button',\n '#value' => t('Add'),\n '#ahah' => array(\n 'path' => 'association/ajax/add/' . $nid . '/' . $name . '/',\n 'wrapper' => 'association-list-' . $name,\n 'event' => 'click',\n 'effect' => 'slide',\n 'method' => 'append',\n 'progress' => 'none',\n ),\n '#executes_submit_callback' => FALSE\n );\n \n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $nid\n );\n return $form;\n }", "public function postSubmit(FormEvent $event)\n {\n if (!$event->getForm()->isRoot()) {\n return;\n }\n\n // Only act if the form is valid\n if (!$event->getForm()->isValid()) {\n return;\n }\n\n $data = $event->getForm()->getData();\n\n $this->sendNotifications($this->replaceOptionValueWithText($event->getForm(), $data));\n\n $this->setFlashes();\n\n $this->writeToContentype($data);\n\n foreach ($this->flashes as $flash) {\n $this->app['session']->getFlashBag()->set($flash['type'], $flash['message']);\n }\n }", "public function formAction() {}", "function lendingform_submit_ajax_callback($form, &$form_state) { \r\n \r\n if (!form_get_errors()) {\r\n global $base_url;\r\n $lendingform = $form_state['lendingform'];\r\n $gid = $lendingform->gid;\r\n \r\n $redirect_url = $base_url.\"/lendingform/\".$pid;\r\n// $redirect_url = lendingform_view9_get_urlname($pid);\r\n $commands = array();\r\n $commands[] = ajax_command_invoke(NULL, \"lendingformRedirect\", array($redirect_url)); \r\n return array('#type' => 'ajax', '#commands' => $commands);\r\n } else {\r\n $error = form_get_errors();\r\n $commands = array();\r\n if (isset($error['title'])) {\r\n $commands[] = ajax_command_invoke('#edit-title', addClass, array('error'));\r\n }\r\n \r\n form_clear_error();\r\n unset($_SESSION['messages']['error']);\r\n\r\n //$commands[] = ajax_command_invoke('#mrd_1', 'click');\r\n return array('#type' => 'ajax', '#commands' => $commands);\r\n }\r\n}", "function opensky_upload_form_submit (array $form, array &$form_state) {\n extract($form_state['values']);\n\n $object = islandora_object_load($pid);\n\n try {\n $datastream = $object->constructDatastream($dsid, 'M');\n $datastream->label = 'PDF Datastream';\n $datastream->mimetype = 'application/pdf';\n $file = file_load($file);\n $path = drupal_realpath($file->uri);\n $datastream->setContentFromFile($path);\n\n $object->ingestDatastream($datastream);\n\n opensky_add_usage_and_version_elements_to_mods($object, $usage, $version);\n }\n catch (Exception $e) {\n drupal_set_message(t('@message', array('@message' => check_plain($e->getMessage()))), 'error');\n }\n}", "function thumbwhere_contentcollection_edit_form_submit(&$form, &$form_state) {\n\n $thumbwhere_contentcollection = entity_ui_controller('thumbwhere_contentcollection')->entityFormSubmitBuildEntity($form, $form_state);\n // Save the thumbwhere_contentcollection and go back to the list of thumbwhere_contentcollections\n\n // Add in created and changed times.\n if ($thumbwhere_contentcollection->is_new = isset($thumbwhere_contentcollection->is_new) ? $thumbwhere_contentcollection->is_new : 0) {\n $thumbwhere_contentcollection->created = time();\n }\n\n $thumbwhere_contentcollection->changed = time();\n\n $thumbwhere_contentcollection->save($transaction);\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollections';\n}" ]
[ "0.7229615", "0.67927057", "0.6580903", "0.6456499", "0.6303718", "0.624416", "0.6215408", "0.6187164", "0.61237925", "0.60917765", "0.6072781", "0.6052198", "0.6030238", "0.60244405", "0.5989919", "0.5971032", "0.5894369", "0.5832111", "0.58249694", "0.57996845", "0.57809097", "0.57748276", "0.57695895", "0.57358074", "0.5718472", "0.5713914", "0.5694909", "0.5676379", "0.56579643", "0.5650627", "0.56353176", "0.5624807", "0.5624807", "0.5624807", "0.56225336", "0.5613049", "0.56062394", "0.56024647", "0.5588972", "0.5583991", "0.55537885", "0.55491185", "0.55472857", "0.5544624", "0.55313057", "0.5519956", "0.55043817", "0.5487585", "0.5486239", "0.54764", "0.54700404", "0.54565895", "0.5447701", "0.54459816", "0.5443701", "0.543582", "0.54259247", "0.5410133", "0.5378881", "0.5376964", "0.5372639", "0.5368705", "0.535823", "0.53565246", "0.5347039", "0.53441596", "0.5341325", "0.533309", "0.53250337", "0.5320915", "0.5304348", "0.5297349", "0.5297349", "0.5293777", "0.52841204", "0.52686965", "0.5258748", "0.52563673", "0.5254644", "0.52529895", "0.5251067", "0.524992", "0.5223831", "0.52176124", "0.5208783", "0.5199564", "0.5199331", "0.5196863", "0.519416", "0.5191621", "0.5191333", "0.5183329", "0.5176429", "0.51708096", "0.5169897", "0.51471996", "0.51439685", "0.51438206", "0.5142488", "0.5141782" ]
0.781233
0
Menu callback; Generate an array for rendering the given entity.
function mongo_node_page_view($entity_type, $entity, $langcode = NULL) { if (!isset($langcode)) { $langcode = $GLOBALS['language_content']->language; } $controller = entity_get_controller($entity_type); $title = $entity->title; drupal_set_title($title); // Allow modules to change the view mode. $view_mode = 'full'; $context = array( 'entity_type' => $entity_type, 'entity' => $entity, 'langcode' => $langcode, ); drupal_alter('entity_view_mode', $view_mode, $context); $content = array(); list($id, ,) = entity_extract_ids($entity_type, $entity); $content = $controller->view(array($id => $entity), $view_mode); return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildMenuArray() {}", "private function getMenuArrayRender()\n {\n $this->load->model('Menu_Model', \"menuModel\");\n $this->menuModel->setControllerName($this->_controllerName);\n return $this->menuModel->getMenuArray();\n }", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "public abstract function getMenuData(): array;", "abstract public function getMenuData();", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = new Menu();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entitiesAtivo' => $this->get('admin_menu.service.menu')->getMenusAtivo(),\n 'entitiesInativo' => $this->get('admin_menu.service.menu')->getMenusInativo(),\n 'form' => $form->createView(),\n );\n\n }", "function Menu_Rendering($menu) {\r\n}", "private function getMenuObjectRender()\n {\n return (object)$this->getMenuArrayRender();\n }", "protected function generateModuleMenu() {}", "public function render() {\n\n\n return $this->makeMenu();\n\n\n }", "public function menuAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n \n $tipoTribunales = $em->getRepository('INHack20ControlDistribucionBundle:TribunalTipo')->findAll();\n \n return array('tipoTribunales' => $tipoTribunales);\n }", "function entity_lists_admin_menu(\\Elgg\\Event $event) {\n if (!elgg_in_context('admin')) {\n return null;\n }\n \n /* @var $return MenuItems */\n $result = $event->getValue();\n \n $result[] = \\ElggMenuItem::factory([\n 'name' => 'entity_lists',\n 'text' => elgg_echo('admin:entity_lists'),\n 'href' => false,\n ]);\n\n if (EntityListsOptions::isUserEnabled()) { \n $result[] = \\ElggMenuItem::factory([\n 'name' => 'entity_lists:user',\n 'href' => elgg_normalize_url(\"admin/entity_lists/user\"),\n 'text' => elgg_echo(\"item:user\"),\n 'parent_name' => 'entity_lists',\n ]); \n }\n \n if (EntityListsOptions::isGroupEnabled()) { \n $result[] = \\ElggMenuItem::factory([\n 'name' => \"entity_lists:group\",\n 'href' => elgg_normalize_url(\"admin/entity_lists/group\"),\n 'text' => elgg_echo(\"item:group\"),\n 'parent_name' => 'entity_lists',\n ]);\n }\n \n if ($enables_types = EntityListsOptions::getEnabledEntities()) {\n foreach ($enables_types as $key => $e) { \n $result[] = \\ElggMenuItem::factory([\n 'name' => \"entity_lists:{$e}\",\n 'href' => elgg_normalize_url(\"admin/entity_lists/object?e={$e}\"),\n 'text' => elgg_echo(\"item:object:{$e}\"),\n 'parent_name' => 'entity_lists',\n ]);\n }\n } \n \n return $result;\n}", "function getMenuItems()\n {\n }", "function __renderEntity($entity,$action,$data){\r\n\tTemplate::getInstance()->renderEntity($entity,$action,$data);\r\n}", "public function getMenus() {}", "public function makeMenu() {}", "public function getMenu();", "public function getEntities(): array;", "public static function returnMenu() {\n return array(\n array(\n 'title' => 'Eve - лица',\n 'link' => self::$group . '/' . 'faces',\n 'class' => 'fa-list-alt',\n 'permit' => 'view',\n ),\n );\n }", "function model_entity_menu_setup($hook, $type, $return, $params) {\n\tif (elgg_in_context('widgets')) {\n\t\treturn $return;\n\t}\n\n\t$entity = $params['entity'];\n\t$handler = elgg_extract('handler', $params, false);\n\tif ($handler != 'model') {\n\t\treturn $return;\n\t}\n\n\tif ($entity->status != 'published') {\n\t\t// draft status replaces access\n\t\tforeach ($return as $index => $item) {\n\t\t\tif ($item->getName() == 'access') {\n\t\t\t\tunset($return[$index]);\n\t\t\t}\n\t\t}\n\n\t\t$status_text = elgg_echo(\"status:{$entity->status}\");\n\t\t$options = array(\n\t\t\t'name' => 'published_status',\n\t\t\t'text' => \"<span>$status_text</span>\",\n\t\t\t'href' => false,\n\t\t\t'priority' => 150,\n\t\t);\n\t\t$return[] = ElggMenuItem::factory($options);\n\t}\n\n\treturn $return;\n}", "protected function makeActionMenu() {}", "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 }", "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 function run()\n {\n \\RestoApp\\Entities\\Menu::create(['id' => 1, 'textMenu' => 'db_menu.menuprincipal', 'urlMenu' => '/app/dashboard', 'iconMenu' => 'icon-home']);\n \\RestoApp\\Entities\\Menu::create(['id' => 2, 'textMenu' => 'db_menu.pedidos', 'urlMenu' => '/app/dashboard', 'iconMenu' => 'icon-puzzle']);\n \\RestoApp\\Entities\\Menu::create(['id' => 3, 'textMenu' => 'db_menu.novopedido', 'urlMenu' => '/app/pedidos/create', 'idMenuPai' => 2]);\n \\RestoApp\\Entities\\Menu::create(['id' => 4, 'textMenu' => 'db_menu.pedidosemaberto', 'urlMenu' => '/app/dashboard', 'idMenuPai' => 2]);\n \\RestoApp\\Entities\\Menu::create(['id' => 5, 'textMenu' => 'db_menu.relatoriodiario', 'urlMenu' => '/app/dashboard', 'idMenuPai' => 2]);\n \\RestoApp\\Entities\\Menu::create(['id' => 6, 'textMenu' => 'db_menu.produtos', 'urlMenu' => '/app/dashboard', 'iconMenu' => 'glyphicon glyphicon-th-list']);\n \\RestoApp\\Entities\\Menu::create(['id' => 7, 'textMenu' => 'db_menu.gerenciarprodutos', 'urlMenu' => '/app/dashboard', 'idMenuPai' => 6]);\n \\RestoApp\\Entities\\Menu::create(['id' => 8, 'textMenu' => 'db_menu.tiposdeprodutos', 'urlMenu' => '/app/dashboard', 'idMenuPai' => 6]);\n\n\n \\RestoApp\\Entities\\Menu::create(['id' => 9, 'textMenu' => 'db_menu.cardapio', 'urlMenu' => '/app/cardapio', 'iconMenu' => 'glyphicon glyphicon-list-alt']);\n \\RestoApp\\Entities\\Menu::create(['id' => 10, 'idMenuPai' => 9, 'textMenu' => 'db_menu.novocardapio', 'urlMenu' => '/app/cardapio/create', 'iconMenu' => 'file-text-o']);\n \\RestoApp\\Entities\\Menu::create(['id' => 11, 'idMenuPai' => 9, 'textMenu' => 'db_menu.listcardapio', 'urlMenu' => '/app/cardapio', 'iconMenu' => 'list-ul']);\n \\RestoApp\\Entities\\Menu::create(['id' => 12, 'idMenuPai' => 9, 'textMenu' => 'db_menu.gerenciarprato', 'urlMenu' => '/app/prato', 'iconMenu' => 'list-ul']);\n }", "protected function createMenuEntriesForTbeModulesExt() {}", "protected function createMenuEntriesForTbeModulesExt() {}", "public function actionIndex()\n {\n $service = new MenuService();\n $menus = $service->getAuthorizedBackendMenusByUserId(Yii::$app->getUser()->getId());\n return $this->renderPartial('index', [\n \"menus\" => $menus,\n 'identity' => Yii::$app->getUser()->getIdentity(),\n ]);\n }", "public function run()\n {\n $menus=[\n [\"parent_menu\" => 0,\"nombre\" => \"Catalogo\",\"url\" => \"javascript:;\",\"orden\" => 1,\"icono\" => \"fas fa-clipboard-list\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Ventas\",\"url\" => \"javascript:;\",\"orden\" => 2,\"icono\" => \"fas fa-cart-plus\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Reportes\",\"url\" => \"javascript:;\",\"orden\" => 3,\"icono\" => \"fas fa-chart-pie\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Acceso\",\"url\" => \"javascript:;\",\"orden\" => 4,\"icono\" => \"fas fa-users\"],\n [\"parent_menu\" => 0,\"nombre\" => \"Ayuda\",\"url\" => \"ayuda\",\"orden\" => 5,\"icono\" => \"fas fa-exclamation-circle\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Productos\",\"url\" => \"producto\",\"orden\" => 1,\"icono\" => \"fab fa-product-hunt\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Categorías\",\"url\" => \"categoria\",\"orden\" => 2,\"icono\" => \"fas fa-clipboard-check\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Sabores\",\"url\" => \"sabor\",\"orden\" => 3,\"icono\" => \"fas fa-ice-cream\"],\n [\"parent_menu\" => 1,\"nombre\" => \"Tamaños\",\"url\" => \"tamano\",\"orden\" => 4,\"icono\" => \"fas fa-ruler\"],\n [\"parent_menu\" => 2,\"nombre\" => \"Ordenes\",\"url\" => \"orden\",\"orden\" => 1,\"icono\" => \"fas fa-cart-arrow-down\"],\n [\"parent_menu\" => 2,\"nombre\" => \"Clientes\",\"url\" => \"cliente\",\"orden\" => 2,\"icono\" => \"fas fa-user-tie\"],\n [\"parent_menu\" => 3,\"nombre\" => \"Ingresos\",\"url\" => \"ventarango\",\"orden\" => 1,\"icono\" => \"fas fa-circle\"],\n [\"parent_menu\" => 3,\"nombre\" => \"Ventas por Mes\",\"url\" => \"venta-mes\",\"orden\" => 2,\"icono\" => \"fas fa-circle\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Usuarios\",\"url\" => \"usuario\",\"orden\" => 1,\"icono\" => \"fas fa-user\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Roles\",\"url\" => \"rol\",\"orden\" => 2,\"icono\" => \"fas fa-scroll\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Permisos\",\"url\" => \"permiso\",\"orden\" => 3,\"icono\" => \"fas fa-user-tag\"],\n [\"parent_menu\" => 4,\"nombre\" => \"Menus\",\"url\" => \"menu\",\"orden\" => 4,\"icono\" => \"fas fa-bars\"]\n\n ];\n foreach($menus as $menu){\n DB::table('menu')->insert([\n 'parent_menu' => $menu[\"parent_menu\"],\n 'nombre' => $menu[\"nombre\"],\n 'url' => $menu[\"url\"],\n 'orden' => $menu[\"orden\"],\n 'icono' => $menu[\"icono\"], \n 'created_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }\n }", "public function obtenerElementosMenu();", "public function getMenuItemsAction($template)\n {\n $locationSearchResults = $this->searchService->findLocations($this->menuQueryType->getQuery());\n\n $menuItems = [];\n foreach ($locationSearchResults->searchHits as $hit) {\n $menuItems[] = $hit->valueObject;\n }\n\n return $this->templating->renderResponse(\n $template, [\n 'menuItems' => $menuItems,\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 indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $menus = $em->getRepository('RestaurantBundle:Menu')->findAll();\n\n return $this->render('menu/index.html.twig', array(\n 'menus' => $menus,\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 getMenus(){\n\n }", "public function onCreateMenu($event)\n {\n $menu = $event->menu;\n $resource = $event->resource;\n $model = $event->model;\n $owApp = OntoWiki::getInstance();\n\n // We only add entries to the menu, if all params are given and the\n // model is editable.\n if ((null === $resource) || (null === $model) || !$model->isEditable()\n || !$owApp->erfurt->getAc()->isModelAllowed('edit', $owApp->selectedModel)) {\n return;\n }\n\n $owApp = OntoWiki::getInstance();\n $translate = $owApp->translate;\n\n $wrapperRegistry = Erfurt_Wrapper_Registry::getInstance();\n $activeWrapperList = $wrapperRegistry->listActiveWrapper();\n\n if ((boolean)$this->_privateConfig->sync->enabled) {\n $syncConfigList = $this->_listSyncConfigs();\n } else {\n $syncConfigList = array();\n }\n\n $uri = (string)$resource;\n $modelUri = (string)$model;\n\n $menuArray = array();\n\n // Check all active wrapper extensions, whether URI is handled. Also\n // check, whether a sync config exists.\n foreach ($activeWrapperList as $wrapperName) {\n $hash = $this->_getHash($uri, $wrapperName, $modelUri);\n\n $r = new Erfurt_Rdf_Resource($uri);\n $r->setLocator($this->_getProxyUri($uri));\n\n $wrapperInstance = $wrapperRegistry->getWrapperInstance($wrapperName);\n if ($wrapperInstance->isHandled($r, $modelUri)) {\n $menuArray[$wrapperName] = array(\n 'instance' => $wrapperInstance\n );\n\n if (isset($syncConfigList[$hash])) {\n $menuArray[$wrapperName]['sync'] = true;\n }\n }\n }\n\n // Only add a separator, if at least one active wrapper exists.\n if (count($menuArray) > 0) {\n $menu->appendEntry(OntoWiki_Menu::SEPARATOR);\n }\n\n foreach ($menuArray as $wrapperName => $wrapperArray) {\n $wrapperInstance = $wrapperArray['instance'];\n\n if (isset($wrapperArray['sync']) && $wrapperArray['sync'] === true) {\n $message = $translate->_('Sync Data with %1$s');\n\n $menu->appendEntry(\n sprintf($message, $wrapperInstance->getName()),\n array(\n 'about' => $uri,\n 'class' => 'sync_data_button wrapper_' . $wrapperName\n )\n );\n } else {\n $message = $translate->_('Import Data with %1$s');\n\n $menu->appendEntry(\n sprintf($message, $wrapperInstance->getName()),\n array(\n 'about' => $uri,\n 'class' => 'fetch_data_button wrapper_' . $wrapperName\n )\n );\n }\n\n // Configure for sync entry.\n if ((boolean)$this->_privateConfig->sync->enabled) {\n $configUrl = $owApp->config->urlBase . 'datagathering/config?uri=' . urlencode($uri) .\n '&wrapper=' . urlencode($wrapperName);\n\n if ($event->isModel) {\n $configUrl .= '&m=' . urlencode($uri);\n }\n\n $message = $translate->_('Configure Sync with %1$s');\n\n $menu->appendEntry(\n sprintf($message, $wrapperInstance->getName()),\n $configUrl\n );\n }\n }\n\n return true;\n }", "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 }", "public function getAccessOfRender(): array\n {\n $access = $this->getAccessOfAll(true, $this->bsw['menu']);\n $annotation = [];\n\n foreach ($access as $key => $item) {\n $enum = [];\n foreach ($item['items'] as $route => $target) {\n if ($target['join'] === false || $target['same']) {\n continue;\n }\n $enum[$route] = $target['info'];\n }\n\n if (!isset($annotation[$key])) {\n $annotation[$key] = [\n 'info' => $item['info'] ?: 'UnSetDescription',\n 'type' => new Checkbox(),\n 'enum' => [],\n 'value' => [],\n ];\n }\n\n $annotation[$key]['enum'] = array_merge($annotation[$key]['enum'], $enum);\n }\n\n return $annotation;\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 menu()\n {\n $menu_raw = $this->db->select('fs_department.id as de_id, fs_department.name as de_name, fs_category.*')\n ->from('fs_department')\n ->join('fs_category', 'fs_department.id = fs_category.department_id', 'left')\n ->get()->result_array();\n\n $menu_good = array();\n foreach ($menu_raw as $k => $v) {\n $menu_good[$v['de_name']][$k] = $v;// short array menu\n }\n return $menu_good;\n\n }", "public function getUserMenu() {\n $event = new BuildUserMenuEvent();\n $this->trigger(self::EVENT_BUILD_USER_MENU, $event);\n $menu = [];\n foreach ($event->items as $block => $items) {\n foreach ($items as $item) {\n $menu[] = $item;\n }\n }\n return $menu;\n }", "public function run()\n {\n foreach ($this->data() as $item){\n CoreMenu::create($item);\n }\n }", "public function getMenus()\n\t{\n\n\t}", "public function getRawModuleMenuData() {}", "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 }", "public function getMenuItems() {\n\n $url = $this->urlHelper;\n $items = [];\n\n //Links Visible always to everyone logged in or not.\n //default Home page - no login required. \n\n /* $items[] = [\n 'id' => 'home',\n 'label' => 'Home',\n 'link' => $url('home')\n ]; */\n\n //add links here for pages that will be visible for all users logged-in or not.\n //you must adjust User\\Module.php (~line 85) onDispatch method to ignore calls for \n //the associated Controller and action or you will end up with an infinite loop.\n /*\n $items[] = [\n 'id' => 'about',\n 'label' => 'About',\n 'link' => $url('about')\n ];\n */\n\n $user = $this->authManager->getLoggedInUser();\n\n //BEGIN Authentication/Rendering Logic\n // Display \"Login\" menu item for not authorized user only. On the other hand,\n // display \"Admin\" and \"Logout\" menu items only for authorized users and any other links \n // that should be visible by logged-in users.\n if (!$user) {\n\n $items[] = [\n 'id' => 'login',\n 'label' => 'Sign in',\n 'link' => $url('login'),\n 'float' => 'right'\n ];\n } else {\n\n //render Customers link for all users with sales_attr_id value in users table\n if (!empty($user->getSales_attr_id())) {\n $items[] = [\n 'id' => 'customers',\n 'label' => 'Customers',\n 'data-ffm-salesperson' => $user->getFullName(),\n 'float' => 'static',\n 'link' => $url('customer', ['action' => 'view', 'id' => $user->getSales_attr_id()])\n ];\n }\n //only display admin drop down for admin users.\n $isAdmin = $this->authManager->isAdmin();\n if ($isAdmin) {\n $items[] = [\n 'id' => 'admin',\n 'label' => '<i class=\"ion-gear-a\"></i>',\n 'float' => 'right',\n 'dropdown' => [\n [\n 'id' => 'users',\n 'label' => 'Manage Users',\n 'link' => $url('users')\n ]\n ]\n ];\n }\n\n $settingsDropDownManageAccount = [\n 'id' => 'manage_account',\n 'label' => 'Manage Account',\n 'link' => $url('users', ['action' => 'edit', 'id' => $user->getId()])\n ];\n\n $settingsDropDownViewAccount = [\n 'id' => 'view_account',\n 'label' => 'View Account',\n 'link' => $url('application', ['action' => 'settings'])\n ];\n\n $settingsDropDownLogout = [\n 'id' => 'logout',\n 'label' => 'Logout',\n 'link' => $url('logout')\n ];\n\n $settingsDropDown = [];\n\n //only add the Manage Account link for Admins.\n if ($isAdmin) {\n $settingsDropDown[] = $settingsDropDownManageAccount;\n }\n\n $settingsDropDown[] = $settingsDropDownViewAccount;\n\n $settingsDropDown[] = $settingsDropDownLogout;\n\n $items[] = [\n 'id' => 'settings',\n 'label' => '<i class=\"ion-person\"></i>' . $user->getUsername(),\n 'float' => 'right',\n 'dropdown' => $settingsDropDown\n ];\n\n $loggedInItems = $this->getLoggedInItems();\n\n if ($loggedInItems)\n array_merge($items, $loggedInItems);\n\n // add items to right of settings in top right corner only for logged-in users here\n //Show Salespeople link only to Admin users\n if ($isAdmin) {\n\n $items[] = [\n 'id' => 'salespeople',\n 'label' => 'Salespeople',\n 'float' => 'static',\n 'link' => $url('salespeople', ['action' => 'index']),\n ];\n }\n }\n\n return $items;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('MiiGameBundle:Level')->findAll();\n\n return array('entities' => $entities);\n }", "function subsite_manager_page_prepare_menu_handler($hook, $entity, $return_value, $params){\n\t\t$result = $return_value;\n\n\t\tif(elgg_in_context(\"admin\") && !empty($result) && is_array($result)){\n\t\t\t$page_menu = $result;\n\n\t\t\tif(!subsite_manager_is_superadmin_logged_in()){\n\t\t\t\t$allowed_menu_items = array(\n\t\t\t\t\t\"dashboard\",\n\t\t\t\t\t\"users\",\n\t\t\t\t\t\"users:online\",\n\t\t\t\t\t\"users:newest\",\n\t\t\t\t\t\"users:all\",\n\t\t\t\t\t\"users:admins\",\n\t\t\t\t\t\"users:membership\",\n\t\t\t\t\t\"users:invite\",\n\t\t\t\t\t\"users:invitations\",\n\t\t\t\t\t\"users:export\",\n\t\t\t\t\t\"statistics\",\n\t\t\t\t\t\"statistics:overview\",\n\t\t\t\t\t\"administer_utilities\",\n\t\t\t\t\t\"administer_utilities:move_group\",\n\t\t\t\t\t\"administer_utilities:reportedcontent\",\n\t\t\t\t\t\"administer_utilities:csv_exporter\",\n\t\t\t\t\t\"administer_utilities:group_bulk_delete\",\n\t\t\t\t\t\"administer_utilities:group_invitations\",\n\t\t\t\t\t\"administer_utilities:profile_sync\",\n\t\t\t\t\t\"administer_utilities:rewrite\",\n\t\t\t\t\t\"wizard\",\n\t\t\t\t\t\"profile_sync\",\n\t\t\t\t\t\"site_announcements\",\n\t\t\t\t\t\"appearance\",\n\t\t\t\t\t\"appearance:profile_fields\",\n\t\t\t\t\t\"appearance:template\",\n\t\t\t\t\t\"appearance:group_fields\",\n\t\t\t\t\t\"static\",\n\t\t\t\t\t\"appearance:expages\",\n\t\t\t\t\t\"appearance:theme_oirschot\",\n\t\t\t\t\t\"appearance:theme_eersel\",\n\t\t\t\t\t\"plugins\",\n\t\t\t\t\t\"widgets\",\n\t\t\t\t\t\"widgets:manage\",\n\t\t\t\t\t\"widgets:default\", // widget manager\n\t\t\t\t\t\"appearance:default_widgets\", // core\n\t\t\t\t\t\"settings\",\n\t\t\t\t\t\"settings:basic\",\n\t\t\t\t\t\"settings:advanced\",\n\t\t\t\t\t\"settings:pleio_api\",\n\t\t\t\t);\n\n\t\t\t\t// loop through menu sections\n\t\t\t\tforeach($page_menu as $section => $menu_items){\n\n\t\t\t\t\tif(!empty($menu_items) && is_array($menu_items)){\n\t\t\t\t\t\t// loop through menu items\n\t\t\t\t\t\tforeach($menu_items as $index => $menu_item){\n\n\t\t\t\t\t\t\tif(in_array($menu_item->getName(), $allowed_menu_items)){\n\t\t\t\t\t\t\t\t//check for submenus\n\t\t\t\t\t\t\t\tif($children = $menu_item->getChildren()){\n\t\t\t\t\t\t\t\t\t// loop through submenus\n\t\t\t\t\t\t\t\t\tif($menu_item->getName() != \"settings\"){\n\t\t\t\t\t\t\t\t\t\t// 'normal' submenu\n\t\t\t\t\t\t\t\t\t\tforeach($children as $child_index => $child){\n\t\t\t\t\t\t\t\t\t\t\tif(!in_array($child->getName(), $allowed_menu_items)){\n\t\t\t\t\t\t\t\t\t\t\t\tunset($children[$child_index]);\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} else {\n\t\t\t\t\t\t\t\t\t\t// the setting menu is special\n\t\t\t\t\t\t\t\t\t\t// most menu items have the name of the plugin, but some not, these should be checked\n\t\t\t\t\t\t\t\t\t\tforeach($children as $child_index => $child){\n\t\t\t\t\t\t\t\t\t\t\tif(stristr($child->getName(), \"settings:\") && !in_array($child->getName(), $allowed_menu_items)){\n\t\t\t\t\t\t\t\t\t\t\t\tunset($children[$child_index]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif(!empty($children)){\n\t\t\t\t\t\t\t\t\t\t$menu_item->setChildren($children);\n\t\t\t\t\t\t\t\t\t} elseif(!$menu_item->getHref()){\n\t\t\t\t\t\t\t\t\t\tunset($page_menu[$section][$index]);\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} else {\n\t\t\t\t\t\t\t\tunset($page_menu[$section][$index]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(empty($page_menu[$section])){\n\t\t\t\t\t\t\tunset($page_menu[$section]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$result = $page_menu;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getEntities();", "public function getEntities();", "public function get(){\n\t\t\t\n\t\t\t$query=\"SELECT menuItem FROM menuModel\";\n\t\t\t$results=$this->db()->query($query);\n\t\t\t\n\t\t\t// echo\"<pre>\";\n\t\t\t// var_dump($results);\n\t\t\t\n\t\t\tforeach($results as $res){\n\t\t\t\t$menu_array[]=$res;\n\t\t\t}\n\t\t\t\n\t\t\treturn $menu_array;\n\t\t\t\n\t\t}", "public function getMenuGenerator() : MenuGenerator;", "public function setMenuContent(array $menu);", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('UserBundle:User')->findAll();\n \n $options = array(\n \t\t'entities' => $entities,\n );\n $elementsForMenu = $this->getElementsForMenu();\n\n return $this->render('BackendBundle:User:index.html.twig', array_merge($options, $elementsForMenu));\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 }", "public static function registerEntityTools(\\Elgg\\Event $event): ?MenuItems {\n\t\t$types = array_keys(entity_tools_get_supported_entity_types());\n\t\tif (empty($types)) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$page_owner = elgg_get_page_owner_entity();\n\t\t\n\t\t$generate_url = function($subtype) use ($page_owner) {\n\t\t\tif ($page_owner instanceof \\ElggGroup) {\n\t\t\t\treturn elgg_generate_url('entity_tools:group', [\n\t\t\t\t\t'guid' => $page_owner->guid,\n\t\t\t\t\t'subtype' => $subtype,\n\t\t\t\t]);\n\t\t\t} elseif ($page_owner instanceof \\ElggUser) {\n\t\t\t\treturn elgg_generate_url('entity_tools:owner', [\n\t\t\t\t\t'username' => $page_owner->username,\n\t\t\t\t\t'subtype' => $subtype,\n\t\t\t\t]);\n\t\t\t}\n\t\t\t\n\t\t\treturn elgg_generate_url('entity_tools:site', [\n\t\t\t\t'subtype' => $subtype,\n\t\t\t]);\n\t\t};\n\t\t\n\t\t/* @var $return MenuItems */\n\t\t$return = $event->getValue();\n\t\t$selected = $event->getParam('filter_value');\n\t\t\n\t\t$priority = 10;\n\t\t\n\t\tforeach ($types as $type) {\n\t\t\t$key = \"collection:object:{$type}\";\n\t\t\tif (!elgg_language_key_exists($key)) {\n\t\t\t\t$key = \"item:object:{$type}\";\n\t\t\t}\n\t\t\t\n\t\t\t$return[] = \\ElggMenuItem::factory([\n\t\t\t\t'name' => $type,\n\t\t\t\t'text' => elgg_echo($key),\n\t\t\t\t'href' => $generate_url($type),\n\t\t\t\t'priority' => $priority,\n\t\t\t\t'selected' => $type === $selected,\n\t\t\t]);\n\t\t\t\n\t\t\t$priority += 10;\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function run(){\n // only for User frontend; cache disable for admin panel\n if($this->tpl == 'menu.php'){\n $menu = Yii::$app->cache->get('menu');\n if($menu) return $menu;\n }\n\n\n// if not, get menu from DB\n// indexBy('id') - make 'key' = 'id' in Array\n// get data from DB\n $this->data = Category::find()->indexBy('id')->asArray()->all();\n// Create Menu Tree\n $this->tree = $this->getTree();\n// Create Html Template for Menu\n $this->menuHtml = $this->getMenuHtml($this->tree);\n\n// set cache, write menu to cache\n if($this->tpl == 'menu.php'){\n Yii::$app->cache->set('menu', $this->menuHtml, 60); // 60 = 1min\n }\n\n return $this->menuHtml;\n\n }", "abstract protected function getMenuTree();", "public function menuAction()\n\n {\n $listAdverts = array(\n array('id' => 2, 'title' => 'Recherche développeur Symfony2'),\n array('id' => 5, 'title' => 'Mission de webmaster'),\n array('id' => 1, 'title' => 'Offre de stage webdesigner'),\n );\n\n return $this->render(\n 'OCPlatformBundle:Advert:menu.html.twig',\n array('listAdverts' => $listAdverts)\n );\n\n }", "public function render() {\n return [\n 'command' => 'slideCommand',\n 'action' => $this->action,\n 'bo_view_dom_id' => $this->bo_view_dom_id,\n 'entity_id' => $this->entity_id,\n ];\n }", "public function hook_menu() {\n $items = parent::hook_menu();\n $items[$this->path]['title'] = 'Transaction Types';\n $items[$this->path]['description'] = strtr('Manage !Points transaction types.', userpoints_translation());\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n $items[$this->path]['weight'] = 10;\n\n foreach ($items as $path => $item) {\n if (substr($path, strlen($this->path) + 1, 6) == 'manage') {\n // Field UI doesn't render local tasks well when the main ui is a local\n // task itself. This places all admin interfaces directly under types\n // instead.\n $new_path = preg_replace('/\\/manage/', '', $path);\n $items[$new_path] = $items[$path];\n $items[$new_path]['page arguments'][1] = 5;\n\n if (isset($items[$new_path]['page arguments'][0]) &&\n $items[$new_path]['page arguments'][0] == 'userpoints_transaction_type_operation_form') {\n // Entity API fails to use the correct bundle argument defined in\n // entity info.\n $items[$new_path]['page arguments'] = array('entity_ui_operation_form', 'userpoints_transaction_type', 5, 6);\n }\n\n unset($items[$path]);\n }\n }\n return $items;\n }", "function getMenuItems () {\n return sqlSelect('SELECT * FROM menu');\n}", "public function MenuList() {\n $FormData = $this->input->get();\n if (count($FormData) > 0) {\n echo json_encode($this->m_menu->MenuList($FormData['query']));\n }\n }", "public function getAllMenuItems()\n\t{\n\t\t$out = array();\n\t\n\t\t$sql = \"SELECT\n\t\t\t\t\t`menu`.`link_id`,\n\t\t\t\t\t`menu_tree`.`parent_id`,\n\t\t\t\t\t`menu`.`redirect_url`,\n\t\t\t\t\t`menu_tree`.`sequence_no`,\n\t\t\t\t\t`menu`.`title_menu`,\n\t\t\t\t\t`menu`.`title_page`,\n\t\t\t\t\t`menu`.`template_name`,\n\t\t\t\t\t`menu`.`module_id`,\n\t\t\t\t\t`menu`.`security_level_id`,\n\t\t\t\t\t`menu`.`group_id`,\n\t\t\t\t\t`menu_tree`.`main_link`,\n\t\t\t\t\t`menu_tree`.`quick_link`,\n\t\t\t\t\t`menu_tree`.`bottom_link`,\n\t\t\t\t\t`menu`.`sitemap`,\n\t\t\t\t\t`menu`.`status`\n\t\t\t\tFROM\n\t\t\t\t\t`menu_tree`\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t`menu`\n\t\t\t\tON\n\t\t\t\t\t`menu`.`link_id` = `menu_tree`.`link_id`\n\t\t\t\tORDER BY \n\t\t\t\t\t`menu_tree`.`parent_id`,`menu_tree`.`sequence_no`\n\t\t\t\t\";\n\t\t$stmt = $this->db->prepare($sql);\n\t\t$stmt->bind_result($link_id,$parent_id,$redirect_url,$sequence_no,$title_menu,$title_page,$template_name,$module_id,$security_level_id,$group_id,$main_link,$quick_link,$bottom_link,$sitemap,$status);\n\n\t\t$stmt->execute();\n\t\twhile($stmt->fetch())\n\t\t{\n\t\t\t$out[] = array(\n\t\t\t\t'link_id' => $link_id,\n\t\t\t\t'parent_id' => $parent_id,\n\t\t\t\t'redirect_url' => $redirect_url,\n\t\t\t\t'sequence_no' => $sequence_no,\n\t\t\t\t'title_menu' => $title_menu,\n\t\t\t\t'title_page' => $title_page,\n\t\t\t\t'template_name' => $template_name,\n\t\t\t\t'module_id' => $module_id,\n\t\t\t\t'security_level_id' => $security_level_id,\n\t\t\t\t'group_id' => $group_id,\n\t\t\t\t'main_link' => $main_link,\n\t\t\t\t'quick_link' => $quick_link,\n\t\t\t\t'bottom_link' => $bottom_link,\n\t\t\t\t'sitemap' => $sitemap,\n\t\t\t\t'status' => $status\n\t\t\t);\n\t\t}\n\t\t$stmt->close();\n\t\t\n\t\treturn $out;\n\t}", "public function render()\r\n {\r\n $this->data['menu'] = build_menu(\r\n $this->choices, $this->uri->segment(1));\r\n \r\n $this->data['header'] = $this->parser->parse(\r\n '_header', $this->data, true);\r\n $this->data['content'] = $this->parser->parse(\r\n $this->data['page_body'], $this->data, true);\r\n $this->data['footer'] = $this->parser->parse(\r\n '_footer', $this->data, true);\r\n \r\n $this->data['data'] = &$this->data;\r\n \r\n $this->parser->parse('_template', $this->data);\r\n }", "protected function getMenuData() {\n\t\t$data = [\n\t\t\t'groups' => [\n\t\t\t\t$this->getDiscoveryTools(),\n\t\t\t\t$this->getPersonalTools(),\n\t\t\t\t$this->getConfigurationTools(),\n\t\t\t],\n\t\t\t'sitelinks' => $this->getSiteLinks(),\n\t\t];\n\n\t\treturn $data;\n\t}", "public static function menus(): array\n {\n return [];\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}", "public static function menus()\n {\n return [];\n }", "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 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 erp_menu() {\n $menu = [];\n return apply_filters( 'erp_menu', $menu );\n}", "public function getMenuItems(): ?array\n\t{\n\t\t$menuItems = parent::getMenuItems();\n\n\t\t$pdfUrl = $this->getPdfUrl();\n\t\t$docxUrl = (string)$this->getDownloadUrl();\n\n\t\t$downloadPdfAction = (new Layout\\Action\\JsEvent('Document:DownloadPdf'))\n\t\t\t->addActionParamString('docxUrl', $docxUrl);\n\n\t\tif ($pdfUrl)\n\t\t{\n\t\t\t$downloadPdfAction->addActionParamString('pdfUrl', (string)$pdfUrl);\n\t\t}\n\n\t\t$menuItems['downloadPdf'] =\n\t\t\t(new MenuItem(Loc::getMessage('CRM_COMMON_ACTION_DOWNLOAD_FORMAT', ['#FORMAT#' => 'PDF'])))\n\t\t\t\t->setAction($downloadPdfAction)\n\t\t;\n\n\t\t$menuItems['downloadDocx'] =\n\t\t\t(new MenuItem(Loc::getMessage('CRM_COMMON_ACTION_DOWNLOAD_FORMAT', ['#FORMAT#' => 'DOCX'])))\n\t\t\t\t->setAction(\n\t\t\t\t\t(new Layout\\Action\\JsEvent('Document:DownloadDocx'))\n\t\t\t\t\t\t->addActionParamString('docxUrl', (string)$this->getDownloadUrl())\n\t\t\t\t)\n\t\t;\n\n\t\t$menuItems['delete'] = MenuItemFactory::createDeleteMenuItem()\n\t\t\t->setAction(\n\t\t\t\t(new Layout\\Action\\JsEvent('Document:Delete'))\n\t\t\t\t\t->addActionParamInt('id', $this->getModel()->getId())\n\t\t\t\t\t->addActionParamInt('ownerTypeId', $this->getContext()->getEntityTypeId())\n\t\t\t\t\t->addActionParamInt('ownerId', $this->getContext()->getEntityId())\n\t\t\t\t\t->addActionParamString('confirmationText', Loc::getMessage('CRM_TIMELINE_DOCUMENT_DELETION_CONFIRM'))\n\t\t\t\t\t->setAnimation(Layout\\Action\\Animation::disableItem()->setForever())\n\t\t\t)\n\t\t;\n\n\t\treturn $menuItems;\n\t}", "public function indexAction()\n {\n $entities= $this->get('product.manager')->findAll();\n\n\n return array(\n 'entities' => $entities,\n );\n }", "public function index()\n {\n return $this->menu->all();\n }", "function getEntityList()\n\t{\n\t\tif($this->entityList === null)\n\t\t{\n\t\t\t$event = new \\Bitrix\\Main\\Event('main', 'onUserTypeEntityOrmMap');\n\t\t\t$event->send();\n\n\t\t\tforeach($event->getResults() as $eventResult)\n\t\t\t{\n\t\t\t\tif($eventResult->getType() == \\Bitrix\\Main\\EventResult::SUCCESS)\n\t\t\t\t{\n\t\t\t\t\t$result = $eventResult->getParameters(); // [ENTITY_ID => 'SomeTable']\n\t\t\t\t\tforeach($result as $entityId => $entityClass)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(mb_substr($entityClass, 0, 1) !== '\\\\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entityClass = '\\\\' . $entityClass;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->entityList[$entityId] = $entityClass;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->entityList;\n\t}", "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 }", "private static function loadEntityList()\n {\n if (!isset(self::$_data[self::KEY_ENTITY_LIST]))\n {\n $_adapter = self::getZendDbAdapter(TRUE);\n $_dbSelect = $_adapter->select()\n ->from(\"c_entity\", array(\"entity_id\" => \"id\", \"entity_name\" => \"name\", \"entity_label\" => \"label\"))\n ->join(\"c_entity_field\", \"c_entity_field.entity_id = c_entity.id\", array(\"field_id\" => \"id\", \"field_name\" => \"name\", \"field_label\" => \"label\"))\n ->join(\"c_entity_option\", \"c_entity_option.field_id = c_entity_field.id\", array(\"option_id\" => \"id\", \"option_value\" => \"value\", \"option_label\" => \"label\"))\n ->order(\"c_entity.id\")\n ->order(\"c_entity_field.id\")\n ->order(\"c_entity_option.label\")\n ;\n $_recordList = $_adapter->fetchAll($_dbSelect);\n\n $_data = array();\n foreach ($_recordList as $_record)\n {\n $_eName = $_record[\"entity_name\"];\n $_fName = $_record[\"field_name\"];\n $_oName = $_record[\"option_value\"];\n if (!isset($_data[$_eName]))\n {\n $_data[$_eName] = array(\n \"id\" => $_record[\"entity_id\"],\n \"label\" => $_record[\"entity_label\"],\n \"field_list\" => array()\n );\n }\n if (!isset($_data[$_eName][\"field_list\"][$_fName]))\n {\n $_data[$_eName][\"field_list\"][$_fName] = array(\n \"id\" => $_record[\"field_id\"],\n \"label\" => $_record[\"field_label\"],\n \"option_list\" => array()\n );\n }\n\n $_data[$_eName][\"field_list\"][$_fName][\"option_list\"][$_oName] = array(\n \"id\" => $_record[\"option_id\"],\n \"label\" => $_record[\"option_label\"]\n );\n }\n self::$_data[self::KEY_ENTITY_LIST] = $_data;\n }\n }", "protected function renderArray() {}", "private function getMenuItems()\n {\n $menu = $this->getDoctrine()->getRepository('XvolutionsAdminBundle:Menu')->findBy([], array('position' => 'ASC'));\n $menuItems = null;\n foreach ($menu as $item) {\n $menuItems[$item->getPage()->getId()] = ['id' => $item->getPage()->getId(), 'title' => $item->getPage()->getTitle()];\n }\n\n return $menuItems;\n }", "public function get_menu($menu_url){\n \n $menu_to_show = array();//array to store all menu data\n\n //get menu data\n $menu_post = get_page_by_path($menu_url['menu_url'], OBJECT, 'erm_menu');\n\n if ( !empty($menu_post) ) {\n\n $menu_to_show['title'] = $menu_post->post_title;\n $menu_to_show['header_content'] = $menu_post->post_content;\n $menu_to_show['footer_content'] = get_post_meta( $menu_post->ID, '_erm_footer_menu', true );\n \n //get menu items data\n $menu_items = get_post_meta( $menu_post->ID, '_erm_menu_items', true );\n \n if ( !empty($menu_items) ) {\n \n $menu_items = explode(',', $menu_items);\n\n $menu_to_show['menu_items'] = array();//array to store menu items data\n\n foreach ($menu_items as $item_id) {\n \n // Visible item\n if (get_post_meta($item_id, '_erm_visible', true) != 1) continue;\n\n // Query\n $args = array(\n 'post_type' => 'erm_menu_item',\n 'p' => $item_id\n );\n\n $items_posts = get_posts($args);\n \n if ( !empty($items_posts) ) {\n\n foreach ( $items_posts as $item_post ){\n \n //get type\n $type = get_post_meta($item_id, '_erm_type', true);\n \n //get prices\n if( $type != \"section\" ){\n\n $item_prices = array();\n $prices = get_post_meta( $item_id, '_erm_prices', true );\n if ( !empty($prices) ) {\n foreach($prices as $price){\n $item_prices[] = array(\n 'price_title' => $price['name'],\n 'price_value' => $price['value']\n );\n }\n }\n \n }\n\n //get img \n $image = array();\n $has_thumbnail = has_post_thumbnail( $item_id );\n if ( $has_thumbnail ) {\n\n $image['id'] = get_post_thumbnail_id( $item_id );\n $image['thumb_src'] = erm_get_image_src( (int)$image['id'], 'thumbnail' );\n $image['src'] = wp_get_attachment_image_src( (int)$image['id'], 'full' );\n $image['alt'] = get_post_meta( $image_id, '_wp_attachment_image_alt', true );\n\n }\n\n\n $menu_to_show['menu_items'][] = array(\n 'title' => $item_post -> post_title,\n 'content' => $item_post -> post_content,\n 'type' => $type,\n 'prices' => $item_prices,\n 'img' => array(\n 'thumb_src' => $image['thumb_src'],\n 'src' => $image['src'][0],\n 'alt' => $image['alt']\n )\n );\n }\n \n }\n \n\n }\n \n }\n \n \n }\n else { //if no such menu\n return new WP_Error( 'no_menu', 'No such menu', array( 'status' => 404 ) );\n }\n\n //print_r($menu_to_show);\n\n return $menu_to_show;\n \n }", "private function getEntities() {\n return [\n [\n 'title' => 'Details',\n 'alias' => 'product.info.description',\n 'block' => 'Magento\\Catalog\\Block\\Product\\View\\Description',\n 'sort_order' => 0,\n 'status' => 1,\n 'widget_template' => 'Magento_Catalog::product/view/description.phtml'\n ],\n [\n 'title' => 'More Information',\n 'alias' => 'additional',\n 'block' => 'Magento\\Catalog\\Block\\Product\\View\\Attributes',\n 'sort_order' => 10,\n 'status' => 1,\n 'widget_template' => 'Magento_Catalog::product/view/attributes.phtml',\n 'widget_unset' => 'product.attributes.wrapper' // unset block when page layout is \"Product -- Full Width\"\n ],\n [\n 'title' => '{{eval code=\"getTabTitle()\"}}',\n 'alias' => 'reviews',\n 'block' => 'Swissup\\Easytabs\\Block\\Tab\\Product\\Review',\n 'sort_order' => 20,\n 'status' => 1,\n 'widget_template' => 'Magento_Review::review.phtml',\n 'widget_unset' => 'product.reviews.wrapper' // unset block when page layout is \"Product -- Full Width\"\n ]\n ];\n }", "public function menustoreAction() {\n $panel_pages = array();\n $menut = Model_Menu::getInstance();\n $panel_names = $menut->panels();\n $pages = array();\n // at this point have selected all the menus of all active modules\n // return a tree of pages from each top level page sorted by sort_by and label\n foreach($panel_names as $panel):\n $panel_data = array('id' => $panel, 'label' => ucwords(str_replace('_', ' ', $panel)),\n 'children' => array());\n foreach($menut->find(array('panel' => $panel, 'parent' => 0), 'sort_by') as $menu):\n $panel_data['children'][] = $menu->pages_tree();\n endforeach;\n $pages[] = $panel_data;\n endforeach;\n $this->view->data = new Zend_Dojo_Data('id', $pages, 'label');\n $this->_helper->layout->disableLayout();\n }", "public function getItems()\n {\n //$urlManager = Yii::$app->urlManager->createUrl();\n $menuItems = [\n 'items' => $this->prepareRawTree()->prepareHasChilds()->getWidgetFormatedArray(),\n 'options' => [\n 'id' => 'left-menu',\n 'class' => 'nav nav-sidebar sortable'\n ],\n 'linkTemplate' => '<a href=\"{url}\">{label_prefix}{label}{label_postfix}</a>',\n 'submenuTemplate' => \"\\n<ul class='sortable nav nav-{level}-level'>\\n{items}\\n</ul>\\n\",\n ];\n //print_r($menuItems);\n return $menuItems;\n }", "public function indexActionEntities() {\n return [];\n }", "public function getParentMenuArr() {}", "public function menuAction()\n {\n $site = $this->getSessionVar('site');\n /* @var $repo \\Allegro\\SitesBundle\\Repository\\SiteRepository */\n $repo = $this->getRepo('Site');\n\n /* @var $siteEntity Allegro\\SitesBundle\\Entity\\Site */\n $siteEntity = $repo->getSiteBySlug($site);\n return $this->render($this->getTemplate('menu.html'), array(\n 'site' => $siteEntity,\n '_locale' => $this->getSessionVar('_locale')\n ));\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('Area4CampeonatoBundle:Partido')->findAll();\n //$e_h_p = $em->getRepository('Area4CampeonatoBundle:Equipo_has_Partido')->findAll();\n\n return array('entities' => $entities);\n }", "function dynamicMenu($classifications){\r\n$navList = '<ul>';\r\n$navList .= \"<li><a href='/phpmotors/' title='View the PHP Motors home page'>Home</a></li>\";\r\nforeach ($classifications as $classification) {\r\n $navList .= \"<li><a href='/phpmotors/vehicles/?action=classification&classificationName=\".urlencode($classification['classificationName']).\"' title='View our $classification[classificationName] lineup of vehicles'>$classification[classificationName]</a></li>\";\r\n }\r\n $navList .= '</ul>';\r\n return $navList;\r\n\r\n}", "public function run()\n {\n\n // Categoria Monitoramento\n $rh = MenuItem::create([\n 'mit_mod_id' => 6,\n 'mit_nome' => 'Recursos Humanos',\n 'mit_icone' => 'fa fa-file-text',\n 'mit_ordem' => 1\n ]);\n\n // Item Dashboard\n MenuItem::create([\n 'mit_mod_id' => 6,\n 'mit_nome' => 'Dashboard',\n 'mit_item_pai' => $rh->mit_id,\n 'mit_icone' => 'fa fa-tachometer',\n 'mit_rota' => 'rh.index.index',\n 'mit_ordem' => 1\n ]);\n\n // Categoria cadastros\n $rh = MenuItem::create([\n 'mit_mod_id' => 6,\n 'mit_nome' => 'Cadastros',\n 'mit_icone' => 'fa fa-plus',\n 'mit_ordem' => 1\n ]);\n\n // Item areas conhecimentos\n MenuItem::create([\n 'mit_mod_id' => 6,\n 'mit_nome' => 'Áreas de Conhecimento',\n 'mit_item_pai' => $rh->mit_id,\n 'mit_icone' => 'fa fa-tachometer',\n 'mit_rota' => 'rh.areasconhecimentos.index',\n 'mit_ordem' => 1\n ]);\n\n }", "public function getMenuItems($request, $response, $args)\n\t{\n\t\t$uri = $request->getUri();\n\t\t$baseUrl = $uri->getBaseUrl();\n\t\ttry{\t\t \t\t\n\t\t\t//$stmt = $this->c->db->prepare(\"SELECT * FROM c9_menu WHERE is_active =1 AND DATE(created_at) = CURDATE()\");\n\t\t\t$stmt = $this->c->db->prepare(\"SELECT * FROM c9_menu WHERE is_active =1 ORDER BY created_at DESC\");\n\t\t\t$stmt->execute(); \n\t\t\t$nRows = count($stmt->fetchAll());\n\t\t\tif($nRows > 0 ){\n\t\t\t\t$stmt->execute(); \n\t\t\t\t$menuItems = $stmt->fetchAll();\t\n\t\t\t\t$i=0;\n\t\t\t\tforeach($menuItems as $menuItem){\t\t\t\t\n\t\t\t\t\t$menuItems[$i]['image'] = $baseUrl.\"/uploads/menu/\".$menuItem['image'];\n\t\t\t\t\t$i++;\t\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\t$json = array(\"error\" => false, \"message\" =>$menuItems);\n\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t$json = array(\"error\" => false, \"message\" =>\"No Menu Item Found!\");\n\t\t\t}\t\t\t\n\t\t}catch(PDOException $e){\n\t\t\t\t\n\t\t\t$json = array(\"error\" => true, \"message\" => $e->getMessage());\n\t\t}\t\t\n\t\t$response->withHeader('Content-type', 'application/json');\n\t\treturn $response->withJson($json);\n\t}", "function getMenuEntries()\n\t{\n\t\tglobal $rbacsystem, $lng, $tree, $ilUser, $ilSetting;\n\n\t\t// no menu during online tests\n\t\tif ($_SESSION[\"adn_online_test\"])\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\t$mm_tpl = new ilTemplate(\"tpl.adn_main_menu.html\", true, true, \"Services/ADN/UI\");\n\n\t\tforeach ($this->getAllMenuItems() as $menu => $items)\n\t\t{\n\t\t\t$this->renderSubMenu($mm_tpl, $menu);\n\t\t}\n\t\treturn $mm_tpl->get();\n\n\n\n\t\t$tpl->setCurrentBlock(\"cust_menu\");\n\t\t$tpl->setVariable(\"TXT_CUSTOM\",\n\t\t\tlfCustomMenu::lookupTitle(\"it\", $menu[\"id\"], $ilUser->getLanguage(), true));\n\t\t$tpl->setVariable(\"MM_CLASS\", \"MMInactive\");\n\n\t\tif (is_file(\"./templates/default/images/mm_down_arrow.png\"))\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.png\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.gif\"));\n\t\t}\n\t\t$tpl->setVariable(\"CUSTOM_CONT_OV\", $gl->getHTML());\n\t\t$tpl->setVariable(\"MM_ID\", $menu[\"id\"]);\n\t\t$tpl->parseCurrentBlock();\n\t\t$tpl->setCurrentBlock(\"c_item\");\n\t\t$tpl->parseCurrentBlock();\n\n\t}", "function generateOrderMenu($id, $meunAuthItemMap){\r\n if(isMenuVisible($meunAuthItemMap['warehouseOrder'], array('warehouse_id'=>$id))){\r\n return array('label' => '<i ></i> Order', 'url' => array('/orderHeader/admin&w_id='.$id), 'visible' => true);\r\n }\r\n else{\r\n return array();\r\n }\r\n}" ]
[ "0.68613905", "0.67297935", "0.6662822", "0.6662822", "0.6662822", "0.6662822", "0.6662822", "0.6662822", "0.66595215", "0.6258645", "0.60994905", "0.6066189", "0.59590465", "0.59067225", "0.5855896", "0.57561463", "0.5738372", "0.5705399", "0.5699163", "0.5697926", "0.5695941", "0.569111", "0.5689781", "0.5688523", "0.56873107", "0.5686097", "0.56539637", "0.5640535", "0.5635359", "0.5603245", "0.5603245", "0.55924606", "0.5559423", "0.5556689", "0.5554565", "0.5535977", "0.5526861", "0.55131096", "0.54694927", "0.5465639", "0.54647315", "0.54616594", "0.546165", "0.5438087", "0.5408116", "0.54044443", "0.5398746", "0.53975105", "0.53932244", "0.53886294", "0.5375407", "0.5372503", "0.5366109", "0.5366109", "0.5357182", "0.53459054", "0.53392804", "0.5334098", "0.53293675", "0.5327165", "0.53236103", "0.53236103", "0.5322868", "0.53225625", "0.5315981", "0.5310429", "0.53087777", "0.5307497", "0.5299964", "0.5299941", "0.5292692", "0.5289514", "0.52818847", "0.5277497", "0.5275937", "0.5274762", "0.5273608", "0.52688426", "0.5266975", "0.52650684", "0.5250773", "0.52484894", "0.5240826", "0.5238217", "0.52321935", "0.5230932", "0.5230711", "0.5226613", "0.52169937", "0.52156675", "0.5214098", "0.5204009", "0.5201627", "0.5197661", "0.5196443", "0.5186378", "0.5180152", "0.5177823", "0.5172521", "0.51721174", "0.5165603" ]
0.0
-1
Menu callback; presents the mongo entity editing form.
function mongo_node_page_edit($entity_type, $entity) { $title = $entity->title; drupal_set_title($title); $content = array(); $content = drupal_get_form('mongo_node_form', $entity, $entity_type); return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function _EDIT(){\n\t\tglobal $id;\n\n\t\tif(!$id){\n\t\t\t$cid = josGetArrayInts('cid');\n\t\t\t$id = $cid[0];\n\t\t}\n\t\t$menutype = strval(mosGetParam($_REQUEST, 'menutype', 'mainmenu'));\n\n\t\tLibMenuBar::startTable();\n\t\tif(!$id){\n\t\t\t$link = 'index2.php?option=com_menus&menutype=' . $menutype . '&task=new&hidemainmenu=1';\n\t\t\tLibMenuBar::back(_MENU_BACK, $link);\n\t\t\tLibMenuBar::spacer();\n\t\t}\n\t\tLibMenuBar::custom('save_and_new', '-save-and-new', '', _SAVE_AND_ADD, false);\n\t\tLibMenuBar::save();\n\t\tLibMenuBar::spacer();\n\t\tLibMenuBar::apply();\n\t\tLibMenuBar::spacer();\n\t\tif($id){\n\t\t\t// for existing content items the button is renamed `close`\n\t\t\tLibMenuBar::cancel('cancel', _CLOSE);\n\t\t} else{\n\t\t\tLibMenuBar::cancel();\n\t\t}\n\t\tLibMenuBar::spacer();\n\t\tLibMenuBar::help('screen.menus.edit');\n\t\tLibMenuBar::endTable();\n\t}", "public function editAction() {}", "public function edit(Menu_builder $menu_builder)\n {\n //\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit() {\n\t\t\t\n\t\t}", "public function edit(TbMenu $tbMenu)\n {\n //\n }", "public function showEdit()\n {\n\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 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 editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit()\n\t{\n\t\t\n\t}", "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(Menu $menu)\n {\n //\n }", "public function editAction()\n {\n parent::editAction();\n $this->_fillMappingsArray();\n $this->_fillAvailableProperties();\n }", "public function edit()\r\n\r\n {\r\n\r\n $this->page_title->push(lang('menu_products_add'));\r\n\r\n $this->data['pagetitle'] = $this->page_title->show();\r\n\r\n\r\n /* Breadcrumbs :: Common */\r\n\r\n $this->breadcrumbs->unshift(1, lang('menu_products_add'), 'admin/setup/product/edit');\r\n\r\n\r\n /* Breadcrumbs */\r\n\r\n $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\n\r\n\r\n /* Data */\r\n\r\n $this->data['error'] = NULL;\r\n\r\n $this->data['charset'] = 'utf-8';\r\n\r\n $this->data['form_url'] = 'admin/setup/product/update';\r\n\r\n\r\n /* Load Template */\r\n\r\n $this->template->admin_render('admin/products/edit', $this->data);\r\n\r\n\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit() {\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() {\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}", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "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 edit()\n {\n \n \n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function edit()\n {\n \n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "function doEdit()\n {\n $dt = new lmbDate();\n $this->dt_up = $dt->getStamp();\n\n $node_id = $this->request->getInteger('id');\n $node['node_id'] = $node_id;\n $node['title'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_TITLE);\n $node['description'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_DESCR);\n $node['identifier'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_URI);\n $node['price'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_PRICE);\n\n $this->dt_cr = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $node['date_create'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $node['date_update'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_UPDATE_DATE);\n $node['is_branch'] = TreeItem::getIsBranchByNodeId($node_id);\n\n $this->setFormDatasource($node, 'object_form');\n\n $criteria = new lmbSQLFieldCriteria('is_branch', 1);\n $criteria->addAnd('attr_id = '. TreeItem::ID_TITLE );\n $this->items = lmbActiveRecord :: find('TreeItem', $criteria);\n\n\n if($this->request->hasPost())\n {\n $this->_validateAndSave(false);\n //$this->_onAfterSave();\n }\n }", "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 editAction()\r\n {\r\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 actionEdit ()\n\t\t{\n\t\t\t$id = Yii::$app->request->get('id');\n\t\t\t$menu = Menu::findOne($id);\n\t\t\tif ($menu == null)\n\t\t\t{\n\t\t\t\tYii::$app->notification->messageToSession(Yii::tr('Menu item not found.', [], 'menu'));\n\t\t\t\t$this->redirect(Yii::$app->request->referrer);\n\t\t\t}\n\t\t\tif (Yii::$app->request->isPost)\n\t\t\t{\n\t\t\t\t$post = Yii::$app->request->post('Menu');\n\n\t\t\t\t$menu->updateAttributes([\n\t\t\t\t\t'title' => $post[ 'title' ],\n\t\t\t\t\t'url' => $post[ 'url' ],\n\t\t\t\t\t'path' => $post[ 'path' ]\n\t\t\t\t]);\n\n\t\t\t\t$menu->save();\n\t\t\t\tYii::$app->notification->messageToSession(Yii::tr('Menu item was saved.', [], 'menu'));\n\t\t\t\t$this->redirect(Url::toRoute([ '/menu/index', 'type' => $menu->typeID ]));\n\t\t\t}\n\t\t\t$this->data('model', $menu);\n\t\t\t$this->setTitle(Yii::tr('Edit menu item', [], 'menu'));\n\t\t\t$this->_tpl = '@menuViews/add';\n\t\t}", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit(Normativa $normativa)\n {\n //\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function editorAction() {\n \n }", "abstract protected function renderEdit();", "public function edit()\n { \n }", "public function annimalEditAction()\n {\n }", "public function edit()\n {\n //\n }", "public function edit() {\n\n }", "public function edit() {\n $data['individual'] = $this->individual();\n $data['menus'] = $this->allmenus();\n $data['pages'] = $this->allpages();\n $this->load->view('Dashboard/header');\n $this->load->view('Menu/edit', $data);\n $this->load->view('Dashboard/footer');\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 edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n {\n\n }", "public function edit()\n { }", "abstract public function admin_edit($object, $uri, Page $page);", "public function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'player' );\n\t\tJRequest::setVar( 'layout', 'form' );\n\t\tJRequest::setVar('hidemainmenu', 1);\n\t \t \n\t\tparent::display();\n\t}", "protected function handlePageEditing() {}", "public function editAction()\n {\n return $this->editor($isEditAction=true);\n }", "public function editMenuItemAction()\n\t{\n\t\t$id = $this->getRequest()->getParam('id', null);\n\t\tif ($id !== null) {\n $item = $this->_navigationModel->getItem($id);\n\t\t\tif (empty($item) === false and $item->read_only === true) {\n\t\t\t\t$this->_helper->getHelper('FlashMessenger')->addMessage('That was a READ ONLY navigation item');\n\t\t\t\treturn $this->_helper->redirector->gotoUrl(\n\t\t\t\t $this->view->url( array('action' => 'list-menu') )\n );\n\t\t\t}\n\t\t}\n\n\t\t$form = new Navigation_Form_MenuItem();\n\n\t\tif ($this->getRequest()->isPost()) {\n\t\t\tif ($form->isValid($this->getRequest()->getPost())) {\n\t\t\t\t$this->_navigationModel->saveLeafItem( $form->getValues() );\n\t\t\t\treturn $this->_helper->redirector->gotoUrl(\n\t\t\t\t $this->view->url( array('action' => 'list-menu', 'module' => 'navigation', 'controller' => 'admin'), null, true )\n );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($id !== null) {\n\t\t\t\t$itemData = $this->_navigationModel->getItem($id);\n if (empty($itemData) === false) {\n $correctParentId = $itemData->getNode()->getParent()->id;\n\n $itemData = $itemData->toArray();\n $itemData['parent_id'] = $correctParentId;\n\n $form->populate($itemData);\n }\n else {\n return $this->_helper->redirector->gotoUrl(\n\t\t\t\t $this->view->url( array('action' => 'edit-menu-item', 'module' => 'navigation', 'controller' => 'admin'), null, true )\n );\n }\n\t\t\t}\n\t\t}\n\n\t\t$this->view->menuItemForm = $form;\n\t}", "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 editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fj_Service_Goods::getGoods(intval($id));\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t\t$this->assign('info', $info);\n\t}", "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 editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "function manage_form( ) {\n\t\t\n\t\t// Exit if user not logged in\n\t\t// TODO: MAKE THIS WORK\n/*\t\tif( ! current_user_can( 'administrator' ) ) {\n\t\t\tcpd_not_logged_in_message();\n\t\t\treturn;\n\t\t}\n*/\n\n\t\t$org = new Organisation();\n\n\t\t// Check if an Org has been selected - ie: has a number value for $_GET['id']\n\t\t// This covers resposnes both when selecting an org for editing, or for saving an org\n\t\tif( isset( $_REQUEST['id'] ) && is_int( (int) $_REQUEST['id'] ) ) {\n\t\t\t$org->load_org_details( $_REQUEST['id'] );\n\t\t}\n\n\t\t$this->display_form( $org );\n\t}", "public function company_edit() {\n add_submenu_page(\n 'companies',\n \"Add New Company\", // page title\n \"Add New Company\", // menu title\n 'manage_options', // capability\n 'companies_edit', // menu_slug,\n [ $this, 'company_edit_page' ]\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 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 edit($model, $form);", "public function edit()\n {\n $id = entitiestag($this->request->getGet('menu_id'));\n $result = $this->MenuModel->get(['menu_id' => $id]);\n\n if (empty($result))\n {\n return redirect()->to(base_url() . '/404');\n }\n\n $db = db_connect();\n $data['table'] = $db->listTables();\n $data['MenuModel'] = $this->MenuModel->where('hirarki', 1)->findAll();\n $data['var'] = $this->MenuModel->getMenu(['menu_id' => $this->request->getGet('menu_id')]);\n\n $param['menu'] = $this->menu;\n $param['activeMenu'] = $this->activeMenu;\n\n if ($param['activeMenu']['akses_ubah'] == '0')\n {\n return redirect()->to('denied');\n }\n\n $param['page'] = view($this->path_view . 'page-edit',$data);\n return view($this->theme, $param);\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 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 }", "function doEdit()\n {\n $dt = new lmbDate();\n $this->dt_up = $dt->getStamp();\n\n $node_id = $this->request->getInteger('id');\n $this->node = $node_id;\n $category['node_id'] = $node_id;\n $category['title'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_TITLE);\n $category['description'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_DESCR);\n $category['identifier'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_URI);\n\n $this->dt_cr = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $category['date_create'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_CREATE_DATE);\n $category['date_update'] = TreeItem::getAttrValueByNodeId($node_id, TreeItem::ID_UPDATE_DATE);\n $category['is_branch'] = TreeItem::getIsBranchByNodeId($node_id);\n\n $this->setFormDatasource($category, 'object_form');\n\n if($this->request->hasPost())\n {\n $this->_validateAndSave(false);\n //$this->_onAfterSave();\n }\n }", "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 actionEdit()\n\t{\n\t\tif (!$this->user->isAllowed('position', 'edit')) {\n\t\t\t$this->flashMessage(_('To enter this section you do not have enough privileges.'), 'danger');\n\t\t\t$this->redirect(':Admin:Dashboard:', ['id' => null]);\n\t\t}\n\n\t\tif (!$this->id) {\n\t\t\t$this->flashMessage(_('Missing identifier.'), 'danger');\n\t\t\t$this->redirect(':Admin:Component:');\n\t\t}\n\n $this->positionStatusFilter->setEnabled(false);\n\n\t\t$this->entity = $this->repository->get(['id' => $this->id]);\n\n\t\tif (!$this->entity) {\n\t\t\t$this->flashMessage(_('This position does not exist.'), 'danger');\n\t\t\t$this->redirect(':Admin:Component:', ['id' => null]);\n\t\t}\n\n\t\tif ($this->entity->getStatus() == PositionRepository::STATUS_REMOVE) {\n\t\t\t$this->flashMessage(_('This position is removed.'), 'danger');\n\t\t\t$this->redirect(':Admin:Component:', ['id' => null]);\n\t\t}\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 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 if($this->_getParam('id',false)) {\n $form = new ContentForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $updateData = $form->getValues();\n $where = array();\n $where[] = $this->_content->getAdapter()\n ->quoteInto('id = ?', $this->_getParam('id'));\n $oldData = $this->_content->fetchRow($this->_content\n ->select()->where('id= ?' , \n (int)$this->_getParam('id')))->toArray();\n $this->_helper->audit($updateData, $oldData, 'ContentAudit', \n $this->_getParam('id'), $this->_getParam('id'));\n $this->_content->update($updateData, $where);\n $this->_helper->solrUpdater->update('beocontent', \n $this->_getParam('id'), 'content'); \n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title') \n . '</em> successfully. It is now available for use.');\n $this->getCache()->clean(Zend_Cache::CLEANING_MODE_ALL);\n $this->_redirect('admin/content/');\n } else {\n $form->populate($this->_request->getPost());\n }\n } else {\n // find id is expected in $params['id']\n $id = (int)$this->_request->getParam('id', 0);\n if ($id > 0) {\n $content = $this->_content->fetchRow('id=' . (int)$id)->toArray();\n if($content) {\n $form->populate($content);\n } else {\n throw new Pas_Exception_Param($this->_nothingFound);\n }\n }\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "public function postEdit(){\n return view(\"admin.product.edit\" );\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 $publication = parent::find($_GET['id']);\n require_once 'views/layouts users/header.php';\n require_once 'views/admin/edit.php';\n require_once 'views/layouts users/footer.php';\n }", "public function saveAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n \"action\" => \"index\"\n ]);\n return;\n }\n\n $form = new AdminMenuEditForm();\n $id = $this->request->getPost('id');\n if (!empty($id)) {\n $menu = Menu::findFirstById($this->request->getPost('id'));\n } else {\n $menu = new Menu();\n }\n\n $form->bind($_POST, $menu);\n if (!$form->isValid()) {\n $this->flashErrors($form);\n\n $this->dispatcher->forward([\n \"action\" => \"edit\",\n \"params\" => [$id]\n ]);\n return;\n }\n\n if (!$menu->save()) {\n $this->flashErrors($menu);\n\n $this->dispatcher->forward([\n \"action\" => \"edit\",\n \"params\" => [$id]\n ]);\n return;\n }\n\n $this->flashSession->success(\"Menu was updated successfully\");\n\n $this->response->redirect('admin/core/menu/index/' . $menu->getMenuTypeId())->send();\n return;\n }", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "public function editAction() {\n $uid = $this->getInput('uid');\n $userInfo = Admin_Service_User::getUser(intval($uid));\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $this->assign('userInfo', $userInfo);\n $this->assign('groups', $groups);\n $this->assign('status', $this->status);\n $this->assign(\"meunOn\", \"sys_user\");\n }", "public function edit(BranchMenu $branchMenu)\n {\n //\n }", "public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }", "public function getEditForm();", "protected function editAction() : void\n {\n $this->editAction\n ->execute($this, RoleEntity::class, RoleActionEvent::class, __METHOD__);\n }", "public function getEditItemForm(){\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][1] == '0' && $_SESSION[PAGE_SESSIONID]['privileges']['articles'][3] == '0') die($this->text('dont_have_permission'));\n \n $this->datavalidator->addValidation('id','req',$this->text('e6'));\n $this->datavalidator->addValidation('id','numeric',$this->text('e7'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }\n \n $temp = dibi::query('SELECT * FROM ' . DB_TABLEPREFIX . 'ARTICLES WHERE id='.$this->data['id']);\n $article = $temp->fetchAssoc('id');\n if(count($temp) == 1){\n $article = $article[$this->data['id']];\n\n //testng if article is in category wehere user can add articles\n if(!$this->isPranetOfMenuitem($_SESSION[PAGE_SESSIONID]['privileges']['categoryaccess'],$article['id_menucategory'])) return array('state'=>'error','data'=> $this->text('t7'));\n\n $_SESSION['articles_dirname'] = $this->data['id'];\n $markup = '<div><h4 class=\"left\">'.$this->text('edit_article').'</h4>';\n $article['dirname'] = $article['id'];\n $markup .= $this->getForm('update',$article);\n $markup .= '</div>';\n return array('state'=>'ok','data'=> $markup);\n }else{\n return array('state'=>'error','data'=> $this->text('e29'));\n }\n }", "function show_edit()\n\t{\n\t\treturn '';\n\t}" ]
[ "0.67873544", "0.6768123", "0.67381614", "0.668048", "0.6650032", "0.6611225", "0.65789515", "0.65725017", "0.65610623", "0.6559797", "0.6544932", "0.6535698", "0.6525163", "0.6471587", "0.6461748", "0.645963", "0.6453348", "0.6453348", "0.6447904", "0.6439489", "0.6430223", "0.6421945", "0.640484", "0.64045286", "0.6396693", "0.6389339", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6371406", "0.6369708", "0.6369708", "0.6369708", "0.63657963", "0.6362729", "0.63556635", "0.6348277", "0.63436544", "0.63313985", "0.63313985", "0.63313985", "0.6330493", "0.63185257", "0.6316595", "0.631239", "0.6292067", "0.6288136", "0.6284039", "0.62822425", "0.62687325", "0.6268188", "0.6241863", "0.62405676", "0.62405676", "0.62405676", "0.62405676", "0.62361306", "0.6231143", "0.6219376", "0.620456", "0.62042487", "0.6179306", "0.61687624", "0.6162932", "0.6151608", "0.6140814", "0.61196226", "0.6111299", "0.61085993", "0.61045814", "0.6103032", "0.61003804", "0.60974985", "0.609694", "0.6084399", "0.60816514", "0.6076624", "0.60626894", "0.60624105", "0.60412365", "0.6039896", "0.603406", "0.60305125", "0.6029997", "0.60263616", "0.60179776", "0.6012321", "0.600763", "0.60035115", "0.60024226", "0.60013235", "0.5999489" ]
0.6296313
53
Menu callback ask for confirmation of mongo entity deletion.
function mongo_node_page_delete($form, $form_state, $entity_type, $entity) { $form['#entity'] = $entity; $uri = entity_uri($entity_type, $entity); return confirm_form($form, t('Are you sure you want to delete %title', array('%title' => $entity->title)), $uri['path'], t('This action cannot be undone'), t('Delete'), t('Cancel') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_page_delete_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n $entity = $form['#entity'];\n $entity->delete();\n\n $entity_type = $entity->entityType();\n $info = entity_get_info($entity_type);\n $bundle_key = $info['bundle keys']['bundle'];\n $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label'];\n\n drupal_set_message(t('@label %title deleted',\n array(\n '@label' => $bundle_label,\n '%title' => $entity->title)\n )\n );\n }\n\n $form_state['redirect'] = '<front>';\n}", "protected function confirmDelete() {\n\t}", "public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }", "function delete()\n\t{\n\t\t$model = $this->getModel();\n\t\t$viewType\t= JFactory::getDocument()->getType();\n\t\t$view = $this->getView($this->view_item, $viewType);\n\t\t$view->setLayout('confirmdelete');\n\t\tif (!JError::isError($model)) {\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t//used to load in the confirm form fields\n\t\t$view->setModel($this->getModel('list'));\n\t\t$view->display();\n\t}", "function procMenuAdminDeleteItem()\n\t{\n\t\t// argument variables\n\t\t$args = new stdClass();\n\t\t$args->menu_srl = Context::get('menu_srl');\n\t\t$args->menu_item_srl = Context::get('menu_item_srl');\n\t\t$args->is_force = Context::get('is_force');\n\n\t\t$returnObj = $this->deleteItem($args);\n\t\tif(is_object($returnObj))\n\t\t{\n\t\t\t$this->setError($returnObj->error);\n\t\t\t$this->setMessage($returnObj->message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setMessage('success_deleted');\n\t\t}\n\n\t\t$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMenuAdminManagement', 'menu_srl', $args->menu_srl);\n\t\t$this->setRedirectUrl($returnUrl);\n\t}", "public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}", "function procMenuAdminDeleteButton()\n\t{\n\t\t$menu_srl = Context::get('menu_srl');\n\t\t$menu_item_srl = Context::get('menu_item_srl');\n\t\t$target = Context::get('target');\n\t\t$filename = Context::get('filename');\n\t\tFileHandler::removeFile($filename);\n\n\t\t$this->add('target', $target);\n\t}", "public function doDeleteAction()\n {\n $chapId = Zend_Auth::getInstance()->getIdentity()->id; \n //get id of the menu to be deleted from the view\n $chapMenuId = trim($this->_request->id);\n $menuDeleteModel = new Pbo_Model_WlMenuItems();\n //pass the chap ID and the menu id of the menu to be deleted to the model\n $menuDeleteModel->deleteMenu($chapId, $chapMenuId);\n\n //message when the menu is deleted\n $this->_helper->flashMessenger->addMessage('Menu item successfully deleted.');\n\n \n $this->_redirect( '/menu' );\n\n }", "function onDelete($param)\n {\n $key=$param['key'];\n \n // define duas acoes\n $action1 = new TAction(array($this, 'Delete'));\n \n // define os parametros de cada acao\n $action1->setParameter('key', $key);\n \n //encaminha a chave estrangeira\n $action1->setParameter('fk', filter_input(INPUT_GET, 'fk'));\n\n // exibe um dialogo ao usuario\n new TQuestion('Deseja realmente excluir o registro ?', $action1, $action2);\n }", "public function confirmAction() {\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\n\t\ttry {\n\t\t\tif (is_numeric ( $id )) {\n\t\t\t\t$this->view->back = \"/admin/$controller/edit/id/$id\";\n\t\t\t\t$this->view->goto = \"/admin/$controller/delete/id/$id\";\n\t\t\t\t$this->view->title = $this->translator->translate ( 'Are you sure you want to delete the invoice selected?' );\n\t\t\t\t$this->view->description = $this->translator->translate ( 'The invoice will not be longer available' );\n\t\t\t\t$record = $this->invoices->find ( $id );\n\t\t\t\t$this->view->recordselected = $record ['number'] . \" - \" . Shineisp_Commons_Utilities::formatDateOut ( $record ['invoice_date'] );\n\t\t\t} else {\n\t\t\t\t$this->_helper->redirector ( 'list', $controller, 'admin', array ('mex' => $this->translator->translate ( 'Unable to process the request at this time.' ), 'status' => 'danger' ) );\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\techo $e->getMessage ();\n\t\t}\n\t\n\t}", "public function confirmDelete( )\r\n {\r\n throw new KVDdom_RedactieException( 'Kan het verwijderen niet bevestigen van een object dat niet verwijderd is.' );\r\n }", "public function confirmAction() {\r\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\r\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\r\n\t\ttry {\r\n\t\t\tif (is_numeric ( $id )) {\r\n\t\t\t\t$this->view->back = \"/admin/$controller/edit/id/$id\";\r\n\t\t\t\t$this->view->goto = \"/admin/$controller/delete/id/$id\";\r\n\t\t\t\t$this->view->title = $this->translator->translate ( 'Are you sure you want to delete the selected record?' );\r\n\t\t\t\t$this->view->description = $this->translator->translate ( 'If you delete the selected bank information, your customers will not be able to pay you with this method of payment' );\r\n\t\r\n\t\t\t\t$record = $this->productsattributes->find ( $id )->toArray();\r\n\t\t\t\t$this->view->recordselected = $record ['code'];\r\n\t\t\t} else {\r\n\t\t\t\t$this->_helper->redirector ( 'list', $controller, 'admin', array ('mex' => $this->translator->translate ( 'Unable to process the request at this time.' ), 'status' => 'danger' ) );\r\n\t\t\t}\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\techo $e->getMessage ();\r\n\t\t}\r\n\t}", "public function deleteAction() {\n \n }", "function confirm()\n\t{\n\t\tglobal $tree, $rbacsystem, $rbacadmin;\n\t\t// AT LEAST ONE OBJECT HAS TO BE CHOSEN.\n\t\tif (!isset($_SESSION[\"saved_post\"]))\n\t\t{\n\t\t\t$this->ilias->raiseError($this->lng->txt(\"no_checkbox\"),$this->ilias->error_obj->MESSAGE);\n\t\t}\n\n\t\t// FOR ALL SELECTED OBJECTS\n\t\tforeach ($_SESSION[\"saved_post\"] as $id)\n\t\t{\n\t\t\t$type = ilBookmark::_getTypeOfId($id);\n\n\t\t\t// get node data and subtree nodes\n\t\t\tif ($this->tree->isInTree($id))\n\t\t\t{\n\t\t\t\t$node_data = $this->tree->getNodeData($id);\n\t\t\t\t$subtree_nodes = $this->tree->getSubTree($node_data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// delete tree\n\t\t\t$this->tree->deleteTree($node_data);\n\n\t\t\t// delete objects of subtree nodes\n\t\t\tforeach ($subtree_nodes as $node)\n\t\t\t{\n\t\t\t\tswitch ($node[\"type\"])\n\t\t\t\t{\n\t\t\t\t\tcase \"bmf\":\n\t\t\t\t\t\t$BookmarkFolder = new ilBookmarkFolder($node[\"obj_id\"]);\n\t\t\t\t\t\t$BookmarkFolder->delete();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"bm\":\n\t\t\t\t\t\t$Bookmark = new ilBookmark($node[\"obj_id\"]);\n\t\t\t\t\t\t$Bookmark->delete();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Feedback\n\t\tilUtil::sendSuccess($this->lng->txt(\"info_deleted\"),true);\n\n\t\t$this->view();\n\t}", "function callbackDeletePopup() {\n if ($this->deleted) {\n return;\n }\n $child = $this->deleteMenuItem->child;\n $name = $this->name;\n if (!$name) { \n $name = 'UNNAMED';\n }\n $child->set_text('Delete Field : '. $name);\n $this->deleteMenuItem->show();\n \n }", "public function actionDelete() {}", "public function actionDelete() {}", "protected function afterDelete()\r\n {\r\n }", "function travel_type_form_delete_confirm($form, &$form_state, $entity_type) {\n // Store the entity in the form.\n $form_state['entity_type'] = $entity_type;\n\n // Show confirm dialog.\n $message = t('Are you sure you want to delete entity type %title?', array('%title' => entity_label('entity_type', $entity_type)));\n return confirm_form(\n $form,\n $message,\n 'travel/' . entity_id('travel_type', $entity_type),\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "public function deleteAction()\n {\n \n }", "public function deleteAction() {\n\t\tif(!isset($this->params['cancel'])) {\n\n\t\t\t// XXX: Maybe do some hook call validation here?\n\n\t\t\t// auto call the hooks for this module/action\n\t\t\tAPI::callHooks(self::$module, $this->action, 'controller', $this);\n\n\t\t\t// delete an entry\n\t\t\t$host = $this->_model->delete();\n\t\t}\n\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t}", "public function deleteAction() {\n\t\t$this->_notImplemented();\n\t}", "public function confirmingDeletion()\n {\n $this->confirmingExpenseDeletion = true;\n }", "public function delete_command(){\n\t\t$this->layout = 'ajax';\n\t\n\t\tif($this->request->is('post')){\n\t\t\t$command_id = $this->request->data['command_id'];\n\t\n\t\t\t$obj_command = $this->Command->findBy('IDCommand', $command_id);\n\t\t\tif($obj_command->saveField('Status', 0)){\n\t\t\t\techo json_encode(array('success'=>true,'msg'=>__('Eliminado con &eacute;xito.')));\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\techo json_encode(array('success'=>false,'msg'=>__('Error inesperado.')));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\n\t}", "function deleteCompleted() {\n\n if ( isset( $_POST['confirm'] ) ) {\n\n // User has confirmed deletion: delete the to-dos\n if ( !checkAuthToken() ) return;\n Todo::deleteCompletedForUser( User::getLoggedInUser() );\n header( \"Location: \" . APP_URL . \"?action=listTodos\" );\n\n } else {\n\n // User has not confirmed deletion yet: display the confirm dialog\n require( TEMPLATE_PATH . \"/deleteCompleted.php\" );\n }\n}", "public function actionDelete ()\n\t\t{\n\t\t\tif (Yii::$app->request->isAjax)\n\t\t\t{\n\t\t\t\t$id = Yii::$app->request->post('id');\n\t\t\t\t$menu = Menu::findOne($id);\n\t\t\t\tif ($menu !== null)\n\t\t\t\t{\n\t\t\t\t\tif (!$menu->deleteWithChildren())\n\t\t\t\t\t\techo Json::encode(current($menu->firstErrors));\n\t\t\t\t\telse\n\t\t\t\t\t\techo 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tYii::$app->end();\n\t\t}", "public function deleteDance(){\n $data = [\n 'status' => ''\n ];\n if(isset($_GET['id'])) {\n $id = $_GET['id'];\n\n if (isset($_POST['confirm'])) {\n if ($_POST['confirm'] == 'Yes') {\n $this->adminModel->deleteDance($id);\n $data['status'] = 'Event has been deleted';\n $this->view('admins/homepage', $data);\n } else if ($_POST['confirm'] == 'No') {\n $data['status'] = 'Event could not be deleted please contact the administrator';\n $this->view('admins/homepage', $data);\n }\n }\n }\n $this->view('admins/deleteDance' , $data);\n\n }", "public function undeleteAction(){\n\t}", "protected function afterDelete()\n {\n }", "public function deleted(MenuItem $menuItem)\n {\n //\n }", "public function deleteAction() {\n $post_data = $request = $this->getRequest()->getPost();\n\n $mapper = new Application_Model_DistractionMapper();\n $anzDeletedRows = $mapper->delete($post_data['id']);\n\n $this->view->success = ($anzDeletedRows > 0);\n }", "public function after_delete() {}", "public function action_delete()\n {\n\t $this->template = View::forge('template-admin');\n\n $post = Input::post();\n $entry = Model_Event::find_by_pk($post[\"id\"]);\n\t\tif ($entry){\n\t\t\tif(!$entry->delete()){\n\t\t\t\t$data[\"events\"] = Model_Event::find_all();\n\t\t\t\t$this->template->title = \"イベント一覧\";\n\t\t\t\t$this->template->content = View::forge('event/index', $data);\n\t\t\t}\n\t\t}\n\t\t$data[\"events\"] = Model_Event::find_all();\n\t\t$this->template->title = \"イベント一覧\";\n\t\t$this->template->content = View::forge('event/index', $data);\n }", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "protected function deleteAction()\n {\n }", "function OnAfterDeleteItem(){\n }", "function view9_lendingform_delete_confirm_submit($form, &$form_state) {\r\n if ($form_state['values']['confirm']) {\r\n $gallery = lendingform_load($form_state['values']['pid']);\r\n lendingform_delete($form_state['values']['pid']);\r\n watchdog(PROJECT_ENTITY, t(\"Project $gallery->pid was deleted\"));\r\n $form_state['redirect'] = 'gallery/' . $gallery->pid;\r\n } else {\r\n $form_state['redirect'] = 'gallerys';\r\n }\r\n}", "public static function command_delete_confirm($options, $message = \"This will delete a row from the database.\\n\") {\r\n if (isset($options['noconfirm']) && $options['noconfirm'])\r\n return true;\r\n\r\n echo $message;\r\n echo \"Coninue (yes/no)\\n> \";\r\n while (!in_array($line = trim(fgets(STDIN)), array('yes', 'no'))) {\r\n\r\n echo \"enter one of (yes/no):\\n> \";\r\n }\r\n return $line == 'yes';\r\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function deleteDocument() {\n\n // should get instance of model and run delete-function\n\n // softdeletes-column is found inside database table\n\n return redirect('/home');\n }", "function handleDeleteRelatedPerson(EventContext $context)\n {\n $program_item = $this->storeProgramItem();\n $program_item->removeRelatedPersonById(fmGetVar(\"related_person_id\"));\n RelatedPerson::deleteRelatedPerson(fmGetVar(\"related_person_id\"));\n $context->addActionMessage(\"Deleted 1 Related Person.\");\n $context->setForward(dirname(__FILE__) . \"/program_item_editor.php\");\n }", "public function deleting()\n {\n # code...\n }", "function delete() {\r\n\t\t$this->user_group_model->can_access(DELETE_MENU, null, null);\r\n\t\t$menuid = $this->uri->segment(3);\r\n\t\t$this->load->model('menu_model');\r\n\t\t$this->menu_model->deleteMenu($menuid);\r\n\t\t\t\r\n\t\tredirect('menu', 'lomenuion');\r\n\t}", "function path_admin_delete_confirm_submit($form, &$form_state) {\n if ($form_state['values']['confirm']) {\n path_admin_delete($form_state['values']['pid']);\n $form_state['redirect'] = 'admin/build/path';\n return;\n }\n}", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "public function delete()\n {\n if (post_param_integer('confirmed', 0) != 1) {\n $url = get_self_url();\n $text = do_lang_tempcode('DELETE_INVOICE');\n\n $hidden = build_keep_post_fields();\n $hidden->attach(form_input_hidden('confirmed', '1'));\n $hidden->attach(form_input_hidden('from', get_param_string('from', 'browse')));\n\n return do_template('CONFIRM_SCREEN', array('_GUID' => '45707062c00588c33726b256e8f9ba40', 'TITLE' => $this->title, 'FIELDS' => $hidden, 'PREVIEW' => $text, 'URL' => $url));\n }\n\n $GLOBALS['SITE_DB']->query_delete('invoices', array('id' => get_param_integer('id')), '', 1);\n\n $url = build_url(array('page' => '_SELF', 'type' => post_param_string('from', 'browse')), '_SELF');\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "public function deleteAction() {\n\t\t\t\t\t\tif (! $this->CheckTransactionUser ()) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tZend_Session::start ();\n\t\t\t\t\t\t\t\t$this->redirectToIndex();\n\t\t\t\t\t\t\t} catch ( Zend_Session_Exception $e ) {\n\t\t\t\t\t\t\t\techo \"Message:\" . $e->getMessage ();\n\t\t\t\t\t\t\t\tsession_start ();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t$lan = $this->_getParam ( 'lang' );\n\t\t\t\t\t\t\t\t$id = $this->_getParam ( 'id' );\n $actions= $this->_getParam ( 'actions' );\n //$this->getRequest ()->getPost ( 'process' )==1\n \n\t\t\t\t\t\t\t\tif ( $actions=='delete') {\n\t\t\t\t\t\t\t\t\t$this->unlinkImageFolder ( $id );\n\t\t\t\t\t\t\t\t\t$id = $this->_getParam ( 'id' );\n\t\t\t\t\t\t\t\t\t$deleteOrganizms = $this->GetModelOrganize->deleteAllDataFromOrganismeMenu($id);\n\t\t\t\t\t\t\t\t\t\t\tif ($deleteOrganizms) {\n\t\t\t\t\t\t\t\t\t\t\t\t$lan = $this->_getParam ( 'lang' );\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_redirect ( $lan . '/organisme/index?success=delete' );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/* In cases of multiple delete */\n\t\t\t\t\t\t\t\tif ($this->getRequest ()->getPost ( \"BtnDelOrg\" )) {\n\t\t\t\t\t\t\t\t\tif ($this->getRequest ()->getPost ( \"multiAction\" ) == \"Delete\") {\n\t\t\t\t\t\t\t\t\t\t$idOrganisme = $this->getRequest ()->getPost ( \"checkRow\" );\n\t\t\t\t\t\t\t\t\t\t$lan = $this->_getParam ( 'lang' );\n\t\t\t\t\t\t\t\t\t\tfor($i = 0; $i < count ( $idOrganisme ); $i ++) {\n\t\t\t\t\t\t\t\t\t\t\t$id = $idOrganisme [$i];\n\t\t\t\t\t\t\t\t\t\t\t$this->unlinkImageFolder ( $id );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$this->deletemulti ();\n\t\t\t\t\t\t\t\t\t\t$this->_redirect ( $lan . '/Organisme/index?success=delete' );\n\t\t\t\t\t\t\t\t\t\texit ();\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$lan = $this->_getParam ( 'lang' );\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<script type=\"text/javascript\">\n\t\t\t\t function seleteDel(){\n\t\t\t\t alert(\"Please select on item to delete!\");\n\t\t\t\t return false;\n\t\t\t\t }\n\t\t\t\t seleteDel();\n </script>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t// $this->_redirect ( $lan\n\t\t\t\t\t\t\t\t\t// .'/Organisme/index/' );\n\t\t\t\t\t\t\t\t\t\t// exit();\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} catch ( ErrorException $exerr ) {\n\t\t\t\t\t\t\t\techo \"Messsage\" . $exerr->getMessage ();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "function displayDeleteConfirmation()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// formular sent\n\t\tif ($_POST[\"form\"][\"delete\"])\n\t\t{\n\t\t\t$ini = true;\n\t\t\t$db = false;\n\t\t\t$files = false;\n\n\t\t\t/* disabled\n\t\t\tswitch ($_POST[\"form\"][\"delete\"])\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t\tcase 2:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\t$db = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\t$db = true;\n\t\t\t\t\t$files = true;\n\t\t\t\t\tbreak; \n\t\t\t}\n\t\t\t*/\n\n\t\t\t$msg = $this->setup->getClient()->delete($ini,$db,$files);\n\n\t\t\tilUtil::sendInfo($this->lng->txt(\"client_deleted\"),true);\n\t\t\tilUtil::redirect(\"setup.php\");\n\t\t}\n\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_delete\"));\n\n\t\t// output\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.form_delete_client.html\", \"setup\");\n\n\t\t// delete panel\n\t\t$this->tpl->setVariable(\"FORMACTION\", \"setup.php?cmd=gateway\");\n\t\t$this->tpl->setVariable(\"TXT_DELETE\", $this->lng->txt(\"delete\"));\n\t\t$this->tpl->setVariable(\"TXT_DELETE_CONFIRM\", $this->lng->txt(\"delete_confirm\"));\n\t\t$this->tpl->setVariable(\"TXT_DELETE_INFO\", $this->lng->txt(\"delete_info\"));\n\n\t\t$this->checkPanelMode();\n\t}", "public function deleteAction() {\n parent::deleteAction();\n }", "public function confirmDeleteBook()\n\t{\n\t\t$this->delete_book_model->deleteBook($this->input->post('bookISBN'));\n\t\tredirect($this->config->base_url());\n\t}", "public function afterDeleteCommit(): void\n {\n }", "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "function node_delete_confirm(&$form_state, $node) {\n $form['nid'] = array(\n '#type' => 'value',\n '#value' => $node->nid,\n );\n\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $node->title)),\n isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "public function delete()\n\t{\n\t\t$selection = $this->input->post('selection');\n\t\t$ignore = implode('|', array_diff($this->ignore_list, $selection));\n\t\t$this->member->ignore_list = $ignore;\n\t\t$this->member->save();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make($this->index_url, $this->query_string));\n\t}", "public function deleteAction()\n {\n }", "public function deleteAction(){\n $this->_helper->json(\"Esto no esta implementado\");\n }", "public function deleteAction()\n {\n $request = $this->getRequest();\n if($request->isPost()){\n $id = $this->params()->fromPost('id');\n $combo = $this->modelCombo->findOneBy(array('id'=>$id));\n $combo->setIsdelete(1);\n $this->modelCombo->edit($combo);\n //$this->model->delete(array('id'=>$id));\n echo 1;\n }\n die;\n\n }", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "public function onBeforeDelete();", "function admin_delete($id){\n\t\t$this->loadModel('Menu');\n\t\t$this->Menu->delete($id);\n\t\t$this->Session->setFlash('Le contenu a bien été supprimé'); \n\t\t$this->redirect('admin/menus/index'); \n\t}", "function travel_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('travel', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('travel', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "public function action_delete_delete(){\r\n\t\t\t//permission check\r\n\t\t\tif(!$this->user->can('Assumeownership', array('owner' => $this->user->id))){\r\n\t\t\t\t$this->throw_permission_error(Constant::NOT_OWNER);\r\n\t\t\t}\r\n\r\n\t\t\tif(!isset($this->myID) || !isset($this->myID2))\r\n\t\t\t{\r\n\t\t\t\t$error_array = array(\r\n\t\t\t\t\t\"error\" => \"Required Parameters Missing\",\r\n\t\t\t\t\t\"desc\" => \"Required Parameters Missing.\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$this->modelNotSetError($error_array);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$subject = Ent::eFact($this->myID, $this->myID2);\r\n\t\t\t$subject->delete_with_deps();\r\n\t\t\treturn $subject->getBasics();\r\n\t\t}", "function _mica_datasets_node_delete_confirm($form, &$form_state, $node) {\n if ($node->type === 'dataset') {\n $form['#node'] = $node;\n // Always provide entity id in the same form key as in the entity edit form.\n $form['nid'] = array('#type' => 'value', '#value' => $node->nid);\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $node->title)),\n 'node/' . $node->nid,\n t('It will also delete all its variables, queries and study connectors.')\n . '<br />' . t('This action cannot be undone.') . '<br /><br />',\n t('Delete'),\n t('Cancel')\n );\n }\n module_load_include('inc', 'node', 'node.pages');\n return node_delete_confirm($form, $form_state, $node);\n}", "public function DELETE() {\n\t\t$this->scriptForceHint('DELETE');\n\t}", "public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif ($item) {\n\t\t\t$item->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, $this::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "public function delete( $option );", "protected function _postDelete()\n\t{\n\t\t//register events\n\t\t\\Base\\Event::trigger('user.delete',$this->id);\n\t\t//end events\n\t}", "protected function afterDelete()\r\n {\r\n parent::afterDelete();\r\n MenuBuilderModule::getInstance()->getDataAdapter()->removeItemFromMenus($this->itemid);\r\n return true;\r\n }", "protected function _postDelete()\n\t{\n\t}", "function OnBeforeDeleteItem(){\n }", "function handleDeleteProgramItem(EventContext $context)\n {\n ProgramItem::deleteProgramItem(fmGetVar(\"program_item_id\"));\n $context->addActionMessage(\"Deleted 1 \" . ProgramItem::getObjectClassDisplayName(fmGetVar(\"program_item_class\")));\n $context->setForward(dirname(__FILE__) . \"/program_item_selector.php\");\n }", "public function _event_before_delete() {\n\t\tstatic::$_delete['roles'] = $this->roles;\n\t}", "function confirmDelete() {\n //print_r($_REQUEST);\n $action = $this->action;\n $entity = strtolower($_REQUEST['entity']);\n $to_delete = array();\n $needle = 'markdelete' . ($entity);\n $needle2 = '---'; \n foreach($_REQUEST as $key => $value) {\n if(strpos($key, $needle) !== false) {\n if(strpos($value, $needle2) !== false) {\n\t$id_properties = explode($needle2, $value);\n\t//print_r ($id_properties);\n\t$final_value = array();\n\tforeach($id_properties as $prop) {\n\t //print_r('\\n' . $prop);\n\t /* convert 'id[x]=y'\n\t * to x => y */\n\t $first = strpos($prop, ':');\n\t $firstly = substr($prop, 0, $first);\n\t $secondly = substr($prop, $first +1);\n\t $final_value[$firstly] = $secondly;\n\t} \n\t$value = $final_value;\n }\n $to_delete[] = $value;\n }\n }\n //print_r($to_delete);\n\n if (isset($to_delete[0])) {\n if(is_array($to_delete[0])){\n /* no primary key */\n $conditions = $to_delete;\n $delete_conditions = $to_delete;\n }\n else {\n /* primary key, an integer */\n $conditions = array('id' => $to_delete);\n $delete_conditions = array($entity . '_id' => $to_delete);\n }\n }\n else {\n $conditions = array('id' => -1);\n $delete_conditions = array($entity . '_id' => -1);\n }\n //print_r($conditions);\n //print_r($delete_conditions);\n if(isset($_REQUEST['submitted_confirm'])) {\n /* delete listed things */\n $this->deleteThings($entity, $delete_conditions);\n //return $this->modifyTemplate();\n }\n $returnurl = $this->action . '?mode=' . $entity .'_admin';\n $confirmurl = $this->action . '?mode=delete&entity=' . $entity;\nif (isset($_REQUEST['parent_entity']) && isset($_REQUEST['parent_id'])){\n $parent_entity = $_REQUEST['parent_entity'];\n $parent_id = $_REQUEST['parent_id'];\n $conditions = array(strtolower($parent_entity) . '_id' => $parent_id);\n $extra = '&parent_entity='.$parent_entity.'&parent_id='.$parent_id;\n $returnurl .= '&entity='. $entity . $extra;\n $confirmurl .= $extra;\n}\nelse {\n $parent_entity = null;\n $parent_id = null;\n}\n\n $item_list = $this->getListFromDB(strtolower($entity . '_view'), $conditions, null);\n /* make sure unimelb templates are visible in view */\n $properties = array();\n if(count($item_list) > 0 ){\n $properties1 = array_keys(get_object_vars($item_list[0]));\n $properties = str_replace('_', ' ', $properties1);\n }\n /* screen output*/\n $t = 'admin-delete.html';\n $t = $this->twig->loadTemplate($t);\n $output = $t->render(array(\n\t\t\t 'modes' => $this->user_visible_modes,\n\t\t\t 'error' => $this->error,\n\t\t\t 'entity' => $entity,\n\t\t\t 'action' => $confirmurl,\n\t\t\t 'returnurl' => $returnurl,\n\t\t\t 'properties' => $properties,\n\t\t\t 'item_list' => $item_list,\n\t\t\t 'id_list' => $to_delete,\n\t\t\t 'parent_entity' => $parent_entity,\n\t\t\t 'parent_id' => $parent_id\n\t\t\t ));\n return $output; \n\n}", "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $traineedoc = Mage::getModel('bs_traineedoc/traineedoc');\n $traineedoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_traineedoc')->__('Trainee Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('There was an error deleting trainee document.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('Could not find trainee document to delete.')\n );\n $this->_redirect('*/*/');\n }", "function delete() {\n\n $document = Doctrine::getTable('DocDocument')->find($this->input->post('doc_document_id'));\n $node = Doctrine::getTable('Node')->find($document->node_id);\n\n if ($document && $document->delete()) {\n//echo '{\"success\": true}';\n\n $this->syslog->register('delete_document', array(\n $document->doc_document_filename,\n $node->getPath()\n )); // registering log\n\n $success = 'true';\n $msg = $this->translateTag('General', 'operation_successful');\n } else {\n//echo '{\"success\": false}';\n $success = 'false';\n $msg = $e->getMessage();\n }\n\n $json_data = $this->json->encode(array('success' => $success, 'msg' => $msg));\n echo $json_data;\n }", "public function post_delete(){\n\t\t\t\n\t\t$data \t= \tFiledb::_rawurldecode(json_decode(stripcslashes(Input::get('data')), true));\n\n\t\tif($data[\"delete\"] == 'delete'){\n\t\t\t\n\t\t\t$status = Users::delete($data[\"id\"]);\n\n\t\t\treturn ($status) ? Utilites::success_message(__('forms.deleted_word')) : Utilites::fail_message(__('forms_errors.undefined'));\n\t\t}\n\t}", "public function onAfterDelete();", "function DeleteEntry() {\n\t\t//to choose an option to delete the selected user. \n\n //Select all contacts in the addressbook\n $data['display_block'] = $this->AddressBook->selectContacts();\n\n //Render the DeleteEntry View. All the options for the \n\t\t//the Select box on DeleteEntry view are in the field $data['display_block']\n $this->load->view('DeleteEntry', $data);\t\n\t}", "public function deleteAction()\n {\n if ($this->request->isPost()) {\n $ids = $this->request->getPost('ids');\n\n ZArrayHelper::toInteger($ids);\n\n foreach ($ids as $id) {\n /**\n * @var MenuTypes $menu_type\n */\n $menu_type = MenuTypes::findFirst($id);\n /**\n * @var MenuDetails[] $menu_details\n */\n $menu_details = MenuDetails::find([\n 'menu_type_id = ?0',\n 'bind' => [$id]\n ]);\n foreach ($menu_details as $detail) {\n $detail->delete();\n }\n if ($menu_type->delete()) {\n $this->flashSession->success($menu_type->name . ' deleted successful');\n\n } else {\n $this->flashSession->error($menu_type->name . ' deleted fail');\n }\n }\n }\n return $this->response->redirect('/admin/menu/');\n }", "function confirmation_delete(){\n\t\t\tif($this->check_session->user_session() && $this->check_session->get_level()==100){\n\t\t\t\tif($this->uri->segment(3)!='99'){ //jika bukan user pusat\n\t\t\t\t\t$data['url']\t\t= site_url('rsa_tambah_em/exec_delete/'.$this->uri->segment(3));\n\t\t\t\t\t$data['message']\t= \"Apakah anda yakin akan menghapus data ini ( kode : \".$this->uri->segment(3).\") ?\";\n\t\t\t\t\t$this->load->view('confirmation_',$data);\n\t\t\t\t}else{ //jika user pusat\n\t\t\t\t\t$data['class']\t = 'option box';\n\t\t\t\t\t$data['class_btn']\t = 'ya';\n\t\t\t\t\t$data['message'] = 'Unit pusat tidak diijinkan untuk dihapus';\n\t\t\t\t\t$this->load->view('messagebox_',$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshow_404('page');\n\t\t\t}\n\t\t}", "public function deleteAction() : object\n {\n if ($_SESSION['permission'] === \"admin\") {\n $form = new DeleteForm($this->di);\n $form->check();\n\n $this->page->add(\"user/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $this->page->render([\n \"title\" => \"Delete an item\",\n ]);\n }\n $this->di->get(\"response\")->redirect(\"user/login\");\n }", "public function deleteBackupConfirm()\n {\n $delete_backups = $this->getPost('backups');\n $type = $this->getPost('type');\n $backups = $this->validateBackups($delete_backups, $type);\n $variables = array(\n 'settings' => $this->settings,\n 'backups' => $backups,\n 'backup_type' => $type,\n 'method' => $this->getPost('method'),\n 'errors' => $this->errors,\n 'view_helper' => $this->view_helper,\n 'url_base' => $this->url_base,\n 'menu_data' => $this->backup_lib->getDashboardViewMenu(),\n 'section' => 'db_backups',\n 'theme_folder_url' => plugin_dir_url(self::name)\n );\n \n //$template = 'backuppro/delete_confirm';\n \n //ee()->view->cp_page_title = $this->services['lang']->__('dashboard');\n $template = 'admin/views/delete_confirm';\n $this->renderTemplate($template, $variables);\n }", "function after_delete() {}", "function guifi_domain_delete_confirm($form_state,$params) {\n\n $form['help'] = array(\n '#type' => 'item',\n '#title' => t('Are you sure you want to delete this domain?'),\n '#value' => $params['name'],\n '#description' => t('WARNING: This action cannot be undone. The domain and it\\'s related information will be <strong>permanently deleted</strong>, that includes:<ul><li>The domain</li><li>The related hosts</li><li>The related delegations</li></ul>If you are really sure that you want to delete this information, press \"Confirm delete\".'),\n '#weight' => 0,\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Confirm delete'),\n '#name' => 'confirm',\n '#weight' => 1,\n );\n drupal_set_title(t('Delete domain: (%name)',array('%name' => $params['name'])));\n variable_set('guifi_refresh_dns',time());\n return $form;\n}", "public function annimalDelAction()\n {\n }", "public function post_delete() {\n //try to delete the account\n $status = AuxUser::deleteUser();\n if ($status[0]) {\n //if the delete user process worked, log out\n echo '<script>alert(\"Account Deleted\");</script>';\n Response::redirect('/profile/logOut');\n } else {\n //if not, print the error message\n echo '<script>alert(\"'.$status[1].'\");</script>';\n Response::redirect('/profile');\n }\n }", "public function handleDelete()\n {\n Craft::$app->getDb()->createCommand()\n ->delete(Table::REVISIONS, ['id' => $this->owner->revisionId])\n ->execute();\n }", "public function deleteAction()\n {\n \t$id = (int) $this->params()->fromRoute('id', 0);\n \tif (!$id) {\n \t\treturn $this->redirect()->toRoute('order');\n \t}\n \t// Retrieve the current user\n \t$current_user = Functions::getUser($this);\n \t \n \t// Retrieve the allowed routes\n \t$allowedRoutes = Functions::getAllowedRoutes($this);\n\n \t// Retrieve the user's instance\n \t$instance_id = Functions::getInstanceId($this);\n \t\n \t// Retrieve the order product row\n \t$orderProduct = $this->getOrderProductTable()->get($id);\n \t \n \t// Retrieve the order\n \t$order = $this->getOrderTable()->get($orderProduct->order_id);\n\n \t// Retrieve the product\n \t$product = $this->getProductTable()->get($orderProduct->product_id);\n \t \n \t// Retrieve the user validation from the post\n \t$request = $this->getRequest();\n \tif ($request->isPost()) {\n \t\t$del = $request->getPost('del', 'No');\n \n\t\t\t// And delete the entity from the database in the \"yes\" case\n \t\tif ($del == $this->getServiceLocator()->get('translator')->translate('Yes')) {\n \t\t\t$id = (int) $request->getPost('id');\n \t\t\t$this->getOrderProductTable()->delete($id);\n \t\t}\n \n \t\t// Redirect to the index\n \t\treturn $this->redirect()->toRoute('orderProduct/index', array('id' => $order->id));\n \t}\n \n \treturn array(\n \t\t'current_user' => $current_user,\n \t\t'allowedRoutes' => $allowedRoutes,\n \t\t'title' => 'Order',\n \t\t'id' => $id,\n \t\t'order' => $order,\n \t\t'product' => $product\n \t);\n }", "public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }", "public function onConfirmDelete(GridRowEventData $event)\n {\n $presenter = $event->getControl()->getPresenter();\n $id = $event->getId();\n try {\n $this->adminFacade->remove($id);\n $presenter->flashMessage(\n self::MESSAGE_SUCCESS_DELETE,\n AdminPresenter::STATUS_SUCCESS,\n null,\n AdminPresenter::ICON_SUCCESS,\n 75\n );\n $presenter->redirect(AdminPresenter::ACTION_DEFAULT);\n return;\n } catch (AdminException $exc) {\n $presenter->flashMessage(\n $exc->getMessage(),\n AdminPresenter::STATUS_DANGER,\n null,\n AdminPresenter::ICON_DANGER,\n 100\n );\n $presenter->redirect(AdminPresenter::ACTION_DEFAULT);\n }\n }", "public function onAfterDelete() {\n if (!($this->owner instanceof \\SiteTree))\n {\n $this->doDeleteDocumentIfInSearch();\n }\n }", "public function deleteAction() {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('backend-guildes-list');\n }\n $oTable = $this->getTableGuilde();\n $oEntite = $oTable->findRow($id);\n $oTable->delete($oEntite);\n $this->flashMessenger()->addMessage($this->_getServTranslator()->translate(\"La guilde a été supprimée avec succès.\"), 'success');\n return $this->redirect()->toRoute('backend-guildes-list');\n }", "function view9_lendingform_delete_confirm($form, &$form_state, $gallery) {\r\n if (isset($form_state['gallery'])) {\r\n $gallery = $form_state['gallery'];\r\n }\r\n $form['#gallery'] = $gallery;\r\n // Always provide entity id in the same form key as in the entity edit form.\r\n $form['pid'] = array('#type' => 'value', '#value' => $gallery->pid);\r\n return confirm_form($form, t('Are you sure you want to delete this lendingform?'), 'gallerys', t('This action cannot be undone.'), t('Delete'), t('Cancel')\r\n );\r\n}", "public function delete(){\n $this->product->id = $_GET['delete_id'];\n\n // delete the product\n if($this->product->delete()){\n echo \"<div class=\\\"alert alert-success alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">&times;</button>\";\n echo \"Object was deleted.\";\n echo \"</div>\";\n }\n\n // if unable to delete the product\n else{\n echo \"<div class=\\\"alert alert-danger alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">&times;</button>\";\n echo \"Unable to delete object.\";\n echo \"</div>\";\n }\n }", "public function actionDelete()\n {\n $catalog = $this->catalog;\n $id = (int) Yii::app()->request->getParam(\"id\", 0 );\n $category_id = (int) Yii::app()->request->getParam(\"category_id\", \"\" );\n\n $array = array(\"catalog\"=>$this->catalog);\n if( $category_id>0 )$array[\"category_id\"] = $category_id;\n if( !empty( $this->catalog ) )\n {\n $item = $catalog::fetch($id);\n if( $item->id >0 )\n {\n $item->delete();\n $this->redirect( SiteHelper::createUrl(\"/console/subscribe\", $array ) );\n }\n }\n\n $this->redirect( SiteHelper::createUrl(\"/console/subscribe\", $array ) );\n }", "public function destroy($kd_menu)\n {\n $food =\\App\\Food::findOrFail($kd_menu);\n $food->delete();\n Alert::success('Pesan', 'Data Berhasil Dihapus');\n return redirect()->route('food.index');\n }", "function open_journal_issue_delete_confirm($form, $form_state, $issue) {\n $form['#issue'] = $issue;\n // Always provide entity id in the same form key as in the entity edit form.\n $form['iid'] = array('#type' => 'value', '#value' => $issue->iid);\n return confirm_form($form,\n t('Are you sure you want to delete issue %title?', array('%title' => $issue->title)),\n 'issue/' . $issue->iid .'/view',\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}" ]
[ "0.7021321", "0.68786114", "0.6858826", "0.6818826", "0.6798554", "0.6672725", "0.66523004", "0.66453815", "0.65345025", "0.6451527", "0.6426621", "0.6326857", "0.6311236", "0.6309773", "0.6291765", "0.62407255", "0.62407255", "0.6235067", "0.6228635", "0.62215805", "0.62202984", "0.6187475", "0.6185959", "0.6173757", "0.6159098", "0.6137883", "0.6137878", "0.61311483", "0.6126681", "0.6091969", "0.6083648", "0.60621905", "0.6060692", "0.60503817", "0.60486674", "0.6047737", "0.6043199", "0.60374856", "0.60355765", "0.6035453", "0.6033328", "0.603231", "0.6028948", "0.6023926", "0.60229665", "0.60188544", "0.6010187", "0.6010178", "0.60020995", "0.599441", "0.59838235", "0.59799695", "0.59777707", "0.59740037", "0.59739673", "0.5965608", "0.59587765", "0.5948042", "0.59444493", "0.59420455", "0.5931498", "0.5930647", "0.59258074", "0.592476", "0.5915705", "0.5913423", "0.5912554", "0.59106934", "0.5909976", "0.5909378", "0.59031016", "0.5901511", "0.5901206", "0.5901071", "0.58993196", "0.5895197", "0.5892242", "0.58905303", "0.5889419", "0.5877593", "0.58741766", "0.58695745", "0.5865687", "0.5865169", "0.5860159", "0.58543044", "0.585302", "0.5852455", "0.58521634", "0.58504933", "0.58468527", "0.5842431", "0.5841146", "0.58400834", "0.58375996", "0.5835135", "0.58288515", "0.58284426", "0.5828415", "0.5828294" ]
0.6905984
1
Mongo entity delete submit handler for mongo_node_page_delete().
function mongo_node_page_delete_submit($form, &$form_state) { if ($form_state['values']['confirm']) { $entity = $form['#entity']; $entity->delete(); $entity_type = $entity->entityType(); $info = entity_get_info($entity_type); $bundle_key = $info['bundle keys']['bundle']; $bundle_label = $info['bundles'][$entity->{$bundle_key}]['label']; drupal_set_message(t('@label %title deleted', array( '@label' => $bundle_label, '%title' => $entity->title) ) ); } $form_state['redirect'] = '<front>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function deleteSubmitHandler(array &$form, FormStateInterface $form_state) {\n $node_id = $form_state->getValue('article_title');\n $node = Node::load($node_id)->delete();\n }", "function mongo_node_type_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n // Remove entity type.\n $entity_type = $form_state['values']['entity_type'];\n unset($set[$entity_type]);\n\n // Drop collection that stores entities for entity type.\n $collection = mongodb_collection('fields_current', $entity_type);\n $collection->drop();\n\n // Drop collection that stores entity types autoincrement ids.\n $collection = mongodb_collection($entity_type . '_ids');\n $collection->drop();\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node');\n}", "function delete() {\n\n $document = Doctrine::getTable('DocDocument')->find($this->input->post('doc_document_id'));\n $node = Doctrine::getTable('Node')->find($document->node_id);\n\n if ($document && $document->delete()) {\n//echo '{\"success\": true}';\n\n $this->syslog->register('delete_document', array(\n $document->doc_document_filename,\n $node->getPath()\n )); // registering log\n\n $success = 'true';\n $msg = $this->translateTag('General', 'operation_successful');\n } else {\n//echo '{\"success\": false}';\n $success = 'false';\n $msg = $e->getMessage();\n }\n\n $json_data = $this->json->encode(array('success' => $success, 'msg' => $msg));\n echo $json_data;\n }", "function mongo_node_mass_delete($entity_type, $entities) {\n entity_delete_multiple($entity_type, $entities);\n}", "protected function _postDelete()\n\t{\n\t}", "function mongo_node_bundle_delete_form_submit($form, $form_state) {\n $set = mongo_node_settings();\n\n $entity_type = $form_state['values']['entity_type'];\n $bundle = $form_state['values']['bundle'];\n\n // Remove entity type.\n unset($set[$entity_type]['bundles'][$bundle]);\n\n mongo_node_settings_save($set);\n\n // Redirect to entity type admin.\n drupal_goto('admin/structure/mongo-node/' . $entity_type);\n}", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, $this::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }", "public function delete() { // Page::destroy($this->pages()->select('id')->get());\n $this->pages()->detach();\n parent::delete();\n }", "public function postRemove($entity);", "public function onAfterDelete() {\n if (!($this->owner instanceof \\SiteTree))\n {\n $this->doDeleteDocumentIfInSearch();\n }\n }", "protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }", "public function delete($entity)\n {\n \n }", "public function delete($entity);", "protected function _postDelete()\n {\n $this->getResource()->delete();\n\n $this->getIssue()->compileHorizontalPdfs();\n }", "public function postDelete() {\n if ($server = $this->server()) {\n if ($server->enabled) {\n $server->removeIndex($this);\n }\n // Once the index is deleted, servers won't be able to tell whether it was\n // read-only. Therefore, we prefer to err on the safe side and don't call\n // the server method at all if the index is read-only and the server\n // currently disabled.\n elseif (empty($this->read_only)) {\n $tasks = variable_get('search_api_tasks', array());\n $tasks[$server->machine_name][$this->machine_name] = array('remove');\n variable_set('search_api_tasks', $tasks);\n }\n }\n\n // Stop tracking entities for indexing.\n $this->dequeueItems();\n }", "function mongo_node_type_delete_form($form, $form_state, $entity_type) {\n $form = array();\n // Send entity type.\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $path = '/admin/structure/mongo-node';\n\n $extist_entity_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type));\n if ($count) {\n $extist_entity_content = t('%type is used by %count piece of content on your site. If you remove this entity type, you will not be able to edit the %type content and it may not display correctly.', array('%type' => $entity_type, '%count' => $count));\n $extist_entity_content .= '<br/><br/>';\n }\n return confirm_form($form, t('Delete entity type'), $path, $extist_entity_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_type_delete');\n}", "public function processDelete()\n {\n $pageId = Tools::getValue('id_page');\n\n Db::getInstance()->delete($this->module->table_name, 'id_page='.$pageId);\n Db::getInstance()->delete($this->module->table_lang, 'id_page='.$pageId);\n Db::getInstance()->delete($this->module->table_related, 'id_parent='.$pageId.' OR id_related='.$pageId);\n\n $this->redirect_after = static::$currentIndex.'&conf=1&token='.$this->token;\n }", "function afterDelete(&$model) {\n\t\t$node = Set::extract($this->node($model), \"0.Node.id\");\n\t\tif (!empty($node)) {\n\t\t\t$model->Node->delete($node);\n\t\t}\n\t}", "public function deleteObject(){\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n //$this->removeFromParentCollection();\n }", "public function delete($entity){ \n //TODO: Implement remove record.\n }", "public function deleteNode(){\n\t\tparent::deleteNode();\n\n\t\t//Delete Langs\n\t\t$relMetaLang = new XlyreRelMetaLangs();\n\t\t$results = $relMetaLang->find(\"IdRel\", \"IdNode=%s\", array($this->nodeID), MONO);\n\t\tif ($results) {\n\t\t\tforeach ($results as $idRel) {\n\t\t\t\t$objectToDelete = new XlyreRelMetaLangs($idRel);\n\t\t\t\t$objectToDelete->delete();\n\t\t\t}\n\t\t}\n\n\t\t//Delete Tags\n\t\t$relMetaLang = new XlyreRelMetaTags();\n\t\t$results = $relMetaLang->find(\"IdRel\", \"IdNode=%s\", array($this->nodeID), MONO);\n\t\tif ($results) {\n\t\t\tforeach ($results as $idRel) {\n\t\t\t\t$objectToDelete = new XlyreRelMetaTags($idRel);\n\t\t\t\t$objectToDelete->delete();\n\t\t\t}\n\t\t}\n\n\t\t//Delete dataset\n\t\t$dataset = new XlyreDataset($this->nodeID);\n\t\treturn $dataset->delete();\n\t}", "public function delete()\n {\n $ids = Request::get(\"id\");\n\n $ids = is_array($ids) ? $ids : [$ids];\n\n foreach ($ids as $ID) {\n\n $page = Page::findOrFail($ID);\n\n // Fire deleting action\n\n Action::fire(\"page.deleting\", $page);\n\n $page->tags()->detach();\n $page->delete();\n\n // Fire deleted action\n\n Action::fire(\"page.deleted\", $page);\n }\n\n return Redirect::back()->with(\"message\", trans(\"pages::pages.events.deleted\"));\n }", "public function deleteAction()\n {\n $postId = (int)$this->params()->fromRoute('id', -1);\n \n // Validate input parameter\n if ($postId<0) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n \n $post = $this->entityManager->getRepository(Post::class)\n ->findOneById($postId); \n if ($post == null) {\n $this->getResponse()->setStatusCode(404);\n return; \n }\n \n if (!$this->access('post.own.delete', ['post'=>$post])) {\n return $this->redirect()->toRoute('not-authorized');\n }\n \n $this->postManager->removePost($post);\n $this->imageManager->removePost($postId);\n $this->videoManager->removePost($postId);\n $this->audioManager->removePost($postId);\n \n // Redirect the user to \"admin\" page.\n return $this->redirect()->toRoute('posts', ['action'=>'admin']); \n \n }", "public function Delete($entity) {\n }", "public function deleteDocument() {\n\n // should get instance of model and run delete-function\n\n // softdeletes-column is found inside database table\n\n return redirect('/home');\n }", "public function actionDelete(){\n\t\t$form = $_POST;\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('DELETE FROM core_pages WHERE id = ?', $form['id']);\n\t\t$this->redirect('pages:');\n\t}", "public function delete()\n {\n\n\n $myDataAccess = aDataAccess::getInstance();\n $myDataAccess->connectToDB();\n // I just made it cascade null when deleted ;)\n\n\n \t$recordsAffected = $myDataAccess->deletePage($this->m_Pageid);\n\n \treturn \"$recordsAffected row(s) affected!\";\n }", "public function deleted(Post $post)\n {\n //\n $this->postElasticSearch->deleteDoc($post->id);\n }", "public function actionDelete() {}", "public function actionDelete() {}", "function thumbwhere_contentcollection_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollections/thumbwhere_contentcollection/' . $form_state['thumbwhere_contentcollection']->pk_contentcollection . '/delete';\n}", "public function delete(DataObject $entity){\n }", "function mongo_node_bundle_delete_form($form, $form_state, $entity_type, $bundle) {\n $form = array();\n\n $form['entity_type'] = array(\n '#type' => 'value',\n '#value' => $entity_type,\n );\n $form['bundle'] = array(\n '#type' => 'value',\n '#value' => $bundle,\n );\n\n $path = '/admin/structure/mongo-node/' . $entity_type;\n\n $extist_bundle_content = '';\n $collection = mongodb_collection('fields_current', $entity_type);\n $count = $collection->count(array('_type' => $entity_type, '_bundle' => $bundle));\n if ($count) {\n $extist_bundle_content = t('%bundle is used by %count piece of content on your site. If you remove this bundle, you will not be able to edit the %bundle content and it may not display correctly.', array('%bundle' => $bundle, '%count' => $count));\n $extist_bundle_content .= '<br/><br/>';\n }\n\n return confirm_form($form, t('Delete entity bundle'), $path, $extist_bundle_content . 'This action cannot be undone', t('Delete'), t('Cancel'), 'mongo_node_bundle_delete');\n}", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "function filecabinet_document_delete($node) {\n $files = db_query(\"SELECT DISTINCT afid FROM {org_documents} WHERE nid = %d\", $node->nid);\n // Then delete the document node\n db_query(\"DELETE FROM {org_documents} WHERE nid = %d\", $node->nid);\n // delete and doclinks that exist\n db_query(\"DELETE FROM {org_doclinks} WHERE dnid = %d\", $node->nid);\n // Now delete the files if they are not used\n module_load_include('inc', 'filecabinet', 'filecabinet_file');\n while ($file = db_fetch_object($files)) {\n filecabinet_delete_file($file->afid);\n }\n}", "public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }", "public function deleting()\n {\n # code...\n }", "protected function node_delete($nid) {\n\n // Clear the cache before the load, so if multiple nodes are deleted, the\n // memory will not fill up with nodes (possibly) already removed.\n $node = node_load($nid, NULL, TRUE);\n\n\n db_query('DELETE FROM {node} WHERE nid = %d', $node->nid);\n db_query('DELETE FROM {node_revisions} WHERE nid = %d', $node->nid);\n\n // Call the node-specific callback (if any):\n node_invoke($node, 'delete');\n node_invoke_nodeapi($node, 'delete');\n\n // Clear the page and block caches.\n cache_clear_all();\n\n // Remove this node from the search index if needed.\n if (function_exists('search_wipe')) {\n search_wipe($node->nid, 'node');\n }\n watchdog('content', '@type: deleted %title.', array('@type' => $node->type, '%title' => $node->title));\n drupal_set_message(t('@type %title has been deleted.', array('@type' => node_get_types('name', $node), '%title' => $node->title)));\n\n }", "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "public function massDeleteAction()\n {\n $traineedocIds = $this->getRequest()->getParam('traineedoc');\n if (!is_array($traineedocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('Please select trainee document to delete.')\n );\n } else {\n try {\n foreach ($traineedocIds as $traineedocId) {\n $traineedoc = Mage::getModel('bs_traineedoc/traineedoc');\n $traineedoc->setId($traineedocId)->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_traineedoc')->__('Total of %d trainee document were successfully deleted.', count($traineedocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('There was an error deleting trainee document.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "abstract function performDelete(Form $arg0);", "public function deleteActionPost(): object\n {\n // Connects to db\n $this->app->db->connect();\n\n $contentId = getPost(\"contentId\");\n\n if (!is_numeric($contentId)) {\n return $this->app->response->redirect(\"admin\");\n }\n\n if (hasKeyPost(\"doDelete\")) {\n $contentId = getPost(\"contentId\");\n\n // Executes SQL statement\n $this->admin->deleteBlogpost($contentId);\n\n // Redirects\n return $this->app->response->redirect(\"admin\");\n }\n }", "public function delete(IndexableEntity $entity);", "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $traineedoc = Mage::getModel('bs_traineedoc/traineedoc');\n $traineedoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_traineedoc')->__('Trainee Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('There was an error deleting trainee document.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineedoc')->__('Could not find trainee document to delete.')\n );\n $this->_redirect('*/*/');\n }", "function thumbwhere_contentcollectionitem_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/thumbwhere/thumbwhere_contentcollectionitems/thumbwhere_contentcollectionitem/' . $form_state['thumbwhere_contentcollectionitem']->pk_contentcollectionitem . '/delete';\n}", "public function delete() {\n // Deleting microarticles.\n $microarticles = $this->getMicroarticles();\n if (!empty($microarticles)) {\n foreach ($microarticles as $microarticle) {\n $microarticle->delete();\n }\n }\n\n // Deleting selfservices.\n $selfServices = $this->getSelfservices();\n if (!empty($selfServices)) {\n foreach ($selfServices as $selfService) {\n $selfService->delete();\n }\n }\n\n parent::delete();\n }", "protected function _preDelete() {}", "public function deleteAction() {\n \n }", "public function massDeleteAction()\n {\n $curriculumdocIds = $this->getRequest()->getParam('curriculumdoc');\n if (!is_array($curriculumdocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Please select curriculum docs to delete.')\n );\n } else {\n try {\n foreach ($curriculumdocIds as $curriculumdocId) {\n $curriculumdoc = Mage::getModel('bs_curriculumdoc/curriculumdoc');\n $curriculumdoc->setId($curriculumdocId)->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_curriculumdoc')->__('Total of %d curriculum docs were successfully deleted.', count($curriculumdocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('There was an error deleting curriculum docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t//print_r ($_POST);\n\t\t\t\n\t\t\tif (isset($_POST[\"articleCheckbox\"]) && !empty($_POST[\"articleCheckbox\"]) && $_POST[\"command\"] == \"deleteSelected\"){\n\t\t\t\tforeach($_POST[\"articleCheckbox\"] as $record)\n\t\t\t\t{\n\t\t\t\t\tArticles::model()->deleteByPk($record);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// we only allow deletion via POST request\n\t\t\t\t$this->loadarticles()->delete();\n\t\t\t}\n\t\t\t$this->redirect(array('admin'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "protected function _delete()\n\t{\n\t}", "public function delete_meta()\n {\n # process the request which it must be post and ajax request\n if (request()->isPost() && request()->isAjax()) {\n \n $objectId = request()->getPost('object-id', 'int');\n $object = request()->getPost('object', 'alphanum');\n \n $this->setJsonResponse();\n\n $object = PostMeta::findFirstByMeta_id($objectId);\n\n if(!$object) {\n $this->jsonMessages['messages'][] = [\n 'type' => 'warning',\n 'content' => 'Object not found!'\n ];\n return $this->jsonMessages;\n }\n $object->delete();\n\n \n $this->jsonMessages['messages'][] = [\n 'type' => 'success',\n 'content' => 'Object has been deleted!'\n ];\n return $this->jsonMessages;\n \n\n }\n }", "public function actionDelete()\n {\n if (Yii::app()->getRequest()->getIsPostRequest()) {\n $id = $_POST['id'];\n /** @var $photo GalleryPhoto */\n $photo = GalleryPhoto::model()->findByPk($id);\n if ($photo !== null && $photo->delete()) echo 'OK';\n else echo 'FAIL';\n } else echo 'FAIL';\n }", "public function sitePageDeleteAction ()\n {\n\t\t$Page = Tg_Site::getInstance ()->getPageById($this->_getParam ('id'));\n\t\tif (!$Page)\n\t\t\tthrow new Exception (\"Page not found\");\n\t\t\t\n\t\tif ($Page->locked)\n\t\t\tthrow new Exception (\"Page is locked\");\n\t\t\n \t$Page->delete();\n \t\n\t\techo '{\"success\":true,\"msg\":\"Delete successful\"}';\n\t\tdie;\n }", "public function onRelationManageDelete()\n {\n $this->beforeAjax();\n\n /*\n * Multiple (has many, belongs to many)\n */\n if ($this->viewMode == 'multi') {\n if (($checkedIds = post('checked')) && is_array($checkedIds)) {\n foreach ($checkedIds as $relationId) {\n if (!$obj = $this->relationModel->find($relationId)) {\n continue;\n }\n\n $obj->delete();\n }\n }\n }\n /*\n * Single (belongs to, has one)\n */\n elseif ($this->viewMode == 'single') {\n $relatedModel = $this->viewModel;\n if ($relatedModel->exists) {\n $relatedModel->delete();\n }\n\n $this->viewWidget->setFormValues([]);\n $this->viewModel = $this->relationModel;\n }\n\n return $this->relationRefresh();\n }", "public function delete() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['delete']) && !empty($_POST['delete'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if (!$this->_model->delete(explode(\"/\", $this->_url)[1])) {\n echo \"error\";\n } else {\n echo \"good\";\n }\n }\n }\n }", "function delete_post()\n {\n $this->Admin_model->procedure = 'POST_DELETE';\n\n echo $this->p_post_id_delete;\n\n\n $rs = $this->Admin_model->delete($this->p_post_id_delete);\n\n //redirect('admin/Posts/display_cat');\n }", "protected function onDelete() {\n\t\tif (!$this->post = $this->loadPost()) {\n\t\t\treturn null;\n\t\t}\n\t\t$this->post->delete();\n\t\t// $this->onRun();\n\t\treturn Redirect(Request::url());\n\t}", "public function delete(){\n\t\t\t\n\t\t/* set method */\n\t\t$this->request_method = 'delete';\n\t\t\t\t\n\t\t/* check for id */\n\t\tif( ! $this->id) {\n\t\t\t$this->set_error( 14, 'No model id in request, cant delete' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* parse the data from backbone */\n\t\t$this->parse_model_request();\n\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\t\t\n\t\t/* access the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\t\t\n\t\t \t\t\t \t\n\t\t/* delete from 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 */\n\t\t\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('delete_post', $this->id)) { \n\t\t\t\t\t$this->set_error( 15, 'no user privileges to delete the item on server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t\t$result = wp_delete_post($this->id);\n\t\t\t\t\n\t\t\t\t/* error checking while delete */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 16, 'deleting 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/* success, the id of the deleted post was returned */\n\t\t\t\t$deleted_id = $result->ID;\n\t\t\t\t\n\t\t\t\t/* setup a clean response */\n\t\t\t\t$this->parse_model_response($deleted_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/* @TODO better permission handling */\n\t\t\t\t\t$comment_in_db = get_comment( $this->id );\n\t\t\t\t\t$comment_author = $comment_in_db->user_id;\n\t\t\t\tif ( $this->properties->access == \"loggedin\" && $comment_author != $this->current_user->ID ) {\n\t\t\t\t\t$this->set_error( 17, 'This comment can only be deleted by the comment author :' . $comment_author );\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t$result = wp_delete_comment($this->id);\n\t\t\t\t\n\t\t\t\t/* true is returned on success delete */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 17, 'deleting 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/* setup a clean response */\t\n\t\t\t\t$this->parse_model_response($result);\t\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\t\n\t\t\tbreak;\n\t\t}\t\n do_action('bb-wp-api_after_upd', $updated_id, $this->properties, $this );\n\n\t}", "public function delete($entity) : bool;", "public function delete(): void\n {\n $this->instances->demo()->runHook($this->root(), 'delete:before', $this);\n\n Dir::remove($this->root());\n $this->instances->delete($this->id);\n\n $this->instances->demo()->runHook($this->root(), 'delete:after', $this);\n }", "public function delete()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n $entity->delete();\n }\n }\n );\n }", "public function preDelete() { }", "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $curriculumdoc = Mage::getModel('bs_curriculumdoc/curriculumdoc');\n $curriculumdoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_curriculumdoc')->__('Curriculum Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('There was an error deleting curriculum doc.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Could not find curriculum doc to delete.')\n );\n $this->_redirect('*/*/');\n }", "protected function doDeleteDocument() {\n try{\n $this->service->remove($this->owner);\n }\n catch(NotFoundException $e)\n {\n trigger_error(\"Deleted document not found in search index.\", E_USER_NOTICE);\n }\n\n }", "public function deleteAction()\n {\n $post = $this->checkInputDataIdAndEntity();\n if ( $post === false ) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n\n $this->postService->deletePost($post);\n $this->flashMessenger()->addSuccessMessage('Deleted the post.');\n\n return $this->redirect()->toRoute('posts', ['action'=>'index']);\n }", "public function ajax_delete_field() {\n\t\tglobal $wpdb;\n\n\t\tif ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'visual_form_builder_delete_field' ) {\n\t\t\t$form_id = absint( $_REQUEST['form'] );\n\t\t\t$field_id = absint( $_REQUEST['field'] );\n\n\t\t\tcheck_ajax_referer( 'delete-field-' . $form_id, 'nonce' );\n\n\t\t\tif ( isset( $_REQUEST['child_ids'] ) ) {\n\t\t\t\tforeach ( $_REQUEST['child_ids'] as $children ) {\n\t\t\t\t\t$parent = absint( $_REQUEST['parent_id'] );\n\n\t\t\t\t\t// Update each child item with the new parent ID\n\t\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_parent' => $parent ), array( 'field_id' => $children ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Delete the field\n\t\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM $this->field_table_name WHERE field_id = %d\", $field_id ) );\n\t\t}\n\n\t\tdie(1);\n\t}", "public function deleted(Article $article)\n {\n //\n }", "function node_form_delete_submit($form, &$form_state) {\n $destination = '';\n if (isset($_REQUEST['destination'])) {\n $destination = drupal_get_destination();\n unset($_REQUEST['destination']);\n }\n $node = $form['#node'];\n $form_state['redirect'] = array('node/'. $node->nid .'/delete', $destination);\n}", "public function AdminDeleteArticleProcess(Request $request) {\n\n $article = Article::find($request->article_id);\n $article->delete();\n return redirect()->route('admin-article');\n }", "public function post_delete(){\n\t\t\t\n\t\t$data \t= \tFiledb::_rawurldecode(json_decode(stripcslashes(Input::get('data')), true));\n\n\t\tif($data[\"delete\"] == 'delete'){\n\t\t\t\n\t\t\t$status = Users::delete($data[\"id\"]);\n\n\t\t\treturn ($status) ? Utilites::success_message(__('forms.deleted_word')) : Utilites::fail_message(__('forms_errors.undefined'));\n\t\t}\n\t}", "function travel_form_submit_delete($form, &$form_state) {\n // Redirect user to \"Delete\" URI for this entity.\n $entity = $form_state['entity'];\n $entity_uri = entity_uri('travel', $entity);\n $form_state['redirect'] = $entity_uri['path'] . '/delete';\n}", "public function index_delete(){\n\t\t\n\t\t}", "protected function delete() {\n\t}", "protected function afterDelete()\r\n {\r\n }", "function delete_document_process()\n\t{\n\t\t$this->load->model('document_model');\n\t\treturn $this->document_model->delete_document_process();\t\n\t\t\n\t}", "public function deleteArticle(): void\n {\n $this->articleId = $_GET['deleteId'];\n\n $this->articleModel->deleteArticle($this->articleId);\n // Redirect to the articles list page\n Router::redirectTo('listArticles');\n exit();\n }", "function delPostingHandler() {\n global $inputs;\n\n $sql = \"DELETE FROM `posting` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public function deleteattachmentAction()\r\n {\r\n try {\r\n if ( ($id = $this->getRequest()->getParam('id')) ) {\r\n $attachment = Mage::getModel('link/node_attachment')->load($id);\r\n\r\n $attachment->delete();\r\n }\r\n } catch (Exception $error) { }\r\n }", "protected function _delete()\n {\n $pages = $this->getTable('ExhibitPage')->findBy(array('exhibit'=>$this->id));\n foreach($pages as $page) {\n $page->delete();\n }\n $this->deleteTaggings();\n }", "public function actionDelete()\n {\n if(Yii::app()->request->isPostRequest)\n {\n // we only allow deletion via POST request\n $this->loadPost()->delete();\n $this->redirect(array('list'));\n }\n else\n throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n }", "public function deleteEntity($entity): void\n {\n /** @var EntityRepository $repository */\n $repository = Prime::repository($entity);\n $mapper = $repository->mapper();\n\n $isReadOnly = $mapper->isReadOnly();\n $mapper->setReadOnly(false);\n\n $repository->disableEventNotifier();\n $repository->delete($entity);\n $repository->enableEventNotifier();\n\n $mapper->setReadOnly($isReadOnly);\n }", "public function delete(Entity $post): void {\n\t\t$sql = \"DELETE p, c FROM post p LEFT JOIN comment c ON p.id = c.post_id WHERE p.slug = :slug\";\n\n\t\t$request = $this->pdo->prepare($sql);\n\t\t$request->execute([\n\t\t\t'slug' => $post->getSlug(), \n\t\t]);\n\t}", "function admin_delete($node_id = '')\n\t{\n\t\tif(!$this->RequestHandler->prefers('json'))\n\t\t{\n\t\t\t$this->cakeError('error404');\n\t\t\treturn;\n\t\t}\n\n\t\tif(empty($node_id))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($node_id))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\t$node = $this->Navigation->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Navigation.id' => $node_id,\n\t\t\t),\n\t\t\t'recursive' => -1,\n\t\t));\n\t\tif(empty($node))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node ID'));\n\t\t\treturn;\n\t\t}\n\n\t\t$response = array('success' => 1);\n\n\t\tif(!$this->Navigation->delete($node_id))\n\t\t{\n\t\t\t$response['success'] = 0;\n\t\t}\n\n\t\t$this->set('response', $response);\n\t}", "public function action_delete()\n {\n\t $this->template = View::forge('template-admin');\n\n $post = Input::post();\n $entry = Model_Event::find_by_pk($post[\"id\"]);\n\t\tif ($entry){\n\t\t\tif(!$entry->delete()){\n\t\t\t\t$data[\"events\"] = Model_Event::find_all();\n\t\t\t\t$this->template->title = \"イベント一覧\";\n\t\t\t\t$this->template->content = View::forge('event/index', $data);\n\t\t\t}\n\t\t}\n\t\t$data[\"events\"] = Model_Event::find_all();\n\t\t$this->template->title = \"イベント一覧\";\n\t\t$this->template->content = View::forge('event/index', $data);\n }", "public function action_delete() {\n $elect_id = $this->request->query('elect_id');\n $res = Model::factory('Elect')->delete($elect_id);\n if(!$res) exit('error action_delete');\n $this->redirect('/'); \n }", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function massDeleteAction()\n {\n $pageIds = $this->getRequest()->getParam('page_id');\n if(!is_array($pageIds)) {\n $this->_getSession()->addError($this->__('Please select page(s).'));\n } else {\n try {\n /** @var Training_Cms_Model_Eav_Page $pages */\n $pages = Mage::getModel('training_cms/eav_page');\n foreach ($pageIds as $pageId) {\n $pages->load($pageId);\n $pages->delete();\n }\n $this->_getSession()->addSuccess($this->__('Total of %d record(s) were deleted.', count($pageIds)));\n } catch (Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n }\n }\n $this->_redirect('*/*/list');\n }", "protected function _postDelete()\n {\n $this->clearResources();\n }", "protected static function deleteEntity(\\ElggEntity $entity) {\n\n\t\tif (!$entity->getPrivateSetting(ELASTICSEARCH_INDEXED_NAME)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$client = elasticsearch_get_client();\n\t\tif (empty($client)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\telasticsearch_add_document_for_deletion($entity->getGUID(), [\n\t\t\t'_index' => $client->getIndex(),\n\t\t\t'_type' => $client->getDocumentTypeFromEntity($entity),\n\t\t\t'_id' => $entity->getGUID(),\n\t\t]);\n\t}", "function travel_delete_form_submit($form, &$form_state) {\n // Delete the entity.\n $entity = $form_state['entity'];\n entity_delete('travel', entity_id('travel', $entity));\n\n // Redirect user.\n drupal_set_message(t('Entity %title deleted.', array('%title' => entity_label('travel', $entity))));\n $form_state['redirect'] = '<front>';\n}", "public function run()\n {\n\t Yii::$app->response->format = Response::FORMAT_JSON;\n\n \t$id = Yii::$app->request->post(\"id\");\n\n \t/** @var ActiveRecord|TreeInterface $model */\n $model = $this->findModel($id);\n\n return [\"success\"=>true,\"deleted\"=>$model->deleteWithChildren()];\n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function deleteAction()\n {\n $entity = \\Zend_Registry::get('doctrine')->getEntityManager()->getRepository('\\ZF\\Entities\\News');\n $relation = \\Zend_Registry::get('doctrine')->getEntityManager()->getRepository('\\ZF\\Entities\\NewsTagRel');\n return parent::delete($entity, $relation);\n }", "public function deleteAction()\n {\n \n }" ]
[ "0.71317905", "0.7057607", "0.7055268", "0.68226093", "0.67156976", "0.6710894", "0.67040217", "0.66735077", "0.642241", "0.6374308", "0.6361223", "0.63513196", "0.6340487", "0.6323407", "0.63184184", "0.6316687", "0.62518245", "0.62388307", "0.6222638", "0.6219751", "0.61835533", "0.6167757", "0.613239", "0.6130876", "0.61226094", "0.6096067", "0.60891426", "0.6087671", "0.6077549", "0.6071453", "0.60531896", "0.60510373", "0.6031849", "0.60035414", "0.60035414", "0.59659475", "0.5929926", "0.59250975", "0.59142905", "0.59128094", "0.59048706", "0.59027874", "0.5891185", "0.5882396", "0.58757985", "0.5874801", "0.5868084", "0.5867308", "0.5854673", "0.58511585", "0.5841252", "0.58241934", "0.5821219", "0.58077806", "0.5803061", "0.5790504", "0.5790223", "0.57871795", "0.578706", "0.5780111", "0.57770807", "0.5771401", "0.5769297", "0.57619596", "0.57472795", "0.5734334", "0.5733434", "0.573138", "0.5730606", "0.57297117", "0.5728948", "0.57239354", "0.57214147", "0.57197195", "0.5719503", "0.5716288", "0.5709698", "0.5708125", "0.57080424", "0.569872", "0.5693832", "0.56875217", "0.56747735", "0.5662508", "0.56616884", "0.566167", "0.56557095", "0.565222", "0.5645657", "0.5643786", "0.56434596", "0.5636198", "0.56340873", "0.56309515", "0.5625489", "0.5622526", "0.5613546", "0.5613354", "0.56131107", "0.56118554" ]
0.71954656
0
Provide only the necessary paramertes for a POSTable type request.
public function validParameters(array $overrides = []): array { return array_merge([ 'line1' => $this->faker->streetAddress(), 'city' => $this->faker->city(), 'state' => $this->faker->state(), 'postal_code' => $this->faker->postcode(), 'country' => $this->faker->country(), ], $overrides); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setPostParameters(): void\n {\n $params = filter_input_array(INPUT_POST);\n\n if (!isset($params)) {\n $this->body = (object)array();\n return;\n }\n\n $this->body = $params;\n }", "abstract protected function getRequiredRequestParameters();", "public function getPostRequest(): ParameterBag { return $this->post; }", "protected function setPostData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "abstract protected function getFormTypeParams();", "private static function getPostParams()\n\t{\n\t\treturn (count($_POST) > 0) ? $_POST : json_decode(file_get_contents('php://input'), true);\n\t}", "protected function getPostValues() {}", "protected function _initPostParameters()\n {\n $this->set('_post', new DataHolder($_POST));\n }", "protected function getHttpPostFields()\n {\n $config = $this->getConfig();\n $request = $this->getRequest();\n $context = $request->getContext();\n\n $params = array();\n\n $params['aid'] = $config->getAccountId();\n\n $params['type'] = $request->getType();\n $params['wid'] = $request->getWidgetId();\n $params['start'] = $request->getStartIndex();\n if($chunkSize = $request->getChunkSize()) {\n $params['csize'] = $chunkSize;\n }\n $params['widgetdetails'] = $request->getIncludeWidgetDetails() ? '1' : '0';\n\n if($productIdsToExclude = $request->getExcludeProductIds()) {\n $params['excl'] = $productIdsToExclude;\n }\n\n // context\n if($visitorId = $context->getVisitorId()) {\n $params['emvid'] = $visitorId;\n }\n if($productIds = $context->getProductIds()) {\n $params['pid'] = $productIds;\n }\n $categories = $context->getCategories();\n if(count($categories) > 0) {\n if(count($categories) > 1) {\n throw new RuntimeException(\"Only one or zero categories in context allowed in current implementation.\");\n }\n $cat = $categories[0]; /* @var $cat Context\\Category */\n $params['ctxcat.ct'] = $cat->getType();\n if($catId = $cat->getId()) {\n $params['ctxcat.cid'] = $catId;\n } else {\n $params['ctxcat.paa'] = $cat->getPath();\n $params['ctxcat.pv'] = $cat->getVariant();\n }\n }\n\n return $params;\n }", "private function loadPostParams()\n {\n if(isset($_POST)) {\n $this->postParams = $_POST;\n }\n }", "public function getPostParams()\n {\n return $this->request->all();\n }", "function handlePOSTRequest() {\n if (array_key_exists('submitProjectionRequest', $_POST)) {\n handleProjectionRequest();\n }\n }", "public function setPostParams()\n {\n if (!empty($_POST)) {\n foreach ($_POST as $title => $param) {\n $this->setPostParam($title, $param);\n }\n }\n }", "protected function parse_body_params()\n {\n }", "abstract public function parseRequestParameters();", "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}", "function handle_request_body_params() {\n // Merges HTTP Request body with the instance parameters,\n // instance params have priority for security reasons\n $body = $this->get_request_body();\n $params = $body ? $this->decode($body) : null;\n $this->params = xUtil::array_merge(xUtil::arrize($params), $this->params);\n }", "private function inputs(){\n\t\tswitch($_SERVER['REQUEST_METHOD']){ // Make switch case so we can add additional \n\t\t\tcase \"GET\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"GET\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"POST\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"POST\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"PUT\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"PUT\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tcase \"DELETE\":\n\t\t\t\t$this->_request = $this->cleanInputs($_REQUEST); //or $_GET\n\t\t\t\t$this->_method = \"DELETE\";\n\t\t\t\t//$this->logRequest();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->response('Forbidden',403);\n\t\t\t\tbreak;\n\t\t}\n\t}", "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 }", "protected function getTypeParam()\n {\n }", "public function adjustRequestContentType()\n {\n if (in_array($this->method, ['GET', 'DELETE', 'HEAD', 'OPTIONS'])) {\n return;\n }\n\n if ($this->method == 'POST') {\n $fieldName = '_post';\n } else {\n $fieldName = 'adjustedRawInputData';\n }\n\n $contentType = HttpHelper::cleanContentType($this->server('CONTENT_TYPE'));\n\n if ($contentType == 'application/json') {\n $this->$fieldName = json_decode($this->rawRequestData(), true);\n if ($this->rawRequestData() && strpos(trim($this->rawRequestData()), '{') === 0 && !$this->$fieldName) {\n throw new HttpException('Request data are malformed. Please check it.', 400, null, 'Bad Request');\n }\n\n } else if ($contentType == 'application/xml') {\n $requestBody = $this->rawRequestData();\n\n // Inject XMLExternalEntity vulnerability\n $vuln = $this->pixie->vulnService->getVulnerability('XMLExternalEntity');\n $protected = $vuln !== true && !$vuln['enabled'];\n\n if ($protected) {\n libxml_disable_entity_loader(true);\n }\n\n try {\n $xml = simplexml_load_string($requestBody);\n } catch (\\Exception $e) {\n if ($protected) {\n throw new HttpException('Invalid XML Body.', 400, $e, 'Bad Request');\n } else {\n throw $e;\n }\n }\n\n if ($requestBody && $xml === false) {\n throw new HttpException('Request data are malformed. Please check it.', 400, null, 'Bad Request');\n }\n $this->$fieldName = json_decode(json_encode($xml), true);\n }\n\n $this->$fieldName = is_array($this->$fieldName) ? $this->$fieldName : [];\n }", "protected function obtainPostRequest() {\n /*\n * If the request was sent in JSON format (for example from an mobile app) \n * we will transform it into a format that can be interpreted by PHP\n */ \n $request = Request::createFromGlobals();\n if ($request->headers->get('Content-Type') == 'application/json') {\n $data = json_decode($request->getContent(), true);\n $request->request->replace(is_array($data) ? $data : array());\n }\n return $request->request;\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 getPostParams()\n {\n return $this->post;\n }", "public function getRequestParams();", "abstract protected function post_type();", "public function defineTypo3RequestTypes() {}", "public function getPostFields()\n {\n return $this->invokeWrappedIfEntityEnclosed(__FUNCTION__, func_get_args());\n }", "function any_ptype_on_tag($request) {\n if ( isset($request['tag']) )\n $request['post_type'] = 'any';\n\n return $request;\n}", "public function prepareRequest()\r\n {\r\n\r\n }", "function receive() {\n // Input type 1.\n if ($this->method == 'POST' && isset($_POST[$this->id . '-form_id']) && $_POST[$this->id . '-form_id'] == $this->id) {\n $this->request['raw_input'] = $_POST;\n }\n // Input types 2 and 3.\n else {\n $this->request['raw_input'] = $_GET;\n }\n }", "public function get_body_params()\n {\n }", "function getParameters(){\n // Parse incoming query and variables\n return (isset($_SERVER['CONTENT_TYPE']) && strpos($_SERVER['CONTENT_TYPE'], 'application/json') !== false) \n ? json_decode( file_get_contents('php://input'), true) \n : $_REQUEST;\n\n}", "abstract public function post(Request $request);", "public function getPostParams(): array\n {\n return $this->postParams;\n }", "abstract public function post();", "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 showRequestPost();", "public function prepareRequest()\n {\n }", "function RequirePostRequest()\n{\n if($_SERVER['REQUEST_METHOD'] !== 'POST')\n {\n header('HTTP/1.1 400 Bad Request');\n die(\"The Prybar API currently only accepts POST requests\");\n }\n}", "protected function setRequestArgumentsFromGetPost() {\n\t\t$validArguments = array('vendorName', 'extensionName', 'pluginName', 'controllerName', 'actionName', 'formatName', 'arguments');\n\t\tforeach ($validArguments as $argument) {\n\t\t\tif (GeneralUtility::_GP($argument)) {\n\t\t\t\t$this->requestArguments[$argument] = GeneralUtility::_GP($argument);\n\t\t\t} else if (GeneralUtility::_GP('amp;' . $argument)) {\n\t\t\t\t// Something went wrong...\n\t\t\t\t$this->requestArguments[$argument] = GeneralUtility::_GP('amp;' . $argument);\n\t\t\t}\n\t\t}\n\t}", "function _post_format_request($qvs)\n {\n }", "private function _getRequestParams()\n {\n return array_merge(\n $this->CI->input->post(),\n $this->CI->input->get()\n );\n }", "protected function processRequestParams(): void\n {\n $this->processLimit();\n $this->processLocale();\n }", "function _wp_privacy_action_request_types()\n {\n }", "public function getRequestFieldsToSave(){\n\t\treturn array();\n\t}", "function http_post_fields($url, ?array $data = null, ?array $files = null, ?array $options = null, ?array &$info = null) {}", "function is_post_request() {\n return (request_method() == 'post');\n}", "function is_post_request() {\n return $_SERVER['REQUEST_METHOD'] === 'POST';\n}", "protected function mapRequest() {\n foreach($_REQUEST as $key => $value) {\n $this->data[$key] = $value;\n }\n }", "function _load_post_params(&$app, &$c) {\n\t\t$params =& $c->param('app.view_http.request.params');\n\t\tif (is_array($params)) {\n\t\t\tforeach($params as $p_name => $p_value) {\n\t\t\t\t$this->_http->addPostData($p_name, $p_value);\n\t\t\t}\n\t\t}\n\t}", "public function paramsPost()\r\n {\r\n return $this->params_post;\r\n }", "protected function getFormTypeParams()\n {\n return self::SHOWING_OR_SELLING_FORMS;\n }", "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}", "function is_post_request()\n{\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n}", "public function getAllowedParams() {\n return array(\n 'id' => array (\n ApiBase::PARAM_TYPE => 'integer',\n ApiBase::PARAM_REQUIRED => true\n ),\n 'comment'=>array(\n ApiBase::PARAM_TYPE => 'text',\n ApiBase::PARAM_REQUIRED => true\n )\n );\n }", "public function getPostFieldsParameters()\n {\n return $this->postFieldsParameters;\n }", "function process_request_vars($params) {\n\t\tif (array_key_exists('CONTENT_LENGTH', $_SERVER) && !empty($_POST)) {\n\t\t\t$pms = ini_get('post_max_size');\n\t\t\t$mul = substr($pms, -1);\n\t\t\t$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));\n\t\t\tif ($_SERVER['CONTENT_LENGTH'] > $mul*(int)$pms && $pms) {\n\t\t\t\tthrow new MaxPostSizeExceeded(\"The posted data was too large. The maximum post size is: $pms.\");\n\t\t\t}\n\t\t}\n\n\n\n\t\t# add request to params and make sure magic quotes are dealt with\n\t\tunset($_POST['MAX_FILE_SIZE']);\n\t\tunset($_GET['MAX_FILE_SIZE']);\n\t\t$gpc = (get_magic_quotes_gpc() == 1);\n\n\t\tforeach(array($_GET, $_POST) as $R) {\n\t\t\tforeach($R as $k => $v) {\n\t\t\t\tif (!isset($params[$k])) {\n\t\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t\t$params[$k] = array();\n\t\t\t\t\t\tforeach($v as $k2 => $v2) {\n\t\t\t\t\t\t\t$params[$k][$k2] = ($gpc && !is_array($v2))?stripslashes($v2):$v2;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$params[$k] = ($gpc)?stripslashes($v):$v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t# add files to params\n\t\tforeach($_FILES as $k => $v) {\n\t\t\tif (!isset($params[$k])) {\n\t\t\t\ttry {\n\t\t\t\t\t$uploaded_file = UploadedFile::create($v);\n\t\t\t\t} catch (UpoadedFileException $e) {\n\t\t\t\t\t$uploaded_file = false;\n\t\t\t\t}\n\t\t\t\t$params[$k] = $uploaded_file;\n\t\t\t}\n\t\t}\n\n\n\n\t\treturn $params;\n\t}", "function handlePOSTRequest() {\n if (array_key_exists('submitGroupByRequest', $_POST)) {\n handleGroupByRequest();\n }\n }", "public function getPostVariables();", "public function getAcceptedParameters();", "abstract public function post($data);", "protected function __getPostRemoveEmpty(){\r\n if($this->request->isPost()){\r\n foreach($this->request->getPost() as $key => $value){\r\n if(empty($value) || is_null($value)){\r\n unset($_POST[$key]);\r\n }\r\n }\r\n }\r\n else{\r\n foreach($this->request->getQuery() as $key => $value){\r\n if(empty($value) || is_null($value)){\r\n unset($_GET[$key]);\r\n }\r\n }\r\n }\r\n }", "public function getUnfilteredParameters()\n {\n return array_merge($this->get('postData'), $this->get('getData'));\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}", "protected function _set_request_data_from_params(){\n \n //if( !$this->request->is('post') && !empty($this->request->params['named'])){\n// $this->request->data['Region']['id'] = $this->request->params['named']['region_id'];\n// $this->request->data['Area']['id'] = $this->request->params['named']['area_id'];\n// $this->request->data['House']['id'] = $this->request->params['named']['house_id'];\n// \n// if( isset($this->request->params['named']['house_id']) ){\n// $this->request->data['House']['id'] = $this->request->params['named']['house_id'];\n// }\n// if( isset($this->request->params['named']['representative_id']) ){\n// $this->request->data['Representative']['id'] = $this->request->params['named']['representative_id'];\n// }\n// if( isset($this->request->params['named']['section_id']) ){\n// $this->request->data['Section']['id'] = $this->request->params['named']['section_id'];\n// }\n// if( isset($this->request->params['named']['outlet_id']) ){\n// $this->request->data['Outlet']['id'] = $this->request->params['named']['outlet_id'];\n// }\n// if( isset($this->request->params['named']['from_date']) ){\n// $this->request->data['from_date'] = $this->request->params['named']['from_date'];\n// }\n// if( isset($this->request->params['named']['till_date']) ){\n// $this->request->data['till_date'] = $this->request->params['named']['till_date'];\n// }\n //} \n \n $this->request->data['Region']['id'] = $this->request->query['region_id'];\n $this->request->data['Area']['id'] = $this->request->query['area_id'];\n $this->request->data['House']['id'] = $this->request->query['house_id'];\n \n \n if( isset($this->request->params['named']['representative_id']) ){\n $this->request->data['Representative']['id'] = $this->request->query['representative_id'];\n }\n if( isset($this->request->params['named']['section_id']) ){\n $this->request->data['Section']['id'] = $this->request->query['section_id'];\n }\n if( isset($this->request->params['named']['outlet_id']) ){\n $this->request->data['Outlet']['id'] = $this->request->query['outlet_id'];\n }\n if( isset($this->request->params['named']['from_date']) ){\n $this->request->data['from_date'] = $this->request->query['from_date'];\n }\n if( isset($this->request->params['named']['till_date']) ){\n $this->request->data['till_date'] = $this->request->query['till_date'];\n }\n }", "public static function post($variable='*'){\n \n self::load();\n \n if($variable!='*'){\n return self::$request->request->get($variable); \n }\n else{\n return self::$request->request->all();\n }\n }", "function requirePOST(...$args) {\n foreach ($args as $field) {\n if (!isset($_POST[$field])) die(\"Missing data!\\n\");\n }\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}", "public function getParameterFields()\n {\n return false;\n }", "function parse_parameters($data)\n{\n $parameters = array();\n $body_params = array();\n //if we get a GET, then parse the query string\n if($_SERVER['REQUEST_METHOD'] == 'GET') {\n if (isset($_SERVER['QUERY_STRING'])) {\n // make this more defensive\n return $_GET;\n }\n } else {\n // Otherwise it is POST, PUT or DELETE.\n // At the moment, we only deal with JSON\n //$data = file_get_contents(\"php://input\");\n $body_params = json_decode($data, TRUE);\n print_r($body_params);\n }\n\n foreach ($body_params as $field => $value) {\n $parameters[$field]= $value;\n }\n return $parameters;\n}", "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 }", "public function param($name = null, $type = null) {\n /*! Note @ 23 Apr, 2015\n * POST validation should be simple, just match it with some hash key stored in sessions.\n */\n // TODO: Do form validation, take reference from form key of Magento.\n\n $result = $this->_param($type);\n\n if ( is_array($result) ) {\n // remove meta keys and sensitive values\n $result = array_filter_keys($result,\n funcAnd(\n notIn([ ini_get(\"session.name\") ], true),\n compose(\"not\", startsWith($this->metaPrefix))\n )\n );\n }\n\n if ( $name === null ) {\n return $result;\n }\n else {\n $fx = prop($name);\n return $fx($result);\n }\n }", "protected function validDataFromRequest()\n {\n return array_merge([\n 'obj_type',\n 'obj_id',\n 'rev_num',\n ], parent::validDataFromRequest());\n }", "public static function getRequiredParams();", "protected function createEntityPOST() {\n\n $jsonFieldsToProcess = array('last_login_filter', 'receipt_type_filter', 'open_type_filter', 'page_visit_filter');\n\n $this->savedBroadcastTypes = !empty($_POST['broadcast_types']) ? $_POST['broadcast_types'] : null;\n unset($_POST['broadcast_types']);\n\n $savedJsonFieldsData = array();\n foreach ($jsonFieldsToProcess as $f) {\n if ($f == 'last_login_filter') {\n $savedJsonFieldsData[$f] = !empty($_POST[$f]['operator']) ? $_POST[$f] : null;\n } else {\n $savedJsonFieldsData[$f] = !empty($_POST[$f]) ? $_POST[$f] : null;\n }\n unset($_POST[$f]);\n }\n\n $entity = parent::createEntityPOST();\n\n foreach ($jsonFieldsToProcess as $f) {\n $entity[$f] = !empty($savedJsonFieldsData[$f]) ? json_encode($savedJsonFieldsData[$f], JSON_FORCE_OBJECT) : null;\n }\n\n return $entity;\n }", "public function getActionParams()\n\t{\n\t\t$args = parent::getActionParams();\n\n\t\t// Add in the $_POST array, giving it precedence\n\t\treturn array_merge($args, $_POST);\n\t}", "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 }", "private function parseIncomingParams() {\r\n\t\t$parameters = array ();\r\n\t\t\r\n\t\t// First of all, pull the GET vars\r\n\t\tif (isset ( $_SERVER ['QUERY_STRING'] )) {\r\n\t\t\tparse_str ( $_SERVER ['QUERY_STRING'], $parameters );\r\n\t\t}\r\n\t\t\r\n\t\t// Now how about PUT/POST bodies? These override what we got from GET\r\n\t\t$body = file_get_contents ( \"php://input\" );\r\n\t\t$content_type = false;\r\n\t\tif (isset ( $_SERVER ['CONTENT_TYPE'] )) {\r\n\t\t\t$content_type = $_SERVER ['CONTENT_TYPE'];\r\n\t\t}\r\n\t\tswitch ($content_type) {\r\n\t\t\tcase \"application/json\" :\r\n\t\t\t\t{\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t$body_params = json_decode ( $body );\r\n\t\t\t\t\t\tif ($body_params) {\r\n\t\t\t\t\t\t\tforeach ( $body_params as $param_name => $param_value ) {\r\n\t\t\t\t\t\t\t\t$parameters [$param_name] = $param_value;\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$this->format = \"json\";\r\n\t\t\t\t\t} catch (Exception $exception) {\r\n\t\t\t\t\t\t$errorResponse = array();\r\n\t\t\t\t\t\t$errorResponse['response'] = App_Constant::$TEXT_ERROR_RESPONSE;\r\n\t\t\t\t\t\t$errorResponse['message'] = App_Constant::$ERROR_FAIL_DB_IMPROPER_CLIENT_REQUEST;\r\n\t\t\t\t\t\treturn $errorResponse;\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\tbreak;\r\n\t\t\tdefault :\r\n\t\t\t\t// we could parse other supported formats here\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t$this->parameters = $parameters;\r\n\t}", "function processRequest(){\n\tglobal $muse; // App settings & database\n\tglobal $HTTP_RAW_POST_DATA;\n\t\n\t// Get the user's posted action\n\t$muse['actionRequestRaw'] = $HTTP_RAW_POST_DATA;\n\t$muse['actionRequest'] = $muse['db']->real_escape_string(trim($HTTP_RAW_POST_DATA));\n\t// First word of action request will be the action keyword.\n\t$muse['actionKeyword'] = strtolower(substr( $muse['actionRequest'], 0, strpos( $muse['actionRequest'], \" \" ) ) );\n\t\n\t// If it's only one word, through it back in. Capatlization issues?\n\tif ($muse['actionKeyword']==false) {\n\t\t$muse['actionKeyword'] = $muse['actionRequest'];\n\t}\n}", "public function getRequiredParameters();", "public function getRequiredParameters();", "function is_post() {\n\treturn $_SERVER['REQUEST_METHOD'] == 'POST';\n}", "public function parameters()\n {\n return array_merge($this->get, $this->post);\n }", "public function parsePostData()\n {\n }", "abstract public function getRequestBody();", "public static function _POST()\n {\n if(!self::$_post) {\n $values = $_POST;\n self::$_post = new HttpParams($values);\n }\n return self::$_post;\n }", "public function ParsePostData() {}", "function post($name, $default = false, $filter = false){\n if (isset($_POST[$name])) {\n if ($filter) {\n switch ($filter) {\n case 'int':\n return is_numeric($_POST[$name]) ? $_POST[$name] : $default;\n break;\n }\n } else {\n return $_POST[$name];\n }\n } else {\n return $default;\n }\n}", "private function get_post_request( $key, $default = false, $type = 'GET' ) {\n\t\t$return = $default;\n\t\tif ( false !== $this->has( $key, $type ) ) {\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'GET':\n\t\t\t\t\t$return = Helper::array_key_get( $key, $_GET, $default );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'POST':\n\t\t\t\t\t$return = Helper::array_key_get( $key, $_POST, $default );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'REQUEST':\n\t\t\t\t\t$return = Helper::array_key_get( $key, $_REQUEST, $default );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$return = $default;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "public function isPost();", "public function getRequestParameters()\r\n\t{\r\n\t\tswitch($_SERVER['REQUEST_METHOD'])\r\n\t\t{\r\n\t\t\tcase 'GET':\r\n\t\t\t\t\r\n\t\t\t\t$uri = $_SERVER['REQUEST_URI'];\r\n\t\t\t\t\r\n\t\t\t\tif(preg_match(RestAPI::CUSTOM_BASE64_REGEX, $_SERVER['REQUEST_URI'], $m))\r\n\t\t\t\t\treturn $this->parseCompressedParameters($m[0]);\r\n\t\t\t\t\r\n\t\t\t\treturn $_GET;\r\n\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'POST':\r\n\t\t\t\r\n\t\t\t\treturn $_POST;\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'DELETE':\r\n\t\t\tcase 'PUT':\r\n\t\t\t\r\n\t\t\t\t$request = array();\r\n\t\t\t\t$body = file_get_contents('php://input');\r\n\t\t\t\tparse_str($body, $request);\r\n\t\t\t\t\r\n\t\t\t\treturn $request;\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\r\n\t\t\t\treturn $_REQUEST;\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "protected function __bindAfterRemoveEmpty($type='post'){\r\n $results = array();\r\n switch ($type) {\r\n case 'post':\r\n foreach($this->request->getPost() as $key => $value){\r\n $results[$key] = $value;\r\n }\r\n return $results;\r\n break;\r\n \r\n case 'get':\r\n foreach($this->request->getQuery() as $key => $value){\r\n if($key !== '_url'){\r\n $results[$key] = $value;\r\n }\r\n }\r\n return $results;\r\n break;\r\n }\r\n }", "public function unsafeAllPost()\n {\n return $this->postvars;\n }", "public function getRequestParameters() {\n return array();\n }", "public function testGetPostParams()\n {\n // simulate a post\n $expected = array('document' => array('name' => 'hey'),\n 'post_test1' => 'false', 'post_test2' => 'go yanks');\n $this->assertEquals($expected, $this->_req->getPostParams());\n }", "public function post(): array\n {\n $list = $this->getUnitsList($this->requestPostParameters());\n\n foreach($list as $unit) {\n $this->parameters[$unit->getUnitKey()] = $unit->getUnitParameter();\n }\n\n return $this->parameters;\n }", "function getPOSTData() {\n // check headers for one of two specific content-types\n $headers = getallheaders();\n $headerError = 'You must specify a Content-Type of either `application/x-www-form-urlencoded` or `application/json`';\n if ( !isset($headers['Content-Type']) ) {\n errorExit( 400, $headerError );\n }\n\n if ( $headers['Content-Type'] === 'application/json' ) {\n // parse the input as json\n $requestBody = file_get_contents( 'php://input' );\n $data = json_decode( $requestBody );\n if ( $data === null ) {\n errorExit( 400, 'Error parsing JSON' );\n }\n return $data;\n } else if ( $headers['Content-Type'] === 'application/x-www-form-urlencoded' ) {\n // convert the $_POST data from an associative array to an object\n return (object)$_POST;\n } else {\n errorExit( 400, $headerError );\n }\n}", "public function test_aptivate_request_extracts_parameter_subsets()\n\t{\n\t\t$_GET = array('hello' => array('bonk' => 'whee!'));\n\t\t$req = new Aptivate_Request('GET', '/fake-test-script.php',\n\t\t\t'/fake-test-url');\n\t\t$this->assertEquals('whee!', $req['hello']->param('bonk'));\n\t\t$this->assertEquals('whee!', $req['hello']->param('bonk'));\n\t\t\n\t\t$_POST = $_GET;\n\t\t$_GET = array();\n\t\t$req = new Aptivate_Request('GET', '/fake-test-script.php',\n\t\t\t'/fake-test-url');\n\t\t$this->assertEquals('whee!', $req['hello']->param('bonk'));\n\t\t$this->assertEquals('whee!', $req['hello']->param('bonk'));\n\t}", "function is_post()\n {\n\t \n return $_SERVER['REQUEST_METHOD'] == 'POST';\n }", "public static function post_type(){}" ]
[ "0.65967983", "0.65819126", "0.6569871", "0.65487933", "0.65364546", "0.64292634", "0.636753", "0.6360307", "0.6359314", "0.6341095", "0.63166517", "0.6240009", "0.6088325", "0.6077701", "0.60482645", "0.603084", "0.6018115", "0.6006058", "0.59902585", "0.5968261", "0.5953073", "0.59341115", "0.592802", "0.58935463", "0.5848246", "0.5838199", "0.5830434", "0.579212", "0.57913834", "0.5785887", "0.5780603", "0.57733977", "0.5758254", "0.57549024", "0.57544124", "0.57496065", "0.5741591", "0.5739693", "0.5729953", "0.5718822", "0.5674963", "0.56701124", "0.56493217", "0.56491876", "0.5649109", "0.56459993", "0.5645404", "0.5639808", "0.56396496", "0.56339306", "0.5633902", "0.56331474", "0.5632608", "0.5628442", "0.56190795", "0.561698", "0.56156087", "0.5596418", "0.55949086", "0.55836755", "0.5569136", "0.5562176", "0.5557267", "0.5552737", "0.5540258", "0.55365807", "0.55354816", "0.55296314", "0.55279833", "0.5508571", "0.5504717", "0.55011845", "0.54968417", "0.5473722", "0.54728395", "0.5469162", "0.54611844", "0.5447769", "0.5444505", "0.54350066", "0.54341763", "0.54341763", "0.54337007", "0.5426672", "0.54231894", "0.54097104", "0.540416", "0.54037625", "0.53970975", "0.5393357", "0.53923875", "0.53900206", "0.5385964", "0.53855735", "0.5374114", "0.53688735", "0.536653", "0.5360627", "0.5352251", "0.5351302", "0.5351258" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('admin'); }
{ "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() { $properties = Property::where('id', '!=', 0)->get(); if (count($properties) > 0) { foreach ($properties as $property) { if ($property->boss_id > 0) { $property['boss'] = User::where('id', $property->boss_id)->first(); } } } $tempProperties = TempProperty::where('id', '!=', 0)->get(); if (count($tempProperties) > 0) { foreach ($tempProperties as $tempProperty) { if ($tempProperty->temp_user_id > 0) { $tempProperty['owner'] = TempUser::where('id', $tempProperty->temp_user_id)->first(); } } } return view('property.index')->with([ 'properties' => $properties, 'tempProperties' => $tempProperties ]); }
{ "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() { $users = User::where([ 'isAdmin' => null, 'isEmployee' => null, 'isBoss' => 1, 'boss_id' => null ])->get(); return view('property.create')->with('users', $users); }
{ "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() { $rules = array( 'name' => 'required', 'street' => 'required', 'city' => 'required' ); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { return Redirect::to('property/create') ->withErrors($validator); } else { $bossId = null; if (Input::get('user') !== 0) { $boss = User::where([ 'id' => Input::get('user'), 'isAdmin' => null, 'isEmployee' => null, 'isBoss' => 1, 'boss_id' => null ])->first(); if ($boss !== null) { $bossId = $boss->id; } } $property = new Property(); $property->name = Input::get('name'); $property->slug = str_slug(Input::get('name')); $property->description = Input::get('description'); $property->street = Input::get('street'); $property->street_number = Input::get('street_number'); $property->house_number = Input::get('house_number'); $property->city = Input::get('city'); $property->boss_id = $bossId !== null ? $bossId : auth()->user()->id; $property->save(); return redirect('/property/index')->with('success', 'Property successfully created!'); } }
{ "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 tempPropertyShow($id) { $tempProperty = TempProperty::where('id', $id)->with('tempUser')->first(); if ($tempProperty !== null) { return view('property.temp_property_show')->with([ 'tempProperty' => $tempProperty ]); } return redirect()->route('welcome')->with('error', 'There is no such temporary property'); }
{ "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) { $property = Property::where('id', $id)->first(); if ($property !== null) { $bosses = User::where([ 'isAdmin' => null, 'isEmployee' => null, 'isBoss' => 1, 'boss_id' => null ])->get(); $admins = User::where([ 'isAdmin' => 1, 'isEmployee' => null, 'isBoss' => null, 'boss_id' => null ])->get(); if (count($admins) > 0) { foreach ($admins as $admin) { $bosses->push($admin); } $property['bosses'] = $bosses; return view('property.edit')->with('property', $property); } } return redirect()->route('welcome'); }
{ "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
Remove the specified resource from storage.
public function destroy($id) { $property = Property::where('id', $id)->first(); if ($property !== null) { $property->delete(); return redirect('/property/index')->with('success', 'Property deleted!'); } return redirect()->route('welcome')->with('error', 'There is no such property'); }
{ "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
Remove the specified resource from storage.
public function tempPropertyDestroy($id) { $tempProperty = TempProperty::where('id', $id)->first(); if ($tempProperty !== null) { $tempProperty->delete(); return redirect('/property/index')->with('success', 'Temporary property deleted!'); } return redirect()->route('welcome')->with('error', 'There is no such temporary property'); }
{ "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
Validate a few cases and requests the googlemap API to obtain the lat/lng of a user address and store it in the gmap SQL table as well as in cache
public function refreshUserGeolocation($iUserId, $sCountryIso, $sCity, $sPostalCode) { $aUserRow = $this->getUserAddress($iUserId); //Address Not found if($aUserRow == null || !isset($sCity) || $sCity == '') { $this->database()->delete(Phpfox::getT('gmap'), 'user_id = \'' . $iUserId . '\''); $this->cache()->remove('gmap.locations', 'substr'); $this->cache()->remove('gmap.countries', 'substr'); return; } //Address Found //Get Country $aCountry = $this->database()->select('c.name as country') ->from(Phpfox::getT('country'), 'c') ->where('c.country_iso = \'' . $sCountryIso . '\'') ->execute('getSlaveRow'); //Get Full Address $addressCode = $sCity . ' ' . $aCountry['country'] . ' ' . $sPostalCode; //Get User past location (if exists) $aUserLocation = $this->database()->select('f.*') ->from(Phpfox::getT('gmap'), 'f') ->where('f.user_id = \'' . $iUserId . '\'') ->execute('getSlaveRow'); //Same address, don't do anything if($aUserLocation != null && $addressCode == $aUserLocation['address']) return; //Delete cache $this->cache()->remove('gmap.locations', 'substr'); $this->cache()->remove('gmap.countries', 'substr'); //Not same address, do something! $this->database()->delete(Phpfox::getT('gmap'), 'user_id = \'' . $iUserId . '\''); //Insert new value if(!isset($oGoogleMapService)) $oGoogleMapService = Phpfox::getService('gmap.googlemap'); $return = $oGoogleMapService->geocoding($addressCode); if(isset($return)) { $return[2] = ((float)$return[2]) + ((float)rand(-1000, 1000)) / 100000; $return[3] = ((float)$return[3]) + ((float)rand(-1000, 1000)) / 100000; $this->database()->insert(Phpfox::getT('gmap'), array( 'user_id' => $iUserId, 'lat' => $return[2], 'lng' => $return[3], 'address' => $addressCode, 'not_found' => 0 ) ); } else { $this->database()->insert(Phpfox::getT('gmap'), array( 'user_id' => $iUserId, 'address' => $addressCode, 'not_found' => 1 ) ); } //Check if new country $aCountryLocalisation = $this->database()->select('c.country_iso') ->from(Phpfox::getT('gmap_countries'), 'c') ->where('c.country_iso = \'' . $sCountryIso . '\'') ->execute('getSlaveRow'); if($aCountryLocalisation == null) { //Create new one $diffBound = 0; if($sCountryIso == 'FR') $diffBound = 1; $return = $oGoogleMapService->geocoding($aCountry['country']); if(isset($return)) { $this->database()->insert(Phpfox::getT('gmap_countries'), array( 'country_iso' => $sCountryIso, 'lat' => $return[2], 'lng' => $return[3], 'northeast_lat' => ((float)$return[4]['northeast']['lat']) - $diffBound, 'northeast_lng' => ((float)$return[4]['northeast']['lng']) - $diffBound, 'southwest_lat' => ((float)$return[4]['southwest']['lat']) + $diffBound, 'southwest_lng' => ((float)$return[4]['southwest']['lng']) + $diffBound ) ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getlatlng($address)\n\t{\n\t\t#perintah pengulangan jika terdapat query limit saat mendapatkan data\n\t\tgetlatlng:\n\t\t$data = json_decode(file_get_contents(\"http://maps.google.com/maps/api/geocode/json?address=\" . urlencode($address)));\n\t\t\n\t\t#berhenti jika data tidak lagi over query limit\n\t\tif($data->status == \"OVER_QUERY_LIMIT\")\n\t\t{\n\t\t\tgoto getlatlng;\n\t\t}else \n\t\t{\n\t\t\treturn \"{$data->results[0]->geometry->location->lat},{$data->results[0]->geometry->location->lng}\";\n\t\t}\n\t}", "function getGeocodeData($address) {\n $address = urlencode($address);\n $googleMapUrl = \"https://maps.googleapis.com/maps/api/geocode/json?address={$address}&key=AIzaSyCXB6yLq41R_CSfl2saDa1pqqOutnamespace OCFram\\Blog\\Model;PwVNnI\";\n $geocodeResponseData = file_get_contents($googleMapUrl);\n $responseData = json_decode($geocodeResponseData, true);\n if($responseData['status']=='OK') {\n $latitude = isset($responseData['results'][0]['geometry']['location']['lat']) ? $responseData['results'][0]['geometry']['location']['lat'] : \"\";\n $longitude = isset($responseData['results'][0]['geometry']['location']['lng']) ? $responseData['results'][0]['geometry']['location']['lng'] : \"\";\n $formattedAddress = isset($responseData['results'][0]['formatted_address']) ? $responseData['results'][0]['formatted_address'] : \"\";\n if($latitude && $longitude && $formattedAddress) {\n $geocodeData = $latitude . \";\" . $longitude;\n return $geocodeData;\n } else {\n return false;\n }\n } else {\n echo \"ERROR: {$responseData['status']}\";\n return false;\n }\n }", "function grabUserLocation($input){\n $user_city = $input;\n $request_url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\".$user_city.\"%20Canada&sensor=false\";\n $USERJSON = file_get_contents($request_url);\n $result = json_decode($USERJSON);\n $lat=$result->results[0]->geometry->location->lat;\n $long=$result->results[0]->geometry->location->lng;\n return compact('lat','long');\n}", "function venture_geo_process() {\n $geocoded = venture_geo_process_geocodes();\n $existing_map = venture_geo_get_map_path();\n \n if ($geocoded || !$existing_map) {\n venture_geo_process_map($existing_map);\n }\n}", "function get_lat_long($address){\r\n\t$API_KEY = 'AIzaSyC70LnMBiqyXcmpnQeryzq0VK12o6P5pnw';\r\n\t$address = str_replace(\" \", \"+\", $address);\r\n\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".$address.\"&key=\".$API_KEY.\"\";\r\n\t$json = file_get_contents($url);\r\n\t$json = json_decode($json);\r\n\tif($json->status == 'ZERO_RESULTS'){\r\n\t\t$lat = 0;\r\n\t\t$long = 0; \t\r\n\t}else{\r\n\t\t$lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};\r\n\t\t$long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};\t\r\n\t}\r\n\t\r\n\t$location = [$lat,$long];\r\n\treturn $location;\r\n}", "function geocode($address)\n{\n\n // url encode the address\n $address = urlencode($address);\n\n // google map geocode api url\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?key=AIzaSyDZwgb_z_wFGqrzvxbrLri_CXJRjklDoTM&address={$address}\";\n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n // response status will be 'OK', if able to geocode given address\n if ($resp['status'] == 'OK') {\n\n // get the important data\n $lati = $resp['results'][0]['geometry']['location']['lat'];\n $longi = $resp['results'][0]['geometry']['location']['lng'];\n\n // verify if data is complete\n if ($lati && $longi) {\n // put the data in the array\n $data_arr = array();\n\n array_push(\n $data_arr,\n $lati,\n $longi\n );\n\n return $data_arr;\n\n } else {\n return false;\n }\n\n } else {\n return false;\n }\n}", "function getCoordination($address){\r\n $address = str_replace(\" \", \"+\", $address); // replace all the white space with \"+\" sign to match with google search pattern\r\n \r\n $url = \"http://maps.google.com/maps/api/geocode/json?sensor=false&address=$address\";\r\n \r\n $response = file_get_contents($url);\r\n \r\n $json = json_decode($response,TRUE); //generate array object from the response from the web\r\n\r\n $latitude = ($json[\"results\"][0][\"geometry\"][\"location\"][\"lat\"]);\r\n $longitude = ($json[\"results\"][0][\"geometry\"][\"location\"][\"lng\"]);\r\n\r\n return array(\"latitude\" => $latitude, \"longitude\" => $longitude);\r\n }", "function geocode($address){\n \n // url encode the address\n $address = urlencode($address);\n \n // google map geocode api url\n $url = \"http://maps.google.com/maps/api/geocode/json?address={$address}\";\n \n // get the json response\n $resp_json = file_get_contents($url);\n \n // decode the json\n $resp = json_decode($resp_json, true);\n ;\n // response status will be 'OK', if able to geocode given address \n if($resp['status']=='OK'){\n \n // get the important data\n $lati = $resp['results'][0]['geometry']['location']['lat'];\n $longi = $resp['results'][0]['geometry']['location']['lng'];\n $formatted_address = $resp['results'][0]['formatted_address'];\n \n // verify if data is complete\n if($lati && $longi && $formatted_address){\n \n // put the data in the array\n $data_arr = array(); \n \n array_push(\n $data_arr, \n $lati, \n $longi, \n $formatted_address\n );\n \n return $data_arr;\n \n }else{\n return false;\n }\n \n }else{\n return false;\n }\n}", "function get_lat_long($address)\r\n{\t\r\n\t//sleep(1);\r\n $address = str_replace(\" \", \"+\", $address);\r\n $json = file_get_contents(\"http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false&region=$region\");\r\n $json = json_decode($json);\r\n\t// echo \"<pre>\"; print_r($json); \r\n\r\n $lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};\r\n $long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};\r\n return $lat.','.$long;\r\n}", "function google_map_get_coordinates( $address, $force_refresh = false ) {\n\t$address_hash = md5( $address );\n\t$coordinates = get_transient( $address_hash );\n\tif ($force_refresh || $coordinates === false) {\n\t\t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false', 'key' => 'AIzaSyA4-ZxE3QqrSWpnwsjSke4Bs5DDN1LeFB0' );\n\t\t$url = add_query_arg( $args, 'https://maps.googleapis.com/maps/api/geocode/json' );\n\t\t// var_dump($url);\n\t\t$response \t= wp_remote_get( $url );\n\t\tif( is_wp_error( $response ) )\n\t\t\treturn;\n\t\t$data = wp_remote_retrieve_body( $response );\n\t\tif( is_wp_error( $data ) )\n\t\t\treturn;\n\t\tif ( $response['response']['code'] == 200 ) {\n\t\t\t// var_dump($data);\n\t\t\t$data = json_decode( $data );\n\t\t\tif ( $data->status === 'OK' ) {\n\t\t\t\t$coordinates = $data->results[0]->geometry->location;\n\t\t\t\t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t\t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t\t$cache_value['address'] = (string) $data->results[0]->formatted_address;\n\t\t\t\t// // cache coordinates for 3 months\n\t\t\t\t// set_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t\t// $data = $cache_value;\n\t\t\t\t// var_dump($data->status);\n\t\t\t} elseif ( $data->status === 'ZERO_RESULTS' ) {\n\t\t\t\treturn __( 'No location for the address.', 'aletheme' );\n\t\t\t} elseif( $data->status === 'INVALID_REQUEST' ) {\n\t\t\t\treturn __( 'Bad request. Did you enter an address name?', 'aletheme' );\n\t\t\t} else {\n\t\t\t\treturn ($data->status);\n\t\t\t\t// return __( 'Error, please check if you have entered the shortcode correctly.', 'aletheme' );\n\t\t\t}\n\t\t} else {\n\t\t\treturn __( 'Can\\'t connect Google API.', 'aletheme' );\n\t\t}\n\t} else {\n\t\t// return cached results\n\t\t$data = $coordinates;\n\t}\n\t// return (array) $data;\n\t$coords = array();\n\t// var_dump($data);\n\t// print(\"<pre>\".print_r($data,true).\"</pre>\");\n\t// var_dump($data->results[0]->geometry->location->lat);\n\t$coords['lat'] = $data->results[0]->geometry->location->lat;\n\t$coords['lng'] = $data->results[0]->geometry->location->lng;\n\t// var_dump($data->results[0]->geometry->location->lng);\n\treturn $coords;\n}", "function checkAddress($address = null, $state = null, $city = null, $zip = null) {\n $this->autoRender = false;\n if (isset($_POST)) {\n $zipCode = ltrim($zip, \" \");\n $stateName = $state;\n $cityName = strtolower($city);\n $cityName = ucwords($cityName);\n $dlocation = $address . \" \" . $cityName . \" \" . $stateName . \" \" . $zipCode;\n $adjuster_address2 = str_replace(' ', '+', $dlocation);\n $geocode = file_get_contents('https://maps.google.com/maps/api/geocode/json?key='.GOOGLE_GEOMAP_API_KEY.'&address=' . $adjuster_address2 . '&sensor=false');\n $output = json_decode($geocode);\n if ($output->status == \"ZERO_RESULTS\" || $output->status != \"OK\") {\n echo 2;\n die; // Bad Address\n } else {\n $latitude = @$output->results[0]->geometry->location->lat;\n $longitude = @$output->results[0]->geometry->location->lng;\n $formated_address = @$output->results[0]->formatted_address;\n if ($latitude) {\n echo 1;\n die; // Good Address\n }\n }\n }\n }", "function geocode($address)\n{\n $address = urlencode($address);\n\n // google map geocode api url\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address={$address}&key=AIzaSyAkFXEAzdyEZaQe0ZSSVtaP5yeS4vW1ygE\";\n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n\n // response status will be 'OK', if able to geocode given address \n if ($resp['status'] == 'OK') {\n\n // get the important data\n $lati = isset($resp['results'][0]['geometry']['location']['lat']) ? $resp['results'][0]['geometry']['location']['lat'] : \"\";\n $longi = isset($resp['results'][0]['geometry']['location']['lng']) ? $resp['results'][0]['geometry']['location']['lng'] : \"\";\n $formatted_address = isset($resp['results'][0]['formatted_address']) ? $resp['results'][0]['formatted_address'] : \"\";\n\n // verify if data is complete\n if ($lati && $longi && $formatted_address) {\n\n // put the data in the array\n $data_arr = array();\n\n array_push(\n $data_arr,\n $lati,\n $longi\n );\n\n return $data_arr;\n } else {\n return false;\n }\n } else {\n echo \"<strong>ERROR: {$resp['status']}</strong>\";\n return false;\n }\n}", "private function getLocationGoogle()\n {\n $url = 'https://maps.googleapis.com/maps/api/geocode/json'; // api url\n $url .= '?address=' . $this->postcode; // postcode to search\n $url .= '&components=country:JP'; // filter by country Japan to prevent from ambiguos results\n $url .= '&key=' . $GLOBALS['apikey_googlemap']; // api key\n $result = $this->callAPI($url);\n // call function to extract api response \n return $result ? $this->extractGoogleResult(json_decode($result)) : false;\n }", "function geolocate($address)\r\n\t{\r\n\t\t$lat = 0;\r\n\t\t$lng = 0;\r\n\t\t\r\n\t\t$data_location = \"http://maps.google.com/maps/api/geocode/json?address=\".str_replace(\" \", \"+\", $address).\"&sensor=false\";\r\n\t\t\r\n\t\tif ($this->region!=\"\" && strlen($this->region)==2) { $data_location .= \"&region=\".$this->region; }\r\n\t\t$data = file_get_contents($data_location);\r\n\t\tusleep(200000);\r\n\t\t\r\n\t\t// turn this on to see if we are being blocked\r\n\t\t// echo $data;\r\n\t\t\r\n\t\t$data = json_decode($data);\r\n\t\t\r\n\t\tif ($data->status==\"OK\") {\r\n\t\t\t$lat = $data->results[0]->geometry->location->lat;\r\n\t\t\t$lng = $data->results[0]->geometry->location->lng;\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate lat/long coordinates\r\n\t\t$coords['lat'] = $lat;\r\n\t\t$coords['lng'] = $lng;\r\n\t\t\r\n\t\treturn $coords;\r\n\t}", "public function getCoordinates(Address $address)\n {\n $type = NULL;\n\n //set latitude and longitude of new user\n //remove bis, ter from address street for localization research because it makes the research inaccurate \n $base = strtolower(trim($address->getStreet1().' '.$address->getZipCity()->getZipCode().' '.$address->getZipCity()->getCity())) ; \n \n if(preg_match('/^\\d+/',$base)){\n $type = 'housenumber';\n }elseif(preg_match('/^hameau/',$base)){\n $type = 'locality';\n }elseif(preg_match('/^(allée|allee|rue|impasse|square|avenue)/',$base)){\n $type = 'street';\n }\n\n //replace strings for better score\n $base = preg_replace('/\\s(bis|ter)\\s/',' ',$base);\n $base = preg_replace('/^(\\d+)(bis|ter)\\s/','${1} ',$base);\n $base = preg_replace('/\\,/',' ',$base);\n $base = preg_replace('/\\s(st)e?\\s/',' saint ',$base);\n $base = preg_replace('/\\s(dr)\\s/',' docteur ',$base);\n $base = preg_replace('/\\s(jo|j\\.o)\\s/',' jeux olympiques ',$base);\n\n $arrayParams = array( \n 'q' => $base,\n //'postcode' => $address->getZipCity()->getZipCode(),\n 'lat'=>'45.19251',\n 'lon'=>'5.72756',\n 'limit' => 2 \n ); \n if($type){\n $arrayParams['type'] = $type;\n }\n\n $res = $this->api->get('https://api-adresse.data.gouv.fr/','search/',$arrayParams);\n\n if($res['code'] == 200){ \n $features = $res['results']['features']; \n\n if( count($features) > 1){ \n if($features[0]['properties']['score'] > $features[1]['properties']['score'] ){\n $location = $features[0]; \n }else{\n $location = $features[1]; \n }\n }elseif(count($features) == 1){ \n $location = $features[0]; \n }else{\n return array('latitude'=>NULL ,'longitude'=>NULL, 'closest'=>array('label'=>'Aucune'));\n } \n\n $score = $location['properties']['score'];\n if($score <= 0.67){ \n if($score >= 0.60 && isset($location['properties']['oldcity'])){// if the address matches a former deprecated city name\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n if($score >= 0.58){\n $similarityStreet = similar_text(strtolower($address->getStreet1()),strtolower($location['properties']['name']),$prec);\n if(! ($location['properties']['type'] == 'municipality')){//if municipality, name is city\n if($prec >= 50){\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n }\n }\n return array('latitude'=>NULL ,'longitude'=>NULL,'closest' => $location['properties']);\n }else{\n return array('latitude'=>$location['geometry']['coordinates'][1] ,'longitude'=>$location['geometry']['coordinates'][0]);\n }\n }else{\n throw new \\Exception('geolocalization_api_failed : '.$res['results']['description']);\n }\n\n }", "public function GeoLocate($addr){\n $geoapi = \"http://maps.googleapis.com/maps/api/geocode/json\";\n $params = array(\"address\"=>$addr,\"sensor\"=>\"false\");\n $response = $this->GET($geoapi,$params);\n $json = json_decode($response);\n if ($json->status === \"ZERO_RESULTS\") {\n return NULL;\n } else {\n return array($json->results[0]->geometry->location->lat,$json->results[0]->geometry->location->lng);\n }\n }", "public function do_geocoding( $address = null ) {\n\n\t\t\t// Null address, build from current location\n\t\t\t//\n\t\t\tif ( $address === null ) {\n\t\t\t\t$address =\n\t\t\t\t\t$this->address . ' ' .\n\t\t\t\t\t$this->address2 . ' ' .\n\t\t\t\t\t$this->city . ' ' .\n\t\t\t\t\t$this->state . ' ' .\n\t\t\t\t\t$this->zip . ' ' .\n\t\t\t\t\t$this->country;\n\t\t\t}\n\t\t\t$address = trim( $address );\n\n\t\t\t// Only process non-empty addresses.\n\t\t\t//\n\t\t\tif ( ! empty( $address ) ) {\n\t\t\t\t$this->count ++;\n\t\t\t\tif ( $this->count === 1 ) {\n\t\t\t\t\t$this->retry_maximum_delayms = (int) $this->slplus->options_nojs['retry_maximum_delay'] * 1000000;\n\t\t\t\t\t$this->iterations = max( 1, (int) $this->slplus->options_nojs['geocode_retries'] );\n\t\t\t\t}\n\n\t\t\t\t$errorMessage = '';\n\n\t\t\t\t// Get lat/long from Google\n\t\t\t\t//\n\t\t\t\t$json_response = $this->get_LatLong( $address );\n\t\t\t\tif ( ! empty( $json_response ) ) {\n\n\t\t\t\t\t// Process the data based on the status of the JSON response.\n\t\t\t\t\t//\n\t\t\t\t\t$json = json_decode( $json_response );\n\t\t\t\t\tif ( $json === null ) {\n\t\t\t\t\t\t$json = json_decode( json_encode( array( 'status' => 'ERROR', 'message' => $json_response ) ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch ( $json->{'status'} ) {\n\n\t\t\t\t\t\t// OK\n\t\t\t\t\t\t// Geocode completed successfully\n\t\t\t\t\t\t// Update the lat/long if it has changed.\n\t\t\t\t\t\t//\n\t\t\t\t\t\tcase 'OK':\n\t\t\t\t\t\t\t$this->set_LatLong( $json->results[0]->geometry->location->lat, $json->results[0]->geometry->location->lng );\n\t\t\t\t\t\t\t$this->delay = SLPlus_Location::StartingDelay;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// OVER QUERY LIMIT\n\t\t\t\t\t\t// Google is getting to many requests from this IP block.\n\t\t\t\t\t\t// Loop through for X retries.\n\t\t\t\t\t\t//\n\t\t\t\t\t\tcase 'OVER_QUERY_LIMIT':\n\t\t\t\t\t\t\t$errorMessage .= sprintf( __( \"Address %s (%d in current series) hit the Google query limit.\\n\", 'store-locator-le' ),\n\t\t\t\t\t\t\t\t\t$address,\n\t\t\t\t\t\t\t\t\t$this->count\n\t\t\t\t\t\t\t ) . '<br/>';\n\t\t\t\t\t\t\t$attempts = 1;\n\t\t\t\t\t\t\t$totalDelay = 0;\n\n\t\t\t\t\t\t\t// Keep trying up until the user-selected number of retries.\n\t\t\t\t\t\t\t// Increase the wait between each try by 1 second.\n\t\t\t\t\t\t\t// Wait no more than 10 seconds between attempts.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\twhile ( $attempts ++ < $this->iterations ) {\n\t\t\t\t\t\t\t\tif ( $this->delay <= $this->retry_maximum_delayms + 1 ) {\n\t\t\t\t\t\t\t\t\t$this->delay += 1000000;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$totalDelay += $this->delay;\n\t\t\t\t\t\t\t\tusleep( $this->delay );\n\t\t\t\t\t\t\t\t$json = $this->get_LatLong( $address );\n\t\t\t\t\t\t\t\tif ( $json !== null ) {\n\t\t\t\t\t\t\t\t\t$json = json_decode( $json );\n\t\t\t\t\t\t\t\t\tif ( $json->{'status'} === 'OK' ) {\n\t\t\t\t\t\t\t\t\t\t$this->set_LatLong( $json->results[0]->geometry->location->lat, $json->results[0]->geometry->location->lng );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$errorMessage .= sprintf(\n\t\t\t\t\t\t\t\t __( 'Waited up to %4.2f seconds between request, total wait for this location was %4.2f seconds.', 'store-locator-le' ),\n\t\t\t\t\t\t\t\t $this->delay / 1000000,\n\t\t\t\t\t\t\t\t $totalDelay / 1000000\n\t\t\t\t\t\t\t ) .\n\t\t\t\t\t\t\t \"\\n<br>\";\n\t\t\t\t\t\t\t$errorMessage .= sprintf(\n\t\t\t\t\t\t\t\t __( '%d total attempts for this location.', 'store-locator-le' ),\n\t\t\t\t\t\t\t\t $attempts - 1\n\t\t\t\t\t\t\t ) .\n\t\t\t\t\t\t\t \"\\n<br>\";\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// ZERO RESULTS\n\t\t\t\t\t\t// Bad address provided or nothing found on Google end.\n\t\t\t\t\t\t//\n\t\t\t\t\t\tcase 'ZERO_RESULTS':\n\t\t\t\t\t\t\t$errorMessage .= sprintf( __( \"Address #%d : %s <font color=red>failed to geocode</font>.\", 'store-locator-le' ),\n\t\t\t\t\t\t\t\t\t$this->id,\n\t\t\t\t\t\t\t\t\t$address\n\t\t\t\t\t\t\t ) . \"<br />\\n\";\n\t\t\t\t\t\t\t$errorMessage .= sprintf( __( \"Unknown Address! Received status %s.\", 'store-locator-le' ), $json->{'status'} ) . \"\\n<br>\";\n\t\t\t\t\t\t\t$this->delay = SLPlus_Location::StartingDelay;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t// GENERIC\n\t\t\t\t\t\t// Could not geocode.\n\t\t\t\t\t\t//\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$errorMessage .=\n\t\t\t\t\t\t\t\tsprintf( __( \"Address #%d : %s <font color=red>failed to geocode</font>.\", 'store-locator-le' ),\n\t\t\t\t\t\t\t\t\t$this->id,\n\t\t\t\t\t\t\t\t\t$address ) .\n\t\t\t\t\t\t\t\t\"<br/>\\n\" .\n\t\t\t\t\t\t\t\tsprintf( __( \"Received status %s.\", 'store-locator-le' ),\n\t\t\t\t\t\t\t\t\t$json->{'status'} ) .\n\t\t\t\t\t\t\t\t\"<br/>\\n\" .\n\t\t\t\t\t\t\t\tsprintf( __( \"Received data %s.\", 'store-locator-le' ),\n\t\t\t\t\t\t\t\t\t'<pre>' . print_r( $json, true ) . '</pre>' );\n\t\t\t\t\t\t\t$this->delay = SLPlus_Location::StartingDelay;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// No raw json\n\t\t\t\t\t//\n\t\t\t\t} else {\n\t\t\t\t\t$errorMessage .= __( 'Geocode service non-responsive', 'store-locator-le' ) .\n\t\t\t\t\t \"<br/>\\n\" .\n\t\t\t\t\t $this->geocodeURL . urlencode( $address );\n\t\t\t\t}\n\n\t\t\t\t// Blank Address Error\n\t\t\t\t//\n\t\t\t} else {\n\t\t\t\t$errorMessage = __( 'Address is blank.', 'store-locator-le' );\n\t\t\t}\n\n\t\t\t// Show Error Messages\n\t\t\t//\n\t\t\tif ( $errorMessage != '' ) {\n\t\t\t\tif ( ! $this->geocodeIssuesRendered ) {\n\t\t\t\t\t$errorMessage =\n\t\t\t\t\t\t'<strong>' .\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t__( 'If you are having geocoding issues, %s', 'store-locator-le' ),\n\t\t\t\t\t\t\t$this->slplus->Text->get_web_link( 'docs_for_geocoding' )\n\t\t\t\t\t\t) .\n\t\t\t\t\t\t\"</strong><br/>\\n\" .\n\t\t\t\t\t\t$errorMessage;\n\t\t\t\t\t$this->geocodeIssuesRendered = true;\n\t\t\t\t}\n\t\t\t\t$this->slplus->notifications->add_notice( 6, $errorMessage );\n\n\t\t\t\t// Good encoding\n\t\t\t\t//\n\t\t\t} elseif ( ! $this->geocodeSkipOKNotices ) {\n\t\t\t\t$this->slplus->notifications->add_notice(\n\t\t\t\t\t9,\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t__( 'Google thinks %s is at <a href=\"%s\" target=\"_blank\">lat: %s long %s</a>', 'store-locator-le' ),\n\t\t\t\t\t\t$address,\n\t\t\t\t\t\tsprintf( 'https://%s/?q=%s,%s',\n\t\t\t\t\t\t\t$this->slplus->options['map_domain'],\n\t\t\t\t\t\t\t$this->latitude,\n\t\t\t\t\t\t\t$this->longitude ),\n\t\t\t\t\t\t$this->latitude, $this->longitude\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * HOOK: slp_location_geocoded\n\t\t\t *\n\t\t\t * Run this when the current location is geocoded.\n\t\t\t *\n\t\t\t * @param SLPLus_Location $location\n\t\t\t */\n\t\t\tdo_action( 'slp_location_geocoded', $this );\n\n\t\t}", "function getLatLong($address, $city, $postalCode) {\n $combinedAddress = $address . \", \" . $postalCode . \" \" . $city;\n\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\" . urlencode($combinedAddress) . \"&key=\" . Config::GOOGLE_API_KEY;\n $context = stream_context_create();\n $result = file_get_contents($url, false, $context);\n\n if (isset($result)) {\n $parsedResult = json_decode($result, true);\n\n if (isset($parsedResult[\"results\"])) {\n $results = $parsedResult[\"results\"];\n $firstLocation = $results[0];\n return $firstLocation[\"geometry\"][\"location\"];\n } else {\n echo($result);\n }\n } else {\n echo \"HELP\";\n }\n}", "function getGeo($address) {\n\t\tif(!empty($address)){\n\t\t\t//build a string with each part of the address\n\t $formattedAddress = str_replace(' ','+',$address);\n\t\t\t//Send request and receive json data by address\n\t\t\t$geocodeFromAddr = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($formattedAddress).'&sensor=false');\n\t\t\t$output = json_decode($geocodeFromAddr);\n\t\t\t//Check if it was a valid address\n\t\t\tif(empty($output->results)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//Get latitude and longitute from json data\n\t\t\t$geocode['lat'] = $output->results[0]->geometry->location->lat;\n\t\t\t$geocode['lng'] = $output->results[0]->geometry->location->lng;\n\t\t\t$address_data = $output->results[0]->address_components;\n\t\t\tfor ($i = 0; $i < sizeof($address_data); $i++) {\n\t\t\t\tif ($address_data[$i]->types[0] == \"locality\") {\n\t\t\t\t\t$geocode['city'] = $address_data[$i]->long_name;\n\t\t\t\t}\n\t\t\t\tif ($address_data[$i]->types[0] == \"administrative_area_level_1\") {\n\t\t\t\t\t$geocode['state'] = $address_data[$i]->long_name;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Return latitude, longitude, city, and state of the given address\n\t\t\tif(!empty($geocode) && !empty($geocode['city']) && !empty($geocode['state'])){\n\t\t\t\treturn $geocode;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function form_map($name, $value, $parameters, $cp) {\n\n if (!$value)\n $value = get_setting('website_address');\n\n Layout::addJavascript(\"\n\n var map, stepDisplay, marker, old_position, old_address = '\" . $value . \"';\n\n function initMap(){\n\n $('#map_canvas').css('height', '500px');\n $('#reset_map').show();\n\n var myOptions = { zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP, };\n map = new google.maps.Map(document.getElementById('map_canvas'), myOptions );\n\n address = $('#addr').val()\n geocoder = new google.maps.Geocoder();\n geocoder.geocode( { 'address': address}, function(results, status) {\n var location = results[0].geometry.location\n old_position = location\n map.setCenter( location );\n addMarker( location )\n });\n\n }\n\n function resetLocation(){\n $('#addr').val( old_address )\n address = old_address\n geocoder = new google.maps.Geocoder();\n geocoder.geocode( { 'address': address}, function(results, status) {\n var location = results[0].geometry.location\n old_position = location\n map.setCenter( location );\n addMarker( location )\n });\n }\n\n function addMarker( location ){\n if( marker )\n marker.setMap(null)\n marker = new google.maps.Marker({ position: location, map: map, draggable: true });\n\n google.maps.event.addListener(marker, 'dragstart', function() {\n //map.closeInfoWindow();\n });\n\n google.maps.event.addListener(marker, 'dragend', function(event) {\n updateLocation( event.latLng )\n });\n }\n\n function updateLocation(location){\n var p = location.toString()\n var latlngStr = p.split(',');\n var lat = latlngStr[0].substr(1)\n var lng = latlngStr[1].substr(0,latlngStr[1].length-1)\n\n $('#location').val(lat + ',' + lng);\n\n geocoder.geocode({'latLng': location}, function(results, status) {\n if (status == google.maps.GeocoderStatus.OK)\n if (results[0]){\n\n var address = results[0].formatted_address\n var address_components = new Array();\n for( var i in results[0].address_components )\n address_components[results[0].address_components[i].types] = results[0].address_components[i].long_name\n\n $('#addr').val(results[0].formatted_address)\n }\n\n });\n\n }\n\n \");\n\n $html = '<script type=\"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=false\"></script>';\n $html .= '<div id=\"map_canvas\"><a href=\"javascript:initMap();\">Click to init the map</a></div>';\n $html .= '<input type=\"hidden\" id=\"location\" name=\"extra3\"/><br>address <input type=\"text\" name=\"extra2\" style=\"width:76%;\" id=\"addr\" value=\"' . $value . '\" onchange=\"initMap()\"/> <a href=\"javascript:initMap();\">Refresh</a>';\n $html .= '<div id=\"reset_map\" style=\"display:none;\"><br><a href=\"javascript:resetLocation();\">Reset Address</a><br></div>';\n return $html;\n }", "public static function geodecode_request($addr_str){\n\n $url = 'http://maps.googleapis.com/maps/api/geocode/json?';\n\n $param = array(\n 'address' => \"$addr_str\",\n 'sensor' => 'false',\n );\n\n $url = $url.http_build_query($param);\n\n $response = file_get_contents($url);\n $json = json_decode($response, TRUE);\n\n if($json['status'] == 'OVER_QUERY_LIMIT')\n throw new Exception(self::OVER_QUERY_LIMIT);\n\n if($json['status'] != 'OK')\n throw new Exception(self::NO_RESULT);\n\n $results = first($json['results']);\n\n $lat = (float)$results['geometry']['location']['lat'];\n $lon = (float)$results['geometry']['location']['lng'];\n\n return compact('lat', 'lon', 'request');\n }", "function geocode($address){\n \n // url encode the address\n $address = urlencode($address);\n \n // google map geocode api url\n $url = \"https://maps.google.com/maps/api/geocode/json?address=\".$address.\"&key=AIzaSyBUmXudJDRuXR6ZiUxuiskGnf13pwTvAa0\";\n \n // get the json response\n $resp_json = file_get_contents($url);\n \n // decode the json\n $resp = json_decode($resp_json, true);\n \n // response status will be 'OK', if able to geocode given address \n if($resp['status']=='OK'){\n \n // get the important data\n $lati = $resp['results'][0]['geometry']['location']['lat'];\n $longi = $resp['results'][0]['geometry']['location']['lng'];\n $formatted_address = $resp['results'][0]['formatted_address'];\n \n // verify if data is complete\n if($lati && $longi && $formatted_address){\n \n // put the data in the array\n $data_arr = array(); \n \n array_push(\n $data_arr,\n $lati, \n $longi, \n $formatted_address\n );\n \n return $data_arr;\n \n }else{\n return false;\n }\n \n }else{\n return false;\n }\n }", "function humanize_point($location) {\n\tglobal $global_mysqli_link;\n\tglobal $protokd_point_start, $protokd_point_finish;\n\tglobal $message_start, $message_finish;\n\tglobal $gmaps_geocode_url, $gmaps_server_key, $maximum_http_response_size;\n\tglobal $cache_geocoding;\n\n\t//location = start, return message start\n\tif ($location == $protokd_point_start) {\n\t\treturn $message_start;\n\t} else if ($location == $protokd_point_finish) {\n\t//location = finish, return message start\n\t\treturn $message_finish;\n\t} else {//selain start atau finish\n\t\t//escape string location untuk dimasukkan ke query sql\n\t\t$location = mysqli_escape_string($global_mysqli_link, $location);\n\n\t\t//cek cache ada dengan key cache_geocoding,value location\n\t\t$cached_geocode = get_from_cache($cache_geocoding, $location);\n\t\t//kalo tidak null, return langsung\n\t\tif (!is_null($cached_geocode)) {\n\t\t\treturn $cached_geocode;\n\t\t} else {//jika null cachenya\n\n\t\t\t// query from google.\n\t\t\t$full_url = \"$gmaps_geocode_url?key=$gmaps_server_key&latlng=$location&sensor=false\";\n\t\t\t$result = file_get_contents($full_url, NULL, NULL, 0, $maximum_http_response_size + 1);\n\t\t\tif ($result == FALSE) {\n\t\t\t\tdie_nice(\"There's an error while reading the geocoding response from $full_url.\");\n\t\t\t}\n\t\t\t// TODO this checking doesn't seem to work.\n\t\t\tif (sizeof($result) > $maximum_http_response_size) {\n\t\t\t\tdie_nice(\"Data returned from $full_url is greater than the maximum.\");\n\t\t\t}\n\t\t\t$json_response = json_decode($result, true);\n\t\t\tif ($json_response == NULL) {\n\t\t\t\tdie_nice(\"Unable to retrieve JSON response from Google geocoding service.\");\n\t\t\t}\n\t\t\t//add sugestion place\n\t\t\tif ($json_response['status'] == 'OK') {\n\t\t\t\t$bestguess = $location;\n\t\t\t\tfor ($i = 0; $i < count($json_response['results']); $i++) {\n\t\t\t\t\tforeach ($json_response['results'][0]['address_components'] as $component) {\n\t\t\t\t\t\tif (in_array('transit_station', $component['types']) || in_array('route', $component['types'])) {\n\t\t\t\t\t\t\tput_to_cache($cache_geocoding, $location, $component['long_name']);\n\t\t\t\t\t\t\treturn $component['long_name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$bestguess = $component['long_name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlog_error(\"Warning: can't find street name, use best guess $bestguess for $location.\");\n\t\t\t\tput_to_cache($cache_geocoding, $location, $bestguess);\n\t\t\t\treturn $bestguess;\n\t\t\t} else if ($json_response['status'] == 'ZERO_RESULTS') {\n\t\t\t\t// If not found, return the coordinate.\n\t\t\t\tlog_error(\"Warning: can't find coordinate for $location.\");\n\t\t\t\treturn $location;\n\t\t\t} else {\n\t\t\t\tdie_nice(\"Problem while geocoding from Google reverse geocoding: \" . $result);\n\t\t\t}\n\t\t}\n\t}\n}", "function getCoordinates($address){\r\n\t$key = \"AIzaSyA2PDrfTTbXNZKOn15K-VbWgLfdTevM3qw\";\r\n\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($address).\"&sensor=false&key=\".$key;\r\n\t$json = file_get_contents($url);\r\n\t$results = json_decode($json, true);\r\n\r\n\t$stack = array();\r\n\t$status = $results['status'];\r\n\tif ($status == \"OK\") {\r\n\t\t$lat = $results['results']['0']['geometry']['location']['lat'];\r\n\t\tarray_push($stack, $lat);\r\n\t\t$lng = $results['results']['0']['geometry']['location']['lng'];\r\n\t\tarray_push($stack, $lng);\r\n\t}\r\n\telse{\r\n\t\techo \"ERREUR DE GOOGLE GEOCODE API\";\r\n\t\t$incase = array();\r\n\t\tarray_push($stack, 48.853396);\r\n\t\tarray_push($stack, 2.348779);\r\n\t\treturn $incase;\r\n\t}\r\n\t\r\n\treturn $stack;\r\n}", "function venture_geo_process_geocodes() {\n $geocoded = false;\n \n $query = \"SELECT nid FROM {content_type_profile} WHERE LENGTH(IFNULL(field_location_value, '')) = 0\";\n $result = db_query($query);\n \n while ($row = db_fetch_object($result)) {\n $profile = node_load($row->nid);\n $city = $profile->field_city[0]['value'];\n $state = $profile->field_state[0]['value'];\n $country = $profile->field_country[0]['value'];\n \n $geo_location = $city . ',' . $state . ',' . $country;\n $geo_query = array('query' => $geo_location, 'maxRows' => 1);\n $geo_result = geonames_query('search', $geo_query);\n \n $location = 'invalid';\n \n if (!$geo_result) {\n watchdog('venture', \"Unable to geocode $location\");\n continue;\n }\n else if ($geo_result->results) {\n $geocode = $geo_result->results[0];\n $location = $geocode['name'] . '|' . $geocode['lat'] . '|' . $geocode['lng'];\n $geocoded = true;\n }\n \n $profile->field_location[0]['value'] = $location;\n node_save($profile);\n }\n \n return $geocoded;\n}", "function receiveMap($zipcode){\n\t//assigning variables to lat and long\n\t//schools\n\t$schools=receiveSchool($zipcode);\n\t$slat1=$schools[0]['latitude'];\n\t$slon1=$schools[0]['longitude'];\n\t$slat2=$schools[1]['latitude'];\n $slon2=$schools[1]['longitude'];\n $slat3=$schools[2]['latitude'];\n $slon3=$schools[2]['longitude'];\n $slat4=$schools[3]['latitude'];\n $slon4=$schools[3]['longitude'];\n\t$saddr1=\"&markers=color:blue%7Clabel:1%7C\".$slat1.','.$slon1;\n $saddr2=\"&markers=color:blue%7Clabel:2%7C\".$slat2.','.$slon2;\n $saddr3=\"&markers=color:blue%7Clabel:3%7C\".$slat3.','.$slon3;\n\t$saddr4=\"&markers=color:blue%7Clabel:4%7C\".$slat4.','.$slon4;\n\t$saddrTotal=$saddr1.$saddr2.$saddr3.$saddr4;\n \t//houses\n\t$address=receiveCurl($zipcode);\n\t$lat1=$address[0]['latitude'];\n\t$lon1=$address[0]['longitude'];\n\t$lat2=$address[1]['latitude'];\n\t$lon2=$address[1]['longitude'];\n\t$lat3=$address[2]['latitude'];\n\t$lon3=$address[2]['longitude'];\n\t$lat4=$address[3]['latitude'];\n\t$lon4=$address[3]['longitude'];\n\t$lat5=$address[4]['latitude'];\n\t$lon5=$address[4]['longitude'];\n\t//formatting for google maps url\n\t$addr1=\"&markers=label:1%7C\".$lat1.\",\".$lon1;\n\t$addr2=\"&markers=label:2%7C\".$lat2.\",\".$lon2;\n\t$addr3=\"&markers=label:3%7C\".$lat3.\",\".$lon3;\n\t$addr4=\"&markers=label:4%7C\".$lat4.\",\".$lon4;\n\t$addr5=\"&markers=label:5%7C\".$lat5.\",\".$lon5;\n\t$api_key='AIzaSyB4hMVNgMIg8-mXh2gbO5BggD39n0Y0c4I';\n\t//url code that combines att addresses\n\t$url =\"https://maps.googleapis.com/maps/api/staticmap?size=640x640\".$saddrTotal.$addr1.$addr2.$addr3.$addr4.$addr5.\"&key=\".$api_key;\n\t//downloading url to png locally\n\t$dest='googleMap.png';\n\t$download=file_put_contents($dest, file_get_contents($url));\n\t//encoding to send to rmq *incomplete*\n\t$image=file_get_contents(\"googleMap.png\");\n\t$data=base64_encode($image);\n\t$json=json_encode($data);\n\treturn $json;\n}", "function amap_ma_geocode_location($location) {\n $coords = array();\n $google_api_key = trim(elgg_get_plugin_setting('google_api_key', AMAP_MA_PLUGIN_ID));\n $mapquest_api_key = trim(elgg_get_plugin_setting('mapquest_api_key', AMAP_MA_PLUGIN_ID));\n\n $geocoder = new \\Geocoder\\ProviderAggregator();\n $adapter = new \\Ivory\\HttpAdapter\\CurlHttpAdapter();\n $chain = new \\Geocoder\\Provider\\Chain([\n new \\Geocoder\\Provider\\GoogleMaps($adapter, $google_api_key),\n new \\Geocoder\\Provider\\MapQuest($adapter, $mapquest_api_key),\n ]);\n\n $geocoder->registerProvider($chain);\n\n try {\n $geocode = $geocoder->geocode($location);\n } catch (Exception $e) {\n error_log('amap_maps_api --------->' . $e->getMessage());\n return false;\n }\n\n if ($geocode->count() > 0) {\n $coords['lat'] = $geocode->first()->getLatitude();\n $coords['long'] = $geocode->first()->getLongitude();\n return $coords;\n }\n\n return false;\n}", "function get_map_coordinates($address, $force_refresh = false) {\n\n $address_hash = md5( $address );\n\n $coordinates = get_transient( $address_hash );\n\n if ($force_refresh || $coordinates === false) {\n\n \t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false' );\n \t$url = add_query_arg( $args, 'http://maps.googleapis.com/maps/api/geocode/json' );\n \t$response \t= wp_remote_get( $url );\n\n \tif( is_wp_error( $response ) )\n \t\treturn;\n\n \t$pmc_data = wp_remote_retrieve_body( $response );\n\n \tif( is_wp_error( $pmc_data ) )\n \t\treturn;\n\n\t\tif ( $response['response']['code'] == 200 ) {\n\n\t\t\t$pmc_data = json_decode( $pmc_data );\n\n\t\t\tif ( $pmc_data->status === 'OK' ) {\n\n\t\t\t \t$coordinates = $pmc_data->results[0]->geometry->location;\n\n\t\t\t \t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t \t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t \t$cache_value['address'] = (string) $pmc_data->results[0]->formatted_address;\n\n\t\t\t \t// cache coordinates for 3 months\n\t\t\t \tset_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t \t$pmc_data = $cache_value;\n\n\t\t\t} elseif ( $pmc_data->status === 'ZERO_RESULTS' ) {\n\t\t\t \treturn __( 'No location found for the entered address.', 'pw-maps' );\n\t\t\t} elseif( $pmc_data->status === 'INVALID_REQUEST' ) {\n\t\t\t \treturn __( 'Invalid request. Did you enter an address?', 'pw-maps' );\n\t\t\t} else {\n\t\t\t\treturn __( 'Something went wrong while retrieving your map, please ensure you have entered the short code correctly.', 'pw-maps' );\n\t\t\t}\n\n\t\t} else {\n\t\t \treturn __( 'Unable to contact Google API service.', 'pw-maps' );\n\t\t}\n\n } else {\n // return cached results\n $pmc_data = $coordinates;\n }\n\n return $pmc_data;\n}", "function ale_map_get_coordinates( $address, $force_refresh = false ) {\n\n $address_hash = md5( $address );\n\n $coordinates = get_transient( $address_hash );\n\n if ($force_refresh || $coordinates === false) {\n\n $args = array( 'address' => urlencode( $address ), 'sensor' => 'false' );\n $url = add_query_arg( $args, 'http://maps.googleapis.com/maps/api/geocode/json' );\n $response \t= wp_remote_get( $url );\n\n if( is_wp_error( $response ) )\n return;\n\n $data = wp_remote_retrieve_body( $response );\n\n if( is_wp_error( $data ) )\n return;\n\n if ( $response['response']['code'] == 200 ) {\n\n $data = json_decode( $data );\n\n if ( $data->status === 'OK' ) {\n\n $coordinates = $data->results[0]->geometry->location;\n\n $cache_value['lat'] \t= $coordinates->lat;\n $cache_value['lng'] \t= $coordinates->lng;\n $cache_value['address'] = (string) $data->results[0]->formatted_address;\n\n // cache coordinates for 3 months\n set_transient($address_hash, $cache_value, 3600*24*30*3);\n $data = $cache_value;\n\n } elseif ( $data->status === 'ZERO_RESULTS' ) {\n return __( 'No location for the address.', 'aletheme' );\n } elseif( $data->status === 'INVALID_REQUEST' ) {\n return __( 'Bad request. Did you enter an address name?', 'aletheme' );\n } else {\n return __( 'Error, please check if you have entered the shortcode correctly.', 'aletheme' );\n }\n\n } else {\n return __( 'Can\\'t connect Google API.', 'aletheme' );\n }\n\n } else {\n // return cached results\n $data = $coordinates;\n }\n\n return $data;\n }", "function geocode($address) {\n\t\t// http://maps.google.com/maps/api/geocode/json?address=\n\n\t\t// encodage de l'adresse pour la soumettre par url (remplacer les espaces présents dans l'adresse par des %20)\n\t\t$address = urlencode($address);\n\n\t\t// url de l'API pour géocoder \n\t\t$urlApi = \"http://maps.google.com/maps/api/geocode/json?address=$address\";\n\n\t\t// appel à l'api gmap decode (en GET - réponse en JSON)\n\t\t$responseJson = file_get_contents($urlApi);\n\n\t\t// décodage du json pour le transformer en array php associatif (-> 2ème paramètre : true)\n\t\t$responseArray = json_decode($responseJson, true);\n\n/*\t\techo '<pre>';\n\t\tprint_r($responseArray);\n\t\techo '</pre>';*/\n\n\t\t// on prépare un tableau associatif de retour pcq on 2 infos (lat et lng à retourner alors \n\t\t// qu'une fonction ne peut avoir qu'un seul retour)\n\t\t$response = [];\n\n\t\t// je teste le status de réponse de l'api -> OK (sinon, cela signifie qu'il n'y a pas de correspondance -> 'zero résult')\n\t\tif($responseArray['status'] == 'OK') {\n\t\t\t$lat = $responseArray['results']['0']['geometry']['location']['lat'];\n\t\t\t$lng = $responseArray['results']['0']['geometry']['location']['lng'];\n\n/*\t\t\techo $lat.'</br>';\n\t\t\techo $lng.'</br>';*/\n\n\t\t\t// test facultatif - on vérifie seulement que lat et lng sont bien présentes \n\t\t\tif($lat && $lng) {\n\t\t\t\t$response['lat'] = $lat;\n\t\t\t\t$response['lng'] = $lng;\n\t\t\t}\n\t\t}\n\t\treturn $response;\n\t}", "function location_cmn($lat, $long, $usegeolocation, $customerno = null) {\n $address = NULL;\n $customerno = (!isset($customerno)) ? $_SESSION['customerno'] : $customerno;\n if (isset($lat) && isset($long)) {\n $GeoCoder_Obj = new GeoCoder($customerno);\n $address = $GeoCoder_Obj->get_location_bylatlong($lat, $long);\n }\n return $address;\n}", "function request()\r\n {\r\n $searchstring = array();\r\n if ( $this->street )\r\n $searchstring[] = $this->street;\r\n if ( $this->zip and $this->city)\r\n $searchstring[] = $this->zip . ' ' . $this->city;\r\n elseif ( $this->zip )\r\n $searchstring[] = $this->zip;\r\n elseif ( $this->city )\r\n $searchstring[] = $this->city;\r\n if ( $this->state )\r\n $searchstring[] = $this->state;\r\n if ( $this->country )\r\n $searchstring[] = $this->country;\r\n\r\n $searchstring = implode( ', ', $searchstring );\r\n // ini values\r\n $gisini = eZINI::instance( \"gis.ini\" ); \r\n $key = $gisini->variable( \"Google\", \"ApplicationID\" );\r\n $url = $gisini->variable( \"Google\", \"Url\" );\r\n \r\n $requestUrl= $url.\"?q=\".urlencode($searchstring).\"&key=$key&output=xml\"; \r\n\r\n eZDebug::writeDebug( $requestUrl, 'Google GeoCoder Request');\r\n //request the google kml result\r\n $kml = file ( $requestUrl );\r\n\r\n if ( !empty($kml[0]) )\r\n {\r\n eZDebug::writeDebug( $kml[0], 'Google GeoCoder Response');\r\n $xmldomxml = new eZXML();\r\n $xmldom = $xmldomxml->domTree($kml[0]);\r\n\r\n //API Manual: http://www.google.com/apis/maps/documentation/reference.html#GGeoStatusCode\r\n $dom_statuscode = $xmldom->elementsByName( \"code\" );\r\n $dom_statuscode = $dom_statuscode[0]->textContent(); \r\n\r\n if ( $dom_statuscode==\"200\" ) \r\n {\r\n\r\n //API Manual: http://www.google.com/apis/maps/documentation/reference.html#GGeoAddressAccuracy\r\n $dom_adressdetails = $xmldom->elementsByName( \"AddressDetails\" ); \r\n $dom_accuracy = $dom_adressdetails[0]->get_attribute( \"Accuracy\" );\r\n if ( in_array( $dom_accuracy, array( 8,7,6,5 ) ) )\r\n {\r\n $this->accuracy = 'GeoCoder::ACCURACY_STREET';\r\n }\r\n elseif ( in_array( $dom_accuracy, array( 4 ) ) )\r\n {\r\n $this->accuracy = 'GeoCoder::ACCURACY_CITY';\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n if ($xmldom->elementsByName( \"ThoroughfareName\" ))\r\n {\r\n $dom_street= $xmldom->elementsByName( \"ThoroughfareName\" );\r\n $dom_street = $dom_street[0]->textContent(); \r\n }\r\n\r\n if ($xmldom->elementsByName( \"PostalCodeNumber\" ))\r\n {\r\n $dom_zip= $xmldom->elementsByName( \"PostalCodeNumber\" );\r\n $dom_zip = $dom_zip[0]->textContent(); \r\n }\r\n \r\n if ($xmldom->elementsByName( \"LocalityName\" ))\r\n {\r\n $dom_city = $xmldom->elementsByName( \"LocalityName\" );\r\n $dom_city = $dom_city[0]->textContent(); \r\n }\r\n\r\n if ($xmldom->elementsByName( \"AdministrativeAreaName\" ))\r\n {\r\n $dom_state = $xmldom->elementsByName( \"AdministrativeAreaName\" );\r\n $dom_state = $dom_state[0]->textContent(); \r\n }\r\n if ($xmldom->elementsByName( \"CountryNameCode\" ))\r\n {\r\n $dom_country = $xmldom->elementsByName( \"CountryNameCode\" );\r\n $dom_country = $dom_country[0]->textContent();\r\n }\r\n \r\n\r\n $dom_point = $xmldom->elementsByName( \"coordinates\" );\r\n $dom_point = $dom_point[0]->textContent();\r\n\r\n $dom_point = explode(\",\", $dom_point);\r\n $dom_long = $dom_point[0];\r\n $dom_lat = $dom_point[1];\r\n\r\n // Map values to object\r\n $this->accuracy = $dom_accuracy;\r\n $this->street = $dom_street;\r\n $this->zip = $dom_zip;\r\n $this->city = $dom_city;\r\n $this->state = $dom_state;\r\n $this->country = $dom_country;\r\n $this->longitude = $dom_long;\r\n $this->latitude = $dom_lat;\r\n $this->phi = deg2rad($dom_long);\r\n $this->theta = deg2rad($dom_lat); \r\n return true; \r\n }\r\n }\r\n else\r\n {\r\n return false;\r\n } \r\n }", "public function geocode(Address $address);", "public function gen_coords($city_only = true) {\r\n if (!$this->city) {\r\n return false;\r\n }\r\n $place = \"\";\r\n if (!$city_only) {\r\n $name = str_replace(str_split(\"_ -/\\\\&?\"), \"+\", $this->name);\r\n $address = str_replace(str_split(\"_ -/\\\\&?\"), \"+\", $this->address);\r\n $place = \"$name+$address+\";\r\n }\r\n $address = \"$place$this->city+$this->state\";\r\n $google_api_key = \\Nefuzz\\Php\\Auth::google_maps_key;\r\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=$address&key=$google_api_key\";$curl_handle = curl_init();\r\n curl_setopt( $curl_handle, CURLOPT_URL, $url );\r\n curl_setopt( $curl_handle, CURLOPT_RETURNTRANSFER, true );\r\n $choord_info = json_decode(curl_exec( $curl_handle ), true);\r\n curl_close( $curl_handle );\r\n if ($choord_info[\"status\"] === \"OK\") {\r\n $result = $choord_info['results'][0]['geometry']['location'];\r\n $this->lat = $result[\"lat\"];\r\n $this->lng = $result[\"lng\"];\r\n return $result;\r\n } elseif ($choord_info[\"status\"] === \"OVER_QUERY_LIMIT\") {\r\n // This is thrown if too many addresses are querried at once\r\n throw new Exception(\"OVER_QUERY_LIMIT\");\r\n } else {\r\n return false;\r\n }\r\n }", "function bmlt_geocode (\t$in_address,\t///< The address, in a single string, to be sent to the geocoder.\n $in_isPublished ///< TRUE, if the meeting is published.\n )\n {\n global $region_bias;\n $ret = null;\n $status = null;\n $uri = 'https://maps.googleapis.com/maps/api/geocode/xml?key=' . $GLOBALS['gkey'] . '&address='.urlencode ( $in_address );\n if ( $region_bias )\n {\n $uri .= '&region='.strtolower(trim($region_bias));\n }\n\n $xml = simplexml_load_file ( $uri );\n \n if ( isset ( $xml ) )\n {\n if ( $xml->status == 'OK' )\n {\n $ret = array ( 'original' => $in_address, 'result' => bmlt_parse_gecode_result ( $xml->result, $in_isPublished ) );\n $retry = false;\n }\n elseif ( ( $xml->status == 'OVER_QUERY_LIMIT' ) || ($xml->status == 'OVER_DAILY_LIMIT') )\n {\n die ( 'Over Google Maps API Query Limit' . \". \" . $xml->error_message );\n }\n elseif ($xml->status == 'REQUEST_DENIED')\n {\n die ( 'Problem with API Key ('.htmlspecialchars ( $uri ).')' . \". \" . $xml->error_message );\n }\n elseif ($xml->status == 'INVALID_REQUEST')\n {\n die ( 'Invalid Geocode URL ('.htmlspecialchars ( $uri ).')' . \". \" . $xml->error_message );\n }\n }\n return $ret;\n }", "function getLongLat($postcode){\n\t//This function first checks the postcodesdetailed table for the long/lat\n\t//If not found, uses the Google Geocoding API to calculate and updates the postcodesdetailed table\n\t$db = new DB;\n\t//$postcode = \"DY5 2UA\";\n\t$object = new stdClass();\n\t\n\t$postcode = trim($postcode);\n\t//Check to see if postcode exists in postcodesdetailed table\n\t$postcode_a = strtoupper(str_replace(\" \",\"\",$postcode));\n\t$postcode_a = addslashes($postcode_a);\n\t$db->query(\"SELECT pdLat, pdLong FROM postcodesdetailed WHERE pdPostcode = '$postcode_a'\");\n\t$db->next_record();\n\tlist ($pdLat, $pdLong) = $db->Record;\n\t\n\tif (($pdLat != '') && ($pdLong != '')){\n\t\t$object->long = $pdLong;\n\t\t$object->lat = $pdLat;\n\t\t$object->status = \"OK\"; //Should return 'OK' if everything fine\n\t} else {\n\t\t\n\t\t$address = str_replace(\" \", \"+\", $postcode);\n\t\t$url = \"http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false&region=UK\";\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_PROXYPORT, 3128);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\t$response_a = json_decode($response);\t\n\t\t\n\t\t$object->long = $response_a->results[0]->geometry->location->lng;\n\t\t$object->lat = $response_a->results[0]->geometry->location->lat;\n\t\t$object->status = $response_a->status; //Should return 'OK' if everything fine\n\t\t\n\t\t//If Long & Lat, INSERT into postcodesdetailed table so that next time we won't need to use the Google API\n\t\tif ($response_a->status == 'OK'){\n\t\t\t$db->query(\"INSERT INTO postcodesdetailed SET pdPostcode='\".$postcode_a.\"', pdLat='\".$object->lat.\"', pdLong='\".$object->long.\"'\");\n\t\t}\n\t}\n\t\n\t/* Status codes\n\t\t- \"OK\" - No Errors.\n\t\t- \"ZERO_RESULTS\" - successful but returned no results. Invalid address or a latlng in a remote location.\n\t\t- \"OVER_QUERY_LIMIT\" - indicates that you are over your quota.\n\t\t- \"REQUEST_DENIED\" - request was denied, generally because of lack of a sensor parameter.\n\t\t- \"INVALID_REQUEST\" - indicates that the query (address or latlng) is missing.\n\t\t- UNKNOWN_ERROR - request could not be processed due to a server error. The request may succeed if you try again.\n\t*/\n\t//var_dump($response_a);\n\treturn $object;\n}", "function geocode($street_address,$city,$state){\n \n $street_address = str_replace(\" \", \"+\", $street_address); //google doesn't like spaces in urls, but who does?\n $city = str_replace(\" \", \"+\", $city);\n $state = str_replace(\" \", \"+\", $state);\n\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=$street_address,+$city,+$state&sensor=false\"; \n $google_api_response = wp_remote_get( $url ); \n\n $results = json_decode( $google_api_response['body'] ); //grab our results from Google\n $results = (array) $results; //cast them to an array\n $status = $results[\"status\"]; //easily use our status\n $location_all_fields = (array) $results[\"results\"][0];\n $location_geometry = (array) $location_all_fields[\"geometry\"];\n $location_lat_long = (array) $location_geometry[\"location\"];\n\n // echo \"<!-- GEOCODE RESPONSE \" ;\n // var_dump( $location_lat_long );\n // echo \" -->\";\n\n if( $status == 'OK'){\n $latitude = $location_lat_long[\"lat\"];\n $longitude = $location_lat_long[\"lng\"];\n }else{\n $latitude = '';\n $longitude = '';\n }\n\n $return = array(\n 'latitude' => $latitude,\n 'longitude' => $longitude\n );\n return $return;\n}", "function helperGeocodeAddress($address='', $zip='', $city='', $country='') {\n\t\t$geocode\t= array();\n\t\t$coords\t\t= array();\n\t\t$search\t\t= false;\n\n\t\tif ($address != '') {\n\t\t\t$geocode[] = $address;\n\t\t\t$search = true;\n\t\t}\n\t\tif ($zip != '') {\n\t\t\t$geocode[] = $zip;\n\t\t\t$search = true;\n\t\t}\n\t\tif ($city != '') {\n\t\t\t$geocode[] = $city;\n\t\t\t$search = true;\n\t\t}\n\t\tif ($country != '') {\n\t\t\t$geocode[] = $country;\n\t\t} else {\n\t\t\t$geocode[] = $this->config['defaultCountry'];\n\t\t}\n\n\t\t// just if there are some values additional to the country\n\t\tif ($search) {\n\t\t\t$geocode = implode(',', $geocode);\n\n\t\t\t// call google service\n\t\t\t$url = 'http://maps.google.com/maps/geo?q='.urlencode($geocode).'&output=csv&key='.$this->config['mapKey'];\n\t\t\t$response=stripslashes(t3lib_div::getURL($url));\n\n\t\t\t// determain the result\n\t\t\t$response = explode(',', $response);\n\n\t\t\t// if there is a result\n\t\t\t$coords['status'] \t= $response[0];\n\t\t\t$coords['accuracy']\t= $response[1];\n\t\t\t$coords['lat']\t\t\t= $response[2];\n\t\t\t$coords['lng']\t\t\t= $response[3];\n\t\t} else {\n\t\t\t\t$coords['status']\t= 601;\n\t\t}\n\n\t\treturn $coords;\n\t}", "public function insertUsermap() {\r\n $userMapEntry = $this->dbConn->queryFirstRow(\"SELECT `mapid` FROM `usermap` WHERE `user_id` = \".intval($this->id).\" AND `ip` = \".$this->dbConn->quoteSmart($_SERVER['REMOTE_ADDR']).\" LIMIT 1\");\r\n if (!$userMapEntry) {\r\n $insertMapEntry = $this->dbConn->stdQuery(\"INSERT INTO `usermap` SET `user_id` = \".intval($this->id).\", `ip` = \".$this->dbConn->quoteSmart($_SERVER['REMOTE_ADDR']).\", `last_date` = \".$this->dbConn->quoteSmart(date('Y-m-d H:i:s')));\r\n if (!$insertMapEntry) {\r\n return False;\r\n }\r\n } else {\r\n $updateMapEntry = $this->dbConn->stdQuery(\"UPDATE `usermap` SET `last_date` = \".$this->dbConn->quoteSmart(date('Y-m-d H:i:s')).\" WHERE `user_id` = \".intval($this->id).\" AND `ip` = \".$this->dbConn->quoteSmart($_SERVER['REMOTE_ADDR']).\" LIMIT 1\");\r\n if (!$updateMapEntry) {\r\n return False;\r\n }\r\n }\r\n return True;\r\n }", "function downloadLatLongByMlNum($ml_num,$table_name){\n $latLongExists = self::where('ml_num',$ml_num)->exists();\n if(!$latLongExists){\n $apikey = env('GOOGLE_MAP_APIKEY');\n $table_type = \"\";\n if($table_name == 'vow_residential_properties'){\n $table_type = 'residential';\n }elseif($table_name=='vow_condo_properties'){\n $table_type = 'condo';\n }\n\n $raw_query = \"Select property_table.ml_num,property_table.addr,property_table.municipality,property_table.zip,property_table.county,property_table.area from $table_name as property_table where property_table.ml_num ='$ml_num' and property_table.area in ('Toronto','York','Durham','Halton','Peel') \";\n $results = DB::select(DB::raw($raw_query));\n \n foreach($results as $property) {\n \n $add = $property->addr;\n $municipality = $property->municipality;\n $zip = $property->zip;\n $county = $property->county;\n $area = $property->area;\n $ml_num= $property->ml_num;\n \n $full_address = $add.' '.$municipality.' '.$area.' '.$county.' '.$zip;\n \n //Formatted address\n $formattedAddr = $full_address;\n \n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($formattedAddr).\"&key=\".$apikey.\"\";\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n $responseJson = curl_exec($ch);\n curl_close($ch);\n $api_response = json_decode($responseJson);\n $latitude = '';\n $longitude = '';\n \n /** Check if api responce is exit or not ***/\n if ($api_response->status == 'OK') {\n $latitude = $api_response->results[0]->geometry->location->lat;\n $longitude = $api_response->results[0]->geometry->location->lng;\n \n } elseif($api_response->status == 'ZERO_RESULTS') {\n $latitude = '';\n $longitude = '';\n }\n \n try {\n //insert query for lat long\n $latLongObj = new LatLong();\n $latLongObj->ml_num = $ml_num;\n $latLongObj->longitude = !empty($longitude)?$longitude:0.00;\n $latLongObj->latitude = !empty($latitude)?$latitude:0.00;\n $latLongObj->table_type = $table_type;\n \\Log::info(\"Downloaded latLongs for $ml_num \");\n \\Log::info(\"Api url for $ml_num is $url\");\n \\Log::info(\"Full Address for $ml_num is $full_address and lat=$latitude and lng=$longitude\");\n return $latLongObj->save() ;\n \n } catch (Exception $e) {\n \\Log::info(\"Downloaded latLongs failed $ml_num \");\n }\n \n }\n }\n return false;\n }", "function getLatLng($address = NULL)\n {\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, 'http://maps.googleapis.com/maps/api/geocode/xml?address='.urlencode($address).'&sensor=true');\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t$xml_response = curl_exec($ch);\n\tcurl_close($ch);\n\n\t$xml = new SimpleXMLElement($xml_response);\n $data = array(\n 'lat' => $xml->result->geometry->location->lat,\n 'lng' => $xml->result->geometry->location->lng\n );\n return $data;\n }", "function geocode() {\n if ( ! $this->input->is_ajax_request() || ! $this->auth->is_login()) {\n return redirect(config_item('site_url'));\n }\n \n $latitude = filter($this->input->get('lat'), 'float', 20);\n $longitude = filter($this->input->get('lon'), 'float', 20);\n\n if (empty($latitude) || empty($longitude)) {\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n\n $this->load->library('Location');\n \n $geocode = $this->location->get_address($latitude, $longitude);\n\n if ( ! empty($geocode) && is_array($geocode)) {\n return $this->output->set_output(json_encode(array(\n 'code' => 'luck',\n 'address' => $geocode['address']\n )));\n }\n\n log_write(LOG_WARNING, 'Yandex geocode error, USER: ' . $this->auth->get_user_id(), __METHOD__);\n\n return $this->output->set_output(json_encode(array(\n 'code' => 'error',\n 'address' => 'Сервер определения местоположения недоступен. Попробуйте позже.'\n )));\n }", "function tfnm_geocode_location( $location ){\n\t$api_key = get_option( 'tfnm_options' )[ 'g_api_key' ];\n\t$api_url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . $location . '&key=' . $api_key;\n\n\t$response = tfnm_call_api( false, $api_url );\n\n\t// Add capability to have a MapQuest (Verizon) or HERE API key\n\n\t// This is latitude && This is longitude from Google Maps API\n\tif( !empty( $response->results[0]->geometry->location->lat ) && !empty( $response->results[0]->geometry->location->lng ) ){\n\t\treturn array(\n\t\t\t'latitude' => $response->results[0]->geometry->location->lat,\n\t\t\t'longitude' => $response->results[0]->geometry->location->lng\n\t\t);\n\t} else {\n\t\t// Will return if there is not a valid city inputted through the shortcode\n\t\t// OR if the quota limit has been reached\n\t\treturn 'There was an error finding the location. Please contact the administrator.';\n\t}\n\n}", "function _geo_code( $address, $post_data ) {\n\n\t\tif ( !is_null($address) ) {\n\n\t\t\tif ( strtolower( str_replace( \" \", \"\", $post_data['o_address']) ) == strtolower( str_replace( \" \", \"\", $address) ) ) {\n\t\t\t\t//The Address has not changed, just send bak the orig. lat and lon.//\n\t\t\t\t//die(print_r($post_data['lat'].' '.$post_data['lon']))\n\t\t\t\treturn array('lat' => $post_data['lat'], 'lon' => $post_data['lon']);\n\t\t\t} else {\n\t\t\t\t//The address changed, so lets re-geocoge it and send back new coords.//\n\t\t\t\t$url = 'http://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($address).'&sensor=false';\n\t\t\t\t$data = wp_remote_get( $url );\n\t\t\t\t\n\t\t\t\t$j = json_decode($data['body']);\n\t\t\t\treturn array( 'lat' => $j->results[0]->geometry->location->lat, 'lon' => $j->results[0]->geometry->location->lng);\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getMapFromAdress($adresse)\n {\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($adresse).\"&sensor=false\";\n $req = file_get_contents($url);\n $gps = json_decode($req, true);\n\n if ($gps['status'] != 'ZERO_RESULTS')\n {\n $lat = $gps['results'][0]['geometry']['location']['lat'];\n $lng = $gps['results'][0]['geometry']['location']['lng'];\n $tab[\"lat\"] = $lat;\n $tab[\"lng\"] = $lng;\n return $tab;\n }\n }", "public function store(Request $request)\n {\n if(!empty($request->get('id'))){\n\n $long = $request->get('long');\n $lat = $request->get('lat');\n\n $data = Data::where('id', '=', $request->get('id'))->first();\n\n if($data->cep != $request->get('cep')){\n $endpoint = 'https://www.google.com/maps/search/' . $request->street . '+' . $request->number . '+' . $request->neighborhood . '+' . $request->city . '+' . $request->state;\n $endpoint = str_replace(' ', '%20', $endpoint);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n\n preg_match(\"/APP_INITIALIZATION_STATE=\\[\\[\\[(-?\\d+\\.\\d+),(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)\\]/m\", $response, $group);\n\n $long = $group[2];\n $lat = $group[3];\n }\n\n Data::where('id', '=', $request->get('id'))->update(\n [\n 'status' => $request->get('status'),\n 'street' => $request->get('street'),\n 'number' => $request->get('number'),\n 'neighborhood' => $request->get('neighborhood'),\n 'city' => $request->get('city'),\n 'state' => $request->get('state'),\n 'cep' => $request->get('cep'),\n 'whatsapp' => $request->get('whatsapp'),\n 'lat' => $lat,\n 'long' => $long,\n ]\n );\n\n return redirect()->back()->with('success', 'Atualizado com sucesso ...'); \n }\n\n $data = new Data();\n $data->user_id = Auth::user()->id;\n $data->fill($request->all());\n\n $endpoint = 'https://www.google.com/maps/place/' . $data->street . '+' . $data->number . '+' . $data->neighborhood . '+' . $data->city . '+' . $data->state;\n $endpoint = str_replace(' ', '+', $endpoint);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n\n preg_match(\"/APP_INITIALIZATION_STATE=\\[\\[\\[(-?\\d+\\.\\d+),(-?\\d+\\.\\d+),(-?\\d+\\.\\d+)\\]/m\", $response, $group);\n\n $data->long = $group[2];\n $data->lat = $group[3];\n\n $data->save();\n \n return redirect()->back()->with('success', 'Atualizado com sucesso'); \n }", "private function setUserMapPlace() {\n\t\t$this->mapPlaceManager->unsetMapPlace($this->user->id);\n\n\t\t$count = $this->mapPlaceManager->getFreeMapPlaceCount();\n\t\tif($count < 10 || GlobalConfig::ALWAYS_EXTEND_MAP ) {\n\t\t\t$mapManager = new MapManager($this->db);\n\t\t\t$mapManager->extendMap();\n\t\t}\n\t\t\t\n\t\t$mapPlace = $this->mapPlaceManager->getRandomFreeMapPlace();\n\t\t$mapPlace->userid = $this->user->id;\n\t\tif(!$mapPlace) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t$this->mapPlaceManager->updateMapPlace($mapPlace);\n\t\t\treturn true;\n\t\t}\n\t}", "public static function getLocationFromCoordinate($lat, $long)\n {\n\n $data = self::getData($lat, $long);\n\n $country = \"\";\n $adminAreas = array();\n $topAdminArea = \"\";\n $locality = \"\";\n $sublocality = \"\";\n $postalCode = \"\";\n $route = \"\";\n $formattedAddress = \"\";\n\n if (count($data['results']) > 0) {\n \t\t \n \t\tforeach($data['results'][0]['address_components'] as $current_entry) {\n \t\t\t \n \t\t\tforeach($current_entry['types'] as $current_entry2) {\n \t\t\t\t \n \t\t\t\tif ($current_entry2 == 'route') {\n if ($route == \"\") { $route = $current_entry['long_name']; }\n \t\t\t\t}\n \t\t\t\telseif ($current_entry2 == 'sublocality') {\n if ($sublocality == \"\") { $sublocality = $current_entry['long_name']; }\n \t\t\t\t}\n \t\t\t\telseif ($current_entry2 == 'locality') {\n if ($locality == \"\") { $locality = $current_entry['long_name']; }\n \t\t\t\t}\n elseif ($current_entry2 == 'postal_code') {\n if ($postalCode == \"\") { $postalCode = $current_entry['long_name']; }\n }\n \t\t\t\telseif ($current_entry2 == 'country') {\n if ($country == \"\") { $country = $current_entry['short_name']; }\n \t\t\t\t}\n elseif (substr($current_entry2, 0, 25) == 'administrative_area_level') {\n \n $key = substr($current_entry2, -1);\n $adminAreas[$key] = $current_entry['long_name'];\n \n }\n \t\t\t}\n \t\t\t \n \t\t}\n \n if (array_key_exists('formatted_address', $data['results'][0])) {\n \n $formattedAddress = $data['results'][0]['formatted_address'];\n \n }\n \t\t \n \t}\n \n if (array_key_exists('1', $adminAreas)) {\n $topAdminArea = $adminAreas['1'];\n }\n else {\n \n if (array_key_exists('2', $adminAreas)) {\n $topAdminArea = $adminAreas['2'];\n }\n else {\n \n if (array_key_exists('3', $adminAreas)) {\n $topAdminArea = $adminAreas['3'];\n }\n else {\n \n if (array_key_exists('4', $adminAreas)) {\n $topAdminArea = $adminAreas['4'];\n }\n else {\n \n if (array_key_exists('5', $adminAreas)) {\n $topAdminArea = $adminAreas['5'];\n }\n\n }\n\n }\n\n }\n \n }\n \n $nickname = \"\";\n \n if($route != \"\") { $nickname = $route.\" \"; }\n if($locality != \"\") { $nickname = $nickname.$locality.\" \"; }\n if($sublocality != \"\") { $nickname = $nickname.\"- \".$sublocality.\" \"; }\n \t \n \tif (strlen($nickname) < 2) {\n \t\t$characters1 = 'aeiou';\n \t\t$characters2 = 'bcdfghjklmnpqrstvwxyz';\n \t\t$nickname = '';\n \t\tfor ($j = 0; $j < 3; $j++) {\n \t\t\t$nickname .= $characters1[rand(0, strlen($characters1) - 1)];\n \t\t\t$nickname .= $characters2[rand(0, strlen($characters2) - 1)];\n \t\t}\n \t\t$nickname .= \" \";\n \t\t$nickname = ucfirst($nickname);\n \t\t \n \t}\n \t \n if($country != \"\") { $nickname = $nickname.\"(\".$country.\")\"; }\n\n \t$locationObject = new SimpleLocation();\n \n $locationObject->latitude = $lat;\n $locationObject->longitude = $long;\n $locationObject->administrativeArea = $topAdminArea;\n $locationObject->city = $locality;\n $locationObject->countryCode = $country;\n $locationObject->postalCode = $postalCode;\n $locationObject->route = $route;\n $locationObject->nickname = $nickname;\n $locationObject->formattedAddress = $formattedAddress;\n \n return $locationObject;\n \n }", "private function getGeoCode($address){\n $address = urlencode($address);\n\n // google map geocode api url\n $url = \"https://maps.google.com/maps/api/geocode/json?sensor=false&key=AIzaSyDZl_p4GvElS5VstE8L3Z2Da3YntKFfYeg&address={$address}\";\n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n\n // response status will be 'OK', if able to geocode given address\n if($resp['status']=='OK'){\n\n // get the important data\n $lat = $resp['results'][0]['geometry']['location']['lat'];\n $lng = $resp['results'][0]['geometry']['location']['lng'];\n $formatted_address = $resp['results'][0]['formatted_address'];\n\n // verify if data is complete\n if($lat && $lng && $formatted_address){\n\n // put the data in the array\n $data_arr = array();\n\n array_push(\n $data_arr,\n $lat,\n $lng,\n $formatted_address\n );\n\n return $data_arr;\n\n }else{\n return false;\n }\n\n }else{\n return false;\n }\n }", "private function getLatLng() {\n\t\tif( $this->getAutomaticLocation() && ( $this->isChanged() || ( !$this->getLat() && !$this->getLng() ) ) ) {\n\t\t\t$addressStr = $this->getAddLine1() . ' ' . $this->getStreetName() . ',' . $this->getTown();\n\t\t\t$addressStr.= ( $this->getCity() ) ? ',' . $this->getCity() : '';\n\t\t\t$addressStr.= ( $this->getRegion() ) ? ',' . $this->getRegion() : '';\n\t\t\t$addressStr.= ',' . $this->getPostalCode() . ',' . $this->getCountryCode();\n\t\t\t$req = sprintf( 'http://maps.googleapis.com/maps/api/geocode/json?address=%s&sensor=false', urlencode( $addressStr ) );\n\t\t\tif( !( $response = @file_get_contents( $req ) ) ) {\n\t\t\t\tthrow new Exception( sprintf( 'Unable to contact (%s)', $req ) );\n\t\t\t}\n\t\t\t$geoCode = json_decode( $response );\n// Do a switch here based on the possible status messages returned\n\t\t\tif( is_object( $geoCode ) ) {\n\t\t\t\tswitch( $geoCode->status ) {\n\t\t\t\t\tcase static::API_RESPONSE_ZERO_RESULTS:\n\t\t\t\t\t\t// ZERO RESULTS\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase static::API_RESPONSE_OK:\n\t\t\t\t\t\t$o = new StdClass();\n\t\t\t\t\t\t$o->Lat = $geoCode->results[0]->geometry->location->lat;\n\t\t\t\t\t\t$o->Lng = $geoCode->results[0]->geometry->location->lng;\n\t\t\t\t\t\treturn $o;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Exception( sprintf( 'Invalid response (%s) from (%s)', $response, $req ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$o = new StdClass();\n\t\t\t$o->Lat = $this->getLat();\n\t\t\t$o->Lng = $this->getLng();\n\t\t\treturn $o;\n\t\t}\n\t}", "function get_address(){\t\t\n\t\t\t\t\tmysql_connect(get_option('dbhost'), get_option('dbuser'), get_option('dbpwd')) or\n\t\t\t\t\t\tdie(\"Could not connect: \" . mysql_error());\n\t\t\t\t\t\t\tmysql_select_db(get_option('dbname'));\n\t\t\t\t\t\t\t$result = mysql_query(\"SELECT Address,name FROM wp_terms where term_group = '1'\");\n\t\t\t\t\t$colum = \"\";\n\t\t\t\t\t$addr = \"\";\t\t\n\t\t\t\t\t\twhile ($row = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t\t\t\t\t\t$addr = $row[0];\n\t\t\t\t\t\t\t$name = $row[1];\n\t\t\t\t\t$colum .= getCoordinates($addr);\n\t\t\t\t\t\t\t//printf(\"%s\", $addr);\n\t\t\t\t\t\t\t//\tprintf(\"%s\", $colum); \n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\tmysql_free_result($result);\n\t\t\t\t\t\t\t\t$coords = $colum;\n\t\t\t\t\t\t\t//\t$coords = implode(\"|\", $colum);\n\t\t\t\t\t\t\t\t//\t\tprintf(\"%s\", $coords); \n\t\t\t\t\t\t\t\t$coords = explode(\",\",$colum);\n\t\t\t\t\t\t\t\t\t$coordsTmp = \"\";\n\t\t\t\t\t\t\t\t\t\tfor($i = 0;$i < count($coords);$i++){\n\t\t\t\t\t\t\t\t\t\t\t$coordsTmp .='|'.$coords[$i].','.$coords[$i+1].' ';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo $name;\t\t\t\t\t\n\t\t\t\t\t$map4 = create_Map($coordsTmp,$addr);\n\t\t\treturn $map4;\n\t\t}", "function getCoordinatesFromAddress( $sQuery)\n{\n\t$sURL = 'http://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($sQuery).'&sensor=false';\n\t$sData = file_get_contents($sURL);\n\t\n\treturn json_decode($sData);\n}", "public function lookup($string){\r\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".urlencode($string).\"&key=AIzaSyBCltWRQRrRFBsRh9WUQ53KVbj3Nm6xc6s\";//we are getting the response in json &key=AIzaSyBCltWRQRrRFBsRh9WUQ53KVbj3Nm6xc6s\r\n // get the json response\r\n $resp_json = file_get_contents($url);\r\n // decode the json\r\n $resp = json_decode($resp_json, true);\r\n //the response status would be 'OK', if are able to geocode the given address\r\n if($resp['status']=='OK') {\r\n // get the longtitude and latitude data\r\n $array = array(\r\n 'lat' => $resp['results'][0]['geometry']['location']['lat'],\r\n 'long' => $resp['results'][0]['geometry']['location']['lng'],\r\n );\r\n\r\n return $array;\r\n }else{\r\n $val = 'Geocode API failure';\r\n return $val;\r\n }\r\n }", "public function geocoding($address) \n {\n $encodeAddress = urlencode($address);\n $url = \"http://maps.google.com/maps/geo?q=\".$encodeAddress.\"&output=csv&key=\".$this->googleMapKey;\n \n if(function_exists('curl_init')) {\n $data = $this->getContent($url);\n } else {\n $data = file_get_contents($url);\n }\n \n\t\t$csvSplit = preg_split(\"/,/\",$data);\n $status = $csvSplit[0];\n\n if (strcmp($status, \"200\") == 0) {\n $return = $csvSplit; // successful geocode, $precision = $csvSplit[1],$lat = $csvSplit[2],$lng = $csvSplit[3];\n } else {\n $return = null; // failure to geocode\n }\n\n return $return;\n }", "public function getCoordinates( $street=NULL, $postal=NULL, $city=NULL, $country=NULL ) {\r\t\t$sQuery = sprintf(\r\t\t\t\"%s %s %s %s\"\r\t\t,\t$street\r\t\t,\t$postal\r\t\t,\t$city\r\t\t,\t$country\r\t\t);\r\t\t\r\t\t$sResponse = NULL;\r\t\t$sResponse = file_get_contents(\"http://maps.google.com/maps/geo?q=\".rawurlencode($sQuery).\"&output=json&oe=utf8&sensor=false&hl=de\");\r\t\t\r\t\tif( !empty($sResponse) ) {\r\t\t\r\t\t\t$aResponse = array();\r\t\t\t$aResponse = json_decode($sResponse,1);\r\r\t\t\tif( !empty($aResponse['Status']) && $aResponse['Status']['code'] == '200' ) {\r\t\t\t\r\t\t\t\t$coords = array();\r\t\t\t\t$coords['latitude'] = $aResponse['Placemark'][0]['Point']['coordinates'][1];\r\t\t\t\t$coords['longitude'] = $aResponse['Placemark'][0]['Point']['coordinates'][0];\r\t\t\t\t\r\t\t\t\treturn $coords;\r\r\t\t\t} else {\r\r\t\t\t\t$this->log('Could not find coordinates for adress \"'.$sQuery.'\"', 'tl_storelocator_stores fillCoordinates()', TL_ERROR);\r\t\t\t}\r\t\t} else {\r\t\t\t$this->log('Could not find coordinates for adress \"'.$sQuery.'\"', 'tl_storelocator_stores fillCoordinates()', TL_ERROR);\r\t\t}\r\t\t\r\t\treturn false;\r\t}", "function get_event_address($event_id, $lat_user, $lon_user) {\n $cxn = $GLOBALS['cxn'];\n $sql = \"SELECT * FROM event_address WHERE event_id='$event_id'\";\n $res = mysqli_query($cxn, $sql)\n or die(\"err:\".mysqli_error($cxn));\n $row = mysqli_fetch_assoc($res);\n extract($row);\n \n $dis = distance($lat_user, $lon_user, $x_coord, $y_coord, \"m\");\n return array(\n 'address_DB' => $address_text,\n 'lat' => $x_coord,\n 'lon' => $y_coord,\n 'distance' => $dis\n );\n }", "function calculate_coords() {\n if (!empty($this->value['latitude']) && !empty($this->value['longitude'])) {\n // If there are already coordinates, there's no work for us.\n return TRUE;\n }\n // @@@ Switch to mock location object and rely on location more?\n\n if ($this->options['type'] == 'postal' || $this->options['type'] == 'postal_default') {\n // Force default for country.\n if ($this->options['type'] == 'postal_default') {\n $this->value['country'] = variable_get('site_default_country', 'us');\n }\n\n // Zip code lookup.\n if (!empty($this->value['postal_code']) && !empty($this->value['country'])) {\n $coord = location_latlon_rough($this->value);\n if ($coord) {\n $this->value['latitude'] = $coord['lat'];\n $this->value['longitude'] = $coord['lon'];\n }\n else {\n return false;\n }\n }\n else {\n // @@@ Implement full address lookup?\n return false;\n }\n }\n if (empty($this->value['latitude']) || empty($this->value['longitude'])) {\n return false;\n }\n return true;\n }", "function fetchGoogleLatitudeLocation ($user_id) {\n $r = array();\n $google_latitude_data = json_decode(file_get_contents(\"https://www.google.com/latitude/apps/badge/api?user=$user_id&type=json\"));\n $r['longitude'] = $google_latitude_data->features[0]->geometry->coordinates[0];\n $r['latitude'] = $google_latitude_data->features[0]->geometry->coordinates[1];\n $r['current_city'] = $google_latitude_data->features[0]->properties->reverseGeocode;\n $r['last_updated'] = $google_latitude_data->features[0]->properties->timeStamp;\n $r['raw'] = $google_latitude_data; // So that we have it all, if we need it.\n return $r;\n }", "#[Route('/geocode/{address}', name: 'user.geocode', methods: ['GET', 'POST'])]\n public function index(\n GeocodeAddressParser $geocodeAddress,\n Request $request,\n EntityManagerInterface $entityManager,\n UsersProfileAddressHandler $addressHandler,\n string|null $address = null,\n //?string $address = null,\n ): Response {\n// {\n// return new Response(status: 404);\n// }\n\n $UsersProfileAddressDTO = new UsersProfileAddressDTO();\n $UsersProfileAddressDTO->setDesc($address);\n\n if (!empty($address))\n {\n /* Если передан идентификатор адреса */\n if (preg_match('{^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$}Di', $address))\n {\n $GeocodeAddress = $entityManager->getRepository(GeocodeAddress::class)->find($address);\n } elseif ($request->isMethod('GET'))\n {\n /** @var GeocodeAddress $var */\n $GeocodeAddress = $geocodeAddress->getGeocode($address);\n }\n\n $UsersProfileAddressDTO->setAddress($GeocodeAddress);\n $UsersProfileAddressDTO->setLatitude($GeocodeAddress->getLatitude());\n $UsersProfileAddressDTO->setLongitude($GeocodeAddress->getLongitude());\n $UsersProfileAddressDTO->setDesc($GeocodeAddress->getAddress());\n $UsersProfileAddressDTO->setHouse(($GeocodeAddress->getHouse() !== null));\n\n if ($this->getProfileUid())\n {\n $UsersProfileAddressDTO->setProfile($this->getProfileUid());\n }\n }\n\n $form = $this->createForm(UsersProfileAddressForm::class, $UsersProfileAddressDTO, [\n 'action' => $this->generateUrl('UsersAddress:user.geocode', ['address' => $UsersProfileAddressDTO->getAddress()]),\n ]);\n\n $form->handleRequest($request);\n\n\n /* */\n if ($form->isSubmitted() && $form->has('geocode'))\n {\n /* Если пользователь авторизован - прикрепляем адрес */\n if ($this->getProfileUid() && $form->isValid() )\n {\n $UsersProfileAddress = $addressHandler->handle($UsersProfileAddressDTO);\n\n if ($UsersProfileAddress instanceof UsersProfileAddress)\n {\n return new JsonResponse(\n [\n 'type' => 'success',\n 'header' => 'Ваш адрес',\n 'message' => $UsersProfileAddressDTO->getDesc(),\n 'status' => 200,\n ]\n );\n }\n\n return new JsonResponse(\n [\n 'type' => 'danger',\n 'header' => 'Адрес местоположения',\n 'message' => 'Невозможно определить адрес местоположения',\n 'status' => 400,\n ],\n 400\n );\n }\n\n return new JsonResponse(\n [\n 'type' => 'success',\n 'header' => 'Ваш адрес',\n 'message' => $UsersProfileAddressDTO->getDesc(),\n 'status' => 200,\n ]\n );\n }\n\n return $this->render([\n 'form' => $form->createView(),\n ]);\n }", "function helperReverseGeocode($lat, $lng) {\n\t\t$addressData = array();\n\t\t$lng = floatval($lat);\n\t\t$lng = floatval($lat);\n\n\t\tif ($key == '' || $lng == 0 || $lat == 0 ) {\n\t\t\treturn $addressData;\n\t\t}\n\n\t\t$coords\t\t= $lat . ',' . $lng;\n\t\t$url\t\t\t= 'http://maps.google.com/maps/geo?q='.$coords.'&output=json&oe=utf8&sensor=false&key='.$this->config['mapKey'];\n\t\t$address\t= json_decode(t3lib_div::getURL($url));\n\n\t\t// get the response\n\t\tif ($address->Status->code == '200' && count($address->Placemark) > 0) {\n\t\t\t$addressObj = $address->Placemark[0];\n\n\t\t\t$addressData['all']\t\t\t\t\t= $addressObj->address;\n\t\t\t$addressData['country']\t\t\t= $addressObj->AddressDetails->Country->CountryName;\n\t\t\t$addressData['countryshort']= $addressObj->AddressDetails->Country->CountryNameCode;\n\t\t\t$addressData['region']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->AdministrativeAreaName;\n\t\t\t$addressData['subarea']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->SubAdministrativeAreaName;\n\t\t\t$addressData['city']\t\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->LocalityName;\n\t\t\t$addressData['zip']\t\t\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->PostalCode->PostalCodeNumber;\n\t\t\t$addressData['address']\t\t\t= $addressObj->AddressDetails->Country->AdministrativeArea->SubAdministrativeArea->Locality->Thoroughfare->ThoroughfareName;\n\t\t}\n\n\t\treturn $addressData;\n\t}", "function rec_regenerate_coordinates() {\n\n\tif( ! isset( $_GET['coord_debug'] ) ) {\n\t\treturn;\n\t}\n\n\t$posts = new WP_Query(\n\t\tarray(\n\t\t\t'post_type'\t\t=>\tepl_get_core_post_types(),\n\t\t\t'post_status'\t=>\t'any',\n\t\t\t'posts_per_page' =>\t-1,\n\t\t\t'meta_query'\t=>\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'key'\t\t=>\t'property_address_coordinates',\n\t\t\t\t\t'value'\t\t=>\tarray(\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'compare'\t=>\t'IN'\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\twhile( $posts->have_posts() ) {\n\t\t$posts->the_post();\n\t\t$coord = get_property_meta( 'property_address_coordinates' );\n\t\t\n\t\t$query_address = epl_property_get_the_full_address();\n\t\t$query_address = trim( $query_address );\n\n\t\tif( $query_address != ',' ) {\n\t\n\t\t\t$googleapiurl = \"https://maps.google.com/maps/api/geocode/json?address=$query_address&sensor=false\";\n\t if( epl_get_option('epl_google_api_key') != '' ) {\n\t $googleapiurl = $googleapiurl.'&key='.epl_get_option('epl_google_api_key');\n\t }\n\n\t $geo_response = wp_remote_get( $googleapiurl );\n\t $geocode = $geo_response['body'];\n\t $output = json_decode($geocode);\n\t /** if address is validated & google returned response **/\n\t if( !empty($output->results) && $output->status == 'OK' ) {\n\n\t $lat = $output->results[0]->geometry->location->lat;\n\t $long = $output->results[0]->geometry->location->lng;\n\t $coord = $lat.','.$long;\n\n\t update_post_meta( get_the_ID(), 'property_address_coordinates', $coord);\n\t update_post_meta( get_the_ID(), 'property_address_display', 'yes');\n\t }\n }\n\t}\n}", "function check_geolocation($nameofgeo){\n\t$url = \"https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=\".str_replace(\" \",\"%\",$nameofgeo).\"&inputtype=textquery&fields=photos,formatted_address,name&locationbias=circle:[email protected],-122.2226413&key=AIzaSyDQfsEll4lB-xdxkLXGZA7_a2rMCyVM4Ok\";\n\t$json = file_get_contents($url);\n\t$json_data = json_decode($json, true);\n\tif ($json_data[\"status\"]==\"ZERO_RESULTS\")\n\t\treturn(\"Numele introdus nu este o geolocatie!\");\n\telse{\n\t\t#print_r($json_data['candidates'][0]['name']);\n\t\t#echo \" este nume pentru-> \"; \n\t\t#echo \"<br><br>\";\n\t\treturn($json_data[\"status\"]);\n\t}\n}", "public function getLatLngByAddress($addressQuery) {\r\n\t\t$latLng = NULL;\r\n\t\t$geocodeUrl = $this->getGeocodeUrl();\r\n\t\t$geocodeUrl .= '?sensor=false&address=' . urlencode(str_replace(LF, ', ', $addressQuery));\r\n\t\t$geocodeResult = t3lib_div::getURL($geocodeUrl);\r\n\t\t$geocodeResult = json_decode($geocodeResult);\r\n\t\tif ($geocodeResult !== NULL && strtolower($geocodeResult->status) === 'ok') {\r\n\t\t\t$coordinates = new Tx_AdGoogleMaps_MapBuilder_API_Base_LatLng($geocodeResult->results[0]->geometry->location->lat, $geocodeResult->results[0]->geometry->location->lng);\r\n\t\t}\r\n\t\treturn $latLng;\r\n\t}", "private function getLocation() {\n $location = false;\n \t$result = new StdClass();\n \t// $result->location = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->nearest = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->location = 'http://maps.googleapis.com/maps/api/geocode/json?latlng=' . $this->coordinates->latitude . ',' . $this->coordinates->longitude . '&sensor=false';\n\n \t$result = json_decode($this->getUrlContents($result->location));\n \t// $result->nearest = unserialize($this->getUrlContents($result->nearest));\n\n $location = $this->validateLocation($result);\n\n if(is_array($location))\n \t $location = $this->filterLocation($location);\n }", "public function getLatLngByAddress($address)\n\t{\n\t\t$url = self::URL_GEOCODE.urlencode($address);\t\t\n\t\t$json_string = $this->fileGetContentsCurl($url);\t\t\t\n\t\t$json = json_decode($json_string, true);\n\t\tif(isset($json['results'][0]))\n\t\t{\n\t\t\treturn $json['results'][0]['geometry']['location'];\n\t\t}\n\t\treturn false;\n\t}", "public function geocode($value);", "function phorum_mod_google_maps_profile($profile)\n{\n global $PHORUM;\n\n $PHORUM['DATA']['MOD_GOOGLE_MAPS'] = '';\n\n // Retrieve the data for the active Phorum user.\n $mapstate = empty($profile['mod_google_maps'])\n ? array() : $profile['mod_google_maps'];\n\n // Upgrade the user data if it looks like version 1 data.\n if (isset($mapstate['marker'])) {\n $mapstate = mod_google_maps_upgrade_userdata($mapstate);\n }\n\n // Do not show a map if neither a marker, nor a streetview are available.\n if (!isset($mapstate['marker_latitude']) &&\n !isset($mapstate['streetview_latitude'])) return $profile;\n\n // If a position is set in streetview, then copy that position to\n // the marker position, so the marker and streetview will match\n // when viewing the map.\n if (isset($mapstate['streetview_latitude']) &&\n isset($mapstate['streetview_longitude'])) {\n $mapstate['marker_latitude'] = $mapstate['streetview_latitude'];\n $mapstate['marker_longitude'] = $mapstate['streetview_longitude'];\n }\n\n // Build the HTML code for the map viewer.\n $PHORUM['DATA']['MOD_GOOGLE_MAPS'] =\n mod_google_maps_build_maptool('viewer', $mapstate);\n\n // Format country and city for the profile page.\n if (!empty($profile['mod_google_maps']))\n {\n $m = $profile['mod_google_maps'];\n if (!empty($m['geoloc_country'])) {\n $profile['mod_google_maps']['country'] = htmlspecialchars(\n $m['geoloc_country'], ENT_COMPAT, $PHORUM[\"DATA\"][\"HCHARSET\"]);\n }\n if (!empty($m['geoloc_city'])) {\n $profile['mod_google_maps']['city'] = htmlspecialchars(\n $m['geoloc_city'], ENT_COMPAT, $PHORUM[\"DATA\"][\"HCHARSET\"]);\n }\n }\n\n return $profile;\n}", "private function doGeoQuery($city, $country ,$state = null, $address = null, $zip_code = null){\n\n\t\t$formatted_city = urlencode($city);\n\t\t$query = \"?components=locality:{$formatted_city}|country:{$country}\";\n\t\tif(!empty($state)){\n\t\t\t$formatted_state = urlencode($state);\n\t\t\t$query .= \"|administrative_area:{$formatted_state}\";\n\t\t}\n\t\tif(!empty($address)){\n\t\t\t$formatted_address = urlencode($address);\n\t\t\t$query .= \"|address:{$formatted_address}\";\n\t\t}\n\t\tif(!empty($zip_code)){\n\t\t\t$formatted_zip_code = urlencode($zip_code);\n\t\t\t$query .= \"&postal_code={$formatted_zip_code}\";\n\t\t}\n\t\t$query .= \"&sensor=false\";\n\n\t\t$url = self::ApiBaseUrl.$query;\n\t\tif($this->shouldUseKey()){\n\t\t\t$url .= \"&key={$this->api_key}\";\n\t\t}\n\t\telse if($this->shouldSignUrl()){\n\t\t\t$url = $this->signUrl($url);\n\t\t}\n\n\t\t$factory = $this->factory;\n\t\t$repository = $this->repository;\n\t\treturn $this->tx_manager->transaction(function() use($repository, $factory, $url, $query, $city, $country ,$state, $address , $zip_code){\n\n\t\t\t$res = $repository->getByGeoQuery($query);\n\t\t\tif($res) return array($res->getLat(),$res->getLng());\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, GoogleGeoCodingService::ApiHost . $url);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_PROXYPORT, 3128);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\t$response = curl_exec($ch);\n\t\t\tcurl_close($ch);\n\t\t\t$response_a = json_decode($response);\n\t\t\tif(is_null($response_a)){\n\t\t\t\tif(!empty($address))\n\t\t\t\t\tthrow new EntityValidationException(array( array('message' => sprintf('Address %s (%s) does not exist on City %s',$address,$zip_code,$city))));\n\t\t\t\telse\n\t\t\t\t\tthrow new EntityValidationException(array( array('message' => sprintf('City %s does not exist on Country %s',$city,$country))));\n\t\t\t}\n\t\t\tif($response_a->status!='OK'){\n\t\t\t\tif(!empty($address))\n\t\t\t\t\tthrow new EntityValidationException(array( array('message' => sprintf('Address %s (%s) does not exist on City %s - (STATUS: %s)',$address,$zip_code,$city,$response_a->status))));\n\t\t\t\telse\n\t\t\t\t\tthrow new EntityValidationException(array( array('message' => sprintf('City %s does not exist on Country %s (STATUS: %s)',$city,$country,$response_a->status))));\n\t\t\t}\n\t\t\t$repository->add($factory->buildGeoCodingQuery($query,$response_a->results[0]->geometry->location->lat, $response_a->results[0]->geometry->location->lng));\n\t\t\treturn array($response_a->results[0]->geometry->location->lat, $response_a->results[0]->geometry->location->lng);\n\t\t});\n\t}", "protected function _geocode($city = \"\", $country = \"\", $cp = \"\", $address1 = \"\", $address2 = \"\") {\n\n $place = array();\n\n if(!empty($address1) || !empty($address2)) {\n $place[] = $address1 . (!empty($address2) ? \" \" . $address2 : \"\");\n }\n\n if(!empty($cp)) {\n $place[] = $cp;\n }\n\n if(!empty($city)) {\n $place[] = $city;\n }\n\n if(!empty($country)) {\n $place[] = $country;\n }\n\n $place = urlencode(implode(',', $place));\n\n $url = \"http://maps.google.com/maps/api/geocode/json?sensor=false&address=\" . $place;\n $response = file_get_contents($url);\n\n if(!empty($response)) {\n\n $response = json_decode($response, true);\n\n if(!array_key_exists('status', $response) || $response['status'] != \"OK\") {\n return false;\n }\n\n if(empty($response['results'])) {\n return false;\n }\n\n return $response['results'][0]['geometry']['location'];\n }\n\n return false;\n }", "function save_user_loc($db, $user_id, $user_loc)\n{\n\ttry\n\t{\n\t\t$user_loc_tab = explode(',', $user_loc);\n\t\t$stmt = $db->conn->prepare(\"SELECT user_true_long, user_true_lat FROM profils WHERE user_id = :user_id\");\n\t\t$stmt->execute(array(':user_id'=>$user_id));\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\tif ($row['user_true_long'] != $user_loc_tab[1] || $row['user_true_lat'] != $user_loc_tab[0])\n\t\t{\n\t\t\t$stmt = $db->conn->prepare(\"UPDATE profils SET user_true_long = :user_long, user_true_lat = :user_lat, user_true_city = :user_city, user_true_city_code = :user_city_code, user_true_country = :user_country WHERE user_id = :user_id\");\n\t\t\t$stmt->execute(array(':user_id'=>$user_id, ':user_long'=>$user_loc_tab[1], ':user_lat'=>$user_loc_tab[0], ':user_city'=>$user_loc_tab[2], ':user_city_code'=>$user_loc_tab[3], ':user_country'=>$user_loc_tab[4]));\n\t\t}\n\t}\n\tcatch(PDOExeption $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n}", "public static function geodecode_addr($addr_infos, $addr_hash = false, $bypass_cache=false) {\n\n $addr_filter = array(\n 'street_number',\n 'route',\n 'postal_code',\n 'locality',\n 'area_level_2',\n 'area_level_1',\n 'country',\n );\n $addr_data = array_sort($addr_infos, $addr_filter);\n $addr_data = array_filter(array_map('trim',$addr_data));\n\n // build addr_str (add area_level ?)\n $addr_str .= $addr_data['street_number']?\"{$addr_data['street_number']} \":'';\n $addr_str .= $addr_data['route']?\"{$addr_data['route']}, \":'';\n $addr_str .= $addr_data['postal_code']?\"{$addr_data['postal_code']} \":'';\n $addr_str .= $addr_data['locality']?\"{$addr_data['locality']}, \":'';\n $addr_str .= $addr_data['country']?\"{$addr_data['country']}\":'';\n\n if(!$addr_hash)\n $addr_hash = strtolower(md5(strtoupper($addr_str))); // hash the strtoup for better cache optimization\n\n $verif_hash = array('geodetic_hash' => $addr_hash);\n $cached = sql::row(self::cache_table, $verif_hash);\n if($cached && !$bypass_cache) {\n return array(\n 'geodetic_lat' => $cached['geodetic_lat'],\n 'geodetic_lon' => $cached['geodetic_lon'],\n 'return_code' => geotools::CACHED,\n );\n }\n\n $data = array(\n 'geodetic_hash' => $addr_hash,\n 'geodetic_addr' => $addr_str,\n );\n $result = array(\n 'geodetic_lat' => null,\n 'geodetic_lon' => null,\n 'return_code' => geotools::OK,\n );\n try {\n $geodetic = self::geodecode_request($addr_str);\n $result['geodetic_lat'] = $geodetic['lat'];\n $result['geodetic_lon'] = $geodetic['lon'];\n } catch(Exception $e){\n if($e->getMessage() == geotools::OVER_QUERY_LIMIT)\n $result['return_code'] = geotools::OVER_QUERY_LIMIT; // to recompute later\n else\n $result['return_code'] = geotools::NO_RESULT;\n }\n\n // Update cache\n sql::insert(\"ks_geodecode_cache\", array_merge($data, $result));\n\n return $result;\n }", "function get_latitude($address){\n\t\t$output = get_geocode($address);\n\t\tif($output->status==\"OK\" && (count($output->results) == 1)){\n\t\t\t$latitude = $output->results[0]->geometry->location->lat;\t\t\t\n\t\t\treturn $latitude;\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}", "function gmap_obj($args){\n /*\n $args = array(\n 'id' => \"map-lyra\",\n 'lattitude' => \"43.5414097\",\n 'longitude' => \"1.5165507000000389\",\n 'zoom' => 16,\n 'address' => null,\n 'map_text' => null,\n );*/\n\n $output = \"<script src='https://maps.googleapis.com/maps/api/js?key=&sensor=false&extension=.js'></script>\";\n\n $output .= \"<script>\n google.maps.event.addDomListener(window, 'load', init);\n var map;\n function init() {\n var mapOptions = {\n center: new google.maps.LatLng(\".$args['lattitude'].\",\".$args['longitude'].\"),\n zoom: \".$args['zoom'].\",\n zoomControl: true,\n zoomControlOptions: {\n style: google.maps.ZoomControlStyle.SMALL\n },\n disableDoubleClickZoom: true,\n mapTypeControl: true,\n mapTypeControlOptions: {\n style: google.maps.MapTypeControlStyle.DROPDOWN_MENU\n },\n scaleControl: true,\n scrollwheel: false,\n panControl: true,\n streetViewControl: false,\n draggable : true,\n overviewMapControl: false,\n overviewMapControlOptions: {\n opened: false\n },\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n styles: [{\\\"featureType\\\":\\\"all\\\",\\\"elementType\\\":\\\"all\\\",\\\"stylers\\\":[{\\\"saturation\\\":-100},{\\\"gamma\\\":0.5}]}]\n };\n var mapElement = document.getElementById('\".$args['id'].\"');\n var map = new google.maps.Map(mapElement, mapOptions);\n var locations = [\n ['\".$args['map_text'].\"', '\".$args['address'].\"', 'undefined', 'undefined','undefined', \".$args['lattitude'].\", \".$args['longitude'].\", '\".get_template_directory_uri().\"/img/marker.png']\n ];\n for (i = 0; i < locations.length; i++) {\n if (locations[i][1] =='undefined'){ description ='';} else { description = locations[i][1];}\n if (locations[i][2] =='undefined'){ telephone ='';} else { telephone = locations[i][2];}\n if (locations[i][3] =='undefined'){ email ='';} else { email = locations[i][3];}\n if (locations[i][4] =='undefined'){ web ='';} else { web = locations[i][4];}\n if (locations[i][7] =='undefined'){ markericon ='';} else { markericon = locations[i][7];}\n marker = new google.maps.Marker({\n icon: markericon,\n position: new google.maps.LatLng(locations[i][5], locations[i][6]),\n map: map,\n title: locations[i][0],\n desc: description,\n tel: telephone,\n email: email,\n web: web\n });\n if (web.substring(0, 7) != \\\"http://\\\") {\n link = \\\"http://\\\" + web;\n } else {\n link = web;\n }\n bindInfoWindow(marker, map, locations[i][0], description, telephone, email, web, link);\n }\n function bindInfoWindow(marker, map, title, desc, telephone, email, web, link) {\n var infoWindowVisible = (function () {\n var currentlyVisible = false;\n return function (visible) {\n if (visible !== undefined) {\n currentlyVisible = visible;\n }\n return currentlyVisible;\n };\n }());\n iw = new google.maps.InfoWindow();\n google.maps.event.addListener(marker, 'click', function() {\n if (infoWindowVisible()) {\n iw.close();\n infoWindowVisible(false);\n } else {\n var html= \\\"<div style='color:#000;background-color:#fff;padding:5px;width:90%;'><h4>\\\"+title+\\\"</h4><p>\\\"+desc+\\\"<p><a href='mailto:\\\"+email+\\\"' >\\\"+email+\\\"<a><a href='\\\"+link+\\\"'' >\\\"+web+\\\"<a></div>\\\";\n iw = new google.maps.InfoWindow({content:html});\n iw.open(map,marker);\n infoWindowVisible(true);\n }\n });\n google.maps.event.addListener(iw, 'closeclick', function () {\n infoWindowVisible(false);\n });\n }\n }\n</script>\";\n\n return $output;\n}", "function Display_google_map($Nom, $Adresse) {\n\n\n}", "function wpsl_get_address_latlng( $address ) {\n\n $latlng = '';\n $response = wpsl_call_geocode_api( $address );\n\n if ( !is_wp_error( $response ) ) {\n $response = json_decode( $response['body'], true );\n\n if ( $response['status'] == 'OK' ) {\n $latlng = $response['results'][0]['geometry']['location']['lat'] . ',' . $response['results'][0]['geometry']['location']['lng'];\n }\n }\n\n return $latlng;\n}", "public function map()\n\t{\n\t\t$map = 'http://maps.googleapis.com/maps/api/staticmap?zoom=12&format=png&maptype=roadmap&style=element:geometry|color:0xf5f5f5&style=element:labels.icon|visibility:off&style=element:labels.text.fill|color:0x616161&style=element:labels.text.stroke|color:0xf5f5f5&style=feature:administrative.land_parcel|element:labels.text.fill|color:0xbdbdbd&style=feature:poi|element:geometry|color:0xeeeeee&style=feature:poi|element:labels.text.fill|color:0x757575&style=feature:poi.business|visibility:off&style=feature:poi.park|element:geometry|color:0xe5e5e5&style=feature:poi.park|element:labels.text|visibility:off&style=feature:poi.park|element:labels.text.fill|color:0x9e9e9e&style=feature:road|element:geometry|color:0xffffff&style=feature:road.arterial|element:labels|visibility:off&style=feature:road.arterial|element:labels.text.fill|color:0x757575&style=feature:road.highway|element:geometry|color:0xdadada&style=feature:road.highway|element:labels|visibility:off&style=feature:road.highway|element:labels.text.fill|color:0x616161&style=feature:road.local|visibility:off&style=feature:road.local|element:labels.text.fill|color:0x9e9e9e&style=feature:transit.line|element:geometry|color:0xe5e5e5&style=feature:transit.station|element:geometry|color:0xeeeeee&style=feature:water|element:geometry|color:0xc9c9c9&style=feature:water|element:labels.text.fill|color:0x9e9e9e&size=640x250&scale=4&center='.urlencode(trim(preg_replace('/\\s\\s+/', ' ', $this->cfg->address)));\n\t\t$con = curl_init($map);\n\t\tcurl_setopt($con, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($con, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($con, CURLOPT_RETURNTRANSFER, 1);\n\t\treturn response(curl_exec($con))->header('Content-Type', 'image/png');\n\t}", "function validateGeolocation($lat, $lng) {\n $app = \\Slim\\Slim::getInstance();\n if(is_numeric($lat) && is_numeric($lng)){\n if($lat < -90 || $lat > 90 || $lng < -180 || $lng > 180){\n $response[\"error\"] = true;\n $response[\"message\"] = 'The latitude must be a number between -90 and 90 and the longitude between -180 and 180';\n echoResponse(400, $response);\n $app->stop();\n }\n }\n else{\n $response[\"error\"] = true;\n $response[\"message\"] = 'Latitude and Longitude must be numeric values';\n echoResponse(400, $response);\n $app->stop();\n }\n}", "public static function getCoordinates($address) {\n //Formatted address\n $formattedAddr = str_replace(' ', '+', $address);\n //Send request and receive json data by address\n $geocodeFromAddr = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . $formattedAddr . '&sensor=true_or_false');\n $json = json_decode($geocodeFromAddr);\n if (isset($json->results)) {\n //Get latitude and longitute from json data\n $latitude = $json->results[0]->geometry->location->lat;\n $longitude = $json->results[0]->geometry->location->lng;\n return $latitude . \",\" . $longitude;\n }\n return false;\n }", "function wpsl_check_latlng_transient( $address ) {\n\n $name_section = explode( ',', $address );\n $transient_name = 'wpsl_' . trim( strtolower( $name_section[0] ) ) . '_latlng';\n\n if ( false === ( $latlng = get_transient( $transient_name ) ) ) {\n $latlng = wpsl_get_address_latlng( $address );\n\n if ( $latlng ) {\n set_transient( $transient_name, $latlng, 0 );\n }\n }\n\n return $latlng;\n}", "function getAddressComponentsFromLatLng($args){\r\n\t\t$requvired = [\t['latitude','latitude'] ,['longitude','longitude'] ];\t\r\n\t\tif(! $this->checkAruguments($requvired,$args)){ return $this->_getStatusMessage(1, 1); }\r\n\t\t$lat = $args['latitude'];\r\n\t\t$lng = $args['longitude'];\r\n\t\t$geocode = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng='.$lat.','.$lng.'&sensor=false');\r\n\t\t\r\n\t\t$api_response = array();\r\n\t\t$output= json_decode($geocode);\r\n\t\tfor($j=0;$j<count($output->results[0]->address_components);$j++){\r\n\t\t\t$api_response[$output->results[0]->address_components[$j]->types[0]] = $output->results[0]->address_components[$j]->long_name;\r\n\t\t}\r\n\t\t$response = array('errNum'=>200,'errFlag'=>0,'errMsg'=>'ok','data'=>$api_response);\r\n\t\t\r\n\t\treturn $response;\r\n\t}", "function get_location( $args = array() ) {\n\t$throttle_geonames = $throttle_ip2location = $location = false;\n\n\t// For a country request, no lat/long are returned.\n\tif ( isset( $args['country'] ) ) {\n\t\t$location = array(\n\t\t\t'country' => $args['country'],\n\t\t);\n\t}\n\n\t// Coordinates provided\n\tif (\n\t\t! $location && (\n\t\t\t! empty( $args['latitude'] ) && is_numeric( $args['latitude'] ) &&\n\t\t\t! empty( $args['longitude'] ) && is_numeric( $args['longitude'] )\n\t\t)\n\t) {\n\t\t$location = array(\n\t\t\t'description' => false,\n\t\t\t'latitude' => $args['latitude'],\n\t\t\t'longitude' => $args['longitude'],\n\t\t);\n\t}\n\n\t// City was provided by the user:\n\tif ( ! $location && isset( $args['location_name'] ) ) {\n\t\t$throttle_geonames = mt_rand( 1, 100 ) <= THROTTLE_GEONAMES;\n\n\t\tif ( $throttle_geonames ) {\n\t\t\treturn 'temp-request-throttled';\n\t\t}\n\n\t\t$country_code = get_country_code_from_locale( $args['locale'] ?? '' );\n\t\t$guess = guess_location_from_city( $args['location_name'], $args['timezone'] ?? '', $country_code );\n\n\t\t$country_types = array(\n\t\t\t// See http://download.geonames.org/export/dump/featureCodes_en.txt\n\n\t\t\t'A.PCL', // political entity\n\t\t\t'A.PCLD', // dependent political entity\n\t\t\t'A.PCLF', // freely associated state\n\t\t\t'A.PCLH', // historical political entity\ta former political entity\n\t\t\t'A.PCLI', // independent political entity\n\t\t\t'A.PCLIX', // section of independent political entity\n\t\t\t'A.PCLS', // semi-independent political entity\n\t\t\t'A.PRSH', // parish an ecclesiastical district\n\t\t\t'A.TERR', // territory\n\t\t\t'A.ZN', // zone\n\t\t);\n\n\t\tif ( $guess && in_array( $guess->type, $country_types, true ) ) {\n\t\t\t$location = array(\n\t\t\t\t'country' => $guess->country,\n\t\t\t\t'description' => $guess->name,\n\t\t\t);\n\t\t} elseif ( $guess ) {\n\t\t\t$location = array(\n\t\t\t\t'description' => $guess->name,\n\t\t\t\t'latitude' => $guess->latitude,\n\t\t\t\t'longitude' => $guess->longitude,\n\t\t\t\t'country' => $guess->country,\n\t\t\t);\n\t\t} else {\n\t\t\t$guess = guess_location_from_country( $args['location_name'] );\n\n\t\t\tif ( $guess ) {\n\t\t\t\t$location = array(\n\t\t\t\t\t'country' => $guess['country_short'],\n\t\t\t\t\t'description' => $guess['country_long'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( ! $location ) {\n\t\tif ( isset( $args['location_name'] ) || isset( $args['ip'] ) || ! empty( $args['latitude'] ) || ! empty( $args['longitude'] ) ) {\n\t\t\t// If any of these are specified, and no localitity was guessed based on the above checks, bail with no location.\n\t\t\t$location = false;\n\t\t} else {\n\t\t\t// No specific location details.\n\t\t\t$location = array();\n\t\t}\n\t}\n\n\t// IP:\n\tif ( ! $location && isset( $args['ip'] ) && ! isset( $args['location_name'] ) ) {\n\t\t$throttle_ip2location = mt_rand( 1, 100 ) <= THROTTLE_IP2LOCATION;\n\n\t\tif ( $throttle_ip2location ) {\n\t\t\treturn 'temp-request-throttled';\n\t\t}\n\n\t\t$guess = guess_location_from_ip( $args['ip'] );\n\n\t\tif ( $guess ) {\n\t\t\t$location = array(\n\t\t\t\t'description' => $guess->ip_city,\n\t\t\t\t'latitude' => $guess->ip_latitude,\n\t\t\t\t'longitude' => $guess->ip_longitude,\n\t\t\t\t'country' => $guess->country_short,\n\n\t\t\t\t/*\n\t\t\t\t * ip2location's EULA forbids exposing the derived location publicly, so flag the\n\t\t\t\t * data for internal use only.\n\t\t\t\t */\n\t\t\t\t'internal' => true,\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $location;\n}", "protected function get_geocoder_data($address_string){\n\n\t\t// Get Google geocoder API key\n\t\t$api_key = get_option('site_options')['GOOGLE_MAPS_GEOCODER_KEY'] ?? false;\n\n\t\tif (!$api_key){\n\t\t\terror_log('Missing Google Geocoder API key!');\n\t\t\treturn false;\n\t\t}\n\n\t\t$base_url = 'https://maps.googleapis.com/maps/api/geocode/json';\n\n\t\t$params = [\n\t\t\t'address' => $address_string,\n\t\t\t'key' => $api_key\n\t\t];\n\n\t\t$request_url = $base_url . '?' . http_build_query($params);\n\n\t\t$response = file_get_contents($request_url);\n\n\t\tif ($response){\n\t\t\treturn json_decode($response, true);\n\t\t}\n\n\t}", "function updatedb($lat, $lng, $address)\r\n\t{\r\n\t\t$query = \"UPDATE \" . $this->table . \" SET latitude = '\". $lat .\"', longitude = '\". $lng .\"' WHERE address = '\". $address .\"'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$status = \"\";\r\n\t\tif($lat==0 && $lng==0){\r\n\t\t $status = \"<font color=red><b>FAILED</b></font>\";\r\n\t\t} else {\r\n\t\t $status = \"<font color=green><b>SUCCESS</b></font>\";\r\n\t\t}\r\n\t\t\r\n\t\techo \"<tr>\r\n\t\t\t\t\t<td>$address</td>\r\n\t\t\t\t\t<td>$lat\".\",\".\"$lng</td>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<td>\".$status.\"</td>\r\n\t\t\t\t</tr>\";\r\n\t}", "function _address_to_marker ($address) {\r\n\t\t$urladd = rawurlencode($address);\r\n\t\t$url = \"http://maps.google.com/maps/api/geocode/json?address={$urladd}&sensor=false\";\r\n\t\t$result = wp_remote_get($url);\r\n\t\t$json = json_decode($result['body']);\r\n\r\n\t\tif (!$json) return false;\r\n\t\t$result = $json->results[0];\r\n\r\n\t\treturn array(\r\n\t\t\t'title' => $address,\r\n\t\t\t'body' => '',\r\n\t\t\t'icon' => 'marker.png',\r\n\t\t\t'position' => array (\r\n\t\t\t\t$result->geometry->location->lat,\r\n\t\t\t\t$result->geometry->location->lng\r\n\t\t\t),\r\n\t\t);\r\n\t}", "function geoip($ip_address = ''){\n // lookups.\n $reader = new Reader(base_path('database/geoip_db/GeoLite2-City.mmdb'));\n\n // Replace \"city\" with the appropriate method for your database, e.g.,\n // \"country\".\n try{\n $record = $reader->city($ip_address);\n\n $country_isoCode = $record->country->isoCode; // 'US'\n $country_name = $record->country->name; // 'United States'\n $state_geonameId = $record->mostSpecificSubdivision->geonameId; // 'Minnesota'\n $state_name = $record->mostSpecificSubdivision->name; // 'Minnesota'\n $state_isoCode = $record->mostSpecificSubdivision->isoCode; // 'MN'\n $city_geonameId = $record->city->geonameId; // '576'\n $city_name = $record->city->name; // 'Minneapolis'\n $city_code = $record->postal->code; // '55455'\n\n $city = Cities::where('geoname_id',$city_geonameId)->first();\n if(!$city){\n $country = Countries::where('iso_code_2',$country_isoCode)->first();\n $city = Cities::forceCreate([\n 'country_id' => $country->id,\n 'name_ar' => $city_name,\n 'name_en' => $city_name,\n 'code' => $city_code,\n 'geoname_id' => $city_geonameId,\n 'status' => 1,\n ]);\n }\n $country_id = $city->country_id;\n $city_id = $city->id;\n\n // print($record->location->latitude . \"<p>\"); // 44.9733\n // print($record->location->longitude . \"<p>\"); // -93.2323\n // print($record->traits->network . \"<p>\"); // '128.101.101.101/32'\n\n return compact('country_id','country_isoCode','country_name','state_geonameId','state_name','state_isoCode','city_geonameId','city_id','city_name','city_code');\n }\n catch(\\Exception $e){\n\n return [];\n\n }\n\n\n }", "public function geocode($address)\n {\n $requestUrl = 'https://maps.googleapis.com/maps/api/geocode/json?';\n $params = array(\n 'sensor' => 'false',\n 'language' => 'de',\n 'address' => $address,\n );\n\n $requestUrl .= http_build_query($params);\n\t\n $json = json_decode(file_get_contents($requestUrl), true);\n $return = array(\n 'status' => $json['status'],\n 'succeed' => $json['status'] == 'OK',\n );\n\n if ($json['status'] == 'OK') {\n $result = $json['results'][0];\n\n $return['formatted_address'] = $result['formatted_address'];\n $return['coordinates'] = new Point($result['geometry']['location']['lat'], $result['geometry']['location']['lng']);\n\n // find zip code and city name\n $return = array_merge($return, $this->parseAddressComponents($result));\n\n if (isset($result['partial_match']) && $result['partial_match']) {\n $return['partial_match'] = true;\n }\n }\n\n return $return;\n }", "public function dynamic_map(Request $request){\n $lat = '-24.4228873';\n $lang = '131.5279022';\n if(Cookie::get('user_state')){\n \n $user_state = json_decode(Cookie::get('user_state')); \n \n if($user_state->region){\n $state = States::where('short_name',$user_state->region)->first();\n if($state){\n $lat = $state->lat;\n $lang = $state->lang;\n }\n\n }\n\n\n } \n\n return view('map_test',['lat'=>(float)$lat,'lang'=>(float)$lang]);\n }", "function checkIfAddress2_Meditech($addressToCheck){\r\n\t\t\t$aSplit = explode(\",\", $addressToCheck); //city\r\n\t\t\t$bSplit = explode(\" \", trim($aSplit[1])); //state, zip\r\n\r\n\t\t\tswitch($this->clientId){\r\n\t\t\t\tcase \"Y3373\":\r\n\t\t\t\t\tif(strstr($addressToCheck,\",\")){ //if it contains a comma then it could be the second address line\r\n\t\t\t\t\t\t//if(strstr($bSplit[1], \"-\")){ $bSplit[2] = substr($bSplit[2],0,5); } //if the zip has a hyphen, strip it and use the first 5\r\n\t\t\t\t\t\tif(strstr($bSplit[1], \"-\")){ $bSplit[1] = substr($bSplit[1],0,5); } //if the zip has a hyphen, strip it and use the first 5\r\n\r\n\t\t\t\t\t\tif( strlen($bSplit[0])==2 && ( strlen($bSplit[1])==5 && is_numeric($bSplit[1]) || strlen($bSplit[2])==5 && is_numeric($bSplit[2]) ) ){ //this had to be expanded because they have a varying format for the poe which sometimes contains another space inbetween the state and zip\r\n\t\t\t\t\t\t\t$city = $aSplit[0];\r\n\t\t\t\t\t\t\t$state = $bSplit[0];\r\n\t\t\t\t\t\t\tif(strlen($bSplit[1])==5){ //we don't have the extra space\r\n\t\t\t\t\t\t\t\t$zip = $bSplit[1];\r\n\t\t\t\t\t\t\t}elseif(strlen($bSplit[2])==5){ //we do have the extra space\r\n\t\t\t\t\t\t\t\t$zip = $bSplit[2];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$rArray = array('cityStateZip'=>true, 'city'=>$city, 'state'=>$state, 'zip'=>$zip, 'address2'=>'');\r\n\t\t\t\t\t\t\treturn $rArray;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$rArray = array('cityStateZip'=>false, 'city'=>'', 'state'=>'', 'zip'=>'', 'address2'=>$addressToCheck);\r\n\t\t\t\t\t\t\treturn $rArray;\r\n\t\t\t\t\t\t} //end inner if\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$rArray = array('error'=>true, 'cityStateZip'=>'', 'city'=>'', 'state'=>'', 'zip'=>'', 'address2'=>'');\r\n\t\t\t\t\t\treturn $rArray;\r\n\t\t\t\t\t} //end outer if\r\n\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif(strstr($addressToCheck,\",\")){ //if it contains a comma then it could be the second address line\r\n\t\t\t\t\t\tif(strstr($bSplit[2], \"-\")){ $bSplit[2] = substr($bSplit[2],0,5); } //if the zip has a hyphen, strip it and use the first 5\r\n\t\t\t\t\t\tif( strlen($bSplit[0])==2 && strlen($bSplit[2])==5 && is_numeric($bSplit[2]) ){\r\n\t\t\t\t\t\t\t$city = $aSplit[0];\r\n\t\t\t\t\t\t\t$state = $bSplit[0];\r\n\t\t\t\t\t\t\t$zip = $bSplit[2];\r\n\t\t\t\t\t\t\t$rArray = array('cityStateZip'=>true, 'city'=>$city, 'state'=>$state, 'zip'=>$zip, 'address2'=>'');\r\n\t\t\t\t\t\t\treturn $rArray;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$rArray = array('cityStateZip'=>false, 'city'=>'', 'state'=>'', 'zip'=>'', 'address2'=>$addressToCheck);\r\n\t\t\t\t\t\t\treturn $rArray;\r\n\t\t\t\t\t\t} //end inner if\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$rArray = array('error'=>true, 'cityStateZip'=>'', 'city'=>'', 'state'=>'', 'zip'=>'', 'address2'=>'');\r\n\t\t\t\t\t\treturn $rArray;\r\n\t\t\t\t\t} //end outer if\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t}", "function parseAddress() {\n\tglobal $CONTENT;\n\t/**\n\t * Check for actions.If action is set then validate for\n\t * Admin , judge , Login , profile ( View Users Profile ).\n\t \n\tif(isset($_GET['action'])) {\n\t\t$action = $_GET['action'];\n\t\tif($action == 'login' || $action == 'logout') return $CONTENT = getLoginPage();\n\t\tif($action == 'admin') return $CONTENT = adminPage();\n\t\tif($action == 'judge') return $CONTENT = adminPage();\n\t}\n\tif(!isset($_GET['page']) || $_GET['page'] =='/') return $CONTENT = \"WAIT FOR HOME PAGE\";\n\t$urlRequest = explode(\"/\",$_GET['page']);\n\tescape($urlRequest);\n\n\t// complete this if problems statement\n\tif($urlRequest[1] == 'problems') return $CONTENT = \"WAIT\"; \n\treturn $CONTENT = getContestPage($urlRequest);\n\n*/\n\treturn \"Welcome\";\n}", "function venture_geo_process_map($existing_map) {\n $query = \"SELECT field_location_value, field_country_value, field_state_value, COUNT(nid) AS investor_count,\n MIN(field_minimum_investment_value) AS field_minimum_investment_value, \n MAX(field_maximum_investment_value) AS field_maximum_investment_value\n FROM {content_type_profile} WHERE LENGTH(IFNULL(field_location_value, '')) > 0\n AND field_location_value != 'invalid'\n GROUP BY field_location_value ORDER BY investor_count\";\n $result = db_query($query);\n \n $map_data = venture_geo_process_map_xml('default_color', array('color' => 'dadada'));\n $map_data .= venture_geo_process_map_xml('background_color', array('color' => 'ffffff'));\n $map_data .= venture_geo_process_map_xml('outline_color', array('color' => 'c4c4c4'));\n $map_data .= venture_geo_process_map_xml('default_point', array('color' => 'ff0000', 'size' => 7, 'opacity' => 50));\n $map_data .= venture_geo_process_map_xml('scale_points', array('data' => 25));\n $map_data .= venture_geo_process_map_xml('hover', array('font_size' => 13, 'font_color' => 'ffffff', 'background_color' => '51516d' ));\n \n while ($row = db_fetch_object($result)) {\n $geocode = explode('|', $row->field_location_value); \n $location = venture_geo_get_location($geocode[0], $row->field_state_value, $row->field_country_value);\n $investors = \"{$row->investor_count} venture investor\";\n $investors = $row->investor_count > 1 ? $investors . 's' : $investors;\n \n $field_minimum_investment = content_fields('field_minimum_investment', 'profile');\n $field_maximum_investment = content_fields('field_maximum_investment', 'profile');\n $min_investment = content_format($field_minimum_investment, $row->field_minimum_investment_value);\n $max_investment = content_format($field_maximum_investment, $row->field_maximum_investment_value);\n \n $map_data .= venture_geo_process_map_xml('point', array(\n 'name' => $location,\n 'loc' => $geocode[1] . ',' . $geocode[2],\n 'hover' => \"\\n$investors - \\n Minimum investment: $min_investment\\n Maximum investment: $max_investment\"\n ));\n }\n \n $map_data = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<countrydata>\\n$map_data</countrydata>\";\n $map_destination = file_directory_path() . '/map_' . time() . '.xml';\n file_save_data($map_data, $map_destination, FILE_EXISTS_REPLACE);\n \n if ($existing_map) {\n file_delete($existing_map);\n }\n}", "public function dmap_get_coordinates( $address, $force_refresh = false ) {\n\n\t $address_hash = md5( $address );\n\n\t $coordinates = get_transient( $address_hash );\n\n\t if ($force_refresh || $coordinates === false) {\n\n\t \t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false' );\n\t \t$url = add_query_arg( $args, 'http://maps.googleapis.com/maps/api/geocode/json' );\n\t \t$response \t= wp_remote_get( $url );\n\n\t \tif( is_wp_error( $response ) )\n\t \t\treturn;\n\n\t \t$data = wp_remote_retrieve_body( $response );\n\n\t \tif( is_wp_error( $data ) )\n\t \t\treturn;\n\n\t\t\tif ( $response['response']['code'] == 200 ) {\n\n\t\t\t\t$data = json_decode( $data );\n\n\t\t\t\tif ( $data->status === 'OK' ) {\n\n\t\t\t\t \t$coordinates = $data->results[0]->geometry->location;\n\n\t\t\t\t \t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t\t \t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t\t \t$cache_value['address'] = (string) $data->results[0]->formatted_address;\n\n\t\t\t\t \tset_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t\t \t$data = $cache_value;\n\n\t\t\t\t} elseif ( $data->status === 'ZERO_RESULTS' ) {\n\n\t\t\t\t \treturn;\n\n\t\t\t\t} elseif( $data->status === 'INVALID_REQUEST' ) {\n\n\t\t\t\t \treturn;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t \treturn;\n\n\t\t\t}\n\n\t } else {\n\n\t $data = $coordinates;\n\t }\n\n\t return $data;\n\n\t}", "function geoCheckIP ($ip) {\r\n\tif (!filter_var($ip, FILTER_VALIDATE_IP)) throw new InvalidArgumentException(\"IP is not valid\");\r\n\t//contact ip-server\r\n\t$response=file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ip);\r\n\tif (empty($response)) throw new InvalidArgumentException(\"Error contacting Geo-IP-Server\");\r\n\t$sregex = \"/s\\:\\d\\:/i\";\r\n\t$ipInfos = explode(';', str_replace('\"', '', preg_replace('/s\\:(\\d{1,2})\\:/i', '', substr($response, 0, -2))));\r\n\tunset($ipInfos[0]);\r\n\t$ipInfo = array();\r\n\tif ($ipInfos[10] == 'geoplugin_areaCode') {\r\n\t\t$ipInfo['country'] = $ipInfos[17];\r\n\t\t$ipInfo['town'] = $ipInfos[9];\r\n\t\t$ipInfo['lat'] = $ipInfos[21];\r\n\t\t$ipInfo['long'] = $ipInfos[23];\r\n\t} else {\r\n\t\t$ipInfo['country'] = $ipInfos[18];\r\n\t\t$ipInfo['town'] = $ipInfos[9].$ipInfos[10];\r\n\t\t$ipInfo['lat'] = $ipInfos[22];\r\n\t\t$ipInfo['long'] = $ipInfos[24];\r\n\t}\r\n\t//Array containing all regex-patterns necessary to extract ip-geoinfo from page\r\n/*\t$patterns = array();\r\n\t$patterns[\"domain\"] = '#geoplugin_city#i';\r\n\t$patterns[\"country\"] = '#Country: (.*?)&nbsp;#i';\r\n\t$patterns[\"state\"] = '#State/Region: (.*?)<br#i';\r\n\t$patterns[\"town\"] = '#City: (.*?)<br#i';\r\n\t//Array where results will be stored\r\n\t$ipInfo=array();\r\n\t//check response from ipserver for above patterns\r\n\tforeach ($patterns as $key => $pattern) {\r\n\t\t//store the result in array\r\n\t\t$ipInfo[$key] = preg_match($pattern,$response,$value) && !empty($value[1]) ? $value[1] : 'not found';\r\n\t}\r\n\treturn $ipInfo*/\r\n\treturn $ipInfo;\r\n}", "function locations_search($lat, $lon, $connection, $start = 0)\n{\n\t$db_selected = mysql_select_db(Secure::DB_DATABASE, $connection);\n\t$sql = \"select organization_location.address , organization_location.city , organization_location.state , organization_location.zip , organization_location.latitude , organization_location.longitude from organization_location where latitude <= {$lat} + 0.1 and latitude >= {$lat} - 0.1 and longitude <= {$lon} + 0.1 and longitude >= {$lon} - 0.1 and remove_approved = 0\";\n\t$sql = $sql.\" limit {$start},\".LIMIT;\n\tif(!($resource = @ mysql_query($sql, $connection)))\n\t\tshowerror();\n\t\t//echo $sql;\n\telse\n\t\treturn $resource;\n}", "private function convertAddressToGeodata($orga, $address) {\n $apiKey = $this->getContainer()->getParameter('googleMapsApiKey');\n $api = self::googleApiUrl . \"?key=$apiKey\";\n $geo = file_get_contents(\"$api&address=\".urlencode($address) . '&sensor=false');\n\n // Convert the JSON to an array\n $geo = json_decode($geo, true);\n //die(var_dump($geo['status']));\n if ($geo['status'] == 'OK') {\n // Get Lat & Long\n $latitude = $geo['results'][0]['geometry']['location']['lat'];\n $longitude = $geo['results'][0]['geometry']['location']['lng'];\n \n $orga->setGeolocation($latitude .','.$longitude);\n }\n }", "function getDistanceGoogle($postcode1, $postcode2, $switchGoogleOn=0){\n\n\tif ($switchGoogleOn=='1'){\n\t\t//Get driving distance using Google Maps API\n\t\ttry\n\t\t{\n\t\t\t$info = get_driving_information($postcode1, $postcode2);\n\t\t\treturn $info['distance'];\n\t\t\t//echo $info['distance'].' miles '.$info['time'].' seconds';\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo 'Caught exception: '.$e->getMessage().\"\\n\";\n\t\t}\n\t} else {\n\t\t//echo \"Using Normal Function\";\n\t\treturn getDistance($postcode1, $postcode2);\n\t}\n\n\t\n}", "public function geocodeLocation($address) {\n\t\tLoggerRegistry::debug('GoogleModule::geocodeLocation({address})', array( 'address' => TypeUtilities::describe($address) ));\n\t\t$url = sprintf('http://%s/maps/api/geocode/json?address=%s&sensor=false', $this->config('maps.api.host'), urlencode($address));\n\t\t$data = json_decode(file_get_contents($url), true);\n\t\tif (!isset($data['status'])) {\n\t\t\tthrow new \\RuntimeException(sprintf('Could not geocode location \"%s\", invalid geocode response structure', $address));\n\t\t}\n\t\tif ($data['status'] !== 'OK') {\n\t\t\tthrow new \\RuntimeException(sprintf('Could not geocode location \"%s\", geocode response status indicates an error: %s', $address, $data['status']));\n\t\t}\n\t\tif (!isset($data['results']) || !isset($data['results'][0]) || !isset($data['results'][0]['geometry']) || !isset($data['results'][0]['geometry']['location'])) {\n\t\t\tthrow new \\RuntimeException(sprintf('Could not geocode location \"%s\", geocode response contains no results', $address));\n\t\t}\n\t\t$coordinates = $data['results'][0]['geometry']['location'];\n\t\treturn array(\n\t\t\t'latitude' => $coordinates['lat'],\n\t\t\t'longitude' => $coordinates['lng']\n\t\t);\n\t}", "function phorum_mod_google_maps_read($messages)\n{\n global $PHORUM;\n\n foreach ($messages as $id => $message)\n {\n if (!empty($messages[$id]['user']) &&\n !empty($messages[$id]['user']['mod_google_maps'])) {\n $m = $messages[$id]['user']['mod_google_maps'];\n if (!empty($m['geoloc_country'])) {\n $messages[$id]['user']['country'] = htmlspecialchars(\n $m['geoloc_country'], ENT_COMPAT, $PHORUM[\"DATA\"][\"HCHARSET\"]);\n }\n if (!empty($m['geoloc_city'])) {\n $messages[$id]['user']['city'] = htmlspecialchars(\n $m['geoloc_city'], ENT_COMPAT, $PHORUM[\"DATA\"][\"HCHARSET\"]);\n }\n }\n }\n\n return $messages;\n}", "function checkLonLat($from_lat, $from_lon, $to_lat, $to_lon){\n $latlonbounds = getMinMaxLatLon();\n if($from_lat < $latlonbounds[0] || $from_lat > $latlonbounds[1]){\n throw new Exception(\"Input Error: from_lat out of bound\", 6);\n }\n else if($from_lon < $latlonbounds[2] || $from_lon > $latlonbounds[3]){\n throw new Exception(\"Input Error: from_lon out of bound\", 7);\n }\n if($to_lat < $latlonbounds[0] || $to_lat > $latlonbounds[1]){\n throw new Exception(\"Input Error: to_lat out of bound\", 8);\n }\n else if($to_lon < $latlonbounds[2] || $to_lon > $latlonbounds[3]){\n throw new Exception(\"Input Error: to_lon out of bound\", 9);\n }\n}", "function getAddresses()\r\n\t{\r\n\t\t// connect to the database\r\n\t\t//$this->dbsetup();\r\n\t\t\r\n\t\t$query = \"SELECT address FROM \" . $this->table . \" WHERE latitude = '0' AND longitude = '0'\";\r\n\t\t\r\n\t\t$result = mysql_query($query);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "private function validateLocation($gMapsArray) {\n $result;\n\n if(!is_object($gMapsArray))\n return false;\n\n if(!is_array($gMapsArray->results))\n return false;\n\n $result = reset($gMapsArray->results);\n\n if(!is_array($result->address_components))\n return false;\n\n $result = $result->address_components;\n\n if(!is_array($result))\n return false;\n\n return $result;\n }" ]
[ "0.6377701", "0.6340843", "0.63292575", "0.6327707", "0.631581", "0.623319", "0.6231387", "0.62205684", "0.62188077", "0.62090397", "0.618338", "0.6156632", "0.61554605", "0.6149053", "0.6144952", "0.61071324", "0.60952973", "0.6081244", "0.6073249", "0.6069403", "0.60045105", "0.59961784", "0.5990873", "0.5978133", "0.59455264", "0.5925194", "0.5916084", "0.5906291", "0.5898446", "0.5886688", "0.58578676", "0.5832091", "0.5817019", "0.5815859", "0.58065665", "0.57920325", "0.57699984", "0.5767148", "0.5767098", "0.5765465", "0.5764723", "0.575247", "0.574379", "0.57366794", "0.5733849", "0.5731157", "0.56951135", "0.569118", "0.56809795", "0.5675093", "0.566384", "0.5648135", "0.5637673", "0.5624154", "0.5616908", "0.5613718", "0.56109583", "0.5601311", "0.55889183", "0.55878407", "0.5584417", "0.5581678", "0.55357987", "0.5535725", "0.5528012", "0.5518608", "0.551502", "0.55120355", "0.5494182", "0.54885006", "0.5485968", "0.5482044", "0.5474517", "0.54724133", "0.54555243", "0.5442622", "0.54384685", "0.5427623", "0.54229707", "0.54153967", "0.5406497", "0.53991246", "0.5378824", "0.53712016", "0.5356911", "0.5332292", "0.5329914", "0.53216666", "0.53199476", "0.53125644", "0.5279359", "0.5275357", "0.525563", "0.5254885", "0.52508056", "0.52326083", "0.5229692", "0.5228646", "0.52244794", "0.5219507" ]
0.5346811
85
Create a list of all the user locations and sort them by countries
public function getAllLocations() { $sCacheId = $this->cache()->set('gmap.locations'); if (!($aRows = $this->cache()->get($sCacheId))) { $aRows = $this->database()->select('f.*, u.full_name, u.user_name, u.country_iso') ->from(Phpfox::getT('gmap'), 'f') ->join(Phpfox::getT('user'), 'u', 'u.user_id = f.user_id') ->where('f.not_found = \'0\'') ->execute('getSlaveRows'); $this->cache()->save($sCacheId, $aRows); } $aOutput = array(); if($aRows != null && is_array($aRows)) foreach($aRows as $aRow) { $aOutput[$aRow['country_iso']][] = $aRow; } return $aOutput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllCountriesLocations()\n\t{\n\t\t$sCacheId = $this->cache()->set('gmap.countries');\n\t\n\t\tif (!($aRows = $this->cache()->get($sCacheId)))\n\t\t{\n\t\t\t$aRows = $this->database()->select('fc.country_iso, c.name, c.phrase_var_name, fc.*, COUNT(u.user_id) as total_people')\n\t\t\t\t->from(Phpfox::getT('gmap_countries'), 'fc')\t\t\n\t\t\t\t->join(Phpfox::getT('country'), 'c', 'fc.country_iso = c.country_iso')\t\n\t\t\t\t->join(Phpfox::getT('user'), 'u', 'u.country_iso = fc.country_iso')\n\t\t\t\t->join(Phpfox::getT('gmap'), 'f', 'u.user_id = f.user_id')\n\t\t\t\t->group('u.country_iso')\n\t\t\t\t->where('f.not_found = \\'0\\'')\n\t\t\t\t->execute('getSlaveRows');\n\t\t\t\t\n\t\t\t$this->cache()->save($sCacheId, $aRows);\n\t\t}\n\t\t\n\t\tif($aRows != null && is_array($aRows))\n\t\t{\n\t\t\tforeach($aRows as $key => $aRow)\n\t\t\t{\n\t\t\t\tif(isset($aRow['phrase_var_name']) && $aRow['phrase_var_name'] != '')\n\t\t\t\t{\n\t\t\t\t\t$aRows[$key]['name'] = Phpfox::getPhrase($aRow['phrase_var_name']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$aRows = $this->sortByProperty($aRows, 'name');\n\t\t}\n\t\t\n\t\treturn $aRows;\n\t}", "public function countryList(){\n $sorted = $this->country->select('id','country_name')->get()->sortBy('country_name');\n return $sorted->values()->all();\n }", "public function sGetCountryList()\n {\n $context = Shopware()->Container()->get('shopware_storefront.context_service')->getShopContext();\n $service = Shopware()->Container()->get('shopware_storefront.location_service');\n\n $countryList = $service->getCountries($context);\n $countryList = Shopware()->Container()->get('legacy_struct_converter')->convertCountryStructList($countryList);\n\n $countryList = array_map(function ($country) {\n $request = $this->front->Request();\n $countryId = (int) $country['id'];\n $country['flag'] = ((int) $request->getPost('country') === $countryId || (int) $request->getPost('countryID') === $countryId);\n\n return $country;\n }, $countryList);\n\n $countryList = $this->eventManager->filter(\n 'Shopware_Modules_Admin_GetCountries_FilterResult',\n $countryList,\n ['subject' => $this]\n );\n\n return $countryList;\n }", "public static function getCountryList(){\n return Country::find()\n ->orderBy(['name'=>SORT_ASC])\n ->all();\n }", "public function getCountries();", "public function listCountries() {\r\n\t\t\t$sql = Connection::getHandle()->prepare(\"SELECT DISTINCT c.countries_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_name,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_iso_code_2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCASE WHEN z.zone_id > 0 THEN 'true' ELSE 'false' END AS zone\r\n\t\t\t\t\t\t\t\t\t\tFROM bs_countries c\r\n\t\t\t\t\t\t\t\t\t\tLEFT JOIN bs_zones z ON (c.countries_iso_code_2 = z.countries_id)\r\n\t\t\t\t\t\t\t\t\t\tGROUP BY c.countries_id\r\n\t\t\t\t\t\t\t\t\t\tORDER BY c.countries_id\");\r\n\t\t\t$sql->execute();\r\n\r\n\t\t\twhile ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\t\t$results[] = $row;\r\n\t\t\t}\r\n\r\n\t\t\treturn $results;\r\n\t\t}", "public static function getList()\n { \n \n $countries = self::all();\n \n $list = array();\n foreach ($countries as $row) {\n $list[$row->id] = $row->name;\n }\n asort($list);\n \n $first_country = env('FIRST_COUNTRY');\n//dd($first_country); \n if ($first_country) {\n $first_country_obj = Country::\n where('name_'.env('PRIM_LANG'),'like',$first_country)\n ->first();\n if ($first_country_obj && isset($list[$first_country_obj->id])) {\n $first_country_name = $list[$first_country_obj->id];\n unset($list[$first_country_obj->id]);\n $list = [$first_country_obj->id => $first_country_name] + $list;\n }\n }\n \n return $list; \n }", "function countryList()\n {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n //pre($arrRes);\n return $arrRes;\n }", "function country_list()\t{\r\n\t\t$list = array(\r\n\t\t\t'AF' => 'Afghanistan',\r\n\t\t\t'AX' => 'Aland Island (Finland)',\r\n\t\t\t'AL' => 'Albania',\r\n\t\t\t'DZ' => 'Algeria',\r\n\t\t\t'AD' => 'Andorra',\r\n\t\t\t'AO' => 'Angola',\r\n\t\t\t'AI' => 'Anguilla',\r\n\t\t\t'AG' => 'Antigua and Barbuda',\r\n\t\t\t'AR' => 'Argentina',\r\n\t\t\t'AM' => 'Armenia',\r\n\t\t\t'AW' => 'Aruba',\r\n\t\t\t'AU' => 'Australia',\r\n\t\t\t'AT' => 'Austria',\r\n\t\t\t'AZ' => 'Azerbaijan',\r\n\t\t\t'BS' => 'Bahamas',\r\n\t\t\t'BH' => 'Bahrain',\r\n\t\t\t'BD' => 'Bangladesh',\r\n\t\t\t'BB' => 'Barbados',\r\n\t\t\t'BY' => 'Belarus',\r\n\t\t\t'BE' => 'Belgium',\r\n\t\t\t'BZ' => 'Belize',\r\n\t\t\t'BJ' => 'Benin',\r\n\t\t\t'BM' => 'Bermuda',\r\n\t\t\t'BT' => 'Bhutan',\r\n\t\t\t'BO' => 'Bolivia',\r\n\t\t\t'BQ' => 'Bonaire (Netherlands Antilles)',\r\n\t\t\t'BA' => 'Bosnia-Herzegovina',\r\n\t\t\t'BW' => 'Botswana',\r\n\t\t\t'BR' => 'Brazil',\r\n\t\t\t'VG' => 'British Virgin Islands',\r\n\t\t\t'BN' => 'Brunei Darussalam',\r\n\t\t\t'BG' => 'Bulgaria',\r\n\t\t\t'BF' => 'Burkina Faso',\r\n\t\t\t'MM' => 'Burma',\r\n\t\t\t'BI' => 'Burundi',\r\n\t\t\t'KH' => 'Cambodia',\r\n\t\t\t'CM' => 'Cameroon',\r\n\t\t\t'CA' => 'Canada',\r\n\t\t\t'CV' => 'Cape Verde',\r\n\t\t\t'KY' => 'Cayman Islands',\r\n\t\t\t'CF' => 'Central African Republic',\r\n\t\t\t'TD' => 'Chad',\r\n\t\t\t'CL' => 'Chile',\r\n\t\t\t'CN' => 'China',\r\n\t\t\t'CX' => 'Christmas Island (Australia)',\r\n\t\t\t'CC' => 'Cocos Island (Australia)',\r\n\t\t\t'CO' => 'Colombia',\r\n\t\t\t'KM' => 'Comoros',\r\n\t\t\t'CG' => 'Congo, Republic of the',\r\n\t\t\t'CD' => 'Congo, Democratic Republic of the',\r\n\t\t\t'CK' => 'Cook Islands (New Zealand)',\r\n\t\t\t'CR' => 'Costa Rica',\r\n\t\t\t'CI' => 'Cote d\\'Ivoire',\r\n\t\t\t'HR' => 'Croatia',\r\n\t\t\t'CU' => 'Cuba',\r\n\t\t\t'CW' => 'Curacao (Netherlands Antilles)',\r\n\t\t\t'CY' => 'Cyprus',\r\n\t\t\t'CZ' => 'Czech Republic',\r\n\t\t\t'DK' => 'Denmark',\r\n\t\t\t'DJ' => 'Djibouti',\r\n\t\t\t'DM' => 'Dominica',\r\n\t\t\t'DO' => 'Dominican Republic',\r\n\t\t\t'TL' => 'East Timor (Indonesia)',\r\n\t\t\t'EC' => 'Ecuador',\r\n\t\t\t'EG' => 'Egypt',\r\n\t\t\t'SV' => 'El Salvador',\r\n\t\t\t'GQ' => 'Equatorial Guinea',\r\n\t\t\t'ER' => 'Eritrea',\r\n\t\t\t'EE' => 'Estonia',\r\n\t\t\t'ET' => 'Ethiopia',\r\n\t\t\t'FK' => 'Falkland Islands',\r\n\t\t\t'FO' => 'Faroe Islands',\r\n\t\t\t'FJ' => 'Fiji',\r\n\t\t\t'FI' => 'Finland',\r\n\t\t\t'FR' => 'France',\r\n\t\t\t'GF' => 'French Guiana',\r\n\t\t\t'PF' => 'French Polynesia',\r\n\t\t\t'GA' => 'Gabon',\r\n\t\t\t'GM' => 'Gambia',\r\n\t\t\t'GE' => 'Georgia, Republic of',\r\n\t\t\t'DE' => 'Germany',\r\n\t\t\t'GH' => 'Ghana',\r\n\t\t\t'GI' => 'Gibraltar',\r\n\t\t\t'GB' => 'Great Britain and Northern Ireland',\r\n\t\t\t'GR' => 'Greece',\r\n\t\t\t'GL' => 'Greenland',\r\n\t\t\t'GD' => 'Grenada',\r\n\t\t\t'GP' => 'Guadeloupe',\r\n\t\t\t'GT' => 'Guatemala',\r\n\t\t\t'GG' => 'Guernsey',\r\n\t\t\t'GN' => 'Guinea',\r\n\t\t\t'GW' => 'Guinea-Bissau',\r\n\t\t\t'GY' => 'Guyana',\r\n\t\t\t'HT' => 'Haiti',\r\n\t\t\t'HN' => 'Honduras',\r\n\t\t\t'HK' => 'Hong Kong',\r\n\t\t\t'HU' => 'Hungary',\r\n\t\t\t'IS' => 'Iceland',\r\n\t\t\t'IN' => 'India',\r\n\t\t\t'ID' => 'Indonesia',\r\n\t\t\t'IR' => 'Iran',\r\n\t\t\t'IQ' => 'Iraq',\r\n\t\t\t'IE' => 'Ireland',\r\n\t\t\t'IM' => 'Isle of Man (Great Britain and Northern Ireland)',\r\n\t\t\t'IL' => 'Israel',\r\n\t\t\t'IT' => 'Italy',\r\n\t\t\t'JM' => 'Jamaica',\r\n\t\t\t'JP' => 'Japan',\r\n\t\t\t'JE' => 'Jersey (Channel Islands) (Great Britain and Northern Ireland)',\r\n\t\t\t'JO' => 'Jordan',\r\n\t\t\t'KZ' => 'Kazakhstan',\r\n\t\t\t'KE' => 'Kenya',\r\n\t\t\t'KI' => 'Kiribati',\r\n\t\t\t'KW' => 'Kuwait',\r\n\t\t\t'KG' => 'Kyrgyzstan',\r\n\t\t\t'LA' => 'Laos',\r\n\t\t\t'LV' => 'Latvia',\r\n\t\t\t'LB' => 'Lebanon',\r\n\t\t\t'LS' => 'Lesotho',\r\n\t\t\t'LR' => 'Liberia',\r\n\t\t\t'LY' => 'Libya',\r\n\t\t\t'LI' => 'Liechtenstein',\r\n\t\t\t'LT' => 'Lithuania',\r\n\t\t\t'LU' => 'Luxembourg',\r\n\t\t\t'MO' => 'Macao',\r\n\t\t\t'MK' => 'Macedonia, Republic of',\r\n\t\t\t'MG' => 'Madagascar',\r\n\t\t\t'MW' => 'Malawi',\r\n\t\t\t'MY' => 'Malaysia',\r\n\t\t\t'MV' => 'Maldives',\r\n\t\t\t'ML' => 'Mali',\r\n\t\t\t'MT' => 'Malta',\r\n\t\t\t'MQ' => 'Martinique',\r\n\t\t\t'MR' => 'Mauritania',\r\n\t\t\t'MU' => 'Mauritius',\r\n\t\t\t'YT' => 'Mayotte (France)',\r\n\t\t\t'MX' => 'Mexico',\r\n\t\t\t'MD' => 'Moldova',\r\n\t\t\t'MC' => 'Monaco (France)',\r\n\t\t\t'MN' => 'Mongolia',\r\n\t\t\t'ME' => 'Montenegro',\r\n\t\t\t'MS' => 'Montserrat',\r\n\t\t\t'MA' => 'Morocco',\r\n\t\t\t'MZ' => 'Mozambique',\r\n\t\t\t'NA' => 'Namibia',\r\n\t\t\t'NR' => 'Nauru',\r\n\t\t\t'NP' => 'Nepal',\r\n\t\t\t'NL' => 'Netherlands',\r\n\t\t\t'AN' => 'Netherlands Antilles',\r\n\t\t\t'NC' => 'New Caledonia',\r\n\t\t\t'NZ' => 'New Zealand',\r\n\t\t\t'NI' => 'Nicaragua',\r\n\t\t\t'NE' => 'Niger',\r\n\t\t\t'NG' => 'Nigeria',\r\n\t\t\t'NU' => 'Niue',\r\n\t\t\t'NF' => 'Norfolk Island',\r\n\t\t\t'KP' => 'North Korea (Korea, Democratic People\\'s Republic of)',\r\n\t\t\t'NO' => 'Norway',\r\n\t\t\t'OM' => 'Oman',\r\n\t\t\t'PK' => 'Pakistan',\r\n\t\t\t'PA' => 'Panama',\r\n\t\t\t'PG' => 'Papua New Guinea',\r\n\t\t\t'PY' => 'Paraguay',\r\n\t\t\t'PE' => 'Peru',\r\n\t\t\t'PH' => 'Philippines',\r\n\t\t\t'PN' => 'Pitcairn Island',\r\n\t\t\t'PL' => 'Poland',\r\n\t\t\t'PT' => 'Portugal',\r\n\t\t\t'QA' => 'Qatar',\r\n\t\t\t'RE' => 'Reunion',\r\n\t\t\t'RO' => 'Romania',\r\n\t\t\t'RU' => 'Russia',\r\n\t\t\t'RW' => 'Rwanda',\r\n\t\t\t'BL' => 'Saint Barthelemy (Guadeloupe)',\r\n\t\t\t'SH' => 'Saint Helena',\r\n\t\t\t'KN' => 'Saint Kitts (Saint Christopher and Nevis)',\r\n\t\t\t'LC' => 'Saint Lucia',\r\n\t\t\t'MF' => 'Saint Martin (French) (Guadeloupe)',\r\n\t\t\t'PM' => 'Saint Pierre and Miquelon',\r\n\t\t\t'VC' => 'Saint Vincent and the Grenadines',\r\n\t\t\t'SM' => 'San Marino',\r\n\t\t\t'ST' => 'Sao Tome and Principe',\r\n\t\t\t'SA' => 'Saudi Arabia',\r\n\t\t\t'SN' => 'Senegal',\r\n\t\t\t'RS' =>\t'Serbia, Republic of',\r\n\t\t\t'SC' => 'Seychelles',\r\n\t\t\t'SL' => 'Sierra Leone',\r\n\t\t\t'SG' => 'Singapore',\r\n\t\t\t'SX' => 'Saint Maarten (Dutch) (Netherlands Antilles)',\r\n\t\t\t'SK' => 'Slovak Republic',\r\n\t\t\t'SI' => 'Slovenia',\r\n\t\t\t'SB' => 'Solomon Islands',\r\n\t\t\t'SO' => 'Somalia',\r\n\t\t\t'ZA' => 'South Africa',\r\n\t\t\t'GS' => 'South Georgia (Falkland Islands)',\r\n\t\t\t'KR' => 'South Korea (Korea, Republic of)',\r\n\t\t\t'SS' => 'Sudan', // South Sudan, not listed separately from Sudan by USPS\r\n\t\t\t'ES' => 'Spain',\r\n\t\t\t'LK' => 'Sri Lanka',\r\n\t\t\t'SD' => 'Sudan',\r\n\t\t\t'SR' => 'Suriname',\r\n\t\t\t'SZ' => 'Swaziland',\r\n\t\t\t'SE' => 'Sweden',\r\n\t\t\t'CH' => 'Switzerland',\r\n\t\t\t'SY' => 'Syrian Arab Republic',\r\n\t\t\t'TW' => 'Taiwan',\r\n\t\t\t'TJ' => 'Tajikistan',\r\n\t\t\t'TZ' => 'Tanzania',\r\n\t\t\t'TH' => 'Thailand',\r\n\t\t\t'TG' => 'Togo',\r\n\t\t\t'TK' => 'Tokelau (Union Group) (Western Samoa)',\r\n\t\t\t'TO' => 'Tonga',\r\n\t\t\t'TT' => 'Trinidad and Tobago',\r\n\t\t\t'TN' => 'Tunisia',\r\n\t\t\t'TR' => 'Turkey',\r\n\t\t\t'TM' => 'Turkmenistan',\r\n\t\t\t'TC' => 'Turks and Caicos Islands',\r\n\t\t\t'TV' => 'Tuvalu',\r\n\t\t\t'UG' => 'Uganda',\r\n\t\t\t'UA' => 'Ukraine',\r\n\t\t\t'AE' => 'United Arab Emirates',\r\n\t\t\t'UY' => 'Uruguay',\r\n\t\t\t'UZ' => 'Uzbekistan',\r\n\t\t\t'VU' => 'Vanuatu',\r\n\t\t\t'VA' => 'Vatican City',\r\n\t\t\t'VE' => 'Venezuela',\r\n\t\t\t'VN' => 'Vietnam',\r\n\t\t\t'WF' => 'Wallis and Futuna Islands',\r\n\t\t\t'WS' => 'Western Samoa',\r\n\t\t\t'YE' => 'Yemen',\r\n\t\t\t'ZM' => 'Zambia',\r\n\t\t\t'ZW' => 'Zimbabwe');\r\n\t\treturn $list;\r\n\t}", "function CountriesList()\n\t{\t$countries = array();\n\t\t$adminuser = new AdminUser((int)$_SESSION[SITE_NAME][\"auserid\"]);\n\t\t\n\t\t$sql = \"SELECT countries.ccode, countries.shortname, IF(toplist > 0, 0, 1) AS istoplist FROM countries ORDER BY istoplist, toplist, shortname\";\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$countries[$row[\"ccode\"]] = $row[\"shortname\"];\n\t\t\t}\n\t\t}\n\t\treturn $countries;\n\t}", "static function get_countries() {\n static $ret = array();\n if(empty($ret)) {\n global $wpdb;\n $ret = $wpdb->get_results('SELECT * FROM ai_country ORDER BY name', OBJECT_K);\n }\n return $ret;\n }", "public function getCountryList() {\n $result = array();\n $collection = Mage::getModel('directory/country')->getCollection();\n foreach ($collection as $country) {\n $cid = $country->getId();\n $cname = $country->getName();\n $result[$cid] = $cname;\n }\n return $result;\n }", "private function returnCountriesForUser()\n {\n\n $tableCountryExt = CountryExt::tablename();\n $tableCountry = Country::tablename();\n\n /* $role=Yii::$app->user->getIdentity()->role;\n //If I'm admin just get all countries\n if($role==User::ROLE_ADMIN || $role==User::ROLE_SUPERADMIN || $role==User::ROLE_MARKETER)\n {\n $countries = Country::listAllCountries();\n }\n //otherwise find all countries where specific lanuage(language of current user is) is spoken\n else\n {\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n } */\n\n //return countries per language\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n return $countries;\n }", "function getSiteCountries() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_COUNTRIES . \" WHERE status='1' ORDER BY country_name\");\n\n return $data;\n }", "function countryList() {\n $country_array = array(\"Afghanistan\", \"Aland Islands\", \"Albania\", \"Algeria\", \"American Samoa\", \"Andorra\", \"Angola\", \"Anguilla\", \"Antarctica\", \"Antigua\", \"Argentina\", \"Armenia\", \"Aruba\", \"Australia\", \"Austria\", \"Azerbaijan\", \"Bahamas\", \"Bahrain\", \"Bangladesh\", \"Barbados\", \"Barbuda\", \"Belarus\", \"Belgium\", \"Belize\", \"Benin\", \"Bermuda\", \"Bhutan\", \"Bolivia\", \"Bosnia\", \"Botswana\", \"Bouvet Island\", \"Brazil\", \"British Indian Ocean Trty.\", \"Brunei Darussalam\", \"Bulgaria\", \"Burkina Faso\", \"Burundi\", \"Caicos Islands\", \"Cambodia\", \"Cameroon\", \"Canada\", \"Cape Verde\", \"Cayman Islands\", \"Central African Republic\", \"Chad\", \"Chile\", \"China\", \"Christmas Island\", \"Cocos (Keeling) Islands\", \"Colombia\", \"Comoros\", \"Congo\", \"Congo, Democratic Republic of the\", \"Cook Islands\", \"Costa Rica\", \"Cote d'Ivoire\", \"Croatia\", \"Cuba\", \"Cyprus\", \"Czech Republic\", \"Denmark\", \"Djibouti\", \"Dominica\", \"Dominican Republic\", \"Ecuador\", \"Egypt\", \"El Salvador\", \"Equatorial Guinea\", \"Eritrea\", \"Estonia\", \"Ethiopia\", \"Falkland Islands (Malvinas)\", \"Faroe Islands\", \"Fiji\", \"Finland\", \"France\", \"French Guiana\", \"French Polynesia\", \"French Southern Territories\", \"Futuna Islands\", \"Gabon\", \"Gambia\", \"Georgia\", \"Germany\", \"Ghana\", \"Gibraltar\", \"Greece\", \"Greenland\", \"Grenada\", \"Guadeloupe\", \"Guam\", \"Guatemala\", \"Guernsey\", \"Guinea\", \"Guinea-Bissau\", \"Guyana\", \"Haiti\", \"Heard\", \"Herzegovina\", \"Holy See\", \"Honduras\", \"Hong Kong\", \"Hungary\", \"Iceland\", \"India\", \"Indonesia\", \"Iran (Islamic Republic of)\", \"Iraq\", \"Ireland\", \"Isle of Man\", \"Israel\", \"Italy\", \"Jamaica\", \"Jan Mayen Islands\", \"Japan\", \"Jersey\", \"Jordan\", \"Kazakhstan\", \"Kenya\", \"Kiribati\", \"Korea\", \"Korea (Democratic)\", \"Kuwait\", \"Kyrgyzstan\", \"Lao\", \"Latvia\", \"Lebanon\", \"Lesotho\", \"Liberia\", \"Libyan Arab Jamahiriya\", \"Liechtenstein\", \"Lithuania\", \"Luxembourg\", \"Macao\", \"Macedonia\", \"Madagascar\", \"Malawi\", \"Malaysia\", \"Maldives\", \"Mali\", \"Malta\", \"Marshall Islands\", \"Martinique\", \"Mauritania\", \"Mauritius\", \"Mayotte\", \"McDonald Islands\", \"Mexico\", \"Micronesia\", \"Miquelon\", \"Moldova\", \"Monaco\", \"Mongolia\", \"Montenegro\", \"Montserrat\", \"Morocco\", \"Mozambique\", \"Myanmar\", \"Namibia\", \"Nauru\", \"Nepal\", \"Netherlands\", \"Netherlands Antilles\", \"Nevis\", \"New Caledonia\", \"New Zealand\", \"Nicaragua\", \"Niger\", \"Nigeria\", \"Niue\", \"Norfolk Island\", \"Northern Mariana Islands\", \"Norway\", \"Oman\", \"Pakistan\", \"Palau\", \"Palestinian Territory, Occupied\", \"Panama\", \"Papua New Guinea\", \"Paraguay\", \"Peru\", \"Philippines\", \"Pitcairn\", \"Poland\", \"Portugal\", \"Principe\", \"Puerto Rico\", \"Qatar\", \"Reunion\", \"Romania\", \"Russian Federation\", \"Rwanda\", \"Saint Barthelemy\", \"Saint Helena\", \"Saint Kitts\", \"Saint Lucia\", \"Saint Martin (French part)\", \"Saint Pierre\", \"Saint Vincent\", \"Samoa\", \"San Marino\", \"Sao Tome\", \"Saudi Arabia\", \"Senegal\", \"Serbia\", \"Seychelles\", \"Sierra Leone\", \"Singapore\", \"Slovakia\", \"Slovenia\", \"Solomon Islands\", \"Somalia\", \"South Africa\", \"South Georgia\", \"South Sandwich Islands\", \"Spain\", \"Sri Lanka\", \"Sudan\", \"Suriname\", \"Svalbard\", \"Swaziland\", \"Sweden\", \"Switzerland\", \"Syrian Arab Republic\", \"Taiwan\", \"Tajikistan\", \"Tanzania\", \"Thailand\", \"The Grenadines\", \"Timor-Leste\", \"Tobago\", \"Togo\", \"Tokelau\", \"Tonga\", \"Trinidad\", \"Tunisia\", \"Turkey\", \"Turkmenistan\", \"Turks Islands\", \"Tuvalu\", \"Uganda\", \"Ukraine\", \"United Arab Emirates\", \"United Kingdom\", \"United States\", \"Uruguay\", \"US Minor Outlying Islands\", \"Uzbekistan\", \"Vanuatu\", \"Vatican City State\", \"Venezuela\", \"Vietnam\", \"Virgin Islands (British)\", \"Virgin Islands (US)\", \"Wallis\", \"Western Sahara\", \"Yemen\", \"Zambia\", \"Zimbabwe\");\n foreach($country_array as $country) {\n echo \"\n <option>\n $country\n </option>\n\n \";\n }\n}", "public function getCountriesInfo();", "function getCountryList($options = array()) {\n\t\t$local_country_data = array();\n\t\t$where = array();\n\n\t\t# possible options of filtering\n\t\tif (!empty($options['country_id']))\n\t\t$where[] = \"id = \".$options['country_id'];\n\n\t\t# build SQL request\n\t\t$_sql = \"SELECT `id`, `iso2`, `iso3`, `name`\n\t\t\t\tFROM `%s` %s ORDER BY `name` ASC\";\n\t\t$sql = sprintf($_sql,\n\t\t$this->country_table,\n\t\t!empty($where) ? \"WHERE \".implode(\" AND \", $where) : \"\"\n\t\t);\n\t\t$result = mysql_query($sql);\n\n\t\twhile ($_city = mysql_fetch_assoc($result)) {\n\t\t\t$this->country_data[$_city['id']] = array (\n\t\t\t'id'\t=> $_city['id'],\n\t\t\t'iso2'\t=> $_city['iso2'],\n\t\t\t'iso3'\t=> $_city['iso3'],\n\t\t\t'name'\t=> $_city['name'],\n\t\t\t);\n\t\t\t$local_country_data[] = $this->country_data[$_city['id']];\n\t\t}\n\n\t\treturn $local_country_data;\n\t}", "function getCountries() {\n $cntrs = [];\n $data = getDataCsv('countries.csv');\n\n if (($data) && is_array($data)) {\n foreach ($data as $row) {\n $cntrs[$row[1]] = $row[0];\n }\n asort($cntrs);\n }\n\n return $cntrs;\n}", "public function getCountryOptions()\r\r\r\n\t{\r\r\r\n\t\t$countries = Ccc::getModel('core/locale')->getTranslationList('territory', null, 2);\r\r\r\n \r\r\r\n return $this->_filterCountryList($countries); \r\r\r\n \r\r\r\n asort($countries);\r\r\r\n return $countries;\r\r\r\n\t}", "public function getCountriesList() {\n return $this->_get(7);\n }", "public function get_all_countries_list()\n\t {\n\t \t$query=$this->ApiModel->get_all_countries();\n\t \techo json_encode($query);\n\t }", "private function getCountriesList()\n {\n $list = [];\n $countries = Twilio::init()->getAvailableCountries();\n\n foreach($countries as $item) {\n $list[$item->country_code] = $item->country;\n }\n ksort($list);\n return $list;\n }", "public function get_country_list() \n\t{\n\t\treturn $this->db->select('num_code')\n\t\t->select('country_name')\n\t\t->select('num_code')\n\t\t->from('system_iso3166_l10n')\n\t\t->order_by('country_name', 'ASC')\t\n\t\t->get()->result();\n\t}", "public function getCountryList()\n {\n return $this->call('country.list');\n }", "public static function getCountries()\n\t{\n\t\t$country[\"AFG\"] = Array(\"iso2\" => \"AF\", \"name\" => \"Afghanistan, Islamic Republic \");\n\t\t$country[\"ALA\"] = Array(\"iso2\" => \"AX\", \"name\" => \"Åland Islands\");\n\t\t$country[\"ALB\"] = Array(\"iso2\" => \"AL\", \"name\" => \"Albania, Republic of\");\n\t\t$country[\"DZA\"] = Array(\"iso2\" => \"DZ\", \"name\" => \"Algeria, People's Democratic Republic\");\n\t\t$country[\"ASM\"] = Array(\"iso2\" => \"AS\", \"name\" => \"American Samoa\");\n\t\t$country[\"AND\"] = Array(\"iso2\" => \"AD\", \"name\" => \"Andorra, Principality of\");\n\t\t$country[\"AGO\"] = Array(\"iso2\" => \"AO\", \"name\" => \"Angola, Republic of\");\n\t\t$country[\"AIA\"] = Array(\"iso2\" => \"AI\", \"name\" => \"Anguilla\");\n\t\t$country[\"ATA\"] = Array(\"iso2\" => \"AQ\", \"name\" => \"Antarctica (the territory Sout\");\n\t\t$country[\"ATG\"] = Array(\"iso2\" => \"AG\", \"name\" => \"Antigua and Barbuda\");\n\t\t$country[\"ARG\"] = Array(\"iso2\" => \"AR\", \"name\" => \"Argentina, Argentine Republic\");\n\t\t$country[\"ARM\"] = Array(\"iso2\" => \"AM\", \"name\" => \"Armenia, Republic of\");\n\t\t$country[\"ABW\"] = Array(\"iso2\" => \"AW\", \"name\" => \"Aruba\");\n\t\t$country[\"AUS\"] = Array(\"iso2\" => \"AU\", \"name\" => \"Australia, Commonwealth of\");\n\t\t$country[\"AUT\"] = Array(\"iso2\" => \"AT\", \"name\" => \"Austria, Republic of\");\n\t\t$country[\"AZE\"] = Array(\"iso2\" => \"AZ\", \"name\" => \"Azerbaijan, Republic of\");\n\t\t$country[\"BHS\"] = Array(\"iso2\" => \"BS\", \"name\" => \"Bahamas, Commonwealth of the\");\n\t\t$country[\"BHR\"] = Array(\"iso2\" => \"BH\", \"name\" => \"Bahrain, Kingdom of\");\n\t\t$country[\"BGD\"] = Array(\"iso2\" => \"BD\", \"name\" => \"Bangladesh, People's Republic \");\n\t\t$country[\"BRB\"] = Array(\"iso2\" => \"BB\", \"name\" => \"Barbados\");\n\t\t$country[\"BLR\"] = Array(\"iso2\" => \"BY\", \"name\" => \"Belarus, Republic of\");\n\t\t$country[\"BEL\"] = Array(\"iso2\" => \"BE\", \"name\" => \"Belgium, Kingdom of\");\n\t\t$country[\"BLZ\"] = Array(\"iso2\" => \"BZ\", \"name\" => \"Belize\");\n\t\t$country[\"BEN\"] = Array(\"iso2\" => \"BJ\", \"name\" => \"Benin, Republic of\");\n\t\t$country[\"BMU\"] = Array(\"iso2\" => \"BM\", \"name\" => \"Bermuda\");\n\t\t$country[\"BTN\"] = Array(\"iso2\" => \"BT\", \"name\" => \"Bhutan, Kingdom of\");\n\t\t$country[\"BOL\"] = Array(\"iso2\" => \"BO\", \"name\" => \"Bolivia, Republic of\");\n\t\t$country[\"BIH\"] = Array(\"iso2\" => \"BA\", \"name\" => \"Bosnia and Herzegovina\");\n\t\t$country[\"BWA\"] = Array(\"iso2\" => \"BW\", \"name\" => \"Botswana, Republic of\");\n\t\t$country[\"BVT\"] = Array(\"iso2\" => \"BV\", \"name\" => \"Bouvet Island (Bouvetoya)\");\n\t\t$country[\"BRA\"] = Array(\"iso2\" => \"BR\", \"name\" => \"Brazil, Federative Republic of\");\n\t\t$country[\"IOT\"] = Array(\"iso2\" => \"IO\", \"name\" => \"British Indian Ocean Territory\");\n\t\t$country[\"VGB\"] = Array(\"iso2\" => \"VG\", \"name\" => \"British Virgin Islands\");\n\t\t$country[\"BRN\"] = Array(\"iso2\" => \"BN\", \"name\" => \"Brunei Darussalam\");\n\t\t$country[\"BGR\"] = Array(\"iso2\" => \"BG\", \"name\" => \"Bulgaria, Republic of\");\n\t\t$country[\"BFA\"] = Array(\"iso2\" => \"BF\", \"name\" => \"Burkina Faso\");\n\t\t$country[\"BDI\"] = Array(\"iso2\" => \"BI\", \"name\" => \"Burundi, Republic of\");\n\t\t$country[\"KHM\"] = Array(\"iso2\" => \"KH\", \"name\" => \"Cambodia, Kingdom of\");\n\t\t$country[\"CMR\"] = Array(\"iso2\" => \"CM\", \"name\" => \"Cameroon, Republic of\");\n\t\t$country[\"CAN\"] = Array(\"iso2\" => \"CA\", \"name\" => \"Canada\");\n\t\t$country[\"CPV\"] = Array(\"iso2\" => \"CV\", \"name\" => \"Cape Verde, Republic of\");\n\t\t$country[\"CYM\"] = Array(\"iso2\" => \"KY\", \"name\" => \"Cayman Islands\");\n\t\t$country[\"CAF\"] = Array(\"iso2\" => \"CF\", \"name\" => \"Central African Republic\");\n\t\t$country[\"TCD\"] = Array(\"iso2\" => \"TD\", \"name\" => \"Chad, Republic of\");\n\t\t$country[\"CHL\"] = Array(\"iso2\" => \"CL\", \"name\" => \"Chile, Republic of\");\n\t\t$country[\"CHN\"] = Array(\"iso2\" => \"CN\", \"name\" => \"China, People's Republic of\");\n\t\t$country[\"CXR\"] = Array(\"iso2\" => \"CX\", \"name\" => \"Christmas Island\");\n\t\t$country[\"CCK\"] = Array(\"iso2\" => \"CC\", \"name\" => \"Cocos (Keeling) Islands\");\n\t\t$country[\"COL\"] = Array(\"iso2\" => \"CO\", \"name\" => \"Colombia, Republic of\");\n\t\t$country[\"COM\"] = Array(\"iso2\" => \"KM\", \"name\" => \"Comoros, Union of the\");\n\t\t$country[\"COD\"] = Array(\"iso2\" => \"CD\", \"name\" => \"Congo, Democratic Republic of \");\n\t\t$country[\"COG\"] = Array(\"iso2\" => \"CG\", \"name\" => \"Congo, Republic of the\");\n\t\t$country[\"COK\"] = Array(\"iso2\" => \"CK\", \"name\" => \"Cook Islands\");\n\t\t$country[\"CRI\"] = Array(\"iso2\" => \"CR\", \"name\" => \"Costa Rica, Republic of\");\n\t\t$country[\"CIV\"] = Array(\"iso2\" => \"CI\", \"name\" => \"Cote d'Ivoire, Republic of\");\n\t\t$country[\"HRV\"] = Array(\"iso2\" => \"HR\", \"name\" => \"Croatia, Republic of\");\n\t\t$country[\"CUB\"] = Array(\"iso2\" => \"CU\", \"name\" => \"Cuba, Republic of\");\n\t\t$country[\"CYP\"] = Array(\"iso2\" => \"CY\", \"name\" => \"Cyprus, Republic of\");\n\t\t$country[\"CZE\"] = Array(\"iso2\" => \"CZ\", \"name\" => \"Czech Republic\");\n\t\t$country[\"DNK\"] = Array(\"iso2\" => \"DK\", \"name\" => \"Denmark, Kingdom of\");\n\t\t$country[\"DJI\"] = Array(\"iso2\" => \"DJ\", \"name\" => \"Djibouti, Republic of\");\n\t\t$country[\"DMA\"] = Array(\"iso2\" => \"DM\", \"name\" => \"Dominica, Commonwealth of\");\n\t\t$country[\"DOM\"] = Array(\"iso2\" => \"DO\", \"name\" => \"Dominican Republic\");\n\t\t$country[\"ECU\"] = Array(\"iso2\" => \"EC\", \"name\" => \"Ecuador, Republic of\");\n\t\t$country[\"EGY\"] = Array(\"iso2\" => \"EG\", \"name\" => \"Egypt, Arab Republic of\");\n\t\t$country[\"SLV\"] = Array(\"iso2\" => \"SV\", \"name\" => \"El Salvador, Republic of\");\n\t\t$country[\"GNQ\"] = Array(\"iso2\" => \"GQ\", \"name\" => \"Equatorial Guinea, Republic of\");\n\t\t$country[\"ERI\"] = Array(\"iso2\" => \"ER\", \"name\" => \"Eritrea, State of\");\n\t\t$country[\"EST\"] = Array(\"iso2\" => \"EE\", \"name\" => \"Estonia, Republic of\");\n\t\t$country[\"ETH\"] = Array(\"iso2\" => \"ET\", \"name\" => \"Ethiopia, Federal Democratic R\");\n\t\t$country[\"FRO\"] = Array(\"iso2\" => \"FO\", \"name\" => \"Faroe Islands\");\n\t\t$country[\"FLK\"] = Array(\"iso2\" => \"FK\", \"name\" => \"Falkland Islands (Malvinas)\");\n\t\t$country[\"FJI\"] = Array(\"iso2\" => \"FJ\", \"name\" => \"Fiji, Republic of the Fiji Isl\");\n\t\t$country[\"FIN\"] = Array(\"iso2\" => \"FI\", \"name\" => \"Finland, Republic of\");\n\t\t$country[\"FRA\"] = Array(\"iso2\" => \"FR\", \"name\" => \"France, French Republic\");\n\t\t$country[\"GUF\"] = Array(\"iso2\" => \"GF\", \"name\" => \"French Guiana\");\n\t\t$country[\"PYF\"] = Array(\"iso2\" => \"PF\", \"name\" => \"French Polynesia\");\n\t\t$country[\"ATF\"] = Array(\"iso2\" => \"TF\", \"name\" => \"French Southern Territories\");\n\t\t$country[\"GAB\"] = Array(\"iso2\" => \"GA\", \"name\" => \"Gabon, Gabonese Republic\");\n\t\t$country[\"GMB\"] = Array(\"iso2\" => \"GM\", \"name\" => \"Gambia, Republic of the\");\n\t\t$country[\"GEO\"] = Array(\"iso2\" => \"GE\", \"name\" => \"Georgia\");\n\t\t$country[\"DEU\"] = Array(\"iso2\" => \"DE\", \"name\" => \"Germany, Federal Republic of\");\n\t\t$country[\"GHA\"] = Array(\"iso2\" => \"GH\", \"name\" => \"Ghana, Republic of\");\n\t\t$country[\"GIB\"] = Array(\"iso2\" => \"GI\", \"name\" => \"Gibraltar\");\n\t\t$country[\"GRC\"] = Array(\"iso2\" => \"GR\", \"name\" => \"Greece, Hellenic Republic\");\n\t\t$country[\"GRL\"] = Array(\"iso2\" => \"GL\", \"name\" => \"Greenland\");\n\t\t$country[\"GRD\"] = Array(\"iso2\" => \"GD\", \"name\" => \"Grenada\");\n\t\t$country[\"GLP\"] = Array(\"iso2\" => \"GP\", \"name\" => \"Guadeloupe\");\n\t\t$country[\"GUM\"] = Array(\"iso2\" => \"GU\", \"name\" => \"Guam\");\n\t\t$country[\"GTM\"] = Array(\"iso2\" => \"GT\", \"name\" => \"Guatemala, Republic of\");\n\t\t$country[\"GGY\"] = Array(\"iso2\" => \"GG\", \"name\" => \"Guernsey, Bailiwick of\");\n\t\t$country[\"GIN\"] = Array(\"iso2\" => \"GN\", \"name\" => \"Guinea, Republic of\");\n\t\t$country[\"GNB\"] = Array(\"iso2\" => \"GW\", \"name\" => \"Guinea-Bissau, Republic of\");\n\t\t$country[\"GUY\"] = Array(\"iso2\" => \"GY\", \"name\" => \"Guyana, Co-operative Republic \");\n\t\t$country[\"HTI\"] = Array(\"iso2\" => \"HT\", \"name\" => \"Haiti, Republic of\");\n\t\t$country[\"HMD\"] = Array(\"iso2\" => \"HM\", \"name\" => \"Heard Island and McDonald Isla\");\n\t\t$country[\"VAT\"] = Array(\"iso2\" => \"VA\", \"name\" => \"Holy See (Vatican City State)\");\n\t\t$country[\"HND\"] = Array(\"iso2\" => \"HN\", \"name\" => \"Honduras, Republic of\");\n\t\t$country[\"HKG\"] = Array(\"iso2\" => \"HK\", \"name\" => \"Hong Kong, Special Administrat\");\n\t\t$country[\"HUN\"] = Array(\"iso2\" => \"HU\", \"name\" => \"Hungary, Republic of\");\n\t\t$country[\"ISL\"] = Array(\"iso2\" => \"IS\", \"name\" => \"Iceland, Republic of\");\n\t\t$country[\"IND\"] = Array(\"iso2\" => \"IN\", \"name\" => \"India, Republic of\");\n\t\t$country[\"IDN\"] = Array(\"iso2\" => \"ID\", \"name\" => \"Indonesia, Republic of\");\n\t\t$country[\"IRN\"] = Array(\"iso2\" => \"IR\", \"name\" => \"Iran, Islamic Republic of\");\n\t\t$country[\"IRQ\"] = Array(\"iso2\" => \"IQ\", \"name\" => \"Iraq, Republic of\");\n\t\t$country[\"IRL\"] = Array(\"iso2\" => \"IE\", \"name\" => \"Ireland\");\n\t\t$country[\"IMN\"] = Array(\"iso2\" => \"IM\", \"name\" => \"Isle of Man\");\n\t\t$country[\"ISR\"] = Array(\"iso2\" => \"IL\", \"name\" => \"Israel, State of\");\n\t\t$country[\"ITA\"] = Array(\"iso2\" => \"IT\", \"name\" => \"Italy, Italian Republic\");\n\t\t$country[\"JAM\"] = Array(\"iso2\" => \"JM\", \"name\" => \"Jamaica\");\n\t\t$country[\"JPN\"] = Array(\"iso2\" => \"JP\", \"name\" => \"Japan\");\n\t\t$country[\"JEY\"] = Array(\"iso2\" => \"JE\", \"name\" => \"Jersey, Bailiwick of\");\n\t\t$country[\"JOR\"] = Array(\"iso2\" => \"JO\", \"name\" => \"Jordan, Hashemite Kingdom of\");\n\t\t$country[\"KAZ\"] = Array(\"iso2\" => \"KZ\", \"name\" => \"Kazakhstan, Republic of\");\n\t\t$country[\"KEN\"] = Array(\"iso2\" => \"KE\", \"name\" => \"Kenya, Republic of\");\n\t\t$country[\"KIR\"] = Array(\"iso2\" => \"KI\", \"name\" => \"Kiribati, Republic of\");\n\t\t$country[\"PRK\"] = Array(\"iso2\" => \"KP\", \"name\" => \"Korea, Democratic People's Rep\");\n\t\t$country[\"KOR\"] = Array(\"iso2\" => \"KR\", \"name\" => \"Korea, Republic of\");\n\t\t$country[\"KWT\"] = Array(\"iso2\" => \"KW\", \"name\" => \"Kuwait, State of\");\n\t\t$country[\"KGZ\"] = Array(\"iso2\" => \"KG\", \"name\" => \"Kyrgyz Republic\");\n\t\t$country[\"LAO\"] = Array(\"iso2\" => \"LA\", \"name\" => \"Lao People's Democratic Republ\");\n\t\t$country[\"LVA\"] = Array(\"iso2\" => \"LV\", \"name\" => \"Latvia, Republic of\");\n\t\t$country[\"LBN\"] = Array(\"iso2\" => \"LB\", \"name\" => \"Lebanon, Lebanese Republic\");\n\t\t$country[\"LSO\"] = Array(\"iso2\" => \"LS\", \"name\" => \"Lesotho, Kingdom of\");\n\t\t$country[\"LBR\"] = Array(\"iso2\" => \"LR\", \"name\" => \"Liberia, Republic of\");\n\t\t$country[\"LBY\"] = Array(\"iso2\" => \"LY\", \"name\" => \"Libyan Arab Jamahiriya\");\n\t\t$country[\"LIE\"] = Array(\"iso2\" => \"LI\", \"name\" => \"Liechtenstein, Principality of\");\n\t\t$country[\"LTU\"] = Array(\"iso2\" => \"LT\", \"name\" => \"Lithuania, Republic of\");\n\t\t$country[\"LUX\"] = Array(\"iso2\" => \"LU\", \"name\" => \"Luxembourg, Grand Duchy of\");\n\t\t$country[\"MAC\"] = Array(\"iso2\" => \"MO\", \"name\" => \"Macao, Special Administrative \");\n\t\t$country[\"MKD\"] = Array(\"iso2\" => \"MK\", \"name\" => \"Macedonia, the former Yugoslav\");\n\t\t$country[\"MDG\"] = Array(\"iso2\" => \"MG\", \"name\" => \"Madagascar, Republic of\");\n\t\t$country[\"MWI\"] = Array(\"iso2\" => \"MW\", \"name\" => \"Malawi, Republic of\");\n\t\t$country[\"MYS\"] = Array(\"iso2\" => \"MY\", \"name\" => \"Malaysia\");\n\t\t$country[\"MDV\"] = Array(\"iso2\" => \"MV\", \"name\" => \"Maldives, Republic of\");\n\t\t$country[\"MLI\"] = Array(\"iso2\" => \"ML\", \"name\" => \"Mali, Republic of\");\n\t\t$country[\"MLT\"] = Array(\"iso2\" => \"MT\", \"name\" => \"Malta, Republic of\");\n\t\t$country[\"MHL\"] = Array(\"iso2\" => \"MH\", \"name\" => \"Marshall Islands, Republic of \");\n\t\t$country[\"MTQ\"] = Array(\"iso2\" => \"MQ\", \"name\" => \"Martinique\");\n\t\t$country[\"MRT\"] = Array(\"iso2\" => \"MR\", \"name\" => \"Mauritania, Islamic Republic o\");\n\t\t$country[\"MUS\"] = Array(\"iso2\" => \"MU\", \"name\" => \"Mauritius, Republic of\");\n\t\t$country[\"MYT\"] = Array(\"iso2\" => \"YT\", \"name\" => \"Mayotte\");\n\t\t$country[\"MEX\"] = Array(\"iso2\" => \"MX\", \"name\" => \"Mexico, United Mexican States\");\n\t\t$country[\"FSM\"] = Array(\"iso2\" => \"FM\", \"name\" => \"Micronesia, Federated States o\");\n\t\t$country[\"MDA\"] = Array(\"iso2\" => \"MD\", \"name\" => \"Moldova, Republic of\");\n\t\t$country[\"MCO\"] = Array(\"iso2\" => \"MC\", \"name\" => \"Monaco, Principality of\");\n\t\t$country[\"MNG\"] = Array(\"iso2\" => \"MN\", \"name\" => \"Mongolia\");\n\t\t$country[\"MNE\"] = Array(\"iso2\" => \"ME\", \"name\" => \"Montenegro, Republic of\");\n\t\t$country[\"MSR\"] = Array(\"iso2\" => \"MS\", \"name\" => \"Montserrat\");\n\t\t$country[\"MAR\"] = Array(\"iso2\" => \"MA\", \"name\" => \"Morocco, Kingdom of\");\n\t\t$country[\"MOZ\"] = Array(\"iso2\" => \"MZ\", \"name\" => \"Mozambique, Republic of\");\n\t\t$country[\"MMR\"] = Array(\"iso2\" => \"MM\", \"name\" => \"Myanmar, Union of\");\n\t\t$country[\"NAM\"] = Array(\"iso2\" => \"NA\", \"name\" => \"Namibia, Republic of\");\n\t\t$country[\"NRU\"] = Array(\"iso2\" => \"NR\", \"name\" => \"Nauru, Republic of\");\n\t\t$country[\"NPL\"] = Array(\"iso2\" => \"NP\", \"name\" => \"Nepal, State of\");\n\t\t$country[\"ANT\"] = Array(\"iso2\" => \"AN\", \"name\" => \"Netherlands Antilles\");\n\t\t$country[\"NLD\"] = Array(\"iso2\" => \"NL\", \"name\" => \"Netherlands, Kingdom of the\");\n\t\t$country[\"NCL\"] = Array(\"iso2\" => \"NC\", \"name\" => \"New Caledonia\");\n\t\t$country[\"NZL\"] = Array(\"iso2\" => \"NZ\", \"name\" => \"New Zealand\");\n\t\t$country[\"NIC\"] = Array(\"iso2\" => \"NI\", \"name\" => \"Nicaragua, Republic of\");\n\t\t$country[\"NER\"] = Array(\"iso2\" => \"NE\", \"name\" => \"Niger, Republic of\");\n\t\t$country[\"NGA\"] = Array(\"iso2\" => \"NG\", \"name\" => \"Nigeria, Federal Republic of\");\n\t\t$country[\"NIU\"] = Array(\"iso2\" => \"NU\", \"name\" => \"Niue\");\n\t\t$country[\"NFK\"] = Array(\"iso2\" => \"NF\", \"name\" => \"Norfolk Island\");\n\t\t$country[\"MNP\"] = Array(\"iso2\" => \"MP\", \"name\" => \"Northern Mariana Islands, Comm\");\n\t\t$country[\"NOR\"] = Array(\"iso2\" => \"NO\", \"name\" => \"Norway, Kingdom of\");\n\t\t$country[\"OMN\"] = Array(\"iso2\" => \"OM\", \"name\" => \"Oman, Sultanate of\");\n\t\t$country[\"PAK\"] = Array(\"iso2\" => \"PK\", \"name\" => \"Pakistan, Islamic Republic of\");\n\t\t$country[\"PLW\"] = Array(\"iso2\" => \"PW\", \"name\" => \"Palau, Republic of\");\n\t\t$country[\"PSE\"] = Array(\"iso2\" => \"PS\", \"name\" => \"Palestinian Territory, Occupie\");\n\t\t$country[\"PAN\"] = Array(\"iso2\" => \"PA\", \"name\" => \"Panama, Republic of\");\n\t\t$country[\"PNG\"] = Array(\"iso2\" => \"PG\", \"name\" => \"Papua New Guinea, Independent \");\n\t\t$country[\"PRY\"] = Array(\"iso2\" => \"PY\", \"name\" => \"Paraguay, Republic of\");\n\t\t$country[\"PER\"] = Array(\"iso2\" => \"PE\", \"name\" => \"Peru, Republic of\");\n\t\t$country[\"PHL\"] = Array(\"iso2\" => \"PH\", \"name\" => \"Philippines, Republic of the\");\n\t\t$country[\"PCN\"] = Array(\"iso2\" => \"PN\", \"name\" => \"Pitcairn Islands\");\n\t\t$country[\"POL\"] = Array(\"iso2\" => \"PL\", \"name\" => \"Poland, Republic of\");\n\t\t$country[\"PRT\"] = Array(\"iso2\" => \"PT\", \"name\" => \"Portugal, Portuguese Republic\");\n\t\t$country[\"PRI\"] = Array(\"iso2\" => \"PR\", \"name\" => \"Puerto Rico, Commonwealth of\");\n\t\t$country[\"QAT\"] = Array(\"iso2\" => \"QA\", \"name\" => \"Qatar, State of\");\n\t\t$country[\"REU\"] = Array(\"iso2\" => \"RE\", \"name\" => \"Reunion\");\n\t\t$country[\"ROU\"] = Array(\"iso2\" => \"RO\", \"name\" => \"Romania\");\n\t\t$country[\"RUS\"] = Array(\"iso2\" => \"RU\", \"name\" => \"Russian Federation\");\n\t\t$country[\"RWA\"] = Array(\"iso2\" => \"RW\", \"name\" => \"Rwanda, Republic of\");\n\t\t$country[\"BLM\"] = Array(\"iso2\" => \"BL\", \"name\" => \"Saint Barthelemy\");\n\t\t$country[\"SHN\"] = Array(\"iso2\" => \"SH\", \"name\" => \"Saint Helena\");\n\t\t$country[\"KNA\"] = Array(\"iso2\" => \"KN\", \"name\" => \"Saint Kitts and Nevis, Federat\");\n\t\t$country[\"LCA\"] = Array(\"iso2\" => \"LC\", \"name\" => \"Saint Lucia\");\n\t\t$country[\"MAF\"] = Array(\"iso2\" => \"MF\", \"name\" => \"Saint Martin\");\n\t\t$country[\"SPM\"] = Array(\"iso2\" => \"PM\", \"name\" => \"Saint Pierre and Miquelon\");\n\t\t$country[\"VCT\"] = Array(\"iso2\" => \"VC\", \"name\" => \"Saint Vincent and the Grenadin\");\n\t\t$country[\"WSM\"] = Array(\"iso2\" => \"WS\", \"name\" => \"Samoa, Independent State of\");\n\t\t$country[\"SMR\"] = Array(\"iso2\" => \"SM\", \"name\" => \"San Marino, Republic of\");\n\t\t$country[\"STP\"] = Array(\"iso2\" => \"ST\", \"name\" => \"Sao Tome and Principe, Democra\");\n\t\t$country[\"SAU\"] = Array(\"iso2\" => \"SA\", \"name\" => \"Saudi Arabia, Kingdom of\");\n\t\t$country[\"SEN\"] = Array(\"iso2\" => \"SN\", \"name\" => \"Senegal, Republic of\");\n\t\t$country[\"SRB\"] = Array(\"iso2\" => \"RS\", \"name\" => \"Serbia, Republic of\");\n\t\t$country[\"SYC\"] = Array(\"iso2\" => \"SC\", \"name\" => \"Seychelles, Republic of\");\n\t\t$country[\"SLE\"] = Array(\"iso2\" => \"SL\", \"name\" => \"Sierra Leone, Republic of\");\n\t\t$country[\"SGP\"] = Array(\"iso2\" => \"SG\", \"name\" => \"Singapore, Republic of\");\n\t\t$country[\"SVK\"] = Array(\"iso2\" => \"SK\", \"name\" => \"Slovakia (Slovak Republic)\");\n\t\t$country[\"SVN\"] = Array(\"iso2\" => \"SI\", \"name\" => \"Slovenia, Republic of\");\n\t\t$country[\"SLB\"] = Array(\"iso2\" => \"SB\", \"name\" => \"Solomon Islands\");\n\t\t$country[\"SOM\"] = Array(\"iso2\" => \"SO\", \"name\" => \"Somalia, Somali Republic\");\n\t\t$country[\"ZAF\"] = Array(\"iso2\" => \"ZA\", \"name\" => \"South Africa, Republic of\");\n\t\t$country[\"SGS\"] = Array(\"iso2\" => \"GS\", \"name\" => \"South Georgia and the South Sa\");\n\t\t$country[\"ESP\"] = Array(\"iso2\" => \"ES\", \"name\" => \"Spain, Kingdom of\");\n\t\t$country[\"LKA\"] = Array(\"iso2\" => \"LK\", \"name\" => \"Sri Lanka, Democratic Socialis\");\n\t\t$country[\"SDN\"] = Array(\"iso2\" => \"SD\", \"name\" => \"Sudan, Republic of\");\n\t\t$country[\"SUR\"] = Array(\"iso2\" => \"SR\", \"name\" => \"Suriname, Republic of\");\n\t\t$country[\"SJM\"] = Array(\"iso2\" => \"SJ\", \"name\" => \"Svalbard & Jan Mayen Islands\");\n\t\t$country[\"SWZ\"] = Array(\"iso2\" => \"SZ\", \"name\" => \"Swaziland, Kingdom of\");\n\t\t$country[\"SWE\"] = Array(\"iso2\" => \"SE\", \"name\" => \"Sweden, Kingdom of\");\n\t\t$country[\"CHE\"] = Array(\"iso2\" => \"CH\", \"name\" => \"Switzerland, Swiss Confederati\");\n\t\t$country[\"SYR\"] = Array(\"iso2\" => \"SY\", \"name\" => \"Syrian Arab Republic\");\n\t\t$country[\"TWN\"] = Array(\"iso2\" => \"TW\", \"name\" => \"Taiwan\");\n\t\t$country[\"TJK\"] = Array(\"iso2\" => \"TJ\", \"name\" => \"Tajikistan, Republic of\");\n\t\t$country[\"TZA\"] = Array(\"iso2\" => \"TZ\", \"name\" => \"Tanzania, United Republic of\");\n\t\t$country[\"THA\"] = Array(\"iso2\" => \"TH\", \"name\" => \"Thailand, Kingdom of\");\n\t\t$country[\"TLS\"] = Array(\"iso2\" => \"TL\", \"name\" => \"Timor-Leste, Democratic Republ\");\n\t\t$country[\"TGO\"] = Array(\"iso2\" => \"TG\", \"name\" => \"Togo, Togolese Republic\");\n\t\t$country[\"TKL\"] = Array(\"iso2\" => \"TK\", \"name\" => \"Tokelau\");\n\t\t$country[\"TON\"] = Array(\"iso2\" => \"TO\", \"name\" => \"Tonga, Kingdom of\");\n\t\t$country[\"TTO\"] = Array(\"iso2\" => \"TT\", \"name\" => \"Trinidad and Tobago, Republic \");\n\t\t$country[\"TUN\"] = Array(\"iso2\" => \"TN\", \"name\" => \"Tunisia, Tunisian Republic\");\n\t\t$country[\"TUR\"] = Array(\"iso2\" => \"TR\", \"name\" => \"Turkey, Republic of\");\n\t\t$country[\"TKM\"] = Array(\"iso2\" => \"TM\", \"name\" => \"Turkmenistan\");\n\t\t$country[\"TCA\"] = Array(\"iso2\" => \"TC\", \"name\" => \"Turks and Caicos Islands\");\n\t\t$country[\"TUV\"] = Array(\"iso2\" => \"TV\", \"name\" => \"Tuvalu\");\n\t\t$country[\"UGA\"] = Array(\"iso2\" => \"UG\", \"name\" => \"Uganda, Republic of\");\n\t\t$country[\"UKR\"] = Array(\"iso2\" => \"UA\", \"name\" => \"Ukraine\");\n\t\t$country[\"ARE\"] = Array(\"iso2\" => \"AE\", \"name\" => \"United Arab Emirates\");\n\t\t$country[\"GBR\"] = Array(\"iso2\" => \"GB\", \"name\" => \"United Kingdom of Great Britain\");\n\t\t$country[\"USA\"] = Array(\"iso2\" => \"US\", \"name\" => \"United States of America\");\n\t\t$country[\"UMI\"] = Array(\"iso2\" => \"UM\", \"name\" => \"United States Minor Outlying I\");\n\t\t$country[\"VIR\"] = Array(\"iso2\" => \"VI\", \"name\" => \"United States Virgin Islands\");\n\t\t$country[\"URY\"] = Array(\"iso2\" => \"UY\", \"name\" => \"Uruguay, Eastern Republic of\");\n\t\t$country[\"UZB\"] = Array(\"iso2\" => \"UZ\", \"name\" => \"Uzbekistan, Republic of\");\n\t\t$country[\"VUT\"] = Array(\"iso2\" => \"VU\", \"name\" => \"Vanuatu, Republic of\");\n\t\t$country[\"VEN\"] = Array(\"iso2\" => \"VE\", \"name\" => \"Venezuela, Bolivarian Republic\");\n\t\t$country[\"VNM\"] = Array(\"iso2\" => \"VN\", \"name\" => \"Vietnam, Socialist Republic of\");\n\t\t$country[\"WLF\"] = Array(\"iso2\" => \"WF\", \"name\" => \"Wallis and Futuna\");\n\t\t$country[\"ESH\"] = Array(\"iso2\" => \"EH\", \"name\" => \"Western Sahara\");\n\t\t$country[\"YEM\"] = Array(\"iso2\" => \"YE\", \"name\" => \"Yemen\");\n\t\t$country[\"ZMB\"] = Array(\"iso2\" => \"ZM\", \"name\" => \"Zambia, Republic of\");\n\t\t$country[\"ZWE\"] = Array(\"iso2\" => \"ZW\", \"name\" => \"Zimbabwe, Republic of\");\n\t\t$country[\"0\"] = Array(\"iso2\" => \"0\", \"name\" => \"NO VALID COUNTRY\");\n\n\t\treturn $country;\n\t}", "function _country_get_predefined_list() {\n static $countries;\n\n if (isset($countries)) {\n return $countries;\n }\n $t = get_t();\n\n $countries = array(\n 'AD' => $t('Andorra'),\n 'AE' => $t('United Arab Emirates'),\n 'AF' => $t('Afghanistan'),\n 'AG' => $t('Antigua and Barbuda'),\n 'AI' => $t('Anguilla'),\n 'AL' => $t('Albania'),\n 'AM' => $t('Armenia'),\n 'AN' => $t('Netherlands Antilles'),\n 'AO' => $t('Angola'),\n 'AQ' => $t('Antarctica'),\n 'AR' => $t('Argentina'),\n 'AS' => $t('American Samoa'),\n 'AT' => $t('Austria'),\n 'AU' => $t('Australia'),\n 'AW' => $t('Aruba'),\n 'AX' => $t('Aland Islands'),\n 'AZ' => $t('Azerbaijan'),\n 'BA' => $t('Bosnia and Herzegovina'),\n 'BB' => $t('Barbados'),\n 'BD' => $t('Bangladesh'),\n 'BE' => $t('Belgium'),\n 'BF' => $t('Burkina Faso'),\n 'BG' => $t('Bulgaria'),\n 'BH' => $t('Bahrain'),\n 'BI' => $t('Burundi'),\n 'BJ' => $t('Benin'),\n 'BL' => $t('Saint Barthélemy'),\n 'BM' => $t('Bermuda'),\n 'BN' => $t('Brunei'),\n 'BO' => $t('Bolivia'),\n 'BR' => $t('Brazil'),\n 'BS' => $t('Bahamas'),\n 'BT' => $t('Bhutan'),\n 'BV' => $t('Bouvet Island'),\n 'BW' => $t('Botswana'),\n 'BY' => $t('Belarus'),\n 'BZ' => $t('Belize'),\n 'CA' => $t('Canada'),\n 'CC' => $t('Cocos (Keeling) Islands'),\n 'CD' => $t('Congo (Kinshasa)'),\n 'CF' => $t('Central African Republic'),\n 'CG' => $t('Congo (Brazzaville)'),\n 'CH' => $t('Switzerland'),\n 'CI' => $t('Ivory Coast'),\n 'CK' => $t('Cook Islands'),\n 'CL' => $t('Chile'),\n 'CM' => $t('Cameroon'),\n 'CN' => $t('China'),\n 'CO' => $t('Colombia'),\n 'CR' => $t('Costa Rica'),\n 'CU' => $t('Cuba'),\n 'CV' => $t('Cape Verde'),\n 'CX' => $t('Christmas Island'),\n 'CY' => $t('Cyprus'),\n 'CZ' => $t('Czech Republic'),\n 'DE' => $t('Germany'),\n 'DJ' => $t('Djibouti'),\n 'DK' => $t('Denmark'),\n 'DM' => $t('Dominica'),\n 'DO' => $t('Dominican Republic'),\n 'DZ' => $t('Algeria'),\n 'EC' => $t('Ecuador'),\n 'EE' => $t('Estonia'),\n 'EG' => $t('Egypt'),\n 'EH' => $t('Western Sahara'),\n 'ER' => $t('Eritrea'),\n 'ES' => $t('Spain'),\n 'ET' => $t('Ethiopia'),\n 'FI' => $t('Finland'),\n 'FJ' => $t('Fiji'),\n 'FK' => $t('Falkland Islands'),\n 'FM' => $t('Micronesia'),\n 'FO' => $t('Faroe Islands'),\n 'FR' => $t('France'),\n 'GA' => $t('Gabon'),\n 'GB' => $t('United Kingdom'),\n 'GD' => $t('Grenada'),\n 'GE' => $t('Georgia'),\n 'GF' => $t('French Guiana'),\n 'GG' => $t('Guernsey'),\n 'GH' => $t('Ghana'),\n 'GI' => $t('Gibraltar'),\n 'GL' => $t('Greenland'),\n 'GM' => $t('Gambia'),\n 'GN' => $t('Guinea'),\n 'GP' => $t('Guadeloupe'),\n 'GQ' => $t('Equatorial Guinea'),\n 'GR' => $t('Greece'),\n 'GS' => $t('South Georgia and the South Sandwich Islands'),\n 'GT' => $t('Guatemala'),\n 'GU' => $t('Guam'),\n 'GW' => $t('Guinea-Bissau'),\n 'GY' => $t('Guyana'),\n 'HK' => $t('Hong Kong S.A.R., China'),\n 'HM' => $t('Heard Island and McDonald Islands'),\n 'HN' => $t('Honduras'),\n 'HR' => $t('Croatia'),\n 'HT' => $t('Haiti'),\n 'HU' => $t('Hungary'),\n 'ID' => $t('Indonesia'),\n 'IE' => $t('Ireland'),\n 'IL' => $t('Israel'),\n 'IM' => $t('Isle of Man'),\n 'IN' => $t('India'),\n 'IO' => $t('British Indian Ocean Territory'),\n 'IQ' => $t('Iraq'),\n 'IR' => $t('Iran'),\n 'IS' => $t('Iceland'),\n 'IT' => $t('Italy'),\n 'JE' => $t('Jersey'),\n 'JM' => $t('Jamaica'),\n 'JO' => $t('Jordan'),\n 'JP' => $t('Japan'),\n 'KE' => $t('Kenya'),\n 'KG' => $t('Kyrgyzstan'),\n 'KH' => $t('Cambodia'),\n 'KI' => $t('Kiribati'),\n 'KM' => $t('Comoros'),\n 'KN' => $t('Saint Kitts and Nevis'),\n 'KP' => $t('North Korea'),\n 'KR' => $t('South Korea'),\n 'KW' => $t('Kuwait'),\n 'KY' => $t('Cayman Islands'),\n 'KZ' => $t('Kazakhstan'),\n 'LA' => $t('Laos'),\n 'LB' => $t('Lebanon'),\n 'LC' => $t('Saint Lucia'),\n 'LI' => $t('Liechtenstein'),\n 'LK' => $t('Sri Lanka'),\n 'LR' => $t('Liberia'),\n 'LS' => $t('Lesotho'),\n 'LT' => $t('Lithuania'),\n 'LU' => $t('Luxembourg'),\n 'LV' => $t('Latvia'),\n 'LY' => $t('Libya'),\n 'MA' => $t('Morocco'),\n 'MC' => $t('Monaco'),\n 'MD' => $t('Moldova'),\n 'ME' => $t('Montenegro'),\n 'MF' => $t('Saint Martin (French part)'),\n 'MG' => $t('Madagascar'),\n 'MH' => $t('Marshall Islands'),\n 'MK' => $t('Macedonia'),\n 'ML' => $t('Mali'),\n 'MM' => $t('Myanmar'),\n 'MN' => $t('Mongolia'),\n 'MO' => $t('Macao S.A.R., China'),\n 'MP' => $t('Northern Mariana Islands'),\n 'MQ' => $t('Martinique'),\n 'MR' => $t('Mauritania'),\n 'MS' => $t('Montserrat'),\n 'MT' => $t('Malta'),\n 'MU' => $t('Mauritius'),\n 'MV' => $t('Maldives'),\n 'MW' => $t('Malawi'),\n 'MX' => $t('Mexico'),\n 'MY' => $t('Malaysia'),\n 'MZ' => $t('Mozambique'),\n 'NA' => $t('Namibia'),\n 'NC' => $t('New Caledonia'),\n 'NE' => $t('Niger'),\n 'NF' => $t('Norfolk Island'),\n 'NG' => $t('Nigeria'),\n 'NI' => $t('Nicaragua'),\n 'NL' => $t('Netherlands'),\n 'NO' => $t('Norway'),\n 'NP' => $t('Nepal'),\n 'NR' => $t('Nauru'),\n 'NU' => $t('Niue'),\n 'NZ' => $t('New Zealand'),\n 'OM' => $t('Oman'),\n 'PA' => $t('Panama'),\n 'PE' => $t('Peru'),\n 'PF' => $t('French Polynesia'),\n 'PG' => $t('Papua New Guinea'),\n 'PH' => $t('Philippines'),\n 'PK' => $t('Pakistan'),\n 'PL' => $t('Poland'),\n 'PM' => $t('Saint Pierre and Miquelon'),\n 'PN' => $t('Pitcairn'),\n 'PR' => $t('Puerto Rico'),\n 'PS' => $t('Palestinian Territory'),\n 'PT' => $t('Portugal'),\n 'PW' => $t('Palau'),\n 'PY' => $t('Paraguay'),\n 'QA' => $t('Qatar'),\n 'RE' => $t('Reunion'),\n 'RO' => $t('Romania'),\n 'RS' => $t('Serbia'),\n 'RU' => $t('Russia'),\n 'RW' => $t('Rwanda'),\n 'SA' => $t('Saudi Arabia'),\n 'SB' => $t('Solomon Islands'),\n 'SC' => $t('Seychelles'),\n 'SD' => $t('Sudan'),\n 'SE' => $t('Sweden'),\n 'SG' => $t('Singapore'),\n 'SH' => $t('Saint Helena'),\n 'SI' => $t('Slovenia'),\n 'SJ' => $t('Svalbard and Jan Mayen'),\n 'SK' => $t('Slovakia'),\n 'SL' => $t('Sierra Leone'),\n 'SM' => $t('San Marino'),\n 'SN' => $t('Senegal'),\n 'SO' => $t('Somalia'),\n 'SR' => $t('Suriname'),\n 'ST' => $t('Sao Tome and Principe'),\n 'SV' => $t('El Salvador'),\n 'SY' => $t('Syria'),\n 'SZ' => $t('Swaziland'),\n 'TC' => $t('Turks and Caicos Islands'),\n 'TD' => $t('Chad'),\n 'TF' => $t('French Southern Territories'),\n 'TG' => $t('Togo'),\n 'TH' => $t('Thailand'),\n 'TJ' => $t('Tajikistan'),\n 'TK' => $t('Tokelau'),\n 'TL' => $t('East Timor'),\n 'TM' => $t('Turkmenistan'),\n 'TN' => $t('Tunisia'),\n 'TO' => $t('Tonga'),\n 'TR' => $t('Turkey'),\n 'TT' => $t('Trinidad and Tobago'),\n 'TV' => $t('Tuvalu'),\n 'TW' => $t('Taiwan'),\n 'TZ' => $t('Tanzania'),\n 'UA' => $t('Ukraine'),\n 'UG' => $t('Uganda'),\n 'UM' => $t('United States Minor Outlying Islands'),\n 'US' => $t('United States'),\n 'UY' => $t('Uruguay'),\n 'UZ' => $t('Uzbekistan'),\n 'VA' => $t('Vatican'),\n 'VC' => $t('Saint Vincent and the Grenadines'),\n 'VE' => $t('Venezuela'),\n 'VG' => $t('British Virgin Islands'),\n 'VI' => $t('U.S. Virgin Islands'),\n 'VN' => $t('Vietnam'),\n 'VU' => $t('Vanuatu'),\n 'WF' => $t('Wallis and Futuna'),\n 'WS' => $t('Samoa'),\n 'YE' => $t('Yemen'),\n 'YT' => $t('Mayotte'),\n 'ZA' => $t('South Africa'),\n 'ZM' => $t('Zambia'),\n 'ZW' => $t('Zimbabwe'),\n );\n\n // Sort the list.\n natcasesort($countries);\n\n return $countries;\n}", "public function countryList(){\n $response['status'] = \"false\"; \n $response['message'] = \"Invalid request.\"; \n \n $country = Country::getCountries();\n if(!empty($country)){\n $response['status'] = \"true\"; \n $response['message'] = \"Country data.\"; \n $response['data'] = $country; \n }\n $this->response($response);\n \n }", "function LocationDropdownList()\n\t{\t$loc_list = array();\n\t\t\n\t\tif ($locations = $this->GetLocations())\n\t\t{\tforeach ($locations as $location)\n\t\t\t{\t$loc_list[$location->id] = $location->details[\"loctitle\"];\n\t\t\t}\n\t\t}\n\t\t//print_r($this);\n\t\treturn $loc_list;\n\t}", "function get_country_list()\n\t{\n\t\t$query = \"SELECT `id`, `country` FROM `countries` ORDER BY CASE WHEN `id` = '\".OTHER_COUNTRY.\"' THEN 1 ELSE 0 END, `country`\";\n\t\t$result = $this->db->query($query);\n\t\tif ($result->num_rows() > 0 ) \n\t\t\treturn $result->result();\n\t\treturn false;\n\t}", "public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }", "function listCountryOptions()\n{\n $countries = array(\"Afghanistan\", \"Albania\", \"Algeria\", \"American Samoa\", \"Andorra\", \"Angola\", \"Anguilla\", \"Antarctica\", \"Antigua and Barbuda\", \"Argentina\", \"Armenia\", \"Aruba\", \"Australia\", \"Austria\", \"Azerbaijan\", \"Bahamas\", \"Bahrain\", \"Bangladesh\", \"Barbados\", \"Belarus\", \"Belgium\", \"Belize\", \"Benin\", \"Bermuda\", \"Bhutan\", \"Bolivia\", \"Bosnia and Herzegowina\", \"Botswana\", \"Bouvet Island\", \"Brazil\", \"British Indian Ocean Territory\", \"Brunei Darussalam\", \"Bulgaria\", \"Burkina Faso\", \"Burundi\", \"Cambodia\", \"Cameroon\", \"Canada\", \"Cape Verde\", \"Cayman Islands\", \"Central African Republic\", \"Chad\", \"Chile\", \"China\", \"Christmas Island\", \"Cocos (Keeling) Islands\", \"Colombia\", \"Comoros\", \"Congo\", \"Congo, the Democratic Republic of the\", \"Cook Islands\", \"Costa Rica\", \"Cote d'Ivoire\", \"Croatia (Hrvatska)\", \"Cuba\", \"Cyprus\", \"Czech Republic\", \"Denmark\", \"Djibouti\", \"Dominica\", \"Dominican Republic\", \"East Timor\", \"Ecuador\", \"Egypt\", \"El Salvador\", \"Equatorial Guinea\", \"Eritrea\", \"Estonia\", \"Ethiopia\", \"Falkland Islands (Malvinas)\", \"Faroe Islands\", \"Fiji\", \"Finland\", \"France\", \"France Metropolitan\", \"French Guiana\", \"French Polynesia\", \"French Southern Territories\", \"Gabon\", \"Gambia\", \"Georgia\", \"Germany\", \"Ghana\", \"Gibraltar\", \"Greece\", \"Greenland\", \"Grenada\", \"Guadeloupe\", \"Guam\", \"Guatemala\", \"Guinea\", \"Guinea-Bissau\", \"Guyana\", \"Haiti\", \"Heard and Mc Donald Islands\", \"Holy See (Vatican City State)\", \"Honduras\", \"Hong Kong\", \"Hungary\", \"Iceland\", \"India\", \"Indonesia\", \"Iran (Islamic Republic of)\", \"Iraq\", \"Ireland\", \"Israel\", \"Italy\", \"Jamaica\", \"Japan\", \"Jordan\", \"Kazakhstan\", \"Kenya\", \"Kiribati\", \"Korea, Democratic People's Republic of\", \"Korea, Republic of\", \"Kuwait\", \"Kyrgyzstan\", \"Lao, People's Democratic Republic\", \"Latvia\", \"Lebanon\", \"Lesotho\", \"Liberia\", \"Libyan Arab Jamahiriya\", \"Liechtenstein\", \"Lithuania\", \"Luxembourg\", \"Macau\", \"Macedonia, The Former Yugoslav Republic of\", \"Madagascar\", \"Malawi\", \"Malaysia\", \"Maldives\", \"Mali\", \"Malta\", \"Marshall Islands\", \"Martinique\", \"Mauritania\", \"Mauritius\", \"Mayotte\", \"Mexico\", \"Micronesia, Federated States of\", \"Moldova, Republic of\", \"Monaco\", \"Mongolia\", \"Montserrat\", \"Morocco\", \"Mozambique\", \"Myanmar\", \"Namibia\", \"Nauru\", \"Nepal\", \"Netherlands\", \"Netherlands Antilles\", \"New Caledonia\", \"New Zealand\", \"Nicaragua\", \"Niger\", \"Nigeria\", \"Niue\", \"Norfolk Island\", \"Northern Mariana Islands\", \"Norway\", \"Oman\", \"Pakistan\", \"Palau\", \"Panama\", \"Papua New Guinea\", \"Paraguay\", \"Peru\", \"Philippines\", \"Pitcairn\", \"Poland\", \"Portugal\", \"Puerto Rico\", \"Qatar\", \"Reunion\", \"Romania\", \"Russian Federation\", \"Rwanda\", \"Saint Kitts and Nevis\", \"Saint Lucia\", \"Saint Vincent and the Grenadines\", \"Samoa\", \"San Marino\", \"Sao Tome and Principe\", \"Saudi Arabia\", \"Senegal\", \"Seychelles\", \"Sierra Leone\", \"Singapore\", \"Slovakia (Slovak Republic)\", \"Slovenia\", \"Solomon Islands\", \"Somalia\", \"South Africa\", \"South Georgia and the South Sandwich Islands\", \"Spain\", \"Sri Lanka\", \"St. Helena\", \"St. Pierre and Miquelon\", \"Sudan\", \"Suriname\", \"Svalbard and Jan Mayen Islands\", \"Swaziland\", \"Sweden\", \"Switzerland\", \"Syrian Arab Republic\", \"Taiwan, Province of China\", \"Tajikistan\", \"Tanzania, United Republic of\", \"Thailand\", \"Togo\", \"Tokelau\", \"Tonga\", \"Trinidad and Tobago\", \"Tunisia\", \"Turkey\", \"Turkmenistan\", \"Turks and Caicos Islands\", \"Tuvalu\", \"Uganda\", \"Ukraine\", \"United Arab Emirates\", \"United Kingdom\", \"United States\", \"United States Minor Outlying Islands\", \"Uruguay\", \"Uzbekistan\", \"Vanuatu\", \"Venezuela\", \"Vietnam\", \"Virgin Islands (British)\", \"Virgin Islands (U.S.)\", \"Wallis and Futuna Islands\", \"Western Sahara\", \"Yemen\", \"Yugoslavia\", \"Zambia\", \"Zimbabwe\");\n foreach($countries as $country)\n {\n echo \"<option class='option' value='$country'>$country</option>\";\n }\n}", "private function allCountries()\n {\n $countries = [];\n $isos = $this->countryIso();\n foreach ($isos as $iso) {\n $path = __DIR__ . '/config/geography/' . $iso . '.php';\n $countries[$iso] = require $path;\n }\n\n return $countries;\n }", "public function countryOptionList();", "protected function getCountries() {\n\t\t$countries = $this->staticCountryRepository->findAll();\n\t\t$countryNames = array();\n\t\t/** @var \\HDNET\\Profession\\Domain\\Model\\StaticCountry $country */\n\t\tforeach ($countries as $country) {\n\t\t\t$countryNames[] .= $country->getShortNameDE();\n\t\t}\n\t\tasort($countryNames);\n\t\treturn $countryNames;\n\t}", "public function getCountrylist()\n {\n $cachePool = new FilesystemAdapter('', 0, \"cache\");\n \n if ($cachePool->hasItem('countries')) {\n $countries = $cachePool->getItem('countries')->get();\n } else {\n $countries = $this->client->request(\n 'GET',\n 'https://kayaposoft.com/enrico/json/v2.0?action=getSupportedCountries'\n )->toArray();\n $countriesCache = $cachePool->getItem('countries');\n \n if (!$countriesCache->isHit()) {\n $countriesCache->set($countries);\n $countriesCache->expiresAfter(60*60*24);\n $cachePool->save($countriesCache);\n }\n }\n\n return $countries;\n }", "protected function operatingCountries()\n {\n return OperatingCountry::all();\n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countriesRepository = $em->getRepository('ShopBundle:Countries');\n\n $countryList = $countriesRepository->findBy(\n array(),\n array('country' => 'ASC')\n );\n\n return array(\n 'countryList' => $countryList,\n );\n }", "public function getCountryList()\n {\n $countryList=array(\n 'BG'=>__('Bulgaria')\n 'DE'=>__('Germany'),\n 'GB'=>__('Great Britain'),\n );\n\n return $countryList;\n }", "public function getCountries() {\n $dql = \"SELECT c from Country c\n ORDER BY c.name\";\n $countries = $this->em\n ->createQuery($dql)\n ->getResult();\n return $countries;\n }", "public function getCountryList()\r\n {\r\n return $this->admin->sGetCountryList();\r\n }", "public function locations()\n {\n $locations = Locations::with('Countries:name')->get();\n // dd($locations);\n\n foreach ($locations as $location) {\n $sublocation = Locations::where('location_id', $location->sublocation_id)->get();\n $location['sublocations'] = $sublocation;\n }\n return view('setup.location.locations', compact('locations', 'sublocation'));\n }", "public static function getCountries()\n {\n return self::$countryList;\n }", "public function actionCountries()\n {\n $salys = Yii::$app->db_prod->createCommand(\"SELECT * FROM salys\")->queryAll();\n foreach ($salys as $salis) {\n $city = new City([\n 'name' => $salis['pavadinimas_lt'],\n 'ansi_name' => $salis['pavadinimas_lt'],\n 'alt_name' => $this->formatCountryAltName($salis),\n 'latitude' => $salis['latitude'],\n 'longitude' => $salis['longitude'],\n 'country_code' => strtoupper($salis['kodas']),\n 'population' => null,\n 'elevation' => null,\n 'timezone' => null,\n 'modification_date' => null,\n ]);\n $city->save();\n }\n\n Cities::addCountries();\n }", "public static function getCountries()\n\t{\n\t\t# MAX ID is 314 atm\n\t\treturn array(\n\t//\t\t'0' => array('Unknown Country', 'eng', '--', '--'),\n\t//\t\t\"666\" => array('Local Area Network', 'eng', '--', '--'),\n\t//\t\t'305' => array('Abkhazia', ''),\n\t//\t\t'306' => array('Akrotiri and Dhekelia', ),\n\t\t\t'100' => array('Afghanistan', 'per:pas', 'as', 'AF', 29121286),\n\t\t\t'301' => array('Aland Islands', 'swe', 'eu', 'AX', 0),\n\t\t\t'69' => array('Albania', 'alb', 'eu', 'AL', 2986952),\n\t\t\t'307' => array('Alderney', 'eng:fre', 'eu', 'GG', 0),\n\t\t\t'79' => array('Algeria', 'ara:ama:fre', 'af', 'DZ', 34586184),\n\t\t\t'101' => array('American Samoa', 'eng:sam', 'au', 'AS', 66432),\n\t\t\t'71' => array('Andorra', 'cat', 'eu', 'AD', 84525),\n\t\t\t'102' => array('Angola', 'por', 'af', 'AO', 13068161),\n\t\t\t'103' => array('Anguilla', 'eng', 'ma', 'AI', 14766),\n\t\t\t'104' => array('Antarctica', 'eng', 'an', 'AQ', 0),\n\t\t\t'105' => array('Antigua And Barbuda', 'eng', 'ma', 'AG', 86754),\n\t\t\t'29' => array('Argentina', 'spa', 'sa', 'AR', 41343201),\n\t\t\t'36' => array('Armenia', 'arm', 'as', 'AM', 2966802),\n\t\t\t'106' => array('Aruba', 'dut', 'ma', 'AW', 104589),\n\t\t\t'308' => array('Ascension Island', 'eng', 'am', 'AC', 0),\n\t\t\t'26' => array('Australia', 'eng', 'au', 'AU', 21515754),\n\t\t\t'22' => array('Austria', 'ger', 'eu', 'AT', 8214160),\n\t\t\t'46' => array('Azerbaijan', 'aze', 'as', 'AZ', 8303512),\n\t\t\t'107' => array('Bahamas', 'eng', 'ma', 'BS', 310426),\n\t\t\t'108' => array('Bahrain', 'ara', 'as', 'BH', 738004),\n\t\t\t'75' => array('Bangladesh', 'ben', 'as', 'BD', 156118464),\n\t\t\t'109' => array('Barbados', 'eng:baj', 'ma', 'BB', 285653),\n\t\t\t'110' => array('Belarus', 'rus:bel', 'eu', 'BY', 9612632),\n\t\t\t'23' => array('Belgium', 'fre:ger:dut', 'eu', 'BE', 10423493),\n\t\t\t'111' => array('Belize', 'eng:spa', 'ma', 'BZ', 314522),\n\t\t\t'112' => array('Benin', 'fre', 'af', 'BJ', 9056010),\n\t\t\t'113' => array('Bermuda', 'eng', 'ma', 'BM', 68265),\n\t\t\t'114' => array('Bhutan', 'dzo', 'as', 'BT', 699847),\n\t\t\t'115' => array('Bolivia', 'spa:que:aym', 'sa', 'BO', 9947418),\n\t\t\t'82' => array('Bosnia Herzegovina', 'bos:ser:cro', 'eu', 'BA', 4621598),\n\t\t\t'116' => array('Botswana', 'eng:set', 'af', 'BW', 2029307),\n\t\t\t'117' => array('Bouvet Island', 'eng', 'sa', 'BV', 0),\n\t\t\t'38' => array('Brazil', 'por', 'sa', 'BR', 201103330),\n\t\t\t'118' => array('British Indian Ocean Territory', 'eng', 'au', 'IO', 0),\n\t\t\t'119' => array('Brunei Darussalam', 'mal:bru', 'as', 'BN', 395027),\n\t\t\t'37' => array('Bulgaria', 'bul', 'eu', 'BG', 7148785),\n\t\t\t'120' => array('Burkina Faso', 'fre:ind', 'af', 'BF', 16241811),\n\t\t\t'121' => array('Burundi', 'kir:fre:swa', 'af', 'BI', 9863117),\n\t\t\t'122' => array('Cambodia', 'khm', 'as', 'KH', 14453680),\n\t\t\t'123' => array('Cameroon', 'fre:eng', 'af', 'CM', 19294149),\n\t\t\t'19' => array('Canada', 'eng:fre', 'na', 'CA', 33759742),\n\t\t\t'124' => array('Cape Verde', 'por', 'af', 'CV', 508659),\n\t\t\t'125' => array('Cayman Islands', 'eng', 'ma', 'KY', 50209),\n\t\t\t'126' => array('Central African Republic', 'fre:san', 'af', 'CF', 4844927),\n\t\t\t'127' => array('Chad', 'fre:ara', 'af', 'TD', 10543464),\n\t\t\t'63' => array('Chile', 'spa', 'sa', 'CL', 16746491),\n\t\t\t'47' => array('China', 'chi', 'as', 'CN', 1330141295),\n\t\t\t'128' => array('Christmas Islands', 'eng', 'au', 'CX', 1402),\n\t\t\t'129' => array('Cocos (Keeling) Islands', 'eng', 'au', 'CC', 596),\n\t\t\t'31' => array('Colombia', 'spa', 'sa', 'CO', 44205293),\n\t\t\t'130' => array('Comoros', 'ara:fre', 'af', 'KM', 773407),\n\t\t\t'131' => array('Congo', 'fre', 'af', 'CG', 4125916),\n\t\t\t'132' => array('Congo, The Democratic Republic Of The', 'fre:swa:lin:kon:tsh', 'af', 'CD', 70916439),\n\t\t\t'133' => array('Cook Islands', 'eng:mao', 'au', 'CK', 11488),\n\t\t\t'83' => array('Costa Rica', 'spa', 'ma', 'CR', 4516220),\n\t\t\t'134' => array('Côte d’Ivoire', 'fre', 'af', 'CI', 0),\n\t\t\t'48' => array('Croatia', 'cro', 'eu', 'HR', 4486881),\n\t\t\t'62' => array('Cuba', 'spa', 'ma', 'CU', 11477459),\n\t\t\t'76' => array('Cyprus', 'gre:tur', 'eu', 'CY', 1102677),\n\t\t\t'20' => array('Czech Republic', 'cze', 'eu', 'CZ', 10201707),\n\t\t\t'21' => array('Denmark', 'dan', 'eu', 'DK', 5515575),\n\t\t\t'135' => array('Djibouti', 'ara:fre:afa:som', 'af', 'DJ', 740528),\n\t\t\t'136' => array('Dominica', 'eng', 'ma', 'DM', 72813),\n\t\t\t'60' => array('Dominican Republic', 'spa', 'ma', 'DO', 9823821),\n\t\t\t'309' => array('East Timor', 'tet:por:inn:eng', 'as', 'TL', 1154625),\n\t\t\t'77' => array('Ecuador', 'spa', 'sa', 'EC', 14790608),\n\t\t\t'14' => array('Egypt', 'ara', 'af', 'EG', 80471869),\n\t\t\t'137' => array('El Salvador', 'spa', 'ma', 'SV', 6052064),\n\t\t\t'138' => array('Equatorial Guinea', 'spa:fre:por:fan:bub:ann', 'af', 'GQ', 650702),\n\t\t\t'139' => array('Eritrea', 'ara:tig', 'af', 'ER', 5792984),\n\t\t\t'140' => array('Estonia', 'est', 'eu', 'EE', 1291170),\n\t\t\t'141' => array('Ethiopia', 'amh', 'af', 'ET', 88013491),\n\t\t\t'142' => array('Falkland Islands (Malvinas)', 'eng', 'sa', 'FK', 3140),\n\t\t\t'143' => array('Faroe Islands', 'far:dan', 'eu', 'FO', 49057),\n\t\t\t'144' => array('Fiji', 'eng:bau:hit', 'au', 'FJ', 875983),\n\t\t\t'15' => array('Finland', 'fin:swe', 'eu', 'FI', 5255068),\n\t\t\t'16' => array('France', 'fre', 'eu', 'FR', 64768389),\n\t\t\t'146' => array('French Guiana', 'fre', 'sa', 'GF', 0),\n\t\t\t'147' => array('French Polynesia', 'fre:tah', 'au', 'PF', 291000),\n\t\t\t'148' => array('French Southern Territories', 'fre', 'an', 'TF', 0),\n\t\t\t'149' => array('Gabon', 'fre', 'af', 'GA', 1545255),\n\t\t\t'150' => array('Gambia', 'eng', 'af', 'GM', 1824158),\n\t\t\t'151' => array('Georgia', 'geo', 'eu', 'GE', 4600825),\n\t\t\t'17' => array('Germany', 'ger', 'eu', 'DE', 82282988),\n\t\t\t'152' => array('Ghana', 'eng', 'af', 'GH', 24339838),\n\t\t\t'153' => array('Gibraltar', 'eng:spa', 'eu', 'GI', 28877),\n\t\t\t'44' => array('Greece', 'gre', 'eu', 'GR', 10749943),\n\t\t\t'154' => array('Greenland', 'grl:dan', 'na', 'GL', 57637),\n\t\t\t'155' => array('Grenada', 'eng', 'ma', 'GD', 107818),\n\t\t\t'156' => array('Guadeloupe', 'fre', 'ma', 'GP', 0),\n\t\t\t'157' => array('Guam', 'eng:cha', 'au', 'GU', 0),\n\t\t\t'18' => array('Guatemala', 'spa', 'ma', 'GT', 13550440),\n\t\t\t'310' => array('Guernsey', 'eng:fre', 'eu', 'GG', 64775),\n\t\t\t'158' => array('Guinea', 'fre:cri', 'af', 'GN', 10324025),\n\t\t\t'159' => array('Guinea-Bissau', 'por:cri', 'af', 'GW', 1565126),\n\t\t\t'160' => array('Guyana', 'eng:hin', 'sa', 'GY', 748486),\n\t\t\t'161' => array('Haiti', 'fre:hai', 'ma', 'HT', 9648924),\n\t//\t\t'162' => array('Heard And McDonald Islands', 'HM),\n\t\t\t'163' => array('Holy See (Vatican City State)', 'ita', 'eu', 'VA', 0),\n\t\t\t'66' => array('Honduras', 'spa', 'ma', 'HN', 7989415),\n\t\t\t'164' => array('Hong Kong', 'chi:eng', 'as', 'HK', 7089705),\n\t\t\t'9' => array('Hungary', 'hun', 'eu', 'HU', 9992339),\n\t\t\t'10' => array('Iceland', 'ice', 'eu', 'IS', 308910),\n\t\t\t'33' => array('India', 'hin:eng', 'as', 'IN', 1173108018),\n\t\t\t'165' => array('Indonesia', 'inn', 'as', 'ID', 242968342),\n\t\t\t'55' => array('Iran', 'per:kur', 'as', 'IR', 76923300),\n\t\t\t'166' => array('Iraq', 'ara:kur', 'as', 'IQ', 29671605),\n\t\t\t'11' => array('Ireland', 'iri:eng', 'eu', 'IE', 4622917),\n\t\t\t'304' => array('Isle of Man', 'max:eng', 'eu', 'IM', 83859),\n\t\t\t'35' => array('Israel', 'heb:ara', 'as', 'IL', 7353985),\n\t\t\t'12' => array('Italy', 'ita', 'eu', 'IT', 58090681),\n\t\t\t'56' => array('Jamaica', 'eng', 'ma', 'JM', 2847232),\n\t\t\t'13' => array('Japan', 'jap', 'as', 'JP', 126804433),\n\t\t\t'303' => array('Jersey', 'eng:fre', 'eu', 'JE', 93363),\n\t\t\t'167' => array('Jordan', 'ara:eng', 'as', 'JO', 6407085),\n\t\t\t'168' => array('Kazakhstan', 'kaz:rus', 'as', 'KZ', 15460484),\n\t\t\t'169' => array('Kenya', 'swa:eng', 'af', 'KE', 40046566),\n\t\t\t'170' => array('Kiribati', 'eng:gil', 'au', 'KI', 99482),\n\t\t\t'171' => array('Korea, Democratic People\\'s Republic Of', 'kor', 'as', 'KP', 22757275),\n\t\t\t'172' => array('Korea, Republic Of', 'kor', 'as', 'KR', 48636068),\n\t\t\t'311' => array('Kosovo', 'alb:ser', 'eu', 'RS', 1815048),\n\t\t\t'173' => array('Kuwait', 'ara', 'as', 'KW', 2789132),\n\t\t\t'174' => array('Kyrgyzstan', 'kyr:rus', 'as', 'KG', 5508626),\n\t\t\t'175' => array('Lao People\\'s Democratic Republic', 'lao', 'as', 'LA', 6368162),\n\t\t\t'28' => array('Latvia', 'lat', 'eu', 'LV', 2217969),\n\t\t\t'40' => array('Lebanon', 'ara:fre:eng:arm', 'as', 'LB', 4125247),\n\t\t\t'176' => array('Lesotho', 'sso:eng', 'af', 'LS', 1919552),\n\t\t\t'177' => array('Liberia', 'eng', 'af', 'LR', 3685076),\n\t\t\t'178' => array('Libya', 'ara', 'af', 'LY', 6461454),\n\t\t\t'179' => array('Liechtenstein', 'ger', 'eu', 'LI', 35002),\n\t\t\t'30' => array('Lithuania', 'lit', 'eu', 'LT', 3545319),\n\t\t\t'53' => array('Luxembourg', 'lux:ger:fre', 'eu', 'LU', 497538),\n\t\t\t'180' => array('Macau', 'chi:por', 'as', 'MO', 567957),\n\t\t\t'64' => array('Macedonia, Republic of', 'mac', 'eu', 'MK', 2072086),\n\t\t\t'181' => array('Madagascar', 'mag:fre:eng', 'af', 'MG', 21281844),\n\t\t\t'182' => array('Malawi', 'eng:chw', 'af', 'MW', 15447500),\n\t\t\t'73' => array('Malaysia', 'mal', 'as', 'MY', 28274729),\n\t\t\t'78' => array('Maldives', 'dhi', 'af', 'MV', 395650),\n\t\t\t'183' => array('Mali', 'fre', 'af', 'ML', 13796354),\n\t\t\t'184' => array('Malta', 'mat:eng', 'eu', 'MT', 406771),\n\t\t\t'185' => array('Marshall Islands', 'mar:eng', 'au', 'MH', 65859),\n\t\t\t'186' => array('Martinique', 'fre', 'ma', 'MQ', 0),\n\t\t\t'187' => array('Mauritania', 'ara:fre', 'af', 'MR', 3205060),\n\t\t\t'188' => array('Mauritius', 'eng:fre', 'af', 'MU', 1294104),\n\t\t\t'189' => array('Mayotte', 'fre', 'af', 'YT', 231139),\n\t\t\t'42' => array('Mexico', 'spa', 'ma', 'MX', 112468855),\n\t\t\t'190' => array('Micronesia, Federated States Of', 'eng', 'au', 'FM', 107154),\n\t\t\t'191' => array('Moldova, Republic Of', 'mol:rus:ukr:gag', 'eu', 'MD', 4317483),\n\t\t\t'192' => array('Monaco', 'fre:moq', 'eu', 'MC', 30586),\n\t\t\t'80' => array('Montenegro', 'mon:ser:bos:alb:cro', 'eu', 'ME', 666730),\n\t\t\t'193' => array('Mongolia', 'mgl', 'as', 'MN', 3086918),\n\t\t\t'194' => array('Montserrat', 'eng', 'ma', 'MS', 5118),\n\t\t\t'74' => array('Morocco', 'ara', 'af', 'MA', 31627428),\n\t\t\t'195' => array('Mozambique', 'por', 'af', 'MZ', 22061451),\n\t\t\t'196' => array('Myanmar', 'bur', 'as', 'MM', 53414374),\n\t\t\t'197' => array('Namibia', 'eng:ger:afr:osh', 'af', 'NA', 2128471),\n\t\t\t'198' => array('Nauru', 'eng:nau', 'au', 'NR', 9267),\n\t\t\t'199' => array('Nepal', 'nep', 'as', 'NP', 28951852),\n\t\t\t'25' => array('Netherlands, The', 'dut', 'eu', 'NL', 16783092),\n\t\t\t'200' => array('Netherlands Antilles', 'dut:eng:pap', 'ma', 'AN', 228693),\n\t\t\t'201' => array('New Caledonia', 'fre', 'au', 'NC', 252352),\n\t\t\t'39' => array('New Zealand', 'mao:eng', 'au', 'NZ', 4252277),\n\t\t\t'202' => array('Nicaragua', 'spa', 'ma', 'NI', 5995928),\n\t\t\t'203' => array('Niger', 'fre', 'af', 'NE', 15878271),\n\t\t\t'204' => array('Nigeria', 'eng', 'af', 'NG', 152217341),\n\t\t\t'205' => array('Niue', 'niu:eng', 'au', 'NU', 1354),\n\t\t\t'206' => array('Norfolk Island', 'eng:nfk', 'au', 'NF', 2155),\n\t\t\t'207' => array('Northern Mariana Islands', 'eng:cha:car', 'au', 'MP', 48317),\n\t\t\t'6' => array('Norway', 'nor', 'eu', 'NO', 4676305),\n\t\t\t'208' => array('Oman', 'ara', 'as', 'OM', 2967717),\n\t\t\t'209' => array('Pakistan', 'urd', 'as', 'PK', 184404791),\n\t\t\t'210' => array('Palau', 'eng:pal', 'au', 'PW', 20879),\n\t\t\t'211' => array('Palestinian Territory, Occupied', 'ara', 'as', 'PS', 0),\n\t//\t\t'57' => array('Palestine', '', ''),\n\t\t\t'45' => array('Panama', 'spa', 'ma', 'PA', 3410676),\n\t\t\t'212' => array('Papua New Guinea', 'eng:tok:hir', 'au', 'PG', 6064515),\n\t\t\t'213' => array('Paraguay', 'spa:gua', 'sa', 'PY', 6375830),\n\t\t\t'67' => array('Peru', 'spa', 'sa', 'PE', 29907003),\n\t\t\t'54' => array('Philippines, The', 'fil:eng', 'as', 'PH', 99900177),\n\t\t\t'214' => array('Pitcairn Islands', 'eng:pit', 'ma', 'PN', 48),\n\t\t\t'7' => array('Poland', 'pol', 'eu', 'PL', 38463689),\n\t\t\t'8' => array('Portugal', 'por', 'eu', 'PT', 10735765),\n\t//\t\t'319' => array('Pridnestrovian Moldavian Republic', '', '', ''),\n\t\t\t'215' => array('Puerto Rico', 'spa:eng', 'ma', 'PR', 3978702),\n\t\t\t'216' => array('Qatar', 'ara', 'as', 'QA', 840926),\n\t\t\t'217' => array('Reunion', 'fre', 'eu', 'RE', 0),\n\t\t\t'27' => array('Romania', 'rom', 'eu', 'RO', 21959278),\n\t\t\t'32' => array('Russian Federation', 'rus', 'as', 'RU', 139390205),\n\t\t\t'218' => array('Rwanda', 'kin:fre:eng', 'af', 'RW', 11055976),\n\t\t\t'219' => array('Saint Kitts And Nevis', 'eng', 'ma', 'KN', 49898),\n\t\t\t'220' => array('Saint Lucia', 'eng:ant', 'ma', 'LC', 160922),\n\t\t\t'221' => array('Saint Vincent And The Grenadines', 'eng', 'ma', 'VC', 104217),\n\t\t\t'222' => array('Samoa', 'eng:sam', 'ma', 'WS', 192001),\n\t\t\t'223' => array('San Marino', 'ita', 'eu', 'SM', 31477),\n\t\t\t'224' => array('Sao Tome And Principe', 'por', 'af', 'ST', 175808),\n\t\t\t'59' => array('Saudi Arabia', 'ara', 'as', 'SA', 25731776),\n\t\t\t'225' => array('Senegal', 'fre:wol', 'af', 'SN', 12323252),\n\t\t\t'81' => array('Serbia', 'ser:hun:slo:rom:cro:alb', 'eu', 'RS', 7344847),\n\t\t\t#'312' => array('Serbia and Montenegro', 'ser', 'eu', 'CS', 0),\n\t\t\t'226' => array('Seychelles', 'eng:fre', 'af', 'SC', 88340),\n\t\t\t'227' => array('Sierra Leone', 'eng', 'af', 'SL', 5245695),\n\t\t\t'52' => array('Singapore', 'eng:mal:man:tam', 'as', 'SG', 4701069),\n\t\t\t'4' => array('Slovakia', 'slo', 'eu', 'SK', 5470306),\n\t\t\t'41' => array('Slovenia', 'slv', 'eu', 'SI', 2003136),\n\t\t\t'228' => array('Solomon Islands', 'eng', 'au', 'SB', 559198),\n\t\t\t'229' => array('Somalia', 'som:eng:ita:ara', 'af', 'SO', 10112453),\n\t\t\t'3' => array('South Africa', 'afr:zul:xho:nso:tsw:sot:tso', 'af', 'ZA', 49109107),\n\t\t\t'313' => array('South Georgia and the South Sandwich Islands', 'eng', 'sa', 'GS', 0),\n\t//\t\t'317' => array('South Ossetia, Republic of', '', '', ''),\n\t\t\t'233' => array('South Sudan', 'ara:eng', 'af', 'SS', 0),\n\t\t\t'5' => array('Spain', 'spa', 'eu', 'ES', 46505963),\n\t\t\t'230' => array('Sri Lanka', 'sin:tam', 'as', 'LK', 21513990),\n\t\t\t'231' => array('St. Helena', 'eng', 'ma', 'sa', 7670),\n\t\t\t'232' => array('St. Pierre And Miquelon', 'fre', 'na', 'pm', 0),\n\t\t\t'233' => array('Sudan', 'ara:eng', 'af', 'SD', 43939598),\n\t\t\t'235' => array('Suriname', 'dut:sra', 'af', 'SR', 486618),\n\t//\t\t'236' => array('Svalbard And Jan Mayen Islands'), 2 COUNTRIES\n\t\t\t'237' => array('Swaziland', 'eng:swt', 'af', 'SZ', 1354051),\n\t\t\t'24' => array('Sweden', 'swe', 'eu', 'SE', 9074055),\n\t\t\t'43' => array('Switzerland', 'ger:fre:ita:rom', 'eu', 'CH', 7623438),\n\t\t\t'240' => array('Syrian Arab Republic', 'syr', 'as', 'SY', 22198110),\n\t\t\t'300' => array('Taiwan', 'tai:chi', 'as', 'TW', 23024956),\n\t\t\t'241' => array('Tajikistan', 'taj', 'as', 'TJ', 7487489),\n\t\t\t'242' => array('Tanzania, United Republic Of', 'swa:eng', 'af', 'TZ', 0),\n\t\t\t'65' => array('Thailand', 'tha', 'as', 'TH', 67089500),\n\t\t\t'243' => array('Timor-Leste', 'tet:por', 'au', 'tl', 0),\n\t\t\t'244' => array('Togo', 'fre', 'af', 'TG', 6587239),\n\t\t\t'245' => array('Tokelau', 'tol:eng', 'au', 'TK', 1400),\n\t\t\t'246' => array('Tonga', 'ton:eng', 'au', 'TO', 122580),\n\t\t\t'34' => array('Trinidad & Tobago', 'eng:spa', 'ma', 'TT', 1228691),\n\t\t\t'320' => array('Tristan da Cunha', 'eng', 'af', 'SH', 0),\n\t\t\t'70' => array('Tunisia', 'ara', 'af', 'TN', 10589025),\n\t\t\t'61' => array('Turkey', 'tur', 'as', 'TR', 77804122),\n\t\t\t'247' => array('Turkmenistan', 'tkm:rus:uzb:dar', 'as', 'TM', 4940916),\n\t\t\t'248' => array('Turks And Caicos Islands', 'eng', 'ma', 'TC', 23528),\n\t\t\t'249' => array('Tuvalu', 'tuv', 'au', 'TV', 10472),\n\t\t\t'250' => array('Uganda', 'eng:swa', 'af', 'UG', 33398682),\n\t\t\t'58' => array('Ukraine', 'ukr', 'eu', 'UA', 45415596),\n\t\t\t'251' => array('United Arab Emirates', 'ara', 'as', 'AE', 4975593),\n\t\t\t'2' => array('United Kingdom', 'eng', 'eu', 'GB', 62348447),\n\t\t\t'1' => array('United States', 'eng', 'na', 'US', 310232863),\n\t\t\t'252' => array('United States Minor Outlying Islands', 'eng', 'ma', 'UM', 0),\n\t\t\t'68' => array('Uruguay', 'spa', 'sa', 'UY', 3510386),\n\t\t\t'253' => array('Uzbekistan', 'uzb', 'as', 'UZ', 27865738),\n\t\t\t'254' => array('Vanuatu', 'bis:eng:fre', 'au', 'VU', 221552),\n\t\t\t'49' => array('Venezuela', 'spa', 'sa', 'VE', 27223228),\n\t\t\t'50' => array('Vietnam', 'vie', 'as', 'VN', 89571130),\n\t\t\t'255' => array('Virgin Islands (British)', 'eng', 'ma', 'VG', 24939),\n\t\t\t'256' => array('Virgin Islands (U.S.)', 'eng', 'ma', 'VI', 109750),\n\t\t\t'257' => array('Wallis And Futuna Islands', 'fre:uve:fut', 'au', 'WF', 0),\n\t\t\t'258' => array('Western Sahara', 'ara:spa', 'af', 'eh', 491519),\n\t\t\t'259' => array('Yemen', 'ara', 'as', 'YE', 23495361),\n\t\t\t'260' => array('Zambia', 'eng', 'af', 'ZM', 13460305),\n\t\t\t'270' => array('Zimbabwe', 'eng:sho:sid', 'af', 'ZW', 11651858),\n\t\t);\t\n\t}", "public function getCountries()\n {\n foreach (CountryStorage::getAll() as $id=>$content) {\n $key = $content->id;\n $value = $content->name;\n $countryoptions[$key] = $value;\n }\n return $countryoptions;\n }", "public static function getISOCountryList()\r\n\t{\r\n\t\t$iclISOCountryList = new PYS_ISOCountryList();\r\n\t\t\r\n\t\t$iclISOCountryList->add(826,\"United Kingdom\",\"GBR\",3);\r\n\t\t$iclISOCountryList->add(840,\"United States\",\"USA\",2);\r\n\t\t$iclISOCountryList->add(36,\"Australia\",\"AUS\",1);\r\n\t\t$iclISOCountryList->add(124,\"Canada\",\"CAN\",1);\r\n\t\t$iclISOCountryList->add(250,\"France\",\"FRA\",1);\r\n\t\t$iclISOCountryList->add(276,\"Germany\",\"DEU\",1);\r\n\t\t$iclISOCountryList->add(4,\"Afghanistan\",\"AFG\",0);\r\n\t\t$iclISOCountryList->add(248,\"Åland Islands\",\"ALA\",0);\t\r\n\t\t$iclISOCountryList->add(8,\"Albania\",\"ALB\",0);\r\n\t\t$iclISOCountryList->add(12,\"Algeria\",\"DZA\",0);\r\n\t\t$iclISOCountryList->add(16,\"American Samoa\",\"ASM\",0);\r\n\t\t$iclISOCountryList->add(20,\"Andorra\",\"AND\",0);\r\n\t\t$iclISOCountryList->add(24,\"Angola\",\"AGO\",0);\r\n\t\t$iclISOCountryList->add(660,\"Anguilla\",\"AIA\",0);\r\n\t\t$iclISOCountryList->add(10,\"Antarctica\",\"ATA\",0);\r\n\t\t$iclISOCountryList->add(28,\"Antigua and Barbuda\",\"ATG\",0);\r\n\t\t$iclISOCountryList->add(32,\"Argentina\",\"ARG\",0);\r\n\t\t$iclISOCountryList->add(51,\"Armenia\",\"ARM\",0);\r\n\t\t$iclISOCountryList->add(533,\"Aruba\",\"ABW\",0);\r\n\t\t$iclISOCountryList->add(40,\"Austria\",\"AUT\",0);\r\n\t\t$iclISOCountryList->add(31,\"Azerbaijan\",\"AZE\",0);\r\n\t\t$iclISOCountryList->add(44,\"Bahamas\",\"BHS\",0);\r\n\t\t$iclISOCountryList->add(48,\"Bahrain\",\"BHR\",0);\r\n\t\t$iclISOCountryList->add(50,\"Bangladesh\",\"BGD\",0);\r\n\t\t$iclISOCountryList->add(52,\"Barbados\",\"BRB\",0);\r\n\t\t$iclISOCountryList->add(112,\"Belarus\",\"BLR\",0);\r\n\t\t$iclISOCountryList->add(56,\"Belgium\",\"BEL\",0);\r\n\t\t$iclISOCountryList->add(84,\"Belize\",\"BLZ\",0);\r\n\t\t$iclISOCountryList->add(204,\"Benin\",\"BEN\",0);\r\n\t\t$iclISOCountryList->add(60,\"Bermuda\",\"BMU\",0);\r\n\t\t$iclISOCountryList->add(64,\"Bhutan\",\"BTN\",0);\r\n\t\t$iclISOCountryList->add(68,\"Bolivia\",\"BOL\",0);\r\n\t\t$iclISOCountryList->add(70,\"Bosnia and Herzegovina\",\"BIH\",0);\r\n\t\t$iclISOCountryList->add(72,\"Botswana\",\"BWA\",0);\r\n\t\t$iclISOCountryList->add(74,\"Bouvet Island\",\"BVT\",0);\r\n\t\t$iclISOCountryList->add(76,\"Brazil Federative\",\"BRA\",0);\r\n\t\t$iclISOCountryList->add(86,\"British Indian Ocean Territory\",\"IOT\",0);\r\n\t\t$iclISOCountryList->add(96,\"Brunei\",\"BRN\",0);\r\n\t\t$iclISOCountryList->add(100,\"Bulgaria\",\"BGR\",0);\r\n\t\t$iclISOCountryList->add(854,\"Burkina Faso\",\"BFA\",0);\r\n\t\t$iclISOCountryList->add(108,\"Burundi\",\"BDI\",0);\r\n\t\t$iclISOCountryList->add(116,\"Cambodia\",\"KHM\",0);\r\n\t\t$iclISOCountryList->add(120,\"Cameroon\",\"CMR\",0);\r\n\t\t$iclISOCountryList->add(132,\"Cape Verde\",\"CPV\",0);\r\n\t\t$iclISOCountryList->add(136,\"Cayman Islands\",\"CYM\",0);\r\n\t\t$iclISOCountryList->add(140,\"Central African Republic\",\"CAF\",0);\r\n\t\t$iclISOCountryList->add(148,\"Chad\",\"TCD\",0);\r\n\t\t$iclISOCountryList->add(152,\"Chile\",\"CHL\",0);\r\n\t\t$iclISOCountryList->add(156,\"China\",\"CHN\",0);\r\n\t\t$iclISOCountryList->add(162,\"Christmas Island\",\"CXR\",0);\r\n\t\t$iclISOCountryList->add(166,\"Cocos (Keeling) Islands\",\"CCK\",0);\r\n\t\t$iclISOCountryList->add(170,\"Colombia\",\"COL\",0);\r\n\t\t$iclISOCountryList->add(174,\"Comoros\",\"COM\",0);\r\n\t\t$iclISOCountryList->add(180,\"Congo\",\"COD\",0);\r\n\t\t$iclISOCountryList->add(178,\"Congo\",\"COG\",0);\r\n\t\t$iclISOCountryList->add(184,\"Cook Islands\",\"COK\",0);\r\n\t\t$iclISOCountryList->add(188,\"Costa Rica\",\"CRI\",0);\r\n\t\t$iclISOCountryList->add(384,\"Côte d'Ivoire\",\"CIV\",0);\r\n\t\t$iclISOCountryList->add(191,\"Croatia\",\"HRV\",0);\r\n\t\t$iclISOCountryList->add(192,\"Cuba\",\"CUB\",0);\r\n\t\t$iclISOCountryList->add(196,\"Cyprus\",\"CYP\",0);\r\n\t\t$iclISOCountryList->add(203,\"Czech Republic\",\"CZE\",0);\r\n\t\t$iclISOCountryList->add(208,\"Denmark\",\"DNK\",0);\r\n\t\t$iclISOCountryList->add(262,\"Djibouti\",\"DJI\",0);\r\n\t\t$iclISOCountryList->add(212,\"Dominica\",\"DMA\",0);\r\n\t\t$iclISOCountryList->add(214,\"Dominican Republic\",\"DOM\",0);\r\n\t\t$iclISOCountryList->add(626,\"East Timor\",\"TMP\",0);\r\n\t\t$iclISOCountryList->add(218,\"Ecuador\",\"ECU\",0);\r\n\t\t$iclISOCountryList->add(818,\"Egypt\",\"EGY\",0);\r\n\t\t$iclISOCountryList->add(222,\"El Salvador\",\"SLV\",0);\r\n\t\t$iclISOCountryList->add(226,\"Equatorial Guinea\",\"GNQ\",0);\r\n\t\t$iclISOCountryList->add(232,\"Eritrea\",\"ERI\",0);\r\n\t\t$iclISOCountryList->add(233,\"Estonia\",\"EST\",0);\r\n\t\t$iclISOCountryList->add(231,\"Ethiopia\",\"ETH\",0);\r\n\t\t$iclISOCountryList->add(238,\"Falkland Islands (Malvinas)\",\"FLK\",0);\r\n\t\t$iclISOCountryList->add(234,\"Faroe Islands\",\"FRO\",0);\r\n\t\t$iclISOCountryList->add(242,\"Fiji\",\"FJI\",0);\r\n\t\t$iclISOCountryList->add(246,\"Finland\",\"FIN\",0);\r\n\t\t$iclISOCountryList->add(254,\"French Guiana\",\"GUF\",0);\r\n\t\t$iclISOCountryList->add(258,\"French Polynesia\",\"PYF\",0);\r\n\t\t$iclISOCountryList->add(260,\"French Southern Territories\",\"ATF\",0);\r\n\t\t$iclISOCountryList->add(266,\"Gabon\",\"GAB\",0);\r\n\t\t$iclISOCountryList->add(270,\"Gambia\",\"GMB\",0);\r\n\t\t$iclISOCountryList->add(268,\"Georgia\",\"GEO\",0);\r\n\t\t$iclISOCountryList->add(288,\"Ghana\",\"GHA\",0);\r\n\t\t$iclISOCountryList->add(292,\"Gibraltar\",\"GIB\",0);\r\n\t\t$iclISOCountryList->add(300,\"Greece\",\"GRC\",0);\r\n\t\t$iclISOCountryList->add(304,\"Greenland\",\"GRL\",0);\r\n\t\t$iclISOCountryList->add(308,\"Grenada\",\"GRD\",0);\r\n\t\t$iclISOCountryList->add(312,\"Guadaloupe\",\"GLP\",0);\r\n\t\t$iclISOCountryList->add(316,\"Guam\",\"GUM\",0);\r\n\t\t$iclISOCountryList->add(320,\"Guatemala\",\"GTM\",0);\r\n\t\t$iclISOCountryList->add(831,\"Guernsey\",\"GGY\",0);\r\n\t\t$iclISOCountryList->add(324,\"Guinea\",\"GIN\",0);\r\n\t\t$iclISOCountryList->add(624,\"Guinea-Bissau\",\"GNB\",0);\r\n\t\t$iclISOCountryList->add(328,\"Guyana\",\"GUY\",0);\r\n\t\t$iclISOCountryList->add(332,\"Haiti\",\"HTI\",0);\r\n\t\t$iclISOCountryList->add(334,\"Heard Island and McDonald Islands\",\"HMD\",0);\r\n\t\t$iclISOCountryList->add(340,\"Honduras\",\"HND\",0);\r\n\t\t$iclISOCountryList->add(344,\"Hong Kong\",\"HKG\",0);\r\n\t\t$iclISOCountryList->add(348,\"Hungary\",\"HUN\",0);\r\n\t\t$iclISOCountryList->add(352,\"Iceland\",\"ISL\",0);\r\n\t\t$iclISOCountryList->add(356,\"India\",\"IND\",0);\r\n\t\t$iclISOCountryList->add(360,\"Indonesia\",\"IDN\",0);\r\n\t\t$iclISOCountryList->add(364,\"Iran\",\"IRN\",0);\r\n\t\t$iclISOCountryList->add(368,\"Iraq\",\"IRQ\",0);\r\n\t\t$iclISOCountryList->add(372,\"Ireland\",\"IRL\",0);\r\n\t\t$iclISOCountryList->add(833,\"Isle of Man\",\"IMN\",0);\r\n\t\t$iclISOCountryList->add(376,\"Israel\",\"ISR\",0);\r\n\t\t$iclISOCountryList->add(380,\"Italy\",\"ITA\",0);\r\n\t\t$iclISOCountryList->add(388,\"Jamaica\",\"JAM\",0);\r\n\t\t$iclISOCountryList->add(392,\"Japan\",\"JPN\",0);\r\n\t\t$iclISOCountryList->add(832,\"Jersey\",\"JEY\",0);\r\n\t\t$iclISOCountryList->add(400,\"Jordan\",\"JOR\",0);\r\n\t\t$iclISOCountryList->add(398,\"Kazakhstan\",\"KAZ\",0);\r\n\t\t$iclISOCountryList->add(404,\"Kenya\",\"KEN\",0);\r\n\t\t$iclISOCountryList->add(296,\"Kiribati\",\"KIR\",0);\r\n\t\t$iclISOCountryList->add(410,\"Korea\",\"KOR\",0);\r\n\t\t$iclISOCountryList->add(408,\"Korea\",\"PRK\",0);\r\n\t\t$iclISOCountryList->add(414,\"Kuwait\",\"KWT\",0);\r\n\t\t$iclISOCountryList->add(417,\"Kyrgyzstan\",\"KGZ\",0);\r\n\t\t$iclISOCountryList->add(418,\"Lao\",\"LAO\",0);\r\n\t\t$iclISOCountryList->add(428,\"Latvia\",\"LVA\",0);\r\n\t\t$iclISOCountryList->add(422,\"Lebanon\",\"LBN\",0);\r\n\t\t$iclISOCountryList->add(426,\"Lesotho\",\"LSO\",0);\r\n\t\t$iclISOCountryList->add(430,\"Liberia\",\"LBR\",0);\r\n\t\t$iclISOCountryList->add(434,\"Libyan Arab Jamahiriya\",\"LBY\",0);\r\n\t\t$iclISOCountryList->add(438,\"Liechtenstein\",\"LIE\",0);\r\n\t\t$iclISOCountryList->add(440,\"Lithuania\",\"LTU\",0);\r\n\t\t$iclISOCountryList->add(442,\"Luxembourg\",\"LUX\",0);\r\n\t\t$iclISOCountryList->add(446,\"Macau\",\"MAC\",0);\r\n\t\t$iclISOCountryList->add(807,\"Macedonia\",\"MKD\",0);\r\n\t\t$iclISOCountryList->add(450,\"Madagascar\",\"MDG\",0);\r\n\t\t$iclISOCountryList->add(454,\"Malawi\",\"MWI\",0);\r\n\t\t$iclISOCountryList->add(458,\"Malaysia\",\"MYS\",0);\r\n\t\t$iclISOCountryList->add(462,\"Maldives\",\"MDV\",0);\r\n\t\t$iclISOCountryList->add(466,\"Mali\",\"MLI\",0);\r\n\t\t$iclISOCountryList->add(470,\"Malta\",\"MLT\",0);\r\n\t\t$iclISOCountryList->add(584,\"Marshall Islands\",\"MHL\",0);\r\n\t\t$iclISOCountryList->add(474,\"Martinique\",\"MTQ\",0);\r\n\t\t$iclISOCountryList->add(478,\"Mauritania Islamic\",\"MRT\",0);\r\n\t\t$iclISOCountryList->add(480,\"Mauritius\",\"MUS\",0);\r\n\t\t$iclISOCountryList->add(175,\"Mayotte\",\"MYT\",0);\r\n\t\t$iclISOCountryList->add(484,\"Mexico\",\"MEX\",0);\r\n\t\t$iclISOCountryList->add(583,\"Micronesia\",\"FSM\",0);\r\n\t\t$iclISOCountryList->add(498,\"Moldova\",\"MDA\",0);\r\n\t\t$iclISOCountryList->add(492,\"Monaco\",\"MCO\",0);\r\n\t\t$iclISOCountryList->add(496,\"Mongolia\",\"MNG\",0);\r\n\t\t$iclISOCountryList->add(499,\"Montenegro\",\"MNE\",0);\t\r\n\t\t$iclISOCountryList->add(500,\"Montserrat\",\"MSR\",0);\r\n\t\t$iclISOCountryList->add(504,\"Morocco\",\"MAR\",0);\r\n\t\t$iclISOCountryList->add(508,\"Mozambique\",\"MOZ\",0);\r\n\t\t$iclISOCountryList->add(104,\"Myanmar\",\"MMR\",0);\r\n\t\t$iclISOCountryList->add(516,\"Namibia\",\"NAM\",0);\r\n\t\t$iclISOCountryList->add(520,\"Nauru\",\"NRU\",0);\r\n\t\t$iclISOCountryList->add(524,\"Nepal\",\"NPL\",0);\r\n\t\t$iclISOCountryList->add(528,\"Netherlands\",\"NLD\",0);\r\n\t\t$iclISOCountryList->add(530,\"Netherlands Antilles\",\"ANT\",0);\r\n\t\t$iclISOCountryList->add(540,\"New Caledonia\",\"NCL\",0);\r\n\t\t$iclISOCountryList->add(554,\"New Zealand\",\"NZL\",0);\r\n\t\t$iclISOCountryList->add(558,\"Nicaragua\",\"NIC\",0);\r\n\t\t$iclISOCountryList->add(562,\"Niger\",\"NER\",0);\r\n\t\t$iclISOCountryList->add(566,\"Nigeria\",\"NGA\",0);\r\n\t\t$iclISOCountryList->add(570,\"Niue\",\"NIU\",0);\r\n\t\t$iclISOCountryList->add(574,\"Norfolk Island\",\"NFK\",0);\r\n\t\t$iclISOCountryList->add(580,\"Northern Mariana Islands\",\"MNP\",0);\r\n\t\t$iclISOCountryList->add(578,\"Norway\",\"NOR\",0);\r\n\t\t$iclISOCountryList->add(512,\"Oman\",\"OMN\",0);\r\n\t\t$iclISOCountryList->add(586,\"Pakistan\",\"PAK\",0);\r\n\t\t$iclISOCountryList->add(585,\"Palau\",\"PLW\",0);\r\n\t\t$iclISOCountryList->add(275,\"Palestine\",\"PSE\",0);\t\r\n\t\t$iclISOCountryList->add(591,\"Panama\",\"PAN\",0);\r\n\t\t$iclISOCountryList->add(598,\"Papua New Guinea\",\"PNG\",0);\r\n\t\t$iclISOCountryList->add(600,\"Paraguay\",\"PRY\",0);\r\n\t\t$iclISOCountryList->add(604,\"Peru\",\"PER\",0);\r\n\t\t$iclISOCountryList->add(608,\"Philippines\",\"PHL\",0);\r\n\t\t$iclISOCountryList->add(612,\"Pitcairn\",\"PCN\",0);\r\n\t\t$iclISOCountryList->add(616,\"Poland\",\"POL\",0);\r\n\t\t$iclISOCountryList->add(620,\"Portugal\",\"PRT\",0);\r\n\t\t$iclISOCountryList->add(630,\"Puerto Rico\",\"PRI\",0);\r\n\t\t$iclISOCountryList->add(634,\"Qatar\",\"QAT\",0);\r\n\t\t$iclISOCountryList->add(638,\"Réunion\",\"REU\",0);\r\n\t\t$iclISOCountryList->add(642,\"Romania\",\"ROM\",0);\r\n\t\t$iclISOCountryList->add(643,\"Russian Federation\",\"RUS\",0);\r\n\t\t$iclISOCountryList->add(646,\"Rwanda\",\"RWA\",0);\r\n\t\t$iclISOCountryList->add(652,\"Saint Barthélemy\",\"BLM\",0);\r\n\t\t$iclISOCountryList->add(654,\"Saint Helena\",\"SHN\",0);\r\n\t\t$iclISOCountryList->add(659,\"Saint Kitts and Nevis\",\"KNA\",0);\r\n\t\t$iclISOCountryList->add(662,\"Saint Lucia\",\"LCA\",0);\r\n\t\t$iclISOCountryList->add(663,\"Saint Martin (French part)\",\"MAF\",0);\r\n\t\t$iclISOCountryList->add(666,\"Saint Pierre and Miquelon\",\"SPM\",0);\r\n\t\t$iclISOCountryList->add(670,\"Saint Vincent and the Grenadines\",\"VCT\",0);\r\n\t\t$iclISOCountryList->add(882,\"Samoa\",\"WSM\",0);\r\n\t\t$iclISOCountryList->add(674,\"San Marino\",\"SMR\",0);\r\n\t\t$iclISOCountryList->add(678,\"São Tomé and Príncipe Democratic\",\"STP\",0);\r\n\t\t$iclISOCountryList->add(682,\"Saudi Arabia\",\"SAU\",0);\r\n\t\t$iclISOCountryList->add(686,\"Senegal\",\"SEN\",0);\r\n\t\t$iclISOCountryList->add(688,\"Serbia\",\"SRB\",0);\r\n\t\t$iclISOCountryList->add(690,\"Seychelles\",\"SYC\",0);\r\n\t\t$iclISOCountryList->add(694,\"Sierra Leone\",\"SLE\",0);\r\n\t\t$iclISOCountryList->add(702,\"Singapore\",\"SGP\",0);\r\n\t\t$iclISOCountryList->add(703,\"Slovakia\",\"SVK\",0);\r\n\t\t$iclISOCountryList->add(705,\"Slovenia\",\"SVN\",0);\r\n\t\t$iclISOCountryList->add(90,\"Solomon Islands\",\"SLB\",0);\r\n\t\t$iclISOCountryList->add(706,\"Somalia\",\"SOM\",0);\r\n\t\t$iclISOCountryList->add(710,\"South Africa\",\"ZAF\",0);\r\n\t\t$iclISOCountryList->add(239,\"South Georgia and the South Sandwich Islands\",\"SGS\",0);\r\n\t\t$iclISOCountryList->add(724,\"Spain\",\"ESP\",0);\r\n\t\t$iclISOCountryList->add(144,\"Sri Lanka\",\"LKA\",0);\r\n\t\t$iclISOCountryList->add(736,\"Sudan\",\"SDN\",0);\r\n\t\t$iclISOCountryList->add(740,\"Suriname\",\"SUR\",0);\r\n\t\t$iclISOCountryList->add(744,\"Svalbard and Jan Mayen\",\"SJM\",0);\r\n\t\t$iclISOCountryList->add(748,\"Swaziland\",\"SWZ\",0);\r\n\t\t$iclISOCountryList->add(752,\"Sweden\",\"SWE\",0);\r\n\t\t$iclISOCountryList->add(756,\"Switzerland\",\"CHE\",0);\r\n\t\t$iclISOCountryList->add(760,\"Syrian Arab Republic\",\"SYR\",0);\r\n\t\t$iclISOCountryList->add(158,\"Taiwan,\",\"TWN\",0);\r\n\t\t$iclISOCountryList->add(762,\"Tajikistan\",\"TJK\",0);\r\n\t\t$iclISOCountryList->add(834,\"Tanzania\",\"TZA\",0);\r\n\t\t$iclISOCountryList->add(764,\"Thailand\",\"THA\",0);\r\n\t\t$iclISOCountryList->add(768,\"Togo\",\"TGO\",0);\r\n\t\t$iclISOCountryList->add(772,\"Tokelau\",\"TKL\",0);\r\n\t\t$iclISOCountryList->add(776,\"Tonga\",\"TON\",0);\r\n\t\t$iclISOCountryList->add(780,\"Trinidad and Tobago\",\"TTO\",0);\r\n\t\t$iclISOCountryList->add(788,\"Tunisia\",\"TUN\",0);\r\n\t\t$iclISOCountryList->add(792,\"Turkey\",\"TUR\",0);\r\n\t\t$iclISOCountryList->add(795,\"Turkmenistan\",\"TKM\",0);\r\n\t\t$iclISOCountryList->add(796,\"Turks and Caicos Islands\",\"TCA\",0);\r\n\t\t$iclISOCountryList->add(798,\"Tuvalu\",\"TUV\",0);\r\n\t\t$iclISOCountryList->add(800,\"Uganda\",\"UGA\",0);\r\n\t\t$iclISOCountryList->add(804,\"Ukraine\",\"UKR\",0);\r\n\t\t$iclISOCountryList->add(784,\"United Arab Emirates\",\"ARE\",0);\r\n\t\t$iclISOCountryList->add(581,\"United States Minor Outlying Islands\",\"UMI\",0);\r\n\t\t$iclISOCountryList->add(858,\"Uruguay Eastern\",\"URY\",0);\r\n\t\t$iclISOCountryList->add(860,\"Uzbekistan\",\"UZB\",0);\r\n\t\t$iclISOCountryList->add(548,\"Vanuatu\",\"VUT\",0);\r\n\t\t$iclISOCountryList->add(336,\"Vatican City State\",\"VAT\",0);\r\n\t\t$iclISOCountryList->add(862,\"Venezuela\",\"VEN\",0);\r\n\t\t$iclISOCountryList->add(704,\"Vietnam\",\"VNM\",0);\r\n\t\t$iclISOCountryList->add(92,\"Virgin Islands, British\",\"VGB\",0);\r\n\t\t$iclISOCountryList->add(850,\"Virgin Islands, U.S.\",\"VIR\",0);\r\n\t\t$iclISOCountryList->add(876,\"Wallis and Futuna\",\"WLF\",0);\r\n\t\t$iclISOCountryList->add(732,\"Western Sahara\",\"ESH\",0);\r\n\t\t$iclISOCountryList->add(887,\"Yemen\",\"YEM\",0);\r\n\t\t$iclISOCountryList->add(894,\"Zambia\",\"ZMB\",0);\r\n\t\t$iclISOCountryList->add(716,\"Zimbabwe\",\"ZWE\",0);\r\n\t\t\r\n\t\treturn $iclISOCountryList;\r\n\t}", "function get_user_countries($user = NULL)\n{\n if (!$user) {\n global $user;\n }\n\n $countries = array();\n if (is_rep($user)) {\n // Load current user.\n $loaded_user = user_load($user->uid);\n $loaded_user_wrapper = entity_metadata_wrapper('user', $loaded_user);\n $countries_terms = $loaded_user_wrapper->field_country->value();\n foreach ($countries_terms as $item) {\n $countries[] = $item->tid;\n }\n } // Get reps for comm_lead\n elseif (is_comm_lead($user)) {\n $reps = ppt_resources_get_comm_lead_reps($user->uid);\n foreach ($reps as $rep) {\n if (!isset($rep->field_country[LANGUAGE_NONE])) {\n continue;\n }\n // Loop over the user countries.\n foreach ($rep->field_country[LANGUAGE_NONE] as $item) {\n if (!isset($countries[$item['target_id']])) {\n $countries[] = $item['target_id'];\n }\n }\n }\n }\n // If the logged in user is a sales manager.\n elseif (is_sales_manager($user)) {\n // Get reps of sales manager.\n $reps = ppt_resources_get_sales_manager_reps($user->uid);\n foreach ($reps as $rep) {\n if (!isset($rep->field_country[LANGUAGE_NONE])) {\n continue;\n }\n // Loop over the user countries.\n foreach ($rep->field_country[LANGUAGE_NONE] as $item) {\n if (!isset($countries[$item['target_id']])) {\n $countries[] = $item['target_id'];\n }\n }\n }\n } elseif (is_regional_lead($user)) {\n $managers = ppt_resources_get_regional_lead_sales_managers($user->uid);\n $reps = array();\n foreach ($managers as $manager) {\n $reps_tmp = ppt_resources_get_sales_manager_reps($manager->uid);\n $reps = array_merge($reps, $reps_tmp);\n }\n foreach ($reps as $rep) {\n if (!isset($rep->field_country[LANGUAGE_NONE])) {\n continue;\n }\n // Loop over the user countries.\n foreach ($rep->field_country[LANGUAGE_NONE] as $item) {\n if (!isset($countries[$item['target_id']])) {\n $countries[] = $item['target_id'];\n }\n }\n }\n } elseif (is_global_lead($user)) {\n $vocabulary = taxonomy_vocabulary_machine_name_load('country');\n $countries = entity_load('taxonomy_term', FALSE, array('vid' => $vocabulary->vid));\n $countries = array_keys($countries);\n } elseif (is_data_admin($user)) {\n $account = user_load($user->uid);\n if (!isset($account->field_country[LANGUAGE_NONE])) {\n $countries = array();\n } else {\n foreach ($account->field_country[LANGUAGE_NONE] as $row) {\n $countries[] = $row['target_id'];\n }\n }\n } else {\n $vocabulary = taxonomy_vocabulary_machine_name_load('country');\n $countries = entity_load('taxonomy_term', FALSE, array('vid' => $vocabulary->vid));\n $countries = array_keys($countries);\n }\n return array_unique($countries);\n}", "public function countryList ( Request $request ) {\n $countries = Country::all();\n return response()->json([\n \"response\" => $countries\n ]);\n }", "public function getCountries() {\n\t\treturn $this->getData('/objekt/laender');\n\t}", "function organizeAllByArea($allLocations) {\r\n $res = [];\r\n\t\t// Callbacks for map and reduce\r\n\t\tfunction mapFunction($location) \r\n\t\t{\r\n\t\t\treturn $location['area'];\r\n\t\t}\r\n\t\tfunction reduceFunction($allArea, $area)\r\n\t\t{\r\n\t\t\t$isPresent = in_array( $area, $allArea );\r\n\t\t\tif(!$isPresent) \r\n\t\t\t{ \r\n\t\t\t\tarray_push($allArea, $area); \r\n\t\t\t\treturn $allArea; \r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{ \r\n\t\t\t\treturn $allArea; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach($allLocations as $city => $locations) {\r\n\t\t\t$mapped = array_map(\"mapFunction\", $locations);\r\n\t\t\t$reduced = array_reduce($mapped, \"reduceFunction\", []);\r\n\t\t\t$res[$city] = $reduced;\r\n\t\t}\r\n\t\treturn $res;\r\n }", "public function getCustomerCountryList()\n {\n $customerCountryList = DB::table('country')\n ->join('city', 'country.country_id', '=', 'city.country_id')\n ->join('address', 'city.city_id', '=', 'address.city_id')\n ->join('customer', 'customer.address_id', '=', 'address.address_id')\n ->select(DB::raw('country.country, COUNT(customer.*)'))\n ->groupBy('country.country')\n ->orderBy('country')\n ->get();\n\n return response()->json([\n 'success' => true,\n 'message' => 'Customers country list',\n 'data' => $customerCountryList\n ]);\n }", "public function getCountryList() {\n \n if($this->request->has('page')) {\n $data = $this->_countries->where('is_active', 1)->with(['categories' =>function($query){\n $query->distinct('id');\n }])->paginate(10);\n } else {\n $data = $this->_countries->where('is_active', 1)->with(['categories' =>function($query){\n $query->distinct('id');\n }])->get();\n }\n\n // db::raw('SELECT country_categories.country_id FROM country_categories INNER JOIN videos ON videos.id = country_categories.video_id WHERE videos.is_live =1 group BY country_categories.country_id order BY country_id ASC');\n $result = DB::select( DB::raw('SELECT country_categories.country_id FROM country_categories INNER JOIN videos ON videos.id = country_categories.video_id LEFT JOIN countries c ON country_categories.country_id= c.id WHERE c.is_active = 1 and videos.is_live =1 and videos.is_active = 1 and videos.job_status=\"Complete\" and videos.is_archived = 0 and videos.liveStatus != \"complete\" and country_categories.video_id != 0 group BY country_categories.country_id order BY country_id ASC'));\n $countries = array();\n foreach($result as $country) {\n array_push($countries,$country->country_id);\n }\n\n foreach($data as $item) {\n if(in_array($item['id'],$countries)){\n $list[] = $item;\n }\n }\n return $list;\n }", "public function listZones() {\r\n\t\t\t$sql = Connection::getHandle()->prepare(\"SELECT * from bs_zones ORDER BY countries_id DESC, zone_name ASC\");\r\n\t\t\t$sql->execute();\r\n\r\n\t\t\twhile($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\t\t$results[] = $row;\r\n\t\t\t}\r\n\r\n\t\t\treturn $results;\r\n\t\t}", "public function actionGetnearbycountry(){\t\t\n\t\t$ip = $this->get_client_ip();\n\t\tif($ip){\n\t\t\t$countries = Countries::model()->get_current_nearbycountries($ip);\n\t\t}\n\t\techo $countries;\n\t\tYii::app()->end();\t\t\n\t}", "public function countries(): array\n {\n return $this->client->get(\"country\");\n }", "public function getAllCountries() {\n return $this->_countries->pluck ( 'name', 'code','id','flag');\n }", "function GetCountries () {\n\t\t$this->db->order_by('name','ASC');\n\t\t$result = $this->db->get('countries');\n\n\t\t$countries = array();\n\t\tforeach ($result->result_array() as $country) {\n\t\t\t$countries[] = array(\n\t\t\t\t\t\t\t'iso2' => $country['iso2'],\n\t\t\t\t\t\t\t'name' => $country['name']\n\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn $countries;\n\t}", "function tep_get_country_zones($country_id) {\n $zones_array = array();\n $zones_query = tep_db_query(\"select zone_id, zone_name from \" . TABLE_ZONES . \" where zone_country_id = '\" . $country_id . \"' order by \" . ($country_id == 107 ? \"zone_code\" : \"zone_name\"));\n while ($zones = tep_db_fetch_array($zones_query)) {\n $zones_array[] = array('id' => $zones['zone_id'],\n 'text' => $zones['zone_name']);\n }\n\n return $zones_array;\n}", "public function index()\n {\n $user_id = auth()->user()->id;\n $user = User::find($user_id);\n return view('locations.index')->with('locations', $user->locations->sortBy('title')->values()->all())->with('user', $user);\n }", "function GetCountries()\n\t{\n\t\t$result = $this->sendRequest(\"GetCountries\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries() {\n\n $result = $this->doRequest('v1.0/all-countries', 'GET');\n\n return $result;\n\n }", "protected function _getCountries()\n {\n return $options = $this->_getCountryCollection()\n ->setForegroundCountries($this->_getTopDestinations())\n ->toOptionArray();\n }", "function getAllCountries() {\n $myModel = new My_Model();\n $result = $myModel->select('countries', \"*\", null);\n if (count($result) > 1) {\n return $result = [\n \"message\" => \"countries list\",\n \"data\" => $result\n ];\n } else {\n return $resp = [\n \"message\" => \"no country available\",\n \"data\" => \"null\"\n ];\n }\n }", "public function getCountries()\n {\n return \"/V1/directory/countries\";\n }", "function tep_get_countries($default = '') {\n $countries_array = array();\n if ($default) {\n $countries_array[] = array('id' => '',\n 'text' => $default);\n }\n $countries_query = tep_db_query(\"select countries_id, countries_name from \" . TABLE_COUNTRIES . \" order by countries_name\");\n while ($countries = tep_db_fetch_array($countries_query)) {\n $countries_array[] = array('id' => $countries['countries_id'],\n 'text' => $countries['countries_name']);\n }\n\n return $countries_array;\n}", "public function getLocations(): array\n {\n $arrLocations = array();\n $objLocations = ContaoEstateManager\\ProviderModel::findAll();\n\n if ($objLocations === null)\n {\n return $arrLocations;\n }\n\n while ($objLocations->next())\n {\n $arrLocations[ $objLocations->id ] = $objLocations->postleitzahl . ' ' . $objLocations->ort . ' (' . $objLocations->firma . ')';\n }\n\n return $arrLocations;\n }", "public function getCountries() {\n $db = database::getDB();\n $query = \"SELECT country FROM countries ORDER BY id\";\n $data = $db->query($query);\n return $data;\n }", "function outputCountriesList() {\r\n $countries = new CountryCollection();\r\n $countries->loadCollection();\r\n \r\n $result = $countries->getArray();\r\n\t\r\n for($i=0;$i<$countries->getCount();$i++){\r\n\t\t echo '<option value=\"'. $result[$i]->getISO(). '\">' . $result[$i]->getCountryName() . '</option>';\r\n\t}\r\n}", "function getCountries($region_id) {\n global $myPDODB, $whereFilter;\n\n\n $whereLocal = array();\n array_push($whereLocal, \"c.region_id = $region_id\");\n\n $whereClause = getWhereClause($whereLocal);\n\n $sql = \"SELECT c.name AS 'name', c.id AS 'id', c.map_id as 'map_id',COUNT( s.id ) AS 'number', 'country' AS 'type'\nFROM countries AS c\nJOIN students AS s ON c.id = s.destination_country \njoin regions as r on c.region_id = r.id \n$whereClause\nGROUP BY c.name\nORDER BY c.name\";\n\n $sth = $myPDODB->prepare($sql);\n $result = $sth->execute();\n\n $output = array();\n\n if ($result) {\n $countries = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n foreach ($countries as $country) {\n // get the unis for each country\n $unis = getUnis($country['id']);\n array_push($output, array(\"item_id\" => ($country['map_id'] * 10) + ($region_id * 100000), \"name\" => $country['name'], \"number\" => $country['number'], \"type\" => $country['type'], \"children\" => $unis));\n }\n }\n\n // add the country details to the output array\n return $output;\n}", "function olc_get_country_zones($country_id) {\n\t$zones_array = array();\n\t$zones_query = olc_db_query(SELECT.\"zone_id, zone_name\".SQL_FROM . TABLE_ZONES . SQL_WHERE.\"zone_country_id = '\" . $country_id . \"' order by zone_name\");\n\twhile ($zones = olc_db_fetch_array($zones_query)) {\n\t\t$zones_array[] = array('id' => $zones['zone_id'],\n\t\t'text' => $zones['zone_name']);\n\t}\n\n\treturn $zones_array;\n}", "function ppt_resources_get_user_countries_per_cluster($data)\n{\n global $user;\n if ($user->uid == 0) {\n return services_error('Access Denied!', 403);\n }\n if (!isset($data['clusters'])) {\n return services_error('missing clusters!', 403);\n }\n $clusters = $data['clusters'];\n $countries = get_user_countries($user);\n // Loop over the countries to get the clusters.\n $clusters_countries = [];\n foreach ($countries as $country) {\n $country_term = taxonomy_term_load($country);\n if (!isset($country_term->field_cluster[LANGUAGE_NONE])) {\n continue;\n }\n $cluster_term_id = $country_term->field_cluster[LANGUAGE_NONE][0]['target_id'];\n if (in_array($cluster_term_id, $clusters)) {\n $clusters_countries[$cluster_term_id][] = ['id' => $country_term->tid, 'name' => $country_term->name];\n }\n }\n return $clusters_countries;\n}", "public function getCountriesPerRegion();", "public function actionGetCountriesList(){\n if(!empty($_POST['continent_id']) && is_numeric($_POST['continent_id'])){\n $data = Address::model()->findAll('parent_id = :parent_id', array(\n ':parent_id'=>(int)$_POST['continent_id']\n ));\n $data = CHtml::listData($data, 'id', 'name');\n foreach($data as $value=>$name){\n echo CHtml::tag('option', array('value'=>$value), CHtml::encode($name), true);\n }\n }\n }", "public function getCountry(){\n\t\n\t\tif(!isset($_SESSION['country_list'])){\n\t\t\t$country = $this->getData(\"select id,country,currency,flag,is_active,contact_email,address from country order by id\");\n\t\t\tforeach ($country as $k => $countrys) {\n\t\t\t\t$_SESSION['country_list'][$countrys['id']]=['id' => $countrys['id'],'country' => $countrys['country'], 'currency' => $countrys['currency'], 'flag'=>$countrys['flag'], 'is_active' => $countrys['is_active'], 'contact_email' => $countrys['contact_email'], 'address' => $countrys['address'] ];\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static function countries(): array\n\t{\n\t\treturn ArrayLists::countries();\n\t}", "public function loadPrioritized() {\n /* handle prioritized countries */\n $this->prioritizedCountries = array();\n $prioritized = $this->getOption('prioritized','');\n if (!empty($prioritized)) {\n $prioritized = explode(',',$prioritized);\n foreach ($this->countries as $countryKey => $countryName) {\n if (in_array($countryKey,$prioritized)) {\n $this->prioritizedCountries[] = $countryKey;\n }\n }\n }\n return $this->prioritizedCountries;\n }", "public function getZoneCountriesProperty()\n {\n return Country::whereIn('id', $this->selectedCountries)->get();\n }", "public static function getList()\n {\n\n $queryString = 'SELECT * from `countries` ORDER BY id ASC';\n\n $paramsArray = array();\n\n // query\n $dbh = new \\Components\\Db();\n $result = $dbh->getResult($queryString, $paramsArray);\n \n return $result;\n\n }", "function CityList()\n\t{\t$cities = array();\n\t\t$adminuser = new AdminUser((int)$_SESSION[SITE_NAME][\"auserid\"]);\n\t\t$sql = \"SELECT cities.*,countries.shortname FROM cities, countries WHERE cities.country=countries.ccode ORDER BY countries.shortname\";\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\tif ($adminuser->CanAccessCity($row[\"cityid\"]))\n\t\t\t\t{\t$cities[$row[\"cityid\"]] = $row[\"cityname\"] . \" - \" . $row[\"shortname\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $cities;\n\t}", "function get_all_countries($obj, $continent='')\n{\n\t$country_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_countries_list', array('continent'=>$continent)));\n\t\n\treturn $country_result->result_array();\n}", "public static function getCountriesDropdownArray() {\n global $lC_Language;\n \n $countries_array = array(array('id' => '',\n 'text' => $lC_Language->get('pull_down_default')));\n foreach (lC_Address::getCountries() as $country) {\n $countries_array[] = array('id' => $country['id'],\n 'text' => $country['name']);\n } \n \n return $countries_array; \n }", "function getcountries() {\n\t\t// import the country DB\n\t\t$cntArray = array();\t \n\t\tApp::import(\"Model\",\"Country\");\n\t\t$this->Country=& new Country();\n\t\t$country = $this->Country->find('all', array('conditions'=>array('Country.status'=>'1'), 'fields'=>array('Country.id','Country.country_name')));\n\t\tforeach($country as $cat){\n\t\t\t$cntArray[$cat['Country']['id']] = $cat['Country']['country_name'];\n\t\t}\n\t\treturn $cntArray;\n\t}", "public function getCountries(){\n $stmt = $this->databaseConnection->prepare(\"SELECT id_country, country_name FROM countries\");\n $stmt->execute();\n return $stmt->fetchAll();\n }", "function getCountries()\r\n {\r\n global $db;\r\n global $html;\r\n $sql = 'select ID, Name from Country order by Name ASC';\r\n $result = $db->query($sql);\r\n $countries = '';\r\n $n = $db->rowCount($result);\r\n for ($i = 0; $i < $n; $i++) {\r\n $row = $db->fetch($result);\r\n $selected = '';\r\n if(empty($_POST['country'])){$_POST['country'] = '412';}\r\n if($row['ID'] === $_POST['country']) {\r\n $selected = ' selected=\"selected\"';\r\n }\r\n $countries .= '<option'.$selected.' value=\"'.$row['ID'].'\">'.$html->text($row['Name']).'</option>';\r\n }\r\n }", "function findAllLocations() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM locations;'));\r\n\r\n\t}", "public function countries(): array\n {\n $payload = Payload::list('countries');\n\n $result = $this->transporter->get($payload->uri)->throw();\n\n return (array) $result->json('data');\n }", "public function getAllCountriesProperty()\n {\n return Country::get();\n }", "function tep_get_countries($countries_id = '', $with_iso_codes = false) {\n\t$countries_array = array();\n\tif (tep_not_null($countries_id)) {\n\t\tif ($with_iso_codes == true) {\n\t\t\t$countries = tep_db_query(\"select countries_name, countries_iso_code_2, countries_iso_code_3 from \" . TABLE_COUNTRIES . \" where countries_id = '\" . (int)$countries_id . \"' order by countries_name\");\n\t\t\t$countries_values = tep_db_fetch_array($countries);\n\t\t\t$countries_array = array('countries_name' => $countries_values['countries_name'],\n\t\t\t\t\t\t\t\t\t 'countries_iso_code_2' => $countries_values['countries_iso_code_2'],\n\t\t\t\t\t\t\t\t\t 'countries_iso_code_3' => $countries_values['countries_iso_code_3']);\n\t\t} else {\n\t\t\t$countries = tep_db_query(\"select countries_name from \" . TABLE_COUNTRIES . \" where countries_id = '\" . (int)$countries_id . \"'\");\n\t\t\t$countries_values = tep_db_fetch_array($countries);\n\t\t\t$countries_array = array('countries_name' => $countries_values['countries_name']);\n\t\t}\n\t} else {\n\t\t$countries = tep_db_query(\"select countries_id, countries_name from \" . TABLE_COUNTRIES . \" order by countries_name\");\n\t\twhile ($countries_values = tep_db_fetch_array($countries)) {\n\t\t\t$countries_array[] = array('countries_id' => $countries_values['countries_id'],\n\t\t\t\t\t\t\t\t\t 'countries_name' => $countries_values['countries_name']);\n\t\t}\n\t}\n\treturn $countries_array;\n}", "public function getCountries(){\n $countries = array();\n $db = DB::prepare('SELECT * FROM countries ORDER BY de ASC');\n $db->execute();\n while($result = $db->fetchObject()) { \n $this->id = $result->id; \n $this->code = $result->code; \n $this->en = $result->en; \n $this->de = $result->de; \n $countries[] = clone $this; \n }\n return $countries;\n }", "function outputCountries() { \r\n $countries = new CountryCollection();\r\n $countries->loadCollection();\r\n \r\n $result = $countries->getArray();\r\n \r\n for($i=0;$i<$countries->getCount();$i++){ \r\n\t\techo '<li class=\"list-group-item\">';\r\n\t\techo '<a href=\"single-country.php?country='. $result[$i]->getISO() . '\">';\r\n\t\techo $result[$i]->getCountryName() . '</a></li>';\r\n }\r\n}", "function getFilterUserCity(){\n\t$data = M('user');\n\t$city_set = Array();\n\t$result = $data->where(Array('reserved_1' => 'normal'))->group('city')->order(Array('convert(city using gbk)' => 'asc'))->select();\n\tforeach($result as $value)\n\t\tarray_push($city_set, $value['city']);\n\n\treturn $city_set;\n}", "public function getLocationList($return_active_only = TRUE);", "public function location_list(){\n\t\t$data = array();\n\t\t$data['status'] = 1;\n\t\t\n\t\t$offset = (int)$this->input->get('offset',0);\n\t\t$limit = (int)$this->input->get('limit',0);\n\t\t$user_id = $this->input->get('user_id');\n\t\t\n\t\t$notifications = $this->location_model->get_location_list($user_id,$offset,$limit);\n\t\t\n\t\t$data['data']['locations'] = $notifications;\n\t\t$this->json_response($data);\n\t}", "public function getListCountry()\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_country' );\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}", "private function _groupFieldCountries()\n {\n $this->_fieldCountries = [];\n foreach ($this->_addAccountfields as $country => $fields) {\n foreach ($fields as $field) {\n $this->_fieldCountries[$field][] = str_replace(\" \", \"-\", strtolower($country));\n }\n }\n return $this->_fieldCountries;\n }", "protected function getCountriesTables()\n {\n $dir = DOCALIST_DATA_DIR . '/tables/countries/';\n\n return [\n 'ISO-3166-1_alpha2_fr' => [\n 'path' => $dir . 'ISO-3166-1_alpha2_fr.txt',\n 'label' => __('Pays - Monde entier (codes 2 lettres, libellés en français)', 'docalist-data'),\n 'format' => 'table',\n 'type' => 'country',\n 'creation' => '2014-03-14 10:08:17',\n ],\n 'ISO-3166-1_alpha2_en' => [\n 'path' => $dir . 'ISO-3166-1_alpha2_en.txt',\n 'label' => __('Pays - Monde entier (codes 2 lettres, libellés en anglais)', 'docalist-data'),\n 'format' => 'table',\n 'type' => 'country',\n 'creation' => '2014-03-14 10:08:32',\n ],\n 'ISO-3166-1_alpha3-to-alpha2' => [\n 'path' => $dir . 'ISO-3166-1_alpha3-to-alpha2.txt',\n 'label' => __('Pays - Table de conversion des codes 3 lettres en codes 2 lettres', 'docalist-data'),\n 'format' => 'conversion',\n 'type' => 'country-conversion',\n 'creation' => '2014-03-14 10:09:01',\n ],\n 'country-to-continent' => [\n 'path' => $dir . 'country-to-continent.txt',\n 'label' => __('Pays - Table de conversion pays -> continent', 'docalist-data'),\n 'format' => 'conversion',\n 'type' => 'country-conversion',\n 'creation' => '2016-12-11 10:18:03',\n ],\n ];\n }", "function tep_get_country_zones($country_id) {\n $zones_array = array();\n\n $Qzones = Registry::get('Db')->get('zones', [\n 'zone_id',\n 'zone_name'\n ], [\n 'zone_country_id' => (int)$country_id\n ], 'zone_name');\n\n while ($Qzones->fetch()) {\n $zones_array[] = [\n 'id' => $Qzones->valueInt('zone_id'),\n 'text' => $Qzones->value('zone_name')\n ];\n }\n\n return $zones_array;\n }" ]
[ "0.74711514", "0.6865445", "0.66405714", "0.642414", "0.64046234", "0.6379594", "0.6359848", "0.63485265", "0.6315212", "0.63120854", "0.6269753", "0.62527496", "0.62338364", "0.6229553", "0.61809915", "0.6132394", "0.61199135", "0.6118651", "0.6097875", "0.6093005", "0.60629416", "0.6057391", "0.6025591", "0.59851944", "0.59777546", "0.5977339", "0.5946391", "0.59135026", "0.59109765", "0.5902863", "0.5887499", "0.5882203", "0.587381", "0.5867608", "0.5853334", "0.58517575", "0.5818457", "0.58170605", "0.57899725", "0.5780047", "0.57779986", "0.5776308", "0.5776008", "0.577434", "0.5762625", "0.5748363", "0.57420343", "0.5741121", "0.5726891", "0.57256734", "0.5725088", "0.56884676", "0.56793326", "0.56757796", "0.5664754", "0.56644726", "0.5663394", "0.5661912", "0.5624599", "0.5624559", "0.562395", "0.562395", "0.562395", "0.56148154", "0.5606959", "0.5604116", "0.5602014", "0.5601879", "0.55934477", "0.5586779", "0.55765605", "0.5555874", "0.555438", "0.5550936", "0.5547933", "0.55423224", "0.55364317", "0.55344325", "0.5522579", "0.5515785", "0.550194", "0.5501549", "0.549886", "0.54914814", "0.54883415", "0.5477641", "0.5476497", "0.5476471", "0.54758155", "0.5458491", "0.5454296", "0.5453944", "0.54491985", "0.5444764", "0.54445064", "0.54373646", "0.54350144", "0.54316795", "0.54302186", "0.5429415" ]
0.6729927
2
Create a list of all the countries of the user in the databse
public function getAllCountriesLocations() { $sCacheId = $this->cache()->set('gmap.countries'); if (!($aRows = $this->cache()->get($sCacheId))) { $aRows = $this->database()->select('fc.country_iso, c.name, c.phrase_var_name, fc.*, COUNT(u.user_id) as total_people') ->from(Phpfox::getT('gmap_countries'), 'fc') ->join(Phpfox::getT('country'), 'c', 'fc.country_iso = c.country_iso') ->join(Phpfox::getT('user'), 'u', 'u.country_iso = fc.country_iso') ->join(Phpfox::getT('gmap'), 'f', 'u.user_id = f.user_id') ->group('u.country_iso') ->where('f.not_found = \'0\'') ->execute('getSlaveRows'); $this->cache()->save($sCacheId, $aRows); } if($aRows != null && is_array($aRows)) { foreach($aRows as $key => $aRow) { if(isset($aRow['phrase_var_name']) && $aRow['phrase_var_name'] != '') { $aRows[$key]['name'] = Phpfox::getPhrase($aRow['phrase_var_name']); } } $aRows = $this->sortByProperty($aRows, 'name'); } return $aRows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countryList()\n {\n $arrClms = array(\n 'country_id',\n 'name',\n );\n $varOrderBy = 'name ASC ';\n $arrRes = $this->select(TABLE_COUNTRY, $arrClms);\n //pre($arrRes);\n return $arrRes;\n }", "public static function getCountryList(){\n return Country::find()\n ->orderBy(['name'=>SORT_ASC])\n ->all();\n }", "public function country_list()\n {\n $result = common_select_values('id, name', 'ad_countries', '', 'result');\n return $result; \n }", "function getAllCountries() {\n $myModel = new My_Model();\n $result = $myModel->select('countries', \"*\", null);\n if (count($result) > 1) {\n return $result = [\n \"message\" => \"countries list\",\n \"data\" => $result\n ];\n } else {\n return $resp = [\n \"message\" => \"no country available\",\n \"data\" => \"null\"\n ];\n }\n }", "public function countryList(){\n $response['status'] = \"false\"; \n $response['message'] = \"Invalid request.\"; \n \n $country = Country::getCountries();\n if(!empty($country)){\n $response['status'] = \"true\"; \n $response['message'] = \"Country data.\"; \n $response['data'] = $country; \n }\n $this->response($response);\n \n }", "private function returnCountriesForUser()\n {\n\n $tableCountryExt = CountryExt::tablename();\n $tableCountry = Country::tablename();\n\n /* $role=Yii::$app->user->getIdentity()->role;\n //If I'm admin just get all countries\n if($role==User::ROLE_ADMIN || $role==User::ROLE_SUPERADMIN || $role==User::ROLE_MARKETER)\n {\n $countries = Country::listAllCountries();\n }\n //otherwise find all countries where specific lanuage(language of current user is) is spoken\n else\n {\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n } */\n\n //return countries per language\n $languageId = Language::getCurrentId(); //for example: 7\n $countries = Country::listCountries($languageId);\n\n return $countries;\n }", "public function get_all_countries_list()\n\t {\n\t \t$query=$this->ApiModel->get_all_countries();\n\t \techo json_encode($query);\n\t }", "public function getCountries();", "function getCountries()\r\n {\r\n global $db;\r\n global $html;\r\n $sql = 'select ID, Name from Country order by Name ASC';\r\n $result = $db->query($sql);\r\n $countries = '';\r\n $n = $db->rowCount($result);\r\n for ($i = 0; $i < $n; $i++) {\r\n $row = $db->fetch($result);\r\n $selected = '';\r\n if(empty($_POST['country'])){$_POST['country'] = '412';}\r\n if($row['ID'] === $_POST['country']) {\r\n $selected = ' selected=\"selected\"';\r\n }\r\n $countries .= '<option'.$selected.' value=\"'.$row['ID'].'\">'.$html->text($row['Name']).'</option>';\r\n }\r\n }", "public function countryList(){\n $sorted = $this->country->select('id','country_name')->get()->sortBy('country_name');\n return $sorted->values()->all();\n }", "public function getCountries(){\n $stmt = $this->databaseConnection->prepare(\"SELECT id_country, country_name FROM countries\");\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public function get_country_list() \n\t{\n\t\treturn $this->db->select('num_code')\n\t\t->select('country_name')\n\t\t->select('num_code')\n\t\t->from('system_iso3166_l10n')\n\t\t->order_by('country_name', 'ASC')\t\n\t\t->get()->result();\n\t}", "function getSiteCountries() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_COUNTRIES . \" WHERE status='1' ORDER BY country_name\");\n\n return $data;\n }", "public function getCountries() {\n $db = database::getDB();\n $query = \"SELECT country FROM countries ORDER BY id\";\n $data = $db->query($query);\n return $data;\n }", "function displayAvailableCountries() {\n $db = dbConnect();\n $countries = dbGetAllCountries($db); // Récupération des pays\n\n // Création d'une ligne par pays avec comme value le code ISO et comme texte le nom du pays\n foreach($countries as $country) {\n echo \"<option value='\" . $country->getIso_code() . \"'>\" . $country->getName() . \"</option>\";\n }\n }", "public function getCountryList()\n {\n return $this->call('country.list');\n }", "public static function getList()\n {\n\n $queryString = 'SELECT * from `countries` ORDER BY id ASC';\n\n $paramsArray = array();\n\n // query\n $dbh = new \\Components\\Db();\n $result = $dbh->getResult($queryString, $paramsArray);\n \n return $result;\n\n }", "static function get_countries() {\n static $ret = array();\n if(empty($ret)) {\n global $wpdb;\n $ret = $wpdb->get_results('SELECT * FROM ai_country ORDER BY name', OBJECT_K);\n }\n return $ret;\n }", "public function listCountries() {\r\n\t\t\t$sql = Connection::getHandle()->prepare(\"SELECT DISTINCT c.countries_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_name,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.countries_iso_code_2,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCASE WHEN z.zone_id > 0 THEN 'true' ELSE 'false' END AS zone\r\n\t\t\t\t\t\t\t\t\t\tFROM bs_countries c\r\n\t\t\t\t\t\t\t\t\t\tLEFT JOIN bs_zones z ON (c.countries_iso_code_2 = z.countries_id)\r\n\t\t\t\t\t\t\t\t\t\tGROUP BY c.countries_id\r\n\t\t\t\t\t\t\t\t\t\tORDER BY c.countries_id\");\r\n\t\t\t$sql->execute();\r\n\r\n\t\t\twhile ($row = $sql->fetch(PDO::FETCH_ASSOC)) {\r\n\t\t\t\t$results[] = $row;\r\n\t\t\t}\r\n\r\n\t\t\treturn $results;\r\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countriesRepository = $em->getRepository('ShopBundle:Countries');\n\n $countryList = $countriesRepository->findBy(\n array(),\n array('country' => 'ASC')\n );\n\n return array(\n 'countryList' => $countryList,\n );\n }", "public function countryOptionList();", "function CountriesList()\n\t{\t$countries = array();\n\t\t$adminuser = new AdminUser((int)$_SESSION[SITE_NAME][\"auserid\"]);\n\t\t\n\t\t$sql = \"SELECT countries.ccode, countries.shortname, IF(toplist > 0, 0, 1) AS istoplist FROM countries ORDER BY istoplist, toplist, shortname\";\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$countries[$row[\"ccode\"]] = $row[\"shortname\"];\n\t\t\t}\n\t\t}\n\t\treturn $countries;\n\t}", "public function getCountrylist()\n {\n $cachePool = new FilesystemAdapter('', 0, \"cache\");\n \n if ($cachePool->hasItem('countries')) {\n $countries = $cachePool->getItem('countries')->get();\n } else {\n $countries = $this->client->request(\n 'GET',\n 'https://kayaposoft.com/enrico/json/v2.0?action=getSupportedCountries'\n )->toArray();\n $countriesCache = $cachePool->getItem('countries');\n \n if (!$countriesCache->isHit()) {\n $countriesCache->set($countries);\n $countriesCache->expiresAfter(60*60*24);\n $cachePool->save($countriesCache);\n }\n }\n\n return $countries;\n }", "public function countryList ( Request $request ) {\n $countries = Country::all();\n return response()->json([\n \"response\" => $countries\n ]);\n }", "public function getCountryList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('country');\r\n\t\t$this->db->where('country_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function getCountriesInfo();", "public function getCountry(){\n\t\n\t\tif(!isset($_SESSION['country_list'])){\n\t\t\t$country = $this->getData(\"select id,country,currency,flag,is_active,contact_email,address from country order by id\");\n\t\t\tforeach ($country as $k => $countrys) {\n\t\t\t\t$_SESSION['country_list'][$countrys['id']]=['id' => $countrys['id'],'country' => $countrys['country'], 'currency' => $countrys['currency'], 'flag'=>$countrys['flag'], 'is_active' => $countrys['is_active'], 'contact_email' => $countrys['contact_email'], 'address' => $countrys['address'] ];\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function getCountryList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('country');\n\t\t$this->db->where('country_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "function get_country() {\n $sql = \"Select * FROM country\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function actionCountries()\n {\n $continentId = Yii::$app->request->get(\"continentId\");\n $countries = Country::getAvailable( $continentId );\n echo json_encode( $countries );\n Yii::$app->end(200);\n }", "function get_all_countries($obj, $continent='')\n{\n\t$country_result = $obj->db->query($obj->Query_reader->get_query_by_code('get_countries_list', array('continent'=>$continent)));\n\t\n\treturn $country_result->result_array();\n}", "public function getAllCountries() {\n $sql = \"SELECT * FROM countries\";\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n return false;\n } else {\n return $result->result_array();\n }\n }", "private function setCountriesFromDB()\n {\n /** @var Country $item */\n foreach (app(Languages::class)->all() as $item) {\n $this->valueOptions[] = new Option($item->id, $item->name, ['data-country' => $item->code]);\n }\n }", "public function GetCountries(){\n try {\n \n // $country=new Countries();\n $countries=Countries::model()->GetCountries();\n return $countries;\n \n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:GetCountries::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n }\n }", "public static function All()\n\t{\n\t\t$query = 'EXEC [getCountries]';\n\t\t$query .= '@languageCode = \\'' . Localisation::getCurrentLanguage() . '\\'';\n\n\t\t$rows = Database::ODBCExecute($query);\n\n\t\t$countries = array();\n\t\tforeach ($rows as $row) {\n\t\t\t$countries[] = new Country(\n\t\t\t\t$row['code'],\n\t\t\t\t$row['name']\n\t\t\t);\n\t\t}\n\n\t\treturn $countries;\n\t}", "function getCountryList($options = array()) {\n\t\t$local_country_data = array();\n\t\t$where = array();\n\n\t\t# possible options of filtering\n\t\tif (!empty($options['country_id']))\n\t\t$where[] = \"id = \".$options['country_id'];\n\n\t\t# build SQL request\n\t\t$_sql = \"SELECT `id`, `iso2`, `iso3`, `name`\n\t\t\t\tFROM `%s` %s ORDER BY `name` ASC\";\n\t\t$sql = sprintf($_sql,\n\t\t$this->country_table,\n\t\t!empty($where) ? \"WHERE \".implode(\" AND \", $where) : \"\"\n\t\t);\n\t\t$result = mysql_query($sql);\n\n\t\twhile ($_city = mysql_fetch_assoc($result)) {\n\t\t\t$this->country_data[$_city['id']] = array (\n\t\t\t'id'\t=> $_city['id'],\n\t\t\t'iso2'\t=> $_city['iso2'],\n\t\t\t'iso3'\t=> $_city['iso3'],\n\t\t\t'name'\t=> $_city['name'],\n\t\t\t);\n\t\t\t$local_country_data[] = $this->country_data[$_city['id']];\n\t\t}\n\n\t\treturn $local_country_data;\n\t}", "public function getCountriesList() {\n return $this->_get(7);\n }", "public function getCountryList()\r\n {\r\n return $this->admin->sGetCountryList();\r\n }", "function country_list()\t{\r\n\t\t$list = array(\r\n\t\t\t'AF' => 'Afghanistan',\r\n\t\t\t'AX' => 'Aland Island (Finland)',\r\n\t\t\t'AL' => 'Albania',\r\n\t\t\t'DZ' => 'Algeria',\r\n\t\t\t'AD' => 'Andorra',\r\n\t\t\t'AO' => 'Angola',\r\n\t\t\t'AI' => 'Anguilla',\r\n\t\t\t'AG' => 'Antigua and Barbuda',\r\n\t\t\t'AR' => 'Argentina',\r\n\t\t\t'AM' => 'Armenia',\r\n\t\t\t'AW' => 'Aruba',\r\n\t\t\t'AU' => 'Australia',\r\n\t\t\t'AT' => 'Austria',\r\n\t\t\t'AZ' => 'Azerbaijan',\r\n\t\t\t'BS' => 'Bahamas',\r\n\t\t\t'BH' => 'Bahrain',\r\n\t\t\t'BD' => 'Bangladesh',\r\n\t\t\t'BB' => 'Barbados',\r\n\t\t\t'BY' => 'Belarus',\r\n\t\t\t'BE' => 'Belgium',\r\n\t\t\t'BZ' => 'Belize',\r\n\t\t\t'BJ' => 'Benin',\r\n\t\t\t'BM' => 'Bermuda',\r\n\t\t\t'BT' => 'Bhutan',\r\n\t\t\t'BO' => 'Bolivia',\r\n\t\t\t'BQ' => 'Bonaire (Netherlands Antilles)',\r\n\t\t\t'BA' => 'Bosnia-Herzegovina',\r\n\t\t\t'BW' => 'Botswana',\r\n\t\t\t'BR' => 'Brazil',\r\n\t\t\t'VG' => 'British Virgin Islands',\r\n\t\t\t'BN' => 'Brunei Darussalam',\r\n\t\t\t'BG' => 'Bulgaria',\r\n\t\t\t'BF' => 'Burkina Faso',\r\n\t\t\t'MM' => 'Burma',\r\n\t\t\t'BI' => 'Burundi',\r\n\t\t\t'KH' => 'Cambodia',\r\n\t\t\t'CM' => 'Cameroon',\r\n\t\t\t'CA' => 'Canada',\r\n\t\t\t'CV' => 'Cape Verde',\r\n\t\t\t'KY' => 'Cayman Islands',\r\n\t\t\t'CF' => 'Central African Republic',\r\n\t\t\t'TD' => 'Chad',\r\n\t\t\t'CL' => 'Chile',\r\n\t\t\t'CN' => 'China',\r\n\t\t\t'CX' => 'Christmas Island (Australia)',\r\n\t\t\t'CC' => 'Cocos Island (Australia)',\r\n\t\t\t'CO' => 'Colombia',\r\n\t\t\t'KM' => 'Comoros',\r\n\t\t\t'CG' => 'Congo, Republic of the',\r\n\t\t\t'CD' => 'Congo, Democratic Republic of the',\r\n\t\t\t'CK' => 'Cook Islands (New Zealand)',\r\n\t\t\t'CR' => 'Costa Rica',\r\n\t\t\t'CI' => 'Cote d\\'Ivoire',\r\n\t\t\t'HR' => 'Croatia',\r\n\t\t\t'CU' => 'Cuba',\r\n\t\t\t'CW' => 'Curacao (Netherlands Antilles)',\r\n\t\t\t'CY' => 'Cyprus',\r\n\t\t\t'CZ' => 'Czech Republic',\r\n\t\t\t'DK' => 'Denmark',\r\n\t\t\t'DJ' => 'Djibouti',\r\n\t\t\t'DM' => 'Dominica',\r\n\t\t\t'DO' => 'Dominican Republic',\r\n\t\t\t'TL' => 'East Timor (Indonesia)',\r\n\t\t\t'EC' => 'Ecuador',\r\n\t\t\t'EG' => 'Egypt',\r\n\t\t\t'SV' => 'El Salvador',\r\n\t\t\t'GQ' => 'Equatorial Guinea',\r\n\t\t\t'ER' => 'Eritrea',\r\n\t\t\t'EE' => 'Estonia',\r\n\t\t\t'ET' => 'Ethiopia',\r\n\t\t\t'FK' => 'Falkland Islands',\r\n\t\t\t'FO' => 'Faroe Islands',\r\n\t\t\t'FJ' => 'Fiji',\r\n\t\t\t'FI' => 'Finland',\r\n\t\t\t'FR' => 'France',\r\n\t\t\t'GF' => 'French Guiana',\r\n\t\t\t'PF' => 'French Polynesia',\r\n\t\t\t'GA' => 'Gabon',\r\n\t\t\t'GM' => 'Gambia',\r\n\t\t\t'GE' => 'Georgia, Republic of',\r\n\t\t\t'DE' => 'Germany',\r\n\t\t\t'GH' => 'Ghana',\r\n\t\t\t'GI' => 'Gibraltar',\r\n\t\t\t'GB' => 'Great Britain and Northern Ireland',\r\n\t\t\t'GR' => 'Greece',\r\n\t\t\t'GL' => 'Greenland',\r\n\t\t\t'GD' => 'Grenada',\r\n\t\t\t'GP' => 'Guadeloupe',\r\n\t\t\t'GT' => 'Guatemala',\r\n\t\t\t'GG' => 'Guernsey',\r\n\t\t\t'GN' => 'Guinea',\r\n\t\t\t'GW' => 'Guinea-Bissau',\r\n\t\t\t'GY' => 'Guyana',\r\n\t\t\t'HT' => 'Haiti',\r\n\t\t\t'HN' => 'Honduras',\r\n\t\t\t'HK' => 'Hong Kong',\r\n\t\t\t'HU' => 'Hungary',\r\n\t\t\t'IS' => 'Iceland',\r\n\t\t\t'IN' => 'India',\r\n\t\t\t'ID' => 'Indonesia',\r\n\t\t\t'IR' => 'Iran',\r\n\t\t\t'IQ' => 'Iraq',\r\n\t\t\t'IE' => 'Ireland',\r\n\t\t\t'IM' => 'Isle of Man (Great Britain and Northern Ireland)',\r\n\t\t\t'IL' => 'Israel',\r\n\t\t\t'IT' => 'Italy',\r\n\t\t\t'JM' => 'Jamaica',\r\n\t\t\t'JP' => 'Japan',\r\n\t\t\t'JE' => 'Jersey (Channel Islands) (Great Britain and Northern Ireland)',\r\n\t\t\t'JO' => 'Jordan',\r\n\t\t\t'KZ' => 'Kazakhstan',\r\n\t\t\t'KE' => 'Kenya',\r\n\t\t\t'KI' => 'Kiribati',\r\n\t\t\t'KW' => 'Kuwait',\r\n\t\t\t'KG' => 'Kyrgyzstan',\r\n\t\t\t'LA' => 'Laos',\r\n\t\t\t'LV' => 'Latvia',\r\n\t\t\t'LB' => 'Lebanon',\r\n\t\t\t'LS' => 'Lesotho',\r\n\t\t\t'LR' => 'Liberia',\r\n\t\t\t'LY' => 'Libya',\r\n\t\t\t'LI' => 'Liechtenstein',\r\n\t\t\t'LT' => 'Lithuania',\r\n\t\t\t'LU' => 'Luxembourg',\r\n\t\t\t'MO' => 'Macao',\r\n\t\t\t'MK' => 'Macedonia, Republic of',\r\n\t\t\t'MG' => 'Madagascar',\r\n\t\t\t'MW' => 'Malawi',\r\n\t\t\t'MY' => 'Malaysia',\r\n\t\t\t'MV' => 'Maldives',\r\n\t\t\t'ML' => 'Mali',\r\n\t\t\t'MT' => 'Malta',\r\n\t\t\t'MQ' => 'Martinique',\r\n\t\t\t'MR' => 'Mauritania',\r\n\t\t\t'MU' => 'Mauritius',\r\n\t\t\t'YT' => 'Mayotte (France)',\r\n\t\t\t'MX' => 'Mexico',\r\n\t\t\t'MD' => 'Moldova',\r\n\t\t\t'MC' => 'Monaco (France)',\r\n\t\t\t'MN' => 'Mongolia',\r\n\t\t\t'ME' => 'Montenegro',\r\n\t\t\t'MS' => 'Montserrat',\r\n\t\t\t'MA' => 'Morocco',\r\n\t\t\t'MZ' => 'Mozambique',\r\n\t\t\t'NA' => 'Namibia',\r\n\t\t\t'NR' => 'Nauru',\r\n\t\t\t'NP' => 'Nepal',\r\n\t\t\t'NL' => 'Netherlands',\r\n\t\t\t'AN' => 'Netherlands Antilles',\r\n\t\t\t'NC' => 'New Caledonia',\r\n\t\t\t'NZ' => 'New Zealand',\r\n\t\t\t'NI' => 'Nicaragua',\r\n\t\t\t'NE' => 'Niger',\r\n\t\t\t'NG' => 'Nigeria',\r\n\t\t\t'NU' => 'Niue',\r\n\t\t\t'NF' => 'Norfolk Island',\r\n\t\t\t'KP' => 'North Korea (Korea, Democratic People\\'s Republic of)',\r\n\t\t\t'NO' => 'Norway',\r\n\t\t\t'OM' => 'Oman',\r\n\t\t\t'PK' => 'Pakistan',\r\n\t\t\t'PA' => 'Panama',\r\n\t\t\t'PG' => 'Papua New Guinea',\r\n\t\t\t'PY' => 'Paraguay',\r\n\t\t\t'PE' => 'Peru',\r\n\t\t\t'PH' => 'Philippines',\r\n\t\t\t'PN' => 'Pitcairn Island',\r\n\t\t\t'PL' => 'Poland',\r\n\t\t\t'PT' => 'Portugal',\r\n\t\t\t'QA' => 'Qatar',\r\n\t\t\t'RE' => 'Reunion',\r\n\t\t\t'RO' => 'Romania',\r\n\t\t\t'RU' => 'Russia',\r\n\t\t\t'RW' => 'Rwanda',\r\n\t\t\t'BL' => 'Saint Barthelemy (Guadeloupe)',\r\n\t\t\t'SH' => 'Saint Helena',\r\n\t\t\t'KN' => 'Saint Kitts (Saint Christopher and Nevis)',\r\n\t\t\t'LC' => 'Saint Lucia',\r\n\t\t\t'MF' => 'Saint Martin (French) (Guadeloupe)',\r\n\t\t\t'PM' => 'Saint Pierre and Miquelon',\r\n\t\t\t'VC' => 'Saint Vincent and the Grenadines',\r\n\t\t\t'SM' => 'San Marino',\r\n\t\t\t'ST' => 'Sao Tome and Principe',\r\n\t\t\t'SA' => 'Saudi Arabia',\r\n\t\t\t'SN' => 'Senegal',\r\n\t\t\t'RS' =>\t'Serbia, Republic of',\r\n\t\t\t'SC' => 'Seychelles',\r\n\t\t\t'SL' => 'Sierra Leone',\r\n\t\t\t'SG' => 'Singapore',\r\n\t\t\t'SX' => 'Saint Maarten (Dutch) (Netherlands Antilles)',\r\n\t\t\t'SK' => 'Slovak Republic',\r\n\t\t\t'SI' => 'Slovenia',\r\n\t\t\t'SB' => 'Solomon Islands',\r\n\t\t\t'SO' => 'Somalia',\r\n\t\t\t'ZA' => 'South Africa',\r\n\t\t\t'GS' => 'South Georgia (Falkland Islands)',\r\n\t\t\t'KR' => 'South Korea (Korea, Republic of)',\r\n\t\t\t'SS' => 'Sudan', // South Sudan, not listed separately from Sudan by USPS\r\n\t\t\t'ES' => 'Spain',\r\n\t\t\t'LK' => 'Sri Lanka',\r\n\t\t\t'SD' => 'Sudan',\r\n\t\t\t'SR' => 'Suriname',\r\n\t\t\t'SZ' => 'Swaziland',\r\n\t\t\t'SE' => 'Sweden',\r\n\t\t\t'CH' => 'Switzerland',\r\n\t\t\t'SY' => 'Syrian Arab Republic',\r\n\t\t\t'TW' => 'Taiwan',\r\n\t\t\t'TJ' => 'Tajikistan',\r\n\t\t\t'TZ' => 'Tanzania',\r\n\t\t\t'TH' => 'Thailand',\r\n\t\t\t'TG' => 'Togo',\r\n\t\t\t'TK' => 'Tokelau (Union Group) (Western Samoa)',\r\n\t\t\t'TO' => 'Tonga',\r\n\t\t\t'TT' => 'Trinidad and Tobago',\r\n\t\t\t'TN' => 'Tunisia',\r\n\t\t\t'TR' => 'Turkey',\r\n\t\t\t'TM' => 'Turkmenistan',\r\n\t\t\t'TC' => 'Turks and Caicos Islands',\r\n\t\t\t'TV' => 'Tuvalu',\r\n\t\t\t'UG' => 'Uganda',\r\n\t\t\t'UA' => 'Ukraine',\r\n\t\t\t'AE' => 'United Arab Emirates',\r\n\t\t\t'UY' => 'Uruguay',\r\n\t\t\t'UZ' => 'Uzbekistan',\r\n\t\t\t'VU' => 'Vanuatu',\r\n\t\t\t'VA' => 'Vatican City',\r\n\t\t\t'VE' => 'Venezuela',\r\n\t\t\t'VN' => 'Vietnam',\r\n\t\t\t'WF' => 'Wallis and Futuna Islands',\r\n\t\t\t'WS' => 'Western Samoa',\r\n\t\t\t'YE' => 'Yemen',\r\n\t\t\t'ZM' => 'Zambia',\r\n\t\t\t'ZW' => 'Zimbabwe');\r\n\t\treturn $list;\r\n\t}", "public function getCountries(){\n $countries = array();\n $db = DB::prepare('SELECT * FROM countries ORDER BY de ASC');\n $db->execute();\n while($result = $db->fetchObject()) { \n $this->id = $result->id; \n $this->code = $result->code; \n $this->en = $result->en; \n $this->de = $result->de; \n $countries[] = clone $this; \n }\n return $countries;\n }", "function getcountries() {\n\t\t// import the country DB\n\t\t$cntArray = array();\t \n\t\tApp::import(\"Model\",\"Country\");\n\t\t$this->Country=& new Country();\n\t\t$country = $this->Country->find('all', array('conditions'=>array('Country.status'=>'1'), 'fields'=>array('Country.id','Country.country_name')));\n\t\tforeach($country as $cat){\n\t\t\t$cntArray[$cat['Country']['id']] = $cat['Country']['country_name'];\n\t\t}\n\t\treturn $cntArray;\n\t}", "public function getCountryList() {\n $result = array();\n $collection = Mage::getModel('directory/country')->getCollection();\n foreach ($collection as $country) {\n $cid = $country->getId();\n $cname = $country->getName();\n $result[$cid] = $cname;\n }\n return $result;\n }", "public function fetchCountries(){\n\t\t\t// fetch countries\n\t\t\t$getCountries = \"SELECT * FROM countries\";\n\t\t\t$getCountries = mysqli_query($this->plug, $getCountries);\n\n\t\t\t$dataArr = [];\n\n\t\t\twhile ($row = mysqli_fetch_assoc($getCountries)) {\n\t\t\t\t# code...\n\t\t\t\tarray_push($dataArr, $row);\n\t\t\t}\n\t\t\treturn $dataArr;\n\t\t}", "function outputCountriesList() {\r\n $countries = new CountryCollection();\r\n $countries->loadCollection();\r\n \r\n $result = $countries->getArray();\r\n\t\r\n for($i=0;$i<$countries->getCount();$i++){\r\n\t\t echo '<option value=\"'. $result[$i]->getISO(). '\">' . $result[$i]->getCountryName() . '</option>';\r\n\t}\r\n}", "public function getCountryList()\n {\n $countryList=array(\n 'BG'=>__('Bulgaria')\n 'DE'=>__('Germany'),\n 'GB'=>__('Great Britain'),\n );\n\n return $countryList;\n }", "public function actionCountries()\n {\n $salys = Yii::$app->db_prod->createCommand(\"SELECT * FROM salys\")->queryAll();\n foreach ($salys as $salis) {\n $city = new City([\n 'name' => $salis['pavadinimas_lt'],\n 'ansi_name' => $salis['pavadinimas_lt'],\n 'alt_name' => $this->formatCountryAltName($salis),\n 'latitude' => $salis['latitude'],\n 'longitude' => $salis['longitude'],\n 'country_code' => strtoupper($salis['kodas']),\n 'population' => null,\n 'elevation' => null,\n 'timezone' => null,\n 'modification_date' => null,\n ]);\n $city->save();\n }\n\n Cities::addCountries();\n }", "public function getCreateCountries()\n {\n return <<<CQL\nMATCH (q:Question)-[:HAS_ANSWER]->(a)\nWHERE q.question CONTAINS('What country do you')\nWITH COLLECT(DISTINCT a.answer) AS countries\nUNWIND countries AS country\nMERGE (c:Country { name: country })\nWITH c\nMERGE (p:Planet { name: 'Earth' })\nMERGE (p)-[:CHILD]->(c);\nCQL;\n }", "public function getCustomerCountryList()\n {\n $customerCountryList = DB::table('country')\n ->join('city', 'country.country_id', '=', 'city.country_id')\n ->join('address', 'city.city_id', '=', 'address.city_id')\n ->join('customer', 'customer.address_id', '=', 'address.address_id')\n ->select(DB::raw('country.country, COUNT(customer.*)'))\n ->groupBy('country.country')\n ->orderBy('country')\n ->get();\n\n return response()->json([\n 'success' => true,\n 'message' => 'Customers country list',\n 'data' => $customerCountryList\n ]);\n }", "public function sGetCountryList()\n {\n $context = Shopware()->Container()->get('shopware_storefront.context_service')->getShopContext();\n $service = Shopware()->Container()->get('shopware_storefront.location_service');\n\n $countryList = $service->getCountries($context);\n $countryList = Shopware()->Container()->get('legacy_struct_converter')->convertCountryStructList($countryList);\n\n $countryList = array_map(function ($country) {\n $request = $this->front->Request();\n $countryId = (int) $country['id'];\n $country['flag'] = ((int) $request->getPost('country') === $countryId || (int) $request->getPost('countryID') === $countryId);\n\n return $country;\n }, $countryList);\n\n $countryList = $this->eventManager->filter(\n 'Shopware_Modules_Admin_GetCountries_FilterResult',\n $countryList,\n ['subject' => $this]\n );\n\n return $countryList;\n }", "public function countries(){\n $countries=Country::all();\n if ($countries){\n $countriesArray = [];\n foreach ($countries as $country) {\n array_push($countriesArray, $country->country);\n }\n return response()->json([\"Status\"=>\"Ok\",\"data\"=>$countriesArray],200);\n }else{\n return response()->json([\"Status\"=>\"No Content\"],204);\n }\n }", "public function getCountries() {\n $dql = \"SELECT c from Country c\n ORDER BY c.name\";\n $countries = $this->em\n ->createQuery($dql)\n ->getResult();\n return $countries;\n }", "public function getAllCountries() {\n return $this->_countries->pluck ( 'name', 'code','id','flag');\n }", "public function countries()\n {\n $countries = Countries::where('status', 'active')->orderBy('idx')->get();\n return view('setup.countries.index', compact('countries'));\n }", "public static function getCountries()\n {\n return self::$countryList;\n }", "function tep_get_countries($default = '') {\n $countries_array = array();\n if ($default) {\n $countries_array[] = array('id' => '',\n 'text' => $default);\n }\n $countries_query = tep_db_query(\"select countries_id, countries_name from \" . TABLE_COUNTRIES . \" order by countries_name\");\n while ($countries = tep_db_fetch_array($countries_query)) {\n $countries_array[] = array('id' => $countries['countries_id'],\n 'text' => $countries['countries_name']);\n }\n\n return $countries_array;\n}", "public function select_list()\n\t{\n\t\t$list = array();\t\t\n\t\t$orm = ORM::factory('country');\t\t\n\t\t$list = $orm->select_list('id','name');\n\t\t\n\t\treturn $list;\n\t}", "public function index()\n {\n $countries=$this->countryRepository->getAllCountries();\n return view('backend.constants.countries.all_countries',compact('countries'));\n }", "function GetCountries()\n\t{\n\t\t$result = $this->sendRequest(\"GetCountries\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getCountries()\n {\n return \"/V1/directory/countries\";\n }", "function _country_get_predefined_list() {\n static $countries;\n\n if (isset($countries)) {\n return $countries;\n }\n $t = get_t();\n\n $countries = array(\n 'AD' => $t('Andorra'),\n 'AE' => $t('United Arab Emirates'),\n 'AF' => $t('Afghanistan'),\n 'AG' => $t('Antigua and Barbuda'),\n 'AI' => $t('Anguilla'),\n 'AL' => $t('Albania'),\n 'AM' => $t('Armenia'),\n 'AN' => $t('Netherlands Antilles'),\n 'AO' => $t('Angola'),\n 'AQ' => $t('Antarctica'),\n 'AR' => $t('Argentina'),\n 'AS' => $t('American Samoa'),\n 'AT' => $t('Austria'),\n 'AU' => $t('Australia'),\n 'AW' => $t('Aruba'),\n 'AX' => $t('Aland Islands'),\n 'AZ' => $t('Azerbaijan'),\n 'BA' => $t('Bosnia and Herzegovina'),\n 'BB' => $t('Barbados'),\n 'BD' => $t('Bangladesh'),\n 'BE' => $t('Belgium'),\n 'BF' => $t('Burkina Faso'),\n 'BG' => $t('Bulgaria'),\n 'BH' => $t('Bahrain'),\n 'BI' => $t('Burundi'),\n 'BJ' => $t('Benin'),\n 'BL' => $t('Saint Barthélemy'),\n 'BM' => $t('Bermuda'),\n 'BN' => $t('Brunei'),\n 'BO' => $t('Bolivia'),\n 'BR' => $t('Brazil'),\n 'BS' => $t('Bahamas'),\n 'BT' => $t('Bhutan'),\n 'BV' => $t('Bouvet Island'),\n 'BW' => $t('Botswana'),\n 'BY' => $t('Belarus'),\n 'BZ' => $t('Belize'),\n 'CA' => $t('Canada'),\n 'CC' => $t('Cocos (Keeling) Islands'),\n 'CD' => $t('Congo (Kinshasa)'),\n 'CF' => $t('Central African Republic'),\n 'CG' => $t('Congo (Brazzaville)'),\n 'CH' => $t('Switzerland'),\n 'CI' => $t('Ivory Coast'),\n 'CK' => $t('Cook Islands'),\n 'CL' => $t('Chile'),\n 'CM' => $t('Cameroon'),\n 'CN' => $t('China'),\n 'CO' => $t('Colombia'),\n 'CR' => $t('Costa Rica'),\n 'CU' => $t('Cuba'),\n 'CV' => $t('Cape Verde'),\n 'CX' => $t('Christmas Island'),\n 'CY' => $t('Cyprus'),\n 'CZ' => $t('Czech Republic'),\n 'DE' => $t('Germany'),\n 'DJ' => $t('Djibouti'),\n 'DK' => $t('Denmark'),\n 'DM' => $t('Dominica'),\n 'DO' => $t('Dominican Republic'),\n 'DZ' => $t('Algeria'),\n 'EC' => $t('Ecuador'),\n 'EE' => $t('Estonia'),\n 'EG' => $t('Egypt'),\n 'EH' => $t('Western Sahara'),\n 'ER' => $t('Eritrea'),\n 'ES' => $t('Spain'),\n 'ET' => $t('Ethiopia'),\n 'FI' => $t('Finland'),\n 'FJ' => $t('Fiji'),\n 'FK' => $t('Falkland Islands'),\n 'FM' => $t('Micronesia'),\n 'FO' => $t('Faroe Islands'),\n 'FR' => $t('France'),\n 'GA' => $t('Gabon'),\n 'GB' => $t('United Kingdom'),\n 'GD' => $t('Grenada'),\n 'GE' => $t('Georgia'),\n 'GF' => $t('French Guiana'),\n 'GG' => $t('Guernsey'),\n 'GH' => $t('Ghana'),\n 'GI' => $t('Gibraltar'),\n 'GL' => $t('Greenland'),\n 'GM' => $t('Gambia'),\n 'GN' => $t('Guinea'),\n 'GP' => $t('Guadeloupe'),\n 'GQ' => $t('Equatorial Guinea'),\n 'GR' => $t('Greece'),\n 'GS' => $t('South Georgia and the South Sandwich Islands'),\n 'GT' => $t('Guatemala'),\n 'GU' => $t('Guam'),\n 'GW' => $t('Guinea-Bissau'),\n 'GY' => $t('Guyana'),\n 'HK' => $t('Hong Kong S.A.R., China'),\n 'HM' => $t('Heard Island and McDonald Islands'),\n 'HN' => $t('Honduras'),\n 'HR' => $t('Croatia'),\n 'HT' => $t('Haiti'),\n 'HU' => $t('Hungary'),\n 'ID' => $t('Indonesia'),\n 'IE' => $t('Ireland'),\n 'IL' => $t('Israel'),\n 'IM' => $t('Isle of Man'),\n 'IN' => $t('India'),\n 'IO' => $t('British Indian Ocean Territory'),\n 'IQ' => $t('Iraq'),\n 'IR' => $t('Iran'),\n 'IS' => $t('Iceland'),\n 'IT' => $t('Italy'),\n 'JE' => $t('Jersey'),\n 'JM' => $t('Jamaica'),\n 'JO' => $t('Jordan'),\n 'JP' => $t('Japan'),\n 'KE' => $t('Kenya'),\n 'KG' => $t('Kyrgyzstan'),\n 'KH' => $t('Cambodia'),\n 'KI' => $t('Kiribati'),\n 'KM' => $t('Comoros'),\n 'KN' => $t('Saint Kitts and Nevis'),\n 'KP' => $t('North Korea'),\n 'KR' => $t('South Korea'),\n 'KW' => $t('Kuwait'),\n 'KY' => $t('Cayman Islands'),\n 'KZ' => $t('Kazakhstan'),\n 'LA' => $t('Laos'),\n 'LB' => $t('Lebanon'),\n 'LC' => $t('Saint Lucia'),\n 'LI' => $t('Liechtenstein'),\n 'LK' => $t('Sri Lanka'),\n 'LR' => $t('Liberia'),\n 'LS' => $t('Lesotho'),\n 'LT' => $t('Lithuania'),\n 'LU' => $t('Luxembourg'),\n 'LV' => $t('Latvia'),\n 'LY' => $t('Libya'),\n 'MA' => $t('Morocco'),\n 'MC' => $t('Monaco'),\n 'MD' => $t('Moldova'),\n 'ME' => $t('Montenegro'),\n 'MF' => $t('Saint Martin (French part)'),\n 'MG' => $t('Madagascar'),\n 'MH' => $t('Marshall Islands'),\n 'MK' => $t('Macedonia'),\n 'ML' => $t('Mali'),\n 'MM' => $t('Myanmar'),\n 'MN' => $t('Mongolia'),\n 'MO' => $t('Macao S.A.R., China'),\n 'MP' => $t('Northern Mariana Islands'),\n 'MQ' => $t('Martinique'),\n 'MR' => $t('Mauritania'),\n 'MS' => $t('Montserrat'),\n 'MT' => $t('Malta'),\n 'MU' => $t('Mauritius'),\n 'MV' => $t('Maldives'),\n 'MW' => $t('Malawi'),\n 'MX' => $t('Mexico'),\n 'MY' => $t('Malaysia'),\n 'MZ' => $t('Mozambique'),\n 'NA' => $t('Namibia'),\n 'NC' => $t('New Caledonia'),\n 'NE' => $t('Niger'),\n 'NF' => $t('Norfolk Island'),\n 'NG' => $t('Nigeria'),\n 'NI' => $t('Nicaragua'),\n 'NL' => $t('Netherlands'),\n 'NO' => $t('Norway'),\n 'NP' => $t('Nepal'),\n 'NR' => $t('Nauru'),\n 'NU' => $t('Niue'),\n 'NZ' => $t('New Zealand'),\n 'OM' => $t('Oman'),\n 'PA' => $t('Panama'),\n 'PE' => $t('Peru'),\n 'PF' => $t('French Polynesia'),\n 'PG' => $t('Papua New Guinea'),\n 'PH' => $t('Philippines'),\n 'PK' => $t('Pakistan'),\n 'PL' => $t('Poland'),\n 'PM' => $t('Saint Pierre and Miquelon'),\n 'PN' => $t('Pitcairn'),\n 'PR' => $t('Puerto Rico'),\n 'PS' => $t('Palestinian Territory'),\n 'PT' => $t('Portugal'),\n 'PW' => $t('Palau'),\n 'PY' => $t('Paraguay'),\n 'QA' => $t('Qatar'),\n 'RE' => $t('Reunion'),\n 'RO' => $t('Romania'),\n 'RS' => $t('Serbia'),\n 'RU' => $t('Russia'),\n 'RW' => $t('Rwanda'),\n 'SA' => $t('Saudi Arabia'),\n 'SB' => $t('Solomon Islands'),\n 'SC' => $t('Seychelles'),\n 'SD' => $t('Sudan'),\n 'SE' => $t('Sweden'),\n 'SG' => $t('Singapore'),\n 'SH' => $t('Saint Helena'),\n 'SI' => $t('Slovenia'),\n 'SJ' => $t('Svalbard and Jan Mayen'),\n 'SK' => $t('Slovakia'),\n 'SL' => $t('Sierra Leone'),\n 'SM' => $t('San Marino'),\n 'SN' => $t('Senegal'),\n 'SO' => $t('Somalia'),\n 'SR' => $t('Suriname'),\n 'ST' => $t('Sao Tome and Principe'),\n 'SV' => $t('El Salvador'),\n 'SY' => $t('Syria'),\n 'SZ' => $t('Swaziland'),\n 'TC' => $t('Turks and Caicos Islands'),\n 'TD' => $t('Chad'),\n 'TF' => $t('French Southern Territories'),\n 'TG' => $t('Togo'),\n 'TH' => $t('Thailand'),\n 'TJ' => $t('Tajikistan'),\n 'TK' => $t('Tokelau'),\n 'TL' => $t('East Timor'),\n 'TM' => $t('Turkmenistan'),\n 'TN' => $t('Tunisia'),\n 'TO' => $t('Tonga'),\n 'TR' => $t('Turkey'),\n 'TT' => $t('Trinidad and Tobago'),\n 'TV' => $t('Tuvalu'),\n 'TW' => $t('Taiwan'),\n 'TZ' => $t('Tanzania'),\n 'UA' => $t('Ukraine'),\n 'UG' => $t('Uganda'),\n 'UM' => $t('United States Minor Outlying Islands'),\n 'US' => $t('United States'),\n 'UY' => $t('Uruguay'),\n 'UZ' => $t('Uzbekistan'),\n 'VA' => $t('Vatican'),\n 'VC' => $t('Saint Vincent and the Grenadines'),\n 'VE' => $t('Venezuela'),\n 'VG' => $t('British Virgin Islands'),\n 'VI' => $t('U.S. Virgin Islands'),\n 'VN' => $t('Vietnam'),\n 'VU' => $t('Vanuatu'),\n 'WF' => $t('Wallis and Futuna'),\n 'WS' => $t('Samoa'),\n 'YE' => $t('Yemen'),\n 'YT' => $t('Mayotte'),\n 'ZA' => $t('South Africa'),\n 'ZM' => $t('Zambia'),\n 'ZW' => $t('Zimbabwe'),\n );\n\n // Sort the list.\n natcasesort($countries);\n\n return $countries;\n}", "public function getCountries()\n {\n foreach (CountryStorage::getAll() as $id=>$content) {\n $key = $content->id;\n $value = $content->name;\n $countryoptions[$key] = $value;\n }\n return $countryoptions;\n }", "function getCountrySelectList($db){\n\t\t$query = \"SELECT CT_CODE,CT_NAME_KR FROM \".TBL_COUNTRY.\" WHERE CT_CODE IS NOT NULL ORDER BY CT_NAME_KR\";\n\t\treturn $db->getArray($query);\n\t}", "public static function getList()\n { \n \n $countries = self::all();\n \n $list = array();\n foreach ($countries as $row) {\n $list[$row->id] = $row->name;\n }\n asort($list);\n \n $first_country = env('FIRST_COUNTRY');\n//dd($first_country); \n if ($first_country) {\n $first_country_obj = Country::\n where('name_'.env('PRIM_LANG'),'like',$first_country)\n ->first();\n if ($first_country_obj && isset($list[$first_country_obj->id])) {\n $first_country_name = $list[$first_country_obj->id];\n unset($list[$first_country_obj->id]);\n $list = [$first_country_obj->id => $first_country_name] + $list;\n }\n }\n \n return $list; \n }", "protected function operatingCountries()\n {\n return OperatingCountry::all();\n }", "public function countries(): array\n {\n return $this->client->get(\"country\");\n }", "function GetCountries () {\n\t\t$this->db->order_by('name','ASC');\n\t\t$result = $this->db->get('countries');\n\n\t\t$countries = array();\n\t\tforeach ($result->result_array() as $country) {\n\t\t\t$countries[] = array(\n\t\t\t\t\t\t\t'iso2' => $country['iso2'],\n\t\t\t\t\t\t\t'name' => $country['name']\n\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn $countries;\n\t}", "public function getCountries() {\n\n $countries = CountryModel::all();\n\n return response()->json($countries);\n }", "public function getCountries() {\n\n $result = $this->doRequest('v1.0/all-countries', 'GET');\n\n return $result;\n\n }", "public function actionGetCountriesList(){\n if(!empty($_POST['continent_id']) && is_numeric($_POST['continent_id'])){\n $data = Address::model()->findAll('parent_id = :parent_id', array(\n ':parent_id'=>(int)$_POST['continent_id']\n ));\n $data = CHtml::listData($data, 'id', 'name');\n foreach($data as $value=>$name){\n echo CHtml::tag('option', array('value'=>$value), CHtml::encode($name), true);\n }\n }\n }", "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}", "function countryList() {\n $country_array = array(\"Afghanistan\", \"Aland Islands\", \"Albania\", \"Algeria\", \"American Samoa\", \"Andorra\", \"Angola\", \"Anguilla\", \"Antarctica\", \"Antigua\", \"Argentina\", \"Armenia\", \"Aruba\", \"Australia\", \"Austria\", \"Azerbaijan\", \"Bahamas\", \"Bahrain\", \"Bangladesh\", \"Barbados\", \"Barbuda\", \"Belarus\", \"Belgium\", \"Belize\", \"Benin\", \"Bermuda\", \"Bhutan\", \"Bolivia\", \"Bosnia\", \"Botswana\", \"Bouvet Island\", \"Brazil\", \"British Indian Ocean Trty.\", \"Brunei Darussalam\", \"Bulgaria\", \"Burkina Faso\", \"Burundi\", \"Caicos Islands\", \"Cambodia\", \"Cameroon\", \"Canada\", \"Cape Verde\", \"Cayman Islands\", \"Central African Republic\", \"Chad\", \"Chile\", \"China\", \"Christmas Island\", \"Cocos (Keeling) Islands\", \"Colombia\", \"Comoros\", \"Congo\", \"Congo, Democratic Republic of the\", \"Cook Islands\", \"Costa Rica\", \"Cote d'Ivoire\", \"Croatia\", \"Cuba\", \"Cyprus\", \"Czech Republic\", \"Denmark\", \"Djibouti\", \"Dominica\", \"Dominican Republic\", \"Ecuador\", \"Egypt\", \"El Salvador\", \"Equatorial Guinea\", \"Eritrea\", \"Estonia\", \"Ethiopia\", \"Falkland Islands (Malvinas)\", \"Faroe Islands\", \"Fiji\", \"Finland\", \"France\", \"French Guiana\", \"French Polynesia\", \"French Southern Territories\", \"Futuna Islands\", \"Gabon\", \"Gambia\", \"Georgia\", \"Germany\", \"Ghana\", \"Gibraltar\", \"Greece\", \"Greenland\", \"Grenada\", \"Guadeloupe\", \"Guam\", \"Guatemala\", \"Guernsey\", \"Guinea\", \"Guinea-Bissau\", \"Guyana\", \"Haiti\", \"Heard\", \"Herzegovina\", \"Holy See\", \"Honduras\", \"Hong Kong\", \"Hungary\", \"Iceland\", \"India\", \"Indonesia\", \"Iran (Islamic Republic of)\", \"Iraq\", \"Ireland\", \"Isle of Man\", \"Israel\", \"Italy\", \"Jamaica\", \"Jan Mayen Islands\", \"Japan\", \"Jersey\", \"Jordan\", \"Kazakhstan\", \"Kenya\", \"Kiribati\", \"Korea\", \"Korea (Democratic)\", \"Kuwait\", \"Kyrgyzstan\", \"Lao\", \"Latvia\", \"Lebanon\", \"Lesotho\", \"Liberia\", \"Libyan Arab Jamahiriya\", \"Liechtenstein\", \"Lithuania\", \"Luxembourg\", \"Macao\", \"Macedonia\", \"Madagascar\", \"Malawi\", \"Malaysia\", \"Maldives\", \"Mali\", \"Malta\", \"Marshall Islands\", \"Martinique\", \"Mauritania\", \"Mauritius\", \"Mayotte\", \"McDonald Islands\", \"Mexico\", \"Micronesia\", \"Miquelon\", \"Moldova\", \"Monaco\", \"Mongolia\", \"Montenegro\", \"Montserrat\", \"Morocco\", \"Mozambique\", \"Myanmar\", \"Namibia\", \"Nauru\", \"Nepal\", \"Netherlands\", \"Netherlands Antilles\", \"Nevis\", \"New Caledonia\", \"New Zealand\", \"Nicaragua\", \"Niger\", \"Nigeria\", \"Niue\", \"Norfolk Island\", \"Northern Mariana Islands\", \"Norway\", \"Oman\", \"Pakistan\", \"Palau\", \"Palestinian Territory, Occupied\", \"Panama\", \"Papua New Guinea\", \"Paraguay\", \"Peru\", \"Philippines\", \"Pitcairn\", \"Poland\", \"Portugal\", \"Principe\", \"Puerto Rico\", \"Qatar\", \"Reunion\", \"Romania\", \"Russian Federation\", \"Rwanda\", \"Saint Barthelemy\", \"Saint Helena\", \"Saint Kitts\", \"Saint Lucia\", \"Saint Martin (French part)\", \"Saint Pierre\", \"Saint Vincent\", \"Samoa\", \"San Marino\", \"Sao Tome\", \"Saudi Arabia\", \"Senegal\", \"Serbia\", \"Seychelles\", \"Sierra Leone\", \"Singapore\", \"Slovakia\", \"Slovenia\", \"Solomon Islands\", \"Somalia\", \"South Africa\", \"South Georgia\", \"South Sandwich Islands\", \"Spain\", \"Sri Lanka\", \"Sudan\", \"Suriname\", \"Svalbard\", \"Swaziland\", \"Sweden\", \"Switzerland\", \"Syrian Arab Republic\", \"Taiwan\", \"Tajikistan\", \"Tanzania\", \"Thailand\", \"The Grenadines\", \"Timor-Leste\", \"Tobago\", \"Togo\", \"Tokelau\", \"Tonga\", \"Trinidad\", \"Tunisia\", \"Turkey\", \"Turkmenistan\", \"Turks Islands\", \"Tuvalu\", \"Uganda\", \"Ukraine\", \"United Arab Emirates\", \"United Kingdom\", \"United States\", \"Uruguay\", \"US Minor Outlying Islands\", \"Uzbekistan\", \"Vanuatu\", \"Vatican City State\", \"Venezuela\", \"Vietnam\", \"Virgin Islands (British)\", \"Virgin Islands (US)\", \"Wallis\", \"Western Sahara\", \"Yemen\", \"Zambia\", \"Zimbabwe\");\n foreach($country_array as $country) {\n echo \"\n <option>\n $country\n </option>\n\n \";\n }\n}", "public static function getCountries()\n\t{\n\t\t$country[\"AFG\"] = Array(\"iso2\" => \"AF\", \"name\" => \"Afghanistan, Islamic Republic \");\n\t\t$country[\"ALA\"] = Array(\"iso2\" => \"AX\", \"name\" => \"Åland Islands\");\n\t\t$country[\"ALB\"] = Array(\"iso2\" => \"AL\", \"name\" => \"Albania, Republic of\");\n\t\t$country[\"DZA\"] = Array(\"iso2\" => \"DZ\", \"name\" => \"Algeria, People's Democratic Republic\");\n\t\t$country[\"ASM\"] = Array(\"iso2\" => \"AS\", \"name\" => \"American Samoa\");\n\t\t$country[\"AND\"] = Array(\"iso2\" => \"AD\", \"name\" => \"Andorra, Principality of\");\n\t\t$country[\"AGO\"] = Array(\"iso2\" => \"AO\", \"name\" => \"Angola, Republic of\");\n\t\t$country[\"AIA\"] = Array(\"iso2\" => \"AI\", \"name\" => \"Anguilla\");\n\t\t$country[\"ATA\"] = Array(\"iso2\" => \"AQ\", \"name\" => \"Antarctica (the territory Sout\");\n\t\t$country[\"ATG\"] = Array(\"iso2\" => \"AG\", \"name\" => \"Antigua and Barbuda\");\n\t\t$country[\"ARG\"] = Array(\"iso2\" => \"AR\", \"name\" => \"Argentina, Argentine Republic\");\n\t\t$country[\"ARM\"] = Array(\"iso2\" => \"AM\", \"name\" => \"Armenia, Republic of\");\n\t\t$country[\"ABW\"] = Array(\"iso2\" => \"AW\", \"name\" => \"Aruba\");\n\t\t$country[\"AUS\"] = Array(\"iso2\" => \"AU\", \"name\" => \"Australia, Commonwealth of\");\n\t\t$country[\"AUT\"] = Array(\"iso2\" => \"AT\", \"name\" => \"Austria, Republic of\");\n\t\t$country[\"AZE\"] = Array(\"iso2\" => \"AZ\", \"name\" => \"Azerbaijan, Republic of\");\n\t\t$country[\"BHS\"] = Array(\"iso2\" => \"BS\", \"name\" => \"Bahamas, Commonwealth of the\");\n\t\t$country[\"BHR\"] = Array(\"iso2\" => \"BH\", \"name\" => \"Bahrain, Kingdom of\");\n\t\t$country[\"BGD\"] = Array(\"iso2\" => \"BD\", \"name\" => \"Bangladesh, People's Republic \");\n\t\t$country[\"BRB\"] = Array(\"iso2\" => \"BB\", \"name\" => \"Barbados\");\n\t\t$country[\"BLR\"] = Array(\"iso2\" => \"BY\", \"name\" => \"Belarus, Republic of\");\n\t\t$country[\"BEL\"] = Array(\"iso2\" => \"BE\", \"name\" => \"Belgium, Kingdom of\");\n\t\t$country[\"BLZ\"] = Array(\"iso2\" => \"BZ\", \"name\" => \"Belize\");\n\t\t$country[\"BEN\"] = Array(\"iso2\" => \"BJ\", \"name\" => \"Benin, Republic of\");\n\t\t$country[\"BMU\"] = Array(\"iso2\" => \"BM\", \"name\" => \"Bermuda\");\n\t\t$country[\"BTN\"] = Array(\"iso2\" => \"BT\", \"name\" => \"Bhutan, Kingdom of\");\n\t\t$country[\"BOL\"] = Array(\"iso2\" => \"BO\", \"name\" => \"Bolivia, Republic of\");\n\t\t$country[\"BIH\"] = Array(\"iso2\" => \"BA\", \"name\" => \"Bosnia and Herzegovina\");\n\t\t$country[\"BWA\"] = Array(\"iso2\" => \"BW\", \"name\" => \"Botswana, Republic of\");\n\t\t$country[\"BVT\"] = Array(\"iso2\" => \"BV\", \"name\" => \"Bouvet Island (Bouvetoya)\");\n\t\t$country[\"BRA\"] = Array(\"iso2\" => \"BR\", \"name\" => \"Brazil, Federative Republic of\");\n\t\t$country[\"IOT\"] = Array(\"iso2\" => \"IO\", \"name\" => \"British Indian Ocean Territory\");\n\t\t$country[\"VGB\"] = Array(\"iso2\" => \"VG\", \"name\" => \"British Virgin Islands\");\n\t\t$country[\"BRN\"] = Array(\"iso2\" => \"BN\", \"name\" => \"Brunei Darussalam\");\n\t\t$country[\"BGR\"] = Array(\"iso2\" => \"BG\", \"name\" => \"Bulgaria, Republic of\");\n\t\t$country[\"BFA\"] = Array(\"iso2\" => \"BF\", \"name\" => \"Burkina Faso\");\n\t\t$country[\"BDI\"] = Array(\"iso2\" => \"BI\", \"name\" => \"Burundi, Republic of\");\n\t\t$country[\"KHM\"] = Array(\"iso2\" => \"KH\", \"name\" => \"Cambodia, Kingdom of\");\n\t\t$country[\"CMR\"] = Array(\"iso2\" => \"CM\", \"name\" => \"Cameroon, Republic of\");\n\t\t$country[\"CAN\"] = Array(\"iso2\" => \"CA\", \"name\" => \"Canada\");\n\t\t$country[\"CPV\"] = Array(\"iso2\" => \"CV\", \"name\" => \"Cape Verde, Republic of\");\n\t\t$country[\"CYM\"] = Array(\"iso2\" => \"KY\", \"name\" => \"Cayman Islands\");\n\t\t$country[\"CAF\"] = Array(\"iso2\" => \"CF\", \"name\" => \"Central African Republic\");\n\t\t$country[\"TCD\"] = Array(\"iso2\" => \"TD\", \"name\" => \"Chad, Republic of\");\n\t\t$country[\"CHL\"] = Array(\"iso2\" => \"CL\", \"name\" => \"Chile, Republic of\");\n\t\t$country[\"CHN\"] = Array(\"iso2\" => \"CN\", \"name\" => \"China, People's Republic of\");\n\t\t$country[\"CXR\"] = Array(\"iso2\" => \"CX\", \"name\" => \"Christmas Island\");\n\t\t$country[\"CCK\"] = Array(\"iso2\" => \"CC\", \"name\" => \"Cocos (Keeling) Islands\");\n\t\t$country[\"COL\"] = Array(\"iso2\" => \"CO\", \"name\" => \"Colombia, Republic of\");\n\t\t$country[\"COM\"] = Array(\"iso2\" => \"KM\", \"name\" => \"Comoros, Union of the\");\n\t\t$country[\"COD\"] = Array(\"iso2\" => \"CD\", \"name\" => \"Congo, Democratic Republic of \");\n\t\t$country[\"COG\"] = Array(\"iso2\" => \"CG\", \"name\" => \"Congo, Republic of the\");\n\t\t$country[\"COK\"] = Array(\"iso2\" => \"CK\", \"name\" => \"Cook Islands\");\n\t\t$country[\"CRI\"] = Array(\"iso2\" => \"CR\", \"name\" => \"Costa Rica, Republic of\");\n\t\t$country[\"CIV\"] = Array(\"iso2\" => \"CI\", \"name\" => \"Cote d'Ivoire, Republic of\");\n\t\t$country[\"HRV\"] = Array(\"iso2\" => \"HR\", \"name\" => \"Croatia, Republic of\");\n\t\t$country[\"CUB\"] = Array(\"iso2\" => \"CU\", \"name\" => \"Cuba, Republic of\");\n\t\t$country[\"CYP\"] = Array(\"iso2\" => \"CY\", \"name\" => \"Cyprus, Republic of\");\n\t\t$country[\"CZE\"] = Array(\"iso2\" => \"CZ\", \"name\" => \"Czech Republic\");\n\t\t$country[\"DNK\"] = Array(\"iso2\" => \"DK\", \"name\" => \"Denmark, Kingdom of\");\n\t\t$country[\"DJI\"] = Array(\"iso2\" => \"DJ\", \"name\" => \"Djibouti, Republic of\");\n\t\t$country[\"DMA\"] = Array(\"iso2\" => \"DM\", \"name\" => \"Dominica, Commonwealth of\");\n\t\t$country[\"DOM\"] = Array(\"iso2\" => \"DO\", \"name\" => \"Dominican Republic\");\n\t\t$country[\"ECU\"] = Array(\"iso2\" => \"EC\", \"name\" => \"Ecuador, Republic of\");\n\t\t$country[\"EGY\"] = Array(\"iso2\" => \"EG\", \"name\" => \"Egypt, Arab Republic of\");\n\t\t$country[\"SLV\"] = Array(\"iso2\" => \"SV\", \"name\" => \"El Salvador, Republic of\");\n\t\t$country[\"GNQ\"] = Array(\"iso2\" => \"GQ\", \"name\" => \"Equatorial Guinea, Republic of\");\n\t\t$country[\"ERI\"] = Array(\"iso2\" => \"ER\", \"name\" => \"Eritrea, State of\");\n\t\t$country[\"EST\"] = Array(\"iso2\" => \"EE\", \"name\" => \"Estonia, Republic of\");\n\t\t$country[\"ETH\"] = Array(\"iso2\" => \"ET\", \"name\" => \"Ethiopia, Federal Democratic R\");\n\t\t$country[\"FRO\"] = Array(\"iso2\" => \"FO\", \"name\" => \"Faroe Islands\");\n\t\t$country[\"FLK\"] = Array(\"iso2\" => \"FK\", \"name\" => \"Falkland Islands (Malvinas)\");\n\t\t$country[\"FJI\"] = Array(\"iso2\" => \"FJ\", \"name\" => \"Fiji, Republic of the Fiji Isl\");\n\t\t$country[\"FIN\"] = Array(\"iso2\" => \"FI\", \"name\" => \"Finland, Republic of\");\n\t\t$country[\"FRA\"] = Array(\"iso2\" => \"FR\", \"name\" => \"France, French Republic\");\n\t\t$country[\"GUF\"] = Array(\"iso2\" => \"GF\", \"name\" => \"French Guiana\");\n\t\t$country[\"PYF\"] = Array(\"iso2\" => \"PF\", \"name\" => \"French Polynesia\");\n\t\t$country[\"ATF\"] = Array(\"iso2\" => \"TF\", \"name\" => \"French Southern Territories\");\n\t\t$country[\"GAB\"] = Array(\"iso2\" => \"GA\", \"name\" => \"Gabon, Gabonese Republic\");\n\t\t$country[\"GMB\"] = Array(\"iso2\" => \"GM\", \"name\" => \"Gambia, Republic of the\");\n\t\t$country[\"GEO\"] = Array(\"iso2\" => \"GE\", \"name\" => \"Georgia\");\n\t\t$country[\"DEU\"] = Array(\"iso2\" => \"DE\", \"name\" => \"Germany, Federal Republic of\");\n\t\t$country[\"GHA\"] = Array(\"iso2\" => \"GH\", \"name\" => \"Ghana, Republic of\");\n\t\t$country[\"GIB\"] = Array(\"iso2\" => \"GI\", \"name\" => \"Gibraltar\");\n\t\t$country[\"GRC\"] = Array(\"iso2\" => \"GR\", \"name\" => \"Greece, Hellenic Republic\");\n\t\t$country[\"GRL\"] = Array(\"iso2\" => \"GL\", \"name\" => \"Greenland\");\n\t\t$country[\"GRD\"] = Array(\"iso2\" => \"GD\", \"name\" => \"Grenada\");\n\t\t$country[\"GLP\"] = Array(\"iso2\" => \"GP\", \"name\" => \"Guadeloupe\");\n\t\t$country[\"GUM\"] = Array(\"iso2\" => \"GU\", \"name\" => \"Guam\");\n\t\t$country[\"GTM\"] = Array(\"iso2\" => \"GT\", \"name\" => \"Guatemala, Republic of\");\n\t\t$country[\"GGY\"] = Array(\"iso2\" => \"GG\", \"name\" => \"Guernsey, Bailiwick of\");\n\t\t$country[\"GIN\"] = Array(\"iso2\" => \"GN\", \"name\" => \"Guinea, Republic of\");\n\t\t$country[\"GNB\"] = Array(\"iso2\" => \"GW\", \"name\" => \"Guinea-Bissau, Republic of\");\n\t\t$country[\"GUY\"] = Array(\"iso2\" => \"GY\", \"name\" => \"Guyana, Co-operative Republic \");\n\t\t$country[\"HTI\"] = Array(\"iso2\" => \"HT\", \"name\" => \"Haiti, Republic of\");\n\t\t$country[\"HMD\"] = Array(\"iso2\" => \"HM\", \"name\" => \"Heard Island and McDonald Isla\");\n\t\t$country[\"VAT\"] = Array(\"iso2\" => \"VA\", \"name\" => \"Holy See (Vatican City State)\");\n\t\t$country[\"HND\"] = Array(\"iso2\" => \"HN\", \"name\" => \"Honduras, Republic of\");\n\t\t$country[\"HKG\"] = Array(\"iso2\" => \"HK\", \"name\" => \"Hong Kong, Special Administrat\");\n\t\t$country[\"HUN\"] = Array(\"iso2\" => \"HU\", \"name\" => \"Hungary, Republic of\");\n\t\t$country[\"ISL\"] = Array(\"iso2\" => \"IS\", \"name\" => \"Iceland, Republic of\");\n\t\t$country[\"IND\"] = Array(\"iso2\" => \"IN\", \"name\" => \"India, Republic of\");\n\t\t$country[\"IDN\"] = Array(\"iso2\" => \"ID\", \"name\" => \"Indonesia, Republic of\");\n\t\t$country[\"IRN\"] = Array(\"iso2\" => \"IR\", \"name\" => \"Iran, Islamic Republic of\");\n\t\t$country[\"IRQ\"] = Array(\"iso2\" => \"IQ\", \"name\" => \"Iraq, Republic of\");\n\t\t$country[\"IRL\"] = Array(\"iso2\" => \"IE\", \"name\" => \"Ireland\");\n\t\t$country[\"IMN\"] = Array(\"iso2\" => \"IM\", \"name\" => \"Isle of Man\");\n\t\t$country[\"ISR\"] = Array(\"iso2\" => \"IL\", \"name\" => \"Israel, State of\");\n\t\t$country[\"ITA\"] = Array(\"iso2\" => \"IT\", \"name\" => \"Italy, Italian Republic\");\n\t\t$country[\"JAM\"] = Array(\"iso2\" => \"JM\", \"name\" => \"Jamaica\");\n\t\t$country[\"JPN\"] = Array(\"iso2\" => \"JP\", \"name\" => \"Japan\");\n\t\t$country[\"JEY\"] = Array(\"iso2\" => \"JE\", \"name\" => \"Jersey, Bailiwick of\");\n\t\t$country[\"JOR\"] = Array(\"iso2\" => \"JO\", \"name\" => \"Jordan, Hashemite Kingdom of\");\n\t\t$country[\"KAZ\"] = Array(\"iso2\" => \"KZ\", \"name\" => \"Kazakhstan, Republic of\");\n\t\t$country[\"KEN\"] = Array(\"iso2\" => \"KE\", \"name\" => \"Kenya, Republic of\");\n\t\t$country[\"KIR\"] = Array(\"iso2\" => \"KI\", \"name\" => \"Kiribati, Republic of\");\n\t\t$country[\"PRK\"] = Array(\"iso2\" => \"KP\", \"name\" => \"Korea, Democratic People's Rep\");\n\t\t$country[\"KOR\"] = Array(\"iso2\" => \"KR\", \"name\" => \"Korea, Republic of\");\n\t\t$country[\"KWT\"] = Array(\"iso2\" => \"KW\", \"name\" => \"Kuwait, State of\");\n\t\t$country[\"KGZ\"] = Array(\"iso2\" => \"KG\", \"name\" => \"Kyrgyz Republic\");\n\t\t$country[\"LAO\"] = Array(\"iso2\" => \"LA\", \"name\" => \"Lao People's Democratic Republ\");\n\t\t$country[\"LVA\"] = Array(\"iso2\" => \"LV\", \"name\" => \"Latvia, Republic of\");\n\t\t$country[\"LBN\"] = Array(\"iso2\" => \"LB\", \"name\" => \"Lebanon, Lebanese Republic\");\n\t\t$country[\"LSO\"] = Array(\"iso2\" => \"LS\", \"name\" => \"Lesotho, Kingdom of\");\n\t\t$country[\"LBR\"] = Array(\"iso2\" => \"LR\", \"name\" => \"Liberia, Republic of\");\n\t\t$country[\"LBY\"] = Array(\"iso2\" => \"LY\", \"name\" => \"Libyan Arab Jamahiriya\");\n\t\t$country[\"LIE\"] = Array(\"iso2\" => \"LI\", \"name\" => \"Liechtenstein, Principality of\");\n\t\t$country[\"LTU\"] = Array(\"iso2\" => \"LT\", \"name\" => \"Lithuania, Republic of\");\n\t\t$country[\"LUX\"] = Array(\"iso2\" => \"LU\", \"name\" => \"Luxembourg, Grand Duchy of\");\n\t\t$country[\"MAC\"] = Array(\"iso2\" => \"MO\", \"name\" => \"Macao, Special Administrative \");\n\t\t$country[\"MKD\"] = Array(\"iso2\" => \"MK\", \"name\" => \"Macedonia, the former Yugoslav\");\n\t\t$country[\"MDG\"] = Array(\"iso2\" => \"MG\", \"name\" => \"Madagascar, Republic of\");\n\t\t$country[\"MWI\"] = Array(\"iso2\" => \"MW\", \"name\" => \"Malawi, Republic of\");\n\t\t$country[\"MYS\"] = Array(\"iso2\" => \"MY\", \"name\" => \"Malaysia\");\n\t\t$country[\"MDV\"] = Array(\"iso2\" => \"MV\", \"name\" => \"Maldives, Republic of\");\n\t\t$country[\"MLI\"] = Array(\"iso2\" => \"ML\", \"name\" => \"Mali, Republic of\");\n\t\t$country[\"MLT\"] = Array(\"iso2\" => \"MT\", \"name\" => \"Malta, Republic of\");\n\t\t$country[\"MHL\"] = Array(\"iso2\" => \"MH\", \"name\" => \"Marshall Islands, Republic of \");\n\t\t$country[\"MTQ\"] = Array(\"iso2\" => \"MQ\", \"name\" => \"Martinique\");\n\t\t$country[\"MRT\"] = Array(\"iso2\" => \"MR\", \"name\" => \"Mauritania, Islamic Republic o\");\n\t\t$country[\"MUS\"] = Array(\"iso2\" => \"MU\", \"name\" => \"Mauritius, Republic of\");\n\t\t$country[\"MYT\"] = Array(\"iso2\" => \"YT\", \"name\" => \"Mayotte\");\n\t\t$country[\"MEX\"] = Array(\"iso2\" => \"MX\", \"name\" => \"Mexico, United Mexican States\");\n\t\t$country[\"FSM\"] = Array(\"iso2\" => \"FM\", \"name\" => \"Micronesia, Federated States o\");\n\t\t$country[\"MDA\"] = Array(\"iso2\" => \"MD\", \"name\" => \"Moldova, Republic of\");\n\t\t$country[\"MCO\"] = Array(\"iso2\" => \"MC\", \"name\" => \"Monaco, Principality of\");\n\t\t$country[\"MNG\"] = Array(\"iso2\" => \"MN\", \"name\" => \"Mongolia\");\n\t\t$country[\"MNE\"] = Array(\"iso2\" => \"ME\", \"name\" => \"Montenegro, Republic of\");\n\t\t$country[\"MSR\"] = Array(\"iso2\" => \"MS\", \"name\" => \"Montserrat\");\n\t\t$country[\"MAR\"] = Array(\"iso2\" => \"MA\", \"name\" => \"Morocco, Kingdom of\");\n\t\t$country[\"MOZ\"] = Array(\"iso2\" => \"MZ\", \"name\" => \"Mozambique, Republic of\");\n\t\t$country[\"MMR\"] = Array(\"iso2\" => \"MM\", \"name\" => \"Myanmar, Union of\");\n\t\t$country[\"NAM\"] = Array(\"iso2\" => \"NA\", \"name\" => \"Namibia, Republic of\");\n\t\t$country[\"NRU\"] = Array(\"iso2\" => \"NR\", \"name\" => \"Nauru, Republic of\");\n\t\t$country[\"NPL\"] = Array(\"iso2\" => \"NP\", \"name\" => \"Nepal, State of\");\n\t\t$country[\"ANT\"] = Array(\"iso2\" => \"AN\", \"name\" => \"Netherlands Antilles\");\n\t\t$country[\"NLD\"] = Array(\"iso2\" => \"NL\", \"name\" => \"Netherlands, Kingdom of the\");\n\t\t$country[\"NCL\"] = Array(\"iso2\" => \"NC\", \"name\" => \"New Caledonia\");\n\t\t$country[\"NZL\"] = Array(\"iso2\" => \"NZ\", \"name\" => \"New Zealand\");\n\t\t$country[\"NIC\"] = Array(\"iso2\" => \"NI\", \"name\" => \"Nicaragua, Republic of\");\n\t\t$country[\"NER\"] = Array(\"iso2\" => \"NE\", \"name\" => \"Niger, Republic of\");\n\t\t$country[\"NGA\"] = Array(\"iso2\" => \"NG\", \"name\" => \"Nigeria, Federal Republic of\");\n\t\t$country[\"NIU\"] = Array(\"iso2\" => \"NU\", \"name\" => \"Niue\");\n\t\t$country[\"NFK\"] = Array(\"iso2\" => \"NF\", \"name\" => \"Norfolk Island\");\n\t\t$country[\"MNP\"] = Array(\"iso2\" => \"MP\", \"name\" => \"Northern Mariana Islands, Comm\");\n\t\t$country[\"NOR\"] = Array(\"iso2\" => \"NO\", \"name\" => \"Norway, Kingdom of\");\n\t\t$country[\"OMN\"] = Array(\"iso2\" => \"OM\", \"name\" => \"Oman, Sultanate of\");\n\t\t$country[\"PAK\"] = Array(\"iso2\" => \"PK\", \"name\" => \"Pakistan, Islamic Republic of\");\n\t\t$country[\"PLW\"] = Array(\"iso2\" => \"PW\", \"name\" => \"Palau, Republic of\");\n\t\t$country[\"PSE\"] = Array(\"iso2\" => \"PS\", \"name\" => \"Palestinian Territory, Occupie\");\n\t\t$country[\"PAN\"] = Array(\"iso2\" => \"PA\", \"name\" => \"Panama, Republic of\");\n\t\t$country[\"PNG\"] = Array(\"iso2\" => \"PG\", \"name\" => \"Papua New Guinea, Independent \");\n\t\t$country[\"PRY\"] = Array(\"iso2\" => \"PY\", \"name\" => \"Paraguay, Republic of\");\n\t\t$country[\"PER\"] = Array(\"iso2\" => \"PE\", \"name\" => \"Peru, Republic of\");\n\t\t$country[\"PHL\"] = Array(\"iso2\" => \"PH\", \"name\" => \"Philippines, Republic of the\");\n\t\t$country[\"PCN\"] = Array(\"iso2\" => \"PN\", \"name\" => \"Pitcairn Islands\");\n\t\t$country[\"POL\"] = Array(\"iso2\" => \"PL\", \"name\" => \"Poland, Republic of\");\n\t\t$country[\"PRT\"] = Array(\"iso2\" => \"PT\", \"name\" => \"Portugal, Portuguese Republic\");\n\t\t$country[\"PRI\"] = Array(\"iso2\" => \"PR\", \"name\" => \"Puerto Rico, Commonwealth of\");\n\t\t$country[\"QAT\"] = Array(\"iso2\" => \"QA\", \"name\" => \"Qatar, State of\");\n\t\t$country[\"REU\"] = Array(\"iso2\" => \"RE\", \"name\" => \"Reunion\");\n\t\t$country[\"ROU\"] = Array(\"iso2\" => \"RO\", \"name\" => \"Romania\");\n\t\t$country[\"RUS\"] = Array(\"iso2\" => \"RU\", \"name\" => \"Russian Federation\");\n\t\t$country[\"RWA\"] = Array(\"iso2\" => \"RW\", \"name\" => \"Rwanda, Republic of\");\n\t\t$country[\"BLM\"] = Array(\"iso2\" => \"BL\", \"name\" => \"Saint Barthelemy\");\n\t\t$country[\"SHN\"] = Array(\"iso2\" => \"SH\", \"name\" => \"Saint Helena\");\n\t\t$country[\"KNA\"] = Array(\"iso2\" => \"KN\", \"name\" => \"Saint Kitts and Nevis, Federat\");\n\t\t$country[\"LCA\"] = Array(\"iso2\" => \"LC\", \"name\" => \"Saint Lucia\");\n\t\t$country[\"MAF\"] = Array(\"iso2\" => \"MF\", \"name\" => \"Saint Martin\");\n\t\t$country[\"SPM\"] = Array(\"iso2\" => \"PM\", \"name\" => \"Saint Pierre and Miquelon\");\n\t\t$country[\"VCT\"] = Array(\"iso2\" => \"VC\", \"name\" => \"Saint Vincent and the Grenadin\");\n\t\t$country[\"WSM\"] = Array(\"iso2\" => \"WS\", \"name\" => \"Samoa, Independent State of\");\n\t\t$country[\"SMR\"] = Array(\"iso2\" => \"SM\", \"name\" => \"San Marino, Republic of\");\n\t\t$country[\"STP\"] = Array(\"iso2\" => \"ST\", \"name\" => \"Sao Tome and Principe, Democra\");\n\t\t$country[\"SAU\"] = Array(\"iso2\" => \"SA\", \"name\" => \"Saudi Arabia, Kingdom of\");\n\t\t$country[\"SEN\"] = Array(\"iso2\" => \"SN\", \"name\" => \"Senegal, Republic of\");\n\t\t$country[\"SRB\"] = Array(\"iso2\" => \"RS\", \"name\" => \"Serbia, Republic of\");\n\t\t$country[\"SYC\"] = Array(\"iso2\" => \"SC\", \"name\" => \"Seychelles, Republic of\");\n\t\t$country[\"SLE\"] = Array(\"iso2\" => \"SL\", \"name\" => \"Sierra Leone, Republic of\");\n\t\t$country[\"SGP\"] = Array(\"iso2\" => \"SG\", \"name\" => \"Singapore, Republic of\");\n\t\t$country[\"SVK\"] = Array(\"iso2\" => \"SK\", \"name\" => \"Slovakia (Slovak Republic)\");\n\t\t$country[\"SVN\"] = Array(\"iso2\" => \"SI\", \"name\" => \"Slovenia, Republic of\");\n\t\t$country[\"SLB\"] = Array(\"iso2\" => \"SB\", \"name\" => \"Solomon Islands\");\n\t\t$country[\"SOM\"] = Array(\"iso2\" => \"SO\", \"name\" => \"Somalia, Somali Republic\");\n\t\t$country[\"ZAF\"] = Array(\"iso2\" => \"ZA\", \"name\" => \"South Africa, Republic of\");\n\t\t$country[\"SGS\"] = Array(\"iso2\" => \"GS\", \"name\" => \"South Georgia and the South Sa\");\n\t\t$country[\"ESP\"] = Array(\"iso2\" => \"ES\", \"name\" => \"Spain, Kingdom of\");\n\t\t$country[\"LKA\"] = Array(\"iso2\" => \"LK\", \"name\" => \"Sri Lanka, Democratic Socialis\");\n\t\t$country[\"SDN\"] = Array(\"iso2\" => \"SD\", \"name\" => \"Sudan, Republic of\");\n\t\t$country[\"SUR\"] = Array(\"iso2\" => \"SR\", \"name\" => \"Suriname, Republic of\");\n\t\t$country[\"SJM\"] = Array(\"iso2\" => \"SJ\", \"name\" => \"Svalbard & Jan Mayen Islands\");\n\t\t$country[\"SWZ\"] = Array(\"iso2\" => \"SZ\", \"name\" => \"Swaziland, Kingdom of\");\n\t\t$country[\"SWE\"] = Array(\"iso2\" => \"SE\", \"name\" => \"Sweden, Kingdom of\");\n\t\t$country[\"CHE\"] = Array(\"iso2\" => \"CH\", \"name\" => \"Switzerland, Swiss Confederati\");\n\t\t$country[\"SYR\"] = Array(\"iso2\" => \"SY\", \"name\" => \"Syrian Arab Republic\");\n\t\t$country[\"TWN\"] = Array(\"iso2\" => \"TW\", \"name\" => \"Taiwan\");\n\t\t$country[\"TJK\"] = Array(\"iso2\" => \"TJ\", \"name\" => \"Tajikistan, Republic of\");\n\t\t$country[\"TZA\"] = Array(\"iso2\" => \"TZ\", \"name\" => \"Tanzania, United Republic of\");\n\t\t$country[\"THA\"] = Array(\"iso2\" => \"TH\", \"name\" => \"Thailand, Kingdom of\");\n\t\t$country[\"TLS\"] = Array(\"iso2\" => \"TL\", \"name\" => \"Timor-Leste, Democratic Republ\");\n\t\t$country[\"TGO\"] = Array(\"iso2\" => \"TG\", \"name\" => \"Togo, Togolese Republic\");\n\t\t$country[\"TKL\"] = Array(\"iso2\" => \"TK\", \"name\" => \"Tokelau\");\n\t\t$country[\"TON\"] = Array(\"iso2\" => \"TO\", \"name\" => \"Tonga, Kingdom of\");\n\t\t$country[\"TTO\"] = Array(\"iso2\" => \"TT\", \"name\" => \"Trinidad and Tobago, Republic \");\n\t\t$country[\"TUN\"] = Array(\"iso2\" => \"TN\", \"name\" => \"Tunisia, Tunisian Republic\");\n\t\t$country[\"TUR\"] = Array(\"iso2\" => \"TR\", \"name\" => \"Turkey, Republic of\");\n\t\t$country[\"TKM\"] = Array(\"iso2\" => \"TM\", \"name\" => \"Turkmenistan\");\n\t\t$country[\"TCA\"] = Array(\"iso2\" => \"TC\", \"name\" => \"Turks and Caicos Islands\");\n\t\t$country[\"TUV\"] = Array(\"iso2\" => \"TV\", \"name\" => \"Tuvalu\");\n\t\t$country[\"UGA\"] = Array(\"iso2\" => \"UG\", \"name\" => \"Uganda, Republic of\");\n\t\t$country[\"UKR\"] = Array(\"iso2\" => \"UA\", \"name\" => \"Ukraine\");\n\t\t$country[\"ARE\"] = Array(\"iso2\" => \"AE\", \"name\" => \"United Arab Emirates\");\n\t\t$country[\"GBR\"] = Array(\"iso2\" => \"GB\", \"name\" => \"United Kingdom of Great Britain\");\n\t\t$country[\"USA\"] = Array(\"iso2\" => \"US\", \"name\" => \"United States of America\");\n\t\t$country[\"UMI\"] = Array(\"iso2\" => \"UM\", \"name\" => \"United States Minor Outlying I\");\n\t\t$country[\"VIR\"] = Array(\"iso2\" => \"VI\", \"name\" => \"United States Virgin Islands\");\n\t\t$country[\"URY\"] = Array(\"iso2\" => \"UY\", \"name\" => \"Uruguay, Eastern Republic of\");\n\t\t$country[\"UZB\"] = Array(\"iso2\" => \"UZ\", \"name\" => \"Uzbekistan, Republic of\");\n\t\t$country[\"VUT\"] = Array(\"iso2\" => \"VU\", \"name\" => \"Vanuatu, Republic of\");\n\t\t$country[\"VEN\"] = Array(\"iso2\" => \"VE\", \"name\" => \"Venezuela, Bolivarian Republic\");\n\t\t$country[\"VNM\"] = Array(\"iso2\" => \"VN\", \"name\" => \"Vietnam, Socialist Republic of\");\n\t\t$country[\"WLF\"] = Array(\"iso2\" => \"WF\", \"name\" => \"Wallis and Futuna\");\n\t\t$country[\"ESH\"] = Array(\"iso2\" => \"EH\", \"name\" => \"Western Sahara\");\n\t\t$country[\"YEM\"] = Array(\"iso2\" => \"YE\", \"name\" => \"Yemen\");\n\t\t$country[\"ZMB\"] = Array(\"iso2\" => \"ZM\", \"name\" => \"Zambia, Republic of\");\n\t\t$country[\"ZWE\"] = Array(\"iso2\" => \"ZW\", \"name\" => \"Zimbabwe, Republic of\");\n\t\t$country[\"0\"] = Array(\"iso2\" => \"0\", \"name\" => \"NO VALID COUNTRY\");\n\n\t\treturn $country;\n\t}", "function get_country_list()\n\t{\n\t\t$query = \"SELECT `id`, `country` FROM `countries` ORDER BY CASE WHEN `id` = '\".OTHER_COUNTRY.\"' THEN 1 ELSE 0 END, `country`\";\n\t\t$result = $this->db->query($query);\n\t\tif ($result->num_rows() > 0 ) \n\t\t\treturn $result->result();\n\t\treturn false;\n\t}", "public function list() {\n $countries = Country::orderBy('name', 'desc')->get();\n\n return view('country.list', [\n 'countries' => $countries\n ]);\n }", "function country()\n {\n $this->data['result'] = \\DB::table('countries')->get();\n return view('backend.pages.country')->with($this->data);\n }", "function tep_get_countries($default = '') {\n $countries_array = array();\n if ($default) {\n $countries_array[] = array('id' => '',\n 'text' => $default);\n }\n\n $Qcountries = Registry::get('Db')->get('countries', ['countries_id', 'countries_name'], null, 'countries_name');\n\n while ($Qcountries->fetch()) {\n $countries_array[] = [\n 'id' => $Qcountries->valueInt('countries_id'),\n 'text' => $Qcountries->value('countries_name')\n ];\n }\n\n return $countries_array;\n }", "public function index()\n {\n // only test\n //$country = Countries::all()->pluck('name.common','cca2');\n //$country = Countries::where('cca2',\"IT\")->pluck('name.common','cca2');\n \n /*$user = User::find(1);\n $user->city; \n\n return response()->json([\n 'userCIty' => $country\n ]); */\n }", "public function all_country_list()\n\t{\n\t\t// $select = array('phonecode', 'nicename');\n\t\t\n\t // $this->db->select($select)->from('all_country_list')->;\n\t // $this->db->order_by('id');\n\t\t$query = $this->db->query(\"SELECT `phonecode`, `nicename` FROM `all_country_list` WHERE phonecode IS NOT NULL ORDER BY `id` \");\n\t\t\n\t\t// echo $this->db->last_query();\n\t\t// print_r($query->result_array()\t);\n\t\t// die();\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function listCountryOptions()\n{\n $countries = array(\"Afghanistan\", \"Albania\", \"Algeria\", \"American Samoa\", \"Andorra\", \"Angola\", \"Anguilla\", \"Antarctica\", \"Antigua and Barbuda\", \"Argentina\", \"Armenia\", \"Aruba\", \"Australia\", \"Austria\", \"Azerbaijan\", \"Bahamas\", \"Bahrain\", \"Bangladesh\", \"Barbados\", \"Belarus\", \"Belgium\", \"Belize\", \"Benin\", \"Bermuda\", \"Bhutan\", \"Bolivia\", \"Bosnia and Herzegowina\", \"Botswana\", \"Bouvet Island\", \"Brazil\", \"British Indian Ocean Territory\", \"Brunei Darussalam\", \"Bulgaria\", \"Burkina Faso\", \"Burundi\", \"Cambodia\", \"Cameroon\", \"Canada\", \"Cape Verde\", \"Cayman Islands\", \"Central African Republic\", \"Chad\", \"Chile\", \"China\", \"Christmas Island\", \"Cocos (Keeling) Islands\", \"Colombia\", \"Comoros\", \"Congo\", \"Congo, the Democratic Republic of the\", \"Cook Islands\", \"Costa Rica\", \"Cote d'Ivoire\", \"Croatia (Hrvatska)\", \"Cuba\", \"Cyprus\", \"Czech Republic\", \"Denmark\", \"Djibouti\", \"Dominica\", \"Dominican Republic\", \"East Timor\", \"Ecuador\", \"Egypt\", \"El Salvador\", \"Equatorial Guinea\", \"Eritrea\", \"Estonia\", \"Ethiopia\", \"Falkland Islands (Malvinas)\", \"Faroe Islands\", \"Fiji\", \"Finland\", \"France\", \"France Metropolitan\", \"French Guiana\", \"French Polynesia\", \"French Southern Territories\", \"Gabon\", \"Gambia\", \"Georgia\", \"Germany\", \"Ghana\", \"Gibraltar\", \"Greece\", \"Greenland\", \"Grenada\", \"Guadeloupe\", \"Guam\", \"Guatemala\", \"Guinea\", \"Guinea-Bissau\", \"Guyana\", \"Haiti\", \"Heard and Mc Donald Islands\", \"Holy See (Vatican City State)\", \"Honduras\", \"Hong Kong\", \"Hungary\", \"Iceland\", \"India\", \"Indonesia\", \"Iran (Islamic Republic of)\", \"Iraq\", \"Ireland\", \"Israel\", \"Italy\", \"Jamaica\", \"Japan\", \"Jordan\", \"Kazakhstan\", \"Kenya\", \"Kiribati\", \"Korea, Democratic People's Republic of\", \"Korea, Republic of\", \"Kuwait\", \"Kyrgyzstan\", \"Lao, People's Democratic Republic\", \"Latvia\", \"Lebanon\", \"Lesotho\", \"Liberia\", \"Libyan Arab Jamahiriya\", \"Liechtenstein\", \"Lithuania\", \"Luxembourg\", \"Macau\", \"Macedonia, The Former Yugoslav Republic of\", \"Madagascar\", \"Malawi\", \"Malaysia\", \"Maldives\", \"Mali\", \"Malta\", \"Marshall Islands\", \"Martinique\", \"Mauritania\", \"Mauritius\", \"Mayotte\", \"Mexico\", \"Micronesia, Federated States of\", \"Moldova, Republic of\", \"Monaco\", \"Mongolia\", \"Montserrat\", \"Morocco\", \"Mozambique\", \"Myanmar\", \"Namibia\", \"Nauru\", \"Nepal\", \"Netherlands\", \"Netherlands Antilles\", \"New Caledonia\", \"New Zealand\", \"Nicaragua\", \"Niger\", \"Nigeria\", \"Niue\", \"Norfolk Island\", \"Northern Mariana Islands\", \"Norway\", \"Oman\", \"Pakistan\", \"Palau\", \"Panama\", \"Papua New Guinea\", \"Paraguay\", \"Peru\", \"Philippines\", \"Pitcairn\", \"Poland\", \"Portugal\", \"Puerto Rico\", \"Qatar\", \"Reunion\", \"Romania\", \"Russian Federation\", \"Rwanda\", \"Saint Kitts and Nevis\", \"Saint Lucia\", \"Saint Vincent and the Grenadines\", \"Samoa\", \"San Marino\", \"Sao Tome and Principe\", \"Saudi Arabia\", \"Senegal\", \"Seychelles\", \"Sierra Leone\", \"Singapore\", \"Slovakia (Slovak Republic)\", \"Slovenia\", \"Solomon Islands\", \"Somalia\", \"South Africa\", \"South Georgia and the South Sandwich Islands\", \"Spain\", \"Sri Lanka\", \"St. Helena\", \"St. Pierre and Miquelon\", \"Sudan\", \"Suriname\", \"Svalbard and Jan Mayen Islands\", \"Swaziland\", \"Sweden\", \"Switzerland\", \"Syrian Arab Republic\", \"Taiwan, Province of China\", \"Tajikistan\", \"Tanzania, United Republic of\", \"Thailand\", \"Togo\", \"Tokelau\", \"Tonga\", \"Trinidad and Tobago\", \"Tunisia\", \"Turkey\", \"Turkmenistan\", \"Turks and Caicos Islands\", \"Tuvalu\", \"Uganda\", \"Ukraine\", \"United Arab Emirates\", \"United Kingdom\", \"United States\", \"United States Minor Outlying Islands\", \"Uruguay\", \"Uzbekistan\", \"Vanuatu\", \"Venezuela\", \"Vietnam\", \"Virgin Islands (British)\", \"Virgin Islands (U.S.)\", \"Wallis and Futuna Islands\", \"Western Sahara\", \"Yemen\", \"Yugoslavia\", \"Zambia\", \"Zimbabwe\");\n foreach($countries as $country)\n {\n echo \"<option class='option' value='$country'>$country</option>\";\n }\n}", "public function getAllCountrie()\n\t{\n\t\t$countrie = Countrie::all() ;\t\n\t\t$data = array() ;\n\t\tforeach($countrie as $value){\n\t\t\t$countryData = array(\n\t\t\t'id' => $value->id ,\n\t\t\t'name_ar' => $value->name_ar ,\n\t\t\t'name_en' => $value->name_en \n\t\t\t) ;\n\t\t\tarray_push($data , $countryData) ;\n\t\t}\n\t\t return response()->json([\n 'status' => 1,\n 'data' => $data, \t\t\t\t\n ]); \n\t}", "public static function getISOCountryList()\r\n\t{\r\n\t\t$iclISOCountryList = new PYS_ISOCountryList();\r\n\t\t\r\n\t\t$iclISOCountryList->add(826,\"United Kingdom\",\"GBR\",3);\r\n\t\t$iclISOCountryList->add(840,\"United States\",\"USA\",2);\r\n\t\t$iclISOCountryList->add(36,\"Australia\",\"AUS\",1);\r\n\t\t$iclISOCountryList->add(124,\"Canada\",\"CAN\",1);\r\n\t\t$iclISOCountryList->add(250,\"France\",\"FRA\",1);\r\n\t\t$iclISOCountryList->add(276,\"Germany\",\"DEU\",1);\r\n\t\t$iclISOCountryList->add(4,\"Afghanistan\",\"AFG\",0);\r\n\t\t$iclISOCountryList->add(248,\"Åland Islands\",\"ALA\",0);\t\r\n\t\t$iclISOCountryList->add(8,\"Albania\",\"ALB\",0);\r\n\t\t$iclISOCountryList->add(12,\"Algeria\",\"DZA\",0);\r\n\t\t$iclISOCountryList->add(16,\"American Samoa\",\"ASM\",0);\r\n\t\t$iclISOCountryList->add(20,\"Andorra\",\"AND\",0);\r\n\t\t$iclISOCountryList->add(24,\"Angola\",\"AGO\",0);\r\n\t\t$iclISOCountryList->add(660,\"Anguilla\",\"AIA\",0);\r\n\t\t$iclISOCountryList->add(10,\"Antarctica\",\"ATA\",0);\r\n\t\t$iclISOCountryList->add(28,\"Antigua and Barbuda\",\"ATG\",0);\r\n\t\t$iclISOCountryList->add(32,\"Argentina\",\"ARG\",0);\r\n\t\t$iclISOCountryList->add(51,\"Armenia\",\"ARM\",0);\r\n\t\t$iclISOCountryList->add(533,\"Aruba\",\"ABW\",0);\r\n\t\t$iclISOCountryList->add(40,\"Austria\",\"AUT\",0);\r\n\t\t$iclISOCountryList->add(31,\"Azerbaijan\",\"AZE\",0);\r\n\t\t$iclISOCountryList->add(44,\"Bahamas\",\"BHS\",0);\r\n\t\t$iclISOCountryList->add(48,\"Bahrain\",\"BHR\",0);\r\n\t\t$iclISOCountryList->add(50,\"Bangladesh\",\"BGD\",0);\r\n\t\t$iclISOCountryList->add(52,\"Barbados\",\"BRB\",0);\r\n\t\t$iclISOCountryList->add(112,\"Belarus\",\"BLR\",0);\r\n\t\t$iclISOCountryList->add(56,\"Belgium\",\"BEL\",0);\r\n\t\t$iclISOCountryList->add(84,\"Belize\",\"BLZ\",0);\r\n\t\t$iclISOCountryList->add(204,\"Benin\",\"BEN\",0);\r\n\t\t$iclISOCountryList->add(60,\"Bermuda\",\"BMU\",0);\r\n\t\t$iclISOCountryList->add(64,\"Bhutan\",\"BTN\",0);\r\n\t\t$iclISOCountryList->add(68,\"Bolivia\",\"BOL\",0);\r\n\t\t$iclISOCountryList->add(70,\"Bosnia and Herzegovina\",\"BIH\",0);\r\n\t\t$iclISOCountryList->add(72,\"Botswana\",\"BWA\",0);\r\n\t\t$iclISOCountryList->add(74,\"Bouvet Island\",\"BVT\",0);\r\n\t\t$iclISOCountryList->add(76,\"Brazil Federative\",\"BRA\",0);\r\n\t\t$iclISOCountryList->add(86,\"British Indian Ocean Territory\",\"IOT\",0);\r\n\t\t$iclISOCountryList->add(96,\"Brunei\",\"BRN\",0);\r\n\t\t$iclISOCountryList->add(100,\"Bulgaria\",\"BGR\",0);\r\n\t\t$iclISOCountryList->add(854,\"Burkina Faso\",\"BFA\",0);\r\n\t\t$iclISOCountryList->add(108,\"Burundi\",\"BDI\",0);\r\n\t\t$iclISOCountryList->add(116,\"Cambodia\",\"KHM\",0);\r\n\t\t$iclISOCountryList->add(120,\"Cameroon\",\"CMR\",0);\r\n\t\t$iclISOCountryList->add(132,\"Cape Verde\",\"CPV\",0);\r\n\t\t$iclISOCountryList->add(136,\"Cayman Islands\",\"CYM\",0);\r\n\t\t$iclISOCountryList->add(140,\"Central African Republic\",\"CAF\",0);\r\n\t\t$iclISOCountryList->add(148,\"Chad\",\"TCD\",0);\r\n\t\t$iclISOCountryList->add(152,\"Chile\",\"CHL\",0);\r\n\t\t$iclISOCountryList->add(156,\"China\",\"CHN\",0);\r\n\t\t$iclISOCountryList->add(162,\"Christmas Island\",\"CXR\",0);\r\n\t\t$iclISOCountryList->add(166,\"Cocos (Keeling) Islands\",\"CCK\",0);\r\n\t\t$iclISOCountryList->add(170,\"Colombia\",\"COL\",0);\r\n\t\t$iclISOCountryList->add(174,\"Comoros\",\"COM\",0);\r\n\t\t$iclISOCountryList->add(180,\"Congo\",\"COD\",0);\r\n\t\t$iclISOCountryList->add(178,\"Congo\",\"COG\",0);\r\n\t\t$iclISOCountryList->add(184,\"Cook Islands\",\"COK\",0);\r\n\t\t$iclISOCountryList->add(188,\"Costa Rica\",\"CRI\",0);\r\n\t\t$iclISOCountryList->add(384,\"Côte d'Ivoire\",\"CIV\",0);\r\n\t\t$iclISOCountryList->add(191,\"Croatia\",\"HRV\",0);\r\n\t\t$iclISOCountryList->add(192,\"Cuba\",\"CUB\",0);\r\n\t\t$iclISOCountryList->add(196,\"Cyprus\",\"CYP\",0);\r\n\t\t$iclISOCountryList->add(203,\"Czech Republic\",\"CZE\",0);\r\n\t\t$iclISOCountryList->add(208,\"Denmark\",\"DNK\",0);\r\n\t\t$iclISOCountryList->add(262,\"Djibouti\",\"DJI\",0);\r\n\t\t$iclISOCountryList->add(212,\"Dominica\",\"DMA\",0);\r\n\t\t$iclISOCountryList->add(214,\"Dominican Republic\",\"DOM\",0);\r\n\t\t$iclISOCountryList->add(626,\"East Timor\",\"TMP\",0);\r\n\t\t$iclISOCountryList->add(218,\"Ecuador\",\"ECU\",0);\r\n\t\t$iclISOCountryList->add(818,\"Egypt\",\"EGY\",0);\r\n\t\t$iclISOCountryList->add(222,\"El Salvador\",\"SLV\",0);\r\n\t\t$iclISOCountryList->add(226,\"Equatorial Guinea\",\"GNQ\",0);\r\n\t\t$iclISOCountryList->add(232,\"Eritrea\",\"ERI\",0);\r\n\t\t$iclISOCountryList->add(233,\"Estonia\",\"EST\",0);\r\n\t\t$iclISOCountryList->add(231,\"Ethiopia\",\"ETH\",0);\r\n\t\t$iclISOCountryList->add(238,\"Falkland Islands (Malvinas)\",\"FLK\",0);\r\n\t\t$iclISOCountryList->add(234,\"Faroe Islands\",\"FRO\",0);\r\n\t\t$iclISOCountryList->add(242,\"Fiji\",\"FJI\",0);\r\n\t\t$iclISOCountryList->add(246,\"Finland\",\"FIN\",0);\r\n\t\t$iclISOCountryList->add(254,\"French Guiana\",\"GUF\",0);\r\n\t\t$iclISOCountryList->add(258,\"French Polynesia\",\"PYF\",0);\r\n\t\t$iclISOCountryList->add(260,\"French Southern Territories\",\"ATF\",0);\r\n\t\t$iclISOCountryList->add(266,\"Gabon\",\"GAB\",0);\r\n\t\t$iclISOCountryList->add(270,\"Gambia\",\"GMB\",0);\r\n\t\t$iclISOCountryList->add(268,\"Georgia\",\"GEO\",0);\r\n\t\t$iclISOCountryList->add(288,\"Ghana\",\"GHA\",0);\r\n\t\t$iclISOCountryList->add(292,\"Gibraltar\",\"GIB\",0);\r\n\t\t$iclISOCountryList->add(300,\"Greece\",\"GRC\",0);\r\n\t\t$iclISOCountryList->add(304,\"Greenland\",\"GRL\",0);\r\n\t\t$iclISOCountryList->add(308,\"Grenada\",\"GRD\",0);\r\n\t\t$iclISOCountryList->add(312,\"Guadaloupe\",\"GLP\",0);\r\n\t\t$iclISOCountryList->add(316,\"Guam\",\"GUM\",0);\r\n\t\t$iclISOCountryList->add(320,\"Guatemala\",\"GTM\",0);\r\n\t\t$iclISOCountryList->add(831,\"Guernsey\",\"GGY\",0);\r\n\t\t$iclISOCountryList->add(324,\"Guinea\",\"GIN\",0);\r\n\t\t$iclISOCountryList->add(624,\"Guinea-Bissau\",\"GNB\",0);\r\n\t\t$iclISOCountryList->add(328,\"Guyana\",\"GUY\",0);\r\n\t\t$iclISOCountryList->add(332,\"Haiti\",\"HTI\",0);\r\n\t\t$iclISOCountryList->add(334,\"Heard Island and McDonald Islands\",\"HMD\",0);\r\n\t\t$iclISOCountryList->add(340,\"Honduras\",\"HND\",0);\r\n\t\t$iclISOCountryList->add(344,\"Hong Kong\",\"HKG\",0);\r\n\t\t$iclISOCountryList->add(348,\"Hungary\",\"HUN\",0);\r\n\t\t$iclISOCountryList->add(352,\"Iceland\",\"ISL\",0);\r\n\t\t$iclISOCountryList->add(356,\"India\",\"IND\",0);\r\n\t\t$iclISOCountryList->add(360,\"Indonesia\",\"IDN\",0);\r\n\t\t$iclISOCountryList->add(364,\"Iran\",\"IRN\",0);\r\n\t\t$iclISOCountryList->add(368,\"Iraq\",\"IRQ\",0);\r\n\t\t$iclISOCountryList->add(372,\"Ireland\",\"IRL\",0);\r\n\t\t$iclISOCountryList->add(833,\"Isle of Man\",\"IMN\",0);\r\n\t\t$iclISOCountryList->add(376,\"Israel\",\"ISR\",0);\r\n\t\t$iclISOCountryList->add(380,\"Italy\",\"ITA\",0);\r\n\t\t$iclISOCountryList->add(388,\"Jamaica\",\"JAM\",0);\r\n\t\t$iclISOCountryList->add(392,\"Japan\",\"JPN\",0);\r\n\t\t$iclISOCountryList->add(832,\"Jersey\",\"JEY\",0);\r\n\t\t$iclISOCountryList->add(400,\"Jordan\",\"JOR\",0);\r\n\t\t$iclISOCountryList->add(398,\"Kazakhstan\",\"KAZ\",0);\r\n\t\t$iclISOCountryList->add(404,\"Kenya\",\"KEN\",0);\r\n\t\t$iclISOCountryList->add(296,\"Kiribati\",\"KIR\",0);\r\n\t\t$iclISOCountryList->add(410,\"Korea\",\"KOR\",0);\r\n\t\t$iclISOCountryList->add(408,\"Korea\",\"PRK\",0);\r\n\t\t$iclISOCountryList->add(414,\"Kuwait\",\"KWT\",0);\r\n\t\t$iclISOCountryList->add(417,\"Kyrgyzstan\",\"KGZ\",0);\r\n\t\t$iclISOCountryList->add(418,\"Lao\",\"LAO\",0);\r\n\t\t$iclISOCountryList->add(428,\"Latvia\",\"LVA\",0);\r\n\t\t$iclISOCountryList->add(422,\"Lebanon\",\"LBN\",0);\r\n\t\t$iclISOCountryList->add(426,\"Lesotho\",\"LSO\",0);\r\n\t\t$iclISOCountryList->add(430,\"Liberia\",\"LBR\",0);\r\n\t\t$iclISOCountryList->add(434,\"Libyan Arab Jamahiriya\",\"LBY\",0);\r\n\t\t$iclISOCountryList->add(438,\"Liechtenstein\",\"LIE\",0);\r\n\t\t$iclISOCountryList->add(440,\"Lithuania\",\"LTU\",0);\r\n\t\t$iclISOCountryList->add(442,\"Luxembourg\",\"LUX\",0);\r\n\t\t$iclISOCountryList->add(446,\"Macau\",\"MAC\",0);\r\n\t\t$iclISOCountryList->add(807,\"Macedonia\",\"MKD\",0);\r\n\t\t$iclISOCountryList->add(450,\"Madagascar\",\"MDG\",0);\r\n\t\t$iclISOCountryList->add(454,\"Malawi\",\"MWI\",0);\r\n\t\t$iclISOCountryList->add(458,\"Malaysia\",\"MYS\",0);\r\n\t\t$iclISOCountryList->add(462,\"Maldives\",\"MDV\",0);\r\n\t\t$iclISOCountryList->add(466,\"Mali\",\"MLI\",0);\r\n\t\t$iclISOCountryList->add(470,\"Malta\",\"MLT\",0);\r\n\t\t$iclISOCountryList->add(584,\"Marshall Islands\",\"MHL\",0);\r\n\t\t$iclISOCountryList->add(474,\"Martinique\",\"MTQ\",0);\r\n\t\t$iclISOCountryList->add(478,\"Mauritania Islamic\",\"MRT\",0);\r\n\t\t$iclISOCountryList->add(480,\"Mauritius\",\"MUS\",0);\r\n\t\t$iclISOCountryList->add(175,\"Mayotte\",\"MYT\",0);\r\n\t\t$iclISOCountryList->add(484,\"Mexico\",\"MEX\",0);\r\n\t\t$iclISOCountryList->add(583,\"Micronesia\",\"FSM\",0);\r\n\t\t$iclISOCountryList->add(498,\"Moldova\",\"MDA\",0);\r\n\t\t$iclISOCountryList->add(492,\"Monaco\",\"MCO\",0);\r\n\t\t$iclISOCountryList->add(496,\"Mongolia\",\"MNG\",0);\r\n\t\t$iclISOCountryList->add(499,\"Montenegro\",\"MNE\",0);\t\r\n\t\t$iclISOCountryList->add(500,\"Montserrat\",\"MSR\",0);\r\n\t\t$iclISOCountryList->add(504,\"Morocco\",\"MAR\",0);\r\n\t\t$iclISOCountryList->add(508,\"Mozambique\",\"MOZ\",0);\r\n\t\t$iclISOCountryList->add(104,\"Myanmar\",\"MMR\",0);\r\n\t\t$iclISOCountryList->add(516,\"Namibia\",\"NAM\",0);\r\n\t\t$iclISOCountryList->add(520,\"Nauru\",\"NRU\",0);\r\n\t\t$iclISOCountryList->add(524,\"Nepal\",\"NPL\",0);\r\n\t\t$iclISOCountryList->add(528,\"Netherlands\",\"NLD\",0);\r\n\t\t$iclISOCountryList->add(530,\"Netherlands Antilles\",\"ANT\",0);\r\n\t\t$iclISOCountryList->add(540,\"New Caledonia\",\"NCL\",0);\r\n\t\t$iclISOCountryList->add(554,\"New Zealand\",\"NZL\",0);\r\n\t\t$iclISOCountryList->add(558,\"Nicaragua\",\"NIC\",0);\r\n\t\t$iclISOCountryList->add(562,\"Niger\",\"NER\",0);\r\n\t\t$iclISOCountryList->add(566,\"Nigeria\",\"NGA\",0);\r\n\t\t$iclISOCountryList->add(570,\"Niue\",\"NIU\",0);\r\n\t\t$iclISOCountryList->add(574,\"Norfolk Island\",\"NFK\",0);\r\n\t\t$iclISOCountryList->add(580,\"Northern Mariana Islands\",\"MNP\",0);\r\n\t\t$iclISOCountryList->add(578,\"Norway\",\"NOR\",0);\r\n\t\t$iclISOCountryList->add(512,\"Oman\",\"OMN\",0);\r\n\t\t$iclISOCountryList->add(586,\"Pakistan\",\"PAK\",0);\r\n\t\t$iclISOCountryList->add(585,\"Palau\",\"PLW\",0);\r\n\t\t$iclISOCountryList->add(275,\"Palestine\",\"PSE\",0);\t\r\n\t\t$iclISOCountryList->add(591,\"Panama\",\"PAN\",0);\r\n\t\t$iclISOCountryList->add(598,\"Papua New Guinea\",\"PNG\",0);\r\n\t\t$iclISOCountryList->add(600,\"Paraguay\",\"PRY\",0);\r\n\t\t$iclISOCountryList->add(604,\"Peru\",\"PER\",0);\r\n\t\t$iclISOCountryList->add(608,\"Philippines\",\"PHL\",0);\r\n\t\t$iclISOCountryList->add(612,\"Pitcairn\",\"PCN\",0);\r\n\t\t$iclISOCountryList->add(616,\"Poland\",\"POL\",0);\r\n\t\t$iclISOCountryList->add(620,\"Portugal\",\"PRT\",0);\r\n\t\t$iclISOCountryList->add(630,\"Puerto Rico\",\"PRI\",0);\r\n\t\t$iclISOCountryList->add(634,\"Qatar\",\"QAT\",0);\r\n\t\t$iclISOCountryList->add(638,\"Réunion\",\"REU\",0);\r\n\t\t$iclISOCountryList->add(642,\"Romania\",\"ROM\",0);\r\n\t\t$iclISOCountryList->add(643,\"Russian Federation\",\"RUS\",0);\r\n\t\t$iclISOCountryList->add(646,\"Rwanda\",\"RWA\",0);\r\n\t\t$iclISOCountryList->add(652,\"Saint Barthélemy\",\"BLM\",0);\r\n\t\t$iclISOCountryList->add(654,\"Saint Helena\",\"SHN\",0);\r\n\t\t$iclISOCountryList->add(659,\"Saint Kitts and Nevis\",\"KNA\",0);\r\n\t\t$iclISOCountryList->add(662,\"Saint Lucia\",\"LCA\",0);\r\n\t\t$iclISOCountryList->add(663,\"Saint Martin (French part)\",\"MAF\",0);\r\n\t\t$iclISOCountryList->add(666,\"Saint Pierre and Miquelon\",\"SPM\",0);\r\n\t\t$iclISOCountryList->add(670,\"Saint Vincent and the Grenadines\",\"VCT\",0);\r\n\t\t$iclISOCountryList->add(882,\"Samoa\",\"WSM\",0);\r\n\t\t$iclISOCountryList->add(674,\"San Marino\",\"SMR\",0);\r\n\t\t$iclISOCountryList->add(678,\"São Tomé and Príncipe Democratic\",\"STP\",0);\r\n\t\t$iclISOCountryList->add(682,\"Saudi Arabia\",\"SAU\",0);\r\n\t\t$iclISOCountryList->add(686,\"Senegal\",\"SEN\",0);\r\n\t\t$iclISOCountryList->add(688,\"Serbia\",\"SRB\",0);\r\n\t\t$iclISOCountryList->add(690,\"Seychelles\",\"SYC\",0);\r\n\t\t$iclISOCountryList->add(694,\"Sierra Leone\",\"SLE\",0);\r\n\t\t$iclISOCountryList->add(702,\"Singapore\",\"SGP\",0);\r\n\t\t$iclISOCountryList->add(703,\"Slovakia\",\"SVK\",0);\r\n\t\t$iclISOCountryList->add(705,\"Slovenia\",\"SVN\",0);\r\n\t\t$iclISOCountryList->add(90,\"Solomon Islands\",\"SLB\",0);\r\n\t\t$iclISOCountryList->add(706,\"Somalia\",\"SOM\",0);\r\n\t\t$iclISOCountryList->add(710,\"South Africa\",\"ZAF\",0);\r\n\t\t$iclISOCountryList->add(239,\"South Georgia and the South Sandwich Islands\",\"SGS\",0);\r\n\t\t$iclISOCountryList->add(724,\"Spain\",\"ESP\",0);\r\n\t\t$iclISOCountryList->add(144,\"Sri Lanka\",\"LKA\",0);\r\n\t\t$iclISOCountryList->add(736,\"Sudan\",\"SDN\",0);\r\n\t\t$iclISOCountryList->add(740,\"Suriname\",\"SUR\",0);\r\n\t\t$iclISOCountryList->add(744,\"Svalbard and Jan Mayen\",\"SJM\",0);\r\n\t\t$iclISOCountryList->add(748,\"Swaziland\",\"SWZ\",0);\r\n\t\t$iclISOCountryList->add(752,\"Sweden\",\"SWE\",0);\r\n\t\t$iclISOCountryList->add(756,\"Switzerland\",\"CHE\",0);\r\n\t\t$iclISOCountryList->add(760,\"Syrian Arab Republic\",\"SYR\",0);\r\n\t\t$iclISOCountryList->add(158,\"Taiwan,\",\"TWN\",0);\r\n\t\t$iclISOCountryList->add(762,\"Tajikistan\",\"TJK\",0);\r\n\t\t$iclISOCountryList->add(834,\"Tanzania\",\"TZA\",0);\r\n\t\t$iclISOCountryList->add(764,\"Thailand\",\"THA\",0);\r\n\t\t$iclISOCountryList->add(768,\"Togo\",\"TGO\",0);\r\n\t\t$iclISOCountryList->add(772,\"Tokelau\",\"TKL\",0);\r\n\t\t$iclISOCountryList->add(776,\"Tonga\",\"TON\",0);\r\n\t\t$iclISOCountryList->add(780,\"Trinidad and Tobago\",\"TTO\",0);\r\n\t\t$iclISOCountryList->add(788,\"Tunisia\",\"TUN\",0);\r\n\t\t$iclISOCountryList->add(792,\"Turkey\",\"TUR\",0);\r\n\t\t$iclISOCountryList->add(795,\"Turkmenistan\",\"TKM\",0);\r\n\t\t$iclISOCountryList->add(796,\"Turks and Caicos Islands\",\"TCA\",0);\r\n\t\t$iclISOCountryList->add(798,\"Tuvalu\",\"TUV\",0);\r\n\t\t$iclISOCountryList->add(800,\"Uganda\",\"UGA\",0);\r\n\t\t$iclISOCountryList->add(804,\"Ukraine\",\"UKR\",0);\r\n\t\t$iclISOCountryList->add(784,\"United Arab Emirates\",\"ARE\",0);\r\n\t\t$iclISOCountryList->add(581,\"United States Minor Outlying Islands\",\"UMI\",0);\r\n\t\t$iclISOCountryList->add(858,\"Uruguay Eastern\",\"URY\",0);\r\n\t\t$iclISOCountryList->add(860,\"Uzbekistan\",\"UZB\",0);\r\n\t\t$iclISOCountryList->add(548,\"Vanuatu\",\"VUT\",0);\r\n\t\t$iclISOCountryList->add(336,\"Vatican City State\",\"VAT\",0);\r\n\t\t$iclISOCountryList->add(862,\"Venezuela\",\"VEN\",0);\r\n\t\t$iclISOCountryList->add(704,\"Vietnam\",\"VNM\",0);\r\n\t\t$iclISOCountryList->add(92,\"Virgin Islands, British\",\"VGB\",0);\r\n\t\t$iclISOCountryList->add(850,\"Virgin Islands, U.S.\",\"VIR\",0);\r\n\t\t$iclISOCountryList->add(876,\"Wallis and Futuna\",\"WLF\",0);\r\n\t\t$iclISOCountryList->add(732,\"Western Sahara\",\"ESH\",0);\r\n\t\t$iclISOCountryList->add(887,\"Yemen\",\"YEM\",0);\r\n\t\t$iclISOCountryList->add(894,\"Zambia\",\"ZMB\",0);\r\n\t\t$iclISOCountryList->add(716,\"Zimbabwe\",\"ZWE\",0);\r\n\t\t\r\n\t\treturn $iclISOCountryList;\r\n\t}", "public function getCountries() {\n\t\treturn $this->getData('/objekt/laender');\n\t}", "public function getAllCountriesProperty()\n {\n return Country::get();\n }", "public function getCountries() {\n $this->db->select('id, country_name, internet'); \n $result = $this->db->get(TBL_COUNTRIES);\n if ($result->num_rows() > 0 )\n return $result->result_array();\n else\n return FALSE;\n }", "public function getAllCountryCodes() {\n\t\t$filter = new Filters\\Misc\\CountryCode();\n\t\treturn $filter->query->find();\n\t}", "function getcountries_get(){\n\n $from = 'countries';\n $where = array();\n $select = '*';\n $records = 2;\n\n $countries = $this->base_model->getCommon($from, $where, $select, $records);\n\n if ($countries) {\n \n $response = array(\n 'status' => TRUE,\n 'message' => 'Countries found successfully.',\n 'result' => $countries);\n\n $this->set_response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code \n }else{\n $response = array(\n 'status' => FALSE,\n 'message' => 'Country not found.');\n $this->response($response, REST_Controller::FIELD_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $countries = $em->getRepository('B2bBundle:Country')->findAll();\n\n return $this->render('country/index.html.twig', array(\n 'countries' => $countries,\n ));\n }", "public function index(){\n $countries=Country::all();\n return view('auth.register')->with(\"countries\",$countries);\n }", "public function getAll()\n {\n \ttry {\n\t\t\t// Cargo los entrenamientos.\n\t\t\t$country = Country::get();\n\t\t\t\n \t} catch (\\Exception $e) {\n \t\treturn ResponseHelper::armyResponse(false, 400, \"Internal Error\", \"Error: \" . $e->getMessage()) ;\n \t}\n\n\t\treturn ResponseHelper::armyResponse(true, 200, $country, \"countries\");\n }", "public function getCountriesCount() {\n $db = database::getDB();\n $query = \"SELECT COUNT(*) FROM countries ORDER BY id ASC\";\n $data = $db->query($query);\n return $data;\n }", "public function listcountryAction(Request $request)\n {\n if (! $request->isXmlHttpRequest()) {\n throw new NotFoundHttpException();\n }\n $name = $request->query->get('city_name');\n $list = $request->query->get('countrylist');\n $countrylist = json_decode($list);\n\n $em = $this->getDoctrine()->getManager();\n $states = $em->getRepository('NvCargaBundle:State')->findByCountry($countrylist);\n \n $entities = $em->getRepository('NvCargaBundle:City')->createQueryBuilder('o')\n \t\t\t->where('o.name LIKE :name')\n //->setParameter('name', '%'.$name.'%')\n ->andWhere('o.state IN (:states)')\n ->andwhere('o.active =:active')\n ->setParameters(['name'=>$name.'%','states'=>$states, 'active'=>true])\n ->setFirstResult(0)\n ->setMaxResults(25)\n ->getQuery()\n ->getResult();\n $result=array();\n $counter = 0;\n foreach ($entities as $entity) {\n $result[$counter]['cityid'] = $entity->getId();\n $result[$counter]['cityname'] = $entity->getName();\n $result[$counter]['state'] = $entity->getState()->getName();\n $result[$counter]['country'] = $entity->getState()->getCountry()->getName();\n $counter++;\n }\n\t\n return new JsonResponse($result); \n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function getCountries()\n {\n return $this->countries;\n }", "public function presetCountries()\n {\n $fullResult = $this->client->call(\n 'crm.requisite.preset.countries'\n );\n return $fullResult;\n }", "public function country_options()\n\t{\n\t\t$countries = ee()->db\n\t\t\t\t->where('enabled', 1)\n\t\t\t\t->get('store_countries');\n\n\t\t$output = '<option value=\"\">--Select Country--</option>' . \"\\n\";\n\n\t\tforeach($countries->result() as $country)\n\t\t{\n\t\t\tif($country->code == ee()->TMPL->fetch_param('country_code'))\n\t\t\t{\n\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$selected = '';\n\t\t\t}\n\n\t\t\t$output .= '<option value=\"' . $country->code . '\"' . $selected . ' >' . $country->name . '</option>' . \"\\n\";\n\n\t\t}\t\t\n\n\t\treturn $output;\n\t}", "public function indexAction()\n {\n \n $em = $this->getDoctrine()->getManager();\n /*\n $entities = $em->getRepository('NvCargaBundle:City')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n */\n $listall = $this->getUser()->getMaincompany()->getCountries();\n $countries = array();\n $count = 0;\n foreach ($listall as $country) {\n $countries[$count]['id'] = $country->getId();\n $countries[$count]['name'] = $country->getName();\n $count++;\n }\n return $this->render('NvCargaBundle:City:index.html.twig',array('countries' => $countries)); \n\n }", "public function getCountryList() {\n \n if($this->request->has('page')) {\n $data = $this->_countries->where('is_active', 1)->with(['categories' =>function($query){\n $query->distinct('id');\n }])->paginate(10);\n } else {\n $data = $this->_countries->where('is_active', 1)->with(['categories' =>function($query){\n $query->distinct('id');\n }])->get();\n }\n\n // db::raw('SELECT country_categories.country_id FROM country_categories INNER JOIN videos ON videos.id = country_categories.video_id WHERE videos.is_live =1 group BY country_categories.country_id order BY country_id ASC');\n $result = DB::select( DB::raw('SELECT country_categories.country_id FROM country_categories INNER JOIN videos ON videos.id = country_categories.video_id LEFT JOIN countries c ON country_categories.country_id= c.id WHERE c.is_active = 1 and videos.is_live =1 and videos.is_active = 1 and videos.job_status=\"Complete\" and videos.is_archived = 0 and videos.liveStatus != \"complete\" and country_categories.video_id != 0 group BY country_categories.country_id order BY country_id ASC'));\n $countries = array();\n foreach($result as $country) {\n array_push($countries,$country->country_id);\n }\n\n foreach($data as $item) {\n if(in_array($item['id'],$countries)){\n $list[] = $item;\n }\n }\n return $list;\n }", "public function index()\n {\n $countries = Country::whereStatus(1)->orderBy('id','DESC')->get();\n return view('country.create',compact('countries'));\n }", "public function index()\n {\n return Country::orderBy('name', 'ASC')->paginate();\n }" ]
[ "0.7717195", "0.7541187", "0.7524395", "0.7513591", "0.7469724", "0.74654615", "0.7353423", "0.7318043", "0.73065144", "0.72373843", "0.72113544", "0.7169729", "0.71623", "0.7162076", "0.7156155", "0.7125835", "0.7098961", "0.70277655", "0.7026228", "0.70021564", "0.70020545", "0.69850653", "0.69333863", "0.6922673", "0.6915857", "0.69129044", "0.6906349", "0.69018465", "0.6893525", "0.6884721", "0.6825799", "0.6825596", "0.6811671", "0.6800443", "0.67675775", "0.6763509", "0.6760744", "0.67499006", "0.674855", "0.67472655", "0.67449087", "0.6735976", "0.6703144", "0.66988736", "0.6686957", "0.6682203", "0.66676056", "0.66667235", "0.6663776", "0.6652571", "0.6650032", "0.66442806", "0.66257447", "0.6573986", "0.65723264", "0.6568112", "0.6562202", "0.655004", "0.6549517", "0.6545136", "0.6526217", "0.652344", "0.6518672", "0.65137625", "0.65038604", "0.650317", "0.64992815", "0.6487149", "0.64847946", "0.6464703", "0.6457198", "0.6436522", "0.6430314", "0.6422804", "0.6404926", "0.6399839", "0.63954127", "0.6388557", "0.638688", "0.6382721", "0.63820046", "0.63774186", "0.6371057", "0.636645", "0.6362453", "0.6348854", "0.63270634", "0.6318351", "0.6316666", "0.63056713", "0.630462", "0.6274182", "0.6274182", "0.6274182", "0.62660843", "0.62605584", "0.6249671", "0.6243638", "0.6241306", "0.62411946" ]
0.6412694
74
Sort an array of objects by a specific property of these objects
public function sortByProp($array, $propertyName) { $sorted = []; foreach ($array as $item) $sorted[$item[$propertyName]][] = $item; ksort($sorted); $result = []; foreach ($sorted as $subArray) foreach ($subArray as $item) $result[] = $item; return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function propsort(&$array, $property) {\n uasort($array, create_function('$a,$b','return strcmp($a->'.$property.', $b->'.$property.');'));\n return $array;\n}", "function ObjectSorter(&$array, $props){\n if(!is_array($props)) $props = array($props => true); \n\t\t$function = '$props=unserialize(\\''.trim(serialize($props)).'\\');\n\t\t\t\tforeach($props as $prop => $ascending) { \n\t\t\t\t\tif($a->$prop != $b->$prop) { \n\t\t\t\t\t\tif($ascending==\"ASC\") return ($a->$prop > $b->$prop) ? 1 : -1; \n\t\t\t\t\t\telse return ($b->$prop > $a->$prop) ? 1 : -1; \n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t\treturn -1;';\n usort($array, create_function('$a,$b', $function) );\n\t}", "public static function sort(&$array, $orderBy) {\n $new_array = array();\n foreach ($array as $key => $obj) {\n $new_array[$key] = get_object_vars($obj->getEntity());\n $obj->hash = $new_array[$key]['hash'] = spl_object_hash($obj);\n }\n\n $new_array = self::sort_array_multidim($new_array, $orderBy);\n\n $output = array();\n foreach ($new_array as $key => $value) {\n\n }\n print_r($new_array);\n }", "private function osort(&$oarray, $props)\n {\n usort(\n $oarray\n , create_function(\n '$a,$b'\n ,'if($a->' . $props . '== $b->' . $props .'){\n return 0;\n }\n else {\n return ($a->' . $props . '< $b->' . $props .') ? -1 : 1;\n }'\n )\n );\n }", "protected function _sortByArray($array) {}", "public function asort() {}", "function array_sort_by(&$array_initial, $col, $order = SORT_ASC){\n\n $arrAux = array();\n\n foreach ($array_initial as $key=> $row){\n $arrAux[$key] = is_object($row) ? $arrAux[$key] = $row->$col : $row[$col];\n $arrAux[$key] = strtolower($arrAux[$key]);\n }\n\n array_multisort($arrAux, $order, $array_initial);\n }", "public static function sort_objects(array &$objects_array, $sort_by, $sort_order = \"desc\") {\n $sort_order = strtolower($sort_order);\n uasort(\n $objects_array,\n function ($a, $b) use ($sort_by, $sort_order) {\n if($a->$sort_by == $b->$sort_by) {\n return 0;\n } else {\n $comparison = $a->$sort_by > $b->$sort_by;\n if($sort_order == \"desc\") {\n return $comparison ? -1 : 1;\n } else {\n return $comparison ? 1 : -1;\n }\n }\n });\n }", "function orderHotelsByRate($array)\n{\n return collect($array)->sortByDesc('hotelRate');\n}", "function ldap_sort_by (&$array, $attr) {\n\t$sort_func = create_function('$a,$b', 'return strcasecmp($a[\"'.$attr.'\"], $b[\"'.$attr.'\"]);' );\n\tuasort($array, $sort_func);\n}", "public function sort();", "public function mySort(array $array);", "function cmp($a, $b){\n if ((int)$a->date[0] == (int)$b->date[0]) {\n return 0;\n }\n return ((int)$a->date[0] > (int)$b->date[0]) ? -1 : 1;\n}", "function cmp($a, $b){\n if ((int)$a->date[0] == (int)$b->date[0]) {\n return 0;\n }\n return ((int)$a->date[0] > (int)$b->date[0]) ? -1 : 1;\n}", "protected function sortDataArray() {}", "function sortBy($field, &$array, $direction = 'asc')\n{\n usort($array, create_function('$a, $b', '\n $a = $a[\"' . $field . '\"];\n $b = $b[\"' . $field . '\"];\n\n if ($a == $b) return 0;\n\n $direction = strtolower(trim($direction));\n\n return ($a ' . ($direction == 'desc' ? '>' : '<') . ' $b) ? -1 : 1;\n '));\n\n return true;\n}", "public static function SortArrayOfObjectsWithDateField($array,$fieldName,$order=\"ASC\"){\n usort($array, function($a, $b) use($order,$fieldName){\n\n $ad = date('Y-m-d H:i:s',strtotime($a->{$fieldName}));\n $bd = date('Y-m-d H:i:s',strtotime($b->{$fieldName}));\n if ($ad == $bd) {\n return 0;\n }\n if($order == Constants::$SortIndexDESC) {\n return $ad < $bd ? 1 : -1;\n }\n else{\n return $ad > $bd ? 1 : -1;\n }\n });\n return $array;\n }", "public static function arrSortObjsByKey($key, $order = 'DESC') {\n\treturn function($a, $b) use ($key, $order) {\n\t\t// Swap order if necessary\n\t\tif ($order == 'DESC') {\n \t \t\tlist($a, $b) = array($b, $a);\n \t\t} \n \t\t// Check data type\n \t\tif (is_numeric($a->$key)) {\n \t\t\treturn $a->$key - $b->$key; // compare numeric\n \t\t} else {\n \t\t\treturn strnatcasecmp($a->$key, $b->$key); // compare string\n \t\t}\n\t};\n}", "function sort_results ($unsorted)\n{\n // Add a key to all objects in the array that allows for sensible\n // sorting of numeric substrings.\n foreach ($unsorted as $res) {\n $res->key = preg_replace_callback (\n '|\\d+|',\n function ($match) {\n return 'zz' . strval (strlen ($match[0])) . $match[0];\n },\n $res->meta_value\n );\n }\n\n // Sort the array according to key.\n usort (\n $unsorted,\n function ($res1, $res2) {\n return strcoll ($res1->key, $res2->key);\n }\n );\n\n return array_map (\n function ($s) {\n return $s->meta_value;\n },\n $unsorted\n );\n}", "public function SortObjectsByName($obj){\r\n\t\tself::Debug('Sort objects by name');\r\n\t\t$temp=Array();\r\n\t\t$i=-1;\r\n\t\t$len=sizeof($obj);\r\n\t\twhile(++$i<$len)\r\n\t\t\t$temp[$obj[$i]->Name]=$obj[$i];\r\n\t\t$keys=array_keys($temp);\r\n\t\tsort($keys);\r\n\t\t$res=Array();\r\n\t\t$i=-1;\r\n\t\twhile(++$i<$len)\r\n\t\t\t$res[]=$temp[$keys[$i]];\r\n\t\treturn $res;\r\n\t}", "public function by_method(&$objects, $direction='A', $sortkey_function)\n {\n // Build array of pairs ('sortkey', 'object')\n $meta_array = array();\n foreach ($objects as $obj) $meta_array[] = array('sortkey'=>$sortkey_function($obj), 'object'=>$obj);\n \n // Sort array of pairs\n if ($direction == 'D') \n {\n usort($meta_array, function($a, $b)\n { \n return ($a['sortkey']==$b['sortkey'] ? 0 : ($a['sortkey']<$b['sortkey'] ? 1 : -1)); \n } );\n }\n else \n {\n usort($meta_array, function($a, $b)\n { \n return ($a['sortkey']==$b['sortkey'] ? 0 : ($a['sortkey']<$b['sortkey'] ? -1 : 1)); \n } );\n }\n \n // Flatten array of pairs back into original array of object\n $objects = array();\n foreach ($meta_array as $meta_obj) $objects[] = $meta_obj['object'];\n }", "function array_sort($array, $sortby) {\n\n $size = sizeof($array);\n\n for($i=0;$i<$size;$i++) {\n for($j=$i+1;$j<$size;$j++) {\n $temp = array();\n if($array[$i]['priority']<$array[$j]['priority']) {\n $temp = $array[$i];\n $array[$i] = $array[$j];\n $array[$j] = $temp;\n }\n }\n }\n return $array;\n}", "function asort(array &$array, $sort_flags = null)\n {\n }", "public static function sort(array &$objects, $sortingProperty) {\n\t\t$keyValues = array();\n\t\tforeach ($objects as $key => $object) {\n\t\t\t$propertyGetterName = 'get' . ucfirst($sortingProperty);\n\n\t\t\tif (method_exists($object, $propertyGetterName)) {\n\t\t\t\t$value = call_user_func(array($object, $propertyGetterName));\n\t\t\t} else {\n\t\t\t\t$value = '';\n\t\t\t}\n\n\t\t\t$keyValues[$key] = $value;\n\t\t}\n\n\t\tarray_multisort($keyValues, SORT_ASC, $objects);\n\t}", "public function sortByMultipleFields(MultiSortParameters ...$param): CollectionInterface;", "function sortArray( $data, $field ) {\r\n\t$field = (array) $field;\r\n\tuasort( $data, function($a, $b) use($field) {\r\n\t\t$retval = 0;\r\n\t\tforeach( $field as $fieldname ) {\r\n\t\t\tif( $retval == 0 ) $retval = strnatcmp( $a[$fieldname], $b[$fieldname] );\r\n\t\t}\r\n\t\treturn $retval;\r\n\t} );\r\n\treturn $data;\r\n}", "public function asort()\n {\n }", "function aasort(&$array, $key){ // Seu array e o campo a ser ordenado\r\n\t$sorter = array();\r\n\t$ret = array();\r\n\treset($array);\r\n\tforeach($array as $ii => $va){\r\n\t\t$sorter[$ii] = $va[$key];\r\n\t}\r\n\tasort($sorter);\r\n\tforeach($sorter as $ii => $va){\r\n\t\t$ret[$ii] = $array[$ii];\r\n\t}\r\n\treturn ($ret);\r\n}", "public function sortMeByMultipleFields(MultiSortParameters ...$param): CollectionInterface;", "function rearrangePro_orderby(){\n\t\t$args = func_get_args();\n\t\t$data = array_shift($args);\n\t\tforeach ($args as $n => $field) {\n\t\t\tif (is_string($field)) {\n\t\t\t\t$tmp = array();\n\t\t\t\tforeach ($data as $key => $row)\n\t\t\t\t\t$tmp[$key] = $row[$field];\n\t\t\t\t$args[$n] = $tmp;\n\t\t\t}\n\t\t}\n\t\t$args[] = &$data;\n\t\tcall_user_func_array('array_multisort', $args);\n\t\treturn array_pop($args);\n\t}", "public function sortStrategy();", "function array_sort($array, Closure $callback)\n\t{\n\t\treturn Illuminate\\Support\\Collection::make($array)->sortBy($callback)->all();\n\t}", "function awesomeSort($a, $b)\n{\n return $a['amount'] <=> $b['amount'];\n}", "function customcert_perform_asort(&$fields) {\n if (class_exists('core_collator')) {\n core_collator::asort($fields);\n } else {\n collatorlib::asort($fields);\n }\n}", "public function SortMeetingObjects(\n $in_sort_fields_array = null,\n // An array of strings. The array will deliniate the sort order, by field name.\n // Array element [0] will be the highest priority, and it will descend from there.\n $in_desc = null ///< If this is set to true, the sort will be highest to lowest. Default is false.\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n // Only the root can do this.\n if (null == $this->_my_root) {\n if (null != $this->_search_results) {\n if (null != $in_sort_fields_array) {\n $this->sort_array = $in_sort_fields_array;\n } else {\n $in_sort_fields_array = $this->sort_array;\n }\n \n if (null != $in_desc) {\n $this->sort_desc = $in_desc;\n } else {\n $in_desc = $this->sort_desc;\n }\n \n if (is_array($in_sort_fields_array) && count($in_sort_fields_array)) {\n // This is simply a \"pass-through\" to the object we have on hand.\n $this->_search_results->SortMeetingObjects($in_sort_fields_array, $in_desc, $this->_sort_search_by_distance);\n }\n }\n }\n }", "public static function natsortField ($array, $fieldname)\r\n\t{\r\n\t\t# Create a function which creates an array of the two values, then compares the original array with a natsorted copy\r\n\t\t$functionCode = '\r\n\t\t\t$original = array ($a[\\'' . $fieldname . '\\'], $b[\\'' . $fieldname . '\\']);\r\n\t\t\t$copy = $original;\r\n\t\t\tnatsort ($copy);\r\n\t\t\treturn ($copy === $original ? -1 : 1);\r\n\t\t';\r\n\t\t\r\n\t\t# Do the comparison\r\n\t\t$natsortFieldFunction = create_function ('$a,$b', $functionCode);\r\n\t\tuasort ($array, $natsortFieldFunction);\r\n\t\t\r\n\t\t# Return the sorted list\r\n\t\treturn $array;\r\n\t}", "function facebook_instant_articles_sort_fields(array $a, $subkey) {\n foreach ($a as $k => $v) {\n if (isset($v[$subkey])) {\n $b[$k] = $v[$subkey];\n }\n }\n asort($b);\n foreach ($b as $key => $val) {\n $c[$key] = $a[$key];\n }\n return $c;\n}", "public function sort(array $paths);", "public function sortBy(string $key);", "private function sortArray($array, $sort_by) {\r\n\t\tforeach ($array as $pos => $val) {\r\n\t\t\t$tmp_array[$pos] = $val[$sort_by];\r\n\t\t}\r\n\t\tasort($tmp_array);\r\n\r\n\t\t$return_array = [];\r\n\t\tforeach ($tmp_array as $pos => $val) {\r\n\t\t\t$return_array[$pos]['title'] = $array[$pos]['title'];\r\n\t\t\t$return_array[$pos]['label'] = $array[$pos]['label'];\r\n\t\t\t$return_array[$pos]['sort'] = $array[$pos]['sort'];\r\n\t\t\t$return_array[$pos]['function'] = $array[$pos]['function'];\r\n\t\t}\r\n\t\treturn $return_array;\r\n\t}", "function sortNumFound($a, $b)\n{\n return $b->numfound - $a->numfound;\n}", "function md_multisort($arr, $col, $method = SORT_ASC)\n{\n\tif(!is_array($arr) || empty($arr)) return false;\n\tif($col === null) return $arr;\n\telseif($col == 'name') $tmp = array_keys($arr);\n\telse foreach($arr as $key => $row) $tmp[$key] = @$row[$col];\n\tarray_multisort($tmp, $method, $arr);\n\treturn $arr;\n}", "public function sortResults(array $results, $order = 'ASC');", "public function sortArray($input, $sortBy): static;", "function Ascending(Array $array, $field) {\n if (is_numeric($array[0][$field])) {\n usort($array, array(new MultiArraySorting($field), 'numberSort'));\n } else {\n usort($array, array(new MultiArraySorting($field), 'textSort'));\n }\n return $array;\n }", "function sortByItem($channel) \n{\n foreach ($channel['item'] as $item) {\n\n // Make an array of an object\n $arrayOfItems = (array) $item;\n\n // Push title properties into new array.\n $arr[] = $arrayOfItems['title'];\n\n // Make comparison, sort if true\n usort($arr, 'compare');\n }\n\n $json = json_encode($arr, JSON_PRETTY_PRINT);\n return $json;\n}", "function sort_by_sub_element($array,$element){\n\tforeach($array as $id => $sub_array){\n\t\tif(is_object($sub_array)) $sub_array = get_object_vars($sub_array);\n\t\t$sorting_array[$id]=$sub_array[$element];\n\t}\n\tasort($sorting_array);\n\t$sorting_array = array_reverse($sorting_array, true);\n\t\n\tforeach ($sorting_array as $id=>$next_post){\n\t\t$sorted_posts[] = $array[$id];\n\t}\n\t\n\t$sorted_posts = array_reverse($sorted_posts);\n\treturn $sorted_posts;\n\t\n}", "function krsort(array &$array, $sort_flags = null)\n {\n }", "public function doCustomSort($objects, $searchRecord)\n {\n if ($objects->count() < 2) {\n //do nothing\n } else {\n $objects = $this->makeClassGroups($objects);\n }\n\n return $objects;\n }", "private function sortFiles(&$array){\n if(isset($array['files'])) sort($array['files']);\n if(isset($array['images'])) sort($array['images']);\n }", "public function sort(array $nodes);", "public function andThenAscendingBy(string $field): ExtensibleSorting;", "function sortLowToHigh($a, $b)\n{\n return $a->price < $b->price ? -1 : 1; //Compare the prices, evalutes to true\n // return $a->price > $b->price ? 1 : -1; // Gives the same result\n}", "public static function sort_all($a, $b){\n if($a->type == \"book\" && $b->type == \"book\"){\n if (!empty($a->series)){\n if (!empty($b->series)){\n return (strtolower($a->series) == strtolower($b->series)) ? ($a->volume > $b->volume) : strtolower($a->series) > strtolower($b->series);\n }else{\n return (strtolower($a->series) == strtolower($b->title)) ? ($a->volume > $b->volume) : strtolower($a->series) > strtolower($b->title);\n }\n }else{\n if (!empty($b->series)){\n return (strtolower($a->title) == strtolower($b->series)) ? ($a->volume > $b->volume) : strtolower($a->title) > strtolower($b->series);\n }else{\n return (strtolower($a->title) == strtolower($b->title)) ? ($a->volume > $b->volume) : strtolower($a->title) > strtolower($b->title);\n }\n }\n }else if ($a->type == \"movie\" && $b->type == \"movie\"){\n return (strtolower($a->title) == strtolower($b->title)) ? ($a->season > $b->season) : strtolower($a->title) > strtolower($b->title);\n }else{\n return strtolower($a->title) > strtolower($b->title);\n }\n }", "function arsort(array &$array, $sort_flags = null)\n {\n }", "public static function sort($array, $callback = null)\n {\n return Collection::make($array)->sort($callback)->all();\n }", "function sort($array,$by,$type='asc') {\n\t\t$sortField=&$by;\n\t\t$multArray=&$array;\n\t\t\n\t\t$tmpKey='';\n\t\t$ResArray=array();\n\t\t$maIndex=array_keys($multArray);\n\t\t$maSize=count($multArray)-1;\n\t\tfor($i=0; $i < $maSize ; $i++) {\n\t\t\t$minElement=$i;\n\t\t\t$tempMin=$multArray[$maIndex[$i]][$sortField];\n\t\t\t$tmpKey=$maIndex[$i];\n\t\t\tfor ($j=$i+1; $j <= $maSize; $j++) {\n\t\t\t\tif ($multArray[$maIndex[$j]][$sortField] < $tempMin ) {\n\t\t\t\t\t$minElement=$j;\n\t\t\t\t\t$tmpKey=$maIndex[$j];\n\t\t\t\t\t$tempMin=$multArray[$maIndex[$j]][$sortField];\n\t\t \t}\n\t\t\t}\n\t\t\t$maIndex[$minElement]=$maIndex[$i];\n\t\t\t$maIndex[$i]=$tmpKey;\n\t\t}\n\t\tif ($type=='asc') {\n\t\t\tfor ($j=0;$j<=$maSize;$j++) {\n\t\t\t\t$ResArray[$maIndex[$j]]=$multArray[$maIndex[$j]];\n\t\t\t}\n\t\t} else {\n\t\t\tfor ($j=$maSize;$j>=0;$j--) {\n\t\t\t\t$ResArray[$maIndex[$j]]=$multArray[$maIndex[$j]];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ResArray;\n\t}", "private static function sort()\n\t{\n\t\t//Setup order of importantance\n\t\t$changefreqs = array(\n\t\t\t'hourly' => 5,\n\t\t\t'daily' => 4,\n\t\t\t'weekly' => 3,\n\t\t\t'monthly' => 2,\n\t\t\t'yearly' => 1,\n\t\t\t'never' => 0\n\t\t);\n\n\t\t//Setup invidual arrays to sort by\n\t\tforeach(static::$links as $index => $link)\n\t\t{\n\t\t\t$priority[$index] = $link->priority ? $link->priority : 0;\n\t\t\t$changefreq[$index] = $link->changefreq ? $changefreqs[$link->changefreq] : 0;\n\t\t\t$loc[$index] = $link->loc;\n\t\t}\n\n\t\tarray_multisort($priority, SORT_DESC, $changefreq, SORT_DESC, $loc, SORT_ASC, static::$links);\n\t}", "function cmp_by_name($val1, $val2){\n return strcmp($val1->name, $val2->name);\n}", "function sort_by_weight( $a, $b ) {\n if( $a->weight == $b->weight ){ return 0 ; }\n return ($a->weight < $b->weight) ? -1 : 1;\n}", "static function sort(array $array, $method = SORT_REGULAR) {\n if (is_int($method)) {\n asort($array, $method);\n } else {\n uasort($array, $method);\n }\n\n return $array;\n }", "public function getSorting();", "function _wp_object_name_sort_cb($a, $b)\n {\n }", "public static function sortInnerValues(&$arr, $sortFn = 'sort') {\n foreach ($arr as $key => $item) {\n $sortFn($arr[$key]);\n }\n }", "function sort_record_by_year( $value, $post_id, $field ) {\n // vars\n $order = array();\n \n // bail early if no value\n if( empty($value) ) {\n return $value; \n }\n \n // populate order\n foreach( $value as $i => $row ) {\n \n $order[ $i ] = $row['field_5cf50f064b39c'];\n \n }\n \n // multisort\n array_multisort( $order, SORT_DESC, $value );\n \n // return \n return $value;\n \n}", "public static function sort($array, callable $callback)\n {\n return Collection::make($array)->sortBy($callback)->all();\n }", "function comparator($object1, $object2) {\n\t\t\treturn $object1->amount < $object2->amount; \n\t\t}", "public static function sort(array &$arr)\n {\n uasort($arr, '\\undpaul\\MarioKartBundle\\Entity\\RankingRow::sortCallback');\n }", "protected function sort()\n {\n // if no comparator is passed sort the internal array\n // by its keys, else use the comparator\n if ($this->comparator == null) {\n return ksort($this->items);\n } else {\n return CollectionUtils::sort($this, $this->comparator);\n }\n }", "function sort_array_by_other_array($arr, $keys_arr, $num_field) {\n\t$new_arr = array();\n\t$left_arr = $arr;\n\t\n\tforeach($keys_arr as $key=>$value) {\n\t\tforeach($arr as $key2=>$value2) {\n\t\t\tif($value2[$num_field] == $value) {\n\t\t\t\t$new_arr[] = $value2;\n\t\t\t\tunset($left_arr[$key2]);\n\t\t\t}\t\n\t\t}\n\t}\t\n\t$new_arr = array_merge($new_arr, $left_arr);\n\treturn $new_arr;\n}", "public function getSortBy();", "public function setSorting($arrSorting);", "function usort(/*. array[int] .*/ $a, /*. mixed .*/ $cmp_func)\n{}", "function orderBy ()\n {\n $this->A = call_user_func_array ('array_orderBy', array_merge ([$this->A], func_get_args ()));\n return $this;\n }", "function sort(/*. array[int] .*/ $a, $sort_flags = SORT_REGULAR){}", "protected function applySorting()\n\t{\n\t\t$i = 1;\n\t\tparse_str($this->order, $list);\n\t\tforeach ($list as $field => $dir) {\n\t\t\t$this->dataSource->sort($field, $dir === 'a' ? IDataSource::ASCENDING : IDataSource::DESCENDING);\n\t\t\t$list[$field] = array($dir, $i++);\n\t\t}\n\t\treturn $list;\n\t}", "public static function sortByProperty(array &$items, string $property, string $order = \"asc\") {\n if (!is_array($items)) {\n return false;\n }\n\n if (class_exists(\"Collator\")) {\n $collator = new Collator('en_US');\n } else {\n $collator = false;\n }\n\n return usort($items, function($a, $b) use ($property, $order, $collator) {\n if ($collator) {\n $cmp = $collator->compare($a[$property], $b[$property]);\n } else {\n $cmp = strcmp(static::seourelize($a[$property]), static::seourelize($b[$property]));\n }\n return $order === 'asc' ? $cmp : -$cmp;\n });\n }", "abstract public function prepareSort();", "public function sortArraysByKeyCheckIfSortingIsCorrectDataProvider() {}", "function cmp($a, $b)\n {\n if ($a->points == $b->points) {\n return 0;\n }\n return ($a->points > $b->points) ? -1 : 1;\n }", "public function andThenDescendingBy(string $field): ExtensibleSorting;", "protected function _order($unsortedArray, $sortField, $sortWay = 'SORT_ASC')\n {\n $sortedArray = array();\n foreach ($unsortedArray as $uniqid => $row) {\n foreach ($this->getAttributes() as $attr) {\n if (isset($row[$attr])) {\n $sortedArray[$attr][$uniqid] = $unsortedArray[$uniqid][$attr];\n } else {\n $sortedArray[$attr][$uniqid] = null;\n }\n }\n }\n if ($sortWay) {\n array_multisort($sortedArray[$sortField], constant($sortWay), $unsortedArray);\n }\n return $unsortedArray;\n }", "public static function sortByField($array, $sort)\n {\n $old_index = null;\n $total = sizeof($array);\n\n $noIndex = true;\n\n foreach($array as $value) {\n if(isset($value[$sort['field']])) {\n $noIndex = false;\n break;\n }\n }\n\n if($noIndex) {\n throw new \\Exception('sort-field can only be set to a field that exists in the locations return of the JSON');\n }\n\n // TODO: implement this as a foreach instead of a for loop.\n for($index = 0; $index < $total; $index++) {\n $value = $array[$index];\n\n if(!isset($array[$index - 1])) {\n continue;\n }\n\n switch($sort['direction']) {\n case 'asc':\n if($array[$index - 1][$sort['field']] > $array[$index][$sort['field']]) {\n $temp = $array[$index - 1];\n $array[$index - 1] = $array[$index];\n $array[$index] = $temp;\n\n $index = -1;\n }\n break;\n case 'desc':\n if($array[$index - 1][$sort['field']] < $array[$index][$sort['field']]) {\n $temp = $array[$index - 1];\n $array[$index - 1] = $array[$index];\n $array[$index] = $temp;\n\n $index = -1;\n }\n break;\n }\n }\n\n return $array;\n }", "public final function manualSort(){\r\n\t\t$itemid=$this->itemid;\r\n\t\t$position=$this->sortarray;\r\n\t\t$newarray=array();\r\n\t\t$max=-1;\r\n\t\tforeach($this->sorteddata as $pmid){\r\n\t\t\t$i=$itemid[$pmid];\r\n\t\t\tif (!isset($position[$i])) continue;\r\n\t\t\t$newarray[$position[$i]]=$pmid;\r\n\t\t\tif ($max<$position[$i]) $max=$position[$i];\r\n\t\t}\r\n\t\tforeach($this->sorteddata as $pmid){\r\n\t\t\t$i=$itemid[$pmid];\r\n\t\t\tif (!isset($position[$i])) $newarray[++$max]=$pmid;\r\n\t\t}\r\n\t\t$this->sorteddata=$newarray;\r\n\t}", "public function &getOrderBy();", "function cmp($a, $b) {\n return strcmp($a['generation_id'], $b['generation_id']);\n\t}", "public function sort(array $array)\n {\n sort($array);\n $count = 0;\n foreach ($array as $key => $valor)\n {\n $arrayOrderecha[$key] = $valor;\n $count ++;\n }\n //retorno del resultado a la vista\n return $arrayOrderecha;\n }", "public function sortByArray(array $sorting) {\n\t\ttx_pttools_assert::isValidUidArray($sorting, false, array('message' => 'Given sorting array is invalid'));\n\t\t$uids = $this->extractProperty('uid');\n\t\ttx_pttools_assert::isValidUidArray($uids, false, array('message' => 'Retrieved uids are invalid'));\n\t\t\n\t\t$sortingUids = $sorting;\n\t\t\n\t\tsort($sortingUids);\n\t\tsort($uids);\n\t\t\n\t\ttx_pttools_assert::isEqual($sortingUids, $uids, array('message' => 'Sorting array did not contain the same elements as the collection.'));\n\t\t\n\t\tforeach ($sorting as $key => $uid) {\n\t\t\t$this->getItemByProperty('uid', $uid)->set_sorting(pow(2, $key));\n\t\t}\n\t}", "static protected function _prepareSort(array $ticket)\n {\n $by = self::sortBy();\n $ticket['sort_by'] = array();\n if (is_array($by)) {\n foreach ($by as $field) {\n if (!isset($ticket[$field])) {\n $ticket['sort_by'][$field] = '';\n } else {\n $ticket['sort_by'][$field] = Horde_String::lower($ticket[$field], true, 'UTF-8');\n }\n }\n } else {\n if (!isset($ticket[$by])) {\n $ticket['sort_by'][$by] = '';\n } elseif (is_array($ticket[$by])) {\n natcasesort($ticket[$by]);\n $ticket['sort_by'][$by] = implode('', $ticket[$by]);\n } else {\n $ticket['sort_by'][$by] = Horde_String::lower($ticket[$by], true, 'UTF-8');\n }\n }\n return $ticket;\n }", "function sort_array_by_array($array, $keyname_array)\n\t{\n\t$result = array();\n\tforeach($keyname_array as $key)\n\t\t{\n\t\t$result[$key] = $array[$key];\n\t\t}\n\treturn $result;\n\t}", "public function testSortBy() {\n\t\t$array = array(2, 5, 3, 1, 4);\n\t\t$result = _::sortBy($array);\n\t\t$this->assertEquals(1, $result[0]);\n\t\t$this->assertEquals(2, $result[1]);\n\t\t$this->assertEquals(3, $result[2]);\n\t\t$this->assertEquals(4, $result[3]);\n\t\t$this->assertEquals(5, $result[4]);\n\n\t\t// test sorting an array with an iterator\n\t\t$result = _::sortBy($array, function($left, $right) {\n\t\t\treturn (($left == $right) ? 0 : (($left > $right) ? -1 : 1));\n\t\t});\n\t\t$this->assertEquals(5, $result[0]);\n\t\t$this->assertEquals(4, $result[1]);\n\t\t$this->assertEquals(3, $result[2]);\n\t\t$this->assertEquals(2, $result[3]);\n\t\t$this->assertEquals(1, $result[4]);\n\n\t\t// test sorting an object without a value function\n\t\t$arrayObj = new ArrayObject($array);\n\t\ttry {\n\t\t\t$result = _::sortBy($arrayObj);\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertInstanceOf('InvalidArgumentException', $e);\n\t\t}\n\n\t\t// test sorting an object with a value function\n\t\t$result = _::sortBy($arrayObj, function($value) {\n\t\t\treturn (5 - $value);\n\t\t});\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(5, $result);\n\t\t$this->assertEquals(5, $result[0]);\n\t\t$this->assertEquals(4, $result[1]);\n\t\t$this->assertEquals(3, $result[2]);\n\t\t$this->assertEquals(2, $result[3]);\n\t\t$this->assertEquals(1, $result[4]);\n\t}", "public function sortItems($items, $sort_by)\n {\n \n switch($sort_by)\n {\n case 'popular':\n $items = $items->sortBy(function($item){\n return $item->orders->count();\n }, null, true);\n break;\n\n case 'price-high-low':\n $items = $items->sortBy(function($item){\n return $item->itemable->discount_price;\n }, null, true);\n break;\n\n case 'recommended' :\n $items = $items->sortBy(function($item){\n return $item->is_recommended;\n }, null, true);\n break;\n\n case 'price-low-high':\n $items = $items->sortBy(function($item){\n return $item->itemable->discount_price;\n }, null, false);\n break;\n\n default:\n $items = $items->sortBy(function($item){\n return $item->itemable->weight;\n }, null, true);\n break;\n }\n\n return $items;\n }", "function sort_array($array, $key)\n {\n foreach ($array as $temp_list) {\n $sort_aux[] = ($temp_list[$key]);\n }\n array_multisort($sort_aux, SORT_ASC, $array);\n\n return $array;\n }", "function sortJSONByWeight(&$_data){\n\n\tforeach ($_data as $key => $value){\n\n\t\tif(is_object($value)){\n\n\t\t\tsortJSONByWeight($_data[$key]);\n\n\t\t}elseif(is_array($value)){\n\n\t\t\tsortJSONByWeight($_data[$key]);\n\t\t\tarray_multisort($_data[$key]);\n\n\t\t}else{\n\n\t\t\t//Do Nothing\n\n\t\t}\n\n\t}\n}", "private function multidimensionalObjsArraySort($key, $order) {\n\n if (strtoupper($order) == 'ASC') {\n\n return function ($a, $b) use ($key) {\n return strnatcmp($a->$key, $b->$key);\n };\n } else {\n\n return function ($b, $a) use ($key) {\n return strnatcmp($a->$key, $b->$key);\n };\n }\n }", "function fn_sort_md_array_by_value(&$array, $key)\n{\n\t//ref. http://stackoverflow.com/questions/2699086/sort-multi-dimensional-array-by-value\n $sorter=array();\n $ret=array();\n reset($array);\n foreach ($array as $ii => $va) {\n $sorter[$ii]=$va[$key];\n }\n asort($sorter);\n foreach ($sorter as $ii => $va) {\n $ret[$ii]=$array[$ii];\n }\n $array=$ret;\n}", "function sortBy(callable $function, iterable $items) : array\n{\n return Fpl\\sort(Fpl\\useWith([$function, $function], Fpl\\spaceship), $items);\n}", "function sort ($block,$field,$dir = \"\") {\n\t\t$sort = [];\n\n\t\tforeach ($this->data as $event) {\n\t\t\t$sortval = $event->get($block,$field);\n\n\t\t\tif (is_array ($sortval))\n\t\t\t\t$sortval = $sortval[0];\n\n\t\t\t$sort[$sortval] = $event;\n\t\t}\n\n\t\t# choose sort direction\n\t\tif (strtoupper($dir) == \"DESC\")\n\t\t\tkrsort ($sort);\n\t\telse\n\t\t\tksort($sort);\n\n\t\t$this->data = $sort;\n\t}", "protected function sort(array $data)\n {\n usort($data, function (array $a, array $b) {\n return $this->getSortOrder($a) <=> $this->getSortOrder($b);\n });\n\n return $data;\n }", "function _usort_by_first_member($a, $b)\n {\n }" ]
[ "0.7317352", "0.72741103", "0.7058861", "0.6701996", "0.66820407", "0.6495673", "0.63685226", "0.630918", "0.6290204", "0.626741", "0.620392", "0.6154181", "0.6003923", "0.6003923", "0.5989498", "0.5912365", "0.5905978", "0.58621144", "0.58428043", "0.5841331", "0.5819053", "0.5800361", "0.57500184", "0.57470286", "0.5746853", "0.5703202", "0.5695417", "0.56931627", "0.5677935", "0.56740373", "0.566942", "0.56096464", "0.5589147", "0.5584587", "0.55762905", "0.55694795", "0.556026", "0.5551215", "0.5549068", "0.55422425", "0.55241394", "0.54827887", "0.5482652", "0.5478055", "0.54739445", "0.5465345", "0.545477", "0.544317", "0.5430616", "0.54250556", "0.5403801", "0.5387437", "0.5380546", "0.536752", "0.53647393", "0.53493476", "0.53431714", "0.5340843", "0.53377056", "0.53344625", "0.53338826", "0.53330034", "0.5331545", "0.5328162", "0.53138167", "0.5304146", "0.5295228", "0.5291777", "0.5290984", "0.52888316", "0.52885723", "0.5280613", "0.52757806", "0.5274713", "0.52685255", "0.5267891", "0.52671385", "0.52666074", "0.5265253", "0.52449167", "0.5240496", "0.5239032", "0.5234505", "0.5228273", "0.5227427", "0.5209598", "0.5193799", "0.5191872", "0.5174826", "0.5172811", "0.51664984", "0.5164693", "0.5157834", "0.5156502", "0.5153926", "0.515004", "0.51471335", "0.5146887", "0.51408577", "0.5140025" ]
0.62068564
10
Get a country localisation
public function getCountryLocalisation($countryIso) { $aRows = $this->database()->select('c.country_iso, c.name, fc.*') ->from(Phpfox::getT('gmap_countries'), 'fc') ->join(Phpfox::getT('country'), 'c', 'fc.country_iso = c.country_iso') ->where('c.country_iso = \'' . $countryIso . '\'') ->execute('getSlaveRow'); return $aRows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountry();", "public function getCountry();", "public function getCountry() {}", "public function getCountry() {}", "public function getCountryName();", "public function getCountry(): string\n {\n return $this->result->country_name;\n }", "public function getCountry()\n {\n $arr_countries = array(\n 'F' =>\t_('Austria'),\n 'T' =>\t_('Belgium'),\n 'D' =>\t_('Finland'),\n 'E' =>\t_('France'),\n 'L' =>\t_('France'),\n 'P' =>\t_('Germany'),\n 'R' =>\t_('Germany'),\n 'N' =>\t_('Greece'),\n 'K' =>\t_('Ireland'),\n 'J' =>\t_('Italy'),\n 'G' =>\t_('Netherlands'),\n 'H' =>\t_('United Kingdom'),\n 'U' =>\t_('Portugal'),\n 'M' =>\t_('Spain'),\n );\n\n return $arr_countries[$this->str_value[0]];\n }", "public function getCountry()\n {\n return parent::getValue('country');\n }", "public function getCountry()\n {\n return $this->getValueObject('country');\n }", "function getCountry() {\r\r\n\t\treturn $this->country;\r\r\n\t}", "function GetCountry()\n\t{\n\t\t$country = new Country();\n\t\treturn $country->Get($this->countryId);\n\t}", "public static function getCountry(){\n $country = '';\n $ip = self::getClientIP();\n if ($ip != '') {\n $data = file_get_contents('http://freegeoip.net/json/' . $ip);\n $response = json_decode($data);\n $country = $response->country_code;\n }\n \n return $country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->getParameter('country');\n }", "public function country()\r\n\t{\r\n\t\t$country = \\Shop\\Models\\Countries::fromCode( $this->country_isocode_2 );\r\n\r\n\t\treturn $country;\r\n\t}", "public function country(): string\n {\n return $this->country;\n }", "public function getCountry() \n {\n return $this->country;\n }", "public function getCountry() : string\n {\n return $this->country;\n }", "public function getCountryCode();", "public function getCountry() :string\n {\n return $this->country;\n }", "public function getCountry() {\n\t\treturn self::$_country;\n\t}", "public function getCountriesInfo();", "public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}", "public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}", "public function requestCountry();", "public function getCountryCode(): string;", "function jr_get_server_country() {\r\n\r\n\t// Get user country\r\n\tif(isset($_SERVER['HTTP_X_FORWARD_FOR'])) $ip = $_SERVER['HTTP_X_FORWARD_FOR']; else $ip = $_SERVER['REMOTE_ADDR'];\r\n\r\n\t$ip = strip_tags($ip);\r\n\t$country = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\r\n\r\n\t$result = wp_remote_get('http://api.hostip.info/country.php?ip='.$ip);\r\n\tif (!is_wp_error($result) && strtolower($result['body']) != 'xx') $country = $result['body'];\r\n\r\n\treturn strtolower($country);\r\n}", "public function getCountry()\n {\n if (!array_key_exists('country', $this->userInfo)) {\n $this->getLocation();\n }\n\n return $this->getInfoVar('country');\n }", "public function countryCode();", "public function getCountry()\n {\n return $this->getParameter('billingCountry');\n }", "public function getRegistrationCountry(): ?string;", "public function getCountry(): ?string\n {\n return $this->country;\n }", "public function getCountry(): ?string\n {\n return $this->country;\n }", "public function getCountry(): ?string\n {\n return $this->country;\n }", "function tep_get_countries_with_iso_codes($countries_id) {\n\treturn tep_get_countries($countries_id, true);\n}", "public function getNativeCountry()\n {\n return Wrapper\\World::country($this->getNativeLeagueId());\n }", "public function getSessionCountry()\n {\n return Mage::getSingleton('core/session')->getData($this->_sessionRequestCountryKey);\n }", "abstract public function country();", "public function getSubscriberCountry()\n {\n $country = parent::getSubscriberCountry(); \n return $country;\n }", "protected function LiveCountry()\n {\n return EcommerceCountry::get_country();\n }", "public function getCountry() : string {\n\t\t\treturn substr($this->value, 4, 2);\n\t\t}", "public function country(): ?string\n {\n return $this->country;\n }", "function tep_get_country_name($country_id) {\n\t$country_array = tep_get_countries($country_id);\n\treturn $country_array['countries_name'];\n}", "function getCountry($country = 'Serbia')\n{\n return $country;\n}", "public function getCountry(): ?string\n {\n return $this->_country;\n }", "abstract public function countryISOCode();", "public static function visitor_country()\n {\n $code = null;\n if (Director::isDev()) {\n if (isset($_GET['countryfortestingonly'])) {\n $code = $_GET['countryfortestingonly'];\n Controller::curr()->getRequest()->getSession()->set('countryfortestingonly', $code);\n }\n if ($code = Controller::curr()->getRequest()->getSession()->get('countryfortestingonly')) {\n Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);\n }\n }\n if (! $code) {\n if (isset($_SERVER['HTTP_CF_IPCOUNTRY']) && $_SERVER['HTTP_CF_IPCOUNTRY']) {\n return $_SERVER['HTTP_CF_IPCOUNTRY'];\n }\n $code = Controller::curr()->getRequest()->getSession()->get('MyCloudFlareCountry');\n if (! $code) {\n $address = self::get_remote_address();\n if (strlen($address) > 3) {\n $code = CloudFlareGeoIP::ip2country($address, true);\n }\n if (! $code) {\n $code = self::get_default_country_code();\n }\n if ('' === $code) {\n $code = Config::inst()->get('CloudFlareGeoip', 'default_country_code');\n }\n Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);\n }\n }\n\n return $code;\n }", "public function getCountry()\n {\n return isset($this->address_data['country']) ? $this->address_data['country'] : null;\n }", "function getCountryRegion($country) {\n\treturn getDetailedTableInfo2(\"vl_countries\",\"lower(country)=lower('$country')\",\"region\");\n}", "public function getCountries();", "public function sGetCountryTranslation($country = '')\n {\n $languageId = $this->contextService->getShopContext()->getShop()->getId();\n $fallbackId = $this->contextService->getShopContext()->getShop()->getFallbackId();\n\n $translationData = $this->translationComponent\n ->readBatchWithFallback($languageId, $fallbackId, 'config_countries');\n\n if (!$country) {\n return $translationData;\n }\n\n if (!isset($translationData[$country['id']])) {\n return $country;\n }\n\n // Pass (possible) translation to country\n if ($translationData[$country['id']]['countryname']) {\n $country['countryname'] = $translationData[$country['id']]['countryname'];\n }\n if ($translationData[$country['id']]['notice']) {\n $country['notice'] = $translationData[$country['id']]['notice'];\n }\n\n if ($translationData[$country['id']]['active']) {\n $country['active'] = $translationData[$country['id']]['active'];\n }\n\n return $country;\n }", "function getCountry()\n {\n global $warn;\n\n if ($this->country)\n return $this->country;\n else\n if (array_key_exists('cc', $this->extras))\n {\n $cc = $this->extras['cc'];\n $country = new Country(array('cc' => $cc));\n if ($country->isExisting())\n {\n $this->country = $country; // save\n return $this->country;\n }\n else\n {\n unset($this->extras['cc']);\n }\n }\n return null;\n }", "public function getUserCountry()\n {\n $fileName = $this->getDatabaseFile();\n\n $reader = new MaxMindReader($fileName);\n\n $ipAddress = $this->getUserIp();\n //$ipAddress = \"82.65.140.34\";\n\n $country = $reader->get($ipAddress);\n $reader->close();\n\n return $country ? $country['country']['iso_code'] : null;\n }", "public function getCountryList()\n {\n $countryList=array(\n 'BG'=>__('Bulgaria')\n 'DE'=>__('Germany'),\n 'GB'=>__('Great Britain'),\n );\n\n return $countryList;\n }", "protected function getCountry()\n {\n return strtoupper($this->checkoutSession->getLastRealOrder()->getBillingAddress()->getCountryId());\n }", "function getLocationInfoByIp($ip){\r\n\r\n $ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\r\n if($ip_data && $ip_data->geoplugin_countryName != null){\r\n $result['country'] = $ip_data->geoplugin_countryCode;\r\n $result['city'] = $ip_data->geoplugin_city;\r\n }\r\n $country_short=$result['country'];\r\n $country_name=Locale::getDisplayRegion('sl-Latn-'.$country_short.'-nedis', 'en');\r\n return $country_name;\r\n}", "public function getFromLanguage(): string;", "public function getCountryName()\n {\n return $this->getCountry()->getName();\n }", "public function getCountry(): CountryInterface;", "protected function LiveDefaultCountry()\n {\n return self::get_default_country_code_combined();\n }", "function get_user_language($country)\r\n\t{\r\n\t\t$query = $this->db->select('*')\r\n\t\t ->from(\"language_redirection\")\r\n\t\t ->where(array('country' => $country))\r\n\t\t ->get();\r\n\t\t \r\n\t\treturn $query->row();\r\n\t}", "public function getCountryName() {\n //check if we have a country code\n if ($this->country) {\n //return the country name\n return Locale::getDisplayRegion('en_' . $this->country);\n }\n return NULL;\n }", "public static function country()\n\t{\n\t\treturn static::onTrustedRequest(function () {\n\t\t\treturn request()->header('CF_IPCOUNTRY');\n\t\t}) ?: '';\n\t}", "function getLocalisation() {\r\n\t\treturn $this->_localisation;\r\n\t}", "public function getCountryNameDirectly()\r\n {\r\n\r\n $url_to_exch_code = \"https://freegeoip.net/json/\";\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url_to_exch_code);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $json = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n $details = json_decode($json, true);\r\n\r\n if(!empty($details['country_name'])) {\r\n\r\n return $details['country_name'];\r\n\r\n } else {\r\n\r\n $url_to_exch_code = \"https://geoip.nekudo.com/api/json\";\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url_to_exch_code);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $json = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n $details = json_decode($json, true);\r\n\r\n if(!empty($details['country']['name'])) {\r\n\r\n return $details['country']['name'];\r\n\r\n } else {\r\n\r\n return false;\r\n\r\n }\r\n }\r\n\r\n }", "public function getLanguage() {}", "public function getLocale();", "public function getLocale();", "public function getCurrentSiteCountry()\n {\n // Used when site data is from cache and not the db\n if (empty($this->currentSiteCountry)\n || !is_a($this->currentSiteCountry, '\\Rcm\\Entity\\Country')\n ) {\n $siteInfo = $this->getCurrentSiteInfo();\n\n $country = new Country();\n $country->setCountryName($siteInfo['country']['countryName']);\n $country->setIso2($siteInfo['country']['iso2']);\n $country->setIso3($siteInfo['country']['iso3']);\n\n $this->currentSiteCountry = $country;\n }\n\n return $this->currentSiteCountry;\n\n }", "public function getCountryCode(): string\n {\n return 'SK';\n }", "public static function label() {\n return __('nova-laravel-world::novaLaravelWorld.countryLocale');\n }", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "private function countryIso()\n {\n $cacheKey = 'country_abbrs';\n $ttl = config('priongeography.cache_ttl', 60*24);\n\n return $this->cache->remember($cacheKey, $ttl, function () {\n $countries = scandir(__DIR__.'/config/geography');\n $countries = str_replace(\".php\", \"\", $countries);\n unset($countries[0]);\n unset($countries[1]);\n\n return $countries;\n });\n }", "public function getCountry() {\n\t\ttry {\n\t\t\t$countries = CountryModel::get();\n\t\t\tif(count($countries) > 0 )\n\t\t\t\t$this->arrOutputData = $countries->toArray();\n\t\n\t\t $intCode \t\t= Response::HTTP_OK;\n $strStatus \t\t= Response::$statusTexts[$intCode];\n $strMessage \t\t= \"OK\";\n return sendResponse($intCode, $strStatus, $strMessage,$this->arrOutputData);\n\t\t} catch (Exception $e) {\n\t\t\t$intCode \t\t= Response::HTTP_INTERNAL_SERVER_ERROR;\n $strStatus \t\t= Response::$statusTexts[$intCode];\n $strMessage \t\t= trans('admin.defaultexceptionmessage');\n return sendResponse($intCode, $strStatus, $strMessage,$this->arrOutputData);\n\t\t}\n\t\t\n\t}", "protected static function country_code(): mixed\n\t{\n\t\treturn self::$query->country_code;\n\t}", "public function getCountryCode(): ?string;", "public function getReqCountry()\n\t{\n\t\treturn $this->req_country;\n\t}", "public function getCountryInfo($countryId);", "public function getLocale() {}", "function tep_get_country_iso_code_2($country_id) {\n $country_iso_query = tep_db_query(\"select * from \" . TABLE_COUNTRIES . \" where countries_id = '\" . $country_id . \"'\");\n if (!tep_db_num_rows($country_iso_query)) {\n return 0;\n }\n else {\n $country_iso_row = tep_db_fetch_array($country_iso_query);\n return $country_iso_row['countries_iso_code_2'];\n }\n }", "function erp_get_country_name( $country ) {\n\n $load_cuntries_states = \\WeDevs\\ERP\\Countries::instance();\n $countries = $load_cuntries_states->countries;\n\n // Handle full country name\n if ( '-1' != $country ) {\n $full_country = ( isset( $countries[ $country ] ) ) ? $countries[ $country ] : $country;\n } else {\n $full_country = '—';\n }\n\n return $full_country;\n}", "public function get_country_list() \n\t{\n\t\treturn $this->db->select('num_code')\n\t\t->select('country_name')\n\t\t->select('num_code')\n\t\t->from('system_iso3166_l10n')\n\t\t->order_by('country_name', 'ASC')\t\n\t\t->get()->result();\n\t}", "public static function defaultCountry(): string\n {\n $default = Cache::get('country_default');\n\n if ($default === null) {\n $default = static::select('country')->where('is_default', '=', true)->first();\n $default = ! empty($default) ? $default->country : config('contentful.default_country');\n\n // Cache is cleaned in Console\\Commands\\SyncLocales (run at least daily)\n Cache::forever('country_default', $default);\n }\n\n return $default;\n }" ]
[ "0.8331893", "0.8331893", "0.82503766", "0.82503766", "0.7764177", "0.758795", "0.75109965", "0.7490316", "0.74700093", "0.7391631", "0.73791456", "0.736314", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7355115", "0.7342736", "0.73404074", "0.7334683", "0.733447", "0.7293599", "0.72809285", "0.72612995", "0.7214445", "0.7210811", "0.7196611", "0.7196611", "0.7110762", "0.7094831", "0.70541996", "0.7008685", "0.7000191", "0.6972987", "0.6956618", "0.6947716", "0.6947716", "0.6947716", "0.6943914", "0.6934692", "0.6926083", "0.69246536", "0.690865", "0.6899098", "0.6889829", "0.6888629", "0.6886588", "0.6882858", "0.6878077", "0.6869411", "0.68578506", "0.68510383", "0.6832964", "0.6773055", "0.67659295", "0.67616725", "0.676086", "0.6753005", "0.67415524", "0.67267627", "0.669459", "0.6687396", "0.6685195", "0.6681595", "0.6677961", "0.66631293", "0.6663035", "0.6647544", "0.6599432", "0.6595132", "0.6581514", "0.6581514", "0.65774226", "0.6572652", "0.65637654", "0.65553", "0.65553", "0.65553", "0.65553", "0.65553", "0.65553", "0.65502894", "0.65441996", "0.6538571", "0.6533909", "0.6531047", "0.64972717", "0.6497182", "0.64933246", "0.64923644", "0.6477558", "0.6471711" ]
0.0
-1
Get a user full address from the Phpfox user fields
public function getUserAddress($iUserId) { $aRow = $this->database()->select('u.user_id, c.name as country, uf.city_location as city, uf.postal_code, c.country_iso') ->from(Phpfox::getT('user'), 'u') ->join(Phpfox::getT('user_field'), 'uf', 'uf.user_id = u.user_id') ->join(Phpfox::getT('country'), 'c', 'c.country_iso = u.country_iso') ->where('u.user_id = \'' . $iUserId . '\'') ->execute('getSlaveRow'); //Making sure the information isnt private or limited to friends. $aFiltersOut = $this->database()->select('u.user_id') ->from(Phpfox::getT('user'), 'u') ->join(Phpfox::getT('user_privacy'), 'up', 'up.user_id = u.user_id') ->where('up.user_privacy = \'profile.view_location\' AND up.user_value != 1 AND u.user_id = \'' . $iUserId . '\'') ->execute('getSlaveRows'); $found = false; foreach($aFiltersOut as $aFilter) { if($aFilter['user_id'] == $aRow['user_id']) { $found = true; break; } } if(!$found) return $aRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getLoggedInUserFullAddress()\n {\n \t$userId = Auth::getUser()->ID;\n \t$user = self::select('address1','zip','city','state')->where('ID', $userId)->first();\n \t$address = str_ireplace(\" \",\"+\",$user->address1).',+'.$user->zip.',+'.str_ireplace(\" \",\"+\",$user->city).',+'.str_ireplace(\" \",\"+\",$user->state);\n \treturn $address;\n }", "public function getFullAddressAttribute()\n { \n # Get the Name of User\n $name = $this->name ? $this->name.', ' : '';\n\n # Get the address of User\n $address = $this->address ? $this->address.', ' : '';\n\n # Get the city of User\n $city = $this->city ? $this->city.', ' : '';\n\n # Get the zip of User\n $zip = $this->zip ? $this->zip.', ' : '';\n\n return $name.$address.$city.$zip;\n }", "public function getUserAddress() {\n\t\treturn ($this->userStreet);\n\t}", "public function getUserfield();", "public function getAddressByUsername($username){\r\n\t\treturn $this->query(\"SELECT firstname, lastname, street_name, street_number, city_name, city_number, email, tel, mobile FROM user WHERE username = '\" . $username .\"'\");\r\n\t}", "public function getAddress() {}", "public function getAddress();", "public function getAddress();", "public function getUserBio();", "public function get_adresse();", "public function getAddress()\n {\n return $this->get('address')->value;\n }", "public function get_user_billing_address() {\n\t\t// Formatted Addresses\n\t\t$billing = array(\n\t\t\t'first_name' => get_user_meta( $this->userId, 'billing_first_name', true ),\n\t\t\t'last_name' => get_user_meta( $this->userId, 'billing_last_name', true ),\n\t\t\t'company' => get_user_meta( $this->userId, 'billing_company', true ),\n\t\t\t'address_1' => get_user_meta( $this->userId, 'billing_address_1', true ),\n\t\t\t'address_2' => get_user_meta( $this->userId, 'billing_address_2', true ),\n\t\t\t'city' => get_user_meta( $this->userId, 'billing_city', true ),\n\t\t\t'state' => get_user_meta( $this->userId, 'billing_state', true ),\n\t\t\t'postcode' => get_user_meta( $this->userId, 'billing_postcode', true ),\n\t\t\t'country' => get_user_meta( $this->userId, 'billing_country', true ),\n\t\t\t'email' => get_user_meta( $this->userId, 'billing_email', true ),\n\t\t\t'phone' => get_user_meta( $this->userId, 'billing_phone', true )\n\t\t);\n\n\t\tif ( ! empty( $billing['country'] ) ) {\n\t\t\tWC()->customer->set_country( $billing['country'] );\n\t\t}\n\t\tif ( ! empty( $billing['state'] ) ) {\n\t\t\tWC()->customer->set_state( $billing['state'] );\n\t\t}\n\t\tif ( ! empty( $billing['postcode'] ) ) {\n\t\t\tWC()->customer->set_postcode( $billing['postcode'] );\n\t\t}\n\n\t\treturn apply_filters( 'ebanx_customer_billing', array_filter( $billing ) );\n\t}", "static function full_address($row) {\n global $data_dir, $username, $addrsrch_fullname;\n\n // allow multiple addresses in one row (poor person's grouping - bah)\n // (separate with commas)\n //\n $return = '';\n $addresses = explode(',', $row['email']);\n foreach ($addresses as $address) {\n \n if (!empty($return)) $return .= ', ';\n\n if ($addrsrch_fullname == 'fullname')\n $return .= '\"' . $row['name'] . '\" <' . trim($address) . '>';\n else if ($addrsrch_fullname == 'nickname')\n $return .= '\"' . $row['nickname'] . '\" <' . trim($address) . '>';\n else // \"noprefix\"\n $return .= trim($address);\n\n }\n\n return $return;\n }", "public function getUserAddressId()\n {\n return parent::getValue('user_address_id');\n }", "function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matches);\n\t\n\t$this -> user['id'] = $matches[0];\n\t$this -> user['alias'] = $matches[1];\n\t$this -> user['name'] = $matches[2];\n\t$this -> user['post_hash'] = $matches[3];\n\t$this -> user['info_hash'] = $matches[4];\n\n\treturn $this -> user;\n\t}", "public function fullAddress(){\n\n return ' '.$this->house. ' '. $this->address. ', '. $this->postcode;\n }", "function get_profile($field, $user = \\false)\n {\n }", "public function getUserLocation();", "function hc_user_field($user, $field){\n\t\t$args = array(\n\t\t\t\t'single' => true,\n\t\t\t\t'username' => $user,\n\t\t\t\t'fields' => $field\n\t\t\t);\n\t\t$userObject = hc_get_users($args);\n\t\techo $userObject[0]->$field;\n\t}", "function user_fullname($user) {\n\t$nick = (!empty($user->nickname)) ? \" '\".$user->nickname.\"' \" : \"\";\n\techo $user->user_firstname . $nick . $user->user_lastname;\n}", "public static function get_user_lookup_fields_label() {\n\t\t$fields = self::get_user_lookup_fields();\n\n\t\tif ( count( $fields ) === 2 ) {\n\t\t\treturn esc_html__( 'Username or Email Address', 'it-l10n-ithemes-security-pro' );\n\t\t}\n\n\t\tif ( 'email' === $fields[0] ) {\n\t\t\treturn esc_html__( 'Email Address', 'it-l10n-ithemes-security-pro' );\n\t\t}\n\n\t\treturn esc_html__( 'Username', 'it-l10n-ithemes-security-pro' );\n\t}", "public function getUserInfo() {\n\n if (empty($this->uriParts['user'])) {\n return '';\n }\n $val = $this->uriParts['user'];\n\n if (!empty($this->uriParts['pass'])) {\n $val .= ':' . $this->uriParts['pass'];\n }\n return $val;\n }", "function user_info ($value, $key = \"mail\") {\n\t# search for the employee using site wide attribs\n\tif ( ! $result = bluepages_search(\"($key=$value)\") )\n\t\treturn(false);\n# return just the first entry like old user_info() did\nreturn($result[key($result)]);\n}", "function mozilla_get_user_info($me, $user, $logged_in) {\n $object = new stdClass();\n $object->value = $user->user_nicename;\n $object->display = true;\n \n $data = Array(\n 'username' => $object,\n 'id' => $user->ID\n );\n\n $is_me = $logged_in && intval($me->ID) === intval($user->ID);\n $meta = get_user_meta($user->ID);\n $community_fields = isset($meta['community-meta-fields'][0]) ? unserialize($meta['community-meta-fields'][0]) : Array();\n\n // First Name\n $object = new stdClass();\n $object->value = isset($meta['first_name'][0]) ? $meta['first_name'][0] : false;\n $object->display = mozilla_display_field('first_name', isset($meta['first_name_visibility'][0]) ? $meta['first_name_visibility'][0] : false, $is_me, $logged_in);\n \n $data['first_name'] = $object;\n\n // Last Name\n $object = new stdClass();\n $object->value = isset($meta['last_name'][0]) ? $meta['last_name'][0] : false;\n $object->display = mozilla_display_field('last_name', isset($meta['last_name_visibility'][0]) ? $meta['last_name_visibility'][0] : false, $is_me, $logged_in);\n $data['last_name'] = $object;\n\n // Email\n $object = new stdClass();\n $object->value = isset($meta['email'][0]) ? $meta['email'][0] : false;\n $object->display = mozilla_display_field('email', isset($meta['email_visibility'][0]) ? $meta['email_visibility'][0] : false , $is_me, $logged_in);\n $data['email'] = $object;\n\n // Location\n global $countries;\n $object = new stdClass();\n if(isset($community_fields['city']) && strlen($community_fields['city']) > 0 && isset($community_fields['country']) && strlen($community_fields['country']) > 1) {\n $object->value = \"{$community_fields['city']}, {$countries[$community_fields['country']]}\";\n } else {\n if(isset($community_fields['city']) && strlen($community_fields['city']) > 0) {\n $object->value = $community_fields['city'];\n } elseif(isset($community_fields['country']) && strlen($community_fields['country']) > 0) {\n $object->value = $countries[$community_fields['country']];\n } else {\n $object->value = false;\n }\n }\n \n $object->display = mozilla_display_field('location', isset($meta['profile_location_visibility'][0]) ? $meta['profile_location_visibility'][0] : false , $is_me, $logged_in);\n $data['location'] = $object;\n\n // Profile Image\n $object = new stdClass();\n $object->value = isset($community_fields['image_url']) && strlen($community_fields['image_url']) > 0 ? $community_fields['image_url'] : false;\n $object->display = mozilla_display_field('image_url', isset($community_fields['profile_image_url_visibility']) ? $community_fields['profile_image_url_visibility'] : false , $is_me, $logged_in);\n $data['profile_image'] = $object;\n\n // Bio\n $object = new stdClass();\n $object->value = isset($community_fields['bio']) && strlen($community_fields['bio']) > 0 ? $community_fields['bio'] : false;\n $object->display = mozilla_display_field('bio', isset($community_fields['bio_visibility']) ? $community_fields['bio_visibility'] : false , $is_me, $logged_in);\n $data['bio'] = $object;\n\n // Pronoun Visibility \n $object = new stdClass();\n $object->value = isset($community_fields['pronoun']) && strlen($community_fields['pronoun']) > 0 ? $community_fields['pronoun'] : false;\n $object->display = mozilla_display_field('pronoun', isset($community_fields['pronoun_visibility']) ? $community_fields['pronoun_visibility'] : false , $is_me, $logged_in);\n $data['pronoun'] = $object;\n\n // Phone\n $object = new stdClass();\n $object->value = isset($community_fields['phone']) ? $community_fields['phone'] : false;\n $object->display = mozilla_display_field('phone', isset($community_fields['phone_visibility']) ? $community_fields['phone_visibility'] : false , $is_me, $logged_in);\n $data['phone'] = $object;\n\n // Groups Joined\n $object = new stdClass();\n $object->display = mozilla_display_field('groups_joined', isset($community_fields['profile_groups_joined_visibility']) ? $community_fields['profile_groups_joined_visibility'] : false , $is_me, $logged_in);\n $data['groups'] = $object;\n\n // Events Attended\n $object = new stdClass();\n $object->display = mozilla_display_field('events_attended', isset($community_fields['profile_events_attended_visibility']) ? $community_fields['profile_events_attended_visibility'] : false , $is_me, $logged_in);\n $data['events_attended'] = $object;\n\n // Events Organized\n $object = new stdClass();\n $object->display = mozilla_display_field('events_organized', isset($community_fields['profile_events_organized_visibility']) ? $community_fields['profile_events_organized_visibility'] : false , $is_me, $logged_in);\n $data['events_organized'] = $object;\n \n // Campaigns\n $object = new StdClass();\n $object->display = mozilla_display_field('campaigns_participated', isset($community_fields['profile_campaigns_visibility']) ? $community_fields['profile_campaigns_visibility'] : false , $is_me, $logged_in);\n $data['campaigns_participated'] = $object;\n\n // Social Media \n $object = new stdClass();\n $object->value = isset($community_fields['telegram']) && strlen($community_fields['telegram']) > 0 ? $community_fields['telegram'] : false;\n $object->display = mozilla_display_field('telegram', isset($community_fields['profile_telegram_visibility']) ? $community_fields['profile_telegram_visibility'] : false , $is_me, $logged_in);\n $data['telegram'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['facebook']) && strlen($community_fields['facebook']) > 0 ? $community_fields['facebook'] : false;\n $object->display = mozilla_display_field('facebook', isset($community_fields['profile_facebook_visibility']) ? $community_fields['profile_facebook_visibility'] : false , $is_me, $logged_in);\n $data['facebook'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['twitter']) && strlen($community_fields['twitter']) > 0 ? $community_fields['twitter'] : false;\n $object->display = mozilla_display_field('twitter', isset($community_fields['profile_twitter_visibility']) ? $community_fields['profile_twitter_visibility'] : false , $is_me, $logged_in);\n $data['twitter'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['linkedin']) && strlen($community_fields['linkedin']) > 0 ? $community_fields['linkedin'] : false;\n $object->display = mozilla_display_field('linkedin', isset($community_fields['profile_linkedin_visibility']) ? $community_fields['profile_linkedin_visibility'] : false , $is_me, $logged_in);\n $data['linkedin'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['discourse']) && strlen($community_fields['discourse']) > 0 ? $community_fields['discourse'] : false;\n $object->display = mozilla_display_field('discourse', isset($community_fields['profile_discourse_visibility']) ? $community_fields['profile_discourse_visibility'] : false , $is_me, $logged_in);\n $data['discourse'] = $object;\n\n $object = new stdClass();\n $object->value = isset($community_fields['github']) && strlen($community_fields['github']) > 0 ? $community_fields['github'] : false;\n $object->display = mozilla_display_field('github', isset($community_fields['profile_github_visibility']) ? $community_fields['profile_github_visibility'] : false , $is_me, $logged_in);\n\t$data['github'] = $object;\n\t\n\t$object = new stdClass();\n $object->value = isset($community_fields['matrix']) && strlen($community_fields['matrix']) > 0 ? $community_fields['matrix'] : false;\n $object->display = mozilla_display_field('matrix', isset($community_fields['profile_matrix_visibility']) ? $community_fields['profile_matrix_visibility'] : false , $is_me, $logged_in);\n $data['matrix'] = $object;\n\n //Languages\n $object = new stdClass();\n $object->value = isset($community_fields['languages']) && sizeof($community_fields['languages']) > 0 ? $community_fields['languages'] : false;\n $object->display = mozilla_display_field('languages', isset($community_fields['profile_languages_visibility']) ? $community_fields['profile_languages_visibility'] : false , $is_me, $logged_in);\n $data['languages'] = $object;\n\n // Tags\n $object = new stdClass();\n $object->value = isset($community_fields['tags']) && strlen($community_fields['tags']) > 0 ? $community_fields['tags'] : false;\n $object->display = mozilla_display_field('tags', isset($community_fields['profile_tags_visibility']) ? $community_fields['profile_tags_visibility'] : false , $is_me, $logged_in);\n $data['tags'] = $object;\n \n $object = null;\n return $data;\n}", "public function getBillingAddress();", "public function getBillingAddress();", "function address() { return ($this->address); }", "public function getAccountAddress($account);", "function get_user_info(){\t\t\n\t\t// Fetch user data from database\n\t\t$user_data_array=$this->UserModel->get_user_data(array('member_id'=>$this->session->userdata('member_id')));\n\t\techo $user_data_array[0]['company'].\"|\".$user_data_array[0]['address_line_1'].\"|\".$user_data_array[0]['city'].\"|\".$user_data_array[0]['state'].\"|\".$user_data_array[0]['zipcode'].\"|\".$user_data_array[0]['country_id'].\"|\".$user_data_array[0]['country_name'];\n\t}", "function get_guest() {\n return get_complete_user_data('username', 'guest');\n}", "function getUserInfo($user='',$field='')\r\n\t{\r\n\t\tif($user != '')\r\n\t\t{\r\n\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT $field FROM \" . PREFIX . \"_users WHERE Status = '1' AND Id = '$user'\");\r\n\t\t\t$row = $sql->fetchrow();\r\n\t\t\t$sql->close();\r\n\t\t\treturn $row->$field;\r\n\t\t}\r\n\t}", "static function addressSuggestion($user) {\n $prefixes = ['WORK', 'PERSONAL'];\n // ordered\n $suffixes = ['STATE', 'ZIP', 'CITY', 'STREET'];\n $candidates = _::map($prefixes, function ($prefix) use ($user, $suffixes) {\n return array_reduce($suffixes, function ($m, $s) use ($prefix, $user) {\n $v = $user['~'.$prefix.'_'.$s];\n return str::isEmpty($v) ? $m : _::set($m, $s, $v);\n }, ['prefix' => $prefix]);\n });\n // mutate\n assert(usort($candidates, function ($x, $y) use ($prefixes) {\n $diff = count($y) - count($x);\n // pick the most complete address\n return $diff !== 0\n ? $diff\n : array_search($x['prefix'], $prefixes) - array_search($y['prefix'], $prefixes);\n }));\n $parts = _::remove(_::first($candidates), 'prefix');\n if (_::isEmpty($parts)) {\n return '';\n }\n return join(', ', array_reduce($suffixes, function ($acc, $s) use ($parts) {\n $v = _::get($parts, $s, '');\n return str::isEmpty($v) ? $acc : _::append($acc, $v);\n }, []));\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getClientAddress(): string {}", "function wac_vendor_name($user){\n\t$firstname = get_user_meta($user->ID,'first_name',true);\n\t$lastname = get_user_meta($user->ID,'last_name',true);\n\t\n\t$fullName = $user->data->user_nicename;\n\tif(!empty($firstname)){\n\t\t$fullName = trim($firstname.' '.$lastname);\n\t}\n\treturn $fullName;\n}", "function get_profile_email($email){\r\n\t\r\n}", "public function address(): string\n {\n return $this->address;\n }", "abstract public function getUserInfo();", "public function getaddress(){\n $address = $this->_run('getaddress');\n return $address;\n }", "public static function getUser();", "public function getAddress1()\n {\n return parent::getValue('address1');\n }", "public function getUserInfo() {}", "function getAddress($single){\n\t\t\t$list = $this -> makeRequest('GET', '/list', array(\n\t\t\t\t'password'=>$_SESSION['walletpass'],\n\t\t\t\t'confirmations'=>4\n\t\t\t\t));\n\n\t\t\tif($single){\n\t\t\t\treturn $list['addresses'][0]['address'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $list['addresses'];\n\t\t\t}\n\t\t}", "public function getAdress()\n {\n return $this->adress;\n }", "public function getAdress()\n {\n return $this->adress;\n }", "public function getEmailAddress();", "public function getFullAddress() {\n $address = '';\n if (isset($this->street)) {\n $address .= $this->street . ', ';\n }\n\n if (isset($this->postcode)) {\n $address .= $this->postcode . ' ';\n }\n\n if (isset($this->city)) {\n $address .= $this->city . ', ';\n }\n\n// if (isset($this->state)) {\n// $address .= $this->state . ', ';\n// }\n\n if (isset($this->country)) {\n $address .= trans('countries.' . $this->country);\n }\n\n return $address;\n }", "function yz_wp_user_fields() {\n $fields = array(\n 'ID' => array(\n 'title' => __( 'User ID', 'youzer' ),\n ),\n 'user_firstname' => array(\n 'title' => __( 'First Name', 'youzer' ),\n ),\n 'user_lastname' => array(\n 'title' => __( 'Last Name', 'youzer' ),\n ),\n 'nickname' => array(\n 'title' => __( 'Nickname', 'youzer' ),\n ),\n 'user_nicename' => array(\n 'title' => __( 'Nice Name', 'youzer' ),\n ),\n 'display_name' => array(\n 'title' => __( 'Display Name', 'youzer' ),\n ),\n 'user_login' => array(\n 'title' => __( 'User Login', 'youzer' ),\n ),\n 'user_email' => array(\n 'title' => __( 'Email', 'youzer' ),\n ),\n 'user_url' => array(\n 'title' => __( 'Website', 'youzer' ),\n ),\n 'user_registered' => array(\n 'title' => __( 'User Registration Date', 'youzer' ),\n ),\n 'user_description' => array(\n 'title' => __( 'Description', 'youzer' ),\n )\n );\n\n return apply_filters( 'yz_wp_user_fields', $fields );\n}", "public function getAddress(): string\n {\n return $this->address;\n }", "public function getUserAddress(Request $request)\n {\n $session_key =Crypt::decryptString($request->header('sessionKey'));\n $user =WxUser::where('session_key',$session_key)->first();\n if($user==null){\n return json_encode( ['msg'=>'USER_DOES_NOTE_EXIST','code'=>'20001']);\n }else{\n return $user->getAddress->tojson();\n }\n }", "public function getAddress(){\r\n\t\treturn $this->address;\r\n\t}", "function getPersonName($user) {\n if ($user==null || (!isset($user[\"lastname\"]) && !isset($user[\"firstname\"])) )\n return '';\n $ret =\"\";\n if (isset($user[\"title\"]))\n $ret = $user[\"title\"].' ';\n $ret .= $user[\"lastname\"].\" \".$user[\"firstname\"];\n if (isset($user[\"birthname\"]) && trim($user[\"birthname\"])!=\"\")\n $ret .= \" (\".trim($user[\"birthname\"]).\")\";\n return $ret;\n}", "public function getAutoResponderToAddressField() { return $this->_autoResponderToAddressField; }", "function getFieldPortalAddressStreet($value1 = null, $value2 = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_street');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_street');\n\t\t$tooltip = setToolTipNotification(\"street\");\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('street') === 'street' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label><br><input type='text' name='streetNo' value='\".$value1.\"' id='streetNo' size='4' style='width:28%;'>\";\n\t\t\t$form_ret .= \"<input type='text' name='streetName' value='\".$value2.\"' id='streetName' size='12' class='srms-field \".(get_axl_req_fields('street') === 'street' ? 'input-text-required' : '').\"' style='width:70%;'></br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "public function output_user($user) {\n $out = fullname($user, $this->viewfullnames);\n $out = $user->{$this->propertyFromConfigToDisplay};\n /*if ($this->extrafields) {\n $displayfields = array();\n foreach ($this->extrafields as $field) {\n $displayfields[] = $user->{$field};\n }\n $out .= ' (' . implode(', ', $displayfields) . ')';\n }*/\n return $out;\n }", "public function getExternalUserName();", "function get_user_details($username)\n {\n }", "private function getAdditionalUserInfo(IUser $user) {\n\t\tif ($this->additionalInfoField === 'email') {\n\t\t\treturn $user->getEMailAddress();\n\t\t} elseif ($this->additionalInfoField === 'id') {\n\t\t\treturn $user->getUID();\n\t\t}\n\t\treturn null;\n\t}", "function get_field_data($usr, $field)\n\t{\n\t\t$campos = array(\n\t\t\t'usr_dir' => $usr->getDireccion(),\n\t\t\t'usr_email' => $usr->getEmail(),\n\t\t\t'usr_name' => $usr->getName(),\n\t\t\t'usr_resp' => $usr->getRespuesta(),\n\t\t\t'usr_cod_postal' => $usr->getCod_Postal(),\n\t\t\t'usr_dir' => $usr->getDireccion(),\n\t\t\t'usr_pw' => $usr->getPass());\n\t\t$data = '';\n\n\t\tforeach ($campos as $key => $value) {\n\t\t\tif( $field == $key )\n\t\t\t\t$data = $value;\n\t\t}\n\n\t\treturn $data;\n\t}", "function grabUserLocation($input){\n $user_city = $input;\n $request_url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\".$user_city.\"%20Canada&sensor=false\";\n $USERJSON = file_get_contents($request_url);\n $result = json_decode($USERJSON);\n $lat=$result->results[0]->geometry->location->lat;\n $long=$result->results[0]->geometry->location->lng;\n return compact('lat','long');\n}", "function jp_rcp_user_registration_data( $user ) {\n\trcp_errors()->remove( 'username_empty' );\n\t$user['login'] = $user['email'];\n\treturn $user;\n}", "public function getAddress()\n {\n \treturn $this->address;\n }", "private function get_address()\n\t{\n\t\treturn $this->m_address;\n\t}", "public function getAddress2()\n {\n return parent::getValue('address2');\n }", "public function getCurrentUser(){\n\t\t$cm = \\OC::$server->getContactsManager();\n\t\t// The API is not active -> nothing to do\n\n\t\t$result = $cm->search(\\OCP\\User::getUser(), array('FN'));\n\t\t$r = $result[0];\n\t\t$data = array();\n\t\t$data['id'] = $r['id'];\n\t\t$data['displayname'] = $r['FN'];\n\t\tif(!isset($r['EMAIL'])){\n\t\t\t$r['EMAIL'] = array();\n\t\t}\n\n\t\tif(!isset($r['IMPP'])){\n\t\t\t$r['IMPP'] = array();\n\t\t}\n\t\t$data['backends'] = $this->contactBackendToBackend($r['EMAIL'], $r['IMPP']);\n\t\tlist($addressBookBackend, $addressBookId) = explode(':', $r['addressbook-key']);\n\t\t$data['address_book_id'] = $addressBookId;\n\t\t$data['address_book_backend'] = $addressBookBackend;\n\t\treturn $data;\n\t}", "function parse_user($value){\n\t\t$value = preg_replace_callback('/\\[user=([\\w-_]+)\\]/iU','preg_replace_user',$value);\n\t\t$CI =& get_instance();\n\t\t$user = $CI->user->is_logged() ? $CI->user->get('name') : t('user guest');\n\t\t$value = str_replace('%username%', $user, $value);\n\t\treturn $value;\n\t}", "function _process_user_info()\n\t{\n\t\t$user_info = null;\n\t\t$code = $this->input->get('code');\n\n\t\t//Google redirects with code insead of post\n\t\tif( $code )\n\t\t{\n\t\t\t$user_info = get_user_info( $this->input->get('code') );\n\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$user_info['email'] = trim($this->input->post('email'));\n\t\t\t$user_info['username'] = trim($this->input->post('username'));\n\t\t}\n\n\t\treturn $user_info;\n\t}", "public function getStreetName();", "function makeAddress($label){\n\t\t\t$addressdata = $this -> makeRequest('GET', '/new_address', array(\n\t\t\t\t'password'=>$_SESSION['walletpass'],\n\t\t\t\t'label'=>$label\n\t\t\t\t));\n\t\t\treturn $addressdata['address'];\n\t\t\t\n\t\t}", "public function getAddress()\n\t{\n\t\treturn $this->data['address'];\n\t}", "public function getInputAddress()\r\n {\r\n return $this->input_address;\r\n }", "public function getUserDisplayName();", "public function getFullAddressAttribute(): string\n {\n return \"$this->address\" . ($this->address2 ? ' #' . $this->address2 : '') . \", $this->city $this->state, $this->zip\";\n }", "public function getBillingFirstName();", "public function index()\n {\n // get all the address records associated with a user\n $user = Auth::user();\n $address = DB::table('address')->where('fk_user_id', $user['id'] )->get();\n return view('address.index', compact('address'));\n\n\n\necho $user->name;\n }", "function &mainAddress( $user )\n {\n if ( get_class ( $user ) == \"ezuser\" )\n $userID = $user->id();\n else\n $userID = $user;\n\n $db =& eZDB::globalDatabase();\n\n $db->array_query( $addressArray, \"SELECT AddressID FROM eZAddress_AddressDefinition\n WHERE UserID='$userID'\", 0, 1 );\n\n if ( count( $addressArray ) == 1 )\n {\n return new eZAddress( $addressArray[0][$db->fieldName( \"AddressID\" )] );\n }\n else\n {\n return false;\n }\n }", "function hc_author_field($field , $gravatarSize = ''){\n\t\t$info = hc_get_author_field($field , $gravatarSize);\n\t\techo $info;\n\t}", "function get_profile_lname($lname){\r\n\t\r\n}", "public function fullAddress() :string\n {\n $parts = [\n $this->address1,\n $this->address2,\n $this->city,\n $this->county,\n $this->postcode\n ];\n $address = array_filter($parts, [$this,'not_blank']);\n return implode(', ',$address);\n }", "function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}", "public function getStreet();", "public function getUserInfo()\n {\n\n if (empty($this->_user))\n return '';\n\n $userInfo = $this->_user;\n\n if (!empty($this->_password))\n $userInfo .= \":{$this->_password}\";\n\n return $userInfo;\n }", "function get_user_full_name() {\n echo $_SESSION['SESS_USER_FIRST'] . ' ' . $_SESSION['SESS_USER_LAST'];\n }", "public function getUser_lname()\n {\n return $this->user_lname;\n }", "public function getJkw_hospitalAddressStr () {\n return $this->xprovince->name . $this->xcity->name . $this->xcounty->name . $this->content;\n }", "public function findAddress()\n {\n $regex = '/.{1,100}[A-Z]{1,2}[0-9]{1}[A-Z0-9]*\\s+[0-9]{1}[A-Z]{2}/si';\n\n if (preg_match_all($regex, $this->data, $matches)) {\n $uniques = array_values(array_unique($matches[0]));\n foreach ($uniques as $key => $address) {\n $uniques[$key] = preg_replace(\"/[\\s\\r\\n]*[|]+[\\s\\r\\n]*/\", \", \", $address);\n }\n $this->address = $uniques;\n }\n }", "public function getUserFullName() {\n return $this->first_name . ' ' . $this->last_name;\n }", "public static function getExplicitAuthFieldValues() {}", "function get_user_by($field, $value)\n {\n }", "function getProfileInfo($user){\n\t\tglobal $db;\n\t\t$sql = \"SELECT * from personalinfo WHERE user_email ='$user'\";\n\t\t$result =$db->query($sql);\n\t\t$infotable = $result->fetch_assoc();\n\t\treturn $infotable;\n\t}", "function get_user_info( $user, $key )\n {\n //Unimplemented\n }", "public function requestFirstname();", "public function getUserInfo()\n {\n $request = new Resource('GET', 'https://api.dropbox.com/1/account/info', array(\n 'oauth_consumer_key' => $this->consumer->client_id,\n 'oauth_token' => $this->token->access_token,\n ));\n\n // Sign the request using the consumer and token\n $request->sign($this->signature, $this->consumer, $this->token);\n\n $user = json_decode($request->execute());\n\n // Create a response from the request\n return array(\n 'uid' => $this->token->uid,\n 'name' => $user->display_name,\n 'email' => $user->email,\n 'location' => $user->country,\n );\n }", "public function getAddress()\r\n {\r\n return $this->address;\r\n }", "public function getFullAddressAttribute(){\n\n \treturn \"{$this->street} {$this->number}. {$this->dept}{$this->floor} - ({$this->postal_code}). {$this->city} - {$this->country}\";\n }" ]
[ "0.731484", "0.6859681", "0.6820991", "0.646137", "0.6240512", "0.62200207", "0.6196467", "0.6196467", "0.6156209", "0.6154776", "0.60920185", "0.60744375", "0.60595506", "0.6054618", "0.6041222", "0.60032177", "0.5957405", "0.5957297", "0.594598", "0.5940521", "0.5928398", "0.59218836", "0.591568", "0.59003013", "0.5884414", "0.5884414", "0.58738244", "0.5859471", "0.5855981", "0.5836466", "0.5834344", "0.5824973", "0.5815219", "0.5815219", "0.5815219", "0.5815219", "0.5815219", "0.5815219", "0.5815219", "0.5808199", "0.5798841", "0.57903236", "0.5779467", "0.5779258", "0.577908", "0.57758546", "0.57695526", "0.5722076", "0.5715554", "0.5712032", "0.5712032", "0.57111347", "0.5703484", "0.56920403", "0.5689317", "0.56770205", "0.5672523", "0.56719345", "0.5657553", "0.56570864", "0.564804", "0.5646396", "0.5638646", "0.5628794", "0.5627345", "0.5620602", "0.56095105", "0.5604393", "0.5593534", "0.5593335", "0.5589691", "0.5582614", "0.5582609", "0.55804366", "0.55785424", "0.55686027", "0.5563661", "0.5560851", "0.55484766", "0.5542787", "0.55397373", "0.5535989", "0.5535836", "0.55276316", "0.55170697", "0.55158955", "0.5505826", "0.5505541", "0.55046153", "0.54969233", "0.54956955", "0.54954547", "0.5494566", "0.54911405", "0.5488425", "0.54841727", "0.5483642", "0.5481111", "0.5480288", "0.54711604", "0.54679847" ]
0.0
-1
Instanciate a googlemap map, configure it and generate its client side code.
public function generateGoogleMap($defaultUser = '') { if(!isset($oGoogleMapService)) $oGoogleMapService = Phpfox::getService('gmap.googlemap'); //Init params $oGoogleMapService->setDivId('gmap'); $oGoogleMapService->setEnableWindowZoom(true); $oGoogleMapService->setSize('100%','100%'); $oGoogleMapService->setLang('en'); if($defaultUser != '') $oGoogleMapService->setDefaultMarker($defaultUser); $oGoogleMapService->setDefaultHideMarker(false); //Get country and viewport $aSelfUser = Phpfox::getService('user')->getUser(Phpfox::getUserId()); $aUserCountryLocalisations = $this->getCountryLocalisation($aSelfUser['country_iso']); if($aUserCountryLocalisations != null) $oGoogleMapService->setCustomLocationAndViewport($aUserCountryLocalisations); //Get all localisations $aLocalisations = $this->getAllLocations(); if($aLocalisations != null) { foreach($aLocalisations as $key => $aCountryUsers) { $aformattedArray = array(); foreach($aCountryUsers as $aData) { $aformattedArray[] = array($aData['lat'], $aData['lng'], $aData['full_name'], '<div id=\'js_user_tool_tip_cache_' . $aData['user_name'] . '\' style=\'min-width:250px;min-height:200px\'></div>', $aData['user_name']); } $oGoogleMapService->addArrayMarkerByCoords($aformattedArray,$key); } } $oGoogleMapService->generate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function output_map() {\n\n\t\tif ( $this->lat && $this->lng ) {\n\n\t\t\t$this->generate_map_lat_lng();\n\n\t\t} else {\n\n\t\t\t$this->generate_map_address();\n\t\t}\n\n\t\t?>\n\n\t\t<script src=\"https://maps.googleapis.com/maps/api/js?callback=initMap\"\n\t\t async defer></script>\n\n\t\t<div class=\"google-map-outer-wrapper\">\n\n\t\t\t<div id=\"map\"></div>\n\n\t\t</div>\n\n\t<?php }", "public function map()\n\t{\n\t\t$map = 'http://maps.googleapis.com/maps/api/staticmap?zoom=12&format=png&maptype=roadmap&style=element:geometry|color:0xf5f5f5&style=element:labels.icon|visibility:off&style=element:labels.text.fill|color:0x616161&style=element:labels.text.stroke|color:0xf5f5f5&style=feature:administrative.land_parcel|element:labels.text.fill|color:0xbdbdbd&style=feature:poi|element:geometry|color:0xeeeeee&style=feature:poi|element:labels.text.fill|color:0x757575&style=feature:poi.business|visibility:off&style=feature:poi.park|element:geometry|color:0xe5e5e5&style=feature:poi.park|element:labels.text|visibility:off&style=feature:poi.park|element:labels.text.fill|color:0x9e9e9e&style=feature:road|element:geometry|color:0xffffff&style=feature:road.arterial|element:labels|visibility:off&style=feature:road.arterial|element:labels.text.fill|color:0x757575&style=feature:road.highway|element:geometry|color:0xdadada&style=feature:road.highway|element:labels|visibility:off&style=feature:road.highway|element:labels.text.fill|color:0x616161&style=feature:road.local|visibility:off&style=feature:road.local|element:labels.text.fill|color:0x9e9e9e&style=feature:transit.line|element:geometry|color:0xe5e5e5&style=feature:transit.station|element:geometry|color:0xeeeeee&style=feature:water|element:geometry|color:0xc9c9c9&style=feature:water|element:labels.text.fill|color:0x9e9e9e&size=640x250&scale=4&center='.urlencode(trim(preg_replace('/\\s\\s+/', ' ', $this->cfg->address)));\n\t\t$con = curl_init($map);\n\t\tcurl_setopt($con, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($con, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($con, CURLOPT_RETURNTRANSFER, 1);\n\t\treturn response(curl_exec($con))->header('Content-Type', 'image/png');\n\t}", "public function __construct() {\n\t\t\tparent::__construct(\n\t\t\t\t'zthemename_google_map',\n\t\t\t\tesc_html__( 'Google Map', 'zthemename' ),\n\t\t\t\tarray(\n\t\t\t\t\t'description' => esc_html__( 'Adds a google static map to your website.', 'zthemename' ),\n\t\t\t\t\t'customize_selective_refresh' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t}", "function add_cf7_tag_generator_googleMap() {\n\t if ( class_exists( 'WPCF7_TagGenerator' ) ) {\n\t $tag_generator = WPCF7_TagGenerator::get_instance();\n\t $tag_generator->add( 'map', __( 'Google map', 'cf7-google-map' ), array($this,'googleMap_tag_generator') );\n\t }\n\t}", "public function run()\n {\n $cs = Yii::app()->getClientScript();\n\n $predefinedLatitude = $this->defaultLatitude;\n $predefinedLongitude = $this->defaultLongitude;\n\n\n if ($this->defaultLatitude == 'null') {\n $predefinedLatitude = self::DEFAULT_LATITUDE;\n }\n\n if ($this->defaultLongitude == 'null') {\n $predefinedLongitude = self::DEFAULT_LONGITUDE;\n }\n\n /* $cs->registerCoreScript('jquery');*/\n //Assign server side value to script\n $cs->registerScript('prepareMapData', \"\n var defaultLatitude = $this->defaultLatitude;\n var defaultLongitude = $this->defaultLongitude;\n var predefinedLatitude = $predefinedLatitude;\n var predefinedLongitude = $predefinedLongitude;\n var zoomLevel = $this->zoomLevel;\n var latitudeInputId = '$this->latitudeInputId';\n var longitudeInputId = '$this->longitudeInputId';\n \", CClientScript::POS_BEGIN);\n\n //Register js and css\n $cs->registerScriptFile(\"https://maps.googleapis.com/maps/api/js?key=\" . $this->apiKey, CClientScript::POS_BEGIN);\n $cs->registerScriptFile($this->assetsDir . '/map.js', CClientScript::POS_END);\n $cs->registerCssFile($this->assetsDir . '/map.css');\n\n $this->render('map', ['displayMode' => $this->displayMode]);\n }", "function gmap_obj($args){\n /*\n $args = array(\n 'id' => \"map-lyra\",\n 'lattitude' => \"43.5414097\",\n 'longitude' => \"1.5165507000000389\",\n 'zoom' => 16,\n 'address' => null,\n 'map_text' => null,\n );*/\n\n $output = \"<script src='https://maps.googleapis.com/maps/api/js?key=&sensor=false&extension=.js'></script>\";\n\n $output .= \"<script>\n google.maps.event.addDomListener(window, 'load', init);\n var map;\n function init() {\n var mapOptions = {\n center: new google.maps.LatLng(\".$args['lattitude'].\",\".$args['longitude'].\"),\n zoom: \".$args['zoom'].\",\n zoomControl: true,\n zoomControlOptions: {\n style: google.maps.ZoomControlStyle.SMALL\n },\n disableDoubleClickZoom: true,\n mapTypeControl: true,\n mapTypeControlOptions: {\n style: google.maps.MapTypeControlStyle.DROPDOWN_MENU\n },\n scaleControl: true,\n scrollwheel: false,\n panControl: true,\n streetViewControl: false,\n draggable : true,\n overviewMapControl: false,\n overviewMapControlOptions: {\n opened: false\n },\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n styles: [{\\\"featureType\\\":\\\"all\\\",\\\"elementType\\\":\\\"all\\\",\\\"stylers\\\":[{\\\"saturation\\\":-100},{\\\"gamma\\\":0.5}]}]\n };\n var mapElement = document.getElementById('\".$args['id'].\"');\n var map = new google.maps.Map(mapElement, mapOptions);\n var locations = [\n ['\".$args['map_text'].\"', '\".$args['address'].\"', 'undefined', 'undefined','undefined', \".$args['lattitude'].\", \".$args['longitude'].\", '\".get_template_directory_uri().\"/img/marker.png']\n ];\n for (i = 0; i < locations.length; i++) {\n if (locations[i][1] =='undefined'){ description ='';} else { description = locations[i][1];}\n if (locations[i][2] =='undefined'){ telephone ='';} else { telephone = locations[i][2];}\n if (locations[i][3] =='undefined'){ email ='';} else { email = locations[i][3];}\n if (locations[i][4] =='undefined'){ web ='';} else { web = locations[i][4];}\n if (locations[i][7] =='undefined'){ markericon ='';} else { markericon = locations[i][7];}\n marker = new google.maps.Marker({\n icon: markericon,\n position: new google.maps.LatLng(locations[i][5], locations[i][6]),\n map: map,\n title: locations[i][0],\n desc: description,\n tel: telephone,\n email: email,\n web: web\n });\n if (web.substring(0, 7) != \\\"http://\\\") {\n link = \\\"http://\\\" + web;\n } else {\n link = web;\n }\n bindInfoWindow(marker, map, locations[i][0], description, telephone, email, web, link);\n }\n function bindInfoWindow(marker, map, title, desc, telephone, email, web, link) {\n var infoWindowVisible = (function () {\n var currentlyVisible = false;\n return function (visible) {\n if (visible !== undefined) {\n currentlyVisible = visible;\n }\n return currentlyVisible;\n };\n }());\n iw = new google.maps.InfoWindow();\n google.maps.event.addListener(marker, 'click', function() {\n if (infoWindowVisible()) {\n iw.close();\n infoWindowVisible(false);\n } else {\n var html= \\\"<div style='color:#000;background-color:#fff;padding:5px;width:90%;'><h4>\\\"+title+\\\"</h4><p>\\\"+desc+\\\"<p><a href='mailto:\\\"+email+\\\"' >\\\"+email+\\\"<a><a href='\\\"+link+\\\"'' >\\\"+web+\\\"<a></div>\\\";\n iw = new google.maps.InfoWindow({content:html});\n iw.open(map,marker);\n infoWindowVisible(true);\n }\n });\n google.maps.event.addListener(iw, 'closeclick', function () {\n infoWindowVisible(false);\n });\n }\n }\n</script>\";\n\n return $output;\n}", "function InitializeGoogleMap($addresses, $width=500, $height=300, $markerIconColor = 'NAUTICA', $mapZoom = 12) {\n $googleMap = \"\";\n\n if (is_array($addresses) && count($addresses) > 0) {\n include_once(SITE_PATH . '/include/google_map.php');\n\n $gm = & new EasyGoogleMap(GOOGLE_KEY);\n\n $gm->SetMapWidth($width);\n $gm->SetMapHeight($height);\n $gm->SetMarkerIconStyle('GT_FLAT');\n $gm->SetMapZoom($mapZoom);\n $gm->mContinuousZoom = TRUE;\n $gm->mMapType = TRUE;\n for ($a = 0; $a < count($addresses); $a++) {\n $gm->SetAddress($addresses[$a]['location']);\n $gm->SetInfoWindowText($addresses[$a]['html']);\n $gm->SetCountry($addresses[$a]['country'], $addresses[$a]['location']);\n }\n $googleMap.=$gm->GmapsKey();\n $googleMap.=$gm->MapHolder();\n $googleMap.=$gm->InitJs();\n $googleMap.=$gm->UnloadMap();\n }\n return $googleMap;\n }", "public function __construct()\r\n {\r\n $this->googleKey = get_option('wpGoogleMaps_api_key');\r\n $this->mapApiUrl = \"http://maps.google.com/maps?file=api&amp;v=2&amp;key={$this->googleKey}\";\r\n\r\n $jsDir = get_option('siteurl') . '/wp-content/plugins/google-maps-for-wordpress/js/';\r\n\r\n wp_register_script('googleMaps', $this->mapApiUrl, false, 2);\r\n wp_register_script('wpGoogleMaps', \"{$jsDir}wp-google-maps.js\", array('prototype', 'googleMaps'), '0.0.1');\r\n wp_register_script('wpGoogleMapsAdmin', \"{$jsDir}wp-google-maps-admin.js\", array('jquery'), '0.0.2');\r\n }", "function set_map(){\r\n //setta chiave api nella composizione dell'url\r\n echo \"\r\n <script src=\\\"http://maps.google.com/maps?file=api&v=2&key=\". $this->apikey .\"&sensor=false\\\" type=\\\"text/javascript\\\">\r\n </script>\r\n \";\r\n \r\n //assegna il contenuto alla variabile JScenterMap la quale permette di geolocalizzare un punto sulla mappa tramite indirizzo\r\n \r\n if($this->indirizzo!=\"\"){\r\n \t$JScenterMap = \"\r\n \tvar geocoder = new GClientGeocoder();\r\n \tgeocoder.getLatLng('\".$this->indirizzo.\"',function(point) {\r\n if (!point) {\r\n alert('\".$this->indirizzo.\"' + \\\" not found\\\");\r\n } else {\r\n map.setCenter(point, 13);\r\n var marker = createMarker(point, 'Ciao');\r\n map.addOverlay(marker); \r\n }\r\n });\r\n \t\";\r\n\t } else {\r\n \t\t$JScenterMap = \"map.setCenter(new GLatLng(\".$this->latitudine.\", \".$this->longitudine.\"), 11);\";\r\n /*\r\n $creamarker = \"var marker1 = createMarker(new GLatLng(\".$this->latitudini[$i].\", \".$this->longitudine[$i].\"), '\" .$this->nomi[$i] .\"');\r\n map.addOverlay(marker1);\";*/\r\n \r\n }\r\n \r\n\t \r\n //inizializza il punto sulla mappa in base al contenuto della variabile JScenterMap\r\n //window.onload permette di richiamare il metodo initialize e Gunload (per svuotare la memoria) direttamente da qui senza specificarlo nel body\r\n echo \"\r\n <script type=\\\"text/javascript\\\">\r\n \r\n \t function createMarker(point,html) {\r\n\t\t\t\tvar marker = new GMarker(point);\r\n\t\t\t\tGEvent.addListener(marker, \\\"mouseover\\\", function() { marker.openInfoWindowHtml(html); });\r\n\t\t\t\treturn marker;\r\n\t\t\t }\r\n \r\n \t window.onload = initialize; \r\n window.onunload = GUnload;\r\n function initialize() {\r\n if (GBrowserIsCompatible()) {\r\n var map = new GMap2(document.getElementById(\\\"map_canvas\\\")); \";\r\n echo $JScenterMap; \r\n //CREAZIONE MARKER DINAMICAMENTE\r\n //alert(\\\"ciao\\\" + $i);\r\n for ($i=0;$i<10;$i++){\r\n echo \"\r\n var marker1 = createMarker(new GLatLng(\".$this->latitudini[$i].\", \".$this->longitudini[$i].\"), '\" .$this->nomi[$i] .\"');\r\n \t\t\tmap.addOverlay(marker1); \";\r\n \t\t } \r\n echo \"map.setUIToDefault();\r\n }\r\n }\r\n </script>\r\n \";\r\n\t}", "public static function init()\n {\n if (!Pronamic_Google_Maps_Settings::has_settings()) {\n Pronamic_Google_Maps_Settings::set_default_options();\n }\n\n // Plugins URL\n $url = THEMEROOT . '/plugins/pronamic-google-maps/';\n self::$pluginsUrl = trailingslashit(apply_filters('google_maps_plugins_url', $url));\n\n self::$pluginsPath = trailingslashit(apply_filters('google_maps_plugins_path', GOOGLE_MAPS_PATH));\n\n // Load plugin text domain\n $rel_path = dirname(plugin_basename(self::$file)) . '/languages/';\n\n load_plugin_textdomain('pronamic_google_maps', false, $rel_path);\n\n // Scripts\n self::registerScripts();\n\n // Other\n if (is_admin()) {\n Pronamic_Google_Maps_Admin::bootstrap();\n } else {\n Pronamic_Google_Maps_Site::bootstrap();\n }\n }", "function googlemap_shortcode( $atts ) {\n extract(shortcode_atts(array(\n 'width' => '98%',\n 'height' => '300',\n\t\t'lat' => '',\n\t\t'lng' =>'',\n\t\t'zoom' => '13',\n\t\t'pancontrol' => 'Yes',\n\t\t'zoomcontrol'=> 'Yes',\n\t\t'maptypecontrol'=> 'Yes',\n\t\t'scalecontrol'=> 'Yes',\n\t\t'streetviewcontrol'=> 'Yes',\n\t\t'overviewmapcontrol'=> 'Yes'\n ), $atts));\n\n $pancontrol = ($pancontrol == 'Yes') ? 'true' : '';\n $zoomcontrol = ($zoomcontrol == 'Yes') ? 'true' : '';\n $maptypecontrol = ($maptypecontrol == 'Yes') ? 'true' : '';\n $scalecontrol = ($scalecontrol == 'Yes') ? 'true' : '';\n $streetviewcontrol = ($streetviewcontrol == 'Yes') ? 'true' : '';\n $overviewmapcontrol = ($overviewmapcontrol == 'Yes') ? 'true' : '';\n\n $rand = rand(1,100) * rand(1,100);\n\n return '<script src=\"http://maps.googleapis.com/maps/api/js?key=&sensor=false\" type=\"text/javascript\"></script>\n \n \n <div class=\"map_api\" id=\"map_canvas_'.esc_attr($rand).'\" style=\"width:'. $width .'; height:'. $height .'px\"></div>\n <script type=\"text/javascript\">\n function initialize() {\n var myLatlng = new google.maps.LatLng('.$lat.','. $lng .'); \n var mapOptions = {\n center: myLatlng,\n zoom: '. $zoom .',\n panControl: '. $pancontrol .',\n zoomControl: '. $zoomcontrol .',\n mapTypeControl: '. $maptypecontrol .',\n scaleControl: '. $scalecontrol .',\n streetViewControl: '. $streetviewcontrol .',\n overviewMapControl: '. $overviewmapcontrol .',\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n var map = new google.maps.Map(document.getElementById(\"map_canvas_'.$rand.'\"),\n mapOptions);\n var marker = new google.maps.Marker({\n position: myLatlng\n });\n \n marker.setMap(map); \n }initialize();\n </script>\n ';\n\n}", "public function initializeObject() {\r\n\t\t// Set default values.\r\n\t\t$this->jsonEncoder->setDebug($this->settings['jsonEncoder']);\r\n\t\t$this->geocodeUrl = $this->settings['geocodeUrl'];\r\n\t\t$this->includeFrontEndResources = $this->settings['includeFrontEndResources'];\r\n\r\n\t\t$this->frontEndUtility->includeFrontEndResources(get_class($this));\r\n\r\n\t\t$this->options = $this->objectManager->create('Tx_AdGoogleMaps_MapBuilder_Options', $this);\r\n\t\t$this->options->setCanvasId($this->settings['options']['canvasId']);\r\n\r\n\t\t// Merge mapOptions settings.\r\n#\t\t$this->frontEndUtility->objectTypoScriptInjection($this->options->getMapOptions(), $this->settings['options']['mapOptions'], $this->data, $this->tableName);\r\n\t\t// Merge mapControl settings.\r\n#\t\t$this->frontEndUtility->objectTypoScriptInjection($this->options->getMapControl(), $this->settings['options']['mapControl'], $this->data, $this->tableName);\r\n\r\n\r\n\r\n\r\n\t\t$this->frontEndUtility->objectTypoScriptInjection($this->options, 'plugin.tx_adgooglemaps.mapBuilder.options', $this->settings['options'], $this->data, $this->tableName);\r\n/*\r\n\t\t// Build layers.\r\n\t\tif (array_key_exists('layers', $this->settings['options']) === TRUE) {\r\n\t\t\t$layerConfigurations = $this->settings['options']['layers'];\r\n\t\t\t// Unset default configuration if set.\r\n\t\t\tif (array_key_exists('defaults', $layerConfigurations) === TRUE) {\r\n\t\t\t\tunset($layerConfigurations['defaults']);\r\n\t\t\t}\r\n\t\t\tforeach ($layerConfigurations as $layerClassName => $layerConfiguration) {\r\n\t\t\t\t$this->createLayer($layerClassName, $layerConfiguration);\r\n\t\t\t}\r\n\t\t}\r\n*/\r\n\t}", "function ale_map_load_scripts() {\n wp_register_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false' );\n }", "function newMap($map) {\n\n\t\t// log if not a restart\n\t\t$this->server->gamestate = Server::RACE;\n\t\tif ($this->restarting == 0)\n\t\t\t$this->console_text('Begin Map');\n\n\t\t// refresh game info\n\t\t$this->client->query('GetCurrentGameInfo', 1);\n\t\t$gameinfo = $this->client->getResponse();\n\t\t$this->server->gameinfo = new Gameinfo($gameinfo);\n\n\t\t// check for restarting map\n\t\t$this->changingmode = false;\n\t\tif ($this->restarting > 0) {\n\t\t\t// check type of restart and signal an instant one\n\t\t\tif ($this->restarting == 2) {\n\t\t\t\t$this->restarting = 0;\n\t\t\t} else { // == 1\n\t\t\t\t$this->restarting = 0;\n\t\t\t\t// throw postfix 'restart map' event\n\t\t\t\t$this->releaseEvent('onRestartMap2', $map);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// refresh server name & options\n\t\t$this->getServerOptions();\n\n\t\t// reset record list\n\t\t$this->server->records->clear();\n\t\t// reset player votings\n\t\t//$this->server->players->resetVotings();\n\n\t\t// create new map object\n\t\t$map_item = new Map($map);\n\n\t\t// in Rounds/Team/Cup mode if multilap map, get forced laps\n\t\tif ($map_item->laprace &&\n\t\t ($this->server->gameinfo->mode == Gameinfo::RNDS ||\n\t\t $this->server->gameinfo->mode == Gameinfo::TEAM ||\n\t\t $this->server->gameinfo->mode == Gameinfo::CUP)) {\n\t\t\t$map_item->forcedlaps = $this->server->gameinfo->forcedlaps;\n\t\t}\n\n\t\t// obtain map's GBX data, MX info & records\n\t\t$map_item->gbx = new GBXChallMapFetcher(true);\n\t\ttry\n\t\t{\n\t\t\t$map_item->gbx->processFile($this->server->mapdir . $map_item->filename);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\ttrigger_error($e->getMessage(), E_USER_WARNING);\n\t\t}\n\t\t$map_item->mx = findMXdata($map_item->uid, true);\n\n\t\t// throw main 'begin map' event\n\t\t$this->releaseEvent('onBeginMap', $map_item);\n\n\t\t// log console message\n\t\t$this->console('map changed [{1}] >> [{2}]',\n\t\t stripColors($this->server->map->name, false),\n\t\t stripColors($map_item->name, false));\n\n\t\t// check for relay server\n\t\tif (!$this->server->isrelay) {\n\t\t\t// check if record exists on new map\n\t\t\t$cur_record = $this->server->records->getRecord(0);\n\t\t\tif ($cur_record !== false && $cur_record->score > 0) {\n\t\t\t\t$score = ($this->server->gameinfo->mode == Gameinfo::STNT ?\n\t\t\t\t str_pad($cur_record->score, 5, ' ', STR_PAD_LEFT) :\n\t\t\t\t formatTime($cur_record->score));\n\n\t\t\t\t// log console message of current record\n\t\t\t\t$this->console('current record on {1} is {2} and held by {3}',\n\t\t\t\t stripColors($map_item->name, false),\n\t\t\t\t trim($score),\n\t\t\t\t stripColors($cur_record->player->nickname, false));\n\n\t\t\t\t// replace parameters\n\t\t\t\t$message = formatText($this->getChatMessage('RECORD_CURRENT'),\n\t\t\t\t stripColors($map_item->name),\n\t\t\t\t trim($score),\n\t\t\t\t stripColors($cur_record->player->nickname));\n\t\t\t} else {\n\t\t\t\tif ($this->server->gameinfo->mode == Gameinfo::STNT)\n\t\t\t\t\t$score = ' ---';\n\t\t\t\telse\n\t\t\t\t\t$score = ' --.--';\n\n\t\t\t\t// log console message of no record\n\t\t\t\t$this->console('currently no record on {1}',\n\t\t\t\t stripColors($map_item->name, false));\n\n\t\t\t\t// replace parameters\n\t\t\t\t$message = formatText($this->getChatMessage('RECORD_NONE'),\n\t\t\t\t stripColors($map_item->name));\n\t\t\t}\n\t\t\tif (function_exists('setRecordsPanel'))\n\t\t\t\tsetRecordsPanel('local', $score);\n\n\t\t\t// if no maprecs, show the original record message to all players\n\t\t\tif (($this->settings['show_recs_before'] & 1) == 1) {\n\t\t\t\tif (($this->settings['show_recs_before'] & 4) == 4 && function_exists('send_window_message'))\n\t\t\t\t\tsend_window_message($this, $message, false);\n\t\t\t\telse\n\t\t\t\t\t$this->client->query('ChatSendServerMessage', $this->formatColors($message));\n\t\t\t}\n\t\t}\n\n\t\t// update the field which contains current map\n\t\t$this->server->map = $map_item;\n\n\t\t// throw postfix 'begin map' event (various)\n\t\t$this->releaseEvent('onBeginMap2', $map_item);\n\n\t\t// show top-8 & records of all online players before map\n\t\tif (($this->settings['show_recs_before'] & 2) == 2 && function_exists('show_maprecs')) {\n\t\t\tshow_maprecs($this, false, 1, $this->settings['show_recs_before']); // from chat.records2.php\n\t\t}\n\t}", "public function __construct($options=array(), $htmlOptions=array())\n\t{\n\n\t\t$this->resources = new CMap();\n\n\t\t$this->setOptions($options);\n\t\t$this->setHtmlOptions($htmlOptions);\n\n\t\t$this->gMapClient = new EGMapClient();\n\t}", "function section__map(){\n return array(\n 'content'=>\"<div style='width:300px; height:300px' style='\n margin-left:auto; margin-right:auto;' id='map'></div>\",\n 'class'=>'main',\n 'label'=>'Map',\n 'order'=>'1'\n );\n }", "function autocreate_map ($post_id, $lat, $lon, $add) {\r\n\t\t$opts = get_option('agm_google_maps');\r\n\t\t$do_associate = @$opts['custom_fields_options']['associate_map'];\r\n\r\n\t\tif (!$lat || !$lon) {\r\n\t\t\t$geo = $this->_address_to_marker($add);\r\n\t\t} else {\r\n\t\t\t$geo = $this->_position_to_marker($lat, $lon);\r\n\t\t}\r\n\r\n\t\tif (!$geo) return false; // Geolocation failed\r\n\r\n\t\t$map = $this->get_map_defaults();\r\n\t\t$map['title'] = $geo['title'];\r\n\t\t$map['show_map'] = 1;\r\n\t\t$map['show_markers'] = 1;\r\n\t\t$map['markers'] = array($geo);\r\n\t\tif ($do_associate) $map['post_ids'] = array($post_id);\r\n\r\n\t\t$map_id = $this->save_map($map);\r\n\r\n\t\tif (!$map_id) return false;\r\n\t\tupdate_post_meta($post_id, 'agm_map_created', $map_id);\r\n\t\treturn $map_id;\r\n\t}", "function google_map_load_scripts(){\n\twp_register_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false' );\n}", "static function the_map( $map_id = 'map-canvas', $zoom = 13, $field_id = 'map' ) {\n\t\t// variables.\n\t\t$key = get_field( 'google_maps_key', 'option' );\n\t\t$map = get_field( $field_id ) ? get_field( $field_id ) : get_field( $field_id, 'option' );\n\t\t$mapmarker = get_field( 'map_marker', 'option' ) ? get_field( 'map_marker', 'option' ) : '';\n\t\t$lang = is_rtl() ? 'iw' : '';\n\t\t$lat = $map['lat'] ? $map['lat'] : '';\n\t\t$lng = $map['lng'] ? $map['lng'] : '';\n\t\t$address = $map['address'] ? $map['address'] : '';\n\n\t\t// enqueue.\n\t\twp_enqueue_script( 'googlemaps', \"https://maps.googleapis.com/maps/api/js?key={$key}&language={$lang}\", '', '', true );\n\t\t?>\n\n\t\t<div class=\"entry-map\">\n\t\t\t<div id=\"<?php echo esc_attr( $map_id ); ?>\" class=\"map-canvas\" data-lat=\"<?php echo esc_attr( $lat ); ?>\" data-lng=\"<?php echo esc_attr( $lng ); ?>\" data-address=\"<?php echo esc_attr( $address ); ?>\" data-zoom=\"<?php echo esc_attr( $zoom ); ?>\" data-mapmarker=\"<?php echo esc_attr( $mapmarker ); ?>\"></div>\n\t\t</div>\n\n\t\t<?php\n\t}", "function create_Map($coordsTmp,$name) {\n\t\t\n\t\t\t\t// default atts\n\t\t\t\t\t$attr = shortcode_atts(array(\t\n\t\t\t\t\t\t\t\t\t'lat' => '57.700662', \n\t\t\t\t\t\t\t\t\t'lon' => '11.972609',\n\t\t\t\t\t\t\t\t\t'id' => 'map',\n\t\t\t\t\t\t\t\t\t'z' => '14',\n\t\t\t\t\t\t\t\t\t'w' => '530',\n\t\t\t\t\t\t\t\t\t'h' => '450',\n\t\t\t\t\t\t\t\t\t'maptype' => 'ROADMAP',\n\t\t\t\t\t\t\t\t\t'marker' => $coordsTmp\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t), $attr);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$map = '\n\t\t\t\t<div id=\"map\" style=\"width:530px;height:450px;border:1px solid gray;\"></div><br>\n\t\t\t\t\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar infowindow = null;\n\t\t\t\tvar latlng=new google.maps.LatLng(57.700662,11.972609);\n\t\t\t\t\tvar latlngw = new google.maps.LatLng(' . $attr['lat'] . ', ' . $attr['lon'] . ');\n\t\t\t\t\tvar myOptions = {\n\t\t\t\t\t\tzoom: 13,\n\t\t\t\t\t\tcenter: latlng,\n\t\t\t\t\t\tmapTypeId: google.maps.MapTypeId.' . $attr['maptype'] . '\n\t\t\t\t\t};\n\t\t\t\t\tvar map = new google.maps.Map(document.getElementById(\"map\"),myOptions);';\n\t\t\n\t\t\t\t $map .=' var sites = [';\n\t\t\t\t\t\t//marker: show if address is not specified\n\t\t\t\t\t\tif ($attr['marker'] != ''){\n\t\t\t\t\t\t\t$markers = explode(\"|\",$attr['marker']);\n\t\t\t\t\t\t\tfor($i = 0;$i < count($markers);$i ++){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$markerTmp=$markers[$i];\n\t\t\t\t\t\t\t\t$marker= explode(\",\",$markerTmp);\n\t\t\t\t\t\t\t\t\tif (count($marker)>3) { \n\t\t\t\t\t\t\t\t\t$markerTmp2 .='['.$marker[0].',' .$marker[1].',\\'' . $marker[2] . '\\',\\'' . $marker[3] . '\\'],';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$markerTmp2 .='['.$marker[0].',' .$marker[1].',\\'' . $marker[2] . '\\',null],';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t \n\t\t\t\t\t $markerTmp2=substr ($markerTmp2,0,strlen ( $markerTmp2 )-1);\n\t\t\t\t\t $map .=$markerTmp2;\n\t\t\t\t\t $map .='];';\n\t\t\t\t\t $map .='';\n\t\t\t\t\t $map .=' for (var i = 0; i < sites.length; i++) {';\n\t\t\t\t\t $map .=' var site = sites[i];';\n\t\t\t\t\t $map .=' var siteLatLng = new google.maps.LatLng(site[0], site[1]);';\t\n\t\t\t\t\t $map .=' var markerimage = site[3];';\n\t\t\t\t\t \n\t\t\t\t\t $map .=' var marker = new google.maps.Marker({';\n\t\t\t\t\t $map .=' position: siteLatLng, ';\n\t\t\t\t\t $map .=' map: map,title:\"'.$addr.'\",';\n\t\t\t\t\t $map .=' icon: markerimage,';\n\t\t\t\t\t $map .=' html: \"Hello dude\" }); \n\t\t\t\t\t \n\t\t\t\t\t var infowindow = new google.maps.InfoWindow({\n\t\t\t\t\t\t\tcontent: \"Hello dude\"\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvar marker3 = new google.maps.Marker({\n\t\t\t\t\t\t\t\tposition: latlng,\n\t\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\t\ttitle:\"Uluru (Ayers Rock)\"\n\t\t\t\t\t\t});\n\n\t\t\t\t\t \n\t\t\t\t\t\t\t\tgoogle.maps.event.addListener(marker3, \"click\", function () {\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tinfowindow.open(map,marker3);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t;}\n\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t\treturn $map;\n\t\t\t\t\t}", "private function loadMapa()\n {\n \n $this->evento->id = $this->id;\n $this->evento->pegaInfo();\n \n echo \"<div class='evento-info2-title'>\".$this->evento->nome.\"</div>\";\n echo \"<div class='evento-list-introduction'>Visualize o mapa para chegar ao local do seu evento.</div>\";\n echo \"<input type='hidden' id='adress' value='\".$this->evento->logradouro.\" \".$this->evento->bairro.\", \".$this->evento->cidade.\" ,\" . $this->evento->escolherEstado() . \"' />\";\n echo \"<script type=\\\"text/javascript\\\" src=\\\"http://maps.google.com/maps/api/js?sensor=false\\\"></script>\";\n echo \"<div id=\\\"mapevento\\\"></div>\";\n \n }", "public function Bali_map()\n\t{\n\t\t$this->template = view::factory('templates/Gmap')\n\t\t\t->set('lang', url::lang())\n\t\t\t->set('website_name', Kohana::lang('website.name'))\n\t\t\t->set('website_slogan', Kohana::lang('website.slogan'))\n\t\t\t->set('webpage_title', Kohana::lang('nav.'.str_replace('_', ' ', url::current())))\n\t\t\t->set('map_options', Kohana::config('Gmap.maps.Bali'))\n\t\t\t->set('map_markers', Kohana::config('Gmap.markers.Bali'))\n\t\t\t->set('map_icon_path', url::base().skin::config('images.Gmap.path'));\n\t}", "function zthemename_register_google_map_widget() {\n\tregister_widget( 'Zthemename_Google_Map_Widget' );\n}", "function initMap() {\n\n\t\t// Instantiate the xajax object and configure it\n\t\trequire_once (t3lib_extMgm::extPath('xajax') . 'class.tx_xajax.php');\n\t\t$this->xajax = t3lib_div::makeInstance('tx_xajax'); // Make the instance\n\t\tif ($GLOBALS['TSFE']->metaCharset == 'utf-8') {\n\t\t\t$this->xajax->decodeUTF8InputOn(); // Decode form vars from utf8\n\t\t}\n\t\t$this->xajax->setCharEncoding($GLOBALS['TSFE']->metaCharset); \t\t// Encode of the response to utf-8 ???\n\t\t$this->xajax->setWrapperPrefix($this->prefixId); \t\t// To prevent conflicts, prepend the extension prefix\n\t\t$this->xajax->statusMessagesOn(); \t\t// Do you wnat messages in the status bar?\n\n\t\t// register the functions of the ajax requests\n\t\t$this->xajax->registerFunction(array('infomsg', &$this, 'ajaxGetInfomsg'));\n\t\t$this->xajax->registerFunction(array('activeRecords', &$this, 'ajaxGetActiveRecords'));\n\t\t$this->xajax->registerFunction(array('processCat', &$this, 'ajaxProcessCat'));\n\t\t$this->xajax->registerFunction(array('tab', &$this, 'ajaxGetPoiTab'));\n\t\t$this->xajax->registerFunction(array('search', &$this, 'ajaxSearch'));\n\t\t$this->xajax->registerFunction(array('processCatTree', &$this, 'ajaxProcessCatTree'));\n\t\t$this->xajax->registerFunction(array('getDynamicList', &$this, 'ajaxGetDynamicList'));\n\n\t\t$this->xajax->processRequests();\n\n\t\t// additional output using a template\n\t\t$template['total'] = $this->cObj2->getSubpart($this->templateCode,'###HEADER###');\n\t\t$markerArray = $subpartArray = array();\n\t\t$markerArray['###PATH###'] = t3lib_extMgm::siteRelpath('rggooglemap');\n\n\t\tif ($this->conf['map.']['addLanguage'] == 1) {\n\t\t\tif ($this->conf['map.']['addLanguage.']['override'] != '') {\n\t\t\t\t$markerArray['###MAP_KEY###'] .= '&hl=' . $this->conf['map.']['addLanguage.']['override'];\n\t\t\t} elseif ($GLOBALS['TSFE']->lang != '') {\n\t\t\t\t$markerArray['###MAP_KEY###'] .= '&hl=' . $GLOBALS['TSFE']->lang;\n\t\t\t}\n\t\t}\n\n\t\t$markerArray['###DYNAMIC_JS###'] = $this->getJs();\n\n\t\t// load spefic files if needed for clustering\n\t\tif ($this->conf['map.']['activateCluster'] == 1) { // gxmarkers\n\t\t\t$subpartArray['###CLUSTER_2###'] = '';\n\n\t\t} elseif ($this->conf['map.']['activateCluster'] == 2) { // markerclusterer\n\t\t\t$subpartArray['###CLUSTER_1###'] = '';\n\t\t} else { // no clustering\n\t\t\t$subpartArray['###CLUSTER_1###'] = $subpartArray['###CLUSTER_2###'] = '';\n\t\t}\n\n\t\t$totalJS = $this->cObj2->substituteMarkerArrayCached($template['total'],$markerArray, $subpartArray);\n\t\t$GLOBALS['TSFE']->additionalHeaderData['rggooglemap_xajax'] = $this->xajax->getJavascript(t3lib_extMgm::siteRelPath('xajax'));\n\t\t$GLOBALS['TSFE']->additionalHeaderData['rggooglemap_js'] = $totalJS;\n\t}", "public static function setup_adminmap($map_controller, $map_view = \"adminmap/mapview\", $map_css = \"adminmap/css/adminmap\")\t\t\n\t{\n\t\n\t\t//set the CSS for this\n\t\tif($map_css != null)\n\t\t{\n\t\t\tplugin::add_stylesheet($map_css);\n\t\t}\n\t\t\n\t\tplugin::add_javascript(\"adminmap/js/jquery.flot\");\n\t\tplugin::add_javascript(\"adminmap/js/excanvas.min\");\n\t\tplugin::add_javascript(\"adminmap/js/timeline\");\n\t\tplugin::add_javascript(\"adminmap/js/jquery.hovertip-1.0\");\n\n\t\t\n\t\t$map_controller->template->content = new View($map_view);\n\t\t\n\t\t// Get Default Color\n\t\t$map_controller->template->content->default_map_all = Kohana::config('settings.default_map_all');\n\t}", "public function run()\n {\n \\App\\GetInTouchMapSection::create([\n 'map_iframe' => '<iframe width=\"720\" height=\"450\" src=\"https://maps.google.com/maps?width=720&amp;height=450&amp;hl=en&amp;q=DreamsTech%20Model%20Town%20Pakistan%20Lahore+(My%20Business%20Name)&amp;ie=UTF8&amp;t=&amp;z=19&amp;iwloc=A&amp;output=embed\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\"><a href=\"https://www.maps.ie/map-my-route/\">Map a route</a></iframe>',\n ]);\n }", "protected function setMap( $map_file )\n {\n $handle = file_get_contents( get_template_directory_uri() . '/includes/gravityforms/' . $map_file );\n $this->map = json_decode( $handle, true );\n }", "public function CreateMap($data){\n $this->name = htmlentities(ucwords(strtolower($data->name)));\n $this->description = htmlentities($data->description);\n $this->lat = htmlentities($data->lat);\n $this->long = htmlentities($data->long);\n $this->type = htmlentities(ucwords($data->type));\n $this->email = htmlentities(strtolower($data->email));\n $this->website = filter_var(strtolower($data->website), FILTER_SANITIZE_URL);\n $this->phone_number = htmlentities(str_replace(\" \", \"\", $data->phone_number));\n\n }", "function GoogleMap($lat = 0, $long = 0, $location_title = \"course location\")\n\t{\tob_start();\n\t\techo \"<script type='text/javascript'>\n\t\t\twindow.onload=function(){\n\t\t\tgminitialize(\", $lat, \", \", $long, \", \\\"\", $this->InputSafeString($location_title), \"\\\");\n\t\t\t};\n\t\t\tdocument.getElementById('gmap').style.display='block';\n\t\t\t</script>\\n\";\n\t\treturn ob_get_clean();\n\t}", "function buildMainMap()\r\n{\r\n\r\n // Add an image first for debug and change asap\r\n //$final_map = \"\r\n//<img class=\\\"main_map\\\" src=\\\"images/heatmapapi.png\\\" />\" ;\r\n\r\n $final_map = \"\r\n<div id=\\\"map\\\"></div>\" ;\r\n\r\n return $final_map ;\r\n}", "public function initializeObject() {\r\n\t\t// Set default values.\r\n\t\t$this->mapOptions = $this->objectManager->create('Tx_AdGoogleMaps_MapBuilder_Options_MapOptions');\r\n\t\t$this->mapControl = $this->objectManager->create('Tx_AdGoogleMaps_MapBuilder_Options_MapControl');\r\n\t\t$this->layers = $this->objectManager->create('Tx_Extbase_Persistence_ObjectStorage');\r\n\t}", "public function initMap()\n\t{\n\t\t$params =array();\n\t\t$this->add_VcMap($params);\n\t}", "public function _construct()\n {\n $this->_init('signifymap/config', 'id');\n }", "public static function register_maps_api() {\n\n\t\t\tacf_update_setting( 'google_api_key', Project045_Definitions::$maps_api_key );\n\t\t\t\n\t\t}", "public function main()\n {\n $config = Div::getConfig();\n $config['id'] = 'map';\n $config['layer'] = 1;\n $config['mouse_navigation'] = true;\n $config['show_pan_zoom'] = 1;\n\n $field = Div::getTableConfig($this->P['table']);\n\n $this->connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);\n $connection = $this->connectionPool->getConnectionForTable($this->P['table']);\n\n switch ($this->P['table']) {\n case 'tt_content':\n $res = $connection->executeQuery(\n 'SELECT ' .\n 'ExtractValue(pi_flexform,\\'/T3FlexForms[1]/data[1]/sheet[@index=\"sDEF\"]/language[@index=\"lDEF\"]/field[@index=\"' . $field['lon'] . '\"]/value[@index=\"vDEF\"]\\') AS lon, ' .\n 'ExtractValue(pi_flexform,\\'/T3FlexForms[1]/data[1]/sheet[@index=\"sDEF\"]/language[@index=\"lDEF\"]/field[@index=\"' . $field['lat'] . '\"]/value[@index=\"vDEF\"]\\') AS lat ' .\n 'FROM ' . $this->P['table'] . ' ' .\n 'WHERE uid = ' . intval($this->P['uid'])\n );\n $row = $res->fetch(FetchMode::ASSOCIATIVE);\n $js = 'function setBEcoordinates(lon,lat) {\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'lon') . '\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'lat', array($field['lon'] => $field['lat'])) . '\n\t\t\t\t\tclose();\n\t\t\t\t}';\n break;\n case 'tx_odsosm_vector':\n $res = $connection->executeQuery(\n 'SELECT ' .\n '(max_lon+min_lon)/2 AS lon, ' .\n '(max_lat+min_lat)/2 AS lat ' .\n 'FROM ' . $this->P['table'] . ' ' .\n 'WHERE uid = ' . intval($this->P['uid'])\n );\n $row = $res->fetch(FetchMode::ASSOCIATIVE);\n $js = 'function setBEfield(data) {\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'data') . '\n\t\t\t\t\tclose();\n\t\t\t\t}';\n break;\n default:\n $res = $connection->select(\n [\n $field['lon'] . ' AS lon',\n $field['lat'] . ' AS lat'\n ],\n $this->P['table'],\n ['uid' => intval($this->P['uid'])]\n );\n $row = $res->fetch(FetchMode::ASSOCIATIVE);\n $js = 'function setBEcoordinates(lon,lat) {\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'lon') . '\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'lat', array($field['lon'] => $field['lat'])) . '\n\t\t\t\t\tclose();\n\t\t\t\t}';\n break;\n }\n\n $row['zoom'] = 15;\n\n if (floatval($row['lon']) == 0) {\n $row['lon'] = $config['default_lon'];\n $row['lat'] = $config['default_lat'];\n $row['zoom'] = $config['default_zoom'];\n }\n\n // Library\n $library = GeneralUtility::makeInstance(Openlayers::class);\n $library->init($config);\n $library->doc = $this->doc;\n $library->P = $this->P;\n\n // Layer\n $connection = $this->connectionPool->getConnectionForTable('tx_odsosm_layer');\n $layers = $connection->executeQuery('SELECT * FROM tx_odsosm_layer WHERE uid IN (' . $config['layer'] . ')');\n\n $this->doc->JScode .= '\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t' . $library->getMapBE($layers, $this->P['params']['mode'], $row['lat'], $row['lon'], $row['zoom'], $this->doc) . '\n\t\t\t\t' . $js . '\n\t\t\t</script>\n\t\t';\n\n $this->content .= '<div style=\"position:absolute;width:100%;height:100%;\" id=\"map\"></div><script type=\"text/javascript\">map();</script>';\n }", "function philosophy_google_map($attributes){\n $default = array(\n 'place'=>'Dhaka Museum',\n 'width'=>'800',\n 'height'=>'500',\n 'zoom'=>'14'\n );\n $params = shortcode_atts($default,$attributes);\n $map = <<<EOD\n<div>\n <div>\n <iframe width=\"{$params['width']}\" height=\"{$params['height']}\"\n src=\"https://maps.google.com/maps?q={$params['place']}&t=&z={$params['zoom']}&ie=UTF8&iwloc=&output=embed\"\n frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\">\n </iframe>\n </div>\n</div>\nEOD;\n return $map;\n}", "public function googleMapsShortcode($atts)\n {\n $atts = shortcode_atts(array(\n 'lat' => null,\n 'lng' => null,\n 'adres' => null,\n 'postcode' => null,\n 'canvas' => 'mapsHeader_canvas',\n 'label' => 'onze locatie',\n 'zoom' => '15',\n 'scrollwheel' => 'false',\n 'disableDefaultUI' => 'true',\n ), $atts);\n\n $script = '<script type=\"text/javascript\">';\n\n // enque the script\n wp_enqueue_script('maps-key', '//maps.googleapis.com/maps/api/js?key=' . MAPS_API_KEY . '&amp;sensor=false', array(), '1.0.0', true);\n\n if ($atts['lat'] != null && $atts['lng'] != null) {\n // use the given lat and long to render the map\n $script .= \"jQuery(document).ready(function($) {\n var gMaps = new GoogleMaps();\n\n gMaps.renderMap('\" . $atts['canvas'] . \"', '\" .\n $atts['lat'] . \"', '\" .\n $atts['lng'] . \"', '\" .\n $atts['label'] . \"', '\" .\n $atts['disableDefaultUI'] . \"', '\" .\n $atts['scrollwheel'] . \"', '\" .\n $atts['zoom'] . \"' );\n });\";\n } else if ($atts['adres'] != null && $atts['postcode'] != null) {\n $script .= \"jQuery(document).ready(function($) {\n var gMaps = new GoogleMaps();\n gMaps.geocode('\" . str_replace(' ', '+', get_option('adres')) . \"', '\" . str_replace(' ', '', get_option('adres')) . \"', '\" . $atts['canvas'] . \"' , '\" . $atts['label'] . \"' , true);\n });\";\n } else {\n // check if lat/lon ar filled in\n if (!get_option('latitude') || !get_option('longitude')) {\n $url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . str_replace(' ', '+', get_option('adres')) . '+' . str_replace(' ', '+', get_option('postcode')) . '&key=' . MAPS_API_KEY;\n $geocode = file_get_contents($url);\n\n $output = json_decode($geocode);\n\n $lat = $output->results[0]->geometry->location->lat;\n $lng = $output->results[0]->geometry->location->lng;\n update_option('latitude', $lat);\n update_option('longitude', $lng);\n\n //use the lat/lon form the information page\n $script .= \"jQuery(document).ready(function($) {\n var gMaps = new GoogleMaps();\n gMaps.geocode('\" . str_replace(' ', '+', get_option('adres')) . \"', '\" . str_replace(' ', '', get_option('postcode')) . \"', '\" . $atts['canvas'] . \"' , '\" . $atts['label'] . \"' , true);\n });\";\n } else {\n // use the given lat and long to render the map\n $script .= \"jQuery(document).ready(function($) {\n var gMaps = new GoogleMaps();\n gMaps.renderMap('\" .\n $atts['canvas'] . \"', '\" .\n get_option('latitude') . \"', '\" .\n get_option('longitude') . \"', '\" .\n $atts['label'] . \"', '\" .\n $atts['disableDefaultUI'] . \"', '\" .\n $atts['scrollwheel'] . \"', '\" .\n $atts['zoom'] . \"' );\n });\";\n }\n }\n\n $script .= \"</script>\";\n return '<div id=\"mapsHeader_canvas\">Vul de correcte adres gegevens in...</div>' . $script;\n }", "function generate_map_file(){\n\t\t$map = ms_newMapObj($this->default_map_file);\n\t\t$n_layers = count($this->viewable_layers);\n\t\t// go through and create new \n\t\t// layer objects for those layers\n\t\t// that have their display property set\n\t\t// to true, adding them to the\n\t\t// map object\n\t\tfor($i = 0; $i < $n_layers; $i++){\n\t\t\tif($this->viewable_layers[$i]->display == \"true\"){\n\t\t\t\t$layer = ms_newLayerObj($map);\n\t\t\t\t$layer->set(\"name\", $this->viewable_layers[$i]->layer_name);\n\t\t\t\t$layer->set(\"status\", MS_OFF);\n\t\t\t\t$layer->set(\"template\", \"nepas.html\");\n\t\t\t\t$this->set_ms_layer_type($layer, $this->viewable_layers[$i]);\n\t\t\t\t$layer->set(\"connectiontype\", MS_POSTGIS);\n\t\t\t\t$layer->set(\"connection\", $this->dbconn->mapserver_conn_str);\n\t\t\t\t$this->set_ms_data_string($layer, $this->viewable_layers[$i]);\n\t\t\t\t$layer->setProjection($this->viewable_layers[$i]->layer_proj);\n\t\t\t\t// added to allow getfeatureinfo requests on\n\t\t\t\t// this layer via WMS\n\t\t\t\t$layer->setMetaData(\"WMS_INCLUDE_ITEMS\", \"all\");\n\t\t\t\t// generate a CLASSITEM directive \n\t\t\t\tif($this->viewable_layers[$i]->layer_ms_classitem != \"\")\n\t\t\t\t\t$layer->set(\"classitem\", $this->viewable_layers[$i]->layer_ms_classitem);\n\n\t\t\t\t// generate classes that this\n\t\t\t\t// layer contains\n\t\t\t\t$n_classes = count($this->viewable_layers[$i]->layer_classes);\n\t\t\t\tfor($j = 0; $j < $n_classes; $j++){\n\t\t\t\t\t$ms_class_obj = ms_newClassObj($layer);\n\t\t\t\t\t$ms_class_obj->set(\"name\", $this->viewable_layers[$i]->layer_classes[$j]->name);\n\t\t\t\t\t$ms_class_obj->setExpression($this->viewable_layers[$i]->layer_classes[$j]->expression);\n\t\t\t\t\tforeach($this->viewable_layers[$i]->layer_classes[$j]->styles as $style){\n\t\t\t\t\t\t$ms_style_obj = ms_newStyleObj($ms_class_obj);\n\t\t\t\t\t\t$ms_style_obj->color->setRGB($style->color_r,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->color_g,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->color_b);\n\t\t\t\t\t\t// set bg color\n\t\t\t\t\t\t$ms_style_obj->backgroundcolor->setRGB($style->bgcolor_r,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->bgcolor_g,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->bgcolor_b);\n\t\t\t\t\t\t// set outline color\n\t\t\t\t\t\t$ms_style_obj->outlinecolor->setRGB($style->outlinecolor_r,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->outlinecolor_g,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->outlinecolor_b);\n\t\t\t\t\t\tif($style->symbol_name != \"\"){\n\t\t\t\t\t\t\t$ms_style_obj->set(\"symbolname\", $style->symbol_name);\n\t\t\t\t\t\t\t// check for valid size\n\t\t\t\t\t\t\tif($style->symbol_size != \"\")\n\t\t\t\t\t\t\t\t$ms_style_obj->set(\"size\", $style->symbol_size);\n\t\t\t\t\t\t\t// check for valid angle\n\t\t\t\t\t\t\tif($style->angle != \"\")\n\t\t\t\t\t\t\t\t$ms_style_obj->set(\"angle\", $style->angle);\n\t\t\t\t\t\t\t// check for valid width\n\t\t\t\t\t\t\tif($style->width != \"\")\n\t\t\t\t\t\t\t\t$ms_style_obj->set(\"width\", $style->width);\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}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($map->save($this->output_mapfile) == MS_FAILURE){\n\t\t\techo \"mapfile could not be saved\";\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\treturn $this->output_mapfile;\t\n\t}", "public function getMapHelper()\n {\n return new MapHelper();\n }", "public function getGoogleMapJS()\n\t{\n\t\tif(!isset($oGoogleMapService))\n\t\t\t$oGoogleMapService = Phpfox::getService('gmap.googlemap');\n\t\n\t\treturn $oGoogleMapService->getGoogleMap();\n\t}", "private function _setWebConfig()\n {\n $this->map_obj->set(\"name\", \"simplemappr\");\n $this->map_obj->setFontSet($this->font_file);\n $this->map_obj->web->set(\"template\", \"template.html\");\n $this->map_obj->web->set(\"imagepath\", $this->tmp_path);\n $this->map_obj->web->set(\"imageurl\", $this->tmp_url);\n }", "function church_admin_google_map_api()\n {\n \t\n \t//fix issue caused by some \"premium\" themes, which call google maps w/o key on every admin page. D'uh!\n \twp_dequeue_script('avia-google-maps-api');\n \t\n //now enqueue google map api with the key\n $src = 'https://maps.googleapis.com/maps/api/js';\n $key='?key='.get_option('church_admin_google_api_key');\n wp_enqueue_script( 'Google Map Script',$src.$key, array() ,FALSE, TRUE);\n \n \n }", "function et_extra_enqueue_google_maps_api() {\n\n\t$google_api_option = get_option( 'et_google_api_settings' );\n\n\t// If for some reason the setting doesn't exist, then we probably shouldn't load the API\n\tif ( ! isset( $google_api_option['enqueue_google_maps_script'] ) ) {\n\t\treturn false;\n\t}\n\n\t// If the setting has been disabled, then we shouldn't load the API\n\tif ( 'false' === $google_api_option['enqueue_google_maps_script'] ) {\n\t\treturn false;\n\t}\n\n\t// If we've gotten this far, let's build the URL and load that API!\n\n\t// Google Maps API address\n\t$gmap_url_base = 'https://maps.googleapis.com/maps/api/js';\n\n\t// If we're not using SSL, switch to the HTTP address for the Google Maps API\n\t// TODO: Is this actually necessary? Security notices don't trigger in this direction\n\tif ( ! is_ssl() ) {\n\t\t$gmap_url_base = 'http://maps.googleapis.com/maps/api/js';\n\t}\n\n\t// Grab the value of `et_google_api_settings['api_key']` and append it to the API's address\n\t$gmap_url_full = esc_url( add_query_arg( array(\n\t\t'key' => et_pb_get_google_api_key(),\n\t\t'callback' => 'initMap'\n\t), $gmap_url_base ) );\n\n\twp_enqueue_script( 'google-maps-api', $gmap_url_full, array(), '3', true );\n\n}", "function oneclick_shortcode_easy_google_map()\r\r\n{\r\r\n $options_geolocation = get_option('oneclick_geolocation');\r\r\n $gmap_iconizer_zoom_level = $options_geolocation['gmap_iconizer_zoom_level'];\r\r\n $gmap_iconizer_latitude = $options_geolocation['gmap_iconizer_latitude'];\r\r\n $gmap_iconizer_longitude = $options_geolocation['gmap_iconizer_longitude'];\r\r\n $map_id = generateRandomString();\r\r\n $options_iconizer = get_option('oneclick');\r\r\n $gmap_iconizer_apikey = $options_iconizer['gmap_iconizer_apikey'];\r\r\n $gmap_iconizer_zoomcontrol = $options_iconizer['gmap_iconizer_zoomcontrol'];\r\r\n $gmap_iconizer_zoomcontrolSize = $options_iconizer['gmap_iconizer_zoomcontrolSize'];\r\r\n $gmap_iconizer_zoomcontrolPosition = $options_iconizer['gmap_iconizer_zoomcontrolPosition'];\r\r\n $gmap_iconizer_maptype = $options_iconizer['gmap_iconizer_maptype'];\r\r\n\t$gmap_iconizer_type = $options_iconizer['gmap_iconizer_type'];\r\r\n $gmap_iconizer_maptypecontrol_style = $options_iconizer['gmap_iconizer_maptypecontrol_style'];\r\r\n $gmap_iconizer_maptype_position = $options_iconizer['gmap_iconizer_maptype_position'];\r\r\n $gmap_iconizer_pancontrol = $options_iconizer['gmap_iconizer_pancontrol'];\r\r\n $gmap_iconizer_pan_position = $options_iconizer['gmap_iconizer_pan_position'];\r\r\n $gmap_iconizer_streetviewcontrol = $options_iconizer['gmap_iconizer_streetviewcontrol'];\r\r\n $gmap_iconizer_streetviewcontrol_position = $options_iconizer['gmap_iconizer_streetviewcontrol_position'];\r\r\n $options_frontend_admin = get_option('oneclick_frontend');\r\r\n $gmap_iconizer_upload_icon = $options_frontend_admin['gmap_iconizer_upload_icon'];\r\r\n $gmap_iconizer_mapwidth = $options_frontend_admin['gmap_iconizer_mapwidth'];\r\r\n $gmap_iconizer_maphue = $options_frontend_admin['gmap_iconizer_maphue'];\r\r\n $gmap_iconizer_mapsaturation = $options_frontend_admin['gmap_iconizer_mapsaturation'];\r\r\n $gmap_iconizer_mapheight = $options_frontend_admin['gmap_iconizer_mapheight'];\r\r\n $gmap_iconizer_mapstyle = $options_frontend_admin['gmap_iconizer_mapstyle'];\r\r\n $gmap_iconizer_mapcontainerstyle = $options_frontend_admin['gmap_iconizer_mapcontainerstyle'];\r\r\n ob_start();\r\r\n ?>\r\r\n <?php\r\r\n require ('includes/oneclick_google_map_frontend.php');\r\r\n ?>\r\r\n <?php\r\r\n return ob_get_clean();\r\r\n}", "function gmap_shortcode( $atts ) {\n // Attributes\n extract( shortcode_atts(\n array(\n 'localisation' => 'lyra',\n ), $atts )\n );\n $args = array(\n 'id' => \"sc-lyra\",\n 'lattitude' => \"43.5414097\",\n 'longitude' => \"1.5165507000000389\",\n 'zoom' => 16,\n 'address' => addslashes('109 rue de l\\'innovation, Labége'),\n 'map_text' => addslashes('Lyra Network'),\n );\n $jsMap = gmap_obj($args);\n return $jsMap.'<div id=\"sc-lyra\" class=\"gmap\"></div>';\n}", "public static function ExistingGoogleMap($arguments, $address = null, $parser = null, $shortcode) {\n $iframeUrl = sprintf(\n \"https://mapsengine.google.com/map/embed?mid=%s\",\n urlencode($address)\n );\n $width = (isset($arguments['width']) && $arguments['width']) ? $arguments['width'] : \"100%\";\n $height = (isset($arguments['height']) && $arguments['height']) ? $arguments['height'] : \"100%\";\n return sprintf(\n '<iframe class=\"embedded-maps\" width=\"%s\" height=\"%s\" src=\"%s\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\"></iframe>',\n $width,\n $height,\n $iframeUrl\n );\n }", "function load_google_maps() {\n\t?>\n\n <script sync\n src=\"https://maps.googleapis.com/maps/api/js?key=<?php $options = get_option( 'dhl_parcel_options' );echo esc_html($options['gmac_google_map_api_key']) ?>\">\n </script>\n\n <?php\n}", "static function the_multimarker_map( $map_id = 'map-canvas', $zoom = 13 ) {\n\t\t// variables.\n\t\t$key = get_field( 'google_maps_key', 'option' );\n\t\t$maps = get_field( 'map-repeater' ); // Notice field ID MUST BE map-repeater.\n\t\t$mapmarker = get_field( 'map-marker', 'option' ) ? get_field( 'map-marker', 'option' ) : '';\n\t\t$lang = is_rtl() ? 'iw' : '';\n\n\t\t// enqueue.\n\t\twp_enqueue_script( 'googlemaps', \"https://maps.googleapis.com/maps/api/js?key={$key}&language={$lang}\", '', '', true );\n\t\t?>\n\n\t\t<script type=\"text/javascript\">\n\t\t\tvar maps = <?php echo wp_json_encode( $maps ); ?>\n\t\t</script>\n\n\t\t<div class=\"entry-map\">\n\t\t\t<div id=\"<?php echo esc_attr( $map_id ); ?>\" class=\"map-canvas\" data-zoom=\"<?php echo esc_attr( $zoom ); ?>\" data-mapmarker=\"<?php echo esc_attr( $mapmarker ); ?>\"></div>\n\t\t</div>\n\n\t\t<?php\n\t}", "public function googlemap($fullsize) {\n\n // If the user can't view maps, throw a 404 error.\n if ((module::get_var(\"tagsmap\", \"restrict_maps\") == true) && (identity::active_user()->guest)) {\n throw new Kohana_404_Exception();\n }\n\n // Generate a list of GPS coordinates.\n $tagsGPS = ORM::factory(\"tags_gps\")->find_all();\n\n // Set up and display the actual page.\n // If fullsize is true, allow the map to take up the entire browser window,\n // if not, then display the map in the gallery theme.\n if ($fullsize == true) {\n $view = new View(\"tagsmap_googlemap.html\");\n $view->map_fullsize = true;\n\n // Load in module preferences.\n $view->tags_gps = $tagsGPS;\n $view->google_map_key = module::get_var(\"tagsmap\", \"googlemap_api_key\");\n $view->google_map_latitude = module::get_var(\"tagsmap\", \"googlemap_latitude\");\n $view->google_map_longitude = module::get_var(\"tagsmap\", \"googlemap_longitude\");\n $view->google_map_zoom = module::get_var(\"tagsmap\", \"googlemap_zoom\");\n $view->google_map_type = module::get_var(\"tagsmap\", \"googlemap_type\");\n\n print $view;\n } else {\n // Set up breadcrumbs.\n $breadcrumbs = array();\n $root = item::root();\n $breadcrumbs[] = Breadcrumb::instance($root->title, $root->url())->set_first();\n $breadcrumbs[] = Breadcrumb::instance(t(\"Tag Map\"), url::site(\"tagsmap/googlemap/\"))->set_last();\n\n $template = new Theme_View(\"page.html\", \"other\", \"tag\");\n $template->page_title = t(\"Gallery :: Map\");\n $template->set_global(array(\"breadcrumbs\" => $breadcrumbs));\n $template->content = new View(\"tagsmap_googlemap.html\");\n\n // Load in module preferences.\n $template->content->tags_gps = $tagsGPS;\n $template->content->google_map_key = module::get_var(\"tagsmap\", \"googlemap_api_key\");\n $template->content->google_map_latitude = module::get_var(\"tagsmap\", \"googlemap_latitude\");\n $template->content->google_map_longitude = module::get_var(\"tagsmap\", \"googlemap_longitude\");\n $template->content->google_map_zoom = module::get_var(\"tagsmap\", \"googlemap_zoom\");\n $template->content->google_map_type = module::get_var(\"tagsmap\", \"googlemap_type\");\n\n print $template;\n }\n }", "private function showStaticMap()\n {\n if ($this->location !== '') {\n $mapurl = \"https://maps.googleapis.com/maps/api/staticmap\";\n $mapurl .= \"?center=\" . $this->location->lat . \",\" . $this->location->lng;\n $mapurl .= \"&size=450x400\"; // image size\n $mapurl .= \"&zoom=15\"; // zoom to town level\n // put marker center of the location\n $mapurl .= \"&markers=|\" . $this->location->lat . \",\" . $this->location->lng; \n $mapurl .= \"&key=\" . $GLOBALS['apikey_googlemap'];\n return \"<img src=\" . $mapurl . \" >\";\n } else {\n return \"\";\n }\n }", "function getJs () {\n // some settings for controlling\n\n\t\t// map type\n\t\t$markerArray['###MAP_TYPE_MAPNIK###'] = $markerArray['###MAP_TYPE_TAH###'] = 0;\n\t\tif ($this->config['mapType'] != '') {\n\t\t\t// mapnik typoe\n\t\t\tif (strpos($this->config['mapType'], 'MAPNIK') !== FALSE) {\n\t\t\t\t$this->config['mapType'] = t3lib_div::rmFromList('MAPNIK', $this->config['mapType']);\n\t\t\t\t$markerArray['###MAP_TYPE_MAPNIK###'] = 1;\n\t\t\t\t$markerArray['###MAP_TYPE_MAPNIK_TITLE###'] = $this->conf['map.']['mapnik_title'];\n\t\t\t}\n\t\t\t// tiles@home typoe\n\t\t\tif (strpos($this->config['mapType'], 'TAH') !== FALSE) {\n\t\t\t\t$this->config['mapType'] = t3lib_div::rmFromList('TAH', $this->config['mapType']);\n\t\t\t\t$markerArray['###MAP_TYPE_TAH###'] = 1;\n\t\t\t\t$markerArray['###MAP_TYPE_TAH_TITLE###'] = $this->conf['map.']['tah_title'];\n\t\t\t}\n\n\t\t\t// check again because could be that mapnik / TAH are the only one selected\n\t\t\tif ($this->config['mapType'] == '') {\n\t\t\t\t$this->config['mapType'] = 'G_NORMAL_MAP';\n\t\t\t}\n\n\t\t\t$markerArray['###MAP_TYPES###'] = ',{mapTypes:[' . $this->config['mapType'] . ']}';\n\n\t\t}\n\n\t\tswitch ($this->config['mapNavControl']) {\n\t\t\tcase 'small':\n\t\t\tcase 1:\n\t\t\t\t$settings = 'map.addControl(new GSmallMapControl());';\n\t\t\t\tbreak;\n\t\t\tcase 'large':\n\t\t\tcase 2:\n\t\t\t\t$settings = 'map.addControl(new GLargeMapControl());';\n\t\t\t\tbreak;\n\t\t}\n\t\tif ($this->config['mapTypeControl'] == 'show' || $this->config['mapTypeControl'] == '1') {\n\t\t\t$settings .= 'map.addControl(new GMapTypeControl());';\n\t\t}\n\t\tif ($this->config['mapOverview'] == 1) {\n\t\t\t$settings .= 'map.addControl(new GOverviewMapControl());';\n\t\t}\n\n\t\tif ($this->config['mapControlOnMouseOver'] == 1) {\n\t\t\t$hideControlsOnMouseOut = 'map.hideControls();\n\t\t\t\tGEvent.addListener(map, \"mouseover\", function(){\n\t\t\t\tmap.showControls();\n\t\t\t\t});\n\t\t\t\tGEvent.addListener(map, \"mouseout\", function(){\n\t\t\t\tmap.hideControls();\n\t\t\t\t});';\n\t\t}\n\t\tif ($this->conf['enableDoubleClickZoom'] == 1) {\n\t\t\t$settings .= 'map.enableDoubleClickZoom();';\n\t\t}\n\t\tif ($this->conf['enableContinuousZoom'] == 1) {\n\t\t\t$settings .= 'map.enableContinuousZoom();';\n\t\t}\n\t\tif ($this->conf['enableScrollWheelZoom'] == 1) {\n\t\t\t$settings .= 'map.enableScrollWheelZoom();';\n\t\t}\n\n\t\t// urls\n\t\t$xmlUrlConf = $this->conf['xmlURL.'];\n\n\t\t\t// disable realurl for the xml url\n\t\t$realurlTmp = $GLOBALS['TSFE']->config['config']['tx_realurl_enable'];\n\t\t$GLOBALS['TSFE']->config['config']['tx_realurl_enable'] = 0;\n\t\t$url = $this->cObj2->typolink('', $xmlUrlConf);\n\t\t$GLOBALS['TSFE']->config['config']['tx_realurl_enable'] = $realurlTmp;\n\n\n\n\t\t$urlForIcons = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'uploads/tx_rggooglemap/';\n\t\t$urlExt = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . t3lib_extMgm::siteRelpath('rggooglemap');\n\n\t\t// records for the selected categories\n\t\tif ($this->config['categoriesActive'] != '') {\n\t\t\t$selectedCat = 'var cat = new Array();\n\t\t\tcat[\"cb\"] = new Object();';\n\t\t\t$cats = t3lib_div::trimExplode(',', $this->config['categoriesActive']);\n\t\t\tforeach ($cats as $key => $value) {\n\t\t\t\t$selectedCat .= 'cat[\"cb\"]['.$value.'] = ' . $value . ';';\n\t\t\t}\n\t\t\t$selectedCat .= ' tx_rggooglemap_pi1processCat(cat);';\n\t\t} else {\n\t\t\t$selectedCat = ' tx_rggooglemap_pi1processCat(\"default\");';\n\t\t}\n\n\t\t// use cluster, default = 0\n\t\tswitch ($this->conf['map.']['activateCluster']) {\n\t\t\tcase 1:\n\t\t\t\t$addMarker = 'clusterer.AddMarker(marker,title);';\n\t\t\t\t$markerArray['###MAP_CLUSTER###'] = 1;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$addMarker = 'map.addOverlay( marker );';\n\t\t\t\t$markerArray['###MAP_CLUSTER###'] = 2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$addMarker = 'map.addOverlay( marker );';\n\t\t\t\t$markerArray['###MAP_CLUSTER###'] = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$markerArray['###HIDECONTROLSMOUSEOUT###'] = $hideControlsOnMouseOut;\n\t\t$markerArray['###POI_ON_START###'] = $this->getPoiOnStart();\n\t\t$markerArray['###SETTINGS###'] = $settings;\n\t\t$markerArray['###MAP_ZOOM###'] = $this->config['mapZoom'];\n\t\t$markerArray['###MAP_LNG###'] = $this->config['mapLng'];\n\t\t$markerArray['###MAP_LAT###'] = $this->config['mapLat'];\n\t\t$markerArray['###MAP_DIV###'] = $this->config['mapDiv'];\n\t\t$markerArray['###SELECTED_CAT###'] = $selectedCat;\n\t\t$markerArray['###ADD_MARKER###'] = $addMarker;\n\t\t$markerArray['###URL_ICONS###'] = $urlForIcons;\n\t\t$markerArray['###URL###'] = $url;\n\t\t$markerArray['###BOUNDS###'] = intval($this->config['useBoundsOnStart']);\n\t\t$markerArray['###DEBUG###'] = ($this->conf['map.']['debug']==1) ? '' : '//';\n\n\t\t// get coordinates from user's browser\n\t\t$markerArray['###USE_USER_LOCATION###'] = intval($this->conf['map.']['useUserLocationForMapCenter']) == 1 ? 1 : 0;\n\t\t$markerArray['###USE_USER_LOCATION_ZOOMLEVEL###'] = intval($this->conf['map.']['useUserLocationForMapCenter.']['zoomLevel']) == 0 ? 0 : intval($this->conf['map.']['useUserLocationForMapCenter.']['zoomLevel']);\n\n\t\t// create the gicons JS, needed for valid sizes, don't trust JS on that...\n\t\t$gicon = '';\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,image', 'tx_rggooglemap_cat', 'hidden=0 AND deleted=0');\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\n\t\t\t// set the correct paths if no icon is found\n\t\t\tif ($row['image'] == '') {\n\t\t\t\t$iconPath = $this->conf['map.']['defaultIcon'];\n\t\t\t\t$iconPathJS\t= t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $this->conf['map.']['defaultIcon'];\n\t\t\t} else {\n\t\t\t\t$iconPath = 'uploads/tx_rggooglemap/' . $row['image'];\n\t\t\t\t$iconPathJS\t= $urlForIcons.$row['image'];\n\t\t\t}\n\n\t\t\t$iconSize = @getimagesize($iconPath);\n\n\t\t\t// If icon size can't be get with php, use settings from TS\n\t\t\tif (!is_array($iconSize)) {\n\t\t\t\t$iconSizeConf = $this->conf['map.']['iconSize.'];\n\n\t\t\t\t$current = $row['uid'] . '.';\n\t\t\t\t$width = (intval($iconSizeConf[$current]['width']) > 0) ? intval($iconSizeConf[$current]['width']) : intval($iconSizeConf['default.']['width']);\n\t\t\t\t$height = (intval($iconSizeConf[$current]['height']) > 0) ? intval($iconSizeConf[$current]['height']) : intval($iconSizeConf['default.']['height']);\n\t\t\t} else {\n\t\t\t\t$width = $iconSize[0];\n\t\t\t\t$height = $iconSize[1];\n\t\t\t}\n\n\t\t\t$key = 'gicons[' . $row['uid'] . ']';\n\t\t\t$gicon .= $key . '= new GIcon(baseIcon);' . chr(10);\n\t\t\t$gicon .= $key . '.image = \"'.$iconPathJS.'\";' . chr(10);\n\t\t\t$gicon .= $key . '.iconSize = new GSize('.$width.', '.$height.');' . chr(10);\n\t\t\t$gicon .= $key . '.iconAnchor = new GPoint(' . ($width / 2) . ', ' . ($height / 2) . ');' . chr(10);\n\t\t\t$gicon .= $key . '.infoWindowAnchor = new GPoint(' . ($width / 2) . ', ' . ($height / 2) . ');' . chr(10) . chr(10);\n\t\t}\n\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res);\n\n\t\t$markerArray['###GICONS###'] = $gicon;\n\n\t\tif ($this->conf['map.']['activateCluster'] == 3) {\n\t\t\t$icon = str_replace('###CURRENT_URL###', t3lib_div::getIndpEnv('TYPO3_SITE_URL'), $this->conf['map.']['activateCluster.']['3.']['icon']);\n\t\t\t$markerArray['###GICONS###'].= $icon;\n\t\t}\n\n\t\t\t// Hook for adding client-processing code for the additional datasets which were generated within method getJs()\n\t\t$markerArray['###PROCESS_DATASETS###'] = '';\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rggooglemap']['datasetHook'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rggooglemap']['datasetHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t\t// Test if method exists as it might make sense not creating it for each corresponding hook entry\n\t\t\t\tif (method_exists($_procObj, 'getDatasetJSProcessing')) {\n\t\t\t\t\t$markerArray['###PROCESS_DATASETS###'] .= $_procObj->getDatasetJSProcessing($this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// Hook for processing of extra javascript\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rggooglemap']['extraGetJsHook'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rggooglemap']['extraGetJsHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$markerArray = $_procObj->extraGetJsProcessor($markerArray, $this);\n\t\t\t}\n\t\t}\n\n\t\t$jsTemplateCode = $this->cObj2->fileResource($this->conf['templateFileJS']);\n\t\t$template['all'] = $this->cObj2->getSubpart($jsTemplateCode, '###ALL###');\n\n\t\t$js = $this->cObj2->substituteMarkerArrayCached($template['all'], $markerArray);\n\n\t\treturn $js;\n\t}", "public function init()\n\t{\n\t\tparent::init();\n\n\t\tif(empty($this->id)) $this->id=\"map-canvas\";\n\n\t\tif(empty($this->container)) $this->container=\"div\";\n\n\t\tif(empty($this->markerIcon)) $this->markerIcon=\"\";\n\n\t\tif(empty($this->fitBound)) $this->fitBound=FALSE;\n\n\t\tif(empty($this->isCluster)) $this->isCluster=FALSE;\n\n\t\tif(!empty($this->style))\n\t\t{\n\t\t\tif(!is_array($this->style))\n\t\t\t{\n\t\t\t\t$this->inline_style=\" style=\\\"\".$this->style.\"\\\"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->inline_style=\" style=\\\"\";\n\t\t\t\tforeach($this->style as $attribute=>$value)\n\t\t\t\t{\n\t\t\t\t\t$this->line_style .= $attribute.':'.$value.\";\";\n\t\t\t\t}\n\t\t\t\t$this->inline_style.=\"\\\"\";\n\t\t\t}\n\n\t\t}\n\n\t\tif(!empty($this->address))\n\t\t{\n\t\t\tif(!is_array($this->address))\n\t\t\t{\n\t\t\t\t$address=$this->getGeo($this->address);\n\t\t\t\tif($address!=FALSE) array_push($this->markers, $address);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach($this->address as $adr)\n\t\t\t\t{\n\t\t\t\t\t$address=$this->getGeo($adr);\n\t\t\t\t\tif($address!=FALSE) array_push($this->markers, $address);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "function kulam_acf_init_google_maps_api() {\n\n\t$google_maps_api = get_field( 'acf-option_google_maps_api', 'option' );\n\n\tif ( $google_maps_api ) {\n\t\tacf_update_setting( 'google_api_key', $google_maps_api );\n\t}\n\n}", "function tevolution_googlemap_script(){\t\r\n\tglobal $post,$pagenow;\r\n\tif(is_ssl()){ $http = \"https://\"; }else{ $http =\"http://\"; }\r\n\t\r\n\t/* call google map js on admin only where we need it */\r\n\twp_enqueue_script('jquery-ui-tabs');\r\n\twp_enqueue_style('jquery-ui-css');\r\n\t\r\n\t?>\r\n\t<script>\r\n\t\tvar closeimg = '<?php echo apply_filters('tmpl_infobubble_close_btn','https://maps.gstatic.com/intl/en_us/mapfiles/close.gif');?>';\r\n\t\t/* image for clustering. used this variable at js for clustering image */\r\n\t\tvar styles = [{\r\n\t\t\turl: '<?php echo TEMPL_PLUGIN_URL; ?>images/cluster.png',\r\n\t\t\theight: 50,\r\n\t\t\twidth: 50,\r\n\t\t\tanchor: [-18, 0],\r\n\t\t\ttextColor: '#000',\r\n\t\t\ttextSize: 10,\r\n\t\t\ticonAnchor: [15, 48]}];\r\n\t</script>\r\n\t<?php\r\n\t\r\n\t/* language code */\r\n\t$lang = '';\r\n\t\r\n\t/* google api key */\r\n\t$key = '';\r\n\t\r\n\t/* Translate google map by language set by WPML\r\n\t* set language parameter when wpml is activated and append to google map script as query string\r\n\t* Variables : $lang ,value: current language constatne set by WPML\r\n\t*/\r\n\tif(is_plugin_active('sitepress-multilingual-cms/sitepress.php') && defined('ICL_LANGUAGE_CODE'))\r\n\t\t$lang = '&amp;language='.ICL_LANGUAGE_CODE;\r\n\t\r\n\t$templatic_settings = get_option('templatic_settings');\t\r\n\t\r\n\tif((!strstr($_SERVER['REQUEST_URI'],'wp-admin') || ( defined('DOING_AJAX') && DOING_AJAX )) && !is_author()){\r\n\t\t\r\n\t\t\t/* get API key for map added in map settings */\r\n\t\t\tif($templatic_settings['tmpl_api_key']!='')\r\n\t\t\t{\r\n\t\t\t\t$key='&amp;key='.$templatic_settings['tmpl_api_key'];\r\n\t\t\t}\r\n\t\twp_enqueue_script( 'google-maps-apiscript', $http.'maps.googleapis.com/maps/api/js?v=3.exp&libraries=places'.$lang.$key,true);\r\n\t\twp_enqueue_script( 'google-clustering', TEVOLUTION_PAGE_TEMPLATES_URL.'js/markermanager.js',true );\r\n\t}else{\r\n\t\tif($pagenow =='post-new.php' || ($pagenow =='post.php' && isset($_REQUEST['action']) && $_REQUEST['action']=='edit')){\r\n\t\t\t\r\n\t\t\t/* get API key for map added in map settings */\r\n\t\t\tif($templatic_settings['tmpl_api_key']!='')\r\n\t\t\t{\r\n\t\t\t\t$key='&amp;key='.$templatic_settings['tmpl_api_key'];\r\n\t\t\t}\r\n\t\t\twp_enqueue_script( 'google-maps-apiscript', $http.'maps.googleapis.com/maps/api/js?v=3.exp&libraries=places'.$lang.$key,true);\r\n\t\t\t//wp_enqueue_script( 'google-maps-apiscript', $http.'maps.googleapis.com/maps/api/js?v=3.exp&libraries=places'.$lang,true);\r\n\t\t\twp_enqueue_script( 'google-clustering', TEVOLUTION_PAGE_TEMPLATES_URL.'js/markermanager.js',true );\r\n\t\t}\r\n\t\r\n\t}\r\n\r\n\t/*\r\n\tinclude font awesome css.\r\n\t*/\r\n\t/* Register our stylesheet. */\r\n\tif(is_ssl()){ $http = \"https://\"; }else{ $http =\"http://\"; }\r\n\twp_register_style( 'fontawesomecss', $http.'\tmaxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );\r\n\twp_enqueue_style( 'fontawesomecss' );\r\n\r\n\tif (function_exists('tmpl_wp_is_mobile') && tmpl_wp_is_mobile()) {\r\n\t\t\r\n\t\t/* different sequence of parent theme css in child themes */\r\n\t\tif( file_exists(get_stylesheet_directory().'/theme-style.css'))\r\n\t\t{\r\n\t\t\twp_enqueue_style( 'tmpl_mobile_view',TEMPL_PLUGIN_URL.'css/style-mobile.css',array('tmpl_dir_css'));\r\n\r\n\t\t\tif(function_exists('supreme_prefix')){\r\n\t\t\t\t$supreme2_theme_settings = get_option(supreme_prefix().'_theme_settings');\r\n\t\t\t\tif ( ((isset($supreme2_theme_settings['rtlcss']) && $supreme2_theme_settings['rtlcss']==1) || (isset($_SESSION['rtlcss']) && $_SESSION['rtlcss']==1) ) && !is_admin() ) { \r\n\t\t\t\t\twp_enqueue_style( 'tmpl_mobile_rtl_view',TEMPL_PLUGIN_URL.'css/style-mobile-rtl.css',array('tmpl_mobile_view'));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\twp_enqueue_style( 'tmpl_mobile_view',TEMPL_PLUGIN_URL.'css/style-mobile.css',array('directory-css'));\r\n\t\t\tif(function_exists('supreme_prefix')){\r\n\t\t\t\t$supreme2_theme_settings = get_option(supreme_prefix().'_theme_settings');\r\n\t\t\t\tif ( ((isset($supreme2_theme_settings['rtlcss']) && $supreme2_theme_settings['rtlcss']==1) || (isset($_SESSION['rtlcss']) && $_SESSION['rtlcss']==1) ) && !is_admin() ) { \r\n\t\t\t\t\twp_enqueue_style( 'tmpl_mobile_rtl_view',TEMPL_PLUGIN_URL.'css/style-mobile-rtl.css',array('tmpl_mobile_view'));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t/* include the wordpress comment -reply .js only on detail page */\r\n\tif ( !is_single() ){\r\n\t\twp_dequeue_script('comment-reply');\r\n\t}\r\n}", "function google_map_css() {\n\techo '<style type=\"text/css\">\n\t.google_map_canvas img {\n\t\tmax-width: none;\n\t}</style>';\n}", "function mpfy_shortcode_custom_mapping($atts, $content) {\n\tglobal $mpfy_footer_scripts;\n\tstatic $mpfy_instances = -1;\n\t$mpfy_instances ++;\n\n\tif (!defined('MPFY_LOAD_ASSETS')) {\n\t\tdefine('MPFY_LOAD_ASSETS', true);\n\t}\n\n\textract( shortcode_atts( array(\n\t\t'width'=>0,\n\t\t'height'=>300,\n\t\t'map_id'=>0,\n\t), $atts));\n\n\tif (!stristr($width, '%')) {\n\t\t$width = intval($width);\n\t\t$width = ($width < 1) ? 0 : $width . 'px';\n\t}\n\n\tif (!stristr($height, '%')) {\n\t\t$height = intval($height);\n\t\t$height = ($height < 1) ? 300 : $height . 'px';\n\t}\n\n\tif ($map_id == 0) {\n\t\t$map_id = Mpfy_Map::get_first_map_id();\n\t}\n\n\t$map = get_post(intval($map_id));\n\tif (!$map || is_wp_error($map) || $map->post_type != 'map') {\n\t\treturn 'Invalid or no map_id specified.';\n\t}\n\n\t$map = new Mpfy_Map($map->ID);\n\n\t$template = include('templates/map.php');\n\t$mpfy_footer_scripts .= $template['script'];\n\treturn $template['html'];\n}", "function form_map($name, $value, $parameters, $cp) {\n\n if (!$value)\n $value = get_setting('website_address');\n\n Layout::addJavascript(\"\n\n var map, stepDisplay, marker, old_position, old_address = '\" . $value . \"';\n\n function initMap(){\n\n $('#map_canvas').css('height', '500px');\n $('#reset_map').show();\n\n var myOptions = { zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP, };\n map = new google.maps.Map(document.getElementById('map_canvas'), myOptions );\n\n address = $('#addr').val()\n geocoder = new google.maps.Geocoder();\n geocoder.geocode( { 'address': address}, function(results, status) {\n var location = results[0].geometry.location\n old_position = location\n map.setCenter( location );\n addMarker( location )\n });\n\n }\n\n function resetLocation(){\n $('#addr').val( old_address )\n address = old_address\n geocoder = new google.maps.Geocoder();\n geocoder.geocode( { 'address': address}, function(results, status) {\n var location = results[0].geometry.location\n old_position = location\n map.setCenter( location );\n addMarker( location )\n });\n }\n\n function addMarker( location ){\n if( marker )\n marker.setMap(null)\n marker = new google.maps.Marker({ position: location, map: map, draggable: true });\n\n google.maps.event.addListener(marker, 'dragstart', function() {\n //map.closeInfoWindow();\n });\n\n google.maps.event.addListener(marker, 'dragend', function(event) {\n updateLocation( event.latLng )\n });\n }\n\n function updateLocation(location){\n var p = location.toString()\n var latlngStr = p.split(',');\n var lat = latlngStr[0].substr(1)\n var lng = latlngStr[1].substr(0,latlngStr[1].length-1)\n\n $('#location').val(lat + ',' + lng);\n\n geocoder.geocode({'latLng': location}, function(results, status) {\n if (status == google.maps.GeocoderStatus.OK)\n if (results[0]){\n\n var address = results[0].formatted_address\n var address_components = new Array();\n for( var i in results[0].address_components )\n address_components[results[0].address_components[i].types] = results[0].address_components[i].long_name\n\n $('#addr').val(results[0].formatted_address)\n }\n\n });\n\n }\n\n \");\n\n $html = '<script type=\"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=false\"></script>';\n $html .= '<div id=\"map_canvas\"><a href=\"javascript:initMap();\">Click to init the map</a></div>';\n $html .= '<input type=\"hidden\" id=\"location\" name=\"extra3\"/><br>address <input type=\"text\" name=\"extra2\" style=\"width:76%;\" id=\"addr\" value=\"' . $value . '\" onchange=\"initMap()\"/> <a href=\"javascript:initMap();\">Refresh</a>';\n $html .= '<div id=\"reset_map\" style=\"display:none;\"><br><a href=\"javascript:resetLocation();\">Reset Address</a><br></div>';\n return $html;\n }", "function plgContentgooglemaps( &$subject, $params ) {\n\t\tself::__construct( $subject, $params );\n \t}", "public function googleStaticMap($width = 200, $height = 200, $zoom = null)\n {\n\n $url = 'https://maps.googleapis.com/maps/api/staticmap?';\n $url .= 'size=' . $width . 'x' . $height;\n $url .= '&amp;markers=' . urlencode($this->full_address);\n if ($zoom !== null)\n $url .= '&amp;zoom=' . $zoom;\n $url .= '&amp;sensor=false';\n\n return $url;\n }", "public function __construct($map= []) {\n $this->map= $map;\n }", "public function loadMap($mapName){\n $this->setMap(new Map($mapName));\n }", "public function setMap($map) {\n\t\t$maps = $this->static->maps();\n\t\t$this->map = $maps[$map];\n\t}", "abstract protected function buildMap();", "public function __construct() {\n\t\tparent::__construct(\n\t\t\t'property_map_widget', // Base ID\n\t\t\t__( 'Property Map Widget', 'agentpress' ), // Name\n\t\t\tarray( 'description' => __( 'Displays a Google Map with markers for each property listing on the site.', 'agentpress' ), ) // Args\n\t\t);\n\t}", "function __construct() {\n\t\t$this->map_data = array();\n\t}", "public function init() {\n\t\t$this->id = \"imagemap\" . t3lib_div::shortMD5(rand(1, 100000));\n\t\t$this->jsFiles = array();\n\t\t$this->cssFiles = array();\n\t}", "protected static function getFacadeAccessor()\n {\n return 'google-static-map';\n }", "function mpfy_enqueue_gmaps() {\n\twp_dequeue_script('google_map_api');\n\twp_dequeue_script('google-maps');\n\twp_dequeue_script('cspm_google_maps_api');\n\twp_dequeue_script('gmaps');\n\twp_deregister_script('gmaps');\n\n\t// load our own version of gmaps as we require the geometry library\n\t$api_key = carbon_get_theme_option('mpfy_google_api_key');\n\t$api_key_param = $api_key ? '&key=' . $api_key : '';\n\twp_enqueue_script('gmaps', '//maps.googleapis.com/maps/api/js?libraries=geometry' . $api_key_param, array(), false, true);\n}", "public static function getMapBuilder()\n\t{\n\t\tif (self::$mapBuilder === null) {\n\t\t\tself::$mapBuilder = new MissionPhotoMapBuilder();\n\t\t}\n\t\treturn self::$mapBuilder;\n\t}", "function admin_head()\n\t{\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t#map {width: 100%; height: 500px; margin-top: 10px;}\n\t\t</style>\n\t\t <script src='http://maps.googleapis.com/maps/api/js?sensor=false' type='text/javascript'></script>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tfunction load() {\n\t\t\t\t\tvar exists = 0, marker;\n\t\t\t\t\t// get the lat and lng from our input field\n\t\t\t\t\tvar coords = jQuery('.location').val();\n\t\t\t\t\t// if input field is empty, default coords\n\t\t\t\t\tif (coords === '') {\n\t\t\t\t\t\tlat = 45.77598686952638; \n\t\t\t\t\t\tlng = 15.985933542251587;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// split the coords by ;\n\t\t\t\t\t\ttemp = coords.split(';');\n\t\t\t\t\t\tlat = parseFloat(temp[0]);\n\t\t\t\t\t\tlng = parseFloat(temp[1]);\n\t\t\t\t\t\texists = 1;\n\t\t\t\t\t}\n\t\t\t\t\t// coordinates to latLng\n\t\t\t\t\tvar latlng = new google.maps.LatLng(lat, lng);\n\t\t\t\t\t// map Options\n\t\t\t\t\tvar myOptions = {\n\t\t\t\t\t zoom: 8,\n\t\t\t\t\t center: latlng,\n\t\t\t\t\t mapTypeId: google.maps.MapTypeId.ROADMAP\n\t\t\t\t\t};\n\t\t\t\t\t//draw a map\n\t\t\t\t\tvar map = new google.maps.Map(document.getElementById(\"map\"), myOptions);\n\t\t\t\t\t\n\t\t\t\t\t// if we had coords in input field, put a marker on that spot\n\t\t\t\t\tif(exists == 1) {\n\t\t\t\t\t\tmarker = new google.maps.Marker({\n\t\t\t\t\t\t\tposition: map.getCenter(),\n\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\tdraggable: true\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// click event\n\t\t\t\t\tgoogle.maps.event.addListener(map, 'click', function(point) {\n\t\t\t\t\t\tif (exists == 0) {\n\t\t\t\t\t\t\texists = 1;\n\t\t\t\t\t\t\t// drawing the marker on the clicked spot\n\t\t\t\t\t\t\tmarker = new google.maps.Marker({\n\t\t\t\t\t\t\t\tposition: point.latLng,\n\t\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\t\tdraggable: true\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t//put the coordinates to input field\n\t\t\t\t\t\t\tjQuery('.location').val(marker.getPosition().lat() + ';' + marker.getPosition().lng());\n\t\t\t\t\t\t\t// drag event for add screen\n\t\t\t\t\t\t\tgoogle.maps.event.addListener(marker, \"dragend\", function (mEvent) { \n\t\t\t\t\t\t\t\tjQuery('.location').val(mEvent.latLng.lat() + ';' + mEvent.latLng.lng());\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// only one marker on the map!\n\t\t\t\t\t\t\talert('Marker already on the map! Drag it to desired location.');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t//dragend event for update screen\n\t\t\t\t\tif(exists === 1) {\n\t\t\t\t\t\tgoogle.maps.event.addListener(marker, \"dragend\", function (mEvent) { \n\t\t\t\t\t\t\tjQuery('.location').val(mEvent.latLng.lat() + ';' + mEvent.latLng.lng());\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\tif (jQuery('.location').length > 0) {\n\t\t\t\t\tload();\n\t\t\t\t}\n\t\t\t});\n\t\t\t</script>\n\n\t\t<?php\n\t}", "public function run(){\n \t$this->render('application.components.placeMap._placeMap');\n }", "public function includeGMapsJS() {\n\t\tif(self::$jsIncluded) return;\n // Google map JS\n\t\t\n\t\t//adding in a callback for jochen:\n //$this->content .= '<script src=\"http://maps.google.com/maps?hl='. $this->lang.'&file=api&amp;v=2&amp;key='.$this->googleMapKey.'\" type=\"text/javascript\">';\n\t\t$this->content .= '<script src=\"http://maps.google.com/maps?hl='. $this->lang.'&file=api&amp;v=2&amp;callback=load&amp;key='.$this->googleMapKey.'\" type=\"text/javascript\">';\n $this->content .= '</script>'.\"\\n\";\n \n // Clusterer JS\n if ($this->useClusterer==true) {\n\t\t\t// Source: http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer/1.0/src/\n\t\t\t$this->content .= '<script src=\"'.$this->clustererLibraryPath.'\" type=\"text/javascript\"></script>'.\"\\n\";\n }\n \n self::$jsIncluded = true;\n\t\n\t}", "public function __construct($map = null) {\n // check if map is not set\n if (!$map) {\n // default to a standard-sized Tetris map\n $map = new Map(10, 18);\n }\n\n // remember the map\n $this->map = $map;\n }", "public function configureFacilityGeomap()\n {\n /** @var $googleGeomap \\Source44\\Visualization\\Google\\Visualization\\GeoMap */\n $googleGeomap = $this->getGoogleVisualization();\n\n $googleGeomap->setId('facility-footprint-geomap');\n\n $googleGeomap->getDataTable()->setName('facilityGeomapDatatable');\n\n $googleGeomap->getDataTable()->addColumn(DataTable::COLUMN_TYPE_NUMBER, 'Latitude');\n $googleGeomap->getDataTable()->addColumn(DataTable::COLUMN_TYPE_NUMBER, 'Longitude');\n $googleGeomap->getDataTable()->addColumn(DataTable::COLUMN_TYPE_NUMBER, 'Carbon');\n $googleGeomap->getDataTable()->addColumn(DataTable::COLUMN_TYPE_STRING, 'Facility');\n\n $googleGeomap->setOptions(array(\n 'dataMode' => 'markers',\n 'region' => 'US',\n 'showZoomOut' => true\n ));\n\n }", "function showMap() {\n\t\t$this->initMap();\n\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###MAP###');\n\n\t\t// title, text - markers\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['map.']['LL'], 'map');\n\t\t$markerArray['###CAT_MENU###'] \t\t= $this->displayCatMenu(0);\n\t\t$markerArray['###CAT_LIST###'] \t\t= ($this->config['categoriesActive']!='') ? $this->config['categoriesActive'] : '9999';\n\t\t$markerArray['###MAP_WIDTH###'] \t= $this->config['mapWidth'];\n\t\t$markerArray['###MAP_HEIGHT###']\t= $this->config['mapHeight'];\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'],$markerArray, $subpartArray,$wrappedSubpartArray);\n\t\treturn $content;\n\t}", "function map(string $docuri) {\n $map = [\n 'title'=> 'carte '.$this->title,\n 'view'=> ['latlon'=> [47, 3], 'zoom'=> 6],\n ];\n $map['bases'] = [\n 'cartes'=> [\n 'title'=> \"Cartes IGN\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://igngp.geoapi.fr/tile.php/cartes/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 18, 'attribution'=> 'ign' ],\n ],\n 'orthos'=> [\n 'title'=> \"Ortho-images\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://igngp.geoapi.fr/tile.php/orthos/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 18, 'attribution'=> 'ign' ],\n ],\n 'whiteimg'=> [\n 'title'=> \"Fond blanc\",\n 'type'=> 'TileLayer',\n 'url'=> 'https://visu.gexplor.fr/utilityserver.php/whiteimg/{z}/{x}/{y}.jpg',\n 'options'=> [ 'minZoom'=> 0, 'maxZoom'=> 21 ],\n ],\n ];\n $map['defaultLayers'] = ['whiteimg'];\n \n $request_scheme = isset($_SERVER['REQUEST_SCHEME']) ? $_SERVER['REQUEST_SCHEME']\n : ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']=='on')) ? 'https' : 'http');\n foreach ($this->layers as $lyrid => $layer) {\n $overlay = [\n 'title'=> $layer['title'],\n 'type'=> 'UGeoJSONLayer',\n 'endpoint'=> \"$request_scheme://$_SERVER[SERVER_NAME]$_SERVER[SCRIPT_NAME]/$docuri/$lyrid\",\n ];\n foreach (['pointToLayer','style','minZoom','maxZoom'] as $key)\n if (isset($layer[$key]))\n $overlay[$key] = $layer[$key];\n elseif ($this->$key !== null)\n $overlay[$key] = $this->$key;\n\n $map['overlays'][$lyrid] = $overlay;\n if (isset($layer['displayedByDefault']))\n $map['defaultLayers'][] = $lyrid;\n }\n \n return new Map($map, \"$docuri/map\");\n }", "public function actionMap()\n {\n $mapForm = MapForm::createDefault();\n \n $mapForm->load(Yii::$app->request->post());\n $mapForm->validate();\n \n $this->layout = 'fluid';\n return $this->render('map', [\n 'mapForm' => $mapForm,\n ]);\n }", "public function actionMap()\r\n\t{\r\n\t\t$this->render('map');\r\n\t}", "public function staticMap($address, $options = [])\n {\n $this->service = 'staticmap';\n\n // We need to clear output_format otherwise 'json' will be appended to the url\n $this->output_format = null;\n\n // Using default values, can be overridden in $options\n $this->buildQuery(array_merge([\n 'center' => $address,\n 'size' => '512x512',\n 'zoom' => '14',\n 'maptype' => 'roadmap',\n 'sensor' => 'false'\n ], $options));\n\n $this->response = new Response($this->runQuery());\n\n return $this;\n }", "function buildr_map_script()\n{\n require_code('buildr');\n\n $realm = get_param_integer('realm', null);\n download_map_wrap(get_member(), $realm);\n}", "function __construct() {\n $this->map = array();\n }", "private function showEmbedMap()\n {\n if ($this->location !== '') {\n $mapurl = \"https://www.google.com/maps/embed/v1/view\";\n $mapurl .= \"?center=\" . $this->location->lat . \",\" . $this->location->lng;\n $mapurl .= \"&zoom=15\"; // zoom to town level\n $mapurl .= \"&key=\" . $GLOBALS['apikey_googlemap'];;\n \n // iframe params to embed on the web page\n $map = '<iframe ';\n $map .= 'width=\"450\" ';\n $map .= 'height=\"400\" ';\n $map .= 'frameborder=\"0\" style=\"border:0\" ';\n $map .= 'src=\"' .$mapurl. '\" allowfullscreen> ';\n $map .= '</iframe>';\n return $map;\n } else {\n return \"\";\n }\n }", "public function get_map( $template )\n {\n//$this->pObj->dev_var_dump( $this->pObj->rows );\n $this->rowsBackup();\n\n // init the map\n $this->init();\n\n // RETURN: map isn't enabled\n switch ( true )\n {\n case( $this->mapLLleafletIsEnabled()):\n // Follow the workflow\n break;\n case( empty( $this->enabled ) ):\n case( $this->enabled == 'disabled'):\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'RETURN. Map is disabled.';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n $this->rowsReset();\n return $template;\n default:\n // Follow the workflow\n break;\n } // RETURN: map isn't enabled\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'The map module uses a JSON array. If you get any unexpected result, ' .\n 'please remove config.xhtml_cleaning and/or page.config.xhtml_cleaning ' .\n 'in your TypoScript configuration of the current page.';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n $prompt = 'The map module causes some conflicts with AJAX. Please disable AJAX in the ' .\n 'plugin/flexform of the browser.';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n//$this->pObj->dev_var_dump( $this->pObj->rows[ 0 ] );\n\n if ( $this->enabled == 'Map +Routes' )\n {\n $arr_result = $this->renderMapRoute();\n //$this->pObj->dev_var_dump( $arr_result );\n switch ( true )\n {\n case( empty( $arr_result[ 'marker' ] ) ):\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'There isn\\'t any marker row!';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 3 );\n }\n break;\n case(!empty( $arr_result[ 'marker' ] ) ):\n default:\n // #i0020, 130718, dwildt\n $this->pObj->rows = $arr_result[ 'marker' ];\n break;\n }\n $jsonRoutes = $arr_result[ 'jsonRoutes' ];\n unset( $arr_result );\n } // if Map +Routes is enabled\n\n $template = $this->initMapMarker( $template ); // add map marker, if marker is missing\n\n $template = $this->renderMap( $template );\n\n // RETURN map (without Routes)\n if ( $this->enabled != 'Map +Routes' )\n {\n // RETURN the template\n $this->rowsReset();\n return $template;\n } // RETURN map (without Routes)\n\n $mode = $this->confMap[ 'compatibility.' ][ 'mode' ];\n if ( $mode != 'oxMap (deprecated)' )\n {\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'map mode isn\\'t ' . $mode . '. Map +Routes will not handled.';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 3 );\n }\n $this->rowsReset();\n return $template;\n } // RETURN map (without Routes)\n\n switch ( true )\n {\n case( empty( $jsonRoutes ) ):\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'JSON array for the variable routes is empty!';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 3 );\n }\n break;\n case(!empty( $jsonRoutes ) ):\n default:\n $template = str_replace( \"'###ROUTES###'\", $jsonRoutes, $template );\n break;\n }\n\n // RETURN map (with Routes)\n $this->rowsReset();\n return $template;\n }", "public function getGoogleMap() \n {\n return $this->content;\n }", "public function __construct($map) {\n $this->loadMap($map);\n $this->loadAlgorithm(\"Astar\");\n }", "public static function registerMap($map)\n {\n $maps = (array) $map;\n array_walk($maps, function (&$name) {\n $name = 'js/' . $name . '.js';\n });\n static::$_mapJsFiles = array_unique(array_merge(static::$_mapJsFiles, $maps));\n if (static::$_mapJsFiles) {\n MapAsset::register(Yii::$app->getView())->js = static::$_mapJsFiles;\n }\n }", "function oneclick_shortcode_easy_content_google_map($atts)\r\r\n{\r\r\n $options_geolocation = get_option('oneclick_geolocation');\r\r\n $atts = shortcode_atts(array(\r\r\n 'lat' => '41.085652',\r\r\n 'long' => '-73.85846839999999',\r\r\n 'zoom' => '13',\r\r\n 'width' => '450',\r\r\n 'height' => '250',\r\r\n 'style' => '',\r\r\n 'icon' => '',\r\r\n 'basicmaptype' => 'ROADMAP',\r\r\n 'zoomcontrol' => 'true',\r\r\n 'zoomcontrolsize' => 'SMALL',\r\r\n 'zoomcontrolposition' => 'RIGHT_TOP',\r\r\n 'maptype' => 'true',\r\r\n 'maptypestyle' => 'HORIZONTAL_BAR',\r\r\n 'maptypeposition' => 'TOP_RIGHT',\r\r\n 'pancontrol' => 'false',\r\r\n 'pancontrolposition' => 'LEFT_TOP',\r\r\n 'streetview' => 'true',\r\r\n 'streetviewposition' => 'TOP_LEFT',\r\r\n 'hue' => '',\r\r\n 'saturation' => '0',\r\r\n 'containerstyle' => '',\r\r\n 'style' => ''\r\r\n ) , $atts, 'wp-samurai-easy-multi-gmap');\r\r\n $gmap_iconizer_latitude = $atts['lat'];\r\r\n $gmap_iconizer_longitude = $atts['long'];\r\r\n $gmap_iconizer_zoom_level = $atts['zoom'];\r\r\n $gmap_iconizer_mapwidth = $atts['width'];\r\r\n $gmap_iconizer_mapheight = $atts['height'];\r\r\n $gmap_iconizer_upload_icon = $atts['icon'];\r\r\n $gmap_iconizer_zoomcontrol = $atts['zoomcontrol'];\r\r\n $gmap_iconizer_zoomcontrolSize = $atts['zoomcontrolsize'];\r\r\n $gmap_iconizer_zoomcontrolPosition = $atts['zoomcontrolposition'];\r\r\n $gmap_iconizer_maptype = $atts['maptype'];\r\r\n $gmap_iconizer_maptypecontrol_style = $atts['maptypestyle'];\r\r\n $gmap_iconizer_maptype_position = $atts['maptypeposition'];\r\r\n $gmap_iconizer_pancontrol = $atts['pancontrol'];\r\r\n $gmap_iconizer_pan_position = $atts['pancontrolposition'];\r\r\n $gmap_iconizer_streetviewcontrol = $atts['streetview'];\r\r\n $gmap_iconizer_streetviewcontrol_position = $atts['streetviewposition'];\r\r\n $gmap_iconizer_basic_map_type = $atts['basicmaptype'];\r\r\n $gmap_iconizer_hue = $atts['hue'];\r\r\n $gmap_iconizer_mapstyle = $atts['style'];\r\r\n $gmap_iconizer_containerstyle = $atts['containerstyle'];\r\r\n $gmap_iconizer_saturation = $atts['saturation'];\r\r\n $map_id = generateRandomString();\r\r\n $options_iconizer = get_option('oneclick');\r\r\n $gmap_iconizer_apikey = $options_iconizer['gmap_iconizer_apikey'];\r\r\n $options_frontend_admin = get_option('oneclick_geolocation');\r\r\n $gmap_iconizer_mapstyle = $atts['style'];\r\r\n $gmap_iconizer_mapcontainerstyle = $options_frontend_admin['gmap_iconizer_mapcontainerstyle'];\r\r\n ob_start();\r\r\n ?>\r\r\n <?php\r\r\n require ('includes/oneclick_google_multimap_frontend.php');\r\r\n ?>\r\r\n <?php\r\r\n return ob_get_clean();\r\r\n}", "public static function DirectionsGoogleMap($arguments, $address = null, $parser = null, $shortcode) {\n $iframeUrl = sprintf(\n \"https://maps.google.de/maps?%s\",\n urlencode($address)\n );\n $width = (isset($arguments['width']) && $arguments['width']) ? $arguments['width'] : \"100%\";\n $height = (isset($arguments['height']) && $arguments['height']) ? $arguments['height'] : \"100%\";\n return sprintf(\n '<iframe class=\"embedded-maps\" width=\"%s\" height=\"%s\" src=\"%s\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\"></iframe>',\n $width,\n $height,\n $iframeUrl\n );\n }", "function orgmaps_init ($options_page = FALSE){\n\n\t// if this is not the intended page, stop\n\tglobal $post;\n\tif ($post->ID != get_option ('orgmaps_page_id') && !$options_page) return TRUE;\n\n\t// db interface\n\tglobal $wpdb;\n\n\t// get parameters from db\n\t$api_key \t= get_option ('orgmaps_api_key');\n\t$map_lat\t= get_option ('orgmaps_map_lat');\n\t$map_lon\t= get_option ('orgmaps_map_lon');\n\t$width \t\t= get_option ('orgmaps_width');\n\t$height \t= get_option ('orgmaps_height');\n\t$zoom\t\t= get_option ('orgmaps_zoom');\n\t$def_cat\t= get_option ('orgmaps_def_cat');\n\t$def_type\t= get_option ('orgmaps_def_type');\n\t$num_col\t= get_option ('orgmaps_num_col');\n\t$site_url\t= get_settings ('siteurl');\n\t\n\t// get markers from db\n\t$markers = $wpdb->get_results (\"SELECT * FROM \" . $wpdb->prefix . \"marker_cats t1 INNER JOIN \" . $wpdb->prefix . \"markers t2 ON t1.id=t2.cat ORDER BY t2.cat\");\n\t\n\t// get categories\n\t$cats = $wpdb->get_results (\"SELECT * FROM \" . $wpdb->prefix . \"marker_cats\");\n\t\n\t// if category specified does not exist, use the first in db\n\t$exists = FALSE;\n\t// loop till end of array or till a match is found\n\tfor ($i = 0; $i < count($cats) && !$exists; $i++){\n\t\t$cat = $cats[$i];\n\t\t$exists = $def_cat == $cat->id;\n\t}\n\t\n\t// if no match found, use first in db\n\tif (!$exists){\t\n\t\t$def_cat = $cats[0]->id;\n\t}\n\t\n\t?>\n\t\n\t<!-- Organisation Maps plugin begin -->\n\t\n\t<!-- Google Maps API -->\n\t<script type=\"text/javascript\" src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo $api_key ?>\"></script>\n\t<!-- Prototype -->\n\t<script type=\"text/javascript\" src=\"<?php echo $site_url . '/wp-content/plugins/orgmaps/scripts/prototype.js' ?>\"></script>\n\t\n\t<!-- window.js -->\n\t<script type=\"text/javascript\" src=\"<?php echo $site_url . '/wp-content/plugins/orgmaps/scripts/window.js' ?>\"></script>\n\t<!-- orgmaps.js -->\n\t<script type=\"text/javascript\" src=\"<?php echo $site_url . '/wp-content/plugins/orgmaps/scripts/orgmaps.js.php' ?>\"></script>\n\t<!-- Transfer PHP variables to JS variables -->\n\t<script type=\"text/javascript\">\n\t<!--\n\t\tOrgmaps.width \t= \"<?php echo $width ?>\";\n\t\tOrgmaps.height \t= \"<?php echo $height ?>\";\n\t\tOrgmaps.lat \t= \"<?php echo $map_lat ?>\";\n\t\tOrgmaps.lon \t= \"<?php echo $map_lon ?>\";\n\t\tOrgmaps.zoom \t= \"<?php echo $zoom ?>\";\n\t\tOrgmaps.url\t\t= \"<?php echo $site_url . '/wp-content/plugins/orgmaps/orgmaps-func.php'?>\";\n\t\tOrgmaps.markers\t= <?php echo orgmaps_jencode ($markers) ?>;\n\t\tOrgmaps.cats \t= <?php echo orgmaps_jencode ($cats) ?>;\n\t\tOrgmaps.defCat \t= \"<?php echo $def_cat ?>\";\n\t\tOrgmaps.defType\t= \"<?php echo $def_type ?>\";\n\t\tOrgmaps.numCol\t= <?php echo $num_col ?>;\n\t//-->\n\t</script>\n\t\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo $site_url ?>/wp-content/plugins/orgmaps/themes/default.css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo $site_url ?>/wp-content/plugins/orgmaps/themes/alphacube.css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo $site_url ?>/wp-content/plugins/orgmaps/style.css\" />\n\t\n\t<!-- Organisation Maps plugin end -->\n\t\n\t<?php\n}", "public function googleMapsStatic($atts)\n {\n if (empty($atts['center'])) {\n return false;\n }\n\n if (empty($atts['height'])) {\n $atts['height'] = '640';\n }\n if (empty($atts['width'])) {\n $atts['width'] = '640';\n }\n if (empty($atts['zoom'])) {\n $atts['zoom'] = '15';\n }\n\n $height = $atts['height'];\n $width = $atts['width'];\n $zoom = $atts['zoom'];\n $center = htmlspecialchars(strtolower(trim($atts['center'])));\n return '<img src=\"https://maps.googleapis.com/maps/api/staticmap?center=' . $center . '&zoom=' . $zoom . '&size=' . $width . 'x' . $height . '&markers=' . $center . '\" alt=\"google static map\">';\n }", "private function start_gMaps_BA_DM_Plugin() {\n\t\tinclude_once(plugin_dir_path(__FILE__).'/gmaps/gmaps.php');\n\t\t$gmpas_obj_ba_dm_plugin = new GMaps_BA_DM_Plugin;\n\t\t$gmpas_obj_ba_dm_plugin->start_gMaps_BA_DM_Plugin();\n\t}", "function display_google_map($catinfo_arr,$atts,$catname_arr)\r\n{\r\n\t\r\n\textract( shortcode_atts( array (\r\n \t\t'post_type' =>'post',\r\n\t\t'image' => 'thumbnail',\r\n\t\t'latitude' => '21.167086220869788',\r\n\t\t'longitude' => '72.82231945000001',\r\n\t\t'map_type' => 'ROADMAP',\r\n\t\t'map_display' => '1',\r\n\t\t'zoom_level' => '13',\r\n\t\t'height' => '450'\r\n\t\t), $atts ) );\t\r\n\t\r\n\t\r\n\twp_print_scripts( 'google-maps-apiscript');\r\n\twp_print_scripts( 'google-clusterig');\r\n\t\r\n\t$google_map_customizer=get_option('google_map_customizer');/* store google map customizer required formate.*/\r\n\t?>\r\n <script type=\"text/javascript\">\r\n\t\tvar CITY_MAP_CENTER_LAT= '<?php echo $latitude?>';\r\n\t\tvar CITY_MAP_CENTER_LNG= '<?php echo $longitude?>';\r\n\t\tvar CITY_MAP_ZOOMING_FACT= <?php echo $zoom_level;?>;\r\n\t\tvar infowindow;\r\n\t\t<?php if($map_display == 1) { ?>\r\n\t\tvar multimarkerdata = new Array();\r\n\t\t<?php }?>\r\n\t\tvar zoom_option = '<?php echo $map_display; ?>';\r\n\t\tvar markers = {<?php echo $catinfo_arr;?>};\r\n\t\t\r\n\t\t/*var markers = '';*/\r\n\t\tvar map = null;\r\n\t\tvar mgr = null;\r\n\t\tvar mc = null;\r\n\t\tvar markerClusterer = null;\r\n\t\tvar showMarketManager = false;\r\n\t\tvar PIN_POINT_ICON_HEIGHT = 50;\r\n\t\tvar PIN_POINT_ICON_WIDTH = 50;\r\n\t\tvar infobox;\r\n\t\tif(MAP_DISABLE_SCROLL_WHEEL_FLAG)\r\n\t\t{\r\n\t\t\tvar MAP_DISABLE_SCROLL_WHEEL_FLAG = 'No';\t\r\n\t\t}\r\n\t\t\r\n\t\tfunction setCategoryVisiblity( category, visible ) {\t\t\r\n\t\t var i;\r\n\t\t if ( mgr && category in markers ) {\r\n\t\t\t for( i = 0; i < markers[category].length; i += 1 ) {\r\n\t\t\t\t if ( visible ) {\r\n\t\t\t\t\tmgr.addMarker( markers[category][i], 0 );\r\n\t\t\t\t } else {\r\n\t\t\t\t\tmgr.removeMarker( markers[category][i], 0 );\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t mgr.refresh();\r\n\t\t }\r\n\t\t}\r\n\t\tfunction initialize() {\r\n\t\t var isDraggable = jQuery(document).width() > 480 ? true : false;\r\n\t\t var myOptions = {\r\n\t\t\tzoom: CITY_MAP_ZOOMING_FACT,\r\n\t\t\tdraggable: isDraggable,\r\n\t\t\tcenter: new google.maps.LatLng(CITY_MAP_CENTER_LAT, CITY_MAP_CENTER_LNG),\r\n\t\t\tmapTypeId: google.maps.MapTypeId.<?php echo $map_type;?>\r\n\t\t }\r\n\t\t map = new google.maps.Map(document.getElementById(\"map_canvas\"),myOptions);\r\n\t\t mgr = new MarkerManager( map );\r\n\t\t var styles = [<?php echo substr($google_map_customizer,0,-1);?>];\t\t\t\r\n\t\t map.setOptions({styles: styles});\r\n\t\t google.maps.event.addListener(mgr, 'loaded', function() {\r\n\t\t \r\n\t\t\t if (markers) {\t\t\t\t \r\n\t\t\t\t for (var level in markers) {\t\t\t\t\t \t\r\n\t\t\t\t\tgoogle.maps.event.addDomListener( document.getElementById( level ), 'click', function() {\r\n\t\t\t\t\t setCategoryVisiblity( this.id, this.checked );\r\n\t\t\t\t\t});\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (var i = 0; i < markers[level].length; i++) {\t\t\t\t\t\t\r\n\t\t\t\t\t var details = markers[level][i];\t\t\t\t\t \r\n\t\t\t\t\t var image = new google.maps.MarkerImage(details.icons,new google.maps.Size(PIN_POINT_ICON_WIDTH, PIN_POINT_ICON_HEIGHT));\r\n\t\t\t\t\t var myLatLng = new google.maps.LatLng(details.location[0], details.location[1]);\r\n\t\t\t\t\t <?php if($map_display == 1) { ?>\r\n\t\t\t\t\t\t multimarkerdata[i] = new google.maps.LatLng(details.location[0], details.location[1]);\r\n\t\t\t\t\t <?php } ?>\r\n\t\t\t\t\t markers[level][i] = new google.maps.Marker({\r\n\t\t\t\t\t\t title: details.name,\r\n\t\t\t\t\t\t position: myLatLng,\r\n\t\t\t\t\t\t icon: image,\r\n\t\t\t\t\t\t clickable: true,\r\n\t\t\t\t\t\t draggable: false,\r\n\t\t\t\t\t\t flat: true\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\tattachMessage(markers[level][i], details.message);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmgr.addMarkers( markers[level], 0 );\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*New infobundle\t\t\t*/\r\n\t\t\t\t\t infoBubble = new InfoBubble({\r\n\t\t\t\t\t\tmaxWidth:210,minWidth:210,minHeight:\"auto\",padding:0,content:details.message,borderRadius:0,borderWidth:0,borderColor:\"none\",overflow:\"visible\",backgroundColor:\"#fff\"\r\n\t\t\t\t\t });\t\t\t\r\n\t\t\t\t\t/*finish new infobundle*/\r\n\t\t\t\r\n\t\t\t/*Start\t\t\t*/\r\n google.maps.event.addListener(markers, \"click\", function (e) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\tinfoBubble.open(map, details.message);\t\t\t\t\t\r\n });\r\n\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t }\r\n\t\t\t\t <?php if($map_display == 1) { ?>\r\n\t\t\t\t\t var latlngbounds = new google.maps.LatLngBounds();\r\n\t\t\t\t\tfor ( var j = 0; j < multimarkerdata.length; j++ )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t latlngbounds.extend( multimarkerdata[ j ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t map.fitBounds( latlngbounds );\r\n\t\t\t\t <?php } ?>\r\n\t\t\t\t mgr.refresh();\r\n\t\t\t }\r\n\t\t });\r\n\t\t \r\n\t\t\t/* but that message is not within the marker's instance data */\r\n\t\t\tfunction attachMessage(marker, msg) {\r\n\t\t\t \tvar myEventListener = google.maps.event.addListener(marker, 'click', function() {\r\n\t\t\t\t\tinfoBubble.setContent( msg );\r\n\t\t\t\t\tinfoBubble.open(map, marker);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tgoogle.maps.event.addDomListener(window, 'load', initialize);\r\n\t\t\r\n\t\t\r\n\t</script>\r\n\t<div class=\"map_sidebar\">\r\n <div class=\"top_banner_section_in clearfix \"> \r\n\t\t <div class=\"TopLeft\"><span id=\"triggermap\"></span></div>\r\n\t\t <div class=\"TopRight\"></div>\r\n\t\t <div class=\"iprelative\">\r\n <div id=\"map_canvas\" style=\"width: 100%; height:<?php echo $height;?>px\" class=\"map_canvas\"></div> \r\n\t\t </div>\r\n <?php if($catname_arr):?>\r\n <div class=\"map_category\" id=\"toggleID\">\r\n\t\t\t\t<?php foreach($catname_arr as $catname):\r\n\t\t\t\t\r\n\t\t\t\tif($catname->term_icon != '')\r\n\t\t\t\t\t\t$term_icon=$catname->term_icon;\r\n\t\t\t\t\telse\t\r\n\t\t\t\t\t\t$term_icon=apply_filters('tmpl_default_map_icon',TEMPL_PLUGIN_URL.\"images/pin.png\");\r\n\t\t\t\t\r\n\t\t\t\t ?>\r\n <label>\r\n <input type=\"checkbox\" value=\"<?php echo $catname->name;?>\" checked=\"checked\" id=\"<?php echo $catname->slug;?>\" name=\"<?php echo $catname->slug;?>\">\r\n <img height=\"14\" width=\"8\" alt=\"\" src=\"<?php echo $term_icon;?>\"> <?php echo esc_attr(urldecode($catname->name));?>\r\n </label> \r\n <?php endforeach;?>\r\n </div>\r\n <div id=\"toggle_category\" class=\"toggleon\" onclick=\"toggle_category();\"></div>\r\n <?php endif;?>\t \r\n </div>\r\n </div>\r\n <script type=\"text/javascript\">\r\n\t \r\n\t var maxMap = document.getElementById( 'triggermap' );\t\t\r\n\t\tgoogle.maps.event.addDomListener(maxMap, 'click', showFullscreen);\r\n\t\tfunction showFullscreen() {\r\n\t\t\t /* window.alert('DIV clicked');*/\r\n\t\t\t\tjQuery('#map_canvas').toggleClass('map-fullscreen');\r\n\t\t\t\tjQuery('.map_category').toggleClass('map_category_fullscreen');\r\n\t\t\t\tjQuery('.map_post_type').toggleClass('map_category_fullscreen');\r\n\t\t\t\tjQuery('#toggle_post_type').toggleClass('map_category_fullscreen');\r\n\t\t\t\tjQuery('#trigger').toggleClass('map_category_fullscreen');\r\n\t\t\t\tjQuery('body').toggleClass('body_fullscreen');\r\n\t\t\t\tjQuery('#loading_div').toggleClass('loading_div_fullscreen');\r\n\t\t\t\tjQuery('#advmap_nofound').toggleClass('nofound_fullscreen');\r\n\t\t\t\tjQuery('#triggermap').toggleClass('triggermap_fullscreen');\r\n\t\t\t\t\r\n\t\t\t\tjQuery('.TopLeft').toggleClass('TopLeft_fullscreen');\t\t\r\n\t\t\t\t\t /*map.setCenter(darwin);*/\r\n\t\t\t\t\t window.setTimeout(function() { \r\n\t\t\t\t\tvar center = map.getCenter(); \r\n\t\t\t\t\tgoogle.maps.event.trigger(map, 'resize'); \r\n\t\t\t\t\tmap.setCenter(center); \r\n\t\t\t \t\t}, 100);\t\t\t }\r\n\tfunction toggle_category(){\r\n\t\t\tvar div1 = document.getElementById('toggleID');\r\n\t\t\tif (div1.style.display == 'none') {\r\n\t\t\t\tdiv1.style.display = 'block';\r\n\t\t\t} else {\r\n\t\t\t\tdiv1.style.display = 'none';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(document.getElementById('toggle_category').getAttribute('class') == 'paf_row toggleoff'){\t\t\r\n\t\t\t\tjQuery(\"#toggle_category\").removeClass(\"paf_row toggleoff\").addClass(\"paf_row toggleon\");\r\n\t\t\t} else {\t\t\r\n\t\t\t\tjQuery(\"#toggle_category\").removeClass(\"paf_row toggleon\").addClass(\"paf_row toggleoff\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(document.getElementById('toggle_category').getAttribute('class').search('toggleoff')!=-1 && document.getElementById('toggle_category').getAttribute('class').search('map_category_fullscreen') !=-1){\t\t\r\n\t\t\t\tjQuery(\"#toggle_category\").removeClass(\"paf_row toggleoff map_category_fullscreen\").addClass(\"paf_row toggleon map_category_fullscreen\");\r\n\t\t\t} \r\n\t\t\tif(document.getElementById('toggle_category').getAttribute('class').search('toggleon') !=-1 && document.getElementById('toggle_category').getAttribute('class').search('map_category_fullscreen') !=-1){\r\n\t\t\t\tjQuery(\"#toggle_category\").removeClass(\"paf_row toggleon map_category_fullscreen\").addClass(\"paf_row toggleoff map_category_fullscreen\");\r\n\t\t\t}\r\n\t\t}\r\n\t</script>\r\n \r\n <?php\r\n}", "public function setMap($map) {\n $map = \n $this->map = $map;\n }", "function plugin_frontend_scripts_styles()\r\r\n{\r\r\n $options = get_option('oneclick');\r\r\n $gmap_iconizer_apikey = $options['gmap_iconizer_apikey'];\r\r\n if ($gmap_iconizer_apikey != \"\") {\r\r\n wp_enqueue_script('gmap_main_js', 'https://maps.googleapis.com/maps/api/js?v=3key=' . $gmap_iconizer_apikey, '', '', false);\r\r\n }\r\r\n else {\r\r\n wp_enqueue_script('sensor_js', 'http://maps.googleapis.com/maps/api/js?sensor=false', '', false);\r\r\n }\r\r\n}", "public function registerMapScript($afterInit=array(), $language = null, $region = null, $position = CClientScript::POS_LOAD)\n\t{\n\t\t// TODO: include support in the future\n\t\t$params = 'sensor=false';\n\n\t\tif ($language !== null)\n\t\t\t$params .= '&language=' . $language;\n\t\tif ($region !== null)\n\t\t\t$params .= '&region=' . $region;\n\n\t\tCGoogleApi::init();\n\t\tCGoogleApi::register('maps', '3', array('other_params' => $params));\n\n\t\t$this->registerPlugins();\n\n\t\t$js = '';\n\n\t\t$init_events = array();\n\t\tif (null !== $this->_appendTo)\n\t\t{\n\t\t\t$init_events[] = \"$('{$this->getContainer()}').appendTo('{$this->_appendTo}');\" . PHP_EOL;\n\t\t}\n\t\t$init_events[] = 'var mapOptions = ' . $this->encode($this->options) . ';' . PHP_EOL;\n\t\t$init_events[] = $this->getJsName() . ' = new google.maps.Map(document.getElementById(\"' . $this->getContainerId() . '\"), mapOptions);' . PHP_EOL;\n\n\n\t\t// add some more events\n\t\t$init_events[] = $this->getEventsJs();\n\t\t$init_events[] = $this->getMarkersJs();\n\t\t$init_events[] = $this->getDirectionsJs();\n\t\t$init_events[] = $this->getPluginsJs();\n\t\t$init_events[] = $this->getPolygonsJs();\n\t\t$init_events[] = $this->getCirclesJs();\n\t\t$init_events[] = $this->getRectanglesJs();\n\n\t\tif (is_array($afterInit))\n\t\t{\n\t\t\tforeach ($afterInit as $ainit)\n\t\t\t\t$init_events[] = $ainit;\n\t\t}\n\t\tif ($this->getGlobalVariable($this->getJsName() . '_info_window'))\n\t\t\t$init_events[] = $this->getJsName() . '_info_window=new google.maps.InfoWindow();';\n\t\tif ($this->getGlobalVariable($this->getJsName() . '_info_box') && $this->resources->itemAt('infobox_config'))\n\t\t\t$init_events[] = $this->getJsName (). '_info_box=new InfoBox('.\n\t\t\t\t$this->resources->itemAt('infobox_config').');';\n\t\t\n\t\t// declare the Google Map Javascript object as global\n\t\t$this->addGlobalVariable($this->getJsName(), 'null');\n\n\t\t$js = $this->getGlobalVariables();\n\n\t\tYii::app()->getClientScript()->registerScript('EGMap_' . $this->getJsName(), $js, CClientScript::POS_HEAD);\n\n\t\t$js = 'function ' . $this->_containerId . '_init(){' . PHP_EOL;\n\t\tforeach ($init_events as $init_event)\n\t\t{\n\t\t\tif ($init_event)\n\t\t\t{\n\t\t\t\t$js .= $init_event . PHP_EOL;\n\t\t\t}\n\t\t}\n\t\t$js .= '\n\t\t\t } google.maps.event.addDomListener(window, \"load\",' . PHP_EOL . $this->_containerId . '_init);' . PHP_EOL;\n\n\t\tYii::app()->getClientScript()->registerScript($this->_containerId . time(), $js, CClientScript::POS_END);\n\t}", "protected function _register_controls() {\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'General Settings', 'essential-addons-elementor' )\n \t\t\t]\n \t\t);\n \t\t$this->add_control(\n\t\t 'eael_google_map_type',\n\t\t \t[\n\t\t \t\t'label' \t=> esc_html__( 'Google Map Type', 'essential-addons-elementor' ),\n\t\t \t'type' \t\t\t=> Controls_Manager::SELECT,\n\t\t \t'default' \t\t=> 'basic',\n\t\t \t'label_block' \t=> false,\n\t\t \t'options' \t\t=> [\n\t\t \t\t'basic' \t=> esc_html__( 'Basic', 'essential-addons-elementor' ),\n\t\t \t\t'marker' \t=> esc_html__( 'Multiple Marker', 'essential-addons-elementor' ),\n\t\t \t\t'static' \t=> esc_html__( 'Static', 'essential-addons-elementor' ),\n\t\t \t\t'polyline' => esc_html__( 'Polyline', 'essential-addons-elementor' ),\n\t\t \t\t'polygon' \t=> esc_html__( 'Polygon', 'essential-addons-elementor' ),\n\t\t \t\t'overlay' \t=> esc_html__( 'Overlay', 'essential-addons-elementor' ),\n\t\t \t\t'routes' \t=> esc_html__( 'With Routes', 'essential-addons-elementor' ),\n\t\t \t\t'panorama' => esc_html__( 'Panorama', 'essential-addons-elementor' ),\n\t\t \t]\n\t\t \t]\n\t\t);\n\t\t$this->add_control(\n 'eael_google_map_address_type',\n [\n 'label' => __( 'Address Type', 'essential-addons-elementor' ),\n 'type' => Controls_Manager::CHOOSE,\n 'options' => [\n\t\t\t\t\t'address' => [\n\t\t\t\t\t\t'title' => __( 'Address', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-map',\n\t\t\t\t\t],\n\t\t\t\t\t'coordinates' => [\n\t\t\t\t\t\t'title' => __( 'Coordinates', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-map-marker',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default' => 'address',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['basic']\n\t\t\t\t]\n ]\n );\n $this->add_control(\n\t\t\t'eael_google_map_addr',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Geo Address', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Marina Bay, Singapore', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_address_type' => ['address'],\n\t\t\t\t\t'eael_google_map_type' => ['basic']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type!' => ['routes'],\n\t\t\t\t\t'eael_google_map_address_type' => ['coordinates']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type!' => ['routes'],\n\t\t\t\t\t'eael_google_map_address_type' => ['coordinates']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t// Only for static\n\t\t$this->add_control(\n\t\t\t'eael_google_map_static_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['static'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_static_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['static'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_resolution_title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Map Image Resolution', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => 'static'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_static_width',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Static Image Width', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 610\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 1400,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => 'static'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_static_height',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Static Image Height', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 300\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 700,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => 'static'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t// Only for Overlay\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['overlay'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['overlay'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t// Only for panorama\n\t\t$this->add_control(\n\t\t\t'eael_google_map_panorama_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['panorama'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_panorama_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['panorama'],\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_content',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Overlay Content', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t'label_block' => True,\n\t\t\t\t'default' => esc_html__( 'Add your content here', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => 'overlay'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n \t\t$this->end_controls_section();\n \t\t/**\n \t\t * Map Settings (With Marker only for Basic)\n \t\t */\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_basic_marker_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'Map Marker Settings', 'essential-addons-elementor' ),\n \t\t\t\t'condition' => [\n \t\t\t\t\t'eael_google_map_type' => ['basic']\n \t\t\t\t]\n \t\t\t]\n \t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_title',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Title', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Google Map Title', 'essential-addons-elementor' )\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_content',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Content', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'default' => esc_html__( 'Google map content', 'essential-addons-elementor' )\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_icon_enable',\n\t\t\t[\n\t\t\t\t'label' => __( 'Custom Marker Icon', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t'default' => 'no',\n\t\t\t\t'label_on' => __( 'Yes', 'essential-addons-elementor' ),\n\t\t\t\t'label_off' => __( 'No', 'essential-addons-elementor' ),\n\t\t\t\t'return_value' => 'yes',\n\t\t\t]\n\t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_icon',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Marker Icon', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t'default' => [\n\t\t\t\t\t// 'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_basic_marker_icon_enable' => 'yes'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_icon_width',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Marker Width', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 32\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 150,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_basic_marker_icon_enable' => 'yes'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_basic_marker_icon_height',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Marker Height', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 32\n\t\t\t\t],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'max' => 150,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_basic_marker_icon_enable' => 'yes'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n \t\t/**\n \t\t * Map Settings (With Marker)\n \t\t */\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_marker_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'Map Marker Settings', 'essential-addons-elementor' ),\n \t\t\t\t'condition' => [\n \t\t\t\t\t'eael_google_map_type' => ['marker', 'polyline', 'routes', 'static']\n \t\t\t\t]\n \t\t\t]\n \t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_markers',\n\t\t\t[\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'seperator' => 'before',\n\t\t\t\t'default' => [\n\t\t\t\t\t[ 'eael_google_map_marker_title' => esc_html__( 'Map Marker 1', 'essential-addons-elementor' ) ],\n\t\t\t\t],\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_lat',\n\t\t\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_lng',\n\t\t\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_title',\n\t\t\t\t\t\t'label' => esc_html__( 'Title', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( 'Marker Title', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_content',\n\t\t\t\t\t\t'label' => esc_html__( 'Content', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( 'Marker Content. You can put html here.', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_icon_color',\n\t\t\t\t\t\t'label' => esc_html__( 'Default Icon Color', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'description' => esc_html__( '(Works only on Static mode)', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t\t\t'default' => '#e23a47',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_icon_enable',\n\t\t\t\t\t\t'label' => __( 'Use Custom Icon', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::SWITCHER,\n\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t'label_on' => __( 'Yes', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'label_off' => __( 'No', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'return_value' => 'yes',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_marker_icon',\n\t\t\t\t\t\t'label' => esc_html__( 'Custom Icon', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::MEDIA,\n\t\t\t\t\t\t'default' => [\n\t\t\t\t\t\t\t// 'url' => Utils::get_placeholder_image_src(),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'eael_google_map_marker_icon_enable' => 'yes'\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'name' => 'eael_google_map_marker_icon_width',\n\t\t\t\t\t\t'label' => esc_html__( 'Icon Width', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t\t\t'default' => esc_html__( '32', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'eael_google_map_marker_icon_enable' => 'yes'\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'name' => 'eael_google_map_marker_icon_height',\n\t\t\t\t\t\t'label' => esc_html__( 'Icon Height', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t\t\t'default' => esc_html__( '32', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'condition' => [\n\t\t\t\t\t\t\t'eael_google_map_marker_icon_enable' => 'yes'\n\t\t\t\t\t\t]\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'title_field' => '{{eael_google_map_marker_title}}',\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\n\n \t\t/**\n \t\t * Polyline Coordinates Settings (Polyline)\n \t\t */\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_polyline_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'Coordinate Settings', 'essential-addons-elementor' ),\n \t\t\t\t'condition' => [\n \t\t\t\t\t'eael_google_map_type' => ['polyline', 'polygon']\n \t\t\t\t]\n \t\t\t]\n \t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_polylines',\n\t\t\t[\n\t\t\t\t'type' => Controls_Manager::REPEATER,\n\t\t\t\t'seperator' => 'before',\n\t\t\t\t'default' => [\n\t\t\t\t\t[ 'eael_google_map_polyline_title' => esc_html__( '#1', 'essential-addons-elementor' ) ],\n\t\t\t\t],\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_polyline_title',\n\t\t\t\t\t\t'label' => esc_html__( 'Title', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '#', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_polyline_lat',\n\t\t\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'name' => 'eael_google_map_polyline_lng',\n\t\t\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\t\t'label_block' => true,\n\t\t\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'title_field' => '{{eael_google_map_polyline_title}}',\n\t\t\t]\n\t\t);\n \t\t$this->end_controls_section();\n\n \t\t/**\n \t\t * Routes Coordinates Settings (Routes)\n \t\t */\n \t\t$this->start_controls_section(\n \t\t\t'eael_section_google_map_routes_settings',\n \t\t\t[\n \t\t\t\t'label' => esc_html__( 'Routes Coordinate Settings', 'essential-addons-elementor' ),\n \t\t\t\t'condition' => [\n \t\t\t\t\t'eael_google_map_type' => ['routes']\n \t\t\t\t]\n \t\t\t]\n \t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_routes_origin',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Origin', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'after',\n\t\t\t]\n\t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_routes_origin_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2925005', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_routes_origin_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8665551', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_routes_dest',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Destination', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'after',\n\t\t\t]\n\t\t);\n \t\t$this->add_control(\n\t\t\t'eael_google_map_routes_dest_lat',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Latitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '1.2833808', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_routes_dest_lng',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Longitude', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '103.8585377', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t \t'eael_google_map_routes_travel_mode',\n\t\t \t[\n\t\t \t\t'label' \t=> esc_html__( 'Travel Mode', 'essential-addons-elementor' ),\n\t\t \t'type' \t\t\t=> Controls_Manager::SELECT,\n\t\t \t'default' \t\t=> 'walking',\n\t\t \t'label_block' \t=> false,\n\t\t \t'options' \t\t=> [\n\t\t \t\t'walking' \t=> esc_html__( 'Walking', 'essential-addons-elementor' ),\n\t\t \t\t'bicycling' => esc_html__( 'Bicycling', 'essential-addons-elementor' ),\n\t\t \t\t'driving' \t=> esc_html__( 'Driving', 'essential-addons-elementor' ),\n\t\t \t]\n\t\t \t]\n\t\t);\n \t\t$this->end_controls_section();\n\n\t\t$this->start_controls_section(\n\t\t\t'section_map_controls',\n\t\t\t[\n\t\t\t\t'label'\t=> esc_html__( 'Map Controls', 'essential-addons-elementor' )\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_zoom',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Zoom Level', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::NUMBER,\n\t\t\t\t'label_block' => false,\n\t\t\t\t'default' => esc_html__( '14', 'essential-addons-elementor' ),\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_streeview_control',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Street View Controls', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'true',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'true',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_type_control',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Map Type Control', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_zoom_control',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Zoom Control', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_fullscreen_control',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Fullscreen Control', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_map_scroll_zoom',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Scroll Wheel Zoom', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n 'label_on' => __( 'On', 'essential-addons-elementor' ),\n 'label_off' => __( 'Off', 'essential-addons-elementor' ),\n 'return_value' => 'yes',\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\t\t \n\t\t/**\n \t\t * Map Theme Settings\n \t\t */\n \t\t$this->start_controls_section(\n\t\t\t'eael_section_google_map_theme_settings',\n\t\t\t[\n\t\t\t\t'label'\t\t=> esc_html__( 'Map Theme', 'essential-addons-elementor' ),\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type!'\t=> ['static', 'panorama']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n 'eael_google_map_theme_source',\n [\n 'label'\t\t=> __( 'Theme Source', 'essential-addons-elementor' ),\n\t\t\t\t'type'\t\t=> Controls_Manager::CHOOSE,\n 'options' => [\n\t\t\t\t\t'gstandard' => [\n\t\t\t\t\t\t'title' => __( 'Google Standard', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-map',\n\t\t\t\t\t],\n\t\t\t\t\t'snazzymaps' => [\n\t\t\t\t\t\t'title' => __( 'Snazzy Maps', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-map-marker',\n\t\t\t\t\t],\n\t\t\t\t\t'custom' => [\n\t\t\t\t\t\t'title' => __( 'Custom', 'essential-addons-elementor' ),\n\t\t\t\t\t\t'icon' => 'fa fa-edit',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'default'\t=> 'gstandard'\n ]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_gstandards',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Google Themes', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'default' => 'standard',\n\t\t\t\t'options' => [\n\t\t\t\t\t'standard' => __( 'Standard', 'essential-addons-elementor' ),\n\t\t\t\t\t'silver' => __( 'Silver', 'essential-addons-elementor' ),\n\t\t\t\t\t'retro' => __( 'Retro', 'essential-addons-elementor' ),\n\t\t\t\t\t'dark' => __( 'Dark', 'essential-addons-elementor' ),\n\t\t\t\t\t'night' => __( 'Night', 'essential-addons-elementor' ),\n\t\t\t\t\t'aubergine' => __( 'Aubergine', 'essential-addons-elementor' )\n\t\t\t\t],\n\t\t\t\t'description' => sprintf( '<a href=\"https://mapstyle.withgoogle.com/\" target=\"_blank\">%1$s</a> %2$s',__( 'Click here', 'essential-addons-elementor' ), __( 'to generate your own theme and use JSON within Custom style field.', 'essential-addons-elementor' ) ),\n\t\t\t\t'condition'\t=> [\n\t\t\t\t\t'eael_google_map_theme_source'\t=> 'gstandard'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_snazzymaps',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'SnazzyMaps Themes', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SELECT,\n\t\t\t\t'label_block'\t\t\t=> true,\n\t\t\t\t'default' => 'colorful',\n\t\t\t\t'options' => [\n\t\t\t\t\t'default'\t\t=> __( 'Default', 'essential-addons-elementor' ),\n\t\t\t\t\t'simple'\t\t=> __( 'Simple', 'essential-addons-elementor' ),\n\t\t\t\t\t'colorful'\t\t=> __( 'Colorful', 'essential-addons-elementor' ),\n\t\t\t\t\t'complex'\t\t=> __( 'Complex', 'essential-addons-elementor' ),\n\t\t\t\t\t'dark'\t\t\t=> __( 'Dark', 'essential-addons-elementor' ),\n\t\t\t\t\t'greyscale'\t\t=> __( 'Greyscale', 'essential-addons-elementor' ),\n\t\t\t\t\t'light'\t\t\t=> __( 'Light', 'essential-addons-elementor' ),\n\t\t\t\t\t'monochrome'\t=> __( 'Monochrome', 'essential-addons-elementor' ),\n\t\t\t\t\t'nolabels'\t\t=> __( 'No Labels', 'essential-addons-elementor' ),\n\t\t\t\t\t'twotone'\t\t=> __( 'Two Tone', 'essential-addons-elementor' )\n\t\t\t\t],\n\t\t\t\t'description' => sprintf( '<a href=\"https://snazzymaps.com/explore\" target=\"_blank\">%1$s</a> %2$s',__( 'Click here', 'essential-addons-elementor' ), __( 'to explore more themes and use JSON within custom style field.', 'essential-addons-elementor' ) ),\n\t\t\t\t'condition'\t=> [\n\t\t\t\t\t'eael_google_map_theme_source'\t=> 'snazzymaps'\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_custom_style',\n\t\t\t[\n\t\t\t\t'label' => __( 'Custom Style', 'essential-addons-elementor' ),\n\t\t\t\t'description' => sprintf( '<a href=\"https://mapstyle.withgoogle.com/\" target=\"_blank\">%1$s</a> %2$s',__( 'Click here', 'essential-addons-elementor' ), __( 'to get JSON style code to style your map', 'essential-addons-elementor' ) ),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n 'condition' => [\n 'eael_google_map_theme_source' => 'custom',\n ],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section(); \n \t\t/**\n\t\t * -------------------------------------------\n\t\t * Tab Style Google Map Style\n\t\t * -------------------------------------------\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'eael_section_google_map_style_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'General Style', 'essential-addons-elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_max_width',\n\t\t\t[\n\t\t\t\t'label' => __( 'Max Width', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 1140,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1400,\n\t\t\t\t\t\t'step' => 10,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-google-map' => 'max-width: {{SIZE}}{{UNIT}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_max_height',\n\t\t\t[\n\t\t\t\t'label' => __( 'Max Height', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 400,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1400,\n\t\t\t\t\t\t'step' => 10,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-google-map' => 'height: {{SIZE}}{{UNIT}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_margin',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%' ],\n\t\t\t\t'selectors' => [\n\t \t\t\t\t\t'{{WRAPPER}} .eael-google-map' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t \t\t\t],\n\t\t\t]\n\t\t);\n\n \t\t$this->end_controls_section();\n\n \t\t/**\n\t\t * -------------------------------------------\n\t\t * Tab Style Google Map Style\n\t\t * -------------------------------------------\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'eael_section_google_map_overlay_style_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Overlay Style', 'essential-addons-elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['overlay']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_overlay_width',\n\t\t\t[\n\t\t\t\t'label' => __( 'Width', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 200,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 1100,\n\t\t\t\t\t\t'step' => 10,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'width: {{SIZE}}{{UNIT}};',\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_bg_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Background Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#fff',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'background-color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_mapoverlay_padding',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Padding', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%' ],\n\t\t\t\t'selectors' => [\n\t \t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t \t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_overlay_margin',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Margin', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%' ],\n\t\t\t\t'selectors' => [\n\t \t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t \t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Border::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'eael_google_map_overlay_border',\n\t\t\t\t'label' => esc_html__( 'Border', 'essential-addons-elementor' ),\n\t\t\t\t'selector' => '{{WRAPPER}} .eael-gmap-overlay',\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_overlay_border_radius',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Border Radius', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => [ 'px', 'em', '%' ],\n\t\t\t\t'selectors' => [\n\t \t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t \t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Box_Shadow::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'eael_google_map_overlay_box_shadow',\n\t\t\t\t'selector' => '{{WRAPPER}} .eael-gmap-overlay',\n\t\t\t]\n\t\t);\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\t[\n \t'name' => 'eael_google_map_overlay_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .eael-gmap-overlay',\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_overlay_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#222',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .eael-gmap-overlay' => 'color: {{VALUE}};',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\n\t\t/**\n\t\t * -------------------------------------------\n\t\t * Tab Style Google Map Stroke Style\n\t\t * -------------------------------------------\n\t\t */\n\t\t$this->start_controls_section(\n\t\t\t'eael_section_google_map_stroke_style_settings',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Stroke Style', 'essential-addons-elementor' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['polyline', 'polygon', 'routes']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_stroke_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#e23a47',\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_stroke_opacity',\n\t\t\t[\n\t\t\t\t'label' => __( 'Opacity', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 0.8,\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0.2,\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_stroke_weight',\n\t\t\t[\n\t\t\t\t'label' => __( 'Weight', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 4,\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t$this->add_control(\n\t\t\t'eael_google_map_stroke_fill_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Fill Color', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '#e23a47',\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['polygon']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'eael_google_map_stroke_fill_opacity',\n\t\t\t[\n\t\t\t\t'label' => __( 'Fill Opacity', 'essential-addons-elementor' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'default' => [\n\t\t\t\t\t'size' => 0.4,\n\t\t\t\t],\n\t\t\t\t'size_units' => [ 'px' ],\n\t\t\t\t'range' => [\n\t\t\t\t\t'px' => [\n\t\t\t\t\t\t'min' => 0.2,\n\t\t\t\t\t\t'max' => 1,\n\t\t\t\t\t\t'step' => 0.1,\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t'condition' => [\n\t\t\t\t\t'eael_google_map_type' => ['polygon']\n\t\t\t\t]\n\t\t\t]\n\t\t);\n\t\t$this->end_controls_section();\n\t}", "public function getGMapClient()\n\t{\n\t\tif (null === $this->gMapClient)\n\t\t\t$this->gMapClient = new EGMapClient();\n\n\t\treturn $this->gMapClient;\n\t}", "function mf_render_google_maps($post_id, $width=395,$height=395){\n\t\n\t\n\t//get map meta data from datbase, based on ID\n\t$meta_from_id = get_post_meta($post_id, 'mf_SALF_maps_meta_map');\n\t//if nothing found, return false. End Function.\n\tif(count($meta_from_id)<1) return false; \n\t\n\t//get link element and trim it\n\t$map_link = trim($meta_from_id[0]);\n\t\n\t\n\t\n\t$html_return = '<iframe class=\"google-map\" width=\"'.$width.'\" height=\"'.$height.'\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"';\n\t$html_return .= $map_link;\n\t\n\t$html_return .= '&amp;output=embed\"></iframe>';\n\t\n\t\n\t\n\t$_SESSION['maps_debug']= $html_return;\n\treturn $html_return;\n}", "protected function define(MapperDefinition $map)\n {\n $map->type(LatLng::class);\n\n // 8 decimal places should be plenty accurate as per\n // @see https://en.wikipedia.org/wiki/Decimal_degrees#Precision\n\n // Lat: 2 figures as within -90 to 90\n $map->property(LatLng::LAT)->to($this->latColumnName)->asDecimal(10, 8);\n\n // Lng: 3 figures as within -180 to 180\n $map->property(LatLng::LNG)->to($this->lngColumnName)->asDecimal(11, 8);\n }", "public function getMap($burn_id)\n {\n\n $zoom_to_fit = true;\n $control_title = \"Zoom to Burn Request\";\n\n $burn = $this->get($burn_id);\n $marker = $burn['location'];\n $day_iso = json_decode($burn['day_iso'], true);\n $night_iso = json_decode($burn['night_iso'], true);\n $burn_status = $this->retrieveStatus($burn['status_id']);\n\n global $map_center;\n\n $center_control = \"\n function centerControl(controlDiv, map) {\n // Control Div CSS\n controlDiv.style.padding = '5px';\n\n // Control Border CSS\n var controlUI = document.createElement('div');\n controlUI.style.backgroundColor = 'white';\n controlUI.style.borderStyle = 'solid';\n controlUI.style.borderWidth = '1px';\n controlUI.style.borderColor = '#999999';\n controlUI.style.borderOpacity = '0.7';\n controlUI.style.borderRadius = '2px';\n controlUI.style.cursor = 'pointer';\n controlUI.style.textAlign = 'center';\n controlUI.title = 'Click to return to the boundary';\n controlDiv.appendChild(controlUI);\n\n // Set CSS for the control interior\n var controlText = document.createElement('div');\n controlText.style.fontFamily = '\\\"Helvetica Neue\\\",Helvetica,Arial,sans-serif';\n controlText.style.fontSize = '12px';\n controlText.style.paddingLeft = '6px';\n controlText.style.paddingRight = '6px';\n controlText.innerHTML = '<b>$control_title</b>';\n controlUI.appendChild(controlText);\n\n google.maps.event.addDomListener(controlUI, 'click', function() {\n map.setZoom(11);\n map.panTo(marker.position);\n });\n\n }\";\n\n if ($zoom_to_fit == true) {\n $zoom = \"map.setZoom(11);\n map.panTo(marker.position);\";\n } else {\n $zoom = \"\";\n }\n\n if (!empty($boundary)) {\n $center = \"zoom: 6,\n center: new google.maps.LatLng($map_center),\";\n $latlng = explode(' ', str_replace(array(\"(\", \")\", \",\"), \"\", $boundary));\n $json_str = \"{ne:{lat:\".$latlng[2].\",lon:\".$latlng[3].\"},sw:{lat:\".$latlng[0].\",lon:\".$latlng[1].\"}}\";\n\n $bounds = \"\n // extend it using my two points\n var latlng = $json_str\n\n var bounds = new google.maps.LatLngBounds(\n new google.maps.LatLng(latlng.sw.lat,latlng.sw.lon),\n new google.maps.LatLng(latlng.ne.lat,latlng.ne.lon)\n );\n\n var rectangle = new google.maps.Rectangle({\n strokeColor: '#000',\n strokeOpacity: 0.4,\n strokeWeight: 2,\n fillColor: '#000',\n fillOpacity: 0.1,\n bounds: bounds,\n });\n\n rectangle.setMap(map);\";\n\n } else {\n $center = \"zoom: 10,\n center: new google.maps.LatLng($map_center),\";\n $bounds = \"\";\n }\n\n if (!empty($marker)) {\n $marker_latlng = explode(' ', str_replace(array(\"(\",\")\",\",\"), \"\", $marker));\n $marker_json_str = \"{lat:\".$marker_latlng[0].\",lon:\".$marker_latlng[1].\"}\";\n\n $marker = \"\n var marker_latlng = $marker_json_str\n\n var marker_center = new google.maps.LatLng(marker_latlng.lat, marker_latlng.lon);\n\n if (checkLegacy()) {\n var marker = new google.maps.Marker({\n position: marker_center,\n });\n } else {\n var marker = new google.maps.Marker({\n position: marker_center,\n icon: {\n path: google.maps.SymbolPath.CIRCLE,\n scale: 6,\n strokeColor: '#333',\n strokeOpacity: 1,\n strokeWeight: 1,\n fillColor: '\".$burn_status['color'].\"',\n fillOpacity: 1\n },\n });\n }\n\n marker.setMap(map)\n \";\n } else {\n $center = \"zoom: 10,\n center: new google.maps.LatLng(34.4,-111.8),\";\n $marker = \"\n var marker_center = bounds.getCenter();\n\n var marker = new google.maps.Marker({\n position: marker_center,\n draggable: true,\n });\n\n marker.setMap(map)\n \";\n }\n\n if (!empty($day_iso)) {\n $color = $this->day_iso_color;\n $day_iso = \"var day_iso = new isosceles(map, marker, {$day_iso['initDeg']}, {$day_iso['finalDeg']}, {$day_iso['amplitude']}, '{$color}')\";\n }\n\n if (!empty($night_iso)) {\n $color = $this->night_iso_color;\n $night_iso = \"var day_iso = new isosceles(map, marker, {$night_iso['initDeg']}, {$night_iso['finalDeg']}, {$night_iso['amplitude']}, '{$color}')\";\n }\n\n $html = \"\n <style>\n #map$id {\n $style\n }\n\n .map-canvas {height:348px;}\n\n div.stations2 svg {\n position: absolute;\n }\n </style>\n <div class=\\\"map-canvas\\\" id=\\\"map$id\\\"></div>\n <script>\n\n $center_control\n\n var map = new google.maps.Map(document.getElementById('map$id'), {\n $center\n mapTypeId: google.maps.MapTypeId.TERRAIN,\n panControl: false,\n zoomControl: true,\n mapTypeControl: false,\n streetViewControl: false,\n scrollwheel: false\n });\n\n var homeControlDiv = document.createElement('div');\n var homeControl = new centerControl(homeControlDiv, map);\n\n homeControlDiv.index = 1;\n map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv);\n\n google.maps.event.trigger(map,'resize');\n\n $bounds\n\n $marker\n\n $zoom\n\n $day_iso\n\n $night_iso\n\n var Overlay = new Overlay();\n Overlay.setControls(map);\n\n </script>\n \";\n\n return $html;\n }", "public function getGMapStaticUrl( $width = 300, $height = 200, $zoom = 11 )\n {\n return 'http://maps.google.com/maps/api/staticmap?' .\n 'markers=color:blue|label:|' . urlencode($this->getAddressStringSingleLine()) .\n '&zoom=' . $zoom .\n '&size=' . $width . 'x' . $height .\n '&sensor=false';\n }" ]
[ "0.7098154", "0.6853707", "0.6699524", "0.6583248", "0.6495953", "0.6489559", "0.64703095", "0.64691424", "0.64638376", "0.6461891", "0.6453968", "0.6371167", "0.6317142", "0.6273739", "0.6186014", "0.6145094", "0.61420304", "0.6084451", "0.6033601", "0.5996493", "0.5963358", "0.5951862", "0.5902028", "0.58927274", "0.58597994", "0.5831168", "0.5827594", "0.5805787", "0.5804721", "0.5786727", "0.5786386", "0.5777277", "0.5774968", "0.57719845", "0.5740207", "0.57319236", "0.57011807", "0.5698677", "0.56934536", "0.5692837", "0.568812", "0.5681475", "0.5672726", "0.5664804", "0.5662562", "0.5659478", "0.56518626", "0.5651481", "0.5650479", "0.5646021", "0.5642036", "0.56167173", "0.5616088", "0.5613846", "0.56051075", "0.56004673", "0.5593662", "0.5587978", "0.55633944", "0.5560574", "0.5539042", "0.55286497", "0.5526513", "0.551475", "0.55146104", "0.5513748", "0.5505064", "0.54868096", "0.5480462", "0.54663414", "0.54630107", "0.5449575", "0.5449368", "0.5445446", "0.54394686", "0.54360336", "0.54006076", "0.53993493", "0.5386559", "0.53662324", "0.5361189", "0.5359003", "0.53496945", "0.5342989", "0.53315455", "0.53311735", "0.5330312", "0.53286964", "0.532835", "0.53260005", "0.5321229", "0.5291857", "0.52783006", "0.5278053", "0.5257531", "0.52560914", "0.5254416", "0.5251511", "0.52352166", "0.5222242", "0.51993424" ]
0.0
-1
Generate the JS code of the map
public function getGoogleMapJS() { if(!isset($oGoogleMapService)) $oGoogleMapService = Phpfox::getService('gmap.googlemap'); return $oGoogleMapService->getGoogleMap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateJavaScript($mapName) { \n $code = \"new google.maps.Marker ({\\n\";\n $code .= \"\\t position: \".$this->_position->getJavaScript().\",\\n\";\n $code .= \"\\t map: {$mapName},\\n\";\n if (!empty($this->_icon)) {\n $code .= \"\\t icon: \\\"{$this->_icon}\\\",\\n\";\n }\n $code .= \"\\t title: \\\"{$this->_title}\\\", \\n\";\n $code .= $this->_generateExtraData();\n $code .= \"});\\n\\n\"; \n return $code;\n }", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "protected function generateJson(){\n\n $sourceMap = array();\n $mappings = $this->generateMappings();\n\n // File version (always the first entry in the object) and must be a positive integer.\n $sourceMap['version'] = self::VERSION;\n\n\n // An optional name of the generated code that this source map is associated with.\n $file = $this->getOption('sourceMapFilename');\n if( $file ){\n $sourceMap['file'] = $file;\n }\n\n\n // An optional source root, useful for relocating source files on a server or removing repeated values in the 'sources' entry.\tThis value is prepended to the individual entries in the 'source' field.\n $root = $this->getOption('sourceRoot');\n if( $root ){\n $sourceMap['sourceRoot'] = $root;\n }\n\n\n // A list of original sources used by the 'mappings' entry.\n $sourceMap['sources'] = array();\n foreach($this->sources as $source_uri => $source_filename){\n $sourceMap['sources'][] = $this->normalizeFilename($source_filename);\n }\n\n\n // A list of symbol names used by the 'mappings' entry.\n $sourceMap['names'] = array();\n\n // A string with the encoded mapping data.\n $sourceMap['mappings'] = $mappings;\n\n if( $this->getOption('outputSourceFiles') ){\n // An optional list of source content, useful when the 'source' can't be hosted.\n // The contents are listed in the same order as the sources above.\n // 'null' may be used if some original sources should be retrieved by name.\n $sourceMap['sourcesContent'] = $this->getSourcesContent();\n }\n\n // less.js compat fixes\n if( count($sourceMap['sources']) && empty($sourceMap['sourceRoot']) ){\n unset($sourceMap['sourceRoot']);\n }\n\n return json_encode($sourceMap);\n }", "public function getCode()\n {\n parent::getCode();\n $js = sprintf('var %s = new GPoint(%s, %s);',\n $this->getVarName(),\n $this->x,\n $this->y);\n return $js;\n }", "public function output_map() {\n\n\t\tif ( $this->lat && $this->lng ) {\n\n\t\t\t$this->generate_map_lat_lng();\n\n\t\t} else {\n\n\t\t\t$this->generate_map_address();\n\t\t}\n\n\t\t?>\n\n\t\t<script src=\"https://maps.googleapis.com/maps/api/js?callback=initMap\"\n\t\t async defer></script>\n\n\t\t<div class=\"google-map-outer-wrapper\">\n\n\t\t\t<div id=\"map\"></div>\n\n\t\t</div>\n\n\t<?php }", "function getJs () {\n // some settings for controlling\n\n\t\t// map type\n\t\t$markerArray['###MAP_TYPE_MAPNIK###'] = $markerArray['###MAP_TYPE_TAH###'] = 0;\n\t\tif ($this->config['mapType'] != '') {\n\t\t\t// mapnik typoe\n\t\t\tif (strpos($this->config['mapType'], 'MAPNIK') !== FALSE) {\n\t\t\t\t$this->config['mapType'] = t3lib_div::rmFromList('MAPNIK', $this->config['mapType']);\n\t\t\t\t$markerArray['###MAP_TYPE_MAPNIK###'] = 1;\n\t\t\t\t$markerArray['###MAP_TYPE_MAPNIK_TITLE###'] = $this->conf['map.']['mapnik_title'];\n\t\t\t}\n\t\t\t// tiles@home typoe\n\t\t\tif (strpos($this->config['mapType'], 'TAH') !== FALSE) {\n\t\t\t\t$this->config['mapType'] = t3lib_div::rmFromList('TAH', $this->config['mapType']);\n\t\t\t\t$markerArray['###MAP_TYPE_TAH###'] = 1;\n\t\t\t\t$markerArray['###MAP_TYPE_TAH_TITLE###'] = $this->conf['map.']['tah_title'];\n\t\t\t}\n\n\t\t\t// check again because could be that mapnik / TAH are the only one selected\n\t\t\tif ($this->config['mapType'] == '') {\n\t\t\t\t$this->config['mapType'] = 'G_NORMAL_MAP';\n\t\t\t}\n\n\t\t\t$markerArray['###MAP_TYPES###'] = ',{mapTypes:[' . $this->config['mapType'] . ']}';\n\n\t\t}\n\n\t\tswitch ($this->config['mapNavControl']) {\n\t\t\tcase 'small':\n\t\t\tcase 1:\n\t\t\t\t$settings = 'map.addControl(new GSmallMapControl());';\n\t\t\t\tbreak;\n\t\t\tcase 'large':\n\t\t\tcase 2:\n\t\t\t\t$settings = 'map.addControl(new GLargeMapControl());';\n\t\t\t\tbreak;\n\t\t}\n\t\tif ($this->config['mapTypeControl'] == 'show' || $this->config['mapTypeControl'] == '1') {\n\t\t\t$settings .= 'map.addControl(new GMapTypeControl());';\n\t\t}\n\t\tif ($this->config['mapOverview'] == 1) {\n\t\t\t$settings .= 'map.addControl(new GOverviewMapControl());';\n\t\t}\n\n\t\tif ($this->config['mapControlOnMouseOver'] == 1) {\n\t\t\t$hideControlsOnMouseOut = 'map.hideControls();\n\t\t\t\tGEvent.addListener(map, \"mouseover\", function(){\n\t\t\t\tmap.showControls();\n\t\t\t\t});\n\t\t\t\tGEvent.addListener(map, \"mouseout\", function(){\n\t\t\t\tmap.hideControls();\n\t\t\t\t});';\n\t\t}\n\t\tif ($this->conf['enableDoubleClickZoom'] == 1) {\n\t\t\t$settings .= 'map.enableDoubleClickZoom();';\n\t\t}\n\t\tif ($this->conf['enableContinuousZoom'] == 1) {\n\t\t\t$settings .= 'map.enableContinuousZoom();';\n\t\t}\n\t\tif ($this->conf['enableScrollWheelZoom'] == 1) {\n\t\t\t$settings .= 'map.enableScrollWheelZoom();';\n\t\t}\n\n\t\t// urls\n\t\t$xmlUrlConf = $this->conf['xmlURL.'];\n\n\t\t\t// disable realurl for the xml url\n\t\t$realurlTmp = $GLOBALS['TSFE']->config['config']['tx_realurl_enable'];\n\t\t$GLOBALS['TSFE']->config['config']['tx_realurl_enable'] = 0;\n\t\t$url = $this->cObj2->typolink('', $xmlUrlConf);\n\t\t$GLOBALS['TSFE']->config['config']['tx_realurl_enable'] = $realurlTmp;\n\n\n\n\t\t$urlForIcons = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'uploads/tx_rggooglemap/';\n\t\t$urlExt = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . t3lib_extMgm::siteRelpath('rggooglemap');\n\n\t\t// records for the selected categories\n\t\tif ($this->config['categoriesActive'] != '') {\n\t\t\t$selectedCat = 'var cat = new Array();\n\t\t\tcat[\"cb\"] = new Object();';\n\t\t\t$cats = t3lib_div::trimExplode(',', $this->config['categoriesActive']);\n\t\t\tforeach ($cats as $key => $value) {\n\t\t\t\t$selectedCat .= 'cat[\"cb\"]['.$value.'] = ' . $value . ';';\n\t\t\t}\n\t\t\t$selectedCat .= ' tx_rggooglemap_pi1processCat(cat);';\n\t\t} else {\n\t\t\t$selectedCat = ' tx_rggooglemap_pi1processCat(\"default\");';\n\t\t}\n\n\t\t// use cluster, default = 0\n\t\tswitch ($this->conf['map.']['activateCluster']) {\n\t\t\tcase 1:\n\t\t\t\t$addMarker = 'clusterer.AddMarker(marker,title);';\n\t\t\t\t$markerArray['###MAP_CLUSTER###'] = 1;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$addMarker = 'map.addOverlay( marker );';\n\t\t\t\t$markerArray['###MAP_CLUSTER###'] = 2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$addMarker = 'map.addOverlay( marker );';\n\t\t\t\t$markerArray['###MAP_CLUSTER###'] = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$markerArray['###HIDECONTROLSMOUSEOUT###'] = $hideControlsOnMouseOut;\n\t\t$markerArray['###POI_ON_START###'] = $this->getPoiOnStart();\n\t\t$markerArray['###SETTINGS###'] = $settings;\n\t\t$markerArray['###MAP_ZOOM###'] = $this->config['mapZoom'];\n\t\t$markerArray['###MAP_LNG###'] = $this->config['mapLng'];\n\t\t$markerArray['###MAP_LAT###'] = $this->config['mapLat'];\n\t\t$markerArray['###MAP_DIV###'] = $this->config['mapDiv'];\n\t\t$markerArray['###SELECTED_CAT###'] = $selectedCat;\n\t\t$markerArray['###ADD_MARKER###'] = $addMarker;\n\t\t$markerArray['###URL_ICONS###'] = $urlForIcons;\n\t\t$markerArray['###URL###'] = $url;\n\t\t$markerArray['###BOUNDS###'] = intval($this->config['useBoundsOnStart']);\n\t\t$markerArray['###DEBUG###'] = ($this->conf['map.']['debug']==1) ? '' : '//';\n\n\t\t// get coordinates from user's browser\n\t\t$markerArray['###USE_USER_LOCATION###'] = intval($this->conf['map.']['useUserLocationForMapCenter']) == 1 ? 1 : 0;\n\t\t$markerArray['###USE_USER_LOCATION_ZOOMLEVEL###'] = intval($this->conf['map.']['useUserLocationForMapCenter.']['zoomLevel']) == 0 ? 0 : intval($this->conf['map.']['useUserLocationForMapCenter.']['zoomLevel']);\n\n\t\t// create the gicons JS, needed for valid sizes, don't trust JS on that...\n\t\t$gicon = '';\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,image', 'tx_rggooglemap_cat', 'hidden=0 AND deleted=0');\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\n\t\t\t// set the correct paths if no icon is found\n\t\t\tif ($row['image'] == '') {\n\t\t\t\t$iconPath = $this->conf['map.']['defaultIcon'];\n\t\t\t\t$iconPathJS\t= t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $this->conf['map.']['defaultIcon'];\n\t\t\t} else {\n\t\t\t\t$iconPath = 'uploads/tx_rggooglemap/' . $row['image'];\n\t\t\t\t$iconPathJS\t= $urlForIcons.$row['image'];\n\t\t\t}\n\n\t\t\t$iconSize = @getimagesize($iconPath);\n\n\t\t\t// If icon size can't be get with php, use settings from TS\n\t\t\tif (!is_array($iconSize)) {\n\t\t\t\t$iconSizeConf = $this->conf['map.']['iconSize.'];\n\n\t\t\t\t$current = $row['uid'] . '.';\n\t\t\t\t$width = (intval($iconSizeConf[$current]['width']) > 0) ? intval($iconSizeConf[$current]['width']) : intval($iconSizeConf['default.']['width']);\n\t\t\t\t$height = (intval($iconSizeConf[$current]['height']) > 0) ? intval($iconSizeConf[$current]['height']) : intval($iconSizeConf['default.']['height']);\n\t\t\t} else {\n\t\t\t\t$width = $iconSize[0];\n\t\t\t\t$height = $iconSize[1];\n\t\t\t}\n\n\t\t\t$key = 'gicons[' . $row['uid'] . ']';\n\t\t\t$gicon .= $key . '= new GIcon(baseIcon);' . chr(10);\n\t\t\t$gicon .= $key . '.image = \"'.$iconPathJS.'\";' . chr(10);\n\t\t\t$gicon .= $key . '.iconSize = new GSize('.$width.', '.$height.');' . chr(10);\n\t\t\t$gicon .= $key . '.iconAnchor = new GPoint(' . ($width / 2) . ', ' . ($height / 2) . ');' . chr(10);\n\t\t\t$gicon .= $key . '.infoWindowAnchor = new GPoint(' . ($width / 2) . ', ' . ($height / 2) . ');' . chr(10) . chr(10);\n\t\t}\n\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res);\n\n\t\t$markerArray['###GICONS###'] = $gicon;\n\n\t\tif ($this->conf['map.']['activateCluster'] == 3) {\n\t\t\t$icon = str_replace('###CURRENT_URL###', t3lib_div::getIndpEnv('TYPO3_SITE_URL'), $this->conf['map.']['activateCluster.']['3.']['icon']);\n\t\t\t$markerArray['###GICONS###'].= $icon;\n\t\t}\n\n\t\t\t// Hook for adding client-processing code for the additional datasets which were generated within method getJs()\n\t\t$markerArray['###PROCESS_DATASETS###'] = '';\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rggooglemap']['datasetHook'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rggooglemap']['datasetHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t\t// Test if method exists as it might make sense not creating it for each corresponding hook entry\n\t\t\t\tif (method_exists($_procObj, 'getDatasetJSProcessing')) {\n\t\t\t\t\t$markerArray['###PROCESS_DATASETS###'] .= $_procObj->getDatasetJSProcessing($this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// Hook for processing of extra javascript\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rggooglemap']['extraGetJsHook'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rggooglemap']['extraGetJsHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$markerArray = $_procObj->extraGetJsProcessor($markerArray, $this);\n\t\t\t}\n\t\t}\n\n\t\t$jsTemplateCode = $this->cObj2->fileResource($this->conf['templateFileJS']);\n\t\t$template['all'] = $this->cObj2->getSubpart($jsTemplateCode, '###ALL###');\n\n\t\t$js = $this->cObj2->substituteMarkerArrayCached($template['all'], $markerArray);\n\n\t\treturn $js;\n\t}", "protected function generateMapFile()\n {\n $namespace = $this->getNamespace();\n $class = $this->options['class'];\n\n $php = <<<EOD\n<?php\n\nnamespace $namespace;\n\nuse $namespace\\\\Base\\\\${class}Map as Base${class}Map;\nuse $namespace\\\\${class};\nuse \\\\Pomm\\\\Exception\\\\Exception;\nuse \\\\Pomm\\\\Query\\\\Where;\n\nclass ${class}Map extends Base${class}Map\n{\n}\n\nEOD;\n\n return $php;\n }", "function section__map(){\n return array(\n 'content'=>\"<div style='width:300px; height:300px' style='\n margin-left:auto; margin-right:auto;' id='map'></div>\",\n 'class'=>'main',\n 'label'=>'Map',\n 'order'=>'1'\n );\n }", "protected function generateJavascript()\n\t{\n\t}", "public function getJavascriptCode() {}", "function buildMainMap()\r\n{\r\n\r\n // Add an image first for debug and change asap\r\n //$final_map = \"\r\n//<img class=\\\"main_map\\\" src=\\\"images/heatmapapi.png\\\" />\" ;\r\n\r\n $final_map = \"\r\n<div id=\\\"map\\\"></div>\" ;\r\n\r\n return $final_map ;\r\n}", "public function toJs($map)\n {\n $object = strtolower(basename(self::class));\n $latLngs = Json::encode($this->getLatLngs());\n\n return $this->toJsExpression(\n \"{$map->leafletVar}.$object($latLngs, {$map->options2Js($this->options)})\" .\n $map->events2Js($this->events)\n );\n }", "function buildr_map_script()\n{\n require_code('buildr');\n\n $realm = get_param_integer('realm', null);\n download_map_wrap(get_member(), $realm);\n}", "public function toJs($map)\n {\n return $this->toJsExpression(\"{$map->leafletVar}.Routing.control({$map->options2Js($this->options)})\");\n }", "public function getDirectionsJs()\n\t{\n\t\t$js_code = '';\n\t\tif (null !== $this->resources->itemAt('directions'))\n\t\t{\n\t\t\tforeach ($this->resources->itemAt('directions') as $direction)\n\t\t\t{\n\t\t\t\t$js_code .= $direction->toJs($this->getJsName());\n\t\t\t\t$js_code .= \"\\n \";\n\t\t\t}\n\t\t}\n\t\treturn $js_code;\n\t}", "public function generateI18nJsContent() {\n $data = array();\n\n foreach ($this->_i18n as $k => $v)\n $data[] = strtolower($k) .':\\''. str_replace('\\'', '\\\\\\'', $v) .'\\'';\n\n return 'var language = \\''. $this->_language .'\\', i18n = {'. implode(', ', $data) .'};';\n }", "public function getCompressJavascript() {}", "private function getRequireJsMap(array $map)\n {\n $jsonMap = [];\n foreach ($map as $fileId => $fileInfo) {\n if (!in_array(pathinfo($fileId, PATHINFO_EXTENSION), ['js', 'html'])) {\n continue;\n }\n\n $fileId = '/' . $fileId; // add leading slash to match exclude patterns\n $filePath = $this->minification->addMinifiedSign(str_replace(Repository::FILE_ID_SEPARATOR, '/', $fileId));\n $filePath = substr($filePath, 1); // and remove\n $jsonMap[$filePath] = '../../../../'\n . $fileInfo['area'] . '/' . $fileInfo['theme'] . '/' . $fileInfo['locale'] . '/';\n }\n $jsonMap = json_encode($jsonMap);\n return \"require.config({\\\"config\\\": {\\\"baseUrlInterceptor\\\":{$jsonMap}}});\";\n }", "function generateJS(){\n\t\t\t\t\n\t\t\t\t$strJS = \"\";\n\t\t\t\t\n\t\t\t\t$strJS .= \"var intIdProject = \";\n\t\t\t\t\n\t\t\t\tif($this->getJSSelectedProject() != 0){\n\t\t\t\t\t$strJS .= $this->getJSSelectedProject().\"\\n\";\n\t\t\t\t}else{\n\t\t\t\t\t$strJS .= \"'';\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$strJS .= $this->_JSgenerateArrayProjects();\n\t\t\t\t$strJS .= $this->_JSgenerateFunctions();\n\t\t\t\t\n\t\t\t\treturn $strJS;\n\t\t\t}", "public function getJavaPlacemark(){\n\n\n $res=Posti::model()->findAll();\n $str='';\n foreach($res as $oneres){\n $str.='var myPlacemark = new ymaps.Placemark(\n\t\t\t\t['.$oneres->KoordShir.','.$oneres->KoordDolg.'], {\n\t\t\t\ticonContent: \"'.$oneres->id.'\",\n\t\t\t\tballoonContentHeader: \\'<strong>'.$oneres->name_post.'</strong>\\',\n\t\t\t\tballoonContentBody: \\'Содержимое<em><br>'.\n CHtml::link('Динамика изменения концентрации','index.php?r=posti/dynamiсchart&id='.$oneres->id).\n CHtml::link('<br>Долевая часть','index.php?r=posti/piechart&id='.$oneres->id).\n CHtml::link('<br>информация о посту','index.php?r=posti/view&id='.$oneres->id)\n\t\t\t\t.'</em>\\'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\tpreset: \\'islands#yellowStretchyIcon\\',\n\t\t\t\t}\n\n\t\t\t);\n\t\t\t//--------------------------------------\n\t\t\t';\n $str.='\n myMap.geoObjects.add(myPlacemark);\n ';\n }\n return $str;\n\n\n }", "function generate_map_file(){\n\t\t$map = ms_newMapObj($this->default_map_file);\n\t\t$n_layers = count($this->viewable_layers);\n\t\t// go through and create new \n\t\t// layer objects for those layers\n\t\t// that have their display property set\n\t\t// to true, adding them to the\n\t\t// map object\n\t\tfor($i = 0; $i < $n_layers; $i++){\n\t\t\tif($this->viewable_layers[$i]->display == \"true\"){\n\t\t\t\t$layer = ms_newLayerObj($map);\n\t\t\t\t$layer->set(\"name\", $this->viewable_layers[$i]->layer_name);\n\t\t\t\t$layer->set(\"status\", MS_OFF);\n\t\t\t\t$layer->set(\"template\", \"nepas.html\");\n\t\t\t\t$this->set_ms_layer_type($layer, $this->viewable_layers[$i]);\n\t\t\t\t$layer->set(\"connectiontype\", MS_POSTGIS);\n\t\t\t\t$layer->set(\"connection\", $this->dbconn->mapserver_conn_str);\n\t\t\t\t$this->set_ms_data_string($layer, $this->viewable_layers[$i]);\n\t\t\t\t$layer->setProjection($this->viewable_layers[$i]->layer_proj);\n\t\t\t\t// added to allow getfeatureinfo requests on\n\t\t\t\t// this layer via WMS\n\t\t\t\t$layer->setMetaData(\"WMS_INCLUDE_ITEMS\", \"all\");\n\t\t\t\t// generate a CLASSITEM directive \n\t\t\t\tif($this->viewable_layers[$i]->layer_ms_classitem != \"\")\n\t\t\t\t\t$layer->set(\"classitem\", $this->viewable_layers[$i]->layer_ms_classitem);\n\n\t\t\t\t// generate classes that this\n\t\t\t\t// layer contains\n\t\t\t\t$n_classes = count($this->viewable_layers[$i]->layer_classes);\n\t\t\t\tfor($j = 0; $j < $n_classes; $j++){\n\t\t\t\t\t$ms_class_obj = ms_newClassObj($layer);\n\t\t\t\t\t$ms_class_obj->set(\"name\", $this->viewable_layers[$i]->layer_classes[$j]->name);\n\t\t\t\t\t$ms_class_obj->setExpression($this->viewable_layers[$i]->layer_classes[$j]->expression);\n\t\t\t\t\tforeach($this->viewable_layers[$i]->layer_classes[$j]->styles as $style){\n\t\t\t\t\t\t$ms_style_obj = ms_newStyleObj($ms_class_obj);\n\t\t\t\t\t\t$ms_style_obj->color->setRGB($style->color_r,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->color_g,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->color_b);\n\t\t\t\t\t\t// set bg color\n\t\t\t\t\t\t$ms_style_obj->backgroundcolor->setRGB($style->bgcolor_r,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->bgcolor_g,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->bgcolor_b);\n\t\t\t\t\t\t// set outline color\n\t\t\t\t\t\t$ms_style_obj->outlinecolor->setRGB($style->outlinecolor_r,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->outlinecolor_g,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$style->outlinecolor_b);\n\t\t\t\t\t\tif($style->symbol_name != \"\"){\n\t\t\t\t\t\t\t$ms_style_obj->set(\"symbolname\", $style->symbol_name);\n\t\t\t\t\t\t\t// check for valid size\n\t\t\t\t\t\t\tif($style->symbol_size != \"\")\n\t\t\t\t\t\t\t\t$ms_style_obj->set(\"size\", $style->symbol_size);\n\t\t\t\t\t\t\t// check for valid angle\n\t\t\t\t\t\t\tif($style->angle != \"\")\n\t\t\t\t\t\t\t\t$ms_style_obj->set(\"angle\", $style->angle);\n\t\t\t\t\t\t\t// check for valid width\n\t\t\t\t\t\t\tif($style->width != \"\")\n\t\t\t\t\t\t\t\t$ms_style_obj->set(\"width\", $style->width);\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}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($map->save($this->output_mapfile) == MS_FAILURE){\n\t\t\techo \"mapfile could not be saved\";\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\treturn $this->output_mapfile;\t\n\t}", "public function handleShortcodes($attr, $content)\r\n {\r\n $this->mapNum++;\r\n $mapInfo = $this->getMapDetails($attr, $content);\r\n if (function_exists('json_encode')) {\r\n \t$json = json_encode($mapInfo);\r\n } else {\r\n\t\t\trequire_once('json_encode.php');\r\n \t$json = Zend_Json_Encoder::encode($mapInfo);\r\n\t\t}\r\n\r\n return <<<mapCode\r\n<div id='map_{$this->mapNum}' style='width:{$mapInfo->width}; height:{$mapInfo->height};' class='googleMap'></div>\r\n<div id='dir_{$this->mapNum}'></div>\r\n<script type=\"text/javascript\">\r\n//<![CDATA[\r\nif (GBrowserIsCompatible()) {\r\n wpGMaps.wpNewMap({$this->mapNum}, {$json});\r\n}\r\n//]]>\r\n</script>\r\nmapCode;\r\n }", "public function getMarkersJs()\n\t{\n\t\t$return = '';\n\t\tif (null !== $this->resources->itemAt('markers'))\n\t\t{\n\t\t\tforeach ($this->resources->itemAt('markers') as $marker)\n\t\t\t{\n\t\t\t\t$return .= $marker->toJs($this->getJsName());\n\t\t\t\tif (null !== $this->_markerClusterer)\n\t\t\t\t\t$this->_markerClusterer->addMarker($marker);\n\t\t\t\t$return .= \"\\n \";\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "public function renderParamJs() {\n $script = '<script type=\"text/javascript\"> if(typeof TAMI.pagedata ==\"undefined\"){TAMI.pagedata={}; } ';\n\n foreach ($this->paramjs as $key => $val) {\n $script = $script . ' TAMI.pagedata.' . $key . '=' . json_encode($val) . '; ';\n }\n\n $script = $script . ' </script>';\n\n return $script;\n }", "public function generateMappings(){\n\n if( !count($this->mappings) ){\n return '';\n }\n\n $this->source_keys = array_flip(array_keys($this->sources));\n\n\n // group mappings by generated line number.\n $groupedMap = $groupedMapEncoded = array();\n foreach($this->mappings as $m){\n $groupedMap[$m['generated_line']][] = $m;\n }\n ksort($groupedMap);\n\n $lastGeneratedLine = $lastOriginalIndex = $lastOriginalLine = $lastOriginalColumn = 0;\n\n foreach($groupedMap as $lineNumber => $line_map){\n while(++$lastGeneratedLine < $lineNumber){\n $groupedMapEncoded[] = ';';\n }\n\n $lineMapEncoded = array();\n $lastGeneratedColumn = 0;\n\n foreach($line_map as $m){\n $mapEncoded = $this->encoder->encode($m['generated_column'] - $lastGeneratedColumn);\n $lastGeneratedColumn = $m['generated_column'];\n\n // find the index\n if( $m['source_file'] ){\n $index = $this->findFileIndex($m['source_file']);\n if( $index !== false ){\n $mapEncoded .= $this->encoder->encode($index - $lastOriginalIndex);\n $lastOriginalIndex = $index;\n\n // lines are stored 0-based in SourceMap spec version 3\n $mapEncoded .= $this->encoder->encode($m['original_line'] - 1 - $lastOriginalLine);\n $lastOriginalLine = $m['original_line'] - 1;\n\n $mapEncoded .= $this->encoder->encode($m['original_column'] - $lastOriginalColumn);\n $lastOriginalColumn = $m['original_column'];\n }\n }\n\n $lineMapEncoded[] = $mapEncoded;\n }\n\n $groupedMapEncoded[] = implode(',', $lineMapEncoded) . ';';\n }\n\n return rtrim(implode($groupedMapEncoded), ';');\n }", "public function main()\n {\n $config = Div::getConfig();\n $config['id'] = 'map';\n $config['layer'] = 1;\n $config['mouse_navigation'] = true;\n $config['show_pan_zoom'] = 1;\n\n $field = Div::getTableConfig($this->P['table']);\n\n $this->connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);\n $connection = $this->connectionPool->getConnectionForTable($this->P['table']);\n\n switch ($this->P['table']) {\n case 'tt_content':\n $res = $connection->executeQuery(\n 'SELECT ' .\n 'ExtractValue(pi_flexform,\\'/T3FlexForms[1]/data[1]/sheet[@index=\"sDEF\"]/language[@index=\"lDEF\"]/field[@index=\"' . $field['lon'] . '\"]/value[@index=\"vDEF\"]\\') AS lon, ' .\n 'ExtractValue(pi_flexform,\\'/T3FlexForms[1]/data[1]/sheet[@index=\"sDEF\"]/language[@index=\"lDEF\"]/field[@index=\"' . $field['lat'] . '\"]/value[@index=\"vDEF\"]\\') AS lat ' .\n 'FROM ' . $this->P['table'] . ' ' .\n 'WHERE uid = ' . intval($this->P['uid'])\n );\n $row = $res->fetch(FetchMode::ASSOCIATIVE);\n $js = 'function setBEcoordinates(lon,lat) {\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'lon') . '\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'lat', array($field['lon'] => $field['lat'])) . '\n\t\t\t\t\tclose();\n\t\t\t\t}';\n break;\n case 'tx_odsosm_vector':\n $res = $connection->executeQuery(\n 'SELECT ' .\n '(max_lon+min_lon)/2 AS lon, ' .\n '(max_lat+min_lat)/2 AS lat ' .\n 'FROM ' . $this->P['table'] . ' ' .\n 'WHERE uid = ' . intval($this->P['uid'])\n );\n $row = $res->fetch(FetchMode::ASSOCIATIVE);\n $js = 'function setBEfield(data) {\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'data') . '\n\t\t\t\t\tclose();\n\t\t\t\t}';\n break;\n default:\n $res = $connection->select(\n [\n $field['lon'] . ' AS lon',\n $field['lat'] . ' AS lat'\n ],\n $this->P['table'],\n ['uid' => intval($this->P['uid'])]\n );\n $row = $res->fetch(FetchMode::ASSOCIATIVE);\n $js = 'function setBEcoordinates(lon,lat) {\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'lon') . '\n\t\t\t\t\t' . $this->getJSsetField($this->P, 'lat', array($field['lon'] => $field['lat'])) . '\n\t\t\t\t\tclose();\n\t\t\t\t}';\n break;\n }\n\n $row['zoom'] = 15;\n\n if (floatval($row['lon']) == 0) {\n $row['lon'] = $config['default_lon'];\n $row['lat'] = $config['default_lat'];\n $row['zoom'] = $config['default_zoom'];\n }\n\n // Library\n $library = GeneralUtility::makeInstance(Openlayers::class);\n $library->init($config);\n $library->doc = $this->doc;\n $library->P = $this->P;\n\n // Layer\n $connection = $this->connectionPool->getConnectionForTable('tx_odsosm_layer');\n $layers = $connection->executeQuery('SELECT * FROM tx_odsosm_layer WHERE uid IN (' . $config['layer'] . ')');\n\n $this->doc->JScode .= '\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t' . $library->getMapBE($layers, $this->P['params']['mode'], $row['lat'], $row['lon'], $row['zoom'], $this->doc) . '\n\t\t\t\t' . $js . '\n\t\t\t</script>\n\t\t';\n\n $this->content .= '<div style=\"position:absolute;width:100%;height:100%;\" id=\"map\"></div><script type=\"text/javascript\">map();</script>';\n }", "abstract protected function buildMap();", "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 js()\n {\n }", "public function encode()\n {\n return new JsExpression(\"L.latLng($this->lat, $this->lng)\"); // no semicolon\n }", "public function afficheMarker(){\r\n \r\n $request = $this->_bdd->query(\"SELECT gps.`id`, gps.id_bateau, gps.latitude, gps.longitude, bateau.nom FROM gps, bateau WHERE gps.id_bateau = bateau.id ORDER BY `gps`.`id` DESC\");\r\n while ($tab = $request->fetch()){ ?>\r\n <script> \r\n \"<?= $tab['nom'] ?>\":{\r\n \"lat\": <?= $tab['latitude'] ?>;\r\n \"lon\": <?= $tab['longitude'] ?>;\r\n };\r\n </script>\r\n <?php\r\n } \r\n}", "public function __toString()\n {\n return json_encode( $this->js_vars );\n }", "public function generateMouseEventsJavaScript($mapName,$markerName) {\n $code = \"\";\n if ($this->_onMouseDown!==null) {\n $code .= \"google.maps.event.addListener({$markerName},'mousedown',function(event) {\\n\";\n $code .= \"\\t {$this->_onMouseDown} \\n});\\n\"; \n }\n if ($this->_onMouseOver!==null) {\n $code .= \"google.maps.event.addListener({$markerName},'mouseover',function(event) {\\n\";\n $code .= \"\\t {$this->_onMouseOver} \\n});\\n\"; \n }\n if ($this->_onMouseUp!==null) {\n $code .= \"google.maps.event.addListener({$markerName},'mouseup',function(event) {\\n\";\n $code .= \"\\t {$this->_onMouseUp} \\n});\\n\"; \n }\n if ($this->_onMouseOut!==null) {\n $code .= \"google.maps.event.addListener({$markerName},'mouseout',function(event) {\\n\";\n $code .= \"\\t {$this->_onMouseOut} \\n});\\n\"; \n }\n return $code;\n }", "public function encode()\n {\n $options = Json::encode($this->getOptions(), LeafLet::JSON_OPTIONS);\n\n $js = \"L.character.icon($options)\";\n if ($this->name) {\n $js = \"var $this->name = $js;\";\n }\n return new JsExpression($js);\n // $icon = $this->icon;\n //\n // if (empty($icon)) {\n // return \"\";\n // }\n // $this->clientOptions['icon'] = $icon;\n // $options = $this->getOptions();\n // $name = $this->getName();\n //\n // $js = \"L.character.icon($options)\";\n //\n // if (!empty($name)) {\n // $js = \"var $name = $js;\";\n // }\n //\n // return new JsExpression($js);\n }", "public function includeGMapsJS() {\n\t\tif(self::$jsIncluded) return;\n // Google map JS\n\t\t\n\t\t//adding in a callback for jochen:\n //$this->content .= '<script src=\"http://maps.google.com/maps?hl='. $this->lang.'&file=api&amp;v=2&amp;key='.$this->googleMapKey.'\" type=\"text/javascript\">';\n\t\t$this->content .= '<script src=\"http://maps.google.com/maps?hl='. $this->lang.'&file=api&amp;v=2&amp;callback=load&amp;key='.$this->googleMapKey.'\" type=\"text/javascript\">';\n $this->content .= '</script>'.\"\\n\";\n \n // Clusterer JS\n if ($this->useClusterer==true) {\n\t\t\t// Source: http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer/1.0/src/\n\t\t\t$this->content .= '<script src=\"'.$this->clustererLibraryPath.'\" type=\"text/javascript\"></script>'.\"\\n\";\n }\n \n self::$jsIncluded = true;\n\t\n\t}", "protected function getJavascript()\n {\n $allowed_types = Config::inst()->get(GoogleAddressField::class, 'allowed_types');\n\n if ($allowed_types) {\n return '\n if(typeof GoogleAddressFieldStatics === \"undefined\") {\n var GoogleAddressFieldStatics = {};\n }\n GoogleAddressFieldStatics.allowedTypes = ' . json_encode($allowed_types) . ';\n ';\n }\n\n return '';\n }", "private function getMainJS() {\n\t\t$encodedData = json_encode($this->Data);\n\n\t\tif (false === $encodedData) {\n\t\t\t$this->ErrorString = sprintf('%s (%s: %u)',\n\t\t\t\t__('There is an unknown problem with this plot.'),\n\t\t\t\t__('Error code'),\n\t\t\t\tjson_last_error()\n\t\t\t);\n\n\t\t\treturn $this->getJSForError();\n\t\t}\n\n\t\treturn 'RunalyzePlot.addPlot(\"'.$this->cssID.'\", '.\n\t\t\t\t$encodedData.', '.\n\t\t\t\tAjax::json_encode_jsfunc($this->Options).', '.\n\t\t\t\tjson_encode($this->PlotOptions).', '.\n\t\t\t\tjson_encode($this->Annotations).');';\n\t}", "protected function doCompressJavaScript() {}", "function get_map(){\n return $this->customizer_map_array;\n }", "public function getPolygonsJs()\n\t{\n\t\t$return = '';\n\t\tif (null !== $this->resources->itemAt('polygons'))\n\t\t{\n\t\t\tforeach ($this->resources->itemAt('polygons') as $polygon)\n\t\t\t{\n\t\t\t\t$return .= $polygon->toJs($this->getJsName());\n\t\t\t\t$return .= \"\\n \";\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "public function run()\n {\n $cs = Yii::app()->getClientScript();\n\n $predefinedLatitude = $this->defaultLatitude;\n $predefinedLongitude = $this->defaultLongitude;\n\n\n if ($this->defaultLatitude == 'null') {\n $predefinedLatitude = self::DEFAULT_LATITUDE;\n }\n\n if ($this->defaultLongitude == 'null') {\n $predefinedLongitude = self::DEFAULT_LONGITUDE;\n }\n\n /* $cs->registerCoreScript('jquery');*/\n //Assign server side value to script\n $cs->registerScript('prepareMapData', \"\n var defaultLatitude = $this->defaultLatitude;\n var defaultLongitude = $this->defaultLongitude;\n var predefinedLatitude = $predefinedLatitude;\n var predefinedLongitude = $predefinedLongitude;\n var zoomLevel = $this->zoomLevel;\n var latitudeInputId = '$this->latitudeInputId';\n var longitudeInputId = '$this->longitudeInputId';\n \", CClientScript::POS_BEGIN);\n\n //Register js and css\n $cs->registerScriptFile(\"https://maps.googleapis.com/maps/api/js?key=\" . $this->apiKey, CClientScript::POS_BEGIN);\n $cs->registerScriptFile($this->assetsDir . '/map.js', CClientScript::POS_END);\n $cs->registerCssFile($this->assetsDir . '/map.css');\n\n $this->render('map', ['displayMode' => $this->displayMode]);\n }", "public function generateMap()\n {\n $map = array();\n $database = $this->binding->getDatabase()->getData();\n\n foreach ($database->classes as $class) {\n $map[$class->name] = $class->clusters;\n }\n\n $this->map = $map;\n $this->cache->save($this->getCacheKey(), $map);\n }", "public function getJs();", "function showMap() {\n\t\t$this->initMap();\n\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###MAP###');\n\n\t\t// title, text - markers\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['map.']['LL'], 'map');\n\t\t$markerArray['###CAT_MENU###'] \t\t= $this->displayCatMenu(0);\n\t\t$markerArray['###CAT_LIST###'] \t\t= ($this->config['categoriesActive']!='') ? $this->config['categoriesActive'] : '9999';\n\t\t$markerArray['###MAP_WIDTH###'] \t= $this->config['mapWidth'];\n\t\t$markerArray['###MAP_HEIGHT###']\t= $this->config['mapHeight'];\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'],$markerArray, $subpartArray,$wrappedSubpartArray);\n\t\treturn $content;\n\t}", "public function __toString() \r\n\t{\r\n\t\t$sHtml = \"<script type=\\\"text/javascript\\\">\\n\";\r\n\t\t$sHtml .= $this->gerarJavascript();\r\n\t\t$sHtml .= \"</script>\\n\";\r\n\t\t$sHtml .= $this->gerarHtml();\r\n\t\t\r\n\t\treturn $sHtml;\r\n\t}", "protected function getMap()\n\t{\n\t\treturn array(\n\t\t\t'USE' => new Field\\Checkbox('USE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_USE')\n\t\t\t)),\n\t\t\t'CODE' => new Field\\Textarea('CODE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE'),\n\t\t\t\t'help' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE_HELP2'),\n\t\t\t\t'placeholder' => '<script>\n\tvar googletag = googletag || {};\n\tgoogletag.cmd = googletag.cmd || [];\n</script>'\n\t\t\t))\n\t\t);\n\t}", "abstract protected function encode($map);", "function htheme_map_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_map($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "public function get_output_script() {\n $output = '<script>';\n $output .= 'var Aw = ' . $this->prepare_json();\n $output .= '</script>';\n \n return $output;\n }", "function makeJS($vars){\n\t$snippet = \"<script>\\n\\t\";\n\tforeach ($vars as $k => $var){\n\t\t$snippet .= \"var \" . $k . \" ='\" . $var . \"';\\n\\t\";\n\t}\n\t$snippet .= \"</script>\";\n\treturn $snippet;\n}", "public function Bali_map()\n\t{\n\t\t$this->template = view::factory('templates/Gmap')\n\t\t\t->set('lang', url::lang())\n\t\t\t->set('website_name', Kohana::lang('website.name'))\n\t\t\t->set('website_slogan', Kohana::lang('website.slogan'))\n\t\t\t->set('webpage_title', Kohana::lang('nav.'.str_replace('_', ' ', url::current())))\n\t\t\t->set('map_options', Kohana::config('Gmap.maps.Bali'))\n\t\t\t->set('map_markers', Kohana::config('Gmap.markers.Bali'))\n\t\t\t->set('map_icon_path', url::base().skin::config('images.Gmap.path'));\n\t}", "public function js();", "public function generateInitCode();", "public function getJavaScript() {}", "protected function initJavascriptCode() {}", "public function generateInfoWindowJavaScript($mapName,$markerName) {\n $code = \"var {$markerName}_infoWindow = new google.maps.InfoWindow ({\\n\";\n $code .= \"\\t content: \\\"{$this->_text}\\\" \\n});\\n\";\n \n $code .= \"google.maps.event.addListener({$markerName},'click',function() {\\n\";\n $code .= \"\\t {$markerName}_infoWindow.open({$mapName},{$markerName}); \\n});\\n\";\n return $code;\n }", "public function toJs()\n {\n $min = $this->_min->toJs($this->map);\n $max = $this->_max->toJs($this->map);\n return new JsExpression(\"{$this->map->leafletVar}.bounds($min, $max)\");\n }", "function mpfy_shortcode_custom_mapping($atts, $content) {\n\tglobal $mpfy_footer_scripts;\n\tstatic $mpfy_instances = -1;\n\t$mpfy_instances ++;\n\n\tif (!defined('MPFY_LOAD_ASSETS')) {\n\t\tdefine('MPFY_LOAD_ASSETS', true);\n\t}\n\n\textract( shortcode_atts( array(\n\t\t'width'=>0,\n\t\t'height'=>300,\n\t\t'map_id'=>0,\n\t), $atts));\n\n\tif (!stristr($width, '%')) {\n\t\t$width = intval($width);\n\t\t$width = ($width < 1) ? 0 : $width . 'px';\n\t}\n\n\tif (!stristr($height, '%')) {\n\t\t$height = intval($height);\n\t\t$height = ($height < 1) ? 300 : $height . 'px';\n\t}\n\n\tif ($map_id == 0) {\n\t\t$map_id = Mpfy_Map::get_first_map_id();\n\t}\n\n\t$map = get_post(intval($map_id));\n\tif (!$map || is_wp_error($map) || $map->post_type != 'map') {\n\t\treturn 'Invalid or no map_id specified.';\n\t}\n\n\t$map = new Mpfy_Map($map->ID);\n\n\t$template = include('templates/map.php');\n\t$mpfy_footer_scripts .= $template['script'];\n\treturn $template['html'];\n}", "function createstring_MapDisplaySlider() {\n\n $content = '';\n if ( $this->slplus->is_CheckTrue( $this->addon->options['show_maptoggle'] ) ) {\n $content =\n $this->CreateSliderButton(\n 'maptoggle',\n ! $this->slplus->is_CheckTrue( $this->addon->options['hide_map'] ),\n \"jQuery('#map').toggle();jQuery('#slp_tagline').toggle();\"\n );\n }\n\n return $content;\n }", "public function map()\n\t{\n\t\t$map = 'http://maps.googleapis.com/maps/api/staticmap?zoom=12&format=png&maptype=roadmap&style=element:geometry|color:0xf5f5f5&style=element:labels.icon|visibility:off&style=element:labels.text.fill|color:0x616161&style=element:labels.text.stroke|color:0xf5f5f5&style=feature:administrative.land_parcel|element:labels.text.fill|color:0xbdbdbd&style=feature:poi|element:geometry|color:0xeeeeee&style=feature:poi|element:labels.text.fill|color:0x757575&style=feature:poi.business|visibility:off&style=feature:poi.park|element:geometry|color:0xe5e5e5&style=feature:poi.park|element:labels.text|visibility:off&style=feature:poi.park|element:labels.text.fill|color:0x9e9e9e&style=feature:road|element:geometry|color:0xffffff&style=feature:road.arterial|element:labels|visibility:off&style=feature:road.arterial|element:labels.text.fill|color:0x757575&style=feature:road.highway|element:geometry|color:0xdadada&style=feature:road.highway|element:labels|visibility:off&style=feature:road.highway|element:labels.text.fill|color:0x616161&style=feature:road.local|visibility:off&style=feature:road.local|element:labels.text.fill|color:0x9e9e9e&style=feature:transit.line|element:geometry|color:0xe5e5e5&style=feature:transit.station|element:geometry|color:0xeeeeee&style=feature:water|element:geometry|color:0xc9c9c9&style=feature:water|element:labels.text.fill|color:0x9e9e9e&size=640x250&scale=4&center='.urlencode(trim(preg_replace('/\\s\\s+/', ' ', $this->cfg->address)));\n\t\t$con = curl_init($map);\n\t\tcurl_setopt($con, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($con, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($con, CURLOPT_RETURNTRANSFER, 1);\n\t\treturn response(curl_exec($con))->header('Content-Type', 'image/png');\n\t}", "public function getPrintJavaScriptHTML() {\r\n\t\t$javaScript = LF . '<script type=\"text/javascript\">' . LF . '/*<![CDATA[*/' . LF . '<!--';\r\n\t\t$javaScript .= $this->getPrintJavaScript();\r\n\t\t$javaScript .= LF . '//-->' . LF . '/*]]>*/' . LF . '</script>' . LF;\r\n\t\treturn $javaScript;\r\n\t\t\t\r\n\t}", "public static function js();", "public function actionMap()\r\n\t{\r\n\t\t$this->render('map');\r\n\t}", "public static function getMap()\n { \n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ID_FIELD'),\n ),\n 'DATE_CHANGE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CHANGE_FIELD'),\n ),\n 'DATE_CREATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ACTIVE_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_SORT_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_NAME_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'PARENT_CATEGORY_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_PARENT_CATEGORY_ID_FIELD'),\n ), \n );\n }", "public function getJavascript()\n {\n\t$script = \"\n\t\t\t\t\t\n google.load(\\\"visualization\\\", \\\"1\\\", {packages:[\\\"corechart\\\"]});\n google.setOnLoadCallback(drawChart\".$this->getId().\");\n function drawChart\".$this->getId().\"() {\n var data = google.visualization.arrayToDataTable([\".$this->getEncodedData().\"]);\n\t\n var options = {\n title: '\".$this->title.\"'\n };\n var chart = new google.visualization.PieChart(document.getElementById('\".$this->getWidgetElementId().\"'));\n chart.draw(data, options);\n }\t\t\t\t\t\";\n\t\n\t return $script;\t\n\t}", "function wpgmaps_b_admin_edit_poly_javascript($mapid,$polyid) {\n $res = wpgmza_get_map_data($mapid);\n \n $wpgmza_settings = get_option(\"WPGMZA_OTHER_SETTINGS\");\n\n\n $wpgmza_lat = $res->map_start_lat;\n \n $wpgmza_lng = $res->map_start_lng;\n $wpgmza_map_type = $res->type;\n $wpgmza_width = $res->map_width;\n $wpgmza_height = $res->map_height;\n $wpgmza_width_type = $res->map_width_type;\n $wpgmza_height_type = $res->map_height_type;\n if (!$wpgmza_map_type || $wpgmza_map_type == \"\" || $wpgmza_map_type == \"1\") { $wpgmza_map_type = \"ROADMAP\"; }\n else if ($wpgmza_map_type == \"2\") { $wpgmza_map_type = \"SATELLITE\"; }\n else if ($wpgmza_map_type == \"3\") { $wpgmza_map_type = \"HYBRID\"; }\n else if ($wpgmza_map_type == \"4\") { $wpgmza_map_type = \"TERRAIN\"; }\n else { $wpgmza_map_type = \"ROADMAP\"; }\n $start_zoom = $res->map_start_zoom;\n if ($start_zoom < 1 || !$start_zoom) {\n $start_zoom = 5;\n }\n if (isset($res->kml)) { $kml = $res->kml; } else { $kml = false; }\n \n $wpgmza_settings = get_option(\"WPGMZA_OTHER_SETTINGS\");\n if (isset($wpgmza_settings['wpgmza_api_version']) && $wpgmza_settings['wpgmza_api_version'] != \"\") {\n $api_version_string = \"v=\".$wpgmza_settings['wpgmza_api_version'].\"&\";\n } else {\n $api_version_string = \"v=3.exp&\";\n }\n\n ?>\n <?php if( get_option( 'wpgmza_google_maps_api_key' ) ){ ?>\n <script type=\"text/javascript\">\n var gmapsJsHost = ((\"https:\" == document.location.protocol) ? \"https://\" : \"http://\");\n var wpgmza_api_key = '<?php echo get_option( 'wpgmza_google_maps_api_key' ); ?>';\n document.write(unescape(\"%3Cscript src='\" + gmapsJsHost + \"maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key=\"+wpgmza_api_key+\"' type='text/javascript'%3E%3C/script%3E\"));\n </script>\n <?php } else { ?>\n <script type=\"text/javascript\">\n var wpgmza_temp_api_key = \"<?php echo get_option('wpgmza_temp_api'); ?>\";\n var gmapsJsHost = ((\"https:\" == document.location.protocol) ? \"https://\" : \"http://\");\n document.write(unescape(\"%3Cscript src='\" + gmapsJsHost + \"maps.google.com/maps/api/js?<?php echo $api_version_string; ?>key=\"+wpgmza_temp_api_key+\"&libraries=places' type='text/javascript'%3E%3C/script%3E\"));\n </script>\n <?php } ?>\n <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />\n <script type=\"text/javascript\" >\n // polygons variables\n var poly;\n var poly_markers = [];\n var poly_path = new google.maps.MVCArray;\n \n jQuery(document).ready(function(){\n \n function wpgmza_InitMap() {\n var myLatLng = new google.maps.LatLng(<?php echo $wpgmza_lat; ?>,<?php echo $wpgmza_lng; ?>);\n MYMAP.init('#wpgmza_map', myLatLng, <?php echo $start_zoom; ?>);\n }\n jQuery(\"#wpgmza_map\").css({\n height:'<?php echo $wpgmza_height; ?><?php echo $wpgmza_height_type; ?>',\n width:'<?php echo $wpgmza_width; ?><?php echo $wpgmza_width_type; ?>'\n });\n wpgmza_InitMap();\n \n \n jQuery(\"#poly_line\").focusout(function() {\n poly.setOptions({ strokeColor: \"#\"+jQuery(\"#poly_line\").val() }); \n });\n jQuery(\"#poly_fill\").focusout(function() {\n poly.setOptions({ fillColor: \"#\"+jQuery(\"#poly_fill\").val() }); \n });\n jQuery(\"#poly_opacity\").keyup(function() {\n poly.setOptions({ fillOpacity: jQuery(\"#poly_opacity\").val() }); \n });\n jQuery(\"#poly_line_opacity\").keyup(function() {\n poly.setOptions({ strokeOpacity: jQuery(\"#poly_line_opacity\").val() }); \n });\n });\n \n\n var MYMAP = {\n map: null,\n bounds: null\n }\n MYMAP.init = function(selector, latLng, zoom) {\n var myOptions = {\n zoom:zoom,\n center: latLng,\n zoomControl: true,\n panControl: true,\n mapTypeControl: true,\n streetViewControl: false,\n mapTypeId: google.maps.MapTypeId.<?php echo $wpgmza_map_type; ?>\n }\n this.map = new google.maps.Map(jQuery(selector)[0], myOptions);\n this.bounds = new google.maps.LatLngBounds();\n // polygons\n \n <?php\n $total_poly_array = wpgmza_b_return_polygon_id_array(sanitize_text_field($_GET['map_id']));\n if ($total_poly_array > 0) {\n foreach ($total_poly_array as $poly_id) {\n $polyoptions = wpgmza_b_return_poly_options($poly_id);\n $linecolor = $polyoptions->linecolor;\n $fillcolor = $polyoptions->fillcolor;\n $fillopacity = $polyoptions->opacity;\n $lineopacity = $polyoptions->lineopacity;\n $title = $polyoptions->title;\n $link = $polyoptions->link;\n $ohlinecolor = $polyoptions->ohlinecolor;\n $ohfillcolor = $polyoptions->ohfillcolor;\n $ohopacity = $polyoptions->ohopacity;\n if (!$linecolor) { $linecolor = \"000000\"; }\n if (!$fillcolor) { $fillcolor = \"66FF00\"; }\n if ($fillopacity == \"\") { $fillopacity = \"0.5\"; }\n if ($lineopacity == \"\") { $lineopacity = \"1.0\"; }\n if ($ohlinecolor == \"\") { $ohlinecolor = $linecolor; }\n if ($ohfillcolor == \"\") { $ohfillcolor = $fillcolor; }\n if ($ohopacity == \"\") { $ohopacity = $fillopacity; }\n $linecolor = \"#\".$linecolor;\n $fillcolor = \"#\".$fillcolor;\n $ohlinecolor = \"#\".$ohlinecolor;\n $ohfillcolor = \"#\".$ohfillcolor;\n \n $poly_array = wpgmza_b_return_polygon_array($poly_id);\n \n if (sizeof($poly_array) > 1) {\n if ($polyid != $poly_id) {\n ?>\n\n var WPGM_PathData_<?php echo $poly_id; ?> = [<?php\n foreach ($poly_array as $single_poly) {\n $poly_data_raw = str_replace(\" \",\"\",$single_poly);\n $poly_data_raw = explode(\",\",$poly_data_raw);\n $lat = $poly_data_raw[0];\n $lng = $poly_data_raw[1];\n ?>\n new google.maps.LatLng(<?php echo $lat; ?>, <?php echo $lng; ?>), \n <?php\n } \n ?>]; \n var WPGM_Path_<?php echo $poly_id; ?> = new google.maps.Polygon({\n path: WPGM_PathData_<?php echo $poly_id; ?>,\n strokeColor: \"<?php echo $linecolor; ?>\",\n fillOpacity: \"<?php echo $fillopacity; ?>\",\n strokeOpacity: \"<?php echo $lineopacity; ?>\",\n fillColor: \"<?php echo $fillcolor; ?>\",\n strokeWeight: 2\n });\n\n WPGM_Path_<?php echo $poly_id; ?>.setMap(this.map);\n <?php } } } ?>\n\n <?php } ?>\n\n\n <?php if ($kml != false) { ?>\n var temp = '<?php echo $kml; ?>';\n arr = temp.split(',');\n arr.forEach(function(entry) {\n var georssLayer = new google.maps.KmlLayer(entry+'?tstamp=<?php echo time(); ?>',{suppressInfoWindows: true, zindex: 0, clickable : false});\n georssLayer.setMap(MYMAP.map);\n\n });\n <?php } ?>\n\n\n \n addPolygon();\n \n\n }\n function addPolygon() {\n <?php\n $poly_array = wpgmza_b_return_polygon_array($polyid);\n \n $polyoptions = wpgmza_b_return_poly_options($polyid);\n $linecolor = $polyoptions->linecolor;\n $lineopacity = $polyoptions->lineopacity;\n $fillcolor = $polyoptions->fillcolor;\n $fillopacity = $polyoptions->opacity;\n if (!$linecolor) { $linecolor = \"000000\"; }\n if (!$fillcolor) { $fillcolor = \"66FF00\"; }\n if ($fillopacity == \"\") { $fillopacity = \"0.5\"; }\n if ($lineopacity == \"\") { $lineopacity = \"1\"; }\n $linecolor = \"#\".$linecolor;\n $fillcolor = \"#\".$fillcolor;\n \n foreach ($poly_array as $single_poly) {\n $poly_data_raw = str_replace(\" \",\"\",$single_poly);\n $poly_data_raw = explode(\",\",$poly_data_raw);\n $lat = $poly_data_raw[0];\n $lng = $poly_data_raw[1];\n ?>\n var temp_gps = new google.maps.LatLng(<?php echo $lat; ?>, <?php echo $lng; ?>);\n addExistingPoint(temp_gps);\n updatePolyPath(poly_path);\n \n \n \n <?php\n }\n ?>\n \n poly = new google.maps.Polygon({\n strokeWeight: 3,\n strokeColor: \"<?php echo $linecolor; ?>\",\n strokeOpacity: \"<?php echo $lineopacity; ?>\",\n fillOpacity: \"<?php echo $fillopacity; ?>\",\n fillColor: \"<?php echo $fillcolor; ?>\"\n });\n poly.setMap(MYMAP.map);\n poly.setPaths(poly_path);\n google.maps.event.addListener(MYMAP.map, 'click', addPoint);\n }\n function addExistingPoint(temp_gps) {\n poly_path.insertAt(poly_path.length, temp_gps);\n var poly_marker = new google.maps.Marker({\n position: temp_gps,\n map: MYMAP.map,\n draggable: true\n });\n poly_markers.push(poly_marker);\n poly_marker.setTitle(\"#\" + poly_path.length);\n google.maps.event.addListener(poly_marker, 'click', function() {\n poly_marker.setMap(null);\n for (var i = 0, I = poly_markers.length; i < I && poly_markers[i] != poly_marker; ++i);\n poly_markers.splice(i, 1);\n poly_path.removeAt(i);\n updatePolyPath(poly_path); \n }\n );\n\n google.maps.event.addListener(poly_marker, 'dragend', function() {\n for (var i = 0, I = poly_markers.length; i < I && poly_markers[i] != poly_marker; ++i);\n poly_path.setAt(i, poly_marker.getPosition());\n updatePolyPath(poly_path); \n }\n );\n }\n function addPoint(event) {\n \n poly_path.insertAt(poly_path.length, event.latLng);\n\n var poly_marker = new google.maps.Marker({\n position: event.latLng,\n map: MYMAP.map,\n icon: \"<?php echo wpgmaps_get_plugin_url().\"/images/marker.png\"; ?>\",\n draggable: true\n });\n \n\n \n poly_markers.push(poly_marker);\n poly_marker.setTitle(\"#\" + poly_path.length);\n\n google.maps.event.addListener(poly_marker, 'click', function() {\n poly_marker.setMap(null);\n for (var i = 0, I = poly_markers.length; i < I && poly_markers[i] != poly_marker; ++i);\n poly_markers.splice(i, 1);\n poly_path.removeAt(i);\n updatePolyPath(poly_path); \n }\n );\n\n google.maps.event.addListener(poly_marker, 'dragend', function() {\n for (var i = 0, I = poly_markers.length; i < I && poly_markers[i] != poly_marker; ++i);\n poly_path.setAt(i, poly_marker.getPosition());\n updatePolyPath(poly_path); \n }\n );\n \n \n updatePolyPath(poly_path); \n }\n \n function updatePolyPath(poly_path) {\n var temp_array;\n temp_array = \"\";\n poly_path.forEach(function(latLng, index) { \n// temp_array = temp_array + \" [\"+ index +\"] => \"+ latLng + \", \";\n temp_array = temp_array + latLng + \",\";\n }); \n jQuery(\"#poly_line_list\").html(temp_array);\n } \n \n\n </script>\n <?php\n}", "function qodef_re_marker_template() {\n\n $html = '<script type=\"text/template\" class=\"qodef-marker-template\">\n\t\t\t\t<div class=\"qodef-map-marker\">\n\t\t\t\t\t<div class=\"qodef-map-marker-inner\">\n\t\t\t\t\t<%= pin %>\n\t\t\t\t\t\t<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 31 48\" enable-background=\"new 0 0 31 48\" xml:space=\"preserve\">\n<path d=\"M15.5,1.1c-8.3,0-15,6.9-15,15.5c0,2.2,0.4,4.3,1.2,6.1c0.2,0.4,0.4,0.9,0.6,1.3l0.3,0.6l5.9,10.5l6.9,12.4\n\tl6.9-12.4l5.8-10.5l0.4-0.8c0.2-0.4,0.4-0.8,0.6-1.2c0.8-1.9,1.2-4,1.2-6.1C30.5,8,23.8,1.1,15.5,1.1z M15.5,26.7\n\tc-5.4,0-9.8-4.6-9.8-10.2s4.4-10.2,9.8-10.2s9.8,4.6,9.8,10.2S20.9,26.7,15.5,26.7z\"/>\n</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</script>';\n\n print bridge_qode_get_module_part($html);\n\n }", "function draw_javascript_block(){\r\n\r\n\t\t// sort order\r\n\t\t$out_sort_order='var arr_sort_order= new Array();';\r\n\r\n\t\tfor($i=0; $i<strlen($this->sort_order); $i++){\r\n\t\t\tif($i==strlen($this->sort_order)-1)\r\n\t\t\t\t$out_sort_order.='arr_sort_order[\"'.$this->sort_order[$i].'\"]=\"'.$this->sort_order[0].'\";';\r\n\t\t\telse\r\n\t\t\t\t$out_sort_order.='arr_sort_order[\"'.$this->sort_order[$i].'\"]=\"'.$this->sort_order[$i+1].'\";';\r\n\t\t}\r\n\r\n\t\tif(strpos($this->sort_order,'t')===false)\r\n\t\t\t$out_sort_order.='arr_sort_order[\"t\"]=\"\";';\r\n\r\n\t\t$out_sort_order.='arr_sort_order[\"first\"]=\"'.$this->sort_order[0].'\";';\r\n\r\n\t\t$out='<script type=\"text/javascript\">'.$out_sort_order.'var extra_cols ='.json_encode($this->extra_cols).';';\r\n\r\n\t\tif($this->search=='')\r\n\t\t\t$out.='jQuery(document).ready(function(){ jQuery(\"#'.$this->id.'_search_value\").css(\"opacity\",\"1\"); });';\r\n\r\n\t\t$out.='</script>';\r\n\r\n\t\treturn $out;\r\n\t}", "function wpgooglemaps_gold_filter_control_map_output($content,$mapid) {\n return $content;\n}", "public function render(): array\n {\n $this->init();\n $resultArray = $this->initializeResultArray();\n $currentRecord = $this->cleanUpCurrentRecord($this->data['databaseRow']);\n $backendRelPath = 'EXT:maps2/';\n\n $this->pageRenderer->addRequireJsConfiguration([\n 'paths' => [\n 'leaflet' => rtrim(\n PathUtility::getRelativePath(\n PATH_typo3,\n GeneralUtility::getFileAbsFileName('EXT:maps2/Resources/Public/JavaScript/Leaflet')\n ),\n '/'\n ),\n 'leafletDragPath' => rtrim(\n PathUtility::getRelativePath(\n PATH_typo3,\n GeneralUtility::getFileAbsFileName('EXT:maps2/Resources/Public/JavaScript/Leaflet.Drag.Path')\n ),\n '/'\n ),\n 'leafletEditable' => rtrim(\n PathUtility::getRelativePath(\n PATH_typo3,\n GeneralUtility::getFileAbsFileName('EXT:maps2/Resources/Public/JavaScript/Leaflet.Editable')\n ),\n '/'\n )\n ],\n 'shim' => [\n 'leaflet' => [\n 'deps' => ['jquery'],\n 'exports' => 'L'\n ],\n 'leafletDragPath' => [\n 'deps' => ['leaflet'],\n ],\n 'leafletEditable' => [\n 'deps' => ['leafletDragPath'],\n ],\n ]\n ]);\n\n $resultArray['stylesheetFiles'][] = $backendRelPath . 'Resources/Public/Css/Leaflet/Leaflet.css';\n $resultArray['requireJsModules'][] = [\n 'TYPO3/CMS/Maps2/OpenStreetMapModule' => 'function(OpenStreetMap){OpenStreetMap();}'\n ];\n\n $resultArray['html'] = $this->getMapHtml($this->getConfiguration($currentRecord));\n\n return $resultArray;\n }", "public function getJsRenderer() {\t\n\t\t$html = $this->html;\t\n\t\tpreg_match_all('/{\\w*}/', $html, $res);\t\t\n\t\tif (!empty($res)) {\n\t\t\t$matches = $res[0];\n\t\t\t$replaceStr = \"\";\n\t\t\tforeach ($matches as $key => $value) {\n\t\t\t\t$replaceStr .= '.replace(\"'.$value.'\", row.'.str_replace(array('{','}'), array('',''), $value).')';\n\t\t\t}\n\t\t} \t\t\n\t\treturn 'function(row) { return '.json_encode($html).$replaceStr.' }';\t\n\t\t\n\t}", "public function build_xml_map() {\n $this->_create_map();\n header(\"content-type: text/xml\");\n echo $this->result;\n }", "public static function dump_javascript($closure = FALSE) {\n // Add the default stylesheet to the end of the list, so it has highest CSS\n // priority.\n if (self::$default_styles) {\n self::add_resource('defaultStylesheet');\n }\n // Jquery validation js has to be added at this late stage, because only\n // then do we know all the messages required.\n self::setup_jquery_validation_js();\n $dump = self::internal_dump_resources(self::$required_resources);\n $dump .= \"<script type='text/javascript'>/* <![CDATA[ */\\n\" . self::getIndiciaData() . \"\\n/* ]]> */</script>\\n\";\n $dump .= self::get_scripts(self::$javascript, self::$late_javascript, self::$onload_javascript, TRUE, $closure);\n // Ensure scripted JS does not output again if recalled.\n self::$javascript = \"\";\n self::$late_javascript = \"\";\n self::$onload_javascript = \"\";\n return $dump;\n }", "public function init() {\n\t\t$this->id = \"imagemap\" . t3lib_div::shortMD5(rand(1, 100000));\n\t\t$this->jsFiles = array();\n\t\t$this->cssFiles = array();\n\t}", "public final function __toString()\n {\n $render = $this->getHTML();\n $script = $this->getScript();\n if (!empty($script)) {\n $render .= '<script type=\"text/javascript\">';\n $render .= '$(document).ready(function(){'.$script. '});';\n $render .= '</script>';\n }\n return $render;\n }", "public function updateMap(){\n $out = '';\n\n preg_match( '/<phpDBMapper:map>(.*)<\\/phpDBMapper:map>/s', $this->template, $m );\n\n foreach( $this->tableMapper as $c ){\n $tmp = $m[1];\n\n foreach( $c as $key=>$val ){\n $tmp = str_replace( '%'. $key .'%', $val, $tmp );\n $tmp = str_replace(array(\"\\n\", \"\\r\"), '', $tmp);\n }\n\n $out .= $tmp . \"\\n\";\n }\n\n $this->template = preg_replace( '/<phpDBMapper:map[^>]*?>.*?<\\/phpDBMapper:map>/is', $out, $this->template );\n return $this->template;\n }", "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true\n ),\n 'APP_ID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateVarchar128'),\n ),\n 'CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateVarchar128'),\n ),\n 'TYPE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateType'),\n ),\n 'HANDLER' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateHandler'),\n ),\n 'DATE_ADD' => array(\n 'data_type' => 'datetime',\n 'default_value' => new Main\\Type\\DateTime(),\n ),\n 'AUTHOR_ID' => array(\n 'data_type' => 'integer',\n 'default_value' => 0,\n ),\n 'AUTHOR' => array(\n 'data_type' => '\\Bitrix\\Main\\UserTable',\n 'reference' => array(\n '=this.AUTHOR_ID' => 'ref.ID'\n ),\n 'join_type' => 'LEFT',\n ),\n );\n }", "function create_Map($coordsTmp,$name) {\n\t\t\n\t\t\t\t// default atts\n\t\t\t\t\t$attr = shortcode_atts(array(\t\n\t\t\t\t\t\t\t\t\t'lat' => '57.700662', \n\t\t\t\t\t\t\t\t\t'lon' => '11.972609',\n\t\t\t\t\t\t\t\t\t'id' => 'map',\n\t\t\t\t\t\t\t\t\t'z' => '14',\n\t\t\t\t\t\t\t\t\t'w' => '530',\n\t\t\t\t\t\t\t\t\t'h' => '450',\n\t\t\t\t\t\t\t\t\t'maptype' => 'ROADMAP',\n\t\t\t\t\t\t\t\t\t'marker' => $coordsTmp\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t), $attr);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$map = '\n\t\t\t\t<div id=\"map\" style=\"width:530px;height:450px;border:1px solid gray;\"></div><br>\n\t\t\t\t\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar infowindow = null;\n\t\t\t\tvar latlng=new google.maps.LatLng(57.700662,11.972609);\n\t\t\t\t\tvar latlngw = new google.maps.LatLng(' . $attr['lat'] . ', ' . $attr['lon'] . ');\n\t\t\t\t\tvar myOptions = {\n\t\t\t\t\t\tzoom: 13,\n\t\t\t\t\t\tcenter: latlng,\n\t\t\t\t\t\tmapTypeId: google.maps.MapTypeId.' . $attr['maptype'] . '\n\t\t\t\t\t};\n\t\t\t\t\tvar map = new google.maps.Map(document.getElementById(\"map\"),myOptions);';\n\t\t\n\t\t\t\t $map .=' var sites = [';\n\t\t\t\t\t\t//marker: show if address is not specified\n\t\t\t\t\t\tif ($attr['marker'] != ''){\n\t\t\t\t\t\t\t$markers = explode(\"|\",$attr['marker']);\n\t\t\t\t\t\t\tfor($i = 0;$i < count($markers);$i ++){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$markerTmp=$markers[$i];\n\t\t\t\t\t\t\t\t$marker= explode(\",\",$markerTmp);\n\t\t\t\t\t\t\t\t\tif (count($marker)>3) { \n\t\t\t\t\t\t\t\t\t$markerTmp2 .='['.$marker[0].',' .$marker[1].',\\'' . $marker[2] . '\\',\\'' . $marker[3] . '\\'],';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$markerTmp2 .='['.$marker[0].',' .$marker[1].',\\'' . $marker[2] . '\\',null],';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t \n\t\t\t\t\t $markerTmp2=substr ($markerTmp2,0,strlen ( $markerTmp2 )-1);\n\t\t\t\t\t $map .=$markerTmp2;\n\t\t\t\t\t $map .='];';\n\t\t\t\t\t $map .='';\n\t\t\t\t\t $map .=' for (var i = 0; i < sites.length; i++) {';\n\t\t\t\t\t $map .=' var site = sites[i];';\n\t\t\t\t\t $map .=' var siteLatLng = new google.maps.LatLng(site[0], site[1]);';\t\n\t\t\t\t\t $map .=' var markerimage = site[3];';\n\t\t\t\t\t \n\t\t\t\t\t $map .=' var marker = new google.maps.Marker({';\n\t\t\t\t\t $map .=' position: siteLatLng, ';\n\t\t\t\t\t $map .=' map: map,title:\"'.$addr.'\",';\n\t\t\t\t\t $map .=' icon: markerimage,';\n\t\t\t\t\t $map .=' html: \"Hello dude\" }); \n\t\t\t\t\t \n\t\t\t\t\t var infowindow = new google.maps.InfoWindow({\n\t\t\t\t\t\t\tcontent: \"Hello dude\"\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvar marker3 = new google.maps.Marker({\n\t\t\t\t\t\t\t\tposition: latlng,\n\t\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\t\ttitle:\"Uluru (Ayers Rock)\"\n\t\t\t\t\t\t});\n\n\t\t\t\t\t \n\t\t\t\t\t\t\t\tgoogle.maps.event.addListener(marker3, \"click\", function () {\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tinfowindow.open(map,marker3);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t;}\n\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t\treturn $map;\n\t\t\t\t\t}", "public static function registerMap($map)\n {\n $maps = (array) $map;\n array_walk($maps, function (&$name) {\n $name = 'js/' . $name . '.js';\n });\n static::$_mapJsFiles = array_unique(array_merge(static::$_mapJsFiles, $maps));\n if (static::$_mapJsFiles) {\n MapAsset::register(Yii::$app->getView())->js = static::$_mapJsFiles;\n }\n }", "public function getPrintInitializeFunction() {\r\n\t\treturn $this->getPrintMapObjectIdentifier() . ' = new Tx_AdGoogleMaps_MapBuilder(' . $this->getPrintOptionsObjectIdentifier() . ');';\r\n\t}", "public function gerarJavascript() \r\n\t{\r\n\t\t$sHtml = \"\";\r\n\t\t\r\n\t\tif (self::$bCriouEventoRezise == false) {\r\n\t\t\t$sHtml .= \"$(window).resize(function() {\\n\";\r\n\t\t\t$sHtml .= \" if(this.resizeTO) clearTimeout(this.resizeTO);\\n\";\r\n\t\t\t$sHtml .= \" this.resizeTO = setTimeout(function() {\\n\";\r\n\t\t\t$sHtml .= \" $(this).trigger('resizeEnd');\\n\";\r\n\t\t\t$sHtml .= \" }, 500);\\n\";\r\n\t\t\t$sHtml .= \"});\\n\";\r\n\t\t\t\r\n\t\t\tself::$bCriouEventoRezise = true;\r\n\t\t}\r\n\t\t\r\n\t\t$sHtml .= \"google.charts.setOnLoadCallback(draw_chart_\" . $this->getId() . \");\\n\";\r\n\t\t$sHtml .= \"function draw_chart_\" . $this->getId() . \"() {\\n\";\r\n\t\t$sHtml .= \" var data = new google.visualization.DataTable();\\n\";\r\n\t\t$sHtml .= $this->gerarJsColunas();\r\n\t\t$sHtml .= \" data.addRows(\" . $this->gerarJsDados() . \");\\n\";\r\n\t\t$sHtml .= \" var options = \" . $this->gerarJsOpcoes() . \";\\n\";\r\n\t\t$sHtml .= \" var chart = new google.visualization.\". $this->getClasseGoogleVisualization() . \"(document.getElementById('\" . $this->getId() . \"'));\\n\";\r\n\t\t$sHtml .= \" chart.draw(data, options);\\n\";\r\n\t\t$sHtml .= \"}\\n\";\r\n\t\t$sHtml .= \"$(window).on('resizeEnd', function() {\\n\";\r\n\t\t$sHtml .= \" draw_chart_\" . $this->getId() . \"();\\n\";\r\n\t\t$sHtml .= \"});\\n\";\r\n\t\t\r\n\t\treturn $sHtml;\r\n\t}", "protected function renderAsJavascript() {}", "public function getPrintJavaScript() {\r\n\t\t$javaScript .= LF . $this->getPrintOptionsObjectIdentifier() . ' = ' . $this->getPrintOptions() . ';';\r\n\t\t$javaScript .= LF . $this->getPrintInitializeFunction();\r\n\t\treturn $javaScript;\r\n\t\t\t\r\n\t}", "public function getJsonSerializeCode(): string\n {\n /** @var Annotation\\JsonCollection|null $jsonCollection */\n $jsonCollection = $this->findAnnotation(Annotation\\JsonCollection::class);\n if ($jsonCollection === null) {\n return '';\n }\n\n /** @var Annotation\\JsonFormat|null $jsonFormat */\n $jsonFormat = $this->findAnnotation(Annotation\\JsonFormat::class);\n if ($jsonFormat !== null) {\n $method = $jsonFormat->method ?? 'get' . ucfirst($jsonFormat->property);\n $format = \"$method()\";\n } else {\n $stopRecursion = $this->findAnnotation(Annotation\\JsonRecursive::class) ? '' : 'true';\n $format = \"jsonSerialize($stopRecursion)\";\n }\n $isIncluded = $this->findAnnotation(Annotation\\JsonInclude::class) !== null;\n $index = $jsonCollection->key ?: lcfirst($this->getPropertyName());\n $class = $this->getBeanClassName();\n $variableName = '$' . TDBMDaoGenerator::toVariableName($class);\n $getter = $this->getName();\n if ($this->hasLocalUniqueIndex()) {\n $code = \"\\$array['$index'] = (\\$object = \\$this->$getter()) ? \\$object->$format : null;\";\n } else {\n $code = <<<PHP\n\\$array['$index'] = array_map(function ($class $variableName) {\n return ${variableName}->$format;\n}, \\$this->$getter()->toArray());\nPHP;\n }\n if (!$isIncluded) {\n $code = preg_replace('(\\n)', '\\0 ', $code);\n $code = <<<PHP\nif (!\\$stopRecursion) {\n $code\n}\nPHP;\n }\n return $code;\n }", "protected function setJavaScriptCodeArray()\n {\n foreach ($this->javascriptCodeArray as $name => $code) {\n $this->pageRenderer->addJsInlineCode($name, $code, false);\n }\n }", "private function renderMapMarkerOxMap( $template, $mapTemplate )\n {\n $mapHashKey = '###MAP###';\n // Substitute marker HTML\n $markerArray = $this->renderMapMarkerSnippetsHtmlCategories( $mapTemplate );\n $markerArray = $markerArray + $this->renderMapMarkerSnippetsHtmlDynamic( $mapTemplate );\n $mapTemplate = $this->pObj->cObj->substituteMarkerArray( $mapTemplate, $markerArray );\n//var_dump( __METHOD__, __LINE__, $markerArray, $mapTemplate );\n // Substitute marker HTML\n // #i0120, 150101, dwildt: 5+\n $templateWoMarker = $this->renderMapMarkerWoMarker( $mapHashKey, $template );\n if ( $templateWoMarker )\n {\n// var_dump( __METHOD__, __LINE__ );\n// die( ':(' );\n return $templateWoMarker;\n }\n // Add data\n $mapTemplate = $this->renderMapMarkerVariablesSystem( $mapTemplate );\n $markerArray = $this->renderMapMarkerVariablesDynamic( $mapTemplate );\n $mapTemplate = $this->pObj->cObj->substituteMarkerArray( $mapTemplate, $markerArray );\n // Add data\n // Substitute marker JSS\n $markerArray = $markerArray + $this->renderMapMarkerSnippetsJssDynamic( $mapTemplate );\n $mapTemplate = $this->pObj->cObj->substituteMarkerArray( $mapTemplate, $markerArray );\n // Substitute marker JSS\n // map marker\n // Replace the map marker in the template of the parent object\n $template = str_replace( $mapHashKey, $mapTemplate, $template );\n\n//var_dump( __METHOD__ . ' (' . __LINE__ . '): ', $mapTemplate, $template );\n // RETURN the template\n return $template;\n }", "function php2js( $arr, $arrName ) {\n $lineEnd=\"\";\n echo \"<script>\\n\";\n echo \" var $arrName = \".json_encode($arr, JSON_PRETTY_PRINT);\n echo \"</script>\\n\\n\";\n}", "public function toJavascript()\n {\n ob_start();\n ?>\n <script type=\"text/javascript\">\n jQuery( function ( $ )\n {\n \"use strict\";\n\n Morris.<?php echo $this->__chart_type ?>(\n <?php echo $this->toJSON() ?>\n );\n });\n </script>\n <?php\n $buffer = ob_get_contents();\n ob_end_clean();\n\n return $buffer;\n }", "public function getOreMap()\n {\n $perlinService = new PerlinService;\n $gameConfig = new GameConfig;\n\n $oreMapSettings = $gameConfig->getOreMapSettings();\n\n $gridSizeX = $oreMapSettings[\"gridSizeX\"];\n $gridSizeY = $oreMapSettings[\"gridSizeY\"];\n $nodeFreq = $oreMapSettings[\"nodeFreq\"];\n $nodeSize = $oreMapSettings[\"nodeSize\"];\n\n $waterMap = json_decode(file_get_contents('../deposit/Maps/waterMap.json'), true);\n\n $nodeSize = $nodeSize * -1;\n $nodeSize = $nodeSize + 1;\n $content = \"{\\\"oreMap\\\":[\n \";\n $mathService = new MathService;\n for($y=0; $y<$gridSizeY; $y+=1) {\n for($x=0; $x<$gridSizeX; $x+=1) {\n if ($y % 2 != 0) {\n $fakeY = $y - 1;\n } else {\n $fakeY = $y;\n }\n if ($x % 2 != 0) {\n $fakeX = $x - 1;\n } else {\n $fakeX = $x;\n }\n\n if (!isset($waterMap[$fakeY][$fakeX])) {\n $num = $perlinService->noise($x,$y,0,$nodeFreq); \n $raw = ($num/2)+.5;\n if ($raw < 0) $raw = 0; \n $num = dechex( $raw*255 ); \n if (strlen($num) < 2) $num = \"0\".$num; \n if ($raw > $nodeSize){\n if ($raw > 1) $raw = 1; \n $min = $nodeSize;\n $max = 1;\n $normalized = ($raw-$min) / ($max-$min);\n $content = $content . '{\"x\": '.$mathService->gridToCoordinates($x, 0, 'x').', \"y\": '.$mathService->gridToCoordinates(0, $y, 'y').', \"value\": '.$normalized.'},\n '; \n } \n } \n }\n }\n $content[strrpos($content, ',')] = ' ';\n $content = $content . ']}';\n $fp = fopen('../deposit/Maps/oreMap.json', 'w');\n fwrite($fp, $content);\n fclose($fp);\n }", "private function renderJs(): string {\n\t\t$result = '';\n\t\tif (!empty($this->_configBundles)) {\n\t\t\t$result .= $this->getView()->element('DataTables.script', ['configBundles' => $this->_configBundles]);\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function generateJSON();", "public function getPrint() {\r\n\t\tif ($this->mapControl->isUseMarkerCluster() === TRUE) {\r\n\t\t\t$this->frontEndUtility->includeFrontEndResources('Tx_AdGoogleMaps_MapBuilder_Options');\r\n\t\t}\r\n\t\treturn $this->jsonEncoder->encode($this);\r\n\t}", "function dumpJavascript()\r\n {\r\n //Do nothing yet\r\n }", "function gmap_obj($args){\n /*\n $args = array(\n 'id' => \"map-lyra\",\n 'lattitude' => \"43.5414097\",\n 'longitude' => \"1.5165507000000389\",\n 'zoom' => 16,\n 'address' => null,\n 'map_text' => null,\n );*/\n\n $output = \"<script src='https://maps.googleapis.com/maps/api/js?key=&sensor=false&extension=.js'></script>\";\n\n $output .= \"<script>\n google.maps.event.addDomListener(window, 'load', init);\n var map;\n function init() {\n var mapOptions = {\n center: new google.maps.LatLng(\".$args['lattitude'].\",\".$args['longitude'].\"),\n zoom: \".$args['zoom'].\",\n zoomControl: true,\n zoomControlOptions: {\n style: google.maps.ZoomControlStyle.SMALL\n },\n disableDoubleClickZoom: true,\n mapTypeControl: true,\n mapTypeControlOptions: {\n style: google.maps.MapTypeControlStyle.DROPDOWN_MENU\n },\n scaleControl: true,\n scrollwheel: false,\n panControl: true,\n streetViewControl: false,\n draggable : true,\n overviewMapControl: false,\n overviewMapControlOptions: {\n opened: false\n },\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n styles: [{\\\"featureType\\\":\\\"all\\\",\\\"elementType\\\":\\\"all\\\",\\\"stylers\\\":[{\\\"saturation\\\":-100},{\\\"gamma\\\":0.5}]}]\n };\n var mapElement = document.getElementById('\".$args['id'].\"');\n var map = new google.maps.Map(mapElement, mapOptions);\n var locations = [\n ['\".$args['map_text'].\"', '\".$args['address'].\"', 'undefined', 'undefined','undefined', \".$args['lattitude'].\", \".$args['longitude'].\", '\".get_template_directory_uri().\"/img/marker.png']\n ];\n for (i = 0; i < locations.length; i++) {\n if (locations[i][1] =='undefined'){ description ='';} else { description = locations[i][1];}\n if (locations[i][2] =='undefined'){ telephone ='';} else { telephone = locations[i][2];}\n if (locations[i][3] =='undefined'){ email ='';} else { email = locations[i][3];}\n if (locations[i][4] =='undefined'){ web ='';} else { web = locations[i][4];}\n if (locations[i][7] =='undefined'){ markericon ='';} else { markericon = locations[i][7];}\n marker = new google.maps.Marker({\n icon: markericon,\n position: new google.maps.LatLng(locations[i][5], locations[i][6]),\n map: map,\n title: locations[i][0],\n desc: description,\n tel: telephone,\n email: email,\n web: web\n });\n if (web.substring(0, 7) != \\\"http://\\\") {\n link = \\\"http://\\\" + web;\n } else {\n link = web;\n }\n bindInfoWindow(marker, map, locations[i][0], description, telephone, email, web, link);\n }\n function bindInfoWindow(marker, map, title, desc, telephone, email, web, link) {\n var infoWindowVisible = (function () {\n var currentlyVisible = false;\n return function (visible) {\n if (visible !== undefined) {\n currentlyVisible = visible;\n }\n return currentlyVisible;\n };\n }());\n iw = new google.maps.InfoWindow();\n google.maps.event.addListener(marker, 'click', function() {\n if (infoWindowVisible()) {\n iw.close();\n infoWindowVisible(false);\n } else {\n var html= \\\"<div style='color:#000;background-color:#fff;padding:5px;width:90%;'><h4>\\\"+title+\\\"</h4><p>\\\"+desc+\\\"<p><a href='mailto:\\\"+email+\\\"' >\\\"+email+\\\"<a><a href='\\\"+link+\\\"'' >\\\"+web+\\\"<a></div>\\\";\n iw = new google.maps.InfoWindow({content:html});\n iw.open(map,marker);\n infoWindowVisible(true);\n }\n });\n google.maps.event.addListener(iw, 'closeclick', function () {\n infoWindowVisible(false);\n });\n }\n }\n</script>\";\n\n return $output;\n}", "function gmap_shortcode( $atts ) {\n // Attributes\n extract( shortcode_atts(\n array(\n 'localisation' => 'lyra',\n ), $atts )\n );\n $args = array(\n 'id' => \"sc-lyra\",\n 'lattitude' => \"43.5414097\",\n 'longitude' => \"1.5165507000000389\",\n 'zoom' => 16,\n 'address' => addslashes('109 rue de l\\'innovation, Labége'),\n 'map_text' => addslashes('Lyra Network'),\n );\n $jsMap = gmap_obj($args);\n return $jsMap.'<div id=\"sc-lyra\" class=\"gmap\"></div>';\n}", "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_ID_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validateUser'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_USER_ID_FIELD'),\n ),\n 'ELEMENT_CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateElementCode'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_ELEMENT_CODE_FIELD'),\n ),\n 'TITLE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateTitle'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_TITLE_FIELD'),\n ),\n 'PASSWORD_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validatePassword'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_PASSWORD_ID_FIELD'),\n ),\n 'APP_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validateApp'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APP_ID_FIELD'),\n ),\n 'SCOPE' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_SCOPE_FIELD'),\n ),\n 'QUERY' => array(\n 'data_type' => 'text',\n 'serialized' => true,\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_QUERY_FIELD'),\n ),\n 'OUTGOING_EVENTS' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_EVENTS_FIELD'),\n ),\n 'OUTGOING_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateOutgoingQueryNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_NEEDED_FIELD'),\n ),\n 'OUTGOING_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateOutgoingHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_HANDLER_URL_FIELD'),\n ),\n 'WIDGET_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateWidgetNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_NEEDED_FIELD'),\n ),\n 'WIDGET_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateWidgetHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_HANDLER_URL_FIELD'),\n ),\n 'WIDGET_LIST' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_LIST_FIELD'),\n ),\n 'APPLICATION_TOKEN' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationToken'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_TOKEN_FIELD'),\n ),\n 'APPLICATION_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_NEEDED_FIELD'),\n ),\n 'APPLICATION_ONLY_API' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationOnlyApi'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_ONLY_API_FIELD'),\n ),\n 'BOT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_BOT_ID_FIELD'),\n ),\n 'BOT_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateBotHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_BOT_HANDLER_URL_FIELD'),\n ),\n 'USER' => new ReferenceField(\n 'USER',\n '\\Bitrix\\Main\\UserTable',\n array('=this.USER_ID' => 'ref.ID')\n ),\n );\n }", "protected function setJavaScriptCodeArray() {}", "public static function getMap()\n {\n return [\n 'ID' => [\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ID_FIELD'),\n ],\n 'STEP' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ITEMS_STEP_FIELD'),\n ],\n 'STATUS' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_STATUS_FIELD'),\n ],\n 'ITEMS_PER_STEP' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ITEMS_PER_STEP_FIELD'),\n ],\n 'CREATED' => [\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_CREATED_FIELD'),\n ],\n ];\n }", "private function map_index() {\n\t\t// self::getRoute('Amarr','Jita');\n\t\tif (!isset($_GET['reg'])) {\n\t\t\t$jumps = db::query(\"SELECT DISTINCT `rfrom`.`name` as `fromName`, `rto`.`name` as `toName`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `gates` as `g`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOIN `systems` as `from` ON (`g`.`from` = `from`.`id`)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOIN `systems` as `to` ON (`g`.`to` = `to`.`id`)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOIN `regions` as `rfrom` ON (`rfrom`.`id` = `from`.`regionID`)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOIN `regions` as `rto` ON (`rto`.`id` = `to`.`regionID`)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE `rfrom`.`name` != `rto`.`name`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND `rfrom`.`id` NOT IN (10000004, 10000017, 10000019)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND `rto`.`id` NOT IN (10000004, 10000017, 10000019);\");\n\t\t\t$dots = db::query(\"SELECT `id`, `name`, `pos_x`, `pos_y`, `pos_z` FROM `regions` WHERE `id` < 11000000 AND `id` NOT IN (10000004, 10000017, 10000019);\");\n\t\t\tforeach ($jumps as $jump) {\n\t\t\t\t$routeDots[ $jump['fromName'] ][ $jump['toName'] ] = 1;\n\t\t\t}\n\t\t\t$map = array('dots' => $dots, 'jumps' => $jumps, 'routeDots' => $routeDots);\n\t\t} else {\n\t\t\t$map = universe::getRegionMap($_GET['reg']);\n\t\t}\n\t\t\n\t\t$regionList = db::query(\"SELECT `id`, `name` FROM `regions` WHERE `id` < 11000000 ORDER BY `name`;\");\n\t\t$regstr = '<select name=\"region\" id=\"mapRegion\"><option value=\"0\">&mdash;&mdash;&mdash;Выберите регион&mdash;&mdash;&mdash;</option>';\n\t\tforeach ($regionList as $region) {\n\t\t\tif ($region['name'] == @$_GET['reg']) $sel = 'selected';\n\t\t\t\telse $sel = '';\n\t\t\t$regstr .= '<option ' . $sel . ' value=\"' . $region['id'] . '\">' . $region['name'] . '</option>';\n\t\t}\n\t\t$regstr .= '</select>';\n\t\t$mainsupport = '\n\t\t\t<div id=\"control\">\n\t\t\t\t<div class=\"startx\"></div>\n\t\t\t\t<div class=\"x\"></div>\n\t\t\t\t<div class=\"starty\"></div>\n\t\t\t\t<div class=\"y\"></div>\n\t\t\t\t' . $regstr . '\n\t\t\t\t<input type=\"button\" value=\"Отрисовать\" id=\"drawMap\">\n\t\t\t\t<input type=\"button\" value=\"К карте вселенной\" id=\"resetMap\">\n\t\t\t</div>\n\t\t\t<input type=\"text\" class=\"systemSearch\" data-searchmod=\"info\" id=\"systemInfo\" placeholder=\"Информация о системе\" size=\"25\">\n\t\t\t<div id=\"strForMap\">' . json_encode($map) . '</div>\n\t\t\t';\n\t\t$maincontent = '\n\t\t\t<form id=\"pathfinder\" method=\"GET\">\n\t\t\t\t<input type=\"text\" class=\"systemSearch\" data-searchmod=\"path\" id=\"fromSystem\" name=\"from\" placeholder=\"Отправная точка\" autocomplete=\"off\">\n\t\t\t\t<input type=\"text\" class=\"systemSearch\" data-searchmod=\"path\" id=\"toSystem\" name=\"to\" placeholder=\"Пункт назначения\" autocomplete=\"off\">\n\t\t\t\t' . (isset($_GET['reg']) ? '<input type=\"hidden\" name=\"reg\" value=\"' . $_GET['reg'] . '\">' : '') . '\n\t\t\t\t<input type=\"submit\" id=\"submitPath\" disabled value=\"Проложить путь\">\n\t\t\t\t<div id=\"systemSearchVariants\" class=\"mapSSV\">ololo</div>\n\t\t\t</form>';\n\t\t\n\t\troot::$_ALL['maincaption'] = 'EVE Universe Map';\n\t\troot::$_ALL['mainsupport'] = $mainsupport;\n\t\troot::$_ALL['maincontent'] = $maincontent;\n\t\troot::$_ALL['backtrace'][] = 'initialized map/index';\n\t}" ]
[ "0.72252077", "0.67608774", "0.67607427", "0.66616005", "0.6614166", "0.6531004", "0.641709", "0.6415641", "0.6412427", "0.6403291", "0.6387463", "0.6316864", "0.6189339", "0.6127493", "0.5979974", "0.5967074", "0.5958609", "0.5947183", "0.5936739", "0.5900446", "0.589403", "0.58894116", "0.5817874", "0.58009386", "0.57859534", "0.5784873", "0.5778119", "0.5774169", "0.57470906", "0.5743766", "0.57357776", "0.5735198", "0.5726607", "0.57262117", "0.5721142", "0.5705911", "0.5702404", "0.56982666", "0.5686654", "0.56845766", "0.56841546", "0.5660049", "0.56485033", "0.5641077", "0.56293833", "0.5619247", "0.5617415", "0.5613996", "0.5611118", "0.56049764", "0.5604444", "0.55821365", "0.5579188", "0.5569125", "0.5567825", "0.55617225", "0.5560931", "0.5552752", "0.5551223", "0.5549172", "0.5534102", "0.5516486", "0.55155367", "0.5514542", "0.55126446", "0.55022424", "0.54756254", "0.54739577", "0.5465515", "0.5442731", "0.54327554", "0.5423367", "0.5409657", "0.5408491", "0.53972006", "0.53952897", "0.53814733", "0.5363686", "0.5361145", "0.5350141", "0.5346417", "0.5339557", "0.5337793", "0.5329961", "0.5329141", "0.53199244", "0.53144556", "0.530205", "0.52944946", "0.528284", "0.5281704", "0.52814245", "0.52798826", "0.52779937", "0.5272738", "0.52592987", "0.52578574", "0.5257488", "0.5252041", "0.5239242" ]
0.55455226
60
Run the database seeds.
public function run() { Terms::insert([ 'terms' => 'One', 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s') ]); Terms::insert([ 'terms' => 'Two', 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s') ]); Terms::insert([ 'terms' => 'Three', 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s') ]); }
{ "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
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n return __CLASS__;;\n }", "private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}", "public function getClassName() {\r\n\t\treturn($this->class_name);\r\n\t}", "public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}", "public function getClassName() { return __CLASS__; }", "public static function getClassName() {\n\t\treturn get_called_class();\n\t}", "public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }", "public static function getClassName()\n\t{\n\t\treturn get_called_class();\n\t}", "public static function getClassName()\n {\n return get_called_class();\n }", "public function getClassName()\n {\n return $this->class;\n }", "public function getClassName()\n {\n return $this->class;\n }", "public static function className() : string {\n return get_called_class();\n }", "public function getName()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "public function getClassName()\n {\n return $this->class_name;\n }", "public function class_name() {\n\t\treturn strtolower(get_class($this));\n\t}", "public function getName(): string\n {\n return __CLASS__;\n }", "public static function getClassName() {\n return get_called_class();\n }", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function getClassname()\n\t{\n\t\treturn $this->classname;\n\t}", "public function getClassName()\n {\n return $this->_sClass;\n }", "public function get_just_class_name() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn substr( strrchr( $full_path, '\\\\' ), 1 );\n\n\t}", "protected function getClassName(): string\n {\n return $this->className;\n }", "public static function getClassName() {\n return self::$className;\n }", "public function getClassName(): string;", "public function getClassName() : string;", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "public function getClassName() : string\n {\n return $this->className;\n }", "public function getClassName()\n {\n $fullClass = get_called_class();\n $exploded = explode('\\\\', $fullClass);\n\n return end($exploded);\n }", "public static function getClassName()\n {\n $classNameArray = explode('\\\\', get_called_class());\n\n return array_pop($classNameArray);\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}", "public function getClassName() : string\n {\n\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public static function staticGetClassName()\n {\n return __CLASS__;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n\t\treturn $this->className;\n\t}", "public function getClassName(): string\n {\n return $this->makeClassFromFilename($this->filename);\n }", "public function getClassName() {\n\t\treturn $this->_className;\n\t}", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName ()\n {\n $className = explode('\\\\', get_class($this));\n\n return array_pop($className);\n }", "function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "public static function getClassName(){\n $parts = explode('\\\\', static::class);\n return end($parts);\n }", "function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }", "public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }", "public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }", "public function getClass()\n {\n return $this->_className;\n }", "private function getClassName() {\n return (new \\ReflectionClass(static::class))->getShortName();\n }", "public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}", "public function getClassNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[1];\r\n }", "public function className()\n {\n $full_path = explode('\\\\', get_called_class());\n return end($full_path);\n }", "private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }", "public function getClass(): string\n {\n return $this->class;\n }", "public static function getFullyQualifiedClassName() {\n $reflector = new \\ReflectionClass(get_called_class());\n return $reflector->getName();\n }", "public function getClassName()\n\t{\n\t\tif (null === $this->_className) {\n\t\t\t$this->setClassName(get_class($this));\n\t\t}\n\t\t\n\t\treturn $this->_className;\n\t}", "public function getClassName() : string {\n if ($this->getType() != Router::CLOSURE_ROUTE) {\n $path = $this->getRouteTo();\n $pathExplode = explode(DS, $path);\n\n if (count($pathExplode) >= 1) {\n $fileNameExplode = explode('.', $pathExplode[count($pathExplode) - 1]);\n\n if (count($fileNameExplode) == 2 && $fileNameExplode[1] == 'php') {\n return $fileNameExplode[0];\n }\n }\n }\n\n return '';\n }", "public function getName(){\n\t\treturn get_class($this);\n\t}", "public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }", "public static function className()\n\t{\n\t\treturn static::class;\n\t}", "public function toClassName(): string\n {\n return ClassName::full($this->name);\n }", "public function getName()\n {\n return static::CLASS;\n }", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "function getName()\n {\n return get_class($this);\n }", "public function className(): string\n {\n return $this->taskClass->name();\n }", "public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }", "function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n return get_class($this);\n }", "public function toString()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}", "public function getNamespacedName()\n {\n return get_class();\n }", "protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', get_class($this)));\n\t}", "protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }", "function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}", "public function getClassName(): ?string {\n\t\treturn Hash::get($this->_config, 'className');\n\t}", "public function __toString() {\n\t\treturn $this->className();\n\t}", "public static function name()\n {\n return lcfirst(self::getClassShortName());\n }" ]
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529981", "0.85237026", "0.8502733", "0.8493115", "0.8491238", "0.8488943", "0.8484194", "0.847459", "0.8441478", "0.8418852", "0.8399611", "0.83950585", "0.83949184", "0.83853173", "0.8378261", "0.837777", "0.8372544", "0.8355432", "0.8355432", "0.83479965", "0.8325877", "0.8325877", "0.8312873", "0.83027107", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.82474744", "0.8242934", "0.8202995", "0.8185409", "0.8184752", "0.81829107", "0.81829107", "0.8176191", "0.81761754", "0.8162896", "0.8142928", "0.81323636", "0.8062757", "0.80528253", "0.8045769", "0.8033823", "0.8026215", "0.8001116", "0.79949147", "0.79779136", "0.79672754", "0.7957633", "0.790449", "0.78617185", "0.7860126", "0.7847096", "0.78195953", "0.7817044", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.77821547", "0.7761565", "0.77588034", "0.7747239", "0.77409905", "0.77409905", "0.7710985", "0.76808393", "0.7670475", "0.76640886", "0.76514393", "0.76499707", "0.76323646", "0.76005036", "0.75937456" ]
0.0
-1
/ detecta si un string esta en utf8
function is_utf8($str) { $c=0; $b=0; $bits=0; $len=strlen($str); for($i=0; $i<$len; $i++){ $c=ord($str[$i]); if($c > 128){ if(($c >= 254)) return false; elseif($c >= 252) $bits=6; elseif($c >= 248) $bits=5; elseif($c >= 240) $bits=4; elseif($c >= 224) $bits=3; elseif($c >= 192) $bits=2; else return false; if(($i+$bits) > $len) return false; while($bits > 1){ $i++; $b=ord($str[$i]); if($b < 128 || $b > 191) return false; $bits--; } } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_well_formed_utf8($string)\n{\n if ( empty($string) ) {\n return true;\n }\n // iconv is the fastest and best way to check this but it\n // might not be installed\n // The comments in this blog post will explain what is going on\n // http://www.sitepoint.com/blogs/2006/08/09/scripters-utf-8-survival-guide-slides/\n // Please note that we are validating, not cleaning, the input\n if ( function_exists('iconv') ) {\n return iconv('UTF-8', 'UTF-8', $string) == $string;\n }\n // Falling back to slower regexp if iconv is not available\n // When the u-flag is used, the string must be well formed or\n // nothing will match\n return preg_match('/^.{1}/us', $string) == 1;\n}", "function mb_is_utf8($string) { \n\treturn mb_detect_encoding($string, 'UTF-8') === 'UTF-8';\n}", "function seems_utf8($str)\n {\n }", "function validate_utf8($text) {\n if (strlen($text) == 0) {\n return TRUE;\n }\n return (preg_match('/^./us', $text) == 1);\n}", "function _validate_utf8($text) {\n if (strlen($text) == 0) {\n return TRUE;\n }\n return (preg_match('/^./us', $text) == 1);\n}", "abstract public function hasUTF();", "function is_utf8($string) {\n\t// From http://w3.org/International/questions/qa-forms-utf-8.html\n\treturn preg_match('%^(?:\n\t\t[\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\n\t\t| [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n\t\t| \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n\t\t| [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n\t\t| \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n\t\t| \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n\t\t| [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n\t\t| \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n\t)*$%xs', $string);\n}", "function isUtf8($string) {\n if (function_exists(\"mb_check_encoding\") && is_callable(\"mb_check_encoding\")) {\n return mb_check_encoding($string, 'UTF8');\n }\n\n return preg_match('%^(?:\n [\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\n | [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n | [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n | \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n | [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n )*$%xs', $string);\n\n }", "function isUTF8($str) {\n return preg_match('%^(?:\n [\\x09\\x0A\\x0D\\x20-\\x7E] // ASCII\n | [\\xC2-\\xDF][\\x80-\\xBF] // non-overlong 2-byte\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF] // excluding overlongs\n | [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} // straight 3-byte\n | \\xED[\\x80-\\x9F][\\x80-\\xBF] // excluding surrogates\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} // planes 1-3\n | [\\xF1-\\xF3][\\x80-\\xBF]{3} // planes 4-15\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} // plane 16\n )*$%xs', $str);\n }", "function isUTF8($str) {\n return preg_match('%^(?:\n [\\x09\\x0A\\x0D\\x20-\\x7E] // ASCII\n | [\\xC2-\\xDF][\\x80-\\xBF] // non-overlong 2-byte\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF] // excluding overlongs\n | [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} // straight 3-byte\n | \\xED[\\x80-\\x9F][\\x80-\\xBF] // excluding surrogates\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} // planes 1-3\n | [\\xF1-\\xF3][\\x80-\\xBF]{3} // planes 4-15\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} // plane 16\n )*$%xs', $str);\n }", "function is_utf8($string) {\n\treturn !strlen(\n\tpreg_replace(\n\t ',[\\x09\\x0A\\x0D\\x20-\\x7E]' # ASCII\n\t. '|[\\xC2-\\xDF][\\x80-\\xBF]' # non-overlong 2-byte\n\t. '|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]' # excluding overlongs\n\t. '|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}' # straight 3-byte\n\t. '|\\xED[\\x80-\\x9F][\\x80-\\xBF]' # excluding surrogates\n\t. '|\\xF0[\\x90-\\xBF][\\x80-\\xBF]{2}' # planes 1-3\n\t. '|[\\xF1-\\xF3][\\x80-\\xBF]{3}' # planes 4-15\n\t. '|\\xF4[\\x80-\\x8F][\\x80-\\xBF]{2}' # plane 16\n\t. ',sS',\n\t'', $string));\n}", "function isUtf8($string) {\n\tif (function_exists(\"mb_check_encoding\") && is_callable(\"mb_check_encoding\")) {\n\t\treturn mb_check_encoding($string, 'UTF8');\n\t}\n\treturn preg_match('%^(?:\n\t\t [\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\n\t\t| [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n\t\t| \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n\t\t| [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n\t\t| \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n\t\t| \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n\t\t| [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n\t\t| \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n\t)*$%xs', $string);\n}", "public function isUTF8() {\r\n if (preg_match('!!u', $this->contents)) return true;\r\n return false;\r\n }", "function ValidateUtf8($text) {\n if (strlen($text) == 0) {\n return TRUE;\n }\n return (preg_match('/^./us', $text) == 1);\n }", "public static function isNotUtf8Charset() {}", "function isUTF8($string){\r\n\tif (is_array($string)){\r\n\t\t$enc = implode('', $string);\r\n\t\treturn @!((ord($enc[0]) != 239) && (ord($enc[1]) != 187) && (ord($enc[2]) != 191));\r\n\t}else{\r\n\t\treturn (utf8_encode(utf8_decode($string)) == $string);\r\n\t}\r\n}", "function utf8_validate($str) {\n static $regex = <<<'END'\n/^(?:\n [\\x00-\\x7F]\n | [\\xC2-\\xDF][\\x80-\\xBF]\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF]\n | [\\xE1-\\xEC\\xEE-\\xEF][\\x80-\\xBF]{2}\n | \\xED[\\x80-\\x9F][\\x80-\\xBF]\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]\n | [\\xF1-\\xF3][\\x80-\\xBF]{3}\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2}\n)*$/x\nEND;\n return preg_match($regex, $str) === 1;\n}", "function checkEncoding($str, $encoding);", "private function detect_encoding( $str ) {\r\n }", "private function check_utf8_support() {\n\t\treturn 'utf-8' === strtolower( get_bloginfo( 'charset' ) );\n\t}", "protected function getStrIsUtf8 ($str) {\n\t\treturn !mb_check_encoding($str, 'ASCII') && mb_check_encoding($str, 'UTF-8');\n\t}", "function isUTF8 ($string) {\n $c=0; $b=0;\n $bits=0;\n $len=strlen($string);\n for($i=0; $i<$len; $i++){\n $c=ord($string[$i]);\n if($c > 128){\n if(($c >= 254)) return false;\n elseif($c >= 252) $bits=6;\n elseif($c >= 248) $bits=5;\n elseif($c >= 240) $bits=4;\n elseif($c >= 224) $bits=3;\n elseif($c >= 192) $bits=2;\n else return false;\n if(($i+$bits) > $len) return false;\n while($bits > 1){\n $i++;\n $b=ord($string[$i]);\n if($b < 128 || $b > 191) return false;\n $bits--;\n }\n }\n }\n return true;\n }", "protected function isUtf8( $string)\n {\n return preg_match('%^(?:\n [\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\n | [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n | [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n | \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n | [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n )*$%xs', $string);\n }", "public function isUtf8()\n\t{\n\t\treturn strtolower($this->_mail->getMail()->getCharset())=='utf-8';\n\t}", "function seems_utf8($str)\n{\n\t$str_len = strlen($str);\n\tfor ($i = 0; $i < $str_len; ++$i)\n\t{\n\t\tif (ord($str[$i]) < 0x80) continue; # 0bbbbbbb\n\t\telse if ((ord($str[$i]) & 0xE0) == 0xC0) $n=1; # 110bbbbb\n\t\telse if ((ord($str[$i]) & 0xF0) == 0xE0) $n=2; # 1110bbbb\n\t\telse if ((ord($str[$i]) & 0xF8) == 0xF0) $n=3; # 11110bbb\n\t\telse if ((ord($str[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb\n\t\telse if ((ord($str[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b\n\t\telse return false; # Does not match any model\n\n\t\tfor ($j = 0; $j < $n; ++$j) # n bytes matching 10bbbbbb follow ?\n\t\t{\n\t\t\tif ((++$i == strlen($str)) || ((ord($str[$i]) & 0xC0) != 0x80))\n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "function seems_utf8($Str) {\r\n\tfor ($i=0; $i<strlen($Str); $i++) {\r\n\t\tif (ord($Str[$i]) < 0x80) continue; # 0bbbbbbb\r\n\t\telseif ((ord($Str[$i]) & 0xE0) == 0xC0) $n=1; # 110bbbbb\r\n\t\telseif ((ord($Str[$i]) & 0xF0) == 0xE0) $n=2; # 1110bbbb\r\n\t\telseif ((ord($Str[$i]) & 0xF8) == 0xF0) $n=3; # 11110bbb\r\n\t\telseif ((ord($Str[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb\r\n\t\telseif ((ord($Str[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b\r\n\t\telse return false; # Does not match any model\r\n\t\tfor ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?\r\n\t\t\tif ((++$i == strlen($Str)) || ((ord($Str[$i]) & 0xC0) != 0x80))\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "public function isUTF()\n {\n return $this->utf;\n }", "protected static function isUTF8($text)\n {\n /*\n Based on http://w3.org/International/questions/qa-forms-utf-8.html,\n but rewritten to avoid a dependency on PCRE.\n\n Also, the regular expression in the post above seems to limit\n valid inputs to printable characters (for compatibility reasons?).\n See also section 2.2 of http://www.w3.org/TR/xml11 and section 2.2\n of http://www.w3.org/TR/xml/ for a possible explanation.\n\n The code below does not suffer from such limitations.\n */\n $len = strlen($text);\n $res = true;\n for ($i = 0; $i < $len; $i++) {\n // U+0000 - U+007F\n $byte1 = ord($text[$i]);\n if ($byte1 >= 0 && $byte1 <= 0x7F) {\n continue;\n }\n\n // Look for 2nd byte\n if (++$i >= $len) {\n return false;\n }\n $byte2 = ord($text[$i]);\n\n // U+0080 - U-07FF\n if ($byte1 >= 0xC2 && $byte1 <= 0xDF) {\n if ($byte2 >= 0x80 && $byte2 <= 0xBF) {\n continue;\n }\n return false;\n }\n\n // Look for 3nd byte\n if (++$i >= $len) {\n return false;\n }\n $byte3 = ord($text[$i]);\n\n // U+0800 - U+0FFF\n if ($byte1 == 0xE0) {\n if ($byte2 >= 0xA0 && $byte2 <= 0xBF &&\n $byte3 >= 0x80 && $byte3 <= 0xBF) {\n continue;\n }\n return false;\n }\n\n // U+1000 - U+CFFF & U+E000 - U+FFFF\n if ($byte1 >= 0xE1 && $byte1 <= 0xEF && $byte1 !== 0xED) {\n if ($byte2 >= 0x80 && $byte2 <= 0xBF &&\n $byte3 >= 0x80 && $byte3 <= 0xBF) {\n $codepoint = (($byte1 & 0x0F) << 12) + (($byte2 & 0x3F) << 6) + ($byte3 & 0x3F);\n if (($codepoint >= 0xE000 && $codepoint <= 0xF8FF) || // Private range\n ($codepoint >= 0xFDD0 && $codepoint <= 0xFDEF) || // Non-characters\n $codepoint == 0xFFFE || $codepoint == 0xFFFF) { // Non-characters\n $res = null;\n }\n continue;\n }\n return false;\n }\n\n // U+D000 - U+D7FF\n if ($byte1 == 0xED) {\n if ($byte2 >= 0x80 && $byte2 <= 0x9F &&\n $byte3 >= 0x80 && $byte3 <= 0xBF) {\n continue;\n }\n return false;\n }\n\n // Look for 4nd byte\n if (++$i >= $len) {\n return false;\n }\n $byte4 = ord($text[$i]);\n\n // U+10000 - U+3FFFF\n if ($byte1 == 0xF0) {\n if ($byte2 >= 0x90 && $byte2 <= 0xBF &&\n $byte3 >= 0x80 && $byte3 <= 0xBF &&\n $byte4 >= 0x80 && $byte4 <= 0xBF) {\n $codepoint = (($byte1 & 0x07) << 18) +\n (($byte2 & 0x3F) << 12) +\n (($byte3 & 0x3F) << 6) +\n ($byte4 & 0x3F);\n // Non-characters Reserved range\n if ($codepoint == 0x1FFFE || $codepoint == 0x1FFFF || $codepoint >= 0x2FFFE) {\n $res = null;\n }\n continue;\n }\n return false;\n }\n\n // U+40000 - U+FFFFF\n if ($byte1 >= 0xF1 && $byte1 <= 0xF3) {\n if ($byte2 >= 0x80 && $byte2 <= 0xBF &&\n $byte3 >= 0x80 && $byte3 <= 0xBF &&\n $byte4 >= 0x80 && $byte4 <= 0xBF) {\n $codepoint = (($byte1 & 0x07) << 18) +\n (($byte2 & 0x3F) << 12) +\n (($byte3 & 0x3F) << 6) +\n ($byte4 & 0x3F);\n // Reserved range Non characters & private ranges\n if ($codepoint < 0xE0000 || $codepoint >= 0xEFFFE) {\n $res = null;\n }\n continue;\n }\n return false;\n }\n\n // U+100000 - U+10FFFF\n if ($byte1 == 0xF4) {\n if ($byte2 >= 0x80 && $byte2 <= 0x8F &&\n $byte3 >= 0x80 && $byte3 <= 0xBF &&\n $byte4 >= 0x80 && $byte4 <= 0xBF) {\n // This part contains only non-characters & private ranges.\n $res = null;\n continue;\n }\n return false;\n }\n\n // Byte #1 contained an invalid value.\n return false;\n }\n\n // No decoding error detected, but the given input may contain\n // non-characters/reserved characters, depending on the value of $res.\n return $res;\n }", "function seems_utf8($Str) { # by bmorel at ssi dot fr\n $length = strlen($Str);\n for ($i = 0; $i < $length; $i++) {\n if (ord($Str[$i]) < 0x80) continue; # 0bbbbbbb\n elseif ((ord($Str[$i]) & 0xE0) == 0xC0) $n = 1; # 110bbbbb\n elseif ((ord($Str[$i]) & 0xF0) == 0xE0) $n = 2; # 1110bbbb\n elseif ((ord($Str[$i]) & 0xF8) == 0xF0) $n = 3; # 11110bbb\n elseif ((ord($Str[$i]) & 0xFC) == 0xF8) $n = 4; # 111110bb\n elseif ((ord($Str[$i]) & 0xFE) == 0xFC) $n = 5; # 1111110b\n else return false; # Does not match any model\n for ($j = 0; $j < $n; $j++) { # n bytes matching 10bbbbbb follow ?\n if ((++$i == $length) || ((ord($Str[$i]) & 0xC0) != 0x80))\n return false;\n }\n }\n return true;\n}", "function seems_utf8($str)\n {\n $length = strlen($str);\n for ($i = 0; $i < $length; $i++) {\n $c = ord($str[$i]);\n if ($c < 0x80) $n = 0; # 0bbbbbbb\n elseif (($c & 0xE0) == 0xC0) $n = 1; # 110bbbbb\n elseif (($c & 0xF0) == 0xE0) $n = 2; # 1110bbbb\n elseif (($c & 0xF8) == 0xF0) $n = 3; # 11110bbb\n elseif (($c & 0xFC) == 0xF8) $n = 4; # 111110bb\n elseif (($c & 0xFE) == 0xFC) $n = 5; # 1111110b\n else return false; # Does not match any model\n for ($j = 0; $j < $n; $j++) { # n bytes matching 10bbbbbb follow ?\n if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80))\n return false;\n }\n }\n return true;\n }", "function seems_utf8($str) {\n\tmbstring_binary_safe_encoding();\n\t$length = strlen($str);\n\treset_mbstring_encoding();\n\tfor ($i=0; $i < $length; $i++) {\n\t\t$c = ord($str[$i]);\n\t\tif ($c < 0x80) $n = 0; # 0bbbbbbb\n\t\telseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb\n\t\telseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb\n\t\telseif (($c & 0xF8) == 0xF0) $n=3; # 11110bbb\n\t\telseif (($c & 0xFC) == 0xF8) $n=4; # 111110bb\n\t\telseif (($c & 0xFE) == 0xFC) $n=5; # 1111110b\n\t\telse return false; # Does not match any model\n\t\tfor ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?\n\t\t\tif ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80))\n\t\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function utf8($str)\n{\n if(mb_detect_encoding($str) == \"UTF-8\" && mb_check_encoding($str,\"UTF-8\")) return $str;\n else return utf8_encode($str);\n}", "protected function IsUtf8($word) {\n\t\tif (preg_match ( \"/^([\" . chr ( 228 ) . \"-\" . chr ( 233 ) . \"]{1}[\" . chr ( 128 ) . \"-\" . chr ( 191 ) . \"]{1}[\" . chr ( 128 ) . \"-\" . chr ( 191 ) . \"]{1}){1}/\", $word ) == true || preg_match ( \"/([\" . chr ( 228 ) . \"-\" . chr ( 233 ) . \"]{1}[\" . chr ( 128 ) . \"-\" . chr ( 191 ) . \"]{1}[\" . chr ( 128 ) . \"-\" . chr ( 191 ) . \"]{1}){1}$/\", $word ) == true || preg_match ( \"/([\" . chr ( 228 ) . \"-\" . chr ( 233 ) . \"]{1}[\" . chr ( 128 ) . \"-\" . chr ( 191 ) . \"]{1}[\" . chr ( 128 ) . \"-\" . chr ( 191 ) . \"]{1}){2,}/\", $word ) == true) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function utf8_Validate($string)\n {\n $output=$string;\n if (!preg_match('!!u', $string)) {\n $output = utf8_encode($string);\n }\n return $output;\n }", "protected function isUTF8 ( $s )\n\t{\n\t\treturn preg_match('%(?:\n\t [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\n\t |\\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\n\t |[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\n\t |\\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\n\t |\\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\n\t |[\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\n\t |\\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\n\t )+%xs', $s);\n\t}", "function seems_utf8($str) {\r\n\t mbstring_binary_safe_encoding();\r\n\t $length = strlen($str);\r\n\t reset_mbstring_encoding();\r\n\t for ($i=0; $i < $length; $i++) {\r\n\t\t$c = ord($str[$i]);\r\n\t\tif ($c < 0x80) $n = 0; # 0bbbbbbb\r\n\t\telseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb\r\n\t\telseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb\r\n\t\telseif (($c & 0xF8) == 0xF0) $n=3; # 11110bbb\r\n\t\telseif (($c & 0xFC) == 0xF8) $n=4; # 111110bb\r\n\t\telseif (($c & 0xFE) == 0xFC) $n=5; # 1111110b\r\n\t\telse return false; # Does not match any model\r\n\t\tfor ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?\r\n\t\t if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80))\r\n\t\t\treturn false;\r\n\t\t}\r\n\t }\r\n\t return true;\r\n\t}", "function is_unicode($data) {\n if (strlen($data) !== strlen(utf8_decode($data))) {\n return true;\n } else {\n return false;\n }\n}", "public static function isUtf16Be($string) {}", "public static function seems_utf8(string $str): bool {\n $length = strlen($str);\n for ($i = 0; $i < $length; $i++) {\n $c = ord($str[$i]);\n if ($c < 0x80)\n $n = 0;# 0bbbbbbb\n elseif (($c & 0xE0) == 0xC0)\n $n = 1;# 110bbbbb\n elseif (($c & 0xF0) == 0xE0)\n $n = 2;# 1110bbbb\n elseif (($c & 0xF8) == 0xF0)\n $n = 3;# 11110bbb\n elseif (($c & 0xFC) == 0xF8)\n $n = 4;# 111110bb\n elseif (($c & 0xFE) == 0xFC)\n $n = 5;# 1111110b\n else\n return false;# Does not match any model\n for ($j = 0; $j < $n; $j++) { # n bytes matching 10bbbbbb follow ?\n if (( ++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80))\n return false;\n }\n }\n return true;\n }", "public static function isUTF8($value = '')\n {\n return utf8_encode(utf8_decode($value)) === $value;\n }", "public static function isUTF8($value = '')\n {\n return utf8_encode(utf8_decode($value)) === $value;\n }", "function bom_utf8($texte) {\n\treturn (substr($texte, 0,3) == chr(0xEF).chr(0xBB).chr(0xBF));\n}", "public static function isUnicode(string $string): bool\n {\n return mb_check_encoding($string, 'UTF-8');\n }", "public static function isUTF8String($string) {\n $sample = @iconv('utf-8', 'utf-8', $string);\n\n if (md5($sample) == md5($string))\n return true;\n else\n return false;\n }", "private static function detect_encoding($string)\n {\n $fallback = rcube::get_instance()->config->get('default_charset', 'ISO-8859-1'); // fallback to Latin-1\n\n return rcube_charset::detect($string, $fallback);\n }", "private function seems_utf8( $str ) {\n\t\t$this->mbstring_binary_safe_encoding();\n\t\t$length = strlen( $str );\n\t\t$this->reset_mbstring_encoding();\n\t\tfor ( $i = 0; $i < $length; $i++ ) {\n\t\t\t$c = ord( $str[ $i ] );\n\t\t\tif ( $c < 0x80 ) {\n\t\t\t\t$n = 0; // 0bbbbbbb\n\t\t\t} elseif ( ( $c & 0xE0 ) == 0xC0 ) {\n\t\t\t\t$n = 1; // 110bbbbb\n\t\t\t} elseif ( ( $c & 0xF0 ) == 0xE0 ) {\n\t\t\t\t$n = 2; // 1110bbbb\n\t\t\t} elseif ( ( $c & 0xF8 ) == 0xF0 ) {\n\t\t\t\t$n = 3; // 11110bbb\n\t\t\t} elseif ( ( $c & 0xFC ) == 0xF8 ) {\n\t\t\t\t$n = 4; // 111110bb\n\t\t\t} elseif ( ( $c & 0xFE ) == 0xFC ) {\n\t\t\t\t$n = 5; // 1111110b\n\t\t\t} else {\n\t\t\t\treturn false; // Does not match any model.\n\t\t\t}\n\t\t\tfor ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow ?\n\t\t\t\tif ( ( ++$i == $length ) || ( ( ord( $str[ $i ] ) & 0xC0 ) != 0x80 ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function isUTF16($string){\n $result = false;\n $length = strlen($string);\n if ($length >= 2) {\n $byte1 = ord($string);\n $byte2 = ord(substr($string, 1, 1));\n if ($byte1 === 0xFF // BOM (little-endian)\n && $byte2 === 0xFE) {\n $result = true;\n } else if ($byte1 === 0xFE // BOM (big-endian)\n && $byte2 === 0xFF) {\n $result = true;\n } else {\n $null = chr(0x00);\n $pos = strpos($string, $null);\n if ($pos === false) {\n $result = false; // Non ASCII (omit)\n } else {\n $next = substr($string, $pos + 1, 1); // BE\n $prev = substr($string, $pos - 1, 1); // LE\n if ((strlen($next) > 0 && ord($next) > 0x00 && ord($next) < 0x80)\n || (strlen($prev) > 0 && ord($prev) > 0x00 && ord($prev) < 0x80)) {\n $pos = strlen($string) - 1;\n $next = substr($string, $pos + 1, 1); // BE\n $prev = substr($string, $pos - 1, 1); // LE\n if (strlen($next) > 0) {\n if (ord($next) > 0x00 && ord($next) < 0x80) {\n $result = true;\n } else {\n $result = false;\n }\n } else if (strlen($prev) > 0) {\n if (ord($prev) > 0x00 && ord($prev) < 0x80) {\n $result = true;\n } else {\n $result = false;\n }\n }\n }\n }\n }\n }\n return $result;\n }", "private function detect_encoding($str) {\n return mb_detect_encoding( $str, 'UTF-8,ISO-8859-15,ISO-8859-1,cp1251,KOI8-R' );\n }", "private function is_uft8($value): bool {\n return str_starts_with(strtolower($value), '=?utf-8?');\n }", "public static function pcre_utf8_support(): bool\n {\n /** @noinspection PhpUsageOfSilenceOperatorInspection */\n return (bool) @\\preg_match('//u', '');\n }", "function isUTF32($string){\n $result = false;\n $length = strlen($string);\n if ($length >= 4) {\n $byte1 = ord($string);\n $byte2 = ord(substr($string, 1, 1));\n $byte3 = ord(substr($string, 2, 1));\n $byte4 = ord(substr($string, 3, 1));\n if ($byte1 === 0x00 && $byte2 === 0x00 // BOM (big-endian)\n && $byte3 === 0xFE && $byte4 === 0xFF) {\n $result = true;\n } else if ($byte1 === 0xFF && $byte2 === 0xFE // BOM (little-endian)\n && $byte3 === 0x00 && $byte4 === 0x00) {\n $result = true;\n } else {\n $pos = strpos($string, chr(0x00));\n if ($pos === false) {\n $result = false; // Non ASCII (omit)\n } else {\n $next = substr($string, $pos, 4); // Must be (BE)\n if (strlen($next) === 4) {\n $bytes = array_values(unpack('C4', $next));\n if (isset($bytes[0], $bytes[1], $bytes[2], $bytes[3])) {\n if ($bytes[0] === 0x00 && $bytes[1] === 0x00) {\n if ($bytes[2] === 0x00) {\n $result = $bytes[3] >= 0x09 && $bytes[3] <= 0x7F;\n } else if ($bytes[2] > 0x00 && $bytes[2] < 0xFF) {\n $result = $bytes[3] > 0x00 && $bytes[3] <= 0xFF;\n }\n }\n }\n }\n }\n }\n }\n return $result;\n }", "function wp_check_invalid_utf8($text, $strip = \\false)\n {\n }", "function fixEncoding($in_str)\r\n\r\n{\r\n\r\n $cur_encoding = mb_detect_encoding($in_str) ;\r\n\r\n if($cur_encoding == \"UTF-8\" && mb_check_encoding($in_str,\"UTF-8\"))\r\n\r\n return $in_str;\r\n\r\n else\r\n\r\n return utf8_encode($in_str);\r\n\r\n}", "static public function ValidateUTF8($string)\n {\n $pop_10s = 0;\n\n $unicode_char = 0;\n\n for ($i=0; isset($string[$i]); $i++) {\n $c = ord($string[$i]);\n if ($pop_10s) {\n # Check if following chars in multibytes are not 10xxxxxx\n if (($c & 0xC0) != 0x80) {\n throw new Exception\\BadUTF8('Following characters must be 10xxxxxx');\n } else {\n $unicode_char <<= 6;\n $unicode_char |= $c & 0x3F;\n --$pop_10s;\n }\n } else if (($c & 0x7F) == $c) {\n # single ASCII char\n $unicode_char = 0;\n\n /*\n I tried mosquitto, it accepts \\0 when publishing Message, no connection is closed.\n No exception will be thrown here.\n\n MQTT-1.5.3-2\n A UTF-8 encoded string MUST NOT include an encoding of the null character U+0000.\n If a receiver (Server or Client) receives a Control Packet containing U+0000 it MUST\n close the Network Connection.\n\n */\n continue;\n } else if (($c & 0xFE) == 0xFC) {\n # leading 1111110x\n $pop_10s = 5;\n\n $unicode_char = 0;\n $unicode_char |= $c & 0x01;\n } else if (($c & 0xFC) == 0xF8) {\n # leading 111110xx\n $pop_10s = 4;\n\n $unicode_char = 0;\n $unicode_char |= $c & 0x03;\n } else if (($c & 0xF8) == 0xF0) {\n # leading 11110xxx\n $pop_10s = 3;\n\n $unicode_char = 0;\n $unicode_char |= $c & 0x07;\n } else if (($c & 0xF0) == 0xE0) {\n # leading 1110xxxx\n $pop_10s = 2;\n\n $unicode_char = 0;\n $unicode_char |= $c & 0x0F;\n } else if (($c & 0xE0) == 0xC0) {\n # leading 110xxxxx\n $pop_10s = 1;\n\n $unicode_char = 0;\n $unicode_char |= $c & 0x1F;\n } else {\n throw new Exception\\BadUTF8('Bad leading characters');\n }\n\n if ($unicode_char >= 0xD800 && $unicode_char <= 0xDFFF) {\n /*\n MQTT-1.5.3.1\n The character data in a UTF-8 encoded string MUST be well-formed UTF-8 as defined\n by the Unicode specification [Unicode] and restated in RFC 3629 [RFC3629]. In\n particular this data MUST NOT include encodings of code points between U+D800 and\n U+DFFF. If a Server or Client receives a Control Packet containing ill-formed UTF-8\n it MUST close the Network Connection [MQTT-1.5.3-1].\n\n */\n throw new Exception\\BadUTF8('U+D800 ~ U+DFFF CAN NOT be used in UTF-8');\n }\n }\n\n if ($pop_10s) {\n throw new Exception\\BadUTF8('Missing UTF-8 following characters');\n }\n\n return true;\n }", "public static function is_utf8mb4($string)\n {\n if (max(array_map('ord', str_split($string))) >= 240){\n return true;\n }\n return false;\n }", "function isUTF16BE($string){\n $result = false;\n $length = strlen($string);\n if ($length >= 2) {\n $byte1 = ord($string);\n $byte2 = ord(substr($string, 1, 1));\n if ($byte1 === 0xFE // BOM\n && $byte2 === 0xFF) {\n $result = true;\n } else {\n $pos = strpos($string, chr(0x00));\n if ($pos === false) {\n $result = false; // Non ASCII..\n } else {\n $byte = substr($string, $pos + 1, 1);\n if (strlen($byte) > 0 && ord($byte) < 0x80) {\n $result = true;\n }\n }\n }\n }\n return $result;\n }", "protected function checkLocaleWithUTF8filesystem() {}", "function fixEncoding($in_str) \r\n{ \r\n $cur_encoding = mb_detect_encoding($in_str) ; \r\n if($cur_encoding == \"UTF-8\" && mb_check_encoding($in_str,\"UTF-8\")) \r\n return $in_str; \r\n else \r\n return utf8_encode($in_str); \r\n}", "function setup_is_unicodedb() {\n $rs = $this->db->Execute(\"SELECT parameter, value FROM nls_database_parameters where parameter = 'NLS_CHARACTERSET'\");\n if ($rs && !$rs->EOF) {\n $encoding = $rs->fields['value'];\n if (strtoupper($encoding) == 'AL32UTF8') {\n return true;\n }\n }\n return false;\n }", "public static function isCharacterEncodingValid(string $name): bool;", "function oc_check_invalid_utf8( $string, $strip = false ) {\n $string = (string) $string;\n if ( 0 === strlen( $string ) ) {\n return '';\n }\n // Store the site charset as a static to avoid multiple calls to get_option()\n static $is_utf8;\n if ( !isset( $is_utf8 ) ) {\n $is_utf8 = in_array( get_bloginfo( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );\n }\n if ( !$is_utf8 ) {\n return $string;\n }\n // Check for support for utf8 in the installed PCRE library once and store the result in a static\n static $utf8_pcre;\n if ( !isset( $utf8_pcre ) ) {\n $utf8_pcre = @preg_match( '/^./u', 'a' );\n }\n // We can't demand utf8 in the PCRE installation, so just return the string in those cases\n if ( !$utf8_pcre ) {\n return $string;\n }\n // preg_match fails when it encounters invalid UTF8 in $string\n if ( 1 === @preg_match( '/^./us', $string ) ) {\n return $string;\n }\n // Attempt to strip the bad chars if requested (not recommended)\n if ( $strip && function_exists( 'iconv' ) ) {\n return iconv( 'utf-8', 'utf-8', $string );\n }\n return '';\n}", "private function _utf8check( $Str )\r\n\t{\r\n\t\tfor ($i=0; $i<strlen($Str); $i++)\r\n\t\t{\r\n\t\tif ( ord($Str[$i]) < 0x80 ) continue; # 0bbbbbbb\r\n\t\telseif ( (ord($Str[$i]) & 0xE0) == 0xC0 ) $n=1; # 110bbbbb\r\n\t\telseif ( (ord($Str[$i]) & 0xF0) == 0xE0 ) $n=2; # 1110bbbb\r\n\t\telseif ( (ord($Str[$i]) & 0xF8) == 0xF0 ) $n=3; # 11110bbb\r\n\t\telseif ( (ord($Str[$i]) & 0xFC) == 0xF8 ) $n=4; # 111110bb\r\n\t\telseif ( (ord($Str[$i]) & 0xFE) == 0xFC ) $n=5; # 1111110b\r\n\t\telse return false; # Does not match any model\r\n\t\t\r\n\t\tfor ( $j=0; $j<$n; $j++ )\r\n\t\t{ # n bytes matching 10bbbbbb follow ?\r\n\t\t\tif ( (++$i == strlen($Str)) || ((ord($Str[$i]) & 0xC0) != 0x80) )\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static function seemsUtf8($string)\n {\n for ($i = 0; $i < strlen($string); $i++) {\n if (ord($string[$i]) < 0x80) {\n // 0bbbbbbb\n continue;\n }\n\n if ((ord($string[$i]) & 0xE0) == 0xC0) {\n // 110bbbbb\n $n = 1;\n } elseif ((ord($string[$i]) & 0xF0) == 0xE0) {\n // 1110bbbb\n $n = 2;\n } elseif ((ord($string[$i]) & 0xF8) == 0xF0) {\n // 11110bbb\n $n = 3;\n } elseif ((ord($string[$i]) & 0xFC) == 0xF8) {\n // 111110bb\n $n = 4;\n } elseif ((ord($string[$i]) & 0xFE) == 0xFC) {\n // 1111110b\n $n = 5;\n } else {\n // Does not match any model\n return false;\n }\n\n // n bytes matching 10bbbbbb follow ?\n for ($j = 0; $j < $n; $j++) {\n if ((++$i == strlen($string)) || ((ord($string[$i]) & 0xC0) != 0x80)) {\n return false;\n }\n }\n }\n\n return true;\n }", "function detectCharset() {\r\n\t\t//print('ascii strlen: ');var_dump(mb_strlen($this->code, 'ascii'));\r\n\t\t//print('utf-8 strlen: ');var_dump(mb_strlen($this->code, 'utf-8'));\r\n\t\t//exit(0);\r\n\t\tif(mb_strlen($this->code, 'ascii') !== mb_strlen($this->code, 'utf-8')) {\r\n\t\t\treturn 'utf-8';\r\n\t\t} else {\r\n\t\t\t//return 'ascii';\r\n\t\t\treturn 'iso-8859-1';\r\n\t\t}\r\n\t}", "function find_special($string){\r\n\t$string = utf8_decode($string);\r\n\tfor($i = 0; $i < strlen($string); $i++){\r\n\t\t$o = ord(substr($string, $i, 1));\r\n\t\tif($o >= 192 && $o <= 255){\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t}\r\n\treturn FALSE;\r\n}", "function test_pcre_unicode() {\n\tstatic $pcre_ok = 0;\n\n\tif (!$pcre_ok) {\n\t\t$s = \" \".chr(195).chr(169).\"t\".chr(195).chr(169).\" \";\n\t\tif (preg_match(',\\W\\w\\w\\w\\W,uS', $s)) $pcre_ok = 1;\n\t\telse $pcre_ok = -1;\n\t}\n\treturn $pcre_ok == 1;\n}", "function wp_check_invalid_utf8( $string, $strip = false ) {\n\t$string = (string) $string;\n\n\tif ( 0 === strlen( $string ) ) {\n\t\treturn '';\n\t}\n\n\t// Store the site charset as a static to avoid multiple calls to get_option()\n\tstatic $is_utf8;\n\tif ( !isset( $is_utf8 ) ) {\n\t\t$is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );\n\t}\n\tif ( !$is_utf8 ) {\n\t\treturn $string;\n\t}\n\n\t// Check for support for utf8 in the installed PCRE library once and store the result in a static\n\tstatic $utf8_pcre;\n\tif ( !isset( $utf8_pcre ) ) {\n\t\t$utf8_pcre = @preg_match( '/^./u', 'a' );\n\t}\n\t// We can't demand utf8 in the PCRE installation, so just return the string in those cases\n\tif ( !$utf8_pcre ) {\n\t\treturn $string;\n\t}\n\n\t// preg_match fails when it encounters invalid UTF8 in $string\n\tif ( 1 === @preg_match( '/^./us', $string ) ) {\n\t\treturn $string;\n\t}\n\n\t// Attempt to strip the bad chars if requested (not recommended)\n\tif ( $strip && function_exists( 'iconv' ) ) {\n\t\treturn iconv( 'utf-8', 'utf-8', $string );\n\t}\n\n\treturn '';\n}", "public static function seems_utf8($Str) {\n\t\tfor ($i=0; $i<strlen($Str); $i++) {\n\t\t\tif (ord($Str[$i]) < 0x80) continue; # 0bbbbbbb\n\t\t\telseif ((ord($Str[$i]) & 0xE0) == 0xC0) $n=1; # 110bbbbb\n\t\t\telseif ((ord($Str[$i]) & 0xF0) == 0xE0) $n=2; # 1110bbbb\n\t\t\telseif ((ord($Str[$i]) & 0xF8) == 0xF0) $n=3; # 11110bbb\n\t\t\telseif ((ord($Str[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb\n\t\t\telseif ((ord($Str[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b\n\t\t\telse return false; # Does not match any model\n\t\t\tfor ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?\n\t\t\t\tif ((++$i == strlen($Str)) || ((ord($Str[$i]) & 0xC0) != 0x80))\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function wp_check_invalid_utf8( $string, $strip = false ) {\r\n\t$string = (string) $string;\r\n\r\n\tif ( 0 === strlen( $string ) ) {\r\n\t\treturn '';\r\n\t}\r\n\r\n\t// Store the site charset as a static to avoid multiple calls to get_option()\r\n\tstatic $is_utf8 = null;\r\n\tif ( ! isset( $is_utf8 ) ) {\r\n\t\t$is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) );\r\n\t}\r\n\tif ( ! $is_utf8 ) {\r\n\t\treturn $string;\r\n\t}\r\n\r\n\t// Check for support for utf8 in the installed PCRE library once and store the result in a static\r\n\tstatic $utf8_pcre = null;\r\n\tif ( ! isset( $utf8_pcre ) ) {\r\n\t\t$utf8_pcre = @preg_match( '/^./u', 'a' );\r\n\t}\r\n\t// We can't demand utf8 in the PCRE installation, so just return the string in those cases\r\n\tif ( ! $utf8_pcre ) {\r\n\t\treturn $string;\r\n\t}\r\n\r\n\t// preg_match fails when it encounters invalid UTF8 in $string\r\n\tif ( 1 === @preg_match( '/^./us', $string ) ) {\r\n\t\treturn $string;\r\n\t}\r\n\r\n\t// Attempt to strip the bad chars if requested (not recommended)\r\n\tif ( $strip && function_exists( 'iconv' ) ) {\r\n\t\treturn iconv( 'utf-8', 'utf-8', $string );\r\n\t}\r\n\r\n\treturn '';\r\n}", "function rc_detect_encoding($string, $failover='')\n{\n if (!function_exists('mb_detect_encoding')) {\n return $failover;\n }\n\n // FIXME: the order is important, because sometimes \n // iso string is detected as euc-jp and etc.\n $enc = array(\n 'UTF-8', 'SJIS', 'BIG5', 'GB2312',\n 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4',\n 'ISO-8859-5', 'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9',\n 'ISO-8859-10', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16',\n 'WINDOWS-1252', 'WINDOWS-1251', 'EUC-JP', 'EUC-TW', 'KOI8-R', \n 'ISO-2022-KR', 'ISO-2022-JP'\n );\n\n $result = mb_detect_encoding($string, join(',', $enc));\n\n return $result ? $result : $failover;\n}", "public function utf8_force($string){\r\n if (preg_match('%^(?:\r\n [\\x09\\x0A\\x0D\\x20-\\x7E] # ASCII\r\n | [\\xC2-\\xDF][\\x80-\\xBF] # non-overlong 2-byte\r\n | \\xE0[\\xA0-\\xBF][\\x80-\\xBF] # excluding overlongs\r\n | [\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2} # straight 3-byte\r\n | \\xED[\\x80-\\x9F][\\x80-\\xBF] # excluding surrogates\r\n | \\xF0[\\x90-\\xBF][\\x80-\\xBF]{2} # planes 1-3\r\n | [\\xF1-\\xF3][\\x80-\\xBF]{3} # planes 4-15\r\n | \\xF4[\\x80-\\x8F][\\x80-\\xBF]{2} # plane 16\r\n )*$%xs', $string))\r\n return $string;\r\n else\r\n return iconv('CP1252', 'UTF-8', $string);\r\n }", "private function check_multibyte_support() {\n\t\tif ( function_exists( 'mb_strlen' ) &&\n\t\t\t function_exists( 'mb_strtolower' ) &&\n\t\t\t function_exists( 'mb_substr' ) &&\n\t\t\t function_exists( 'mb_detect_encoding' ) ) {\n\t\t\treturn true;\n\t\t } else {\n\t\t \treturn false;\n\t\t }\n\t}", "function valid_unicode($i)\n {\n }", "function deutf8($str)\n{\n if(mb_detect_encoding($str) == \"UTF-8\" && mb_check_encoding($str,\"UTF-8\")) return utf8_decode($str);\n else return $str;\n}", "public static function detect($string) {\n if (!ereg(\"[\\x80-\\xFF]\", $string) && !ereg(\"\\x1B\", $string))\n return 'US-ASCII';\n\n if (!ereg(\"[\\x80-\\xFF]\", $string) && ereg(\"\\x1B\", $string))\n return 'ISO-2022-JP';\n\n if (preg_match(\"/^([\\x01-\\x7F]|[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF][\\x80-\\xBF])+$/\", $string) == 1)\n return 'UTF-8';\n\n if (preg_match(\"/^([\\x01-\\x7F]|\\x8E[\\xA0-\\xDF]|\\x8F[xA1-\\xFE][\\xA1-\\xFE]|[\\xA1-\\xFE][\\xA1-\\xFE])+$/\", $string) == 1)\n return 'EUC-JP';\n\n if (preg_match(\"/^([\\x01-\\x7F]|[\\xA0-\\xDF]|[\\x81-\\xFC][\\x40-\\xFC])+$/\", $string) == 1)\n return 'Shift_JIS';\n\n return 'ISO-8859-1';\n }", "public function testUtf8(): void\n {\n $value = mb_convert_encoding(\"\\xa0a\\xa0\", 'UTF-8', 'ISO-8859-1');\n self::assertSame('a', $this->filter->filter($value));\n }", "function detectByMBString($encoding, $string){\n $result = false;\n $charset = $this->getEncodingName($encoding, 'mbstring');\n if (0 !== strcasecmp($charset, 'BINARY')) {\n if ($charset == null && $encoding != null) {\n $detect = @mb_detect_encoding($string, $encoding, true);\n } else {\n $detect = mb_detect_encoding($string, $charset, true);\n }\n $result = is_string($detect) && strlen($detect);\n }\n if (!$result) {\n $result = $this->detectEncodingHelper($charset, $string, false);\n }\n return $result;\n }", "public static function check_iconv() {\n if (function_exists('iconv') && function_exists('iconv_substr')) {\n return true;\n }\n return false;\n }", "static public function stringToUtf8($string) {\n if ($GLOBALS['LANG']->charSet == '' || $GLOBALS['LANG']->charSet == 'iso-8859-1') {\n return utf8_encode($string);\n } else {\n return $string;\n }\n\t}", "public function isUtf8Mode()\n {\n return $this->_isUtf8Mode;\n }", "public static function utf8Sanitize($string)\r\n {\r\n Preconditions::checkIsString($string, '$string must be string');\r\n $out = @iconv(\"UTF-8\", \"UTF-8//IGNORE\", $string);\r\n if ($string != $out) {\r\n $out = \"Warning: String not shown for security reasons: \" .\r\n \"String contains invalid utf-8 charactes.\";\r\n }\r\n return $out;\r\n }", "public function remove_bad_utf8($str)\n {\n $str = str_replace('“', '&quot;', $str);\n $str = str_replace('”', '&quot;', $str);\n $str = str_replace('‘', '&#39;', $str);\n $str = str_replace('’', '&#39;', $str);\n $str = str_replace('&#8220;', '&quot;', $str);\n $str = str_replace('&#8221;', '&quot;', $str);\n \n /// convertimos a utf8\n ini_set('mbstring.substitute_character', \"none\");\n return mb_convert_encoding($str, 'UTF-8', 'auto');\n }", "function convert_to_utf8($str)\n{\n\t$old_charset = $_SESSION['old_charset'];\n\t\n\tif ($str === null || $str == '' || $old_charset == 'UTF-8')\n\t\treturn $str;\n\n\t$save = $str;\n\n\t// Replace literal entities (for non-UTF-8 compliant html_entity_encode)\n\tif (version_compare(PHP_VERSION, '5.0.0', '<') && $old_charset == 'ISO-8859-1' || $old_charset == 'ISO-8859-15')\n\t\t$str = html_entity_decode($str, ENT_QUOTES, $old_charset);\n\n\tif ($old_charset != 'UTF-8' && !seems_utf8($str))\n\t{\n\t\tif (function_exists('iconv'))\n\t\t\t$str = iconv($old_charset == 'ISO-8859-1' ? 'WINDOWS-1252' : $old_charset, 'UTF-8', $str);\n\t\telse if (function_exists('mb_convert_encoding'))\n\t\t\t$str = mb_convert_encoding($str, 'UTF-8', $old_charset == 'ISO-8859-1' ? 'WINDOWS-1252' : 'ISO-8859-1');\n\t\telse if ($old_charset == 'ISO-8859-1')\n\t\t\t$str = utf8_encode($str);\n\t}\n\n\t// Replace literal entities (for UTF-8 compliant html_entity_encode)\n\tif (version_compare(PHP_VERSION, '5.0.0', '>='))\n\t\t$str = html_entity_decode($str, ENT_QUOTES, 'UTF-8');\n\n\t// Replace numeric entities\n\t$str = preg_replace_callback('/&#([0-9]+);/', 'utf8_callback_1', $str);\n\t$str = preg_replace_callback('/&#x([a-f0-9]+);/i', 'utf8_callback_2', $str);\n\n\t// Remove \"bad\" characters\n\t$str = remove_bad_characters($str);\n\n\treturn $str;//($save != $str);\n}", "public static function is_utf32($str, bool $check_if_string_is_binary = true)\n {\n // init\n $str = (string) $str;\n $str_chars = [];\n\n // fix for the \"binary\"-check\n if ($check_if_string_is_binary !== false && self::string_has_bom($str)) {\n $check_if_string_is_binary = false;\n }\n\n if (\n $check_if_string_is_binary\n &&\n !self::is_binary($str, true)\n ) {\n return false;\n }\n\n if (self::$SUPPORT['mbstring'] === false) {\n /**\n * @psalm-suppress ImpureFunctionCall - this is only a warning\n */\n \\trigger_error('UTF8::is_utf32() without mbstring may did not work correctly', \\E_USER_WARNING);\n }\n\n $str = self::remove_bom($str);\n\n $maybe_utf32le = 0;\n $test = \\mb_convert_encoding($str, 'UTF-8', 'UTF-32LE');\n if ($test) {\n $test2 = \\mb_convert_encoding($test, 'UTF-32LE', 'UTF-8');\n $test3 = \\mb_convert_encoding($test2, 'UTF-8', 'UTF-32LE');\n if ($test3 === $test) {\n $str_chars = self::count_chars($str, true, false);\n foreach (self::count_chars($test3) as $test3char => &$test3charEmpty) {\n if (\\in_array($test3char, $str_chars, true)) {\n ++$maybe_utf32le;\n }\n }\n unset($test3charEmpty);\n }\n }\n\n $maybe_utf32be = 0;\n $test = \\mb_convert_encoding($str, 'UTF-8', 'UTF-32BE');\n if ($test) {\n $test2 = \\mb_convert_encoding($test, 'UTF-32BE', 'UTF-8');\n $test3 = \\mb_convert_encoding($test2, 'UTF-8', 'UTF-32BE');\n if ($test3 === $test) {\n if ($str_chars === []) {\n $str_chars = self::count_chars($str, true, false);\n }\n foreach (self::count_chars($test3) as $test3char => &$test3charEmpty) {\n if (\\in_array($test3char, $str_chars, true)) {\n ++$maybe_utf32be;\n }\n }\n unset($test3charEmpty);\n }\n }\n\n if ($maybe_utf32be !== $maybe_utf32le) {\n if ($maybe_utf32le > $maybe_utf32be) {\n return 1;\n }\n\n return 2;\n }\n\n return false;\n }", "public function testFindUnicodeText(): void\n {\n $soup = new Soup('<h1>寿司🍣</h1>');\n $this->assertEquals('寿司🍣', $soup->find(text: '寿司🍣'));\n }", "function testFinalNomCoureur($str) {\n // ##### Test charactère par charactère ######\n $str = str_split($str);\n foreach($str as $char) {\n if(!preg_match(\"#[A-Z]|'|-|\\040#\", $char)) {\n //echo \"Charactère interdit : \" . utf8_encode($char) . \"<br>\";\n return false;\n }\n }\n $str = implode($str);\n // ##### Fin test charactère #####\n \n // ##### Test cas bizarre #####\n if(preg_match(\"#^'*$|''+|^' '$|' '$|^' '|^\\\"*$#\", $str) || preg_match(\"#(\\040\\\"\\040)|(\\040''\\040)|(\\040'\\040)#\", $str) || preg_match(\"#--.*--#\", $str)) {\n //echo \"Cas bizarre : \" . utf8_encode($str) . \"<br>\";\n return false;\n }\n // ##### Fin test cas bizarre\n return $str;\n }", "protected static function determineUnicodeSupport()\n {\n self::$unicodeSupportEnabled = defined('PREG_BAD_UTF8_OFFSET_ERROR') && preg_match('/\\pL/u', 'a') == 1;\n }", "protected function checkandcorrUTF8($strtocheck) {\n\t\tif ((mb_detect_encoding($strtocheck, 'UTF-8', TRUE) === FALSE) == FALSE) {\n\t\t\t$countrogs= count(explode('?', $strtocheck));\n\t\t\t$countpms= strlen($strtocheck);\n\t\t\t$titletmp = utf8_decode($strtocheck);\n\t\t\tif (count(explode('?', $titletmp))<=$countrogs) {\n\t\t\t\tif (strlen($titletmp)<=$countpms) {\n\t\t\t\t\t$strtocheck=$titletmp;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (mb_detect_encoding($strtocheck, 'UTF-8', TRUE) === FALSE) {\n\t\t\t$titletmp = utf8_encode($strtocheck);\n\t\t\t$strtocheck=$titletmp;\n\t\t}\n\n\t\t$strtocheck = htmlspecialchars_decode($strtocheck, ENT_QUOTES);\n\t\t$strtocheck = html_entity_decode($strtocheck, ENT_NOQUOTES, 'UTF-8');\n\n\t\treturn $strtocheck;\n\t}", "function detectEncodingHelper($charset, $string, $default = false){\n $result = false;\n switch (strtoupper($charset)) {\n case 'ASCII':\n $result = $this->isASCII($string);\n break;\n case 'JIS':\n case 'ISO-2022-JP':\n $result = $this->isJIS($string);\n break;\n case 'UTF-16':\n $result = $this->isUTF16($string);\n break;\n case 'UTF-16BE':\n $result = $this->isUTF16BE($string);\n break;\n case 'UTF-16LE':\n $result = $this->isUTF16LE($string);\n break;\n case 'UTF-32':\n $result = $this->isUTF32($string);\n break;\n case 'BINARY':\n $result = $this->isBinary($string);\n break;\n default:\n $result = $default;\n break;\n }\n return $result;\n }", "function utf8_sanitize($str, &$errors = null) {\n if ($errors !== null) {\n $errors = array();\n }\n $utf8 = '';\n $bytesNeeded = 0;\n $bytesSeen = 0;\n $lowerBoundary = 0x80;\n $upperBoundary = 0xBF;\n $char = '';\n for ($pos = 0, $length = strlen($str); $pos < $length; $pos++) {\n $byte = ord($str[$pos]);\n if ($bytesNeeded == 0) {\n if ($byte >= 0x00 and $byte <= 0x7F) {\n $utf8 .= $str[$pos];\n } elseif ($byte >= 0xC2 and $byte <= 0xDF) {\n $bytesNeeded = 1;\n } elseif ($byte >= 0xE0 and $byte <= 0xEF) {\n if ($byte == 0xE0) {\n $lowerBoundary = 0xA0;\n }\n if ($byte == 0xED) {\n $upperBoundary = 0x9F;\n }\n $bytesNeeded = 2;\n } elseif ($byte >= 0xF0 and $byte <= 0xF4) {\n if ($byte == 0xF0) {\n $lowerBoundary = 0x90;\n }\n if ($byte == 0xF4) {\n $upperBoundary = 0x8F;\n }\n $bytesNeeded = 3;\n } else {\n $utf8 .= UTF8_REPLACEMENT_CHARACTER;\n if ($errors !== null) $errors[] = $pos;\n }\n $char = $str[$pos];\n } elseif ($byte < $lowerBoundary or $byte > $upperBoundary) {\n $char = '';\n $bytesNeeded = 0;\n $bytesSeen = 0;\n $lowerBoundary = 0x80;\n $upperBoundary = 0xBF;\n $utf8 .= UTF8_REPLACEMENT_CHARACTER;\n if ($errors !== null) $errors[] = $pos;\n $pos--;\n } else {\n $lowerBoundary = 0x80;\n $upperBoundary = 0xBF;\n $bytesSeen++;\n $char .= $str[$pos];\n if ($bytesSeen == $bytesNeeded) {\n $utf8 .= $char;\n $char = '';\n $bytesNeeded = 0;\n $bytesSeen = 0;\n }\n }\n }\n if ($bytesNeeded > 0) {\n $utf8 .= UTF8_REPLACEMENT_CHARACTER;\n if ($errors !== null) $errors[] = $length;\n }\n return $utf8;\n}", "function detectByIConv($encoding, $string){\n $result = false;\n $charset = $this->getEncodingName($encoding, 'iconv');\n if ($charset == null) {\n $charset = $encoding;\n }\n if ($charset != null) {\n $this->hasError = false;\n if (0 !== strcasecmp($charset, 'BINARY')) {\n if ($this->isPHP5) {\n set_error_handler(array($this, 'iconvErrorHandler'), E_ALL);\n } else {\n set_error_handler(array(&$this, 'iconvErrorHandler'));\n }\n iconv($charset, 'UTF-16', $string); // maybe UTF-16 is proper\n restore_error_handler();\n }\n if (!$this->hasError) {\n $result = $this->detectEncodingHelper($charset, $string, true);\n }\n }\n return $result;\n }", "function test_iconv() {\n\tstatic $iconv_ok;\n\n\tif (!$iconv_ok) {\n\t\tif (!function_exists('iconv'))\n\t\t\t$iconv_ok = -1;\n\t\telse {\n\t\t\tif (utf_32_to_unicode(@iconv('utf-8', 'utf-32', 'chaine de test')) == 'chaine de test')\n\t\t\t\t$iconv_ok = 1;\n\t\t\telse\n\t\t\t\t$iconv_ok = -1;\n\t\t}\n\t}\n\treturn ($iconv_ok == 1);\n}", "public static function toUTF8($str) {\n\t\t\t$lst = 'UTF-8, ISO-8859-1';\n\t\t\t$cur = mb_detect_encoding($str, $lst);\n\t\t\treturn mb_convert_encoding($str, 'UTF-8', $cur);\n\t\t}", "public static function fixEncoding($in_str) { \r\r\n\t\t$cur_encoding = mb_detect_encoding($in_str) ; \r\r\n\t\tif($cur_encoding == \"UTF-8\" && mb_check_encoding($in_str,\"UTF-8\")) \r\r\n\t\t\treturn $in_str; \r\r\n\t\telse \r\r\n\t\t\treturn utf8_encode($in_str); \r\r\n\t}", "function win_utf8($s) {\n $utf = \"\";\n for ($i = 0; $i < strlen($s); $i++) {\n $donotrecode = false;\n $c = ord(substr($s, $i, 1));\n if ($c == 0xA8) {\n $res = 0xD081;\n } elseif ($c == 0xB8) {\n $res = 0xD191;\n } elseif ($c < 0xC0) {\n $donotrecode = true;\n } elseif ($c < 0xF0) {\n $res = $c + 0xCFD0;\n } else {\n $res = $c + 0xD090;\n }\n $c = ($donotrecode) ? chr($c) : (chr($res >> 8) . chr($res & 0xff));\n $utf .= $c;\n }\n return $utf;\n }", "public function russian($text='') {\n\t\treturn preg_match('/[А-Яа-яЁё]/u', $text);\n\t}", "private function checkIsUnicode($message)\n {\n $gsm_greek_character_ascii_value = ',132,133,134,135,137,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,163,164,165,166,167,168,169,172,177,178,182,184,185,188,191,194,195,206,226,130,172,';\n\n $string_length = strlen($message);\n for ($counter = 0; $counter < $string_length; $counter++) {\n $character_code = ord($message[$counter]);\n if($character_code > 127 && !preg_match('#,'.$character_code.',#', $gsm_greek_character_ascii_value)) {\n return true;\n }\n }\n return false;\n }", "protected function checkConnectionCharset() {}", "public static function validateUtf8OctetSequences($string)\n\t{\n\t\treturn Main\\Text\\Encoding::detectUtf8($string, false);\n\t}", "public static function isPredefinedEncoding($encoding) {}" ]
[ "0.8238786", "0.8135406", "0.80862665", "0.8034385", "0.8022029", "0.79785603", "0.7975109", "0.78999686", "0.7857252", "0.7857252", "0.78398585", "0.78052855", "0.77975214", "0.77107453", "0.7698924", "0.7628334", "0.75758505", "0.7575359", "0.7554979", "0.75518435", "0.74742013", "0.74526346", "0.7415633", "0.73790276", "0.73032993", "0.729608", "0.7283672", "0.7267428", "0.72644764", "0.7242849", "0.72389156", "0.72334546", "0.72329944", "0.7217604", "0.7215081", "0.7208223", "0.7205001", "0.71469", "0.7110311", "0.70795316", "0.70795316", "0.7075867", "0.70503306", "0.70463413", "0.69998175", "0.6975117", "0.6948834", "0.68682265", "0.6842215", "0.68387103", "0.6832215", "0.68209076", "0.6789484", "0.67806756", "0.6764122", "0.6753283", "0.6745972", "0.6717435", "0.67167634", "0.67022604", "0.6677208", "0.6638162", "0.66287667", "0.6546164", "0.6541557", "0.65277356", "0.65241903", "0.64971197", "0.6471046", "0.646911", "0.6467678", "0.6457163", "0.63822705", "0.63734543", "0.6365583", "0.63623774", "0.6311546", "0.63008034", "0.6268789", "0.6232418", "0.6225874", "0.6218977", "0.6217708", "0.62165487", "0.6211728", "0.61899364", "0.6183975", "0.6181272", "0.61807436", "0.61590993", "0.61538976", "0.6153265", "0.61485904", "0.61466295", "0.6142561", "0.61251426", "0.6109998", "0.6101421", "0.6101205", "0.60781074" ]
0.75543904
19
/ consultas a la base de datos mysql
function consulta($sql=false,$F=false,$accesos=false){ if ($sql==false){return false;} if(is_utf8($sql)){ $sql = utf8_decode($sql); } if(is_array($accesos) && $accesos!=false){ $servidor = (isset($accesos['servidor']))?$accesos['servidor']:__servidor; $base = (isset($accesos['base']))?$accesos['base']:__base; $usuario = (isset($accesos['usuario']))?$accesos['usuario']:__usuario; $contrasena = (isset($accesos['contrasena']))?$accesos['contrasena']:__contrasena; }else{ $servidor = __servidor; $base = __base; $usuario = __usuario; $contrasena = __contrasena; } $conector = mysqli_connect($servidor , $usuario , $contrasena , $base); $resultado = mysqli_query($conector , $sql); if ($F==false){ $result['filas_afectadas'] = mysqli_affected_rows($conector); $result['IDI'] = mysqli_insert_id($conector); // Ultimo ID insertado $qr = $result; }else { if (!$resultado) { $qr = false; }else{ $contador = 0; while ($fila = mysqli_fetch_assoc($resultado)){ $R['resultado'][$contador] = $fila; $contador++; } $R['filas'] = mysqli_num_rows($resultado); $R['filas_afectadas'] = mysqli_affected_rows($conector); if($R['filas']==0){ $qr = false; }else{ $qr = $R; } } } mysqli_close($conector); return $qr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function consultaTodos()\n\t{\n\t\t$sql = \"SELECT * FROM \" . $this->tabela;\n\n\t\t// $this->resultado = mysqli_query($this->conn, $sql);\n\t\t$this->resultado = $this->conn->prepare($sql);\n\t\treturn $this->resultado->execute();\n\t}", "function Readto()\n {\n $conexion=floopets_BD::Connect();\n $conexion->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n $consulta=\"SELECT denuncia.*,tipo_denuncia.* FROM tipo_denuncia INNER JOIN denuncia on tipo_denuncia.td_cod_tipo_denuncia=denuncia.td_cod_tipo_denuncia \";\n // $consulta=\"SELECT * FROM citas WHERE Cod_usu=?\";\n $query=$conexion->prepare($consulta);\n $query->execute(array());\n\n\t$resultado=$query->fetchAll(PDO::FETCH_BOTH);\n\n\tfloopets_BD::Disconnect();\n\n\treturn $resultado;\n }", "function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }", "public function get_datos_empresa($empresa){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n\t$sql=\"select *from empresas where nombre=?\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$empresa);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function select(){\n\t$sql=\"SELECT * FROM tipousuario\";\n\treturn ejecutarConsulta($sql);\n}", "public function consultar($sql){\n $this->configura();\n $this->conectar();\n return $this->conn->query($sql);\n }", "public function consultar()\r\n {\r\n $id = $_GET['id'];\r\n\r\n //criando conexão com o banco\r\n $q = new QueryBuilder();\r\n\r\n //selecionando dados\r\n $dados = $q->selectinner2($id);\r\n\r\n \r\n\r\n //devolvendo a pagina \r\n require './app/views/consultar.php';\r\n\r\n \r\n\r\n \r\n }", "private function _consultar() {\n $where = \"\";\n if(!empty($this->_idDato)){\n $where = \"AND b.id_valor = $this->_idDato \";\n }\n if(!empty($this->_valor)){\n if(is_array($this->_valor)){\n $aux = each($this->_valor);\n $where = \"AND b.valor {$aux['key']} '{$aux['value']}' \";\n }else{\n $where = \"AND b.valor = '$this->_valor' \";\n }\n \n }\n $query = \"SELECT a.nom_tabla,b.* FROM \nmt_tablas a,\nmt_contenidos b\nWHERE a.id_tablas = {$this->_idTabla}\nAND a.estado = 1 $where\nAND a.id_tablas = b.id_tabla\nAND b.estado = 1\";\n \n if(is_array($this->_orden) && count($this->_orden) == 2){\n $query .= (\" ORDER BY \" . ($this->_orden[0] == 1 ? \"id_valor \" : \"valor \") . $this->_orden[1] );\n }\n $con = ConexionSQL::getInstance();\n $id = $con->consultar($query);\n if($res = $con->obenerFila($id)){\n $R = array();\n do{\n $aux = array();\n foreach($res as $key => $valor){\n if(!is_numeric($key)){\n $aux[$key] = $valor;\n }\n }\n $R[] = $aux;\n }while($res = $con->obenerFila($id));\n return $R;\n }\n return false;\n }", "public function buscar() {\n $buscarUsuario = new SqlQuery(); //instancio la clase\n (string) $tabla = get_class($this); //uso el nombre de la clase que debe coincidir con la BD \n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $statement = $this->refControladorPersistencia->ejecutarSentencia(\n $buscarUsuario->buscar($tabla)); //senencia armada desde la clase SqlQuery sirve para comenzar la busqueda\n $arrayUsuario = $statement->fetchAll(PDO::FETCH_ASSOC); //retorna un array asociativo para no duplicar datos\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n return $arrayUsuario; //regreso el array para poder mostrar los datos en la vista... con Ajax... y dataTable de JavaScript\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n }\n }", "function ReadAll(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='Pendiente'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "private function consultar_usuario_todos() {\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u;\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "function consultar()\n{\n global $conexao, $tipoServicos;\n\n $tipoServicos = $conexao->query(\"SELECT * FROM tipoServico\") or die($conexao->error);\n}", "function consultar(){\n\t\t\n\t\t$this->mysqli = conectarBD();\n\t\t\n\t\t$sql = \"SELECT Linea_Factura.Id_Linea_Factura,Linea_Factura.Id_Factura,Servicio.Nombre,Linea_Factura.Importe,Linea_Factura.Descripcion FROM Linea_Factura INNER JOIN Servicio WHERE Linea_Factura.Id_Factura='\".$this->factura.\"' AND Linea_Factura.Id_Servicio=Servicio.Id_Servicio AND Linea_Factura.Borrado='0';\";\n\t\t$resultado = $this->mysqli->query($sql);\t\n\t\tif ($resultado->num_rows > 0){\n\t\t\twhile($row = $resultado->fetch_array()){\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t\treturn $array;\n\t\t}\n\t}", "function consultar(){\n global $conexion, $data;\n $eliminado = $data[\"eliminado\"];\n $usuario = $data[\"usuario\"];\n $resultado= pg_query($conexion, \"SELECT * FROM decidim_users WHERE email='$usuario' AND id='$password'\");\n codificarJSON($resultado);\n }", "function listar_diccionario() {\n\t\t\t\n\t\t$query = \"SELECT palabras.*\n\t\tFROM palabras\n\t\tORDER BY palabras.id_palabra asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function getAll(){\r\n $sql=\"SELECT * FROM salas\";\r\n try{\r\n //creo la instancia de conexion\r\n $this->connection= Connection::getInstance();\r\n $result = $this->connection->execute($sql);\r\n }catch(\\PDOException $ex){\r\n throw $ex;\r\n } \r\n //hay que mapear de un arreglo asociativo a objetos\r\n if(!empty($result)){\r\n return $this->mapeo($result);\r\n }else{\r\n return false;\r\n }\r\n\r\n }", "public function select()\n {\n $sql = \"SELECT * FROM tipousuario\";\n return ejecutarConsulta($sql);\n }", "public function listarPorId(){\n $query = \"select * from usuario where idusuario=?\";\n\n //preparando a consulta para a execução\n $stmt=$this->conn->prepare($query);\n\n //vamos fazer um blind(ligação) do id pesquisado\n //com o paramêtro da consulta, neste caso é o \n //ponto de interrogação\n $stmt ->bindParam(1,$this->idusuario);\n\n //executar efetivamente a consulta \n $stmt ->execute();\n\n //Organizar os dados retornados da consulta para \n // a exibição em formato de json\n // Vamos usar uma variavel e um array para associar \n // os campos da tabela\n $linha = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //organizar no objeto usuario(aqrquivo usuario.php)\n //os dados retornados\n //da tabela usuario que está no banco de dados\n \n $this->email = $linha['email'];\n $this->senha = $linha['senha'];\n $this->nome = $linha['nome'];\n $this->cpf = $linha['cpf'];\n $this->telefone = $linha['telefone'];\n $this->foto = $linha['foto'];\n\n }", "function getPagos(){\n // 1. abrir la conexion\n //parametros\n //servidor: localhost\n //base de datos: db_deudas\n //usuario: root\n //contraseña: root (en xampp generalmente es vacía)\n $db = new PDO('mysql:host=localhost;'.'dbname=db_deudas;charset=utf8','root', '');\n\n //2. Ejecutar la consulta sql --> SELECT * FROM `pagos`;\n //subpasos --> PREPARE\n // --> EXECUTE\n\n $query = $db -> prepare('SELECT * FROM `pagos`');\n\n $query -> execute();\n\n //3. Obtener los datos de la consulta para procesarlos\n $pagos = $query -> fetchAll(PDO::FETCH_OBJ); //-->devuelve un arreglo con todos los datos de la tabla\n\n //4. Cerrar la conexion a la base de datos\n //con PDO no es necesario cerrarla\n\n return $pagos;\n}", "function svaPitanja() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM pitanje ';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}", "function consultaUsuario($conexion){\n $resultado = $conexion->query(\"SELECT * FROM usuario\");\n return $resultado;\n}", "function consulta_datos_empresa($id) {\n $sql = \"SELECT nombre_empresa,ruc_empresa FROM prosic_empresa WHERE id_empresa=\" . $id;\n $sql = \"SELECT nombre_empresa,ruc_empresa FROM prosic_empresa WHERE id_empresa=\" . $id;\n $result = $this->Consulta_Mysql($sql);\n $row = mysql_fetch_array($result);\n return $row;\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function consultarDatos($consultaSQL){\n $conexionBD=$this->conectarBD();\n\n //2.Preparar la consulta que se va a realizar\n $consultaBuscarDatos= $conexionBD->prepare($consultaSQL);\n\n //3. Definir la forma en la que vmos a traer los datos\n // setFetchMode\n $consultaBuscarDatos->setFetchMode(PDO::FETCH_ASSOC);\n\n //4.Ejecutar la consulta\n $consultaBuscarDatos->execute();\n\n //5. Retornar los datos consultados\n return($consultaBuscarDatos->fetchAll());\n\n\n\n}", "function consultarEstadoNomina(){\n \n $conexion = new conexion();\n $sql = \"select * from mod_nomina_estado\";\n $resulConsulta = $conexion->consultar($sql);\n return $resulConsulta; \n \n }", "public function buscarhorario()\n\t{\n\t\t$query=\"SELECT * FROM horario WHERE idhorario=\".$this->idhorario;\n\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t\n\t\t//echo $total;\n\t\treturn $resp;\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function consultar ($conexion){\r\n // PROCEDIMIENTO ALMACENADO \r\n $query=\"call consulta_acudiente()\";\r\n $consulta=mysqli_query($conexion, $query);\r\n return $consulta;\r\n }", "public function read(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "function consultarDetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM detalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "function getResult($select){\n // Connexion à la base de données\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n\n try {\n $conn = new PDO(\"mysql:host=$servername;dbname=base_etudiants\", $username, $password);\n // set the PDO error mode to exception\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n }\n catch (PDOException $e) {\n echo \"Connexion à la base impossible ! \" . $e->getMessage();\n }\n\n // Selection en base de données\n $sql = $conn->query($select);\n $reponse = $sql->fetchAll();\n\n return $reponse;\n}", "public function get_Banco(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from banco;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function listar(){\n\t\t$sql = \"SELECT * FROM cargo\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "function getAll() {\n global $dbh, $schema;\n try {\n // using prepared statements will help protect you from SQL injection\n $stmt = $dbh->prepare(\"SELECT * FROM $schema.ingrediente\");\n $stmt->execute();\n // get array containing all of the result set rows \n $result = $stmt->fetchall(PDO::FETCH_ASSOC);\n return $result;\n }\n catch(PDOException $e) {\n $_SESSION[\"s_errors\"][\"generic\"][] = \"ERRO[16]: \".$e->getMessage();\n header(\"Location: ../../index.php\");\n die;\n }\n }", "public function leerDatos($tabla){\r\n\t\t\t$sql = '';\r\n\t\t\tswitch($tabla){\r\n\t\t\t\tcase \"Usuario\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id, nombre, nacido, sexo, foto from usuario;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"UsuarioDeporte\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id_usuario, id_deporte from usuario_deporte;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"Deporte\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT id, nombre from deporte;\r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"Passwd\":\r\n\t\t\t\t\t$sql = \"\r\n\t\t\t\t\t\tSELECT usuario, clave from passwd; \r\n\t\t\t\t\t\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$arrayFilas=$this->conn->query($sql);\r\n\t\t\treturn $arrayFilas;\r\n\t\t}", "function listar_idiomas() {\n\t\t$query = \"SELECT idiomas.*\n\t\tFROM idiomas\n\t\tORDER BY idioma\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function readAll(){\n //select all data\n $query = \"SELECT\n id, num_compte, cle_rib, num_agence, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n num_compte\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}", "public function getAll(){\n try{\n $sql = \"SELECT * FROM {$this->tabela}\";\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $dados = $stm->fetchAll(PDO::FETCH_OBJ);\n return $dados;\n }catch(PDOException $erro){\n echo \"<script>alert('Erro na linha: {$erro->getLine()}')</script>\";\n }\n }", "function dias_semana (){ \n $sql=\"SELECT nombre FROM dia\";\n return toba::db()->consultar($sql);\n }", "public function consultarTodos()\n\t{\n\t\t$sql = \t' SELECT colores.* '.\n\t\t\t\t' FROM colores '.\n\t\t\t\t' ORDER BY nombre ';\n\t\n\t\t$stmt = $this->getEntityManager()->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll(); //Se utiliza el fecth por que es un registro\n\t\t\n\t\t//Elimina los espacios\n\t\tforeach($result as &$reg)\n\t\t{\n\t\t\t$reg['nombre'] = trim($reg['nombre']);\n\t\t}//end foreach\n\t\n\t\treturn $result;\n\t}", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM EDIFICIO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->codedificio') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\tif (!$resultado = $this->mysqli->query($sql)) //Si la consulta no se ha realizado correctamente, mostramos mensaje de error\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devolvemos el mensaje\n\t}\n\telse //Si no, convierte el resultado en array\n\t{\n\t\t$tupla = $resultado->fetch_array(); //guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "private function query_consultores(){\n\n \t$respuesta = false;\n\n\t\ttry {\n\n\t\t\t$this->db->select('cao_usuario.co_usuario');\n\t\t\t$this->db->select('cao_usuario.no_usuario');\n\t\t\t$this->db->select('cao_usuario.no_email');\t\n\t\t\t$this->db->from('cao_usuario');\n\t\t\t$this->db->join('permissao_sistema', 'permissao_sistema.co_usuario = cao_usuario.co_usuario');\n\t\t\t$this->db->where('cao_usuario.co_usuario is NOT NULL', NULL, FALSE);\n\t\t\t$this->db->where('permissao_sistema.co_sistema',$this->_co_sistema);\n\t\t\t$this->db->where('permissao_sistema.in_ativo',$this->_in_ativo);\n\t\t\t$this->db->where_in('permissao_sistema.co_tipo_usuario', $this->_co_tipo_usuario);\n\t\t\t$this->db->order_by(\"cao_usuario.co_usuario\", \"asc\");\t\t\t\n\n\t\t\t$query = $this->db->get();\n\n\t\t if ($query && $query->num_rows() > 0)\n\t\t {\n\t\t\t\t$respuesta = $query->result_array();\n\n\t\t }else{\n\n\t\t throw new Exception('Error al intentar listar todos los consultores');\n\t\t\t log_message('error', 'Error al intentar listar todos los consultores');\t\t \n\n\t\t $respuesta = false;\t\t\t\t\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\n\t\t\t$respuesta = false;\n\t\t}\t\t\t\n\n\t\treturn $respuesta;\n }", "function leer(){\n \n // hace la consulta\n $query = \"SELECT Id, Nombre, Apellidos, Edad FROM Usuario\";\n \n // prepara la consulta\n $stmt = $this-> con->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n}", "public function selectAllRegiuniData(){\n $sql = \"SELECT * FROM regiune ORDER BY id DESC\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "function getDatos(){\n $res = $this->Consulta('SELECT C.*, P.id_planta FROM '.$this->Table .' C\n INNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\n INNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\n INNER JOIN\n plantas P ON P.id_planta = S.id_planta\n \n WHERE '.$this->PrimaryKey.' = '.$this->_datos);\n $resultado = $res[0];\n // $resultado = array_map('utf8_encode',$resultado);\n \n print_r( json_encode( $resultado ) );\n }", "function consultarCliente (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM cliente');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "function llamarRegistrosMySQLPlaneServicios() {\n\t\t\tglobal $res;\n\t\t\t$cnx = conectar_mysql(\"Salud\");\n\t\t\t$cons = \"SELECT * FROM Salud.EPS ORDER BY AutoId ASC\";\n\t\t\t$res = mysql_query($cons);\n\t\t\treturn $res; \n\t\t\n\t\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function RellenaDatos()\n{\n $sql = \"SELECT *\n\t\t\tFROM USUARIOS\n\t\t\tWHERE (\n\t\t\t\t(login = '$this->login') \n\t\t\t)\";\n\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}else\n\t{\n\t\t$tupla = $resultado->fetch_array();\n\t}\n\treturn $tupla;\n}", "function datos_internacionalizacion() {\n\t\t$query = \"SELECT * FROM internacionalizacion\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\n\t\t$result = mysql_query($query);\n\t\t$numrows = mysql_num_rows($result);\n\n\t\tif ($numrows == 0) {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t}", "public function consultarListado()\n {\n $sql = \"SELECT * FROM examen\";\n $execute = $this->con->query($sql);\n $request = $execute->fetchall(PDO::FETCH_ASSOC);\n return $request; \n }", "public function getAll(){\n $sqlQuery = \"SELECT * FROM \".$this->t_name.\"\";\n //prepate stamt;\n $stmt = $this->conn->prepare($sqlQuery);\n $stmt->execute();\n //kembalikan nilai stmt\n return $stmt;\n }", "function readAll(){\n \n $query = \"SELECT * FROM \".$this->table_name.\" ORDER BY id_alternatif ASC\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n\n return $stmt;\n }", "function all(){\n try{\n $link= connecter_db();\n $rp=$link->prepare(\"select * from etudiant order by id desc\");\n $rp->execute();\n $resultat= $rp->fetchAll(); \n\n return $resultat;\n }catch(PDOException $e ){\n die (\"erreur de recuperation des etudiants dans la base de donnees \".$e->getMessage());\n }\n\n}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "function RellenaDatos()\n {\t// se construye la sentencia de busqueda de la tupla\n $sql = \"SELECT * FROM ENTREGA WHERE (IdTrabajo = '$this->idTrabajo' AND login = '$this->login')\";\n // Si la busqueda no da resultados, se devuelve el mensaje de que no existe\n if (!($resultado = $this->mysqli->query($sql))){\n return 'No existe en la base de datos'; //\n }\n else{ // si existe se devuelve la tupla resultado\n $result = $resultado->fetch_array();\n return $result;\n }\n }", "function consultarEmpleado(){\n\t$ced=$this->objEmpleado->getCedula();\n\t$objConexion = new ControlConexion();\n\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE CEDULA='\".$ced.\"' \";\n\n\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\n\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\n\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\t\t}\t\n\t\t$objConexion->cerrarBd(); \n\t\treturn $this->objEmpleado; \t\t\n}", "public function select_all(string $query)\n{\n $this->strquery = $query;\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n $data = $result->fetchall(PDO::FETCH_ASSOC);\n return $data; \n}", "public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function consultar() {\n\t\t$this->load->model('Consultar_model');\n\t\t$result = $this->Consultar_model->consultar();\n\t\techo json_encode($result);\n\t}", "public function read(){\n \n //select all data\n $query = \"SELECT\n id, id, num_compte, cle_rib, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n created\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "function consultaJuegoUsuario($Usuario_idUsuario, $Juego_idJuego){\n $conexion = openBD();\n\n $sentenciaText = \"select * from usuario_has_juego where Usuario_idUsuario=$Usuario_idUsuario and Juego_idJuego=$Juego_idJuego\";\n\n $sentencia =$conexion->prepare($sentenciaText);\n $sentencia->execute();\n $resultado = $sentencia->fetch();\n $conexion = closeBD();\n\n \n\n return $resultado;\n\n\n }", "public function mostrarpersonal($sql){\n $c= new conectar();\n $conexion=$c->conexion();\n\n $result=mysqli_query($conexion,$sql);\n\n return mysqli_fetch_all($result,MYSQLI_ASSOC);\n }", "public function get_datos($clave, $condicion=\"\", $table='dual', $aux = null) {\n #traemos los datos segun la referencia de la entrada de la funcion\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT $clave FROM $table \";\n !empty($condicion) ? $this->query .= \"WHERE $condicion\" : \"\";\n //print $this->query;\n $this->get_results_from_query();\n unset($this->_data);\n if (count($this->rows) >= 1) {\n foreach ($this->rows as $pro => $va) {\n $this->_data[] = $va;\n }\n } else {\n $this->_data = \"\";\n }\n }", "public function listar(){\n\n\t\t$data = $this->db->from($this->table)\n\t\t\t\t\t\t ->orderBy('id DESC')\n\t\t\t\t\t\t ->fetchAll();\n\t\tif(empty($data)){\n\t\t $respuesta = array('respuesta' => 0 );\n\t\t return $respuesta;\n\t\t}else{\n\t\t return $data;\n\t\t}\t\t\t\t \n\t// return $data = $this->db_pdo->query('select * from '.$this->table)\n\t//\t\t\t\t\t \t\t\t->fetchAll();\t\t\t\t \t\t\t\t\t\t \n\t}", "function leer_datos( $sql ) {\n // Nos conectamos a la Base de Datos y guardamos la referencia en la variable $conexion\n $conexion = conectar_Base_de_Datos();\n\n // Ejecutamos la consulta, y guardamos el resultado en la variable $resultado\n $resultado = mysqli_query( $conexion, $sql );\n\n // Comprobamos que la variable $resultado no esté vacía\n if ( !$resultado ) {\n // Si hubo un error, hacemos un echo\n echo \"No se pudo ejecutar Consulta\";\n echo 'MySQL Error: ' . mysqli_error( $conexion );\n // Y cerramos todo\n exit;\n } else {\n\n // Creamos la variable $resultado_final, va a ser un Array\n $resultado_final = array();\n\n // Cargamos los datos desde $resultado en $resultado_final\n while ( $row = mysqli_fetch_assoc( $resultado ) )\n {\n array_push( $resultado_final, $row );\n }\n if ( count($resultado_final) === 1 ) {\n $resultado_final = $resultado_final[0];\n }\n\n // Limpiamos la memoria\n mysqli_free_result( $resultado );\n // Cerramos la conexion a la Base de Datos\n mysqli_close( $conexion );\n // Devolvemos $resultado_final\n return $resultado_final;\n }\n}", "public function listForTable (){\r\n //generamo la query final que precisamos\r\n $queryResult= \"SELECT id,dni,nombre,apellido,mail FROM usuario.usuario ORDER BY id;\";\r\n\r\n //Ejecutamos la query\r\n $this->stmt=pg_query($this->link,$queryResult) or die(\"Error en la consulta,function listForTable :\".preg_last_error());\r\n\r\n return $this->stmt;\r\n }", "public function readTabla() {\r\n $query = 'SELECT * FROM ' . $this->tabla;\r\n\r\n\r\n \r\n\r\n $sentencia = $this->con->prepare($query);\r\n\r\n $sentencia->execute();\r\n\r\n return $sentencia;\r\n }", "function ejecutarConsulta() {\n\t\t$this->openConnection();\n\t\t$res = $this->conn->query($this->consulta);\n\t\t$this->closeConnection();\n\t\treturn $res;\n\t}", "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "public function findAll(){\n \n\t\t$sql = 'SELECT * FROM ' . self::TABLENAME;\n\n \t$db = new Database(); // se creeaza conexiunea la baza de date\n\t\t$stmt = $db->getConnection()->prepare($sql);\n\t\t$stmt->execute();\n\t\t$results = $stmt->fetchAll();\n\t\n\t\treturn $results; \n }", "function obtenerDatos() {\n include('../demo_formulario/include/funciones/db.php');\n\n return $conn->query(\"SELECT nombre, apellido, dni, edad, fecha_nacimiento, genero, pais, provincia, localidad, calle, numero FROM personas WHERE (edad > 24 && edad < 35)\");\n }", "function listar_autores() {\n\t\t$query = \"SELECT autores.*\n\t\tFROM autores\n\t\tORDER BY autor asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_jadwal_ujian';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupl\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODCENTRO = '$this->CODCENTRO') \n\t\t\t)\";\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}//si no\n\telse//si se ejecuta con éxito\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "public function readAll(){\r\n $query = \"SELECT * FROM docente;\";\r\n $statement = $this->cdb->prepare($query);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\r\n return $rows; \r\n }", "public function cargaDatos() {\n $id = $this->input->post(\"id\");\n $where = \"id=\" . $id;\n $datos = $this->AdministradorModel->buscar($this->tabla, \"*\", $where, 'row');\n echo json_encode($datos);\n }", "function SHOWALL(){\n $sql = \"SELECT * FROM deportista\";\n \n $resultado = $this->mysqli->query($sql);\n \n if(!$resultado){\n return 'No se ha podido conectar con la BD';\n }else{\n return $resultado;\n }\n }", "function RellenaDatos()\n{//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t\t\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t} //si no se ejecuta con éxito \n\telse\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "function consulta($Conexion_ID, $Where = \"\"){\r\n\r\n $SQL = \"SELECT me.id, me.snombre,\r\n\t\t me.sapellido, me.stelefono,\r\n\t\t me.stelefono_1, me.id_especialidad,\r\n\t\t me.bactivo, esp.id as esp_id, esp.sdescripcion as esp_descrip FROM doctor me, especialidad esp WHERE me.id_especialidad = esp.id \";\r\n\r\n if (!empty($Where)) {\r\n $SQL .= \" AND \" . $Where;\r\n\r\n }\r\n\r\n $SQL .= \" ORDER BY sapellido \";\r\n\r\n//ejecutamos la consulta\r\n\r\n\r\n $this->Consulta_ID = @mysql_query($SQL, $Conexion_ID);\r\n\r\n if (!$this->Consulta_ID) {\r\n\r\n $this->Errno = mysql_errno();\r\n\r\n $this->Error = mysql_error();\r\n\r\n }\r\n\r\n/* Si hemos tenido éxito en la consulta devuelve el identificador de la conexión, sino devuelve 0 */\r\n\r\n return $this->Consulta_ID;\r\n\r\n}", "function consultar(){\n global $conexion, $data;\n $eliminado = $data[\"eliminado\"];\n $resultado= mysqli_query($conexion,\"SELECT * FROM usuario, catalogo_tipo_usuario WHERE usu_id_tipo_usuario=cau_id AND usu_eliminado='$eliminado'\");\n echo validarError($conexion, false, $resultado);\n }", "function datos_eu_tipo($id_tipo) {\n\t\t$query = \"SELECT eu_tipo.*\n\t\tFROM eu_tipo\n\t\tWHERE id_tipo_eu = '$id_tipo'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "public function findAll() {\r\n$sql = \"SELECT * FROM $this->tabela\";\r\n$stm = DB::prepare($sql);\r\n$stm->execute();\r\nreturn $stm->fetchAll();\r\n}", "public function exposConEntrada(){\n\t\t$query = sprintf(\"SELECT * FROM Eventos EV, Entradas EN WHERE EV.id=EN.id_evento AND EN.id_usuario=%d\", $this->id);\n\t\t$obras = self:: consulta($query);\n\t\treturn $obras;\n\t}", "public function listarc()\n {\n $sql = \"SELECT * FROM miembros \n \";\n\n return ejecutarConsulta($sql);\n }", "public function Select(){\n\t\t\t//Query para selecionar a tabela contatos\n\t\t\t$sql=\"SELECT p.*, e.* FROM tbl_paciente AS p INNER JOIN tbl_endereco AS e ON p.id_endereco = e.id_endereco WHERE ativo = 1 AND status = 1;\";\n\n\t\t\t//Instancio o banco e crio uma variavel\n\t\t\t$conex = new Mysql_db();\n\n\t\t\t/*Chama o método para conectar no banco de dados e guarda o retorno da conexao\n\t\t\tna variavel que $PDO_conex*/\n\t\t\t$PDO_conex = $conex->Conectar();\n\n\t\t\t//Executa o select no banco de dados e guarda o retorno na variavel select\n\t\t\t$select = $PDO_conex->query($sql);\n\n\t\t\t//Contador\n\t\t\t$cont = 0;\n\n\t\t\t//Estrutura de repetição para pegar dados\n\n \n\n\t\t\twhile ($rs = $select->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t#Cria um array de objetos na classe contatos\n\n //var_dump($rs);exit();\n\n\t\t\t\t//$lista_paciente[] = $rs;\n\n $lista_pacientes[] = new Paciente();\n \n\t\t\t\t// Guarda os dados no banco de dados em cada indice do objeto criado\n\t\t\t\t$lista_pacientes[$cont]->id_paciente = $rs['id_paciente'];\n $lista_pacientes[$cont]->id_endereco = $rs['id_endereco'];\n $lista_pacientes[$cont]->id_convenio = $rs['id_convenio'];\n $lista_pacientes[$cont]->nome = $rs['nome'];\n $lista_pacientes[$cont]->sobrenome = $rs['sobrenome'];\n $lista_pacientes[$cont]->dt_nasc = $rs['dt_nasc'];\n $lista_pacientes[$cont]->rg = $rs['rg'];\n $lista_pacientes[$cont]->cpf = $rs['cpf'];\n $lista_pacientes[$cont]->carteirinha_convenio = $rs['carterinha_convenio'];\n $lista_pacientes[$cont]->foto = $rs['foto'];\n $lista_pacientes[$cont]->status = $rs['status'];\n\t\t\t\t$lista_pacientes[$cont]->id_endereco = $rs['id_endereco'];\n $lista_pacientes[$cont]->cep = $rs['cep'];\n $lista_pacientes[$cont]->logradouro = $rs['logradouro'];\n $lista_pacientes[$cont]->numero = $rs['numero'];\n $lista_pacientes[$cont]->id_estado = $rs['id_estado'];\n $lista_pacientes[$cont]->cidade = $rs['cidade'];\n $lista_pacientes[$cont]->bairro = $rs['bairro'];\n\n\t\t\t\t// Soma mais um no contador\n\t\t\t\t$cont+=1;\n\t\t\t}\n\n\t\t\t$conex::Desconectar();\n\n\t\t\t//Apenas retorna o $list_contatos se existir dados no banco de daos\n\t\t\tif (isset($lista_pacientes)) {\n\t\t\t\t# code...\n\t\t\t\treturn $lista_pacientes;\n\t\t\t}\n\n\t\t}", "function read(){\n $dbh = $this->connect();\n $sentencia = \"SELECT * FROM doctor\";\n $stmt = $dbh->prepare($sentencia);\n $stmt->execute();\n $rows = $stmt->fetchAll();\n return $rows;\n }", "public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}", "public function ConsultarDatosUsuario($id){\n $conn = new conexion();\n $cuenta = null;\n try {\n if($conn->conectar()){\n $str_sql = \"SELECT usuarios.nom_usu,usuarios.idcliente,usuarios.pass,usuarios.email,usuarios.id_usu,usuarios.foto,usuarios.telefono, \"\n . \"tp_usuarios.nom_tp as tipo,usuarios.id_tp_usu,usuarios.cedula from usuarios INNER JOIN tp_usuarios on \"\n . \"usuarios.id_tp_usu = tp_usuarios.id_tp and usuarios.id_usu = \".$id;\n $sql = $conn->getConn()->prepare($str_sql);\n $sql->execute();\n $resultado = $sql->fetchAll();\n foreach ($resultado as $row){\n $cuenta[] = array(\n \"Nom_usu\" => $row['nom_usu'],\n \"Email\" => $row['email'],\n \"Id_usu\" => $row['id_usu'],\n \"Cedula\" => $row['cedula'],\n \"Foto\" => $row['foto'],\n \"Telefono\" => $row['telefono'],\n \"Tipo\" => $row['tipo'],\n \"Pass\" => $row['pass'],\n \"Id_tipo\" => $row['id_tp_usu'],\n \"Id_cli\" => $row['idcliente'] \n );\n }\n }\n } catch (Exception $exc) {\n $cuenta = null;\n echo $exc->getMessage();\n }\n $conn->desconectar();\n return $cuenta;\n }", "public function read(){\n $sql = 'SELECT * FROM produtos';\n\n // Preparar a query \n $stmt = Conexao::getConn()->prepare($sql);\n // Executando query\n $stmt->execute();\n\n // Verificando se retornou algo do banco\n if($stmt->rowCount()>0){\n // Criando um array com todos os registros\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n return $result;\n }else{// Se nao encontrar nenhum dado no banco\n return [];\n }\n }", "function datos_seleccion($id_seleccion,$id_usuario) {\n\t\t$query = \"SELECT seleccion.*\n\t\tFROM seleccion\n\t\tWHERE seleccion.id_seleccion = '$id_seleccion'\n\t\tAND seleccion.id_usuario='$id_usuario'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "public function index() {\n $sqlPeca = \"SELECT * FROM peca\";\n\n $resultado = $this->con->query($sqlPeca);\n return $resultado->fetch_all(MYSQLI_ASSOC);\n\n $this->con->close();\n \n }", "public function consultar($valor){\r\n\t\t$oSicasAtendimentoBD = new SicasAtendimentoBD();\t\r\n\t\treturn $oSicasAtendimentoBD->consultar($valor);\r\n\t}", "function consultar_productos($marca=\"\"){\n\t\t//Primero conectarse a la bd\n\t\t$conexion_bd = conectar_bd();\n\n\t\t$resultado = \"<table><thead><tr><th>ID</th><th></th><th>Nombre de Marca</th><th></th><th>Acciones</th></tr></thead>\";\n\n\t\t/*$consulta = 'SELECT pr.descripcion as pr_descripcion, m.nombre as m_nombre, pr.cantidad as pr_cantidad, pr.precio as pr_precio, tp.nombre as tp_nombre, e.nombre as e_nombre FROM producto as pr, productotiene as pt, marca as m, tipoproducto as tp, estatus as e WHERE pr.id_producto = pt.id_producto AND m.id_marca = pt.id_marca AND tp.id_tipo = pt.id_tipo AND e.id_estatus = pt.id_estatus'; */\n\n\t\t$consulta = 'SELECT m.nombre as m_nombre, m.id as m_id FROM marca as m ';\n\t\t\n\t\t//Ahora con el buscador necesitamos un validador de que es lo que quiere buscar\n\t\tif ($marca != \"\") {\n\t\t\t$consulta .= \" WHERE m_id=\".$marca;\n\t\t}\n\n\n\t\t$resultados = $conexion_bd->query($consulta); \n\t\twhile ($row = mysqli_fetch_array($resultados, MYSQLI_BOTH)) {\n\t\t\t//$resultado .= $row[0]; //Se puede usar el índice de la consulta\n\t\t\t$resultado .= \"<tr>\";\n\t\t $resultado .= \"<td>\".$row['m_id'].\"</td>\";\n\t\t $resultado .= \"<td></td>\";\n\t\t $resultado .= \"<td>\".$row['m_nombre'].\"</td>\";\n\t\t $resultado .= \"<td></td>\";\n\t\t $resultado .= \"<td>\";\n\t\t $resultado .= \"<a class=\\\"waves-effect waves-light btn-small\\\"><i class=\\\"material-icons\\\">add_box</i></a>\";\n\t\t $resultado .= \"<a class=\\\"waves-effect waves-light btn-small\\\"><i class=\\\"material-icons\\\">edit</i></a>\";\n\t\t $resultado .= \"<a class=\\\"waves-effect waves-light btn-small\\\" href=\\\"registrarIngresoProductos.php\\\"><i class=\\\"material-icons\\\">receipt</i></a>\";\n\t\t $resultado .= '<a href=\"controlador_eliminar_producto.php?id='.$row['m_id'].'\"';\n\t\t $resultado .= borrarBoton();\n\t\t $resultado .= '</a>' ;\n\n\t\t /* $resultado .= '<a href=\"controlador_eliminar_producto.php?id='.$row['p_id'].' class=\"waves-effect waves-light btn-small red lighten-2\"><i class=\"material-icons\">delete</i></a>';*/\n\n\t\t $resultado .= \"</td>\" ;\n\t\t $resultado .= \"</tr>\" ;\n\t\t}\n\t\tmysqli_free_result($resultados); //Liberar la memoria\n\n\t\t// desconectarse al termino de la consulta\n\t\tdesconectar_bd($conexion_bd);\n\n\t\t$resultado .= \"</tbody></table>\";\n\n\t\treturn $resultado;\n\t}", "function tampil_data($tabel)\n {\n $row = $this->db->prepare(\"SELECT * FROM sms\");\n $row->execute();\n return $hasil = $row->fetchAll();\n }", "public function select(){\n\t\t$sql = \"SELECT * FROM cargo\n\t\t\t\twhere car_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function readAll(){\r\n\r\n // QUERY SQL PARA FAZER CONSULTA NO BANCO\r\n\t\t$sql = 'SELECT * FROM usuarios';\r\n\r\n\t\t// PREPARANDO CONEXÃO COM O BANCO\r\n\t\t$stmt = Conexao::getConn()->prepare($sql);\r\n\r\n\t\t// EXECUTANDO QUERY\r\n\t\t$stmt->execute();\r\n \r\n // VERIFICA SE TEM REGISTRO NA TABELA\r\n\t\tif ($stmt->rowCount() > 0){\r\n\r\n // ARMAZENA OS RESULTADOS \r\n\t\t\t$resultado = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\r\n \r\n // RETORNA OS RESULTADOS EM JSON\r\n\t\t\treturn json_encode($resultado);\r\n\r\n }else{\r\n\r\n // CASO NÃO TENHA REGISTRO RETORNARA ARRAY VAZIO\r\n\t\t\treturn [];\r\n\r\n }\r\n\r\n }", "public function lista() {\n $sql = \"SELECT * FROM cliente\";\n $qry = $this->db->query($sql); // query do pdo com acesso ao bd\n\n //return $qry->fetchAll(); // retorna todos os registros\n return $qry->fetchAll(\\PDO::FETCH_OBJ); // retorna todos os registros a nível de objeto\n }", "function listar_palabras() {\n\n\t\t$query = \"SELECT *\n\t\tFROM palabras\";\n\t\t\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row= mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}" ]
[ "0.71992135", "0.71833885", "0.715125", "0.71253973", "0.7120007", "0.7113935", "0.7090362", "0.70648676", "0.7037965", "0.69573224", "0.6932917", "0.6932673", "0.6894677", "0.6872656", "0.6870303", "0.68536407", "0.6852207", "0.68456346", "0.6832023", "0.68196905", "0.68170035", "0.68072003", "0.68026096", "0.6802119", "0.6795697", "0.6792484", "0.6789856", "0.6789239", "0.67888457", "0.6761312", "0.67585534", "0.67512316", "0.6738277", "0.67342174", "0.6725163", "0.6724861", "0.6719835", "0.6708365", "0.6704094", "0.67020607", "0.6698983", "0.6690318", "0.6685218", "0.6684455", "0.6681489", "0.66764694", "0.6668987", "0.6664795", "0.6663834", "0.66619164", "0.6660245", "0.66567415", "0.6655889", "0.6648412", "0.66468084", "0.6646383", "0.6636526", "0.6631848", "0.66297495", "0.66297394", "0.6629093", "0.6627893", "0.6626254", "0.6626111", "0.66240776", "0.66229033", "0.6620968", "0.6619009", "0.66145235", "0.66080934", "0.65997946", "0.65922266", "0.65922266", "0.6587763", "0.6587065", "0.65860134", "0.65762997", "0.6576196", "0.65694255", "0.65667945", "0.6564598", "0.65634376", "0.6563081", "0.6556119", "0.655332", "0.65482056", "0.6546744", "0.6546062", "0.6543017", "0.6541374", "0.65412116", "0.6539969", "0.6534436", "0.6526852", "0.65247697", "0.6519423", "0.6506364", "0.6498735", "0.6489675", "0.6487758", "0.6487186" ]
0.0
-1
/ obtiene un campo desde la base de datos
function obtener_campo($sql, $campo=false){ $datos = consulta($sql,true); if (!$datos) { return false; }else { if($campo==false){ $datos = array_shift ($datos['resultado'][0]); }else{ $datos = $datos['datos'][0][$campo]; } return $datos; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchField();", "public abstract function FetchField();", "function getField($campo)\n{\n\treturn $this->res2[$campo];\n}", "public function __get($field){\n if ($field == 'usuario_id'){\n return $this->codigo;\n }\n else{\n return $this->fields[$field];\n }\n }", "public function get_field(/* .... */)\n {\n return $this->_field;\n }", "public function getField(){\n return $this->field;\n }", "public function __get($field){\n if ($field == 'ENTIDAD_ID'){\n return $this->codigo;\n }\n else{\n return $this->fields;\n }\n }", "function getField(){\n\t\treturn $this->Field;\n\t}", "public function get($campo) {\n return $this->$campo;\n }", "function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}", "function readDataField() {return $this->_datafield;}", "public function __get ($field) {\n return $this->__fields[$field]['data'];\n }", "public function getValue($field) {\n if (array_key_exists($field, $this->data)) {\n return $this->data[$field];\n } else {\n die(\"Campo no encontrado\");\n }\n}", "public function getField();", "public function getField();", "public function getField();", "public function getField()\n {\n return $this->_field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "function getDataField() {return $this->_datafield;}", "public function getField() {\n\t\treturn $this->field; \n\t}", "public function getField()\n {\n $value = $this->name;\n if (null != $this->field) {\n $value = $this->field;\n }\n return $value;\n }", "public function getField(): string;", "public function getUserfield();", "public function getField() {\n\t\treturn $this->field;\n\t}", "function getfield($field){\n\n\t\treturn($this->record[$field]);\n\t}", "public function getField(): string\n {\n return $this->field;\n }", "function getFieldValue($field);", "public function getField() {\n\t\treturn $this->_field;\n\t}", "function GetField($field=0){\n\t\t\treturn @mysql_result($this->result,0,$field);\n\t\t}", "function getValueFromField()\n {\n return $this->current_row[ key( $this->mapping ) ];\n }", "function getfield(){\r\n // Талбаруудын утгыг авах\r\n }", "public function getField($name) { return $this->fields[$name]; }", "public function get($field);", "public function get($field);", "public function campo($nombre) {}", "function get_field($name)\r\n {\r\n if ($name)\r\n {\r\n $tempArray = fetch_to_array(database::query(\"SELECT * FROM system WHERE name='$name'\"),\"\");\r\n if (is_array($tempArray)) return(current($tempArray));\r\n }\r\n else return (false);\r\n }", "function get_val($id, $field){\n if($id){\n $q = sql_query(\"SELECT `$field` FROM `entities` WHERE `ID` = '$id'\");\n $r = mysqli_fetch_row($q);\n mysqli_free_result($q);\n return $r[0];\n }\n else{\n return \"\";\n }\n}", "public function get($field) {\r\n\t\treturn $this -> fields[$field];\r\n\t}", "public function getFieldName() {}", "function getFieldValue($value_id)\r\n\t{\r\n\t\t$q = \"SELECT \".$this->fieldToSelect.\" FROM `\".$this->tableName.\"` WHERE \".$this->tableId.\"='\".$value_id.\"'\";\r\n\t\t$this->db->Execute($q);\r\n\r\n\t\tif($this->db->Affected_rows() > 0)\r\n\t\t{\r\n\t\t\t$field_value = $this->db->GetOne($q);\r\n\t\t\treturn $field_value;\r\n\t\t}else{\r\n\t\t\tdie('<strong>Nama Field yang ada di dalam tanda {} tidak ada di table '.$this->tableName.',<br> sql : '.$this->sql.'</strong>');\r\n\t\t}\r\n\t\treturn '';\r\n\t}", "public function getField($pk = null)\n\t{\n\t\treturn parent::getRecord($pk);\n\t}", "public function getFieldData($oId, $sField)\n {\n return Shopware()->Db()->fetchOne(\"select `\" . $sField . \"` from `asign_orders` where `ordid` = '\" . $oId . \"'\"); \n }", "public function getField()\n {\n return $this->belongsTo(Field::class, 'field_id')->first();\n }", "function get_field( $field, $query = null ){\r\n\t\tif( $row = $this->get_row( $query ) and isset( $row[$field] ) )\r\n\t\t\treturn $row[$field];\r\n\r\n\t}", "function readReal(){ \n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=1 LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id'];\n\t\t$this->nmp = $row['nama_pondok'];\n\t\t$this->almt = $row['alamat_pondok'];\n\t\t$this->komp = $row['komputer_pondok'];\n\t\t$this->sms = $row['no_sms_gateway'];\n\t}", "function db_get_field($query)\n{\n\t$args = func_get_args();\n\n\tif ($_result = call_user_func_array('db_query', $args)) {\n\t\n\t\t$result = driver_db_fetch_row($_result);\n\n\t\tdriver_db_free_result($_result);\n\n\t}\n\n\treturn (isset($result) && is_array($result)) ? $result[0] : NULL;\n}", "function readOne(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=? LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id'];\n\t\t$this->nmp = $row['nama_pondok'];\n\t\t$this->almt = $row['alamat_pondok'];\n\t\t$this->komp = $row['komputer_pondok'];\n\t\t$this->sms = $row['no_sms_gateway'];\n\t}", "public function __get($field) {\n\n if (array_key_exists($field, $this->_fields)) {\n return $this->_fields[$field];\n } else if (in_array($field, ApplicationSql::tablenames())) { // Büyükten -> Küçüğe\n\n $belong_table = $field; // user\n $foreign_key = $field . \"_id\"; //user_id\n\n if (!in_array($foreign_key, ApplicationSql::fieldnames($this->_table)))\n throw new BelongNotFoundException(\"Tabloya ait olan böyle foreign key yok\", $foreign_key);\n\n return $belong_table::find($this->_fields[$foreign_key]);\n } else {\n preg_match_all(\"/all_of_.*/\", $field, $matches);\n $matches = $matches[0];\n\n if ($matches) {\n $field = substr($field, 7);\n if (in_array($field, ApplicationSql::tablenames())) {\n\n $owner_table = ucfirst($field); // model name\n $owner_key = strtolower($this->_table) . \"_id\";\n\n // return $owner_table::load()->where([$owner_key => $this->_fields[\"id\"]])->take();\n return $owner_table::load()->where($owner_key, $this->_fields[\"id\"])->take();\n }\n }\n }\n\n throw new FieldNotFoundException(\"Tabloda getirilecek böyle bir anahtar mevcut değil\", $field);\n }", "function readOne() {\n $query = \"SELECT\n id, name, description, created \n FROM\n \" . $this->table_name . \" \n WHERE\n id = ?\n LIMIT\n 0,1\";\n \n $stmt = $this->conn->prepare($query);\n \n $stmt->bindParam(1, $this->id); //ambil id dr bukunya\n\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC); //mengembalikan barisnya\n\n //set values objek bukunya berdasarkan id tadi\n $this->name = $row['name'];\n $this->description = $row['description'];\n $this->created = $row['created'];\n }", "function get_data($field=null)\n {\n $query=$this->recruitment_model->get_faculty_info($this->user_id);\n\n $result=$query->result_array();\n if($field==null)\n {\n return $result[0];\n }\n return $result[0][$field];\n }", "public function getDataInputField();", "function obtenerTipoEquipoAtr($id,$field){\n\t\tswitch($field){\n\t\t\tcase \"nombre\":\n\t\t\t\t$field = \"text_nombre\";\n\t\t\tbreak;\n\t\t}\n\t\t$connect=conectar();\n\t\t$sql = \"SELECT \".$field.\" FROM tiposEquipos WHERE id_tipo = '$id'\";\n\t\t$result= mysql_fetch_array(mysql_query($sql,$connect));\n\t\treturn $result[$field];\n\t}", "public function __get($field) {\n\t\tif(array_key_exists($field, $this->_data)) {\n\t\t\treturn $this->_data[$field];\n\t\t}\n\t\telse {\n\t\t\tthrow new \\Bedrock\\Model\\Record\\Exception('The specified field \"' . $field . '\" was not found.');\n\t\t}\n\t}", "function get_field($type, $type_id = '', $field = 'name')\n {\n if ($type_id != '') {\n $l = $this->db->get_where($type, array(\n $type . '_id' => $type_id\n ));\n $n = $l->num_rows();\n if ($n > 0) {\n return $l->row()->$field;\n }\n }\n }", "public function getData($field) {\n $DBConn = new DBConnection();\n \n // Your query goes here\n $ccn = $_SESSION['ccn'];\n $query = \"SELECT '$field' FROM Client WHERE client_card_number = '$ccn'\";\n \n $stmt = $DBConn->connection->prepare($query);\n $stmt->execute();\n \n // The PHP class in 'models'\n $stmt->setFetchMode (PDO::FETCH_CLASS , 'Template');\n $data = $stmt->fetch();\n if(empty($data))\n // Do something\n return \"\";\n else\n return $data;\n }", "function nombrecampo($numcampo){return mysqli_field_name($this->Consulta_ID, $numcampo);}", "function bacaDataadmin($field, $id_admin_agt) {\n $query = \"SELECT * FROM admin WHERE id_admin = '$id_admin_agt'\";\n $hasil = mysql_query($query);\n $data = mysql_fetch_array($hasil);\n if ($field == 'username')\n return $data['username'];\n else if ($field == 'password')\n return $data['password'];\n }", "function get_value_db()\n\t{\n\t\treturn $this->value;\n\t}", "function getChevalById(){\n\n\n\t\t$query = \"SELECT * from \". $this->table_name . \" WHERE id = ? \";\n\t\t$stmt = $this->conn->prepare( $query );\n\n\t\t// affecte la valeur de l id au paramètre de la requete\n\t\t$stmt->bindParam(1, $this->id);\n\n\t\t// execute la requete\n\t\t$stmt->execute();\n\n\t\t// recupere la ligne\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // valorise les proprietes de cheval\n\t\t$this->id = $row['id'];\n\t\t$this->nom = $row['nom'];\n\t\t$this->sexe = $row['sexe'];\n\t\t$this->prixDepart = $row['prixDepart'];\n\n\t}", "function FetchField($off = 0)\n\t{\n\n\t\t$o= new ADOFieldObject();\n\t\t$o->name = @pg_field_name($this->_queryID,$off);\n\t\t$o->type = @pg_field_type($this->_queryID,$off);\n\t\t$o->max_length = @pg_fieldsize($this->_queryID,$off);\n\t\treturn $o;\n\t}", "public function getField($field_name, $check_db_on_fail = true){\n if(isset($this->data[$this->alias][$field_name]))\n return $this->data[$this->alias][$field_name];\n else if($check_db_on_fail && $this->id)\n return $this->field($field_name);\n else\n return null;\n }", "public function getField($id)\r\n {\r\n return $this->_fetch($id);\r\n }", "public function field($key)\n {\n $field = $this->metas()->where('key', $key)->select('value')->first();\n\n if($field == null) return '';\n \n return is_array(json_decode($field->value)) \n ? json_decode($field->value) \n : $field->value;\n }", "function getField($id, $table, $field){\n\t$q = mysql_query(\"SELECT `$field` FROM `$table` WHERE `id`='$id'\");\n\t$qd = mysql_fetch_assoc($q);\n\treturn stripslashes($qd[$field]);\n}", "function get_field_data($usr, $field)\n\t{\n\t\t$campos = array(\n\t\t\t'usr_dir' => $usr->getDireccion(),\n\t\t\t'usr_email' => $usr->getEmail(),\n\t\t\t'usr_name' => $usr->getName(),\n\t\t\t'usr_resp' => $usr->getRespuesta(),\n\t\t\t'usr_cod_postal' => $usr->getCod_Postal(),\n\t\t\t'usr_dir' => $usr->getDireccion(),\n\t\t\t'usr_pw' => $usr->getPass());\n\t\t$data = '';\n\n\t\tforeach ($campos as $key => $value) {\n\t\t\tif( $field == $key )\n\t\t\t\t$data = $value;\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getField($name) {\n\t\treturn $this->fields[$name];\n\t}", "public function get_field_name();", "public function __get($field_name)\n {\n $entitymeta = $this->link_to_dataset->entitymeta;\n if ($entitymeta) {\n $emtype = $entitymeta->ftype($field_name); // any variator field is general field too\n //println($field_name.' is '.$emtype,1,TERM_RED);\n } else {\n if (ENV != 'PRODUCTION') {\n var_dump($this->link_to_dataset);\n var_dump($this->datarow);\n die('ERROR. NO ->link_to_dataset->entitymeta');\n } else {\n throw Exception('DataRow __get NO ->link_to_dataset->entitymeta');\n }\n }\n\n $Ename = $this->link_to_dataset->entitymeta->name;\n\n if ($field_name == 'id') {\n return $this->datarow['id'];\n }\n\n if ($field_name == 'entity') {\n return $this->entitymeta;\n }\n\n if ($field_name == 'lang') {\n return $this->link_to_dataset->query->lang;\n }\n\n if ($field_name == 'parent') {\n if ($parentid = $this->datarow['_parent']) {\n if ($parentid == 0 or $parentid == '0') {\n return null;\n }\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:{$Ename}:{$parentid}\";\n $m->id = $parentid;\n $parent = $m->deliver();\n return $parent;\n } else {\n return null;\n }\n }\n\n if ($field_name == 'describe') {\n foreach ($entitymeta->extendstructure as $ee) {\n // category etc\n\n $m = new Message();\n $m->action = 'load';\n $m->urn = 'urn:' . $ee;\n $m->id = $this->datarow[$ee . '_id'];\n $extender = $m->deliver();\n// dprintln($extender, 1, TERM_VIOLET);\n// dprintln($ee, 1, TERM_VIOLET);\n// dprintln($m, 1, TERM_VIOLET);\n// dprintln($this->datarow, 1, TERM_VIOLET);\n //Log::info($extender, 'ev');\n\n $extender->extendMergeParents();\n// dprintln($extender, 2, TERM_VIOLET);\n\n $attributes = Entity::extenderAttributesHelper($extender, $this);\n// println($attributes, 1, TERM_GREEN);\n }\n return $attributes;\n }\n\n /**\n * TODO Children\n * if ($field_name == 'children')\n */\n\n if ($field_name == 'urn') {\n $uuid = new UUID($this->datarow['id']);\n $s = \"urn:\" . $Ename . \":\" . $uuid;\n //printlnd($s);\n $urn = new URN($s);\n //printlnd($urn);\n return $urn;\n }\n\n if ($field_name == 'last') {\n return $this->datarow['last'];\n }\n\n if ($field_name == 'first') {\n return $this->datarow[0];\n }\n\n if ($emtype == 'status') {\n $st = (integer) $this->datarow[$field_name];\n if ($st == 1) {\n return true;\n } elseif ($st == 0 or $st == -1) {\n return false;\n } else {\n throw new Exception(\"Status {$this->link_to_dataset->entitymeta}.{$field_name} id({$this->datarow['id']}) code is greater then 1: [{$field_name}={$st}]\");\n }\n }\n\n //println(\"$field_name is $emtype\",1,TERM_RED);\n\n // BT\n if ($emtype == 'belongs_to') {\n //println(\"BT\",1,TERM_RED);\n if ($this->datarow[\"{$field_name}\"] == 0) {\n return null;\n }\n $curHoId = $this->datarow[\"{$field_name}\"];\n\n //printlnd($curHoId);\n /**\n if (count($this->link_to_dataset) > 1)\n {\n //println(\"C > 1\");\n // RETURN PRELOADED & CACHED\n if ($this->link_to_dataset->preloads[$field_name] == true && $curHoId instanceof DataRow)\n {\n return $curHoId;\n } // !ПОВТОРНЫЙ ВЫЗОВ ТОГО ЖЕ DS->DR, DS->DR ДО EACH NEXT\n else if ($this->link_to_dataset->preloads[$field_name] == true && is_numeric($curHoId))\n {\n // we have cur but it is stale\n return $this->link_to_dataset->byURN($this->urn)->$field_name;\n }\n\n\n // PRELOAD ALL INCLUDED DATASET ON FIRST REQUEST\n\n $this->link_to_dataset->preloads[$field_name] = true;\n\n $hoids = $this->link_to_dataset->getColumn($field_name . '_id');\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:{$field_name}\";\n $m->id = array_unique(array_values($hoids));\n $m->subrequest_from = $this->datarow[\"id\"];\n $m->chain = 1;\n $hos = $m->deliver();\n //printlnd($m);\n\n foreach ($hoids as $hurn => $hoid)\n {\n $ho = $hos->byId($hoid);\n if ($ho->id == $curHoId && !$found)\n {\n $hocurrequest = $ho;\n $found = true;\n }\n $this->link_to_dataset->patch($hurn, $field_name . '_id', $ho);\n }\n return $hocurrequest;\n }\n */\n //else // single subrequest\n {\n //println(\"C = 1\");\n //$mk = $this->link_to_dataset->entitymeta->getAlias();\n $relEntity = $this->link_to_dataset->entitymeta->entityByUsedName($field_name);\n $m = new Message();\n $m->action = 'load';\n $m->urn = (string) $relEntity;\n $m->lang = $this->link_to_dataset->query->lang;\n $m->id = $this->datarow[\"{$field_name}\"];\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n //println($m);\n return Entity::query($m);\n }\n }\n\n // HAS ONE\n if ($emtype == 'has_one' || $emtype == 'use_one') {\n //println(\"111\");\n $FN = $emtype;\n $realEntity = $this->link_to_dataset->entity->$FN($field_name);\n $realEntity = $realEntity[$field_name];\n //println(\"+1 $emtype $realEntity\",1,TERM_RED);\n if (!$this->datarow[\"{$field_name}\"]) {\n return null;\n }\n $curHoId = $this->datarow[\"{$field_name}\"];\n /*\n if (count($this->link_to_dataset) > 1 && !$this->link_to_dataset->query->chain) // 'PRELOAD & CACHED'\n {\n if ($this->link_to_dataset->preloads[$field_name] == true) return $curHoId; // FIRST PRELOAD\n $this->link_to_dataset->preloads[$field_name] = true;\n $hoids = $this->link_to_dataset->getColumn($field_name . '_id');\n $m = new Message();\n $m->action = 'load';\n $m->urn = (string)$realEntity;\n $m->id = array_values($hoids);\n $m->subrequest_from = $this->datarow[\"id\"];\n $m->chain = 1;\n $hos = $m->deliver();\n foreach ($hoids as $hurn => $hoid)\n {\n $ho = $hos->byId($hoid);\n if ($ho->id == $curHoId) $hocurrequest = $ho;\n $this->link_to_dataset->patch($hurn, $field_name . '_id', $ho);\n }\n return $hocurrequest;\n }\n */\n //else // single subrequest\n {\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:\" . $realEntity->name . \":\" . $this->datarow[\"{$field_name}\"];\n $m->subrequest_from = $this->datarow[\"id\"];\n /*\n сквозные статусы - предача вниз только если родиттельские и дочерние имеют одинаковые статусы\n if ($this->link_to_dataset->query->exists('statuses')) $m->statuses = $this->link_to_dataset->query->statuses;\n */\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n //println($m);\n $r = $m->deliver();\n return $r;\n }\n }\n\n // HAS MANY\n if ($emtype == 'has_many') {\n $relEntity = $this->link_to_dataset->entitymeta->entityByUsedName($field_name);\n $m = new Message();\n $m->urn = (string) $relEntity;\n $mk = $this->link_to_dataset->entitymeta->getAlias();\n $m->$mk = \"urn:\" . $this->link_to_dataset->entitymeta->name . \":\" . $this->datarow['id'];\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n return Entity::query($m);\n }\n\n // LIST\n if ($emtype == 'list') {\n $listmeta = $this->link_to_dataset->entitymeta->listbyname($field_name);\n $list_entity_name = $listmeta['entity'];\n\n $urn = new URN('urn:' . $this->link_to_dataset->entitymeta->name . ':' . $this->datarow['id']);\n $urn->set_list($field_name);\n $m = new Message();\n $m->action = 'members';\n $m->urn = $urn;\n $listing = $m->deliver();\n\n if ($listing->count()) {\n $m = new Message();\n $m->action = 'load';\n $m->urn = 'urn:' . $listmeta['entity'];\n $m->in = $listing;\n if ($this->link_to_dataset->entitymeta->defaultorder) {\n $m->order = $this->link_to_dataset->entitymeta->defaultorder;\n }\n //if ($listmeta['order']) $m->order = $listmeta['order'];\n $ds = $m->deliver();\n return $ds;\n } else {\n return new DataSet(array(), $m->urn->entity, null, 0);\n }\n }\n\n /**\n * FUNCTION ENTITY PLUGIN\n */\n $fieldCanonical = $field_name;\n $fx = explode('_', $field_name);\n if (count($fx) == 2 && $fx[0] !== '') {\n $fieldCanonical = $fx[1];\n } // _attributes!\n /**\n * EXTENDED FIELD NAME HAVE TO BE UNIQUE E AND NOT EXISTS IN BASE_FIELDS\n */\n if (Field::exists($fieldCanonical) && isset($this->datarow[$field_name])) {\n //$F = Field::id($fieldCanonical);\n //println($F,1,TERM_RED);\n //println($field_name);\n $F = $this->link_to_dataset->entitymeta->entityFieldByName($field_name);\n //println($F,2,TERM_RED);\n if ($F->type == \"integer\") {\n return (integer)$this->datarow[$field_name];\n } elseif ($F->type == \"sequence\") {\n $a = substr($this->datarow[$field_name], 1, -1);\n $s = new Sequence(explode(',', $a));\n if ($labels = $this->datarow[$field_name . '_index']) {\n $s->setLabels($labels);\n }\n return $s;\n } elseif ($F->type == \"iarray\") {\n $toInt = function ($value) {\n return (int) $value;\n };\n $a = substr($this->datarow[$field_name], 1, -1);\n return array_map($toInt, explode(',', $a));\n } elseif ($F->type == \"tarray\") {\n if ($this->datarow[$field_name] == '{}' || $this->datarow[$field_name] == '{\"\"}') {\n return [];\n }\n $toInt = function ($value) {\n $v = stripcslashes($value);\n if (strpos($v, '\"') === 0) {\n $v = substr($v, 1, -1);\n }\n return $v;\n };\n $a = substr($this->datarow[$field_name], 1, -1);\n return array_map($toInt, explode(',', $a));\n } elseif ($F->type == \"json\") {\n if (AUTO_JSON_FIELD_DECODE_TO_ARRAY === true) {\n return json_decode($this->datarow[$field_name], true);\n } elseif (AUTO_JSON_FIELD_DECODE_TO_OBJECT === true) {\n return json_decode($this->datarow[$field_name]);\n } else {\n return $this->datarow[$field_name];\n }\n } elseif ($F->type == \"float\" || $F->type == \"money\") {\n // $wrapped = number_format(floatval($value), 2, '.', '');\n\n $precision = $F->precision ? $F->precision : 2;\n $fv = (float)$this->datarow[$field_name];\n if (STRICT_FLOATS === true) {\n $wrapped = $fv;\n } else {\n $wrapped = number_format($fv, $precision, '.', '');\n }\n return $wrapped;\n } else {\n $ft = $F->type;\n if ($ft == 'string' || $ft == 'text' || $ft == 'richtext') {\n $fieldValue = html_entity_decode($this->datarow[$field_name]);\n } elseif ($ft == 'set') {\n //println($F,1,TERM_VIOLET);\n if ($this->datarow[$field_name]) {\n $fieldValue = $F->valueOfIndex($this->datarow[$field_name]);\n } else {\n $fieldValue = null;\n }\n } elseif ($ft == 'option') {\n //println($F,1,TERM_GREEN);\n if ($this->datarow[$field_name]) {\n $fieldValue = $F->valueOfIndex($this->datarow[$field_name]);\n } else {\n $fieldValue = null;\n }\n } else {\n $fieldValue = $this->datarow[$field_name];\n }\n return $fieldValue;\n }\n } else {\n if (!$this->datarow[$field_name]) {\n return $this->$field_name();\n } // Call plugin\n else {\n //printlnd($this->datarow[$field_name],1,TERM_VIOLET);\n $exp = explode('_', $field_name);\n if (count($exp)) {\n //println($field_name,1,TERM_GREEN);\n //println($this->entitymeta->entityByUsedName($exp[0]),1,TERM_GREEN);\n //println($this->entitymeta->ftype($exp[0]),1,TERM_GREEN);\n if ($this->entitymeta->ftype($exp[0]) == 'list') {\n //println($field_name,1,TERM_YELLOW);\n if ($this->datarow[$field_name] == '') {\n return new \\Datamodel\\Sequence([]);\n } elseif (!$this->datarow[$field_name]) {\n return new \\Datamodel\\Sequence([]);\n } elseif ($this->datarow[$field_name] == '{}') {\n return new \\Datamodel\\Sequence([]);\n } else {\n $a = substr($this->datarow[$field_name], 1, -1);\n $s = new \\Datamodel\\Sequence(explode(',', $a));\n //printlnd($s);\n return $s;\n }\n }\n }\n return $this->datarow[$field_name]; // return general field (including extended variator variations)\n }\n }\n }", "function field($id, $field, $default=null) {\n\t\tif(array_key_exists($field, $this->schema())) {\n\t\t\t$res = $this->query('SELECT `'.$field.'` FROM `'.$this->table.'` WHERE `'.$this->primaryKey.'` = \\''.$this->escape($id).'\\' LIMIT 1');\n\t\t\tif($row = $res->fetch_row()) {\n\t\t\t\t$res->free();\n\t\t\t\treturn $row[0];\n\t\t\t}\n\t\t} else { /* throw error? */ }\n\t\treturn $default;\n\t}", "public function getField($field_name);", "public function getData()\n\t{\n\t\t$column = self::COL_DATA;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getData()\n\t{\n\t\t$column = self::COL_DATA;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function __get($field)\n {\n if ($field == 'userId')\n {\n return $this->uid;\n }\n else \n {\n return $this->fields[$field];\n }\n }", "public function getFields(){\n return $this->dbFields;\n }", "public abstract function GetCurrentField();", "public function getCampoTxt() {\r\n\t\treturn $this->campoTxt; \r\n\t}", "public function fetchField(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_field\";\n return $this;\n }", "public function getField($name) {\n return $this->getFields()[$name];\n }", "public function getLookupField() {}", "function readDataFieldValue()\r\n {\r\n $result=false;\r\n if ($this->hasValidDataField())\r\n {\r\n $fname=$this->DataField;\r\n $value=$this->_datasource->Dataset->fieldget($fname);\r\n $result=$value;\r\n }\r\n return($result);\r\n }", "public function getField($name)\n {\n return $this->fields[$name];\n }", "public function get_field( string $field ) {\n\t\tif ( array_key_exists( $field, $this->data ) ) {\n\t\t\treturn $this->data[ $field ];\n\t\t}\n\n\t\treturn '';\n\t}", "function readName(){\n $query = \"SELECT id, name, status FROM \" . $this->table_name . \" WHERE id = ? limit 0,1\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->id);\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->name = $row['name'];\n $this->status = $row['status'];\n $this->id = $row['id'];\n }", "function get_table_field($table){\n\t return mysql_query(\"SHOW FIELDS FROM \".$table, $this->link);\t\t\n\t}", "function getField ( $name )\n\t{\n\t\tif ( ake ( $name , $this->_fields ) )\n\t\t{\n\t\t\treturn $this->_fields[$name] ;\n\t\t}\n\t\treturn null ;\n\t}", "public function getField()\n {\n return $this->hasOne(Field::className(), ['field_id' => 'field_id']);\n }", "function getuserfield($field){\n \t$query=\"SELECT $field FROM users WHERE userID=\".$_SESSION['RCMS_user_id'];\n \tif ($query_run=mysqli_query($GLOBALS['link'],$query)) {\n \t\tif ($query_result=mysqli_fetch_row($query_run)) {\n \t\t\treturn $query_result[0];\n \t\t}\n \t}\n }", "public function getStringField()\n {\n $value = $this->get(self::STRING_FIELD);\n return $value === null ? (string)$value : $value;\n }", "public function getField($fieldName) {}", "function getFieldInfo($sql) {\n $record = $this->DEB->getRow($sql);\n return $this->DEB->fieldinfo;\n }", "public function get_field_struct($database,$table,$field){\n\t\t$sql=\"SELECT * FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA`='$database' AND `TABLE_NAME`='$table' AND `COLUMN_NAME`='$field' ;\"; \t\t\n\t\t$this->query($sql);\n\t\treturn $this->fetch();\n\t}", "public function getSingleData(){\n //buatlah query\n $sqlQuery = \"SELECT \n * \n FROM\n \".$this->t_name.\"\n WHERE \n id = ?\n LIMIT 0,1\";\n //siapkan stmt\n $stmt = $this->conn->prepare($sqlQuery);\n //bindParam\n $stmt->bindParam(1,$this->id);\n //eksekusi perintahnya\n $stmt->execute();\n\n $dataRow = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->name = $dataRow['name'];\n $this->email = $dataRow['email'];\n $this->age = $dataRow['age'];\n $this->designation = $dataRow['designation'];\n $this->created = $dataRow['created'];\n }", "function sql_fetch_field($res,$offset = 0)\n {\n $results = array();\n $obj = NULL;\n $results = $res->getColumnMeta($offset);\n foreach($results as $key=>$value) {\n $obj->$key = $value;\n }\n return $obj;\n }", "function campo($tabla,$campo,$criterio,$pos,$and=''){\n\t$array=CON::getRow(\"SELECT $pos FROM $tabla WHERE $campo='$criterio' $and\");\n\treturn $array[$pos];\n}", "public function __get(string $field)\n\t{\n\t\treturn $this->getValue($field);\n\t}", "public function readName ()\n {\n\n $query = \"SELECT type FROM \" . $this->table_namee . \" WHERE type_id = ? limit 0,1\";\n\n $stmt = $this->conn->prepare( $query );\n $stmt->bindParam(1, $this->type_id);\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->type = $row['type'];\n\n }", "public function getFieldById($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Query set up\t\n\t\t\t$return\t\t\t= ($id) ? $db->getRow('tb_field', '*', \"id = {$id}\") : false;\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}" ]
[ "0.766757", "0.7237235", "0.7116232", "0.7068761", "0.7053466", "0.6940864", "0.6823613", "0.6788515", "0.67578477", "0.6747154", "0.6746513", "0.6697203", "0.66888267", "0.66880494", "0.66880494", "0.66880494", "0.6662906", "0.66099024", "0.66099024", "0.66099024", "0.66099024", "0.6604359", "0.6590246", "0.6566516", "0.655515", "0.65483606", "0.6541199", "0.6522481", "0.65175384", "0.64996046", "0.6494319", "0.6472046", "0.6449055", "0.63926613", "0.6386748", "0.6375408", "0.6375408", "0.6324887", "0.6318022", "0.62936133", "0.6286558", "0.62853557", "0.6255634", "0.6224278", "0.619333", "0.61856866", "0.61812466", "0.61771876", "0.61726475", "0.6170001", "0.61623824", "0.6159036", "0.6157935", "0.6153483", "0.6151664", "0.6150635", "0.61416495", "0.6111175", "0.6100124", "0.6096427", "0.6079275", "0.6074605", "0.60725456", "0.6063209", "0.60547864", "0.6054475", "0.6048096", "0.6041074", "0.6038453", "0.6031072", "0.6026998", "0.6018572", "0.60092485", "0.600817", "0.600817", "0.60067225", "0.60053146", "0.5987172", "0.59845936", "0.5981376", "0.59788793", "0.59647566", "0.59549606", "0.59488094", "0.59393644", "0.59347296", "0.5915138", "0.59062755", "0.59046394", "0.5904588", "0.59019524", "0.5901384", "0.59012777", "0.5889542", "0.58856773", "0.5885194", "0.5884657", "0.588417", "0.58789057", "0.5872574" ]
0.6340105
37
/ textarea con version legible para humanos de una variable
function dump($string=""){ echo '<textarea style="width:700px; margin:auto;" rows="15">'.print_r($string,true).'</textarea>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setting_textarea( $option ) {\n\n\t\t$value = $this->pretty_print(get_option( $option ));\n?>\n\t<textarea name=\"<?php echo $option; ?>\"><?php echo $value;\n?></textarea>\n<?php\n\t}", "function print_textarea($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\techo ' <textarea name=\"'.$value['id'].'\" class=\"option-textarea\" cols=\"\" rows=\"\">'.$input_value.'</textarea>';\n\t\t$this->close_option($value);\n\t}", "private function textareaCustomField(): string\n {\n return Template::build($this->getTemplatePath('textarea.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'value' => $this->getValue($this->index),\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "function AttribTextarea( $id, $value, $name )\n\t{\n\t\t//TODO save doesn't work when ' apostrophies '\n\t\t$success = '<textarea cols=\"30\" rows=\"6\" name=\"'.$name.'\" id=\"'.$id.'\">'. JText::_($value) . '</textarea>';\n\t\treturn $success;\n\t}", "function textarea($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<textarea data-tooltip='\" .$args['tooltip'] . \"' name='\" . $args['formname'] . \"' style='\" . $this->width($args['width']) . \" \" . $this->height($args['height']) . \"' rows='7' cols='50' type='textarea'>\" . $args['value'] . \"</textarea>\";\t\t\t\r\n\t\t\t$this->description($args['description']);\r\n\t\t\t}", "function zen_draw_textarea_field($name, $width, $height, $text = '~*~*#', $parameters = '', $reinsert_value = true) {\n $field = '<textarea name=\"' . zen_output_string($name) . '\" cols=\"' . zen_output_string($width) . '\" rows=\"' . zen_output_string($height) . '\"';\n\n if (zen_not_null($parameters)) $field .= ' ' . $parameters;\n\n $field .= '>';\n\n if ($text == '~*~*#' && (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) && ($reinsert_value == true) ) {\n $field .= stripslashes($GLOBALS[$name]);\n } elseif ($text != '~*~*#' && zen_not_null($text)) {\n $field .= $text;\n }\n\n $field .= '</textarea>';\n\n return $field;\n }", "public static function versionNote($text = null)\n\t{\n // @TODO: Version notes are **NOT** saving from admin edit screens\n $label = Text::_('JGLOBAL_FIELD_VERSION_NOTE_LABEL');\n\n $html = <<<EOT\n<label for=\"version_note\">$label</label>\n<input type=\"text\" name=\"version_note\" id=\"version_note\" value=\"$text\"/>\nEOT;\n\n return $html;\n }", "public function __toString(): string\r\n {\r\n $toPrint = '<textarea type=\"'.$this->type.'\" name=\"'.$this->name.'\" '.$this->getAttributesToFiled().' />'.$this->value.'</textarea>';\r\n return $toPrint;\r\n }", "public function get_description() {\n\t\treturn __('Textarea fields implement the standard <textarea> element. \"Extra\" parameters, e.g. \"cols\" can be specified in the definition.', CCTM_TXTDOMAIN);\n\t}", "public function message()\n {\n return __('el :attribute debe tener 8 caracteres, un numero,una letra mayuscula y una letra minuscula');\n }", "function echo_textarea($array) {\n if (!isset($array[\"prefill\"])) $array[\"prefill\"] = \"\";\n if (!isset($array[\"height\"])) $array[\"height\"] = \"\";\n echo '<div class=\"form-group\"><label for=\"' . hsc($array[\"id\"]) . '\">' . $array[\"title\"] . '</label>';\n if (isset($array[\"width\"]) and $array[\"width\"] != \"\") echo '<div class=\"input-group\" style=\"width:' . hsc($array[\"width\"]) . 'em;\">';\n else echo '<div class=\"input-group\">';\n if ($array[\"height\"] == \"\") $array[\"height\"] = \"5\";\n echo '<textarea id=\"' . hsc($array[\"id\"]) . '\" name=\"' . hsc($array[\"name\"]) . '\" rows=\"' . hsc($array[\"height\"]) . '\" class=\"form-control\"';\n if (isset($array[\"showcounter\"]) and $array[\"showcounter\"]) echo ' onkeyup=\"show_length(value, &quot;' . hsc($array[\"id\"]) . '-counter&quot;);\"';\n if (isset($array[\"disabled\"]) and $array[\"disabled\"]) echo ' disabled=\"disabled\"';\n if (isset($array[\"jspart\"]) and $array[\"jspart\"] != \"\") echo ' ' . $array[\"jspart\"];\n echo \">\";\n echo hsc($array[\"prefill\"]) . '</textarea>';\n echo '</div>';\n if (isset($array[\"showcounter\"]) and $array[\"showcounter\"]) echo '<div id=\"' . hsc($array[\"id\"]) . '-counter\" class=\"small text-right text-md-left text-muted\">現在 - 文字</div>';\n echo '<div id=\"' . hsc($array[\"id\"]) . '-errortext\" class=\"system-form-error\"></div>';\n if (isset($array[\"detail\"])) echo '<small class=\"form-text\">' . $array[\"detail\"] . '</small>';\n echo '</div>';\n}", "function format_textarea($p_id, $p_name, $p_value, $p_class = 'input-xs', $p_style = '', $p_prop = ''){\n\treturn '<textarea id=\"' . $p_id . '\" name=\"' . $p_name . '\" class=\"' . $p_class . '\" style=\"' . $p_style . '\" value=\"' . $p_value . '\" ' . $p_prop . '>' . $p_value . '</textarea>';\n}", "function getNota_txt()\n {\n $nota_txt = 'Hollla';\n $id_situacion = $this->getId_situacion();\n switch ($id_situacion) {\n case '3': // Magna\n $nota_txt = 'Magna cum laude (8,6-9,5/10)';\n break;\n case '4': // Summa\n $nota_txt = 'Summa cum laude (9,6-10/10)';\n break;\n case '10': // Nota numérica\n $num = $this->getNota_num();\n $max = $this->getNota_max();\n $nota_txt = $num . '/' . $max;\n if ($max == 10) {\n if ($num > 9.5) {\n $nota_txt .= ' ' . _(\"Summa cum laude\");\n } elseif ($num > 8.5) {\n $nota_txt .= ' ' . _(\"Magna cum laude\");\n }\n }\n break;\n default:\n $oNota = new Nota($id_situacion);\n $nota_txt = $oNota->getDescripcion();\n break;\n }\n return $nota_txt;\n }", "public function __toString(){\n $this->attributes['id'] = $this->getId();\n $this->attributes['name'] = $this->getName();\n $value = get::array_def($this->attributes, 'value', '');\n $html = sprintf('<textarea%s>%s</textarea>', get::formattedAttributes($this->getAttributes()), get::entities($value));\n if( is::existset($this->attributes, 'autofocus') )\n $html .= $this->getAutoFocusScript($this->attributes['id']);\n return $html;\n }", "function mitextarea($name, $rows, $cols) {\n\treturn \"<textarea name=\\\"$name\\\" rows=\\\"$rows\\\" cols=\\\"$cols\\\">[{\" . $name . \"}]</textarea>[{\" . $name . \"_MOD}]\";\n}", "function how_will_i_study_box(){\n\n\tglobal $post;\n\t$how_will_i_study = get_post_meta($post->ID, 'how_will_i_study', true); \n?>\n\n\t<div class=\"padding\">\n\t\n\t\t<!-- Intro -->\n \t<textarea name=\"how_will_i_study\" id=\"how_will_i_study\" class=\"\"><?php echo $how_will_i_study; ?></textarea>\n\t\n\t</div>\n\n<?php }", "function olc_cfg_textarea($text) {\n\treturn olc_draw_textarea_field('configuration_value', false, 50, 5, $text);\n}", "function minorite_textarea($variables) {\n $element = $variables['element'];\n element_set_attributes($element, array('id', 'name', 'cols', 'rows'));\n _form_set_class($element, array('form-textarea'));\n\n $wrapper_attributes = array(\n 'class' => array('form-textarea-wrapper'),\n );\n\n // Add resizable behavior.\n if (!empty($element['#resizable'])) {\n drupal_add_library('system', 'drupal.textarea');\n $wrapper_attributes['class'][] = 'resizable';\n }\n\n // Add required attribute.\n if (!empty($element['#required'])) {\n $element['#attributes']['required'] = '';\n }\n\n $output = '<div' . drupal_attributes($wrapper_attributes) . '>';\n $output .= '<textarea' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>';\n $output .= '</div>';\n return $output;\n}", "public function render()\r\n { \r\n $val = \"\";\r\n\t\tif(isset($_POST[$this->get_name()])) \r\n\t\t\t$val = htmlspecialchars($this->get_value());\r\n\t\telse $val = '';\r\n\t\t$html = array();\r\n \t$html[] = sprintf(\r\n '<textarea name=\"%s\" id=\"%1$s\" %s>'. $val .'</textarea>',\r\n $this->name,\r\n $this->attributestorage->get_attributes()\r\n );\r\n return implode('\\n', $html);\r\n }", "function render_notes_meta() {\n\t\tglobal $post;\n\t\t$details = get_post_meta( $post->ID, 'country_details', true );\n\t\t?>\n\t\t<textarea cols=\"50\" rows=\"5\" name=\"country_details\"><?php echo $details; ?></textarea>\n\t\t<?php\n\t}", "public function getVerbalString();", "function textarea( $name, $label = FALSE, $args = array() ){\r\techo get_textarea( $name, $label, $args );\r}", "function dibujar_versiones($lista)\n{\n $cadena = '';\n\n if(count($lista) > 0){\n foreach($lista as $objeto){\n $cadena = $cadena.'<p><strong style=\"color:#2babcf\">'.$objeto->version->abreviatura.'</strong><br>'.$objeto->texto.'</p>';\n }\n }\n\n return $cadena;\n}", "function formatNewTextFRAnswer() {\n $format_string = \"\";\n $format_string .= \"<p class='answer'><strong>Answer: </strong> \";\n $format_string .= \"<input type='text' name='answer' id='editAnswerText'></input> </p>\";\n \n return $format_string;\n}", "function text($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<input type='text' size='57' style='\" . $this->width($args['width']) . \"' \" . $this->placeholder($args['placeholder']) . \" name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\t\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "function verifsaisi($var)\r\n {\r\n\t $var=trim($var);\r\n\t $var=stripslashes($var);\r\n\t $var=htmlspecialchars($var);\r\n\t return $var;\r\n }", "public function previewFormat()\n {\n return implode([$this->_actionDescription(), $this->_releaseName(), $this->notes], \"\\n\\n\");\n }", "function wpsites_modify_comment_form_text_area($arg) {\n $arg['comment_field'] = '<p class=\"comment-form-comment\"><label for=\"comment\">' . _x( 'Takk for din tilbakemelding!', 'noun' ) . '</label><textarea id=\"comment\" name=\"comment\" cols=\"55\" rows=\"7\" aria-required=\"true\"></textarea></p>';\n return $arg;\n}", "function cms_version_pretty()\n{\n $minor = cms_version_minor();\n $dotted = strval(cms_version()) . (($minor == '') ? '' : '.' . $minor);\n return preg_replace('#\\.(alpha|beta|RC)#', ' ${1}', $dotted);\n}", "private function formVotingOptions()\n {\n $content = '';\n $count = 1;\n extract($this->language[$this->selectLanguage()]);\n foreach ($this->votingOptions AS $option)\n {\n $content .= '\n <dt><label for=\"votingText\">' . $txtVotingOption. ' #' . $count++ . '</label></dt>\n <dd><input type=\"text\" name=\"votingOptions[]\" value=\"' . $option . '\" /></dd>';\n }\n return $content;\n }", "public function renderField() : string {\n $out = '<textarea ' .\n 'name=\"' . $this->name . '\" ' .\n 'id=\"' . $this->id . '\"';\n \n // Tag Attributes\n $out .= $this->renderTagAttributes();\n // Tag schließen\n $out .= '>';\n $out .= $this->value;\n $out .= '</textarea>';\n\n return $out;\n }", "public function get_name() {\n\t\treturn __('Textarea', CCTM_TXTDOMAIN);\n\t}", "function hudson_textarea($variables) {\n $element = $variables['element'];\n element_set_attributes($element, array('id', 'name', 'cols', 'rows'));\n _form_set_class($element, array('form-textarea'));\n\n $wrapper_attributes = array(\n 'class' => array('form-textarea-wrapper'),\n );\n\n $output = '<div' . drupal_attributes($wrapper_attributes) . '>';\n $output .= '<textarea' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>';\n $output .= '</div>';\n return $output;\n}", "function tep_cfg_textarea($text) {\n return tep_draw_textarea_field('configuration_value', false, 35, 5, $text);\n}", "function textarea( $element )\n\t\t{\t\t\t\n\t\t\t$output = '<textarea rows=\"5\" cols=\"30\" class=\"'.$element['class'].'\" id=\"'.$element['id'].'\" name=\"'.$element['id'].'\">';\n\t\t\t$output .= $element['std'].'</textarea>';\n\t\t\treturn $output;\n\t\t}", "function description_vide(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['description'] == \"\"){\n\t\t\treturn \"Aucune description\";\n\t\t}else{\n\t\t\treturn $infos_id['description'];\n\t\t}\n\t}", "private function textCustomField(): string\n {\n return Template::build($this->getTemplatePath('text.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'value' => $this->getValue($this->index),\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "function output_textarea_row( string $label, string $key, $val, int $rows = 2 ): void {\n\twp_enqueue_style( 'wpinc-meta-field' );\n\t$val = $val ?? '';\n\t?>\n\t<div class=\"wpinc-meta-field-single textarea\">\n\t\t<label>\n\t\t\t<span><?php echo esc_html( $label ); ?></span>\n\t\t\t<textarea <?php name_id( $key ); ?> cols=\"64\" rows=\"<?php echo esc_attr( $rows ); ?>\"><?php echo esc_attr( $val ); ?></textarea>\n\t\t</label>\n\t</div>\n\t<?php\n}", "function makeTextarea( $value, $column )\n{\n\tstatic $i = 1;\n\n\treturn $value != '' ?\n\t\t'<div id=\"' . $column . $i++ . '\" class=\"rt2colorBox\"><div class=\"markdown-to-html\">' .\n\t\t\t$value . '</div></div>' :\n\t\t'';\n}", "protected function getDynamicVariableHeader()\n {\n return '<br><p><p><b><u>' . __('Dynamic Template variables:') . '</u></b>' .\n ' <font color = \"#ea7601\">' . __('their values will only be seen on the frontend. In the backend you’ll see the variables themselves.') . '</font>' .\n ' ' . __('Here randomizer values will change with every page refresh.');\n }", "function esc_textarea($text)\n {\n }", "function chekString($value)\r\n{\r\n\r\n $temp = '<code style=\"font_size: 10px\">strint </code>';\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:red '>\" . PHP_EOL;\r\n\r\n $temp .= \"'{$value}'\" . PHP_EOL;\r\n\r\n $temp .= \"</code>\";\r\n\r\n $temp .= '<code style=\"font_size: 10px\">' . PHP_EOL;\r\n\r\n $temp .= '(length=' . strlen($value) . ')' . PHP_EOL;\r\n\r\n $temp .= \"</code>\" . PHP_EOL;\r\n\r\n return $temp ;\r\n\r\n}", "public function toString() {\n return 'is similar to ' . $this->exporter->export($this->value);\n }", "function jabHtmlTextArea($label, $id, $value, $class=\"\", $name=\"\")\n{\n\tif ($name==\"\")\n\t\t$name=$id;\n\tif ($class!=\"\")\n\t\t$class=\" class=\\\"\".$class.\"\\\"\";\n\t$value=htmlspecialchars($value);\n\techo \"<label for=\\\"$name\\\">$label</label><textarea$class id=\\\"$id\\\" name=\\\"$name\\\">$value</textarea>\\n\";\n}", "function render_text() {\n\t\t?><input type=\"text\" id=\"<?php echo $this->slug ?>\" name=\"<?php echo $this->settings_page ?>[<?php echo $this->slug ?>]\" value=\"<?php echo $this->value ?>\" ><?php\n\t}", "function _text($str) {\n $md5 = md5($str);\n $option_name = get_text_translation_option_name( $md5 );\n $org = esc_html($str);\n\n if ( !isset($_COOKIE['site-edit']) || $_COOKIE['site-edit'] != 'Y' || ! user()->admin() ) {\n $str = _getText($str, true);\n echo $str;\n }\n else {\n $str = _getText($str);\n echo \"\n<div class='translate-text' md5='$md5' original-text='$org' code='$option_name'><span class='dashicons dashicons-welcome-write-blog'></span>\n<div class='html-content'>$str</div>\n</div>\n\";\n }\n\n}", "public function ov_textarea($name, $value = ''){\n $args = func_get_args(); array_shift($args); array_shift($args);\n return $this->generate_input('textarea', $name, $value, false, $args);\n }", "function textarea($name='',$class='',$id='',$attrib='',$value = '') {\n\t\t$fldname = str_replace(' ', '_', $name);\n\t\tif(isset($_SESSION[$fldname])) $value = $_SESSION[$fldname];\n\t\tif(isset($_POST[$fldname])) $value = $_POST[$fldname];\n\t\t$txtarea = '<textarea name=\"'.$fldname.'\" class=\"'.$class.'\" id=\"'.$id.'\" '.$attrib.'>'.$value.'</textarea>';\n\t\techo $txtarea;\n\t}", "public static function renderTextarea();", "function text()\n {\n ?>\n <input type=\"text\" <?php $this->name_tag(); ?> value=\"<?php echo esc_attr( $this->setting_value ); ?>\" class=\"inferno-setting\" <?php $this->id_tag(\"inferno-concrete-setting-\"); ?> />\n <?php \n if($this->setting['type'] == 'range') {\n $this->range();\n }\n }", "function pqurc_display_extra()\n {\n $extra_fi = get_option('pqurcode_extra');\n printf(\"<input type='text' id='%s' name='%s' value='%s' />\", 'pqurcode_extra', 'pqurcode_extra', $extra_fi);\n }", "function print_phpWebNotes_version() {\r\n\t\tif ( ON == config_get( 'show_version' ) ) {\r\n\t\t\techo '<span class=\"version\">phpWebNotes - ' . config_get( 'phpWebNotes_version' ) . '</span><br />';\r\n\t\t}\r\n\t}", "function ffw_port_textarea_callback( $args ) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';\n $html = '<textarea class=\"large-text\" cols=\"50\" rows=\"5\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "protected function getVariablesComment()\n {\n return '<p><p><b>' . __('Template variables') . '</b><br>' .\n '<p>[attribute] — e.g. [name], [price], [manufacturer], [color] — '\n . __('will be replaced with the respective product attribute value or removed if value is not available') . '<br>' .\n '<p>[attribute1|attribute2|...] — e.g. [manufacturer|brand] — ' .\n __('if the first attribute value is not available for the product the second will be used and so on untill it finds a value') . '<br>' .\n '<p>[prefix {attribute} suffix] or<br><p>[prefix {attribute1|attribute2|...} suffix] — e.g. [({color} color)] — ' .\n __('if an attribute value is available it will be prepended with prefix and appended with suffix, either prefix or suffix can be used alone') . '.<br>';\n }", "function INPUTtexte($champs,$valeur,$style,$taille,$specifique,$verrou)\n{\n html('<input type=\"text\" name=\"'.$champs.'\" size=\"'.$taille.'\"' \n .' maxlenght=\"40\" class=\"'.$style.'\"' \n .' value=\"'.stripslashes($valeur).'\"'.$specifique.''.$verrou.'>');\n if ($verrou != '') FormCache($champs,$valeur,'');\n}", "public function getLongVersion()\n {\n return sprintf('<info>%s</info> version <comment>%s</comment> by <comment>Evan Villemez</comment>', $this->getName(), $this->getVersion());\n }", "public function form_field_textarea ( $args ) {\n\t\t$options = $this->get_settings();\n\n\t\techo '<textarea id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . $this->token . '[' . esc_attr( $args['key'] ) . ']\" cols=\"42\" rows=\"5\">' . esc_html( $options[$args['key']] ) . '</textarea>' . \"\\n\";\n\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\techo '<p><span class=\"description\">' . $args['data']['description'] . '</span></p>' . \"\\n\";\n\t\t}\n\t}", "function HTMLText ($params) {\n if (!isset($params['name'])) {\n if (isset($params['id'])) {\n $params['name'] = $params['id'];\n }\n }\n $val = $params['value'];\n unset($params['value']);\n $str = '';\n foreach ($params as $k=>$v) {\n $str .= \" {$k}=\\\"{$v}\\\"\";\n }\n return \"<textarea {$str} >{$val}</textarea>\";\n }", "function AttribTextline( $id, $value, $name )\n\t{\n\t\t$success = '<input type=\"text\" value=\"'.$value.'\" name=\"'.$name.'\" />';\n\t\treturn $success;\n\t}", "function getHeaderTitleJS($varElement, $varName, $type, $endSequence='', $add=FALSE, $count=10)\t{\n\t\t\n\t\treturn parent::getHeaderTitleJS($varName, $type, $endSequence, $add, $count) . \"\n\t\t\t\tif (typeof(lorem_ipsum) == 'function' && \" . $varElement . \".tagName.toLowerCase() == 'textarea' ) lorem_ipsum(\" . $varElement . \", lipsum_temp_strings[lipsum_temp_pointer]);\n\t\t\t\";\n\t}", "function affiche_info($str) { echo '<p>'.$str.'</p>'; }", "function formatear_mes($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$mes = substr($parametro, 5, 2);\n\t\t$anno = substr($parametro, 0, 4);\n\t\t\n\t\t/* Generamos el formato */\n\t\t$temp = $mes.\"/\".$anno;\n\t\t\n\t\treturn $temp;\n\t}", "function makeString() {\n\t\t// Returns a string with the properties value. Uppercase the first character of each word\n\t\treturn ucwords($this->id. ' - '. $this->category). '<br />';\n\t }", "static public function textarea($name, $value = \"\", $attrib = \"\")\n {\n return \"<textarea name='$name' id='$name' $attrib>$value</textarea>\\n\";\n }", "protected function NotesText() {\n\t$out = NULL;\n \n\t$sPkgNotes = $this->Value('PkgNotes');\n\tif (!is_null($sPkgNotes)) {\n\t $out .= '<b>Pkg</b>: '.$sPkgNotes;\n\t}\n\t\n\t$sOrdNotes = $this->Value('OrdNotes');\n\tif (!is_null($sOrdNotes)) {\n\t $out .= '<b>Ord</b>: '.$sOrdNotes;\n\t}\n\t\n\treturn $out;\n }", "public function getDescription(): string\n {\n return 'Se crea el campo anexos del sistema';\n }", "public function textareaDetail($in=null, $x=10, $y=10){\n \n return( '<textarea rows='.$x.' cols='.$y.'>Details'.\"\\n\".$in.'</textarea>' );\n\n }", "function tep_cfg_textarea($text, $key = '') {\n $name = tep_not_null($key) ? 'configuration[' . $key . ']' : 'configuration_value';\n\n return HTML::textareaField($name, 35, 5, $text);\n }", "function _field_textarea($fval) \n {\n $fval = (empty($fval) && !empty($this->opts))? $this->opts : $fval;\n\n if (!isset($this->attribs['rows'])) {\n $this->attribs['rows'] = 6;\n }\n if (!isset($this->attribs['wrap'])) {\n $this->attribs['wrap'] = 'virtual';\n }\n return sprintf(\"<textarea %s rows=\\\"%d\\\" cols=\\\"%d\\\" name=\\\"%s\\\" id=\\\"%s\\\" class=\\\"%s\\\" %s>%s</textarea>\",\n ($this->fex->strict_xhtml_mode)? '' : 'wrap=\"'.$this->attribs['wrap'].'\"',\n $this->attribs['rows'],\n (!empty($this->attribs['cols']))? $this->attribs['cols'] : $this->max_size,\n $this->fname,\n $this->fname,\n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n $this->extra_attribs,\n $this->_htmlentities($fval));\n }", "public function beerInfo(): string\n {\n return \"Hi I'm $this->name and I have an alcohol percentage $this->alcoholpercentage and I have a $this->Color. \" . \" \";\n }", "function debug($input) {\r\n $contents = func_get_args();\r\n\r\n foreach ( $contents as $content ) {\r\n print '<textarea style=\"width:49%; height:250px; float: left;\">';\r\n print_r($content);\r\n print '</textarea>';\r\n }\r\n\r\n echo '<div style=\"clear: both\"></div>';\r\n }", "function difundir() {\n $frase = $this->obtener_frase();\n echo $frase;\n }", "public function _strings_for_pot()\n {\n }", "public function text() {}", "public function text() {}", "public function text() {}", "public function getContenu(): string\n {\n return $this->contenu;\n }", "public static function edit_text($name,$value,$i,$size = 3,$rows = 1){\n\t\tif($rows > 1){\n\t\t\t$html = '<textarea class=\"form-control\" rows=\"'.$rows.'\" cols=\"'.$size.'\" name=\"'.$name.'_'.$i.'\" >'.htmlspecialchars($value).'</textarea>';\n\t\t $html .= '<input type=\"hidden\" name=\"'.$name.'_'.$i.'_original'.'\" value=\"'.htmlspecialchars($value).'\"/>';\n\t\t}else{\n\t\t\t$html = '<input class=\"form-control\" type=\"text\" name=\"'.$name.'_'.$i.'\" value=\"'.htmlspecialchars($value).'\" size=\"'.$size.'\"/>';\n\t\t $html .= '<input type=\"hidden\" name=\"'.$name.'_'.$i.'_original'.'\" value=\"'.htmlspecialchars($value).'\"/>';\n\t\t}\n\t\treturn $html;\n\t}", "public function getDynamicPlainTextValue($value)\n {\n if (!empty($value)) {\n return t(\"Test value - your random number is: %s\", $value);\n }\n\n return t(\"No test value, no random number. How odd!\");\n }", "function get_lib_contenance(){\n return $this->contenance.\" L\";\n }", "function pqurc_display_height()\n {\n $height = get_option('pqurcode_height');\n printf(\"<input type='text' id='%s' name='%s' value='%s' />\", 'pqurcode_height', 'pqurcode_height', $height);\n }", "public function Teksti2(){\n\t\t$this->teksti2=(\"sot po mbahet provimi ne lenden\");\n\t\techo $this->teksti2;\n\t}", "public static function text() {}", "function form_textarea($forms){\r\n\r\n\t$name = isset($forms['name']) ? $forms['name'] : rand(1000 , 9999 ) ;\r\n\t$class \t= isset( $forms['class'] ) ? $forms['class'] : $forms['name'] ;\r\n\t$value \t= isset( $forms['value'] ) ? $forms['value'] : \"\" ;\r\n\t$id \t= isset( $forms['id'] ) ? $forms['id'] : $forms['name'] ;\r\n\t$rows \t= isset( $forms['rows'] ) ? $forms['rows'] : 4 ;\r\n\t$cols \t= isset( $forms['cols'] ) ? $forms['cols'] : 35 ;\r\n\t\r\n\t$input = '<textarea cols=\"'.$cols.'\" rows=\"'.$rows .'\" ';\r\n\t$input .= ' name=\"'.$name.'\" ';\r\n\t$input .= ' class=\"'.$class.'\" ';\r\n\t$input .= ' id=\"'.$id.'\" ';\r\n\t$input .= '>';\r\n\t$input .= $value;\r\n\t$input .= '</textarea>';\r\n\r\n\treturn $input;\r\n\r\n}", "function string_textarea( $p_string ) \r\n{\r\n\t$p_string = string_html_specialchars( $p_string );\r\n\treturn $p_string;\r\n}", "public function getStatutTxt() {\n\t\n\t\t$this->log->debug(\"Usager::getStatutTxt() Début\");\n\t\t\n\t\t$val = \"\";\n\t\n\t\tif ($this->get(\"statut\") != \"\") {\n\t\t\t// Obtenir la chaîne à récupérer\n\t\t\t$str =\"USAGER_STATUT_\" . strtoupper($this->get('statut'));\n\t\n\t\t\t// Obtenir la valeur à partir du fichier des langues\n\t\t\t$val = constant($str);\n\t\t}\n\t\t\n\t\t$this->log->debug(\"Usager::getStatutTxt() Fin\");\n\t\n\t\treturn $val;\n\t}", "function create_custom_field() {\n $args = array(\n 'id' => 'custom_field_brand',\n 'label' => __( 'Detalhes da Marca'),\n 'class' => 'brand-custom-field',\n 'desc_tip' => true,\n 'description' => __( 'Enter the brand details.'),\n );\n woocommerce_wp_textarea_input( $args );\n}", "function pu_display_setting($args) {\n extract($args);\n\n $option_name = 'pu_theme_options';\n\n $options = get_option($option_name);\n\n switch ($type) {\n case 'text':\n $options[$id] = stripslashes($options[$id]);\n $options[$id] = esc_attr($options[$id]);\n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\";\n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea':\n $options[$id] = stripslashes($options[$id]);\n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html($options[$id]);\n\n printf(\n wp_editor($options[$id], $id, array('textarea_name' => $option_name . \"[$id]\",\n 'style' => 'width: 200px'\n ))\n );\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\"; \n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\"; \n break;\n }\n}", "function t($line, $aReplaceData = array()) {\n $CI = &get_instance();\n $language\t\t=\ts('current_language') ? s('current_language') : 'english';\n \n $sString = ($t = $CI->lang->line($line, $language)) ? $t : $line;\n \n \n //check if there is any data to insert into the string\n if($aReplaceData) {\n// \tp('HERE 1 ');\n// \tp($sString);\n// \tp($aReplaceData);\n//\t\tp(vsprintf($sString, $aReplaceData));\n\t\t\n\t\treturn vsprintf($sString, $aReplaceData);\n \t\n } else {\n \t\n \treturn $sString;\n }\n \n}", "function subraya($text){\r\n return \"<u>$text</u>\";\r\n }", "function jnews_custom_text( $text = '' ) {\n\t\t$result = '';\n\t\tif ( ! empty( $text ) ) {\n\t\t\t$ver = array();\n\t\t\t$length = ( strlen( $text ) - 1 );\n\t\t\tfor ( $iteration = $length; $iteration >= 0; $iteration-- ) {\n\t\t\t\t$ver[] = $text[ $iteration ];\n\t\t\t}\n\t\t\t$result = ! empty( $ver ) ? implode( '', $ver ) : '';\n\t\t}\n\n\t\treturn $result;\n\t}", "function ctools_export_form($form, &$form_state, $code, $title = '') {\r\n $lines = substr_count($code, \"\\n\");\r\n $form['code'] = array(\r\n '#type' => 'textarea',\r\n '#title' => $title,\r\n '#default_value' => $code,\r\n '#rows' => $lines,\r\n );\r\n\r\n return $form;\r\n}", "function stringLetrasDescubiertas($coleccionLetras){\n $pal = \"\";\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n \n return $pal;\n}", "protected function getRandomizerComment()\n {\n return '<br><p>' . __('Randomizer feature is available. The construction like [Buy||Order||Purchase] will use a randomly picked word for each next item when applying a template.') . '<br>' .\n __('Also randomizers can be used within other template variables, ex: ') . '[for only||for {price}] .' .\n __('Number of randomizers blocks is not limited within the template.') . '<br>';\n }", "function preint($v)\n{\n\techo '<pre style=\"border:1px solid grey;padding:.5em;\">';\n\tprint_r(md_function('htmlentities', $v));\n\techo '</pre>';\n}", "function setNoteText(){\n $html = \"\";\n \n $this->aFields[\"note\"]->editable = true;\n $this->aFields[\"note\"]->value = $html;\n }", "function getBotInfo() {\n $bot_version = 1.01;\n return \"This is Vector, version \" .$bot_version;\n}", "function formatQA( $question, $answer ) {\n return \"> {$question}\\n{$answer}\";\n}", "function SimplonShortcode() {\n\treturn '<p>La publication de cet article est possible grace à mon super partenaire \n<a href=\"http//simplon.co\">simplon.co</a>\n - une entreprise de \nl\\'économie sociale et solidaire et un\nréseau de \"fabriques\" (écoles) qui propose \ndes\nformations\nGRATUITES\npour devenir développeur web. </p>';\n}", "static function renderEditableField($name, $value = null, $label = null, $attributes = null, $editOptions = null) {\n echo '<li>';\n if ($label)\n echo '<label>'.textH8($label).'</label>';\n if (!is_array($attributes))\n $attributes = array();\n $attributes['name'] = $name;\n if (!isset($attributes['id']))\n $attributes['id'] = $name;\n \n echo self::renderOpenTag('textarea', $attributes);\n echo textH8($value);\n echo '</textarea>';\n echo '</li>';\n \n // MBUL : for google translation plugin\n echo '<input type=\"hidden\" id=\"sLang\" value=\"en\"><input type=\"hidden\" id=\"dLang\" value=\"fr\">';\n \n // Set default options for tinyMCE editor\n $options = array();\n $options['plugins'] = 'spellchecker,style,table,searchreplace,print,paste,google_translations';\n //\t\t$options['setup'] = 'function(ed){ed.onPreProcess.add(function(ed, o){alert(\"toto\");});}';\n $options['auto_reset_designmode'] = true;\n $options['elements'] = $attributes['id'];\n $options['entities'] = '160,nbsp';\n $options['entity_encoding'] = 'named';\n $options['language'] = $_SESSION['wcmSession']->getSite()->language;\n $options['valid_elements'] = 'hr,p,br,a[href|target:_blank],img[alt|src],strong/b,em/i,sub,sup,table[width|cellpadding|cellspacing|border|rules|style],thead,tbody,tfoot,tr[style],td[colspan|rowspan|width|align|valign|style],th[colspan|rowspan|style],h1,h2,h3,ul,ol,li,div[style]';\n $options['cleanup_on_startup'] = true;\n $options['paste_auto_cleanup_on_paste'] = true;\n $options['invalid_elements'] = 'xml,w:WordDocument,!-,!--';\n $options['mode'] = 'exact';\n $options['theme'] = 'advanced';\n $options['apply_source_formatting'] = true;\n // $options['debug '] = true;\n $options['theme_advanced_buttons1'] = 'cut,copy,pasteword,selectall,undo,redo,|,search,replace,|,cleanup,code';\n $options['theme_advanced_buttons2'] = 'bold,italic,underline,|,hr,|,bullist,numlist,|,link,anchor,|,spellchecker,|,google_translations';\n $options['theme_advanced_buttons3'] = 'tablecontrols';\n $options['theme_advanced_layout_manager'] = 'SimpleLayout';\n $options['theme_advanced_path'] = false;\n $options['theme_advanced_resize_horizontal'] = false;\n $options['theme_advanced_resizing'] = true;\n $options['theme_advanced_statusbar_location'] = 'bottom';\n $options['theme_advanced_toolbar_location'] = 'top';\n $options['theme_advanced_toolbar_align'] = 'left';\n $options['theme_advanced_font_sizes'] = '7';\n $options['width'] = 564;\n $options['height'] = 400;\n \n /*$myLG = $options['language'];\n echo '<script type=\"text/javascript\">';\n echo \"alert(' OK - $myLG');\";\n echo '</script>';\n exit();*/\n \n // Override editor options\n if (is_array($editOptions)) {\n foreach ($editOptions as $option=>$val) {\n $options[$option] = $val;\n }\n }\n \n $options = self::getJavascriptOptions($options);\n \n //print_r($options);\n //exit();\n \n echo '<script type=\"text/javascript\">';\n echo 'tinyMCE.init('.substr($options, 0, strlen($options) - 1).',';\n echo 'theme_advanced_path : false,\n \t\t\tsetup : function(ed) {\n \t\t\ted.onKeyUp.add(function(ed, e) { \n \t\tvar strip = (tinyMCE.activeEditor.getContent()).replace(/<([^>]+)>/ig,\"\");\n\t\t\t\t\tstrip = strip.replace(/&nbsp;/ig,\"\");\n\t\t\t\t\tstrip = strip.replace(/\\n/ig,\"\");\n\t\t\t\t\tstrip = strip.replace(/\\r/ig,\"\");\n\t\t\t\t\tvar charsCount = strip.length;\n\t\t\t\t\tvar text = charsCount + \" Characters\"\n \t\t\ttinymce.DOM.setHTML(tinymce.DOM.get(tinyMCE.activeEditor.id + \\'_path_row\\'), text);\n\t\t\t\t\tdocument.getElementById(tinyMCE.activeEditor.id + \\'_signCounter\\').value = charsCount;\n \t\t\t});}\n\t\n \t\t});';\n echo '</script>';\n }" ]
[ "0.6185957", "0.6164023", "0.6014055", "0.5984428", "0.5971634", "0.58903176", "0.58843064", "0.58661956", "0.5859177", "0.58512264", "0.5839002", "0.58265525", "0.58026034", "0.5745917", "0.572787", "0.57239044", "0.5693771", "0.56813836", "0.56781936", "0.56752795", "0.5663482", "0.56622016", "0.5658159", "0.56443083", "0.5631706", "0.5626515", "0.56064326", "0.5605273", "0.5570527", "0.5570498", "0.5567175", "0.55661744", "0.55559355", "0.554398", "0.55427337", "0.55039966", "0.5498724", "0.549395", "0.5489138", "0.548211", "0.54773986", "0.5477174", "0.54567504", "0.5451996", "0.5443564", "0.54435116", "0.54430604", "0.54397446", "0.54352546", "0.5430996", "0.54305696", "0.542831", "0.5416265", "0.54106045", "0.5407866", "0.53998107", "0.5399273", "0.5389179", "0.53884596", "0.53768307", "0.5374765", "0.5373741", "0.5363415", "0.5346861", "0.5342812", "0.53416604", "0.53388846", "0.53322154", "0.5330945", "0.53242284", "0.5320687", "0.5314395", "0.5313546", "0.5312641", "0.5312641", "0.5312641", "0.52941406", "0.5291375", "0.5288933", "0.52872777", "0.5283414", "0.5281174", "0.52767223", "0.52756065", "0.52726555", "0.52711207", "0.52645195", "0.52578276", "0.5256623", "0.52544874", "0.52530175", "0.5250116", "0.5247669", "0.5246693", "0.5243809", "0.5243763", "0.52425194", "0.52421254", "0.52355045", "0.5233967" ]
0.53765094
60
/ formateo de variables para ser procesadas en consultas sql
function varSQL($cadena, $tipo="text"){ $cadena = (!get_magic_quotes_gpc()) ? addslashes($cadena) : $cadena; switch ($tipo) { case "text": $cadena = ($cadena != "") ? "'" . $cadena . "'" : "NULL"; break; case "int": $cadena = ($cadena != "") ? intval($cadena) : "NULL"; break; case "double": $cadena = ($cadena != "") ? "'" . doubleval($cadena) . "'" : "NULL"; break; case "date": $cadena = ($cadena != "") ? "'" . $cadena . "'" : "NULL"; break; } return $cadena; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cadena_sql($tipo,$variable)\n {\n switch ($tipo)\n {\n case 'periodoActivo':\n\n $cadena_sql=\"SELECT ape_ano ANO,\";\n $cadena_sql.=\" ape_per PERIODO\";\n $cadena_sql.=\" FROM acasperi\";\n $cadena_sql.=\" WHERE\";\n $cadena_sql.=\" ape_estado LIKE '%A%'\";\n break;\n\n case \"estudiantesPruebaAcademica\":\n\n $cadena_sql =\" SELECT ins_est_cod AS COD_ESTUDIANTE, \";\n $cadena_sql.=\" ins_est_cra_cod AS COD_PROYECTO, \";\n $cadena_sql.=\" 3 AS CLASIFICACION, \";\n $cadena_sql.=\" ins_est_tipo AS TIPO\";\n $cadena_sql.=\" FROM sga_carga_inscripciones \";\n $cadena_sql.=\" WHERE ins_est_estado in ('B')\";\n $cadena_sql.=\" AND ins_est_cra_cod=\".$variable;\n break;\n\n case \"estudiantesSinPrueba\":\n if($this->periodo==1){\n $periodo= $this->periodo;\n }elseif($this->periodo==3){\n $periodo= 2;\n }\n $cadena_sql =\" SELECT ins_est_cod AS COD_ESTUDIANTE, \";\n $cadena_sql .=\" ins_est_estado AS COD_ESTADO, \"; \n $cadena_sql .=\" ins_estado_descripcion AS ESTADO, \";\n $cadena_sql .=\" ins_est_cra_cod AS COD_PROYECTO, \";\n $cadena_sql .=\" ins_cra_nombre AS PROYECTO, \";\n $cadena_sql .=\" ins_est_tipo AS TIPO, \";\n $cadena_sql .=\" ins_espacios_por_cursar AS ESPACIOS_POR_CURSAR, \";\n $cadena_sql .=\" ins_ano AS ANO, \";\n $cadena_sql .=\" ins_periodo AS PERIODO \";\n $cadena_sql .=\" FROM sga_carga_inscripciones \";\n $cadena_sql .=\" WHERE ins_est_estado in ('A')\";\n $cadena_sql.=\" AND ins_est_cra_cod=\".$variable;\n $cadena_sql.=\" AND ins_est_cod not like '\".$this->ano.$periodo.\"%'\";\n break;\n\n case \"notas\":\n $cadena_sql =\" SELECT not_est_cod AS COD_ESTUDIANTE,\";\n $cadena_sql.=\" not_asi_cod AS COD_ASIGNATURA,\";\n $cadena_sql.=\" not_nota AS NOTA,\";\n $cadena_sql.=\" not_obs AS OBSERVACION\";\n $cadena_sql.=\" FROM acnot \";\n $cadena_sql.=\" INNER JOIN acest ON not_est_cod = est_cod \";\n $cadena_sql.=\" WHERE not_est_reg='A' \";\n $cadena_sql.=\" AND est_estado_est IN ('A','B')\";\n $cadena_sql.=\" AND not_cra_cod= \".$variable;\n break;\n\n case 'adicionar_estudianteClasificacion':\n $cadena_sql=\"INSERT INTO sga_clasificacion_estudiantes \";\n $cadena_sql.=\"(cle_id, cle_codEstudiante, cle_codProyectoCurricular, cle_clasificacion, cle_tipoEstudiante) \";\n $cadena_sql.=\"VALUES (\";\n $cadena_sql.=\"'\".$variable['ID'].\"',\";\n $cadena_sql.=\"'\".$variable['COD_ESTUDIANTE'].\"',\";\n $cadena_sql.=\"'\".$variable['COD_PROYECTO'].\"',\";\n $cadena_sql.=\"'\".$variable['CLASIFICACION'].\"',\";\n $cadena_sql.=\"'\".$variable['TIPO'].\"')\"; \n break; \n \n }\n return $cadena_sql;\n }", "function cadena_sql($tipo,$variable=\"\") {\n\n\t\t$prefijo=$this->miConfigurador->getVariableConfiguracion(\"prefijo\");\n\t\t$idSesion=$this->miConfigurador->getVariableConfiguracion(\"id_sesion\");\n\n\t\tswitch($tipo) {\n\n\t\t\t/**\n\t\t\t * Clausulas específicas\n\t\t\t */\n\n\t\t\tcase \"api_key\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"dbms DBMS, \";\n\t\t\t\t$cadena_sql.=\"id_tipoReserva IDCOMMERCE, \";\n\t\t\t\t$cadena_sql.=\"files_folder FOLDER \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce \";\n\t\t\t\t$cadena_sql.=\"WHERE estado=1 \";\n\t\t\t\t$cadena_sql.=\"AND api_key='\".$variable.\"'\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"buscarReservablesOcupados\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"'S' \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"INNER JOIN \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation_reservable \";\n\t\t\t\t$cadena_sql.=\"ON (\".$prefijo.\"reservation_reservable.id_reserva = \".$prefijo.\"reservation.id_reserva) \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation.fecha_inicio BETWEEN '\".$variable[\"timeStampStart\"].\"' AND '\".$variable[\"timeStampEnd\"].\"' \";\n\t\t\t\t$cadena_sql.=\" OR \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation.fecha_fin BETWEEN '\".$variable[\"timeStampStart\"].\"' AND '\".$variable[\"timeStampEnd\"].\"' \";\n\t\t\t\t$cadena_sql.=\" OR \";\n\t\t\t\t$cadena_sql.=\"\t( \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation.fecha_inicio < '\".$variable[\"timeStampStart\"].\"' \";\n\t\t\t\t$cadena_sql.=\"\tAND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation.fecha_fin > '\".$variable[\"timeStampEnd\"].\"' \";\n\t\t\t\t$cadena_sql.=\"\t) \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation.estado_reserva NOT IN (3,4) \"; //la reservation no contenga los estados FINALIZADO Y CANCELADO\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation.tipo_reserva='\".$variable[\"commerce\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation_reservable.id_reservable_type='\".$variable[\"groupRoom\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation.estado='1' \";\n\t\t\t\t$cadena_sql.=\"GROUP BY id_reservable \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"getFieldsAdditional\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_field IDFIELD, \";\n\t\t\t\t$cadena_sql.=\"name NAMEFIELD \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reserva_fields \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\" id_commerce='\".$variable[\"commerce\"].\"' \";\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"buscarReservable\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.id_reservable ID_RESERVABLE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.nombre NOMBRE_RESERVABLE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.descripcion DESCRIPCION_RESERVABLE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.grupo GRUPO_RESERVABLE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.id_reservable = '\".$variable.\"' \";\n\n\t\t\t\tbreak;\n\t\t\tcase \"buscarServiciosAdicionales\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional.id_adicional ID_ADICIONAL, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional.nombre NOMBRE_ADICIONAL, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional.descripcion DESCRIPCION_ADICIONAL, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional.valor_cargo VALOR_CARGO, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional.moneda_cargo MONEDA_CARGO \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional.tipo_reserva = '\".$variable[\"tipo_reserva\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional.establecimiento >= '\".$variable[\"establecimiento\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"adicional.estado<>0 \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"buscarInformacionReservables\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.id_reservable ID_RESERVABLE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.nombre NOMBRE_RESERVABLE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.descripcion DESCRIPCION_RESERVABLE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.grupo GRUPO_RESERVABLE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.capacidad CAPACIDAD, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.valor VALOR, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.moneda MONEDA, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.imagen IMAGEN \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.tipo_reserva = '\".$variable[\"tipo_reserva\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.id_reservable IN ( \".$variable[\"cadena_reservables\"].\" ) \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.establecimiento >= '\".$variable[\"establecimiento\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable.estado<>0 \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"insertBooking\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`fecha_inicio`, \";\n\t\t\t\t$cadena_sql.=\"`fecha_fin`, \";\n\t\t\t\t$cadena_sql.=\"`tipo_reserva`, \";\n\t\t\t\t$cadena_sql.=\"`establecimiento`, \";\n\t\t\t\t$cadena_sql.=\"`cliente`, \";\n\t\t\t\t$cadena_sql.=\"`valor_total`, \";\n\t\t\t\t$cadena_sql.=\"`fecha_registro`, \";\n\t\t\t\t$cadena_sql.=\"`usuario_registro`, \";\n\t\t\t\t$cadena_sql.=\"`sesion_temp`, \";\n\t\t\t\t$cadena_sql.=\"`plugin`, \";\n\t\t\t\t$cadena_sql.=\"`tiempo_expira_temp`, \";\n\t\t\t\t$cadena_sql.=\"`estado_reserva`, \";\n\t\t\t\t$cadena_sql.=\"`estado_pago` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['timeStampStart'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['timeStampEnd'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['commerce'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['company'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['user'].\"', \";\n\t\t\t\t$cadena_sql.=\"'0', \";\n\t\t\t\t$cadena_sql.=\"'\".time().\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['user'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['session'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['plugin'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".((time())+1800).\"', \"; //POR DEFECTO CADA RESERVA SE GUARDARA 30 MINUTOS SI NO SE FINALIZA CORRECTAMENTE\n\t\t\t\t$cadena_sql.=\"'1', \";\n\t\t\t\t$cadena_sql.=\"'0' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"insertBookingItems\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation_reservable \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`id_reserva`, \";\n\t\t\t\t$cadena_sql.=\"`id_reservable_type` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['id_reserva'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['groupRoom'].\"' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"insertReservables\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation_reservable \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`id_reserva`, \";\n\t\t\t\t$cadena_sql.=\"`adults`, \";\n\t\t\t\t$cadena_sql.=\"`children`, \";\n\t\t\t\t$cadena_sql.=\"`infants`, \";\n\t\t\t\t$cadena_sql.=\"`id_reservable_type`, \";\n\t\t\t\t$cadena_sql.=\"`id_reservable` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['id_reserva'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['adults'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['children'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['infants'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['groupRoom'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['idRoom'].\"' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"insertServices\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reserva_servicio \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`id_reserva`, \";\n\t\t\t\t$cadena_sql.=\"`id_servicio`, \";\n\t\t\t\t$cadena_sql.=\"`cantidad` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['id_reserva'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['id_servicio'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['cantidad'].\"' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"dataBookingItems\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_reservable_type IDGROUP, \";\n\t\t\t\t$cadena_sql.=\"adults ADULTS, \";\n\t\t\t\t$cadena_sql.=\"children CHILDREN, \";\n\t\t\t\t$cadena_sql.=\"infants INFANTS \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation_reservable \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_reserva ='\".$variable.\"' \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"insertFriend\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reserva_guest \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`id_reserva`, \";\n\t\t\t\t$cadena_sql.=\"`id_usuario` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable[0].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable[1].\"' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"dataOtherFields\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_field IDFIELD, \";\n\t\t\t\t$cadena_sql.=\"value VALUE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reserva_values \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_reserva ='\".$variable.\"' \";\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"insertOtherFields\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reserva_values \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`id_field`, \";\n\t\t\t\t$cadena_sql.=\"`id_reserva`, \";\n\t\t\t\t$cadena_sql.=\"`value` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['idfield'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['idbooking'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['value'].\"' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"createFriend\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"guest \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`identificacion`, \";\n\t\t\t\t$cadena_sql.=\"`nombre`, \";\n\t\t\t\t$cadena_sql.=\"`pais_origen`, \";\n\t\t\t\t$cadena_sql.=\"`estado` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['Id'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['name'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['country'].\"', \";\n\t\t\t\t$cadena_sql.=\"'1' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"buscarTipoReserva\":\n\t\t\t\t$cadena_sql=\"SELECT DISTINCT \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.id_tipoReserva ID_TIPORESERVA \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce \";\n\t\t\t\t$cadena_sql.=\"INNER JOIN \";\n\t\t\t\t$cadena_sql.=$prefijo.\"tipo_reserva_filtrador \";\n\t\t\t\t$cadena_sql.=\"ON (\".$prefijo.\"commerce.id_tipoReserva = \".$prefijo.\"commerce_filtrador.id_tipoReserva) \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.estado=1 \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"tipo_reserva_filtrador.estado=1 \";\n\t\t\t\tif($variable['filtros']<>\"\"){\n\t\t\t\t $cadena_sql.=\"AND \";\n\t\t\t\t $cadena_sql.=$prefijo.\"tipo_reserva_filtrador.id_filtroOpcion IN ({$variable['filtros']}) \";\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\n\n\t\t\tcase \"dataGroupReservable\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_reservable_type IDGROUP, \";\n\t\t\t\t$cadena_sql.=\"nombre NAME, \";\n\t\t\t\t$cadena_sql.=\"nombre_maquina MACHINE_NAME, \";\n\t\t\t\t$cadena_sql.=\"capacidad CAPACITY, \";\n\t\t\t\t$cadena_sql.=\"tipo_capacidad CAPACITYTYPE, \";\n\t\t\t\t$cadena_sql.=\"descripcion DESCRIPTION \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable_type \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_tipoReserva ='\".$variable[\"commerce\"].\"' \";\n\t\t\t\tif($variable[\"group\"]<>\"\"){\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"id_reservable_type ='\".$variable[\"group\"].\"' \";\n\t\t\t\t}\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"estado = 1 \";\n\n\t\t\tbreak;\n\n\t\t\tcase \"dataRoomAvailability\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_reservable_type IDGROUP, \";\n\t\t\t\t$cadena_sql.=\"nombre NAME, \";\n\t\t\t\t$cadena_sql.=\"nombre_maquina MACHINE_NAME, \";\n\t\t\t\t$cadena_sql.=\"capacidad CAPACITY, \";\n\t\t\t\t$cadena_sql.=\"descripcion DESCRIPTION \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable_type \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_tipoReserva ='\".$variable[\"commerce\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"capacidad >= '\".$variable[\"guest\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"estado = 1 \";\n\t\t\t\t$cadena_sql.=\"ORDER BY \";\n\t\t\t\t$cadena_sql.=\"capacidad ASC \";\n\n\t\t\tbreak;\n\n\t\t\tcase \"dataUserByID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_usuario USUARIOID, \";\n\t\t\t\t$cadena_sql.=\"nombre NOMBRE, \";\n\t\t\t\t$cadena_sql.=\"apellido APELLIDO, \";\n\t\t\t\t$cadena_sql.=\"telefono TELEFONO, \";\n\t\t\t\t$cadena_sql.=\"correo EMAIL, \";\n\t\t\t\t$cadena_sql.=\"fecha_nacimiento BIRTHDAY \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"`id_usuario` ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"dataUserByEmail\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_usuario USERID, \";\n\t\t\t\t$cadena_sql.=\"nombre NAME, \";\n\t\t\t\t$cadena_sql.=\"apellido LASTNAME, \";\n\t\t\t\t$cadena_sql.=\"telefono PHONE, \";\n\t\t\t\t$cadena_sql.=\"correo EMAIL, \";\n\t\t\t\t$cadena_sql.=\"fecha_nacimiento BIRTHDAY \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"`correo` ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"dataUserById\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_usuario USERID, \";\n\t\t\t\t$cadena_sql.=\"nombre NAME, \";\n\t\t\t\t$cadena_sql.=\"apellido LASTNAME, \";\n\t\t\t\t$cadena_sql.=\"telefono PHONE, \";\n\t\t\t\t$cadena_sql.=\"correo EMAIL, \";\n\t\t\t\t$cadena_sql.=\"fecha_nacimiento BIRTHDAY \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"`id_usuario` ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"dataUserByIden\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_usuario USUARIOID, \";\n\t\t\t\t$cadena_sql.=\"nombre NOMBRE, \";\n\t\t\t\t$cadena_sql.=\"apellido APELLIDO, \";\n\t\t\t\t$cadena_sql.=\"telefono TELEFONO, \";\n\t\t\t\t$cadena_sql.=\"correo EMAIL, \";\n\t\t\t\t$cadena_sql.=\"fecha_nacimiento BIRTHDAY \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"`identificacion` ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"dataGuestByIden\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_guest USUARIOID, \";\n\t\t\t\t$cadena_sql.=\"nombre NOMBRE, \";\n\t\t\t\t$cadena_sql.=\"apellido APELLIDO, \";\n\t\t\t\t$cadena_sql.=\"telefono TELEFONO, \";\n\t\t\t\t$cadena_sql.=\"correo EMAIL, \";\n\t\t\t\t$cadena_sql.=\"fecha_nacimiento BIRTHDAY \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"guest \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"`identificacion` ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"priceList\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_reservable_type IDTYPEROOM, \";\n\t\t\t\t$cadena_sql.=\"id_temporada SEASON, \";\n\t\t\t\t$cadena_sql.=\"guest GUEST, \";\n\t\t\t\t$cadena_sql.=\"COP COP, \";\n\t\t\t\t$cadena_sql.=\"USD USD \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable_valor \";\n\t\t\t\t$cadena_sql.=\"WHERE estado='1' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"`id_reservable_type` ='\".$variable['idgroup'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND( \";\n\t\t\t\t$cadena_sql.=\"`guest` ='\".$variable['guest'].\"' \";\n\t\t\t\t$cadena_sql.=\"OR \";\n\t\t\t\t$cadena_sql.=\"`guest` = '0' \"; //para incluir niños\n\t\t\t\t$cadena_sql.=\") \";\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"activeBooking\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva IDBOOKING, \";\n\t\t\t\t$cadena_sql.=\"r.tipo_reserva IDCOMMERCE, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_inicio STARTBOOKING, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_fin ENDBOOKING, \";\n\t\t\t\t$cadena_sql.=\"DATEDIFF(FROM_UNIXTIME( `fecha_fin` ),FROM_UNIXTIME( `fecha_inicio` )) NUMDAYS \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation r \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"r.sesion_temp ='\".$variable['session'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"r.estado_reserva ='1' \";\n\t\t\tbreak;\n\n\t\t\tcase \"bookingByID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva IDBOOKING, \";\n\t\t\t\t$cadena_sql.=\"r.tipo_reserva IDCOMMERCE, \";\n\t\t\t\t$cadena_sql.=\"FROM_UNIXTIME(r.fecha_inicio) CHECKIN, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_inicio STARTBOOKING, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_fin ENDBOOKING, \";\n\t\t\t\t$cadena_sql.=\"FROM_UNIXTIME(r.fecha_fin) CHECKOUT, \";\n\t\t\t\t$cadena_sql.=\"DATEDIFF(FROM_UNIXTIME( `fecha_fin` ),FROM_UNIXTIME( `fecha_inicio` )) NUMDAYS \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation r \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva ='\".$variable.\"' \";\n\n\n\t\t\tbreak;\n\n\t\t\tcase \"lockedBooking\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"date \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reserva_locked \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\" date ='\".$variable['date'].\"' \";\n\t\t\t\t$cadena_sql.=\" AND \";\n\t\t\t\t$cadena_sql.=\" id_commerce ='\".$variable['commerce'].\"' \";\n\n\t\t\tbreak;\n\n\t\t\tcase \"searchDay\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_season IDSEASON \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"season_calendar \";\n\t\t\t\t$cadena_sql.=\"WHERE estado='1' \";\n\t\t\t\t$cadena_sql.=\" AND id_commerce = \".$variable['commerce'];\n\t\t\t\t$cadena_sql.=\" AND time = '\".$variable['day'].\"'\";\n\t\t\t\t//$cadena_sql.=\" AND DATE_FORMAT(FROM_UNIXTIME(time),'%m%d') = DATE_FORMAT(FROM_UNIXTIME('\".$variable['day'].\"'),'%m%d')\";\n\t\t\tbreak;\n\n case \"getTypeRoomSeason\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"min_days MINIMUN, \";\n\t\t\t\t$cadena_sql.=\"id_reservable_type IDTYPEROOM, \";\n $cadena_sql.=\"DATEDIFF(FROM_UNIXTIME(\".$variable['timeStampEnd'].\"),FROM_UNIXTIME(\".$variable['timeStampStart'].\")) NUMDAYS, \";\n\t\t\t\t$cadena_sql.=\"id_season SEASON \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable_type_season \";\n $cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"`id_reservable_type` ='\".$variable['groupRoom'].\"' \";\n\t\t\t\tbreak;\n\n\n\t\t\tcase \"dataBookingByID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva IDBOOKING, \";\n\t\t\t\t$cadena_sql.=\"DATE_FORMAT(FROM_UNIXTIME(r.fecha_inicio),'%d %b %Y') CHECKIN, \";\n\t\t\t\t$cadena_sql.=\"DATE_FORMAT(FROM_UNIXTIME((r.fecha_fin)+2),'%d %b %Y') CHECKOUT, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_inicio CHECKIN_UNIXTIME, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_fin CHECKOUT_UNIXTIME, \";\n\t\t\t\t$cadena_sql.=\"r.observacion_cliente OBSERVATION_CLIENT, \";\n\t\t\t\t$cadena_sql.=\"rr.adults ADULTS, \";\n\t\t\t\t$cadena_sql.=\"rr.children CHILDREN, \";\n\t\t\t\t$cadena_sql.=\"rr.infants INFANTS, \";\n\t\t\t\t$cadena_sql.=\"r.cliente CLIENT, \";\n\t\t\t\t$cadena_sql.=\"r.tipo_reserva COMMERCE, \";\n\t\t\t\t$cadena_sql.=\"r.valor_total VALUE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation r \";\n\t\t\t\t$cadena_sql.=\"INNER JOIN \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation_reservable rr \";\n\t\t\t\t$cadena_sql.=\"ON r.id_reserva = rr.id_reserva \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"dataBookingBySession\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva IDBOOKING, \";\n\t\t\t\t$cadena_sql.=\"DATE_FORMAT(FROM_UNIXTIME(r.fecha_inicio),'%m/%d/%Y') CHECKIN, \";\n\t\t\t\t$cadena_sql.=\"DATE_FORMAT(FROM_UNIXTIME((r.fecha_fin)+2),'%m/%d/%Y') CHECKOUT, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_inicio CHECKIN_UNIXTIME, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_fin CHECKOUT_UNIXTIME, \";\n\t\t\t\t$cadena_sql.=\"'0' INFANTS, \";\n\t\t\t\t$cadena_sql.=\"r.cliente CLIENT, \";\n\t\t\t\t$cadena_sql.=\"r.tipo_reserva COMMERCE, \";\n\t\t\t\t$cadena_sql.=\"r.observacion_cliente OBSERVATION_CLIENT, \";\n\t\t\t\t$cadena_sql.=\"r.valor_total VALUE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation r \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"r.sesion_temp ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"dataBasicBooking\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva IDBOOKING, \";\n\t\t\t\t$cadena_sql.=\"DATE_FORMAT(FROM_UNIXTIME(r.fecha_inicio),'%d/%m/%Y') CHECKIN, \";\n\t\t\t\t$cadena_sql.=\"DATE_FORMAT(FROM_UNIXTIME((r.fecha_fin)+2),'%d/%m/%Y') CHECKOUT, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_inicio CHECKIN_UNIXTIME, \";\n\t\t\t\t$cadena_sql.=\"r.fecha_fin CHECKOUT_UNIXTIME, \";\n\t\t\t\t$cadena_sql.=\"'0' INFANTS, \";\n\t\t\t\t$cadena_sql.=\"r.cliente CLIENT, \";\n\t\t\t\t$cadena_sql.=\"r.tipo_reserva COMMERCE, \";\n\t\t\t\t$cadena_sql.=\"r.observacion_cliente OBSERVATION_CLIENT, \";\n\t\t\t\t$cadena_sql.=\"r.observacion OBSERVATION_HOTEL, \";\n\t\t\t\t$cadena_sql.=\"r.estado_reserva STATUS_CODE, \";\n\t\t\t\t$cadena_sql.=\"r.estado_pago STATUS_PÄYMENT_CODE, \";\n\t\t\t\t$cadena_sql.=\"r.medio ORIGIN, \";\n\t\t\t\t$cadena_sql.=\"r.valor_pagado HOTEL_PAYMENT, \";\n\t\t\t\t$cadena_sql.=\"r.valor_total VALUE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation r \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"dataRoomTypeBookingbyID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"rg.nombre NAME, \";\n\t\t\t\t$cadena_sql.=\"rg.id_reservable_type IDTYPEROOM \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation r \";\n\t\t\t\t$cadena_sql.=\"INNER JOIN \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation_reservable rr \";\n\t\t\t\t$cadena_sql.=\"ON \";\n\t\t\t\t$cadena_sql.=\"rr.id_reserva = r.id_reserva \";\n\t\t\t\t$cadena_sql.=\"INNER JOIN \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable_type rg \";\n\t\t\t\t$cadena_sql.=\"ON \";\n\t\t\t\t$cadena_sql.=\"rr.id_reservable_type = rg.id_reservable_type \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"dataRoomBookingbyID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"rs.nombre NAME, \";\n\t\t\t\t$cadena_sql.=\"rs.id_reservable IDROOM \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation r \";\n\t\t\t\t$cadena_sql.=\"INNER JOIN \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation_reservable rr \";\n\t\t\t\t$cadena_sql.=\"ON \";\n\t\t\t\t$cadena_sql.=\"rr.id_reserva = r.id_reserva \";\n\t\t\t\t$cadena_sql.=\"INNER JOIN \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable rs \";\n\t\t\t\t$cadena_sql.=\"ON \";\n\t\t\t\t$cadena_sql.=\"rs.id_reservable = rr.id_reservable \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"r.id_reserva ='\".$variable.\"' \";\n\t\t\tbreak;\n\n\n\t\t\tcase \"deleteUnconfirmedBookingUser\":\n\t\t\t\t$cadena_sql=\"DELETE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"`cliente` ='\".$variable.\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"sesion_temp<>'' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"estado_reserva=1 \";\n\t\t\tbreak;\n\n\t\t\tcase \"deleteUnconfirmedSession\":\n\t\t\t\t$cadena_sql=\"DELETE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"`sesion_temp` ='\".$variable.\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"`estado_reserva` ='1' \";\n\t\t\tbreak;\n\n\t\t\tcase \"deleteUnconfirmedBookingAll\":\n\t\t\t\t$cadena_sql=\"DELETE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"sesion_temp<>'' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"`tiempo_expira_temp` < \".time().\" \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"`estado_reserva` ='1' \";\n\n\t\t\tbreak;\n\n\t\t\tcase \"paymentByBookingID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"pp.system_reference SYSTEMREFERENCE, \";\n\t\t\t\t$cadena_sql.=\"pp.description DESCRIPTION, \";\n\t\t\t\t$cadena_sql.=\"pp.id_payu_reference IDPAYMENT, \";\n\t\t\t\t$cadena_sql.=\"pp.value VALUE, \";\n\t\t\t\t$cadena_sql.=\"pp.id_commerce IDCOMMERCE, \";\n\t\t\t\t$cadena_sql.=\"pp.answer ANSWER, \";\n\t\t\t\t$cadena_sql.=\"pp.currency CURRENCY \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"payu_payment pp \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"pp.system_reference='\".$variable.\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"pp.status = 1 \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"countRoomsByGroup\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"count(id_reservable) \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservable \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_reservableGrupo ='\".$variable['groupRoom'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"tipo_reserva = '\".$variable['commerce'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"estado = '1' \";\n\t\t\tbreak;\n\n\t\t\tcase \"updateDataUser\":\n\t\t\t\t$cadena_sql=\"UPDATE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user \";\n\t\t\t\t$cadena_sql.=\"SET \";\n\t\t\t\tif($variable['country']<>\"\"){\n\t\t\t\t\t$cadena_sql.=\"pais_origen ='\".$variable['country'].\"', \";\n\t\t\t\t}\n\t\t\t\tif($variable['name']<>\"\"){\n\t\t\t\t\t$cadena_sql.=\"nombre ='\".$variable['name'].\"', \";\n\t\t\t\t}\n\t\t\t\tif($variable['lastname']<>\"\"){\n\t\t\t\t\t$cadena_sql.=\"apellido ='\".$variable['lastname'].\"', \";\n\t\t\t\t}\n\t\t\t\tif($variable['dni']<>\"\"){\n\t\t\t\t\t$cadena_sql.=\"identificacion ='\".$variable['dni'].\"', \";\n\t\t\t\t}\n\t\t\t\tif($variable['phone']<>\"\"){\n\t\t\t\t\t$cadena_sql.=\"telefono='\".$variable['phone'].\"', \";\n\t\t\t\t}\n\t\t\t\t$cadena_sql.=\"estado='1' \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"correo ='\".$variable['email'].\"' \";\n\t\t\tbreak;\n\n\t\t\tcase \"insertUser\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`nombre`, \";\n\t\t\t\t$cadena_sql.=\"`apellido`, \";\n\t\t\t\t$cadena_sql.=\"`correo`, \";\n\t\t\t\t$cadena_sql.=\"`telefono`, \";\n\t\t\t\t$cadena_sql.=\"`usuario`, \";\n\t\t\t\t$cadena_sql.=\"`clave`, \";\n\t\t\t\t$cadena_sql.=\"`identificacion`, \";\n\t\t\t\t$cadena_sql.=\"`pais_origen`, \";\n\t\t\t\t$cadena_sql.=\"`estilo`, \";\n\t\t\t\t$cadena_sql.=\"`idioma`, \";\n\t\t\t\t$cadena_sql.=\"`estado` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['name'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['lastname'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['email'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['phone'].\"', \";\n\t\t\t\t$cadena_sql.=\"'', \";\n\t\t\t\t$cadena_sql.=\"'', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['dni'].\"', \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['country'].\"', \";\n\t\t\t\t$cadena_sql.=\"'default', \";\n\t\t\t\t$cadena_sql.=\"'es_es', \";\n\t\t\t\t$cadena_sql.=\"'1' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n case \"insertRole\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`id_usuario`, \";\n\t\t\t\t$cadena_sql.=\"`id_subsistema`, \";\n\t\t\t\t$cadena_sql.=\"`estado` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable['user'].\"', \";\n\t\t\t\t$cadena_sql.=\"'3', \";\n\t\t\t\t$cadena_sql.=\"'1' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"getAllSession\":\n\t\t\t\t$cadena_sql = \"SELECT valor \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"session \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"sesionId = '\".$variable.\"' \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"setBookingSession\":\n\t\t\t\t$cadena_sql=\"INSERT INTO \";\n\t\t\t\t$cadena_sql.=$prefijo.\"session \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"`sesionId`, \";\n\t\t\t\t$cadena_sql.=\"`variable`, \";\n\t\t\t\t$cadena_sql.=\"`valor`, \";\n\t\t\t\t$cadena_sql.=\"`expiracion` \";\n\t\t\t\t$cadena_sql.=\") \";\n\t\t\t\t$cadena_sql.=\"VALUES \";\n\t\t\t\t$cadena_sql.=\"( \";\n\t\t\t\t$cadena_sql.=\"'\".$variable.\"', \";\n\t\t\t\t$cadena_sql.=\"'idUsuario', \";\n\t\t\t\t$cadena_sql.=\"'\".time().\"', \";\n\t\t\t\t$cadena_sql.=\"'\".(time()+86400).\"' \";\n\t\t\t\t$cadena_sql.=\")\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"updateValueBookingbyID\":\n\t\t\t\t$cadena_sql=\"UPDATE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"SET \";\n\t\t\t\t$cadena_sql.=\"valor_total ='\".$variable['value'].\"' \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_reserva ='\".$variable['idbooking'].\"' \";\n\t\t\tbreak;\n\n\n\t\t\tcase \"confirmBookingbyID\":\n\t\t\t\t$cadena_sql=\"UPDATE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"SET \";\n\t\t\t\t$cadena_sql.=\"sesion_temp ='', \";\n\t\t\t\t$cadena_sql.=\"tiempo_expira_temp=fecha_fin, \";\n\t\t\t\t$cadena_sql.=\"estado_reserva=2, \";\n\t\t\t\t$cadena_sql.=\"cliente ='\".$variable['customer'].\"', \";\n\t\t\t\t$cadena_sql.=\"valor_total ='\".$variable['valueBooking'].\"' \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_reserva ='\".$variable['idbooking'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"estado_reserva = '1' \";\n\t\t\tbreak;\n\n\t\t\tcase \"confirmBooking\":\n\t\t\t\t$cadena_sql=\"UPDATE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"SET \";\n\t\t\t\t$cadena_sql.=\"sesion_temp ='', \";\n\t\t\t\t$cadena_sql.=\"tiempo_expira_temp=fecha_fin, \";\n\t\t\t\tif(isset($variable['user'])){\n\t\t\t\t\t$cadena_sql.=\"cliente ='\".$variable['user'].\"', \";\n\t\t\t\t}\n\t\t\t\tif(isset($variable['observation'])){\n\t\t\t\t\t$cadena_sql.=\"observacion_cliente='\".$variable['observation'].\"', \";\n\t\t\t\t}\n\t\t\t\tif(isset($variable['value'])){\n\t\t\t\t\t$cadena_sql.=\"valor_total ='\".$variable['value'].\"', \";\n\t\t\t\t}\n\t\t\t\t$cadena_sql.=\"estado_reserva=2 \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"sesion_temp ='\".$variable['session'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"estado_reserva = '1' \";\n\t\t\tbreak;\n\n\t\t\tcase \"updateUserBooking\":\n\t\t\t\t$cadena_sql=\"UPDATE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reservation \";\n\t\t\t\t$cadena_sql.=\"SET \";\n\t\t\t\t$cadena_sql.=\"cliente ='\".$variable['user'].\"' \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"sesion_temp ='\".$variable['session'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"estado_reserva = '1' \";\n\t\t\tbreak;\n\n\t\t\tcase \"valFiltersCommerceID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"fo.nombre NOMBRE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"filtro_opcion fo \";\n\t\t\t\t$cadena_sql.=\"INNER JOIN \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce_filtrador trf \";\n\t\t\t\t$cadena_sql.=\"ON (fo.id_filtroOpcion = trf.id_filtroOpcion) \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"trf.id_tipoReserva ='\".$variable['commerce'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=\"fo.id_filtroComponente = '\".$variable['component'].\"' \";\n\t\t\tbreak;\n\n\n\t\t\tcase \"iniciarTransaccion\":\n\t\t\t\t$cadena_sql=\"START TRANSACTION\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"finalizarTransaccion\":\n\t\t\t\t$cadena_sql=\"COMMIT\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"cancelarTransaccion\":\n\t\t\t\t$cadena_sql=\"ROLLBACK\";\n\t\t\t\tbreak;\n\n\n\t\t\tcase \"eliminarTemp\":\n\n\t\t\t\t$cadena_sql=\"DELETE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"tempFormulario \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_sesion = '\".$variable.\"' \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"dataAllCommerce\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\" GROUP_CONCAT(\".$prefijo.\"commerce.id_tipoReserva) ID, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.nombre NAME, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.url URL, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.facebook FACEBOOK, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.correo EMAIL, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.descripcion DESCRIPTION, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.id_establecimiento BRANCH, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.capacidad CAPACITY, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.files_folder FILESFOLDER, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.imagen IMAGE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.hora_inicio CHECKIN, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.hora_cierre CHECKOUT, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.direccion ADDRESS, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.latitud LATITUDE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.longitud LONGITUDE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.telefono PHONE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.estado=1 \";\n\t\t\t\tif($variable[\"all\"]==\"\"){\n\t\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t\t$cadena_sql.=$prefijo.\"commerce.id_tipoReserva IN ( \".$variable[\"commerces\"].\" ) \";\n\t\t\t\t}\n\t\t\t\tif($variable[\"commerceType\"]<>\"\"){\n\t\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t\t$cadena_sql.=$prefijo.\"commerce.id_claTipoReserva='\".$variable[\"commerceType\"].\"' \";\n\t\t\t\t}\n\t\t\t\tif($variable[\"plan\"]<>\"\"){\n\t\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t\t$cadena_sql.=$prefijo.\"commerce.id_plan='\".$variable[\"plan\"].\"' \";\n\t\t\t\t}\n\t\t\t\t$cadena_sql.=\"GROUP BY `id_establecimiento` \";\n\t\t\t\t$cadena_sql.=\"ORDER BY \".$prefijo.\"commerce.id_plan DESC, \".$prefijo.\"commerce.nombre ASC\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"apiCommerceByID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.api_key APIKEY \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.id_tipoReserva ='\".$variable.\"' \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"dataCommerceByID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.nombre NAME, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.descripcion DESCRIPTION, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.telefono PHONE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.longitud LONGITUDE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.latitud LATITUDE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.facebook FACEBOOK, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.datos_cuenta BANKACCOUNT, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.payment_hotel PAYMENTHOTEL, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.payment_bank PAYMENTBANK, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.payment_payu PAYMENTPAYU, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.payment_davivienda PAYMENTDAVIVIENDA, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.files_folder FOLDER, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.imagen LOGO, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.correo EMAIL \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"commerce.id_tipoReserva ='\".$variable.\"' \";\n\t\t\t\tbreak;\n\n case \"getAdditionalFields\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_field IDFIELD, \";\n\t\t\t\t$cadena_sql.=\"name NAME \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"reserva_fields \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\" id_commerce='\".$variable[\"commerce\"].\"' \";\n $cadena_sql.=\"ORDER BY id_field ASC \";\n\t\t\t\tbreak;\n\n\t\t}\n\t\t//echo \"<br/><br/><br/>\".$tipo.\"=\".$cadena_sql;\n\t\treturn $cadena_sql;\n\n\t}", "function cadena_sql($tipo,$variable=\"\") {\n\n\t\t$prefijo=$this->miConfigurador->getVariableConfiguracion(\"prefijo\");\n\t\t$idSesion=$this->miConfigurador->getVariableConfiguracion(\"id_sesion\");\n\n\t\tswitch($tipo) {\n\n\t\t\t/**\n\t\t\t * Clausulas específicas\n\t\t\t */\n\n\t\t\tcase \"dataUserByID\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=\"id_usuario USUARIOID, \";\n\t\t\t\t$cadena_sql.=\"nombre NOMBRE \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=\"id_usuario ='\".$variable.\"'\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"buscarUsuarioAplicativo\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.id_usuario USUARIOID, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.clave CLAVE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.usuario, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role.id_subsistema ROL, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role.estado, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.estilo TEMA, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.idioma IDIOMA, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"page.nombre PAGINA, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"page.modulo MODULE, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.tipo \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user, \";\n $cadena_sql.=$prefijo.\"page, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"role, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.usuario='\".$variable[\"usuario\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.clave='\".$variable['clave'].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role.id_subsistema=\".$prefijo.\"role.id_subsistema \";\n $cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"page.id_pagina=\".$prefijo.\"role.id_pagina \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role.estado=1 \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.id_usuario=\".$prefijo.\"user_role.id_usuario \";\n\t\t\t\tbreak;\n\n\t\t\tcase \"buscarIndexUsuario\":\n\t\t\t\t$cadena_sql=\"SELECT \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.id_usuario USUARIOID, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.usuario, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role.id_subsistema ROL, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role.estado, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.estilo TEMA, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.idioma IDIOMA, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"role.pagina PAGINA, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.tipo \";\n\t\t\t\t$cadena_sql.=\"FROM \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"role, \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role \";\n\t\t\t\t$cadena_sql.=\"WHERE \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.id_usuario='\".$variable[\"usuario\"].\"' \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role.id_subsistema=\".$prefijo.\"role.id_subsistema \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user_role.estado=1 \";\n\t\t\t\t$cadena_sql.=\"AND \";\n\t\t\t\t$cadena_sql.=$prefijo.\"user.id_usuario=\".$prefijo.\"user_role.id_usuario \";\n\t\t\t\tbreak;\n\n\n\t\t\tcase \"iniciarTransaccion\":\n\t\t\t\t$cadena_sql=\"START TRANSACTION\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"finalizarTransaccion\":\n\t\t\t\t$cadena_sql=\"COMMIT\";\n\t\t\t\tbreak;\n\n\t\t\tcase \"cancelarTransaccion\":\n\t\t\t\t$cadena_sql=\"ROLLBACK\";\n\t\t\t\tbreak;\n\n\t\t}\n\t\t//echo \"<br/>\".$tipo.\"=\".$cadena_sql;\n\t\treturn $cadena_sql;\n\n\t}", "function getFieldAndValues($params) {\n global $conn;\n\n if (!is_array($params))\n exit('Parâmetro inválido!');\n\n $id = $params['id'];\n $mod = $params['modulo'];\n $pre = $params['pre'];\n $ref = isset($params['ref']) ? $params['ref'] : 'id';\n\n if (empty($id) || empty($mod) || empty($pre))\n exit('Dados inválidos');\n\n\n /*\n *pega lista de colunas\n */\n $sql= \"SELECT * FROM \".TABLE_PREFIX.\"_{$mod} WHERE {$pre}_{$ref}=\\\"{$id}\\\"\";\n $fields = array();\n if(!$qry = $conn->query($sql))\n echo $conn->error();\n\n else {\n\n while($fld = $qry->fetch_field())\n array_push($fields, str_replace($pre.'_', null, $fld->name));\n\n $qry->close();\n }\n\n /*\n *pega valores dessas colunas\n */\n $sqlv= \"SELECT * FROM \".TABLE_PREFIX.\"_{$mod} WHERE {$pre}_{$ref}=\\\"{$id}\\\"\";\n if(!$qryv = $conn->query($sqlv))\n echo $conn->error();\n\n else {\n $valores = $qryv->fetch_array(MYSQLI_ASSOC);\n $qryv->close();\n }\n\n $res = null;\n foreach ($fields as $i=>$col)\n $res .= \"{$col} = \".$valores[$pre.'_'.$col].\";\\n\";\n\n\n return $res.\"\\n\";\n}", "public function make_sql()\n\t{\n\t\ttry{\n\t\t\t$metot = $this->metot;\n\t\t\t$metot = strtolower($metot);\n\t\t\t\n\t\t\tif($metot == \"select\") /* Select için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif ((count($this->tables))== 1)\n\t\t\t\t{\n\t\t\t\t\tfor ($c=1;$c<=(count($this->tables[0])-1);$c++){\n\t\t\t\t\t$col .= $this->tables[0][$c].\", \";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr(\"$col\", 0, -1);\n\t\t\t\t\t$table = $this->tables[0][0]; \n\t\t\t\t\t/*\n\t\t\t\t\t\tvar_dump($col);\n\t\t\t\t\t\tvar_dump($table);\n\t\t\t\t\t\tstring 'id, adsoyad' (length=12)\n\t\t\t\t\t\tstring 'email' (length=5)\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tforeach ($this->tables AS $row){\n\t\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t\tfor($c=1; $c<=(count($row)-1);$c++){\n\t\t\t\t\t\t\t$var = trim($row[$c]);\n\t\t\t\t\t\t\t$col .= \"{$table}.{$var}, \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$table = $this->tables[0][0]; \n\t\t\t\t\t/*\n\t\t\t\t\t\tvar_dump($col);\n\t\t\t\t\t\tvar_dump($table);\n\t\t\t\t\t\tstring 'email.id, email.adsoyad, blog.id, blog.title' (length=44)\n\t\t\t\t\t\tstring 'email' (length=5)\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_null($this->join)){\n\t\t\t\t\tforeach($this->join AS $row) {$join .=\" $row \";}\n\t\t\t\t}\n\t\t\t\telse $join = \"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->order)) $order = $this->order;\n\t\t\t\telse $order =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->group)) $group = $this->group;\n\t\t\t\telse $group =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->limit)) $limit = $this->limit;\n\t\t\t\telse $limit =\"\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->sql = $this->metot.\" \". $col.\" FROM \".$table.\" \".$join.\" \".$where.\" \".$group.\" \".$order.\" \".$limit;\n\t\t\t\t/*var_dump($this->sql); string 'SELECT id, adsoyad FROM email WHERE email.id=35 ' (length=53)*/\n\t\t\t} /*if($metot == \"select\")*/\n\t\t\t\n\t\t\tif($metot == \"insert\") /* Insert için sql oluşturma*/\n\t\t\t{\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$col \t.= strstr($row[$c], \"=\", true).\", \";\n\t\t\t\t\t\t$colVal .= substr((strstr($row[$c], \"=\")), 1).\", \";\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$colVal = trim($colVal);\n\t\t\t\t\t$colVal = substr($colVal, 0, -1);\n\t\t\t\t\t\n\t\t\t\t\t$sql[] = \"INSERT INTO {$table} ($col) VALUES ($colVal) \";\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if($metot == \"insert\")*/\n\t\t\t\n\t\t\tif ($metot == \"update\") /* Update için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$col \t.= $row[$c].\", \";\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$sql[] = \"UPDATE {$table} SET {$col} {$where}\";\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if ($metot == \"update\")*/\n\t\t\t\n\t\t\tif ($metot == \"delete\") /* Delete için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t\t$col = \"\";\n\t\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$col \t.= strstr($row[$c], \"=\", true).\", \";\n\t\t\t\t\t\t\t$colVal .= substr((strstr($row[$c], \"=\")), 1).\", \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t\t$colVal = trim($colVal);\n\t\t\t\t\t\t$colVal = substr($colVal, 0, -1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql[] = \"DELETE FROM {$table} WHERE ($col) = ($colVal) \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if ($metot == \"delete\")*/\n\t\t\t\n\t\t\t$this->run();\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\techo \"Error : \".$e->getMessage() .\"<br/>\".\"File : \".$e->getFile() . \"<br/>\".\"Line : \".$e->getLine() . \"<br/>\";\n\t\t}\n\t}", "function getSql($nomConsulta,$p1=\"<NULL>\", $p2=\"<NULL>\", $p3=\"<NULL>\", $p4=\"<NULL>\", $p5=\"<NULL>\", \n\t\t\t\t\t\t\t $p6=\"<NULL>\", $p7=\"<NULL>\", $p8=\"<NULL>\", $p9=\"<NULL>\", $p10=\"<NULL>\",\n\t\t\t\t\t\t\t $p11=\"<NULL>\", $p12=\"<NULL>\", $p13=\"<NULL>\", $p14=\"<NULL>\", $p15=\"<NULL>\",\n\t\t\t\t\t\t\t $p16=\"<NULL>\", $p17=\"<NULL>\", $p18=\"<NULL>\", $p19=\"<NULL>\", $p20=\"<NULL>\",\n $p21=\"<NULL>\", $p22=\"<NULL>\", $p23=\"<NULL>\", $p24=\"<NULL>\", $p25=\"<NULL>\")\n{\n\tglobal $query;\t\n\t$queryBase = \"\";\n\t$arr = array();\n\t/*$arr[1] = $p1;\t\t$arr[2] = $p2;\n\t$arr[3] = $p3;\t\t$arr[4] = $p4;\n\t$arr[5] = $p5;\t\t$arr[6] = $p6;\n\t$arr[7] = $p7;\t\t$arr[8] = $p8;\n\t$arr[9] = $p9;\t\t$arr[10] = $p10;\n\t$arr[11] = $p11;\t$arr[12] = $p12;\n\t$arr[13] = $p13;\t$arr[14] = $p14;\n\t$arr[15] = $p15;\t$arr[16] = $p16;\n\t$arr[17] = $p17;\t$arr[18] = $p18;\n\t$arr[19] = $p19;\t$arr[20] = $p20;*/\n\t\n\t$arr[1] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p1));\n\t$arr[2] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p2));\n\t$arr[3] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p3));\n\t$arr[4] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p4));\n\t$arr[5] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p5));\n\t$arr[6] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p6));\n\t$arr[7] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p7));\n\t$arr[8] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p8));\n\t$arr[9] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p9));\n\t$arr[10] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p10));\n\t$arr[11] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p11));\n\t$arr[12] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p12));\n\t$arr[13] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p13));\n\t$arr[14] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p14));\n\t$arr[15] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p15));\n\t$arr[16] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p16));\n\t$arr[17] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p17));\n\t$arr[18] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p18));\n\t$arr[19] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p19));\n\t$arr[20] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p20));\n\t$arr[21] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p21));\n\t$arr[22] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p22));\n\t$arr[23] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p23));\n\t$arr[24] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p24));\n\t$arr[25] = str_replace(chr(13), ' ', str_replace(chr(10), ' ',$p25));\n\t\n\t$queryBase = $query[$nomConsulta];\t\n\t\t\n\t$result = replaceParams($queryBase, $arr);\n\treturn $result;\n}", "private function setFields()\n\t{\t\n\t\t$sql = '';\n\t\t\n\t\tforeach (array_keys($this->data) as $key)\n\t\t{\n\t\t\t$sql .= '`' . $key . '` = ? , ';\n\t\t}\n\t\t\n\t\t$sql = rtrim($sql, ', ');\n\t\t\n\t\treturn $sql;\n\t}", "function getCamposToQuery($nombre_tabla, $key_value, $as_tabla=\"\"/*, ...*/){\r\n $cadena=\"\";\r\n global $$nombre_tabla;//si o si para que el array se pueda usar en esta funcion\r\n if($key_value=='key'){\r\n foreach ($$nombre_tabla as $key => $value) { $cadena.=$as_tabla.$key.\",\"; }\r\n }\r\n if($key_value=='value'){\r\n foreach ($$nombre_tabla as $key => $value) { $cadena.=$as_tabla.$value.\",\"; }\r\n }\r\n $cadena=trim($cadena,\",\");\r\n return $cadena;\r\n}", "function camposBD(){\n//\t\tSELECT idFactura, nombreTienda AS tienda, fecha, numfactura AS Factura FROM tblfacturas \n//\t\tINNER JOIN tbltiendas ON tbltiendas.idtblTienda = tblfacturas.idtblTienda\n\t\t$fields = array();\n\t\t$fields[] = 'idFactura';\t\n\t\t$fields[] = 'fecha';\t\n\t\t$fields[] = 'tienda';\t\n\t\t$fields[] = 'numFactura';\t\n\t\t/*$fields[] = 'opcion';\t*/\n\t\t/*$fields[] = 'comentario';*/\t\n\t\treturn $fields;\n\t}", "abstract function getSQL();", "function lireParam($sql)\n {\n $collection = $this->execute($sql);\n $collection = $collection[0];\n if ($this->auto_date == 1) {\n $collection = $this->utilDatesDBVersLocale($collection);\n }\n if ($this->codageHtml) {\n $collection = $this->htmlEncode($collection);\n }\n if ($this->toUTF8) {\n $collection = $this->utf8Encode($collection);\n }\n return $collection;\n }", "private function setField()\n {\n $sql = '';\n $sql = rtrim($sql , ', ');\n\n foreach (array_keys($this->data) as $key){\n $sql .= '`' . $key . '` = ?, ';\n }\n\n $sql = rtrim($sql , ', ');\n return $sql;\n }", "function consulta_datos_formulario_033($req_no) { \n $sql=\" SELECT \n COALESCE(a.req_no::TEXT,'No Aplica') AS req_no\n ,COALESCE(a.dcm_no::TEXT,'No Aplica') AS dcm_no\n ,COALESCE(a.dcm_nm::TEXT,'No Aplica') AS dcm_nm\t\t\t\t\t\n ,COALESCE(a.req_city_nm::TEXT,'No Aplica') AS req_city_nm\n ,COALESCE(nullif(a.exp_sty_ctft_req_no,'')::TEXT,'No Aplica') AS exp_sty_ctft_req_no\n ,COALESCE(nullif(a.qlt_ctft_no,'')::TEXT,'No Aplica') AS qlt_ctft_no\t\t\t\t\t\n ,case \n when dclr_cl_cd='001' \n then 'Persona Jurídica'::TEXT\n WHEN dclr_cl_cd='002'\n then 'Persona Natural'::TEXT\n else\n 'No Aplica'\n end AS dclr_cl_cd\t\t\t\t\t\t\t\t\t\t\n ,COALESCE(a.dclr_idt_no::TEXT,'No Aplica') AS dclr_idt_no\n ,COALESCE(nullif(a.dclr_nole,'')::TEXT,'No Aplica') AS dclr_nole\n ,COALESCE(a.dclr_nm::TEXT,'No Aplica') AS dclr_nm\n ,COALESCE(a.dclr_rpgp_nm::TEXT,'No Aplica') AS dclr_rpgp_nm\t\t\t\t\t\n ,COALESCE(a.dclr_prvhc_nm::TEXT,'No Aplica') AS dclr_prvhc_nm\t\t\t\n ,COALESCE(a.dclr_cuty_nm::TEXT,'No Aplica') AS dclr_cuty_nm\t\t\t\t\t\n ,COALESCE(a.dclr_prqi_nm::TEXT,'No Aplica') AS dclr_prqi_nm\n ,COALESCE(a.dclr_ad::TEXT,'No Aplica') AS dclr_ad\n ,COALESCE(a.dclr_tel_no::TEXT,'No Aplica') AS dclr_tel_no\n ,COALESCE(nullif(a.dclr_fax_no,'')::TEXT,'No Aplica') AS dclr_fax_no\n ,COALESCE(nullif(a.dclr_em,'')::TEXT,'No Aplica') AS dclr_em\n ,COALESCE(a.impr_nm::TEXT,'No Aplica') AS impr_nm\t\t\t\t\t\n ,COALESCE(a.impr_ntn_nm::TEXT,'No Aplica') AS impr_ntn_nm\t\t\t\t\t\n ,COALESCE(a.impr_city_nm::TEXT,'No Aplica') AS impr_city_nm\n ,COALESCE(a.impr_ad::TEXT,'No Aplica') AS impr_ad\n ,COALESCE(nullif(a.impr_tel_no,'')::TEXT,'No Aplica') AS impr_tel_no\n ,COALESCE(nullif(a.impr_fax_no,'')::TEXT,'No Aplica') AS impr_fax_no\n ,COALESCE(nullif(a.impr_em,'')::TEXT,'No Aplica') AS impr_em\n ,case \n when expr_cl_cd='001' \n then 'Persona Jurídica'::TEXT\n WHEN expr_cl_cd='002'\n then 'Persona Natural'::TEXT\n else\n 'No Aplica'\n end AS expr_cl_cd\t\t\t\t\t\t\t\t\t\t\n ,COALESCE(a.expr_idt_no::TEXT,'No Aplica') AS expr_idt_no\n ,COALESCE(a.expr_nm::TEXT,'No Aplica') AS expr_nm\n ,COALESCE(a.expr_atr_no::TEXT,'No Aplica') AS expr_atr_no\t\t\t\t\t\n ,COALESCE(a.expr_ntn_nm::TEXT,'No Aplica') AS expr_ntn_nm\t\t\t\t\t\n ,COALESCE(nullif(a.expr_city_nm,'')::TEXT,'No Aplica') AS expr_city_nm\t\t\t\t\t\n ,COALESCE(a.expr_prvhc_nm::TEXT,'No Aplica') AS expr_prvhc_nm\t\t\t\t\t\n ,COALESCE(a.expr_cuty_nm::TEXT,'No Aplica') AS expr_cuty_nm\t\t\t\t\t\n ,COALESCE(a.expr_prqi_nm::TEXT,'No Aplica') AS expr_prqi_nm\n ,COALESCE(a.expr_ad::TEXT,'No Aplica') AS expr_ad\n ,COALESCE(a.expr_tel_no::TEXT,'No Aplica') AS expr_tel_no\n ,COALESCE(NULLIF(a.expr_fax_no,'')::TEXT,'No Aplica') AS expr_fax_no\n ,COALESCE(NULLIF(a.expr_em,'')::TEXT,'No Aplica') AS expr_em\n ,case \n when pcs_cl_cd='001' \n then 'Persona Jurídica'::TEXT\n WHEN pcs_cl_cd='002'\n then 'Persona Natural'::TEXT\n else\n 'No Aplica'\n end AS pcs_cl_cd\t\t\t\t\t\t\t\t\t\t\t\n ,COALESCE(NULLIF(a.pcs_idt_no,'')::TEXT,'No Aplica') AS pcs_idt_no\n ,COALESCE(NULLIF(a.pcs_nm,'')::TEXT,'No Aplica') AS pcs_nm\n ,COALESCE(NULLIF(a.pcs_atr_no,'')::TEXT,'No Aplica') AS pcs_atr_no\t\t\t\t\t\n ,COALESCE(NULLIF(a.pcs_ntn_nm,'')::TEXT,'No Aplica') AS pcs_ntn_nm\t\t\t\t\t\n ,COALESCE(NULLIF(a.pcs_city_nm,'')::TEXT,'No Aplica') AS pcs_city_nm\n ,COALESCE(NULLIF(a.pcs_rpgp_nm,'')::TEXT,'No Aplica') AS pcs_rpgp_nm\t\t\t\t\t\n ,COALESCE(NULLIF(a.pcs_prvhc_nm,'')::TEXT,'No Aplica') AS pcs_prvhc_nm\t\t\t\t\t\n ,COALESCE(NULLIF(a.pcs_cuty_nm,'')::TEXT,'No Aplica') AS pcs_cuty_nm\t\t\t\t\t\n ,COALESCE(NULLIF(a.pcs_prqi_nm,'')::TEXT,'No Aplica') AS pcs_prqi_nm\n ,COALESCE(NULLIF(a.pcs_ad,'')::TEXT,'No Aplica') AS pcs_ad\n ,COALESCE(NULLIF(a.pcs_tel_no,'')::TEXT,'No Aplica') AS pcs_tel_no\n ,COALESCE(NULLIF(a.pcs_fax_no,'')::TEXT,'No Aplica') AS pcs_fax_no\n ,COALESCE(NULLIF(a.pcs_em,'')::TEXT,'No Aplica') AS pcs_em\t\t\t\t\t\n ,COALESCE(a.dst_ntn_nm::TEXT,'No Aplica') AS dst_ntn_nm\t\t\t\t\t\n ,COALESCE(a.dst_city_nm::TEXT,'No Aplica') AS dst_city_nm\t\t\t\t\t\n ,COALESCE(a.dst_port_nm::TEXT,'No Aplica') AS dst_port_nm\n ,COALESCE(a.inv_no::TEXT,'No Aplica') AS inv_no\t\t\t\t\t\n ,COALESCE(a.spm_port_ntn_nm::TEXT,'No Aplica') AS spm_port_ntn_nm\t\t\t\t\t\n ,COALESCE(a.spm_port_city_nm::TEXT,'No Aplica') AS spm_port_city_nm\n ,COALESCE(a.trsp_way_nm::TEXT,'No Aplica') AS trsp_way_nm\t\t\t\t\t\n ,COALESCE(a.carr_nm::TEXT,'No Aplica') AS carr_nm\n ,COALESCE(nullif(a.vsl_nm,'')::TEXT,'No Aplica') AS vsl_nm\n ,COALESCE(nullif(a.fghnb,'')::TEXT,'No Aplica') AS fghnb\n ,COALESCE(nullif(a.oter_trsp_way_nm,'')::TEXT,'No Aplica') AS oter_trsp_way_nm\n ,COALESCE(nullif(a.ctnr_no,'')::TEXT,'No Aplica') AS ctnr_no\n ,COALESCE(nullif(a.seal_no,'')::TEXT,'No Aplica') AS seal_no\t\t\t\t\t\n ,COALESCE(CAST(round(a.prdt_tot_qt,2)AS CHARACTER VARYING)::TEXT,'No Aplica') AS prdt_tot_qt\n ,COALESCE(a.prdt_tot_qt_ut::TEXT,'No Aplica') AS prdt_tot_qt_ut\t\t\t\t\t\n ,COALESCE(CAST(round(a.prdt_tot_nwt,2)AS CHARACTER VARYING)::TEXT,'No Aplica') AS prdt_tot_nwt\n ,COALESCE(a.prdt_tot_nwt_ut::TEXT,'No Aplica') AS prdt_tot_nwt_ut\n ,COALESCE(a.dclr_rmk::TEXT,'No Aplica') AS dclr_rmk\t\t\t\t\t\n ,COALESCE(to_char(a.mdf_dt,'DD/MM/YYYY HH24:MI:SS')::TEXT,'No Aplica') AS mdf_dt\t\t\t\t\t\n FROM vue_gateway.tn_inp_033 as a \n where a.req_no='\".$req_no.\"'\"; \n $conexion=new DB();\n $row = $conexion->consultar($sql,1); \n $TnInp033=new TnInp033($row); \n return $TnInp033; \n}", "private function setFields(): string\n {\n $sql = '';\n\n foreach (array_keys($this->data) as $key) {\n $sql .= '`' . $key . '` = ? , ';\n }\n return rtrim($sql, ', ');\n }", "function consultar_parametros($db){\n\t\t\t$query = \"SELECT P.id, P.empresa, P.razonsocial_fiscal, P.razonsocial_fantasia, P.clientes_regimen_de_iva_id,\n\t\t\t\t\t\t\tP.deposito_id, P.moneda_id, P.tipo_de_pago_id, P.decimales, P.fecha_inicio_actividades,\n\t\t\t\t\t\t\tP.logo, P.banner, P.logo_marca_de_agua, P.parametros_perfil_empresa, P.rec_desc_tipo_de_pago_por_item,\n\t\t\t\t\t\t\tP.domicilio_comercial, P.domicilio_localidad_comercial, P.telefono_comercial, P.email_comercial,\n\t\t\t\t\t\t\tPAD.slogan\n\t\t\t\t\t\tFROM parametros P\n\t\t\t\t\t\t\tLEFT OUTER JOIN parametros_adicional AS PAD ON (P.id = PAD.id)\n\t\t\t\t\t\tWHERE P.oculto = 0 \n\t\t\t\t\t\tORDER BY P.id DESC\n\t\t\t\t\t\tLIMIT 1 \";\n\t\t\t\n\t\t\t$resultpp = $this->LOGS_PARAM($db,$query);\n\t\t\t\n\t\t\treturn $resultpp;\n\t\t}", "public function sql(){\n $str = \"\";\n foreach($this->params as $key => $val){\n if($val != false){\n $str .= \"$key $val \";\n }\n }\n return $str;\n }", "function allinea_db(){\n\t\tif ($this->attributes['BYTB']!='' ) $this->fields_value_bytb($this->attributes['BYTB']);\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\n\t\t\t\t$ret[$i]=\"{$key} NUMBER\";\n\t\t\t\t$i++;\n\t\t\t\t$ret[$i]=\"D_{$key} VARCHAR2(200 CHAR)\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}\n\t\telse return ;\n\t}", "public function getQuestionsAndAnswers()\r\n{\r\n $query_string = \"SELECT questionid, ans \";\r\n $query_string .= \"FROM questions \";\r\n $query_string .= \"WHERE quizid = :quizid\";\r\n\r\n return $query_string;\r\n}", "function createQuery() ;", "function do_queryTodo($conn, $query)\n{\n//$xColabora=26; // Ejemplo de un colaborador : JOSE MARIA RODRIGUEZ MILLAN\n//$xFASE=$_POST[\"xFASE\"];\n$stid = oci_parse($conn, $query);\n//oci_bind_by_name($stid, ':xFASE', $xFASE, 4, SQLT_CHR);\n\n\n\n$r = oci_execute($stid, OCI_DEFAULT);\n\n\t$suma=\"\";\n\twhile ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) \n\t{\n\t\tforeach ($row as $key =>$field) \n\t\t\t{\n\t\t\t$field = htmlspecialchars($field, ENT_NOQUOTES);\n\t\t\t$suma=$suma.$field.'|';\n\t\t\t}\n\t}\necho $suma;\n}", "public function getQuestion()\r\n{\r\n $query_string = \"SELECT questionid, question, choice1, choice2, choice3, choice4, ans \";\r\n $query_string .= \"FROM questions \";\r\n $query_string .= \"WHERE questionid = :questionid\";\r\n\r\n return $query_string;\r\n}", "public function getSQL();", "function setParamsToSaveQuery()\n {\n \n \n if($this->form->getQuery())\n {\n $stringTmp=$this->form->getQuery()->getSqlQuery();\n $stringTmp=substr($stringTmp, strpos($stringTmp,' FROM ' ));\n $stringTmp=substr($stringTmp, 0, strpos($stringTmp,' LIMIT ' ));\n $this->getUser()->setAttribute('queryToSaveWhere', $stringTmp);\n }\n \n if($this->form->getQuery()->getParams())\n {\n $stringTmp=\"\";\n $arrayTmp=$this->form->getQuery()->getParams();\n if(isset($arrayTmp['where']))\n {\n foreach($arrayTmp['where'] as $key=>$value)\n {\n $stringTmp.=\";|\".$value.\"|\";\n }\n $this->getUser()->setAttribute('queryToSaveParams', $stringTmp);\n }\n }\n return;\n }", "function getCadenaSql($tipo, $variable = \"\") {\n $prefijo = $this->miConfigurador->getVariableConfiguracion(\"prefijo\");\n $idSesion = $this->miConfigurador->getVariableConfiguracion(\"id_sesion\");\n\n switch ($tipo) {\n\n /**\n * Clausulas específicas\n */\n case \"buscarUsuario\" :\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \"FECHA_CREACION, \";\n $cadenaSql .= \"PRIMER_NOMBRE \";\n $cadenaSql .= \"FROM \";\n $cadenaSql .= \"USUARIOS \";\n $cadenaSql .= \"WHERE \";\n $cadenaSql .= \"`PRIMER_NOMBRE` ='\" . $variable . \"' \";\n break;\n\n case \"insertarRegistro\" :\n $cadenaSql = \"INSERT INTO \";\n $cadenaSql .= $prefijo . \"registradoConferencia \";\n $cadenaSql .= \"( \";\n $cadenaSql .= \"`idRegistrado`, \";\n $cadenaSql .= \"`nombre`, \";\n $cadenaSql .= \"`apellido`, \";\n $cadenaSql .= \"`identificacion`, \";\n $cadenaSql .= \"`codigo`, \";\n $cadenaSql .= \"`correo`, \";\n $cadenaSql .= \"`tipo`, \";\n $cadenaSql .= \"`fecha` \";\n $cadenaSql .= \") \";\n $cadenaSql .= \"VALUES \";\n $cadenaSql .= \"( \";\n $cadenaSql .= \"NULL, \";\n $cadenaSql .= \"'\" . $variable ['nombre'] . \"', \";\n $cadenaSql .= \"'\" . $variable ['apellido'] . \"', \";\n $cadenaSql .= \"'\" . $variable ['identificacion'] . \"', \";\n $cadenaSql .= \"'\" . $variable ['codigo'] . \"', \";\n $cadenaSql .= \"'\" . $variable ['correo'] . \"', \";\n $cadenaSql .= \"'0', \";\n $cadenaSql .= \"'\" . time() . \"' \";\n $cadenaSql .= \")\";\n break;\n\n case \"actualizarRegistro\" :\n $cadenaSql = \"UPDATE \";\n $cadenaSql .= $prefijo . \"conductor \";\n $cadenaSql .= \"SET \";\n $cadenaSql .= \"`nombre` = '\" . $variable [\"nombre\"] . \"', \";\n $cadenaSql .= \"`apellido` = '\" . $variable [\"apellido\"] . \"', \";\n $cadenaSql .= \"`identificacion` = '\" . $variable [\"identificacion\"] . \"', \";\n $cadenaSql .= \"`telefono` = '\" . $variable [\"telefono\"] . \"' \";\n $cadenaSql .= \"WHERE \";\n $cadenaSql .= \"`idConductor` =\" . $_REQUEST [\"registro\"] . \" \";\n break;\n\n /**\n * Clausulas genéricas.\n * se espera que estén en todos los formularios\n * que utilicen esta plantilla\n */\n case \"iniciarTransaccion\" :\n $cadenaSql = \"START TRANSACTION\";\n break;\n\n case \"finalizarTransaccion\" :\n $cadenaSql = \"COMMIT\";\n break;\n\n case \"cancelarTransaccion\" :\n $cadenaSql = \"ROLLBACK\";\n break;\n\n case \"eliminarTemp\" :\n\n $cadenaSql = \"DELETE \";\n $cadenaSql .= \"FROM \";\n $cadenaSql .= $prefijo . \"tempFormulario \";\n $cadenaSql .= \"WHERE \";\n $cadenaSql .= \"id_sesion = '\" . $variable . \"' \";\n break;\n\n case \"insertarTemp\" :\n $cadenaSql = \"INSERT INTO \";\n $cadenaSql .= $prefijo . \"tempFormulario \";\n $cadenaSql .= \"( \";\n $cadenaSql .= \"id_sesion, \";\n $cadenaSql .= \"formulario, \";\n $cadenaSql .= \"campo, \";\n $cadenaSql .= \"valor, \";\n $cadenaSql .= \"fecha \";\n $cadenaSql .= \") \";\n $cadenaSql .= \"VALUES \";\n\n foreach ($_REQUEST as $clave => $valor) {\n $cadenaSql .= \"( \";\n $cadenaSql .= \"'\" . $idSesion . \"', \";\n $cadenaSql .= \"'\" . $variable ['formulario'] . \"', \";\n $cadenaSql .= \"'\" . $clave . \"', \";\n $cadenaSql .= \"'\" . $valor . \"', \";\n $cadenaSql .= \"'\" . $variable ['fecha'] . \"' \";\n $cadenaSql .= \"),\";\n }\n\n $cadenaSql = substr($cadenaSql, 0, (strlen($cadenaSql) - 1));\n break;\n\n case \"rescatarTemp\" :\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \"id_sesion, \";\n $cadenaSql .= \"formulario, \";\n $cadenaSql .= \"campo, \";\n $cadenaSql .= \"valor, \";\n $cadenaSql .= \"fecha \";\n $cadenaSql .= \"FROM \";\n $cadenaSql .= $prefijo . \"tempFormulario \";\n $cadenaSql .= \"WHERE \";\n $cadenaSql .= \"id_sesion='\" . $idSesion . \"'\";\n break;\n\n /**\n * Clausulas Del Caso Uso.\n */\n case \"buscar_Proveedores\" :\n $cadenaSql = \" SELECT \\\"PRO_NIT\\\"||' - ('||\\\"PRO_RAZON_SOCIAL\\\"||')' AS value,\\\"PRO_NIT\\\" AS data \";\n $cadenaSql .= \" FROM arka_parametros.arka_proveedor \";\n $cadenaSql .= \"WHERE cast(\\\"PRO_NIT\\\" as text) LIKE '%\" . $variable . \"%' \";\n $cadenaSql .= \"OR \\\"PRO_RAZON_SOCIAL\\\" LIKE '%\" . $variable . \"%' LIMIT 10; \";\n\n break;\n\n case \"buscar_entradas\" :\n $cadenaSql = \"SELECT DISTINCT entrada.id_entrada, entrada.consecutivo||' - ('||entrada.vigencia||')' entradas \";\n $cadenaSql .= \"FROM entrada \";\n $cadenaSql .= \"WHERE cierre_contable ='f' \";\n $cadenaSql .= \"AND estado_entrada = 1 \";\n $cadenaSql .= \"AND estado_registro='t' \";\n $cadenaSql .= \"ORDER BY id_entrada DESC \";\n\n break;\n\n case \"consultarInfoClase\" :\n $cadenaSql = \" SELECT observacion, id_entrada, id_salida, id_hurto,\";\n $cadenaSql .= \" num_placa, val_sobrante, ruta_archivo, nombre_archivo \";\n $cadenaSql .= \" FROM info_clase_entrada \";\n $cadenaSql .= \" WHERE id_info_clase='\" . $variable . \"';\";\n\n break;\n\n case \"proveedores\" :\n $cadenaSql = \" SELECT \\\"PRO_NIT\\\",\\\"PRO_NIT\\\"||' - '||\\\"PRO_RAZON_SOCIAL\\\" AS proveedor \";\n $cadenaSql .= \" FROM arka_parametros.arka_proveedor \";\n\n break;\n case \"tipo_contrato_avance\" :\n\n $cadenaSql = \"SELECT id_tipo, descripcion \";\n $cadenaSql .= \"FROM arka_inventarios.tipo_contrato \";\n $cadenaSql .= \"WHERE id_tipo<>1;\";\n\n break;\n\n case \"clase_entrada\" :\n\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \"id_clase, descripcion \";\n $cadenaSql .= \"FROM clase_entrada \";\n $cadenaSql .= \"WHERE id_clase > 1 \";\n $cadenaSql .= \"ORDER BY descripcion ASC ;\";\n\n break;\n\n case \"clase_entrada_consulta\" :\n\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \"id_clase, descripcion \";\n $cadenaSql .= \"FROM clase_entrada \";\n// \t\t\t\t$cadenaSql .= \"WHERE id_clase > 1 \";\n $cadenaSql .= \"ORDER BY descripcion ASC ;\";\n\n break;\n\n case \"tipo_contrato\" :\n\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \"id_tipo, descripcion \";\n $cadenaSql .= \"FROM tipo_contrato \";\n $cadenaSql .= \"WHERE id_tipo > 0;\";\n\n break;\n\n case \"consultarEntrada\" :\n $cadenaSql = \"SELECT DISTINCT \";\n $cadenaSql .= \"entrada.id_entrada, entrada.fecha_registro, \";\n $cadenaSql .= \" descripcion,pr.\\\"PRO_NIT\\\" as nit ,consecutivo||' - ('||entrada.vigencia||')' consecutivo , cierre_contable, pr.\\\"PRO_RAZON_SOCIAL\\\" as razon_social \";\n $cadenaSql .= \"FROM entrada \";\n $cadenaSql .= \"JOIN clase_entrada ON clase_entrada.id_clase = entrada.clase_entrada \";\n $cadenaSql .= \"LEFT JOIN arka_parametros.arka_proveedor pr ON pr.\\\"PRO_NIT\\\" = CAST(entrada.proveedor AS CHAR(50)) \";\n $cadenaSql .= \"WHERE 1=1 \";\n $cadenaSql .= \"AND entrada.cierre_contable='f' \";\n $cadenaSql .= \"AND entrada.estado_entrada = 1 \";\n $cadenaSql .= \"AND entrada.estado_registro='t' \";\n\n if ($variable [0] != '') {\n $cadenaSql .= \" AND entrada.id_entrada = '\" . $variable [0] . \"'\";\n }\n\n if ($variable [1] != '') {\n $cadenaSql .= \" AND entrada.fecha_registro BETWEEN CAST ( '\" . $variable [1] . \"' AS DATE) \";\n $cadenaSql .= \" AND CAST ( '\" . $variable [2] . \"' AS DATE) \";\n }\n\n if ($variable [3] != '') {\n $cadenaSql .= \" AND clase_entrada = '\" . $variable [3] . \"'\";\n }\n if ($variable [4] != '') {\n $cadenaSql .= \" AND entrada.proveedor = '\" . $variable [4] . \"'\";\n }\n\n break;\n\n // SELECT id_entrada, fecha_registro, consecutivo, vigencia, clase_entrada,\n // info_clase, tipo_contrato, numero_contrato, fecha_contrato, proveedor,\n // numero_factura, fecha_factura, observaciones, acta_recibido,\n // ordenador, sede, dependencia, supervisor, estado_entrada, estado_registro\n // FROM entrada;\n\n case \"consultarEntradaParticular\" :\n\n $cadenaSql = \"SELECT DISTINCT \";\n $cadenaSql .= \" vigencia, clase_entrada, info_clase , \";\n $cadenaSql .= \"\ttipo_contrato, numero_contrato, fecha_contrato, proveedor,\";\n $cadenaSql .= \"numero_factura, fecha_factura, observaciones, acta_recibido , ordenador, sede, dependencia, supervisor ,tipo_ordenador, identificacion_ordenador,\n\t\t\t\t\t\t \\\"PRO_NIT\\\"||' - ('||\\\"PRO_RAZON_SOCIAL\\\"||')' AS nom_razon \";\n $cadenaSql .= \"FROM entrada \";\n $cadenaSql .= \"LEFT JOIN arka_parametros.arka_proveedor ap ON ap.\\\"PRO_NIT\\\"=CAST(entrada.proveedor AS CHAR(50))\";\n $cadenaSql .= \"WHERE id_entrada='\" . $variable . \"';\";\n\n break;\n\n case \"actasRecicbido\" :\n $cadenaSql = \" SELECT id_actarecibido, id_actarecibido \";\n $cadenaSql .= \"FROM registro_actarecibido \";\n\n break;\n\n case \"sede\" :\n $cadenaSql = \"SELECT DISTINCT \\\"ESF_ID_SEDE\\\", \\\"ESF_SEDE\\\" \";\n $cadenaSql .= \" FROM arka_parametros.arka_sedes \";\n $cadenaSql .= \" WHERE \\\"ESF_ESTADO\\\"='A' \";\n $cadenaSql .= \" AND \\\"ESF_COD_SEDE\\\" > 0 \";\n\n break;\n case \"informacion_ordenador2\" :\n $cadenaSql = \" SELECT \\\"ORG_NOMBRE\\\",\\\"ORG_IDENTIFICACION\\\",\\\"ORG_TIPO_ORDENADOR\\\",\\\"ORG_IDENTIFICACION\\\" as identificacion \";\n $cadenaSql .= \" FROM arka_parametros.arka_ordenadores \";\n $cadenaSql .= \" WHERE \\\"ORG_IDENTIFICACION\\\"='\" . $variable [0] . \"' \";\n $cadenaSql .= \" AND \\\"ORG_TIPO_ORDENADOR\\\"='\" . $variable [1] . \"' \";\n\n break;\n\n case \"tipoComprador\" :\n\n $cadenaSql = \" \tSELECT \\\"ORG_TIPO_ORDENADOR\\\", \\\"ORG_ORDENADOR_GASTO\\\" \";\n $cadenaSql .= \" FROM arka_parametros.arka_ordenadores \";\n $cadenaSql .= \" WHERE \\\"ORG_ESTADO\\\"='A' \";\n\n break;\n case \"OrdenadorGasto\" :\n $cadenaSql = \" SELECT DISTINCT \\\"ORG_IDENTIFICACION\\\" as ORG_IDENTIFICACION,\\\"ORG_NOMBRE\\\" as ORG_NOMBRE \";\n $cadenaSql .= \" FROM arka_parametros.arka_ordenadores \";\n\n break;\n\n case \"informacion_ordenadorConsultados\" :\n $cadenaSql = \" SELECT \\\"ORG_NOMBRE\\\",\\\"ORG_IDENTIFICACION\\\",\\\"ORG_TIPO_ORDENADOR\\\",\\\"ORG_IDENTIFICACION\\\" as identificacion \";\n $cadenaSql .= \" FROM arka_parametros.arka_ordenadores \";\n $cadenaSql .= \" WHERE \\\"ORG_IDENTIFICACION\\\"='\" . $variable . \"' \";\n $cadenaSql .= \" AND \\\"ORG_ESTADO\\\"='A' \";\n break;\n case \"informacion_ordenador\" :\n $cadenaSql = \" SELECT DISTINCT \\\"ORG_NOMBRE\\\" as ORG_NOMBRE,\\\"ORG_IDENTIFICACION\\\" as ORG_IDENTIFICACION \";\n $cadenaSql .= \" FROM arka_parametros.arka_ordenadores \";\n $cadenaSql .= \" WHERE \\\"ORG_TIPO_ORDENADOR\\\"='\" . $variable . \"' \";\n\n break;\n\n case \"dependencias\" :\n $cadenaSql = \"SELECT DISTINCT \\\"ESF_CODIGO_DEP\\\" , \\\"ESF_DEP_ENCARGADA\\\" \";\n $cadenaSql .= \" FROM arka_parametros.arka_dependencia ad \";\n $cadenaSql .= \" JOIN arka_parametros.arka_espaciosfisicos ef ON ef.\\\"ESF_ID_ESPACIO\\\"=ad.\\\"ESF_ID_ESPACIO\\\" \";\n $cadenaSql .= \" JOIN arka_parametros.arka_sedes sa ON sa.\\\"ESF_COD_SEDE\\\"=ef.\\\"ESF_COD_SEDE\\\" \";\n $cadenaSql .= \" WHERE ad.\\\"ESF_ESTADO\\\"='A'\";\n break;\n case \"consultarReposicion\" :\n\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \" id_entrada, id_hurto, id_salida \";\n $cadenaSql .= \"FROM reposicion_entrada \";\n $cadenaSql .= \"WHERE id_reposicion='\" . $variable . \"';\";\n\n break;\n\n case \"consultarDonacion\" :\n\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \" ruta_acto, nombre_acto \";\n $cadenaSql .= \"FROM donacion_entrada \";\n $cadenaSql .= \"WHERE id_donacion='\" . $variable . \"';\";\n\n break;\n\n case \"consultarSobrante\" :\n\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \" observaciones, nombre_acta \";\n $cadenaSql .= \"FROM sobrante_entrada \";\n $cadenaSql .= \"WHERE id_sobrante='\" . $variable . \"';\";\n\n break;\n\n case \"consultarProduccion\" :\n\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \" observaciones, nombre_acta \";\n $cadenaSql .= \"FROM produccion_entrada \";\n $cadenaSql .= \"WHERE id_produccion='\" . $variable . \"';\";\n\n break;\n\n case \"consultarRecuperacion\" :\n\n $cadenaSql = \"SELECT \";\n $cadenaSql .= \"observaciones, nombre_acta \";\n $cadenaSql .= \"FROM recuperacion_entrada \";\n $cadenaSql .= \"WHERE id_recuperacion='\" . $variable . \"';\";\n\n break;\n\n case \"ActualizarReposicion\" :\n $cadenaSql = \" UPDATE reposicion_entrada \";\n $cadenaSql .= \" SET id_entrada='\" . $variable [0] . \"', \";\n $cadenaSql .= \" id_hurto='\" . $variable [1] . \"', \";\n $cadenaSql .= \" id_salida='\" . $variable [2] . \"' \";\n $cadenaSql .= \" WHERE id_reposicion='\" . $variable [3] . \"' \";\n $cadenaSql .= \" RETURNING id_reposicion \";\n\n break;\n\n case \"actualizarDonacion\" :\n $cadenaSql = \" UPDATE donacion_entrada \";\n $cadenaSql .= \" SET ruta_acto='\" . $variable [0] . \"', \";\n $cadenaSql .= \" nombre_acto='\" . $variable [1] . \"' \";\n $cadenaSql .= \" WHERE id_donacion='\" . $variable [2] . \"' \";\n $cadenaSql .= \" RETURNING id_donacion \";\n\n break;\n\n case \"actualizarSobrante\" :\n $cadenaSql = \" UPDATE sobrante_entrada \";\n $cadenaSql .= \" SET observaciones='\" . $variable [2] . \"' \";\n if ($variable [0] == 1) {\n\n $cadenaSql .= \" , ruta_acta='\" . $variable [3] . \"' , \";\n $cadenaSql .= \" nombre_acta='\" . $variable [4] . \"' \";\n }\n $cadenaSql .= \" WHERE id_sobrante='\" . $variable [1] . \"' \";\n $cadenaSql .= \" RETURNING id_sobrante \";\n break;\n\n case \"actualizarProduccion\" :\n $cadenaSql = \" UPDATE produccion_entrada \";\n $cadenaSql .= \" SET observaciones='\" . $variable [2] . \"' \";\n if ($variable [0] == 1) {\n\n $cadenaSql .= \" , ruta_acta='\" . $variable [3] . \"' , \";\n $cadenaSql .= \" nombre_acta='\" . $variable [4] . \"' \";\n }\n $cadenaSql .= \" WHERE id_produccion='\" . $variable [1] . \"' \";\n $cadenaSql .= \" RETURNING id_produccion \";\n\n break;\n\n case \"actualizarRecuperacion\" :\n $cadenaSql = \" UPDATE recuperacion_entrada \";\n $cadenaSql .= \" SET observaciones='\" . $variable [2] . \"' \";\n if ($variable [0] == 1) {\n\n $cadenaSql .= \" , ruta_acta='\" . $variable [3] . \"' , \";\n $cadenaSql .= \" nombre_acta='\" . $variable [4] . \"' \";\n }\n $cadenaSql .= \" WHERE id_recuperacion='\" . $variable [1] . \"' \";\n $cadenaSql .= \" RETURNING id_recuperacion \";\n\n break;\n // UPDATE info_clase_entrada\n // SET id_info_clase=?, observacion=?, id_entrada=?, id_salida=?, id_hurto=?,\n // num_placa=?, val_sobrante=?, ruta_archivo=?, nombre_archivo=?\n // WHERE <condition>;\n case \"actualizarInformacionArchivo\" :\n $cadenaSql = \" UPDATE info_clase_entrada \";\n $cadenaSql .= \" SET observacion= '\" . $variable [0] . \"', \";\n $cadenaSql .= \" id_entrada='\" . $variable [1] . \"', \";\n $cadenaSql .= \" id_salida='\" . $variable [2] . \"', \";\n $cadenaSql .= \" id_hurto='\" . $variable [3] . \"', \";\n $cadenaSql .= \" num_placa='\" . $variable [4] . \"', \";\n $cadenaSql .= \" val_sobrante='\" . $variable [5] . \"', \";\n $cadenaSql .= \" ruta_archivo='\" . $variable [6] . \"', \";\n $cadenaSql .= \" nombre_archivo='\" . $variable [7] . \"' \";\n $cadenaSql .= \" WHERE id_info_clase='\" . $variable [8] . \"' \";\n\n break;\n\n case \"insertarInformación\" :\n $cadenaSql = \" INSERT INTO info_clase_entrada( \";\n $cadenaSql .= \" observacion, id_entrada, id_salida, id_hurto,\";\n $cadenaSql .= \" num_placa, val_sobrante, ruta_archivo, nombre_archivo)\";\n $cadenaSql .= \" VALUES (\";\n $cadenaSql .= \"'\" . $variable [0] . \"',\";\n $cadenaSql .= \"'\" . $variable [1] . \"',\";\n $cadenaSql .= \"'\" . $variable [2] . \"',\";\n $cadenaSql .= \"'\" . $variable [3] . \"',\";\n $cadenaSql .= \"'\" . $variable [4] . \"',\";\n $cadenaSql .= \"'\" . $variable [5] . \"',\";\n $cadenaSql .= \"'\" . $variable [6] . \"',\";\n $cadenaSql .= \"'\" . $variable [7] . \"') \";\n $cadenaSql .= \"RETURNING id_info_clase; \";\n\n break;\n\n case \"actualizarInformacion\" :\n $cadenaSql = \" UPDATE info_clase_entrada \";\n $cadenaSql .= \" SET observacion= '\" . $variable [0] . \"', \";\n $cadenaSql .= \" id_entrada='\" . $variable [1] . \"', \";\n $cadenaSql .= \" id_salida='\" . $variable [2] . \"', \";\n $cadenaSql .= \" id_hurto='\" . $variable [3] . \"', \";\n $cadenaSql .= \" num_placa='\" . $variable [4] . \"', \";\n $cadenaSql .= \" val_sobrante='\" . $variable [5] . \"', \";\n $cadenaSql .= \" WHERE id_info_clase='\" . $variable [6] . \"' \";\n\n break;\n\n case \"actualizarEntrada\" :\n $cadenaSql = \" UPDATE entrada \";\n $cadenaSql .= \" SET vigencia='\" . $variable [0] . \"', \";\n $cadenaSql .= \" clase_entrada='\" . $variable [1] . \"', \";\n $cadenaSql .= \" tipo_contrato='\" . $variable [2] . \"', \";\n $cadenaSql .= \" numero_contrato='\" . $variable [3] . \"', \";\n $cadenaSql .= \" fecha_contrato=\" . $variable [4] . \", \";\n $cadenaSql .= \" proveedor=\" . $variable [5] . \", \";\n $cadenaSql .= \" numero_factura=\" . $variable [6] . \", \";\n $cadenaSql .= \" fecha_factura=\" . $variable [7] . \", \";\n $cadenaSql .= \" observaciones='\" . $variable [8] . \"', \";\n $cadenaSql .= \" acta_recibido='\" . $variable [10] . \"', \";\n $cadenaSql .= \" ordenador=\" . $variable [11] . \", \";\n $cadenaSql .= \" sede='\" . $variable [12] . \"', \";\n $cadenaSql .= \" dependencia='\" . $variable [13] . \"', \";\n $cadenaSql .= \" supervisor='\" . $variable [14] . \"', \";\n $cadenaSql .= \" tipo_ordenador=\" . $variable [15] . \", \";\n $cadenaSql .= \" identificacion_ordenador=\" . $variable [16] . \", \";\n $cadenaSql .= \" info_clase='\" . $variable [17] . \"', \";\n $cadenaSql .= \" estado_entrada='1' \";\n $cadenaSql .= \" WHERE id_entrada='\" . $variable [9] . \"' \";\n $cadenaSql .= \" RETURNING consecutivo||' - ('||vigencia||')' entrada \";\n\n break;\n\n case \"insertarReposicion\" :\n $cadenaSql = \" INSERT INTO \";\n $cadenaSql .= \" reposicion_entrada(\";\n $cadenaSql .= \" id_entrada, id_hurto, id_salida )\";\n $cadenaSql .= \" VALUES (\";\n $cadenaSql .= \"'\" . $variable [0] . \"',\";\n $cadenaSql .= \"'\" . $variable [1] . \"',\";\n $cadenaSql .= \"'\" . $variable [2] . \"') \";\n $cadenaSql .= \"RETURNING id_reposicion; \";\n\n break;\n\n case \"insertarDonacion\" :\n $cadenaSql = \" INSERT INTO \";\n $cadenaSql .= \" donacion_entrada(\";\n $cadenaSql .= \" ruta_acto, nombre_acto)\";\n $cadenaSql .= \" VALUES (\";\n $cadenaSql .= \"'\" . $variable [0] . \"',\";\n $cadenaSql .= \"'\" . $variable [1] . \"') \";\n $cadenaSql .= \"RETURNING id_donacion; \";\n\n break;\n\n case \"insertarSobrante\" :\n $cadenaSql = \" INSERT INTO \";\n $cadenaSql .= \" sobrante_entrada(\";\n $cadenaSql .= \" observaciones, ruta_acta, nombre_acta)\";\n $cadenaSql .= \" VALUES (\";\n $cadenaSql .= \"'\" . $variable [0] . \"',\";\n $cadenaSql .= \"'\" . $variable [1] . \"',\";\n $cadenaSql .= \"'\" . $variable [2] . \"') \";\n $cadenaSql .= \"RETURNING id_sobrante; \";\n\n break;\n\n case \"insertarProduccion\" :\n $cadenaSql = \" INSERT INTO \";\n $cadenaSql .= \" produccion_entrada(\";\n $cadenaSql .= \" observaciones, ruta_acta, nombre_acta)\";\n $cadenaSql .= \" VALUES (\";\n $cadenaSql .= \"'\" . $variable [0] . \"',\";\n $cadenaSql .= \"'\" . $variable [1] . \"',\";\n $cadenaSql .= \"'\" . $variable [2] . \"') \";\n $cadenaSql .= \"RETURNING id_produccion; \";\n\n break;\n\n case \"insertarRecuperacion\" :\n $cadenaSql = \" INSERT INTO \";\n $cadenaSql .= \" recuperacion_entrada(\";\n $cadenaSql .= \" observaciones, ruta_acta, nombre_acta)\";\n $cadenaSql .= \" VALUES (\";\n $cadenaSql .= \"'\" . $variable [0] . \"',\";\n $cadenaSql .= \"'\" . $variable [1] . \"',\";\n $cadenaSql .= \"'\" . $variable [2] . \"') \";\n $cadenaSql .= \"RETURNING id_recuperacion; \";\n\n break;\n\n case \"dependenciasConsultadas\" :\n $cadenaSql = \"SELECT DISTINCT \\\"ESF_CODIGO_DEP\\\" , \\\"ESF_DEP_ENCARGADA\\\" \";\n $cadenaSql .= \" FROM arka_parametros.arka_dependencia ad \";\n $cadenaSql .= \" JOIN arka_parametros.arka_espaciosfisicos ef ON ef.\\\"ESF_ID_ESPACIO\\\"=ad.\\\"ESF_ID_ESPACIO\\\" \";\n $cadenaSql .= \" JOIN arka_parametros.arka_sedes sa ON sa.\\\"ESF_COD_SEDE\\\"=ef.\\\"ESF_COD_SEDE\\\" \";\n $cadenaSql .= \" WHERE sa.\\\"ESF_ID_SEDE\\\"='\" . $variable . \"' \";\n $cadenaSql .= \" AND ad.\\\"ESF_ESTADO\\\"='A'\";\n\n break;\n\n case 'consultarActas' :\n $cadenaSql = \"SELECT registro_actarecibido.* , contratos.numero_contrato, contratos.fecha_contrato \";\n $cadenaSql .= \"FROM registro_actarecibido \";\n $cadenaSql .= \"LEFT JOIN contratos ON contratos.id_contrato=registro_actarecibido.id_contrato \";\n $cadenaSql .= \"WHERE id_actarecibido='\" . $variable . \"';\";\n\n break;\n\n case \"funcionarios\" :\n\n $cadenaSql = \"SELECT \\\"FUN_IDENTIFICACION\\\", \\\"FUN_IDENTIFICACION\\\" ||' - '|| \\\"FUN_NOMBRE\\\" \";\n $cadenaSql .= \"FROM arka_parametros.arka_funcionarios \";\n $cadenaSql .= \"WHERE \\\"FUN_ESTADO\\\"='A' \";\n\n break;\n\n case 'consultarEntradas' :\n $cadenaSql = \"SELECT id_entrada, consecutivo||' - ('||vigencia||')' entradas \";\n $cadenaSql .= \"FROM entrada \";\n $cadenaSql .= \"WHERE consecutivo > 0 \";\n break;\n\n case 'consultarSalidas' :\n $cadenaSql = \"SELECT id_salida, consecutivo||' - ('||vigencia||')' salidas \";\n $cadenaSql .= \"FROM salida \";\n $cadenaSql .= \"WHERE consecutivo > 0 \";\n break;\n\n case 'consultarHurtos' :\n $cadenaSql = \"SELECT id_estado_elemento, id_hurto||' - ('||fecha_hurto||')' hurtos \";\n $cadenaSql .= \"FROM estado_elemento \";\n $cadenaSql .= \"WHERE id_hurto > 0 \";\n $cadenaSql .= \"ORDER BY id_hurto ASC \";\n\n break;\n\n case 'consultarPlacas' :\n $cadenaSql = \"SELECT id_elemento_ind, placa \";\n $cadenaSql .= \"FROM elemento_individual \";\n $cadenaSql .= \"WHERE placa <> '' \";\n break;\n }\n return $cadenaSql;\n }", "function query_values($sql, $parameters = null) {\n $query = $this->query($sql, $parameters);\n return $query->fetchAll(PDO::FETCH_COLUMN, 0);\n }", "public function getSQL($param=false){\n\t\t\tswitch( $name = $this->obtenerDato(\"name\") ){\n\t\t\t\t// Los campos modelfield::$specials los ponemos en código\n\t\t\t\t// Debemos refactorizar esto con algo mas de tiempo\n\t\t\t\tcase \"estado_contratacion\":\n\t\t\t\t\t$sql = \"( -- empresas validas\n\t\t\t\t\t\t\tn1 IN (<%empresasvalidas%>)\n\t\t\t\t\t\tAND if(n2 IS NULL OR !n2, 1, n2 IN (<%empresasvalidas%>) )\n\t\t\t\t\t\tAND if(n3 IS NULL OR !n3, 1, n3 IN (<%empresasvalidas%>) )\n\t\t\t\t\t\tAND if(n4 IS NULL OR !n4, 1, n4 IN (<%empresasvalidas%>) )\n\t\t\t\t\t)\";\n\n\t\t\t\t\treturn $sqlFinal = \"(SELECT if(($sql), 'Valido', 'No Valido'))\";\n\t\t\t\tbreak;\n\t\t\t\tcase \"cadena_contratacion_cumplimentada\":\n\t\t\t\t\t$sql = \"( -- empresas cumplimentadas\n\t\t\t\t\t\t\tn1 IN (<%empresacumplimentadas%>)\n\t\t\t\t\t\tAND if(n2 IS NULL OR !n2, 1, n2 IN (<%empresacumplimentadas%>) )\n\t\t\t\t\t\tAND if(n3 IS NULL OR !n3, 1, n3 IN (<%empresacumplimentadas%>) )\n\t\t\t\t\t\tAND if(n4 IS NULL OR !n4, 1, n4 IN (<%empresacumplimentadas%>) )\n\t\t\t\t\t)\";\n\n\t\t\t\t\treturn $sqlFinal = \"(SELECT if(($sql), 'Si', 'No'))\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'asignado_en_conjunto_de_agrupadores': case 'valido_conjunto_agrupadores': \n\t\t\t\t// case 'valido_conjunto_agrupadores_asignados':\n\t\t\t\tcase 'valido_conjunto_agrupadores_seleccionados':\n\t\t\t\tcase 'valido_conjunto_agrupadores_solo_asignados':\n\t\t\t\t\tif( $param instanceof ArrayObjectList && $sql = trim($this->obtenerDato(\"sql\")) ){\n\t\t\t\t\t\t$subsql = array();\n\t\t\t\t\t\tforeach ($param as $item) {\n\t\t\t\t\t\t\t$subsql[] = \"((\". str_replace('%s', $item->getUID(), $sql) .\") = 1)\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $sql = '( IF( '.implode(' AND ',$subsql) .',\\'Si\\',\\'No\\') )';\n\t\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t\tcase 'valido_algun_agrupador': \n\t\t\t\t\tif( $param instanceof ArrayObjectList && $sql = trim($this->obtenerDato(\"sql\")) ){\n\t\t\t\t\t\tforeach($param as $item) {\n\t\t\t\t\t\t\t$subsql[] = \"((\". str_replace('%s', $item->getUID(), $sql) .\") = 1)\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $sql = '( IF( '.implode(' OR ',$subsql) .',\\'Si\\',\\'No\\') )';\n\t\t\t\t\t} \n\t\t\t\tbreak;\n\t\t\t\tcase 'mostrar_agrupador_asignado': case 'trabajos': case 'codigo_agrupador_valido':\n\t\t\t\t\tif( $param instanceof ArrayObjectList && $sql = trim($this->obtenerDato(\"sql\")) ){\n\t\t\t\t\t\treturn str_replace('%s', $param->toComaList() ,$sql);\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif( $sql = trim($this->obtenerDato(\"sql\")) ){\n\t\t\t\t\t\tif( $param instanceof Ielemento ) $param = $param->getUID();\n\t\t\t\t\t\tif( $param ) $sql = str_replace(\"%s\", $param, $sql);\n\t\t\t\t\t\treturn $sql;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function print_recibo_paciente($n_recibo,$n_venta,$id_paciente){\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select*from recibos where numero_recibo=? and numero_venta=? and id_paciente=?;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$n_recibo);\n $sql->bindValue(2,$n_venta);\n $sql->bindValue(3,$id_paciente);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function defineCriterias($criterio,$PreparedStatement){\n\t\t\tif(isset ($criterio[\"consumo_id\"]) && trim($criterio[\"consumo_id\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND consumo_id = \".Connection::inject($criterio[\"consumo_id\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"socio_id\"]) && trim($criterio[\"socio_id\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND socio_id = \".Connection::inject($criterio[\"socio_id\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"nro_medidor\"]) && trim($criterio[\"nro_medidor\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND nro_medidor LIKE '%\".Connection::inject($criterio[\"nro_medidor\"]).\"%'\";\n\t\t\t}\n\t\t\tif(isset ($criterio[\"fecha_lectura\"]) && trim($criterio[\"fecha_lectura\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND fecha_lectura = \".Connection::inject($criterio[\"fecha_lectura\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"fecha_emision\"]) && trim($criterio[\"fecha_emision\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND fecha_emision = \".Connection::inject($criterio[\"fecha_emision\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"periodo_mes\"]) && trim($criterio[\"periodo_mes\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND periodo_mes = \".Connection::inject($criterio[\"periodo_mes\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"periodo_anio\"]) && trim($criterio[\"periodo_anio\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND periodo_anio = \".Connection::inject($criterio[\"periodo_anio\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"consumo_total_lectura\"]) && trim($criterio[\"consumo_total_lectura\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND consumo_total_lectura = \".Connection::inject($criterio[\"consumo_total_lectura\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"consumo_por_pagar\"]) && trim($criterio[\"consumo_por_pagar\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND consumo_por_pagar = \".Connection::inject($criterio[\"consumo_por_pagar\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"costo_consumo_por_pagar\"]) && trim($criterio[\"costo_consumo_por_pagar\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND costo_consumo_por_pagar = \".Connection::inject($criterio[\"costo_consumo_por_pagar\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"estado\"]) && trim($criterio[\"estado\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND estado = '\".Connection::inject($criterio[\"estado\"]).\"'\";\n\t\t\t}\n\t\t\tif(isset ($criterio[\"fecha_hora_pago\"]) && trim($criterio[\"fecha_hora_pago\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND fecha_hora_pago = \".Connection::inject($criterio[\"fecha_hora_pago\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"usuario_pago\"]) && trim($criterio[\"usuario_pago\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND usuario_pago = \".Connection::inject($criterio[\"usuario_pago\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"monto_pagado\"]) && trim($criterio[\"monto_pagado\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND monto_pagado = \".Connection::inject($criterio[\"monto_pagado\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"pagado_por\"]) && trim($criterio[\"pagado_por\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND pagado_por = \".Connection::inject($criterio[\"pagado_por\"]);\n\t\t\t}\n\t\t\tif(isset ($criterio[\"ci_pagado_por\"]) && trim($criterio[\"ci_pagado_por\"]) != \"0\"){\n\t\t\t\t$PreparedStatement .=\" AND ci_pagado_por = \".Connection::inject($criterio[\"ci_pagado_por\"]);\n\t\t\t}\n\t\t\treturn $PreparedStatement;\n\t\t}", "private function sqlstatements() {\n $this->select = array( );\n $this->insert = array( 'INSERT INTO :entity (xxx) VALUES (yyy)' );\n $this->update = array( );\n $this->delete = array( );\n }", "public function fetchSqlString();", "function dbquery() {\n\t\t\t$db = &func_get_arg(0);\n\t\t\t$zapytanie = &func_get_arg(1);\n\t\t\t$polecenie = $db->prepare($zapytanie);\n\t\t\tif( func_num_args() == 2 ){\n\t\t\t\t$polecenie->execute();\n\t\t\t\treturn $polecenie;\n\t\t\t}\n\n for($i = 2 ; $i < func_num_args(); $i++) {\n $polecenie->bindParam($i-1, func_get_arg($i), PDO::PARAM_STR );\n }\n\n $polecenie->execute();\n return $polecenie;\n\t \t}", "public function get_detalle_vf_beneficiario($evaluado,$n_orden){\n\n\t$conectar= parent::conexion();\n\tparent::set_names(); \n\n\t$sql = \"select*from detalle_ventas_flotantes where beneficiario=? and numero_orden=?;\";\n\t$sql = $conectar->prepare($sql);\n\t$sql->bindValue(1,$evaluado);\n\t$sql->bindValue(2,$n_orden);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n\n}", "function getCadenaSql($tipo, $variable = \"\") {\n\t\t$prefijo = $this->miConfigurador->getVariableConfiguracion ( \"prefijo\" );\n\t\t$idSesion = $this->miConfigurador->getVariableConfiguracion ( \"id_sesion\" );\n\t\t\n\t\tswitch ($tipo) {\n\t\t\t\n\t\t\t/**\n\t\t\t * Clausulas específicas\n\t\t\t */\n\t\t\tcase \"buscarUsuario\" :\n\t\t\t\t$cadenaSql = \"SELECT \";\n\t\t\t\t$cadenaSql .= \"FECHA_CREACION, \";\n\t\t\t\t$cadenaSql .= \"PRIMER_NOMBRE \";\n\t\t\t\t$cadenaSql .= \"FROM \";\n\t\t\t\t$cadenaSql .= \"USUARIOS \";\n\t\t\t\t$cadenaSql .= \"WHERE \";\n\t\t\t\t$cadenaSql .= \"`PRIMER_NOMBRE` ='\" . $variable . \"' \";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"insertarRegistro\" :\n\t\t\t\t$cadenaSql = \"INSERT INTO \";\n\t\t\t\t$cadenaSql .= $prefijo . \"registradoConferencia \";\n\t\t\t\t$cadenaSql .= \"( \";\n\t\t\t\t$cadenaSql .= \"`idRegistrado`, \";\n\t\t\t\t$cadenaSql .= \"`nombre`, \";\n\t\t\t\t$cadenaSql .= \"`apellido`, \";\n\t\t\t\t$cadenaSql .= \"`identificacion`, \";\n\t\t\t\t$cadenaSql .= \"`codigo`, \";\n\t\t\t\t$cadenaSql .= \"`correo`, \";\n\t\t\t\t$cadenaSql .= \"`tipo`, \";\n\t\t\t\t$cadenaSql .= \"`fecha` \";\n\t\t\t\t$cadenaSql .= \") \";\n\t\t\t\t$cadenaSql .= \"VALUES \";\n\t\t\t\t$cadenaSql .= \"( \";\n\t\t\t\t$cadenaSql .= \"NULL, \";\n\t\t\t\t$cadenaSql .= \"'\" . $variable ['nombre'] . \"', \";\n\t\t\t\t$cadenaSql .= \"'\" . $variable ['apellido'] . \"', \";\n\t\t\t\t$cadenaSql .= \"'\" . $variable ['identificacion'] . \"', \";\n\t\t\t\t$cadenaSql .= \"'\" . $variable ['codigo'] . \"', \";\n\t\t\t\t$cadenaSql .= \"'\" . $variable ['correo'] . \"', \";\n\t\t\t\t$cadenaSql .= \"'0', \";\n\t\t\t\t$cadenaSql .= \"'\" . time () . \"' \";\n\t\t\t\t$cadenaSql .= \")\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"actualizarRegistro\" :\n\t\t\t\t$cadenaSql = \"UPDATE \";\n\t\t\t\t$cadenaSql .= $prefijo . \"conductor \";\n\t\t\t\t$cadenaSql .= \"SET \";\n\t\t\t\t$cadenaSql .= \"`nombre` = '\" . $variable [\"nombre\"] . \"', \";\n\t\t\t\t$cadenaSql .= \"`apellido` = '\" . $variable [\"apellido\"] . \"', \";\n\t\t\t\t$cadenaSql .= \"`identificacion` = '\" . $variable [\"identificacion\"] . \"', \";\n\t\t\t\t$cadenaSql .= \"`telefono` = '\" . $variable [\"telefono\"] . \"' \";\n\t\t\t\t$cadenaSql .= \"WHERE \";\n\t\t\t\t$cadenaSql .= \"`idConductor` =\" . $_REQUEST [\"registro\"] . \" \";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t/**\n\t\t\t * Clausulas genéricas.\n\t\t\t * se espera que estén en todos los formularios\n\t\t\t * que utilicen esta plantilla\n\t\t\t */\n\t\t\tcase \"iniciarTransaccion\" :\n\t\t\t\t$cadenaSql = \"START TRANSACTION\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"finalizarTransaccion\" :\n\t\t\t\t$cadenaSql = \"COMMIT\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"cancelarTransaccion\" :\n\t\t\t\t$cadenaSql = \"ROLLBACK\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"eliminarTemp\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"DELETE \";\n\t\t\t\t$cadenaSql .= \"FROM \";\n\t\t\t\t$cadenaSql .= $prefijo . \"tempFormulario \";\n\t\t\t\t$cadenaSql .= \"WHERE \";\n\t\t\t\t$cadenaSql .= \"id_sesion = '\" . $variable . \"' \";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"insertarTemp\" :\n\t\t\t\t$cadenaSql = \"INSERT INTO \";\n\t\t\t\t$cadenaSql .= $prefijo . \"tempFormulario \";\n\t\t\t\t$cadenaSql .= \"( \";\n\t\t\t\t$cadenaSql .= \"id_sesion, \";\n\t\t\t\t$cadenaSql .= \"formulario, \";\n\t\t\t\t$cadenaSql .= \"campo, \";\n\t\t\t\t$cadenaSql .= \"valor, \";\n\t\t\t\t$cadenaSql .= \"fecha \";\n\t\t\t\t$cadenaSql .= \") \";\n\t\t\t\t$cadenaSql .= \"VALUES \";\n\t\t\t\t\n\t\t\t\tforeach ( $_REQUEST as $clave => $valor ) {\n\t\t\t\t\t$cadenaSql .= \"( \";\n\t\t\t\t\t$cadenaSql .= \"'\" . $idSesion . \"', \";\n\t\t\t\t\t$cadenaSql .= \"'\" . $variable ['formulario'] . \"', \";\n\t\t\t\t\t$cadenaSql .= \"'\" . $clave . \"', \";\n\t\t\t\t\t$cadenaSql .= \"'\" . $valor . \"', \";\n\t\t\t\t\t$cadenaSql .= \"'\" . $variable ['fecha'] . \"' \";\n\t\t\t\t\t$cadenaSql .= \"),\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$cadenaSql = substr ( $cadenaSql, 0, (strlen ( $cadenaSql ) - 1) );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"rescatarTemp\" :\n\t\t\t\t$cadenaSql = \"SELECT \";\n\t\t\t\t$cadenaSql .= \"id_sesion, \";\n\t\t\t\t$cadenaSql .= \"formulario, \";\n\t\t\t\t$cadenaSql .= \"campo, \";\n\t\t\t\t$cadenaSql .= \"valor, \";\n\t\t\t\t$cadenaSql .= \"fecha \";\n\t\t\t\t$cadenaSql .= \"FROM \";\n\t\t\t\t$cadenaSql .= $prefijo . \"tempFormulario \";\n\t\t\t\t$cadenaSql .= \"WHERE \";\n\t\t\t\t$cadenaSql .= \"id_sesion='\" . $idSesion . \"'\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t/**\n\t\t\t * Clausulas Del Caso Uso.\n\t\t\t */\n\t\t\t\n\t\t\tcase \"buscar_placa_maxima\" :\n\t\t\t\t$cadenaSql = \" SELECT MAX(placa::FLOAT) placa_max \";\n\t\t\t\t$cadenaSql .= \" FROM elemento_individual \";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"buscar_repetida_placa\" :\n\t\t\t\t$cadenaSql = \" SELECT count (placa) \";\n\t\t\t\t$cadenaSql .= \" FROM elemento_individual \";\n\t\t\t\t$cadenaSql .= \" WHERE placa ='\" . $variable . \"';\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"idElementoMaxIndividual\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT max(id_elemento_ind) \";\n\t\t\t\t$cadenaSql .= \"FROM elemento_individual \";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"ingresar_elemento_individual\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" \tINSERT INTO elemento_individual(\";\n\t\t\t\t$cadenaSql .= \"fecha_registro, placa, serie, id_elemento_gen,id_elemento_ind,id_salida,funcionario,ubicacion_elemento,cantidad_asignada) \";\n\t\t\t\t$cadenaSql .= \" VALUES (\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [0] . \"',\";\n\t\t\t\t$cadenaSql .= ((is_null ( $variable [1] )) ? 'null' . \",\" : \"'\" . $variable [1] . \"',\");\n\t\t\t\t$cadenaSql .= ((is_null ( $variable [2] )) ? 'null' . \",\" : \"'\" . $variable [2] . \"',\");\n\t\t\t\t$cadenaSql .= \"'\" . $variable [3] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [4] . \"',\";\n\t\t\t\tif (is_null ( $variable ['id_salida'] ) == false) {\n\t\t\t\t\t$cadenaSql .= \"'\" . $variable ['id_salida'] . \"',\";\n\t\t\t\t} else {\n\t\t\t\t\t$cadenaSql .= \"NULL,\";\n\t\t\t\t}\n\t\t\t\tif (is_null ( $variable ['funcionario'] ) == false) {\n\t\t\t\t\t$cadenaSql .= \"'\" . $variable ['funcionario'] . \"',\";\n\t\t\t\t} else {\n\t\t\t\t\t$cadenaSql .= \"NULL,\";\n\t\t\t\t}\n\t\t\t\tif (is_null ( $variable ['ubicacion_elemento'] ) == false) {\n\t\t\t\t\t$cadenaSql .= \"'\" . $variable ['ubicacion_elemento'] . \"',\";\n\t\t\t\t} else {\n\t\t\t\t\t$cadenaSql .= \"NULL,\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$cadenaSql .= \"'\" . $variable ['cantidad_asignada'] . \"') \";\n\t\t\t\t$cadenaSql .= \"RETURNING id_elemento_ind; \";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"Informacion_Elemento\" :\n\t\t\t\t$cadenaSql = \"SELECT * \";\n\t\t\t\t$cadenaSql .= \" FROM elemento \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento='\" . $variable . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"sede\" :\n\t\t\t\t$cadenaSql = \"SELECT DISTINCT \\\"ESF_ID_SEDE\\\", \\\"ESF_SEDE\\\" \";\n\t\t\t\t$cadenaSql .= \" FROM arka_parametros.arka_sedes \";\n\t\t\t\t$cadenaSql .= \" WHERE \\\"ESF_ESTADO\\\"='A'\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"dependencias\" :\n\t\t\t\t$cadenaSql = \"SELECT DISTINCT \\\"ESF_CODIGO_DEP\\\" , \\\"ESF_DEP_ENCARGADA\\\" \";\n\t\t\t\t$cadenaSql .= \" FROM arka_parametros.arka_dependencia ad \";\n\t\t\t\t$cadenaSql .= \" JOIN arka_parametros.arka_espaciosfisicos ef ON ef.\\\"ESF_ID_ESPACIO\\\"=ad.\\\"ESF_ID_ESPACIO\\\" \";\n\t\t\t\t$cadenaSql .= \" JOIN arka_parametros.arka_sedes sa ON sa.\\\"ESF_COD_SEDE\\\"=ef.\\\"ESF_COD_SEDE\\\" \";\n\t\t\t\t$cadenaSql .= \" WHERE ad.\\\"ESF_ESTADO\\\"='A'\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"dependenciasConsultadas\" :\n\t\t\t\t$cadenaSql = \"SELECT DISTINCT \\\"ESF_CODIGO_DEP\\\" , \\\"ESF_DEP_ENCARGADA\\\" \";\n\t\t\t\t$cadenaSql .= \" FROM arka_parametros.arka_dependencia ad \";\n\t\t\t\t$cadenaSql .= \" JOIN arka_parametros.arka_espaciosfisicos ef ON ef.\\\"ESF_ID_ESPACIO\\\"=ad.\\\"ESF_ID_ESPACIO\\\" \";\n\t\t\t\t$cadenaSql .= \" JOIN arka_parametros.arka_sedes sa ON sa.\\\"ESF_COD_SEDE\\\"=ef.\\\"ESF_COD_SEDE\\\" \";\n\t\t\t\t$cadenaSql .= \" WHERE sa.\\\"ESF_ID_SEDE\\\"='\" . $variable . \"' \";\n\t\t\t\t$cadenaSql .= \" AND ad.\\\"ESF_ESTADO\\\"='A'\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"funcionarios\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT \\\"FUN_IDENTIFICACION\\\", \\\"FUN_IDENTIFICACION\\\" ||' - '|| \\\"FUN_NOMBRE\\\" \";\n\t\t\t\t$cadenaSql .= \"FROM arka_parametros.arka_funcionarios \";\n\t\t\t\t$cadenaSql .= \"WHERE \\\"FUN_ESTADO\\\"='A' \";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"buscar_placa\" :\n\t\t\t\t$cadenaSql = \" SELECT DISTINCT placa, placa as placas \";\n\t\t\t\t$cadenaSql .= \"FROM elemento_individual \";\n\t\t\t\t$cadenaSql .= \"WHERE placa IS NOT NULL \";\n\t\t\t\t$cadenaSql .= \"ORDER BY placa DESC ;\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"buscar_serie\" :\n\t\t\t\t$cadenaSql = \" SELECT DISTINCT serie, serie as series \";\n\t\t\t\t$cadenaSql .= \"FROM elemento_individual \";\n\t\t\t\t$cadenaSql .= \"WHERE serie IS NOT NULL \";\n\t\t\t\t$cadenaSql .= \"ORDER BY serie DESC \";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"buscar_entradas\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT DISTINCT en.id_entrada, en.consecutivo||' - ('||en.vigencia||')' entradas \";\n\t\t\t\t$cadenaSql .= \"FROM entrada en \";\n\t\t\t\t$cadenaSql .= \"JOIN elemento el ON el.id_entrada=en.id_entrada \";\n\t\t\t\t$cadenaSql .= \"WHERE en.cierre_contable='f' \";\n\t\t\t\t$cadenaSql .= \"AND en.estado_registro='t' \";\n\t\t\t\t$cadenaSql .= \"AND en.estado_entrada = 1 \";\n\t\t\t\t$cadenaSql .= \"ORDER BY en.id_entrada DESC ;\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultarElementoCD\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT DISTINCT \";\n\t\t\t\t$cadenaSql .= \"placa, \";\n\t\t\t\t$cadenaSql .= \"elemento.serie, elemento.fecha_registro as fecharegistro, id_elemento as idelemento,\n\t\t\t\t\t\t estado_entrada as estadoentrada, \n\t\t\t\t\t\t entrada.cierre_contable as cierrecontable,\n\t\t\t\t\t\t entrada.consecutivo||' - ('||entrada.vigencia||')' entrada,\n\t\t\t\t\t\t elemento.descripcion descripcion , elemento.tipo_bien \";\n\t\t\t\t$cadenaSql .= \"FROM elemento \";\n\t\t\t\t$cadenaSql .= \"JOIN tipo_bienes ON tipo_bienes.id_tipo_bienes = elemento.tipo_bien \";\n\t\t\t\t$cadenaSql .= \"JOIN elemento_individual ON elemento_individual.id_elemento_gen = elemento.id_elemento \";\n\t\t\t\t$cadenaSql .= \"JOIN entrada ON entrada.id_entrada = elemento.id_entrada \";\n\t\t\t\t$cadenaSql .= \"WHERE elemento.estado=TRUE \";\n\t\t\t\t$cadenaSql .= \"AND elemento_individual.id_salida IS NULL \";\n\t\t\t\t$cadenaSql .= \"AND entrada.cierre_contable='f' \";\n\t\t\t\t$cadenaSql .= \"AND entrada.estado_entrada='1' \";\n\t\t\t\t$cadenaSql .= \"AND elemento_individual.estado_registro='TRUE' \";\n\t\t\t\t$cadenaSql .= \"AND entrada.estado_registro='t' \";\n\t\t\t\t$cadenaSql .= \"AND tipo_bienes.id_tipo_bienes <> '1' \";\n\t\t\t\t\n\t\t\t\tif ($variable [0] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND elemento.fecha_registro BETWEEN CAST ( '\" . $variable [0] . \"' AS DATE) \";\n\t\t\t\t\t$cadenaSql .= \" AND CAST ( '\" . $variable [1] . \"' AS DATE) \";\n\t\t\t\t}\n\t\t\t\tif ($variable [2] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND elemento_individual.placa = '\" . $variable [2] . \"' \";\n\t\t\t\t}\n\t\t\t\tif ($variable [3] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND elemento.serie= '\" . $variable [3] . \"' \";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($variable [4] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND entrada.id_entrada= '\" . $variable [4] . \"' \";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultarElementoC\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT DISTINCT \";\n\t\t\t\t$cadenaSql .= \"'' as placa, \";\n\t\t\t\t$cadenaSql .= \"elemento.serie, elemento.fecha_registro as fecharegistro, id_elemento as idelemento,\n\t\t\t\t\t\t estado_entrada as estadoentrada,\n\t\t\t\t\t\t entrada.cierre_contable as cierrecontable,\n\t\t\t\t\t\t entrada.consecutivo||' - ('||entrada.vigencia||')' entrada,\n\t\t\t\t\t\t elemento.descripcion descripcion, elemento.tipo_bien \";\n\t\t\t\t$cadenaSql .= \"FROM elemento \";\n\t\t\t\t$cadenaSql .= \"JOIN tipo_bienes ON tipo_bienes.id_tipo_bienes = elemento.tipo_bien \";\n\t\t\t\t$cadenaSql .= \"LEFT JOIN elemento_individual ON elemento_individual.id_elemento_gen = elemento.id_elemento \";\n\t\t\t\t$cadenaSql .= \"JOIN entrada ON entrada.id_entrada = elemento.id_entrada \";\n\t\t\t\t$cadenaSql .= \"WHERE 1=1 \";\n\t\t\t\t$cadenaSql .= \"AND elemento.estado='t' \";\n\t\t\t\t$cadenaSql .= \"AND entrada.cierre_contable='f' \";\n// \t\t\t\t$cadenaSql .= \"AND elemento_individual.estado_registro='t' \";\n\t\t\t\t$cadenaSql .= \"AND elemento_individual.id_salida IS NULL \";\n\t\t\t\t$cadenaSql .= \"AND entrada.estado_registro='t' \";\n\t\t\t\t$cadenaSql .= \"AND entrada.estado_entrada='1' \";\n\t\t\t\t$cadenaSql .= \"AND tipo_bienes.id_tipo_bienes='1' \";\n\t\t\t\t\n\t\t\t\tif ($variable [0] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND elemento.fecha_registro BETWEEN CAST ( '\" . $variable [0] . \"' AS DATE) \";\n\t\t\t\t\t$cadenaSql .= \" AND CAST ( '\" . $variable [1] . \"' AS DATE) \";\n\t\t\t\t}\n\t\t\t\tif ($variable [2] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND elemento_individual.placa = '\" . $variable [2] . \"' \";\n\t\t\t\t}\n\t\t\t\tif ($variable [3] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND elemento.serie= '\" . $variable [3] . \"' \";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($variable [4] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND entrada.id_entrada= '\" . $variable [4] . \"' \";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultarElementoParticular\" :\n\t\t\t\t$cadenaSql = \" SELECT \";\n\t\t\t\t$cadenaSql .= \"nivel,tipo_bien, descripcion, cantidad, \";\n\t\t\t\t$cadenaSql .= \"unidad, valor, iva, ajuste, bodega, subtotal_sin_iva, total_iva,\";\n\t\t\t\t$cadenaSql .= \"total_iva_con, tipo_poliza, fecha_inicio_pol, fecha_final_pol, \";\n\t\t\t\t$cadenaSql .= \"marca, serie \";\n\t\t\t\t$cadenaSql .= \" FROM arka_inventarios.elemento \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento='\" . $variable . \"'\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultar_tipo_bien\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT id_tipo_bienes, descripcion \";\n\t\t\t\t$cadenaSql .= \"FROM arka_inventarios.tipo_bienes;\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultar_tipo_poliza\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT id_tipo_poliza, descripcion \";\n\t\t\t\t$cadenaSql .= \"FROM arka_inventarios.tipo_poliza;\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultar_tipo_iva\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT id_iva, descripcion \";\n\t\t\t\t$cadenaSql .= \"FROM arka_inventarios.aplicacion_iva;\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultar_bodega\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT id_bodega, descripcion \";\n\t\t\t\t$cadenaSql .= \"FROM arka_inventarios.bodega;\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultar_placa\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT MAX( placa) \";\n\t\t\t\t$cadenaSql .= \"FROM elemento \";\n\t\t\t\t$cadenaSql .= \"WHERE tipo_bien='1';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// SELECT id_elemento, fecha_registro, tipo_bien, descripcion, cantidad,\n\t\t\t// unidad, valor, iva, ajuste, bodega, subtotal_sin_iva, total_iva,\n\t\t\t// total_iva_con, placa, tipo_poliza, fecha_inicio_pol, fecha_final_pol,\n\t\t\t// marca, serie, id_entrada, estado\n\t\t\t// FROM elemento;\n\t\t\t\n\t\t\tcase \"actualizar_elemento_tipo_1\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" UPDATE \";\n\t\t\t\t$cadenaSql .= \" elemento \";\n\t\t\t\t$cadenaSql .= \" SET \";\n\t\t\t\t$cadenaSql .= \" tipo_bien='\" . $variable [0] . \"', \";\n\t\t\t\t$cadenaSql .= \" descripcion='\" . $variable [1] . \"', \";\n\t\t\t\t$cadenaSql .= \" cantidad='\" . $variable [2] . \"', \";\n\t\t\t\t$cadenaSql .= \" unidad='\" . $variable [3] . \"', \";\n\t\t\t\t$cadenaSql .= \" valor='\" . $variable [4] . \"', \";\n\t\t\t\t$cadenaSql .= \" iva='\" . $variable [5] . \"', \";\n\t\t\t\t$cadenaSql .= \" ajuste='\" . $variable [6] . \"', \";\n\t\t\t\t$cadenaSql .= \" bodega='\" . $variable [7] . \"', \";\n\t\t\t\t$cadenaSql .= \" subtotal_sin_iva='\" . $variable [8] . \"', \";\n\t\t\t\t$cadenaSql .= \" total_iva='\" . $variable [9] . \"', \";\n\t\t\t\t$cadenaSql .= \" total_iva_con='\" . $variable [10] . \"', \";\n\t\t\t\t$cadenaSql .= \" marca='\" . $variable [11] . \"', \";\n\t\t\t\t$cadenaSql .= \" serie='\" . $variable [12] . \"', \";\n\t\t\t\t$cadenaSql .= \" nivel='\" . $variable [14] . \"', \";\n\t\t\t\t$cadenaSql .= \" cantidad_por_asignar='\" . $variable [2] . \"' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento='\" . $variable [13] . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"actualizar_elemento_tipo_2\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" UPDATE \";\n\t\t\t\t$cadenaSql .= \" elemento \";\n\t\t\t\t$cadenaSql .= \" SET \";\n\t\t\t\t$cadenaSql .= \" tipo_bien='\" . $variable [0] . \"', \";\n\t\t\t\t$cadenaSql .= \" descripcion='\" . $variable [1] . \"', \";\n\t\t\t\t$cadenaSql .= \" cantidad='\" . $variable [2] . \"', \";\n\t\t\t\t$cadenaSql .= \" unidad='\" . $variable [3] . \"', \";\n\t\t\t\t$cadenaSql .= \" valor='\" . $variable [4] . \"', \";\n\t\t\t\t$cadenaSql .= \" iva='\" . $variable [5] . \"', \";\n\t\t\t\t$cadenaSql .= \" ajuste='\" . $variable [6] . \"', \";\n\t\t\t\t$cadenaSql .= \" bodega='\" . $variable [7] . \"', \";\n\t\t\t\t$cadenaSql .= \" subtotal_sin_iva='\" . $variable [8] . \"', \";\n\t\t\t\t$cadenaSql .= \" total_iva='\" . $variable [9] . \"', \";\n\t\t\t\t$cadenaSql .= \" total_iva_con='\" . $variable [10] . \"', \";\n\t\t\t\t$cadenaSql .= \" tipo_poliza='\" . $variable [11] . \"', \";\n\t\t\t\t$cadenaSql .= \" fecha_inicio_pol='\" . $variable [12] . \"', \";\n\t\t\t\t$cadenaSql .= \" fecha_final_pol='\" . $variable [13] . \"', \";\n\t\t\t\t$cadenaSql .= \" marca='\" . $variable [14] . \"', \";\n\t\t\t\t$cadenaSql .= \" serie='\" . $variable [15] . \"', \";\n\t\t\t\t$cadenaSql .= \" nivel='\" . $variable [17] . \"', \";\n\t\t\t\t$cadenaSql .= \" cantidad_por_asignar='\" . $variable [2] . \"' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento='\" . $variable [16] . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"inhabilitar_elementos_individuales\" :\n\t\t\t\t$cadenaSql = \" UPDATE elemento_individual \";\n\t\t\t\t$cadenaSql .= \" SET estado_registro='FALSE' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento_ind='\" . $variable . \"' \";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultar_elementos_individuales_sin_placa\" :\n\t\t\t\t$cadenaSql = \" SELECT * \";\n\t\t\t\t$cadenaSql .= \" FROM elemento_individual \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento_gen='\" . $variable . \"' \";\n\t\t\t\t$cadenaSql .= \"AND placa IS NULL ;\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultar_elementos_individuales\" :\n\t\t\t\t$cadenaSql = \" SELECT * \";\n\t\t\t\t$cadenaSql .= \" FROM elemento_individual \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento_gen='\" . $variable . \"' \";\n\t\t\t\t$cadenaSql .= \"AND placa IS NOT NULL ;\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"estado_elemento_individual\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" UPDATE \";\n\t\t\t\t$cadenaSql .= \" elemento_individual \";\n\t\t\t\t$cadenaSql .= \" SET \";\n\t\t\t\t$cadenaSql .= \" estado_registro='FALSE' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento='\" . $variable . \"';\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"estado_elemento\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" UPDATE \";\n\t\t\t\t$cadenaSql .= \" elemento\";\n\t\t\t\t$cadenaSql .= \" SET \";\n\t\t\t\t$cadenaSql .= \" estado='FALSE' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento='\" . $variable . \"';\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"anular_elemento\" :\n\t\t\t\t$cadenaSql = \" INSERT INTO \";\n\t\t\t\t$cadenaSql .= \" elemento_anulado(\";\n\t\t\t\t$cadenaSql .= \"id_elemento,observacion) \";\n\t\t\t\t$cadenaSql .= \" VALUES (\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [0] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [1] . \"') ;\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// _________________________________________________\n\t\t\t\n\t\t\tcase \"consultarSolicitante\" :\n\t\t\t\t$cadenaSql = \" SELECT \";\n\t\t\t\t$cadenaSql .= \"dependencia, rubro \";\n\t\t\t\t$cadenaSql .= \" FROM solicitante_servicios \";\n\t\t\t\t$cadenaSql .= \" WHERE id_solicitante='\" . $variable . \"'\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultarEncargado\" :\n\t\t\t\t$cadenaSql = \" SELECT \";\n\t\t\t\t$cadenaSql .= \" id_tipo_encargado, nombre, identificacion, cargo,asignacion \";\n\t\t\t\t$cadenaSql .= \" FROM encargado \";\n\t\t\t\t$cadenaSql .= \" WHERE id_encargado='\" . $variable . \"'\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// _________________________________________________update___________________________________________\n\t\t\t\n\t\t\tcase \"actualizarSolicitante\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" UPDATE \";\n\t\t\t\t$cadenaSql .= \" solicitante_servicios\";\n\t\t\t\t$cadenaSql .= \" SET \";\n\t\t\t\t$cadenaSql .= \" dependencia='\" . $variable [0] . \"',\";\n\t\t\t\t$cadenaSql .= \" rubro='\" . $variable [1] . \"' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_solicitante='\" . $variable [2] . \"';\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"actualizarSupervisor\" :\n\t\t\t\t$cadenaSql = \" UPDATE supervisor_servicios \";\n\t\t\t\t$cadenaSql .= \" SET nombre='\" . $variable [0] . \"', \";\n\t\t\t\t$cadenaSql .= \" cargo='\" . $variable [1] . \"', \";\n\t\t\t\t$cadenaSql .= \" dependencia='\" . $variable [2] . \"' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_supervisor='\" . $variable [3] . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"actualizarContratista\" :\n\t\t\t\t$cadenaSql = \" UPDATE contratista_servicios \";\n\t\t\t\t$cadenaSql .= \" SET nombre_razon_social='\" . $variable [0] . \"', \";\n\t\t\t\t$cadenaSql .= \" identificacion='\" . $variable [1] . \"', \";\n\t\t\t\t$cadenaSql .= \" direccion='\" . $variable [2] . \"', \";\n\t\t\t\t$cadenaSql .= \" telefono='\" . $variable [3] . \"', \";\n\t\t\t\t$cadenaSql .= \" cargo='\" . $variable [4] . \"' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_contratista='\" . $variable [5] . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"actualizarEncargado\" :\n\t\t\t\t$cadenaSql = \" UPDATE encargado \";\n\t\t\t\t$cadenaSql .= \" SET id_tipo_encargado='\" . $variable [0] . \"', \";\n\t\t\t\t$cadenaSql .= \" nombre='\" . $variable [1] . \"', \";\n\t\t\t\t$cadenaSql .= \" identificacion='\" . $variable [2] . \"', \";\n\t\t\t\t$cadenaSql .= \" cargo='\" . $variable [3] . \"', \";\n\t\t\t\t$cadenaSql .= \" asignacion='\" . $variable [4] . \"' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_encargado='\" . $variable [5] . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"actualizarOrden\" :\n\t\t\t\t$cadenaSql = \" UPDATE \";\n\t\t\t\t$cadenaSql .= \" orden_servicio \";\n\t\t\t\t$cadenaSql .= \" SET \";\n\t\t\t\t$cadenaSql .= \" objeto_contrato='\" . $variable [0] . \"', \";\n\t\t\t\tif ($variable [1] != '') {\n\t\t\t\t\t$cadenaSql .= \" poliza1='\" . $variable [1] . \"', \";\n\t\t\t\t} else {\n\t\t\t\t\t$cadenaSql .= \" poliza1='0', \";\n\t\t\t\t}\n\t\t\t\tif ($variable [2] != '') {\n\t\t\t\t\t$cadenaSql .= \" poliza2='\" . $variable [2] . \"', \";\n\t\t\t\t} else {\n\t\t\t\t\t$cadenaSql .= \" poliza2='0', \";\n\t\t\t\t}\n\t\t\t\tif ($variable [3] != '') {\n\t\t\t\t\t$cadenaSql .= \" poliza3='\" . $variable [3] . \"', \";\n\t\t\t\t} else {\n\t\t\t\t\t$cadenaSql .= \" poliza3='0', \";\n\t\t\t\t}\n\t\t\t\tif ($variable [4] != '') {\n\t\t\t\t\t$cadenaSql .= \" poliza4='\" . $variable [4] . \"', \";\n\t\t\t\t} else {\n\t\t\t\t\t$cadenaSql .= \" poliza4='0', \";\n\t\t\t\t}\n\t\t\t\t$cadenaSql .= \" duracion_pago='\" . $variable [5] . \"', \";\n\t\t\t\t$cadenaSql .= \" fecha_inicio_pago='\" . $variable [6] . \"', \";\n\t\t\t\t$cadenaSql .= \" fecha_final_pago='\" . $variable [7] . \"', \";\n\t\t\t\t$cadenaSql .= \" forma_pago='\" . $variable [8] . \"', \";\n\t\t\t\t$cadenaSql .= \" total_preliminar='\" . $variable [9] . \"', \";\n\t\t\t\t$cadenaSql .= \" iva='\" . $variable [10] . \"', \";\n\t\t\t\t$cadenaSql .= \" total='\" . $variable [11] . \"', \";\n\t\t\t\t$cadenaSql .= \" fecha_diponibilidad='\" . $variable [12] . \"', \";\n\t\t\t\t$cadenaSql .= \" numero_disponibilidad='\" . $variable [13] . \"', \";\n\t\t\t\t$cadenaSql .= \" valor_disponibilidad='\" . $variable [14] . \"', \";\n\t\t\t\t$cadenaSql .= \" fecha_registrop='\" . $variable [15] . \"', \";\n\t\t\t\t$cadenaSql .= \" numero_registrop='\" . $variable [16] . \"', \";\n\t\t\t\t$cadenaSql .= \" valor_registrop='\" . $variable [17] . \"', \";\n\t\t\t\t$cadenaSql .= \" letra_registrop='\" . $variable [18] . \"' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_orden_servicio='\" . $variable [19] . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"limpiarItems\" :\n\t\t\t\t$cadenaSql = \" DELETE FROM \";\n\t\t\t\t$cadenaSql .= \" items_orden_compra \";\n\t\t\t\t$cadenaSql .= \" WHERE id_orden='\" . $variable . \"';\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"insertarItems\" :\n\t\t\t\t$cadenaSql = \" INSERT INTO \";\n\t\t\t\t$cadenaSql .= \" items_orden_compra(\";\n\t\t\t\t$cadenaSql .= \" id_orden, item, unidad_medida, cantidad, descripcion, \";\n\t\t\t\t$cadenaSql .= \" valor_unitario, valor_total)\";\n\t\t\t\t$cadenaSql .= \" VALUES (\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [0] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [1] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [2] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [3] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [4] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [5] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable [6] . \"');\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// listo\n\t\t\tcase \"consultarOrden\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT DISTINCT \";\n\t\t\t\t$cadenaSql .= \"id_orden_servicio, fecha_registro, \";\n\t\t\t\t$cadenaSql .= \"identificacion, dependencia \";\n\t\t\t\t$cadenaSql .= \"FROM orden_servicio \";\n\t\t\t\t$cadenaSql .= \"JOIN solicitante_servicios ON solicitante_servicios.id_solicitante = orden_servicio.id_solicitante \";\n\t\t\t\t$cadenaSql .= \"JOIN contratista_servicios ON contratista_servicios.id_contratista = orden_servicio.id_contratista \";\n\t\t\t\t$cadenaSql .= \"WHERE 1=1\";\n\t\t\t\tif ($variable [0] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND fecha_registro BETWEEN CAST ( '\" . $variable [0] . \"' AS DATE) \";\n\t\t\t\t\t$cadenaSql .= \" AND CAST ( '\" . $variable [1] . \"' AS DATE) \";\n\t\t\t\t}\n\t\t\t\tif ($variable [2] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND id_orden_servicio = '\" . $variable [2] . \"'\";\n\t\t\t\t}\n\t\t\t\tif ($variable [3] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND identificacion= '\" . $variable [3] . \"'\";\n\t\t\t\t}\n\t\t\t\tif ($variable [4] != '') {\n\t\t\t\t\t$cadenaSql .= \" AND dependencia= '\" . $variable [4] . \"'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"consultar_nivel_inventario\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT ce.elemento_id, ce.elemento_codigo||' - '||ce.elemento_nombre \";\n\t\t\t\t$cadenaSql .= \"FROM catalogo.catalogo_elemento ce \";\n\t\t\t\t$cadenaSql .= \"JOIN catalogo.catalogo_lista cl ON cl.lista_id = ce.elemento_catalogo \";\n\t\t\t\t$cadenaSql .= \"WHERE cl.lista_activo = 1 \";\n\t\t\t\t$cadenaSql .= \"AND ce.elemento_id > 0 \";\n\t\t\t\t$cadenaSql .= \"AND ce.elemento_padre > 0 \";\n\t\t\t\t$cadenaSql .= \"ORDER BY ce.elemento_codigo ASC ;\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"ConsultaTipoBien\" :\n\t\t\t\t$cadenaSql = \"SELECT ge.elemento_tipobien , tb.descripcion \";\n\t\t\t\t$cadenaSql .= \"FROM catalogo.catalogo_elemento ce \";\n\t\t\t\t$cadenaSql .= \"JOIN grupo.catalogo_elemento ge ON (ge.elemento_id)::text =ce .elemento_grupoc \";\n\t\t\t\t$cadenaSql .= \"JOIN arka_inventarios.tipo_bienes tb ON tb.id_tipo_bienes = ge.elemento_tipobien \";\n\t\t\t\t$cadenaSql .= \"WHERE ce.elemento_id = '\" . $variable . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'consultarExistenciaImagen' :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \"SELECT num_registro \";\n\t\t\t\t$cadenaSql .= \"FROM arka_movil.asignar_imagen \";\n\t\t\t\t$cadenaSql .= \"WHERE id_elemento ='\" . $variable . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"RegistrarElementoImagen\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" \tINSERT INTO arka_movil.asignar_imagen(\";\n\t\t\t\t$cadenaSql .= \" id_elemento, imagen ,prioridad) \";\n\t\t\t\t$cadenaSql .= \" VALUES (\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable ['elemento'] . \"',\";\n\t\t\t\t$cadenaSql .= \"'\" . $variable ['imagen'] . \"',\";\n\t\t\t\t$cadenaSql .= \"1) \";\n\t\t\t\t$cadenaSql .= \"RETURNING num_registro; \";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase \"ActualizarElementoImagen\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" UPDATE arka_movil.asignar_imagen \";\n\t\t\t\t$cadenaSql .= \"SET id_elemento='\" . $variable ['elemento'] . \"', imagen='\" . $variable ['imagen'] . \"' \";\n\t\t\t\t$cadenaSql .= \"WHERE num_registro='\" . $variable ['id_imagen'] . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"ConsultasPlacas\" :\n\t\t\t\t$cadenaSql = \" SELECT DISTINCT placa AS value, placa as data \";\n\t\t\t\t$cadenaSql .= \"FROM elemento_individual \";\n\t\t\t\t$cadenaSql .= \"WHERE placa IS NOT NULL \";\n\t\t\t\t$cadenaSql .= \" AND placa LIKE '%\" . $variable . \"%' \";\n\t\t\t\t$cadenaSql .= \"ORDER BY placa DESC ;\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"actualizar_cantidad_elemento\" :\n\t\t\t\t\n\t\t\t\t$cadenaSql = \" UPDATE \";\n\t\t\t\t$cadenaSql .= \" elemento \";\n\t\t\t\t$cadenaSql .= \" SET \";\n\t\t\t\t$cadenaSql .= \" cantidad_por_asignar='\".$variable['cantidad'].\"' \";\n\t\t\t\t$cadenaSql .= \" WHERE id_elemento='\" . $variable ['id_elemento'] . \"';\";\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $cadenaSql;\n\t}", "function getProdutoCol($col, $ref, $rel)\n{\n global $conn;\n /*\n *query da disciplina\n */\n $sql = \"SELECT pro_{$col} FROM \".TABLE_PREFIX.\"_produto WHERE pro_{$ref}=?\";\n if(!$qry = $conn->prepare($sql))\n echo divAlert($conn->error, 'error');\n\n else {\n\n if (!apenasNumeros($rel))\n $qry->bind_param('s', $rel);\n else\n $qry->bind_param('i', $rel);\n\n $qry->execute();\n $qry->bind_result($$col);\n $qry->fetch();\n $qry->close();\n\n return $$col;\n }\n\n}", "function make_query($logged_person){\n $table_name = \"LogInTable\"; \n $sql = \"SELECT * FROM $table_name WHERE \";\n \n //attributes \n $value = $logged_person->funcitional_query(\"account\",$logged_person->account);\n $sql .= $value.\" and \"; \n \n $value = $logged_person->funcitional_query(\"research_group\", $logged_person->research_group);\n $sql .= $value.\" and \"; \n\n $value = $logged_person->funcitional_query(\"password\", $logged_person->password);\n $sql .= $value.\" \"; \n \n return $sql; \n }", "function stmt($consulta){\n\t\t$resultado = '';\n\t\tif(!empty($consulta)){\n\t\t\t$resultado = New ArrayObject($consulta->fetchAll(PDO::FETCH_CLASS, 'stdClass'));\n\t\t}\n\t\treturn $resultado;\n\t}", "function BDDselect($sql, $param){\n $bdd = BDDopen();\n $req = $bdd->prepare($sql);\n if($req->execute($param) === FALSE){\n echo 'Errore de la requette';\n print_r($param);\n }\n return $req;\n}", "function selectFunction($primaryField,$polarityField,$textField,$tableName) {\n\t$sql=\"SELECT \" . $primaryField . \" AS ID, \" . $polarityField . \" AS field1,\" . $textField . \" AS field2 FROM \" . $tableName ;\n\treturn $sql ; \n}", "function query($select,$from,$where){\n\trequire '../../access.php';\n\n\t// Clean all the values posted.\n\t$select = strip_tags(charCheck($select));\n\t$from = strip_tags(charCheck($from));\n\t$where = strip_tags(whereCheck(charCheck($where)));\n\n\t// SET A DEFAULT QUERY\n\tif(empty($select)){\n\t\t$select = '*';\t\t\n\t}\n\tif(empty($from)){\n\t\t$from = 'employees';\n\t}\n\n\t// assemble the input info to SQL\n\t$query = \"SELECT $select FROM $from $where\";\n\t$result = mysqli_query($LinkID, $query);\n\t//uncomment for debugging\n\t//echo mysqli_error($LinkID);\n\n\n\n\t//parse the result into an associative array\n\t$things=mysqli_fetch_assoc($result);\n\t\n\t\n\tforeach (array_keys($things) as $key){\n\t\t$keys[]= $key;\n\t}\n\t\n\t//while there are rows of data write a new value to \n\twhile ($things=mysqli_fetch_assoc($result)) {\t\n\t\t$values[] = $things;\n\t}\n\n\t//append the keys to the array\n\t$list['titles'] = $keys;\n\t\n\t//append the values onto the end of the associative array\n\t$list['values'] = $values;\n\n\t//return the result\n\treturn $list;\n}", "function RellenaDatos()\n{//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t\t\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t} //si no se ejecuta con éxito \n\telse\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "public function select_all(string $query)\n{\n $this->strquery = $query;\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n $data = $result->fetchall(PDO::FETCH_ASSOC);\n return $data; \n}", "function FUNC_RETORNA_DESCRICAO_BAIRRO($pdo, $cod_bairro){\r\n $sql = \"SELECT * FROM Bairro WHERE Cod_Bairro = '$cod_bairro'\";\r\n $query = $pdo->prepare($sql);\r\n//executo o comando sql\r\n $query->execute();\r\n\r\n// Faço uma comparação para saber se a busca trouxe algum resultado\r\n if (($dados = $query->fetch()) == true) {\r\n $achou = 1;\r\n $descricao = $dados['Desc_Bairro'];\r\n } else {\r\n $achou = \"\";\r\n $descricao = \"\" . $sql;\r\n }\r\n\r\n\r\n $var = Array(\r\n \"achou\" => \"$achou\",\r\n \"descricao\" => \"$descricao\"\r\n );\r\n \r\n return $var;\r\n}", "function dataSelect() {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM pegawai ORDER BY id ASC\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}", "function recorre_tabla($nombret,$campot){\r\n$sql_query= \"Select $campot From $nombret where estado=true\";\r\n$consulta = pg_query($sql_query);\r\nwhile($fila=pg_fetch_row($consulta)) \r\n { echo \"<option value='\".$fila[1].\"'>\".$fila[0].\"</option>\"; } \r\n}", "public function getQuestions()\r\n{\r\n $query_string = \"SELECT questionid, question, choice1, choice2, choice3, choice4, ans \";\r\n $query_string .= \"FROM questions \";\r\n $query_string .= \"WHERE quizid = :quizid\";\r\n\r\n return $query_string;\r\n}", "public function getUserIDandEmail()\r\n{\r\n $query_string = \"SELECT userid FROM users \";\r\n $query_string .= \"WHERE username = :username OR email = :email\";\r\n\r\n return $query_string;\r\n}", "public function execSql(){\n\t\t$cant=func_num_args();\n\t\t$instSql=\"\";\n\t\t$instSql=$this->reemplazaParametro(func_get_args());\n//\t\techo \"<br>\".$instSql.\"<br>\";\n//\t\techo $this->tipodb.\"<br>\";\n//\t\t$this->registroLog($instSql,$_SESSION['PERMISO'][0],$_SESSION['PERMISO'][1]);\n\t\tswitch ($this->tipodb) {\n\t\t\tcase \"my\":\n\t\t\t\t$resultado=mysql_query($instSql,$this->conn);\n//echo mysql_errno().\"<br>\";\n\t\t\t\tbreak;\n\t\t\tcase \"pg\":\n\t\t\t\t$resultado=pg_query($this->conn,$instSql);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $resultado;\n\t}", "public function inject()\n\t{\n\t\t$insert = '?id=1%27 and 1%3d1 union select ';\n\t\treturn $insert;\n\t}", "function queryDB($sql,$values,$mode=3){\n global $pdo;\n $stmt = $pdo->prepare($sql);\n foreach($values as $value){\n if(is_array($value)){\n $stmt->bindValue($value[0],$value[1]);}\n else{\n $stmt->bindValue($values[0],$values[1]);\n }\n }\n \n $stmt->execute();\n if($mode==1){\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n return $result;\n }\n elseif($mode==2){\n $result = $stmt->fetchall(PDO::FETCH_ASSOC);\n return $result;\n }\n }", "function queryRicercaAvanzata ($info_utente, $hobby){\r\n \r\n // condizione dell'info utente\r\n $cond_info_utente = '';\r\n $cond_hobby = '';\r\n \r\n foreach ($info_utente as $key => $value) {\r\n if($value != 'NULL'){\r\n $cond_info_utente .= $key . '=' . $value . ' AND ';\r\n } \r\n }\r\n \r\n //considero il caso cui siano stati inseriti hobby nella ricerca\r\n //in caso affermativo viene aggiunta la condizione per gli hobby\r\n if(!empty($hobby)){\r\n foreach ($hobby as $key => $value) {\r\n $cond_hobby .= 'tipo_hobby' . '=' . $value . ' OR '; \r\n } \r\n $condizione = (trim($cond_info_utente . '(' . $cond_hobby , 'OR ')) . ')'; \r\n }\r\n // nel caso gli hobby non siano stati inseriti ripulisco la condizione togliendo and finali e \r\n // considero solo come condizione le info utente\r\n else{\r\n $condizione = trim($cond_info_utente , 'AND ');\r\n }\r\n \r\n $sql = 'SELECT email_utente, nickname, utente_esperto, utente_seguito, utente_seguace, path_img_profilo, data_ora_richiesta, ' .\r\n 'richiesta_accettata, data_ora_risposta ' . \r\n 'FROM (utente NATURAL JOIN info_utente ) LEFT OUTER JOIN seguaci_seguiti ' . \r\n 'ON email_utente = utente_seguito AND utente_seguace =' . \r\n \"'\" . $_SESSION['email_utente'] . \"' \" .\r\n 'WHERE email_utente IN (' .\r\n 'SELECT email_utente ' .\r\n 'FROM info_utente NATURAL LEFT OUTER JOIN hobby ' .\r\n 'WHERE ' . $condizione . ')'; \r\n\r\n return $sql;\r\n}", "public function getSQL(){\n $sqlString = \"select \";\n $campos = $this->getCampos();\n //var_dump($campos);\n if (is_array($campos) && empty($campos)) {\n $sqlString .= \" * \";\n } else {\n $campos = \"\";\n foreach ($this->getCampos() as $key => $value) {\n if (!$campos == \"\") { \n $campos.=\" ,\"; \n };\n $campos.=\" \".$value.\" as \".$key.\" \";\n }\n $sqlString .= $campos;\n }\n $sqlString .= \" from \" . $this->getTabla();\n if ( $this->getSQLFilter() != \"\" ) {\n $sqlString .= \" where \" . $this->getSQLFilter();\n }\n \n $sqlString .= $this->getSQLGroupBy();\n $sqlString .= $this->getSQLOrderBy();\n //echo $sqlString.\"\\n\";\n return $sqlString; \n }", "function readQuery() {\n\t\t$this->FiscaalGroepID = $this->queryHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->queryHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->queryHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->queryHelper(\"GewijzigdOp\", \"\");\n\t}", "protected function getParametrosWhere(){\n\t\t\t$parametros = array();\n\t\t\t$parametros[\":pkusuario\"] = $this->pkUsuario;\n\t\t\treturn $parametros;\n\t}", "function fetch($table, $campos=\"*\", $where=\"\", $order=\"\", $tipo=\"\", $limite=\"\"){\n\n\t\t$sql = \"SELECT DISTINCT \";\n\n\t\tif(is_array($campos)){\n\n\t\t\tforeach ($campos as $value){\n\t\t\t\t$sql .= \"'$value' ,\";\n\t\t\t}\n\n\t\t\t$strCut = strlen($sql) -1;\n\t\t\t$sql = substr($sql,0,$strCut);\n\n\t\t}else{\n\n\t\t\t$sql .= \" $campos \";\n\n\t\t}\n\n\t\tif ( strstr($table, \"|\") ) {\n\n\t\t\t$fromTable = substr($table,0,strpos($table,\"|\"));\n\n\t\t\t$leftJoin = substr($table,strpos($table,\"|\"),strlen($table));\n\n\t\t\t$leftJoin = explode(\"|\",$leftJoin);\n\n\t\t\t$sql .= \" FROM \".$fromTable;\n\n\t\t\tforeach ($leftJoin as $ex){\n\n\t\t\t\t$leftEx = explode(\">\", $ex );\n\n\t\t\t\t@list($left_table, $on_condition) = $leftEx;\n\n\t\t\t\tif(!empty($left_table)){\n\t\t\t\t\t$sql .= \" LEFT JOIN \" . $left_table;\n\t\t\t\t}\n\t\t\t\tif(!empty($on_condition)){\n\t\t\t\t\t$sql .= \" ON \" . $on_condition;\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t$sql .= \" FROM $table \";\n\n\t\t}\n\n\n\t\tif(!empty($where)) $sql .= \" WHERE \";\n\n\n\t\tif(is_array($where)){\n\n\t\t\tforeach ($where as $key => $value){\n\n\t\t\t\tif( strstr($value,\"!\") ){\n\t\t\t\t\t\t$value = substr($value, 1);\n\t\t\t\t\t\tif (strtolower($value) == \"empty\"){\n\t\t\t\t\t\t\t\t$sql .= \" $key <> '' OR $key <> 0 OR $key <> NULL AND\";\n\t\t\t\t\t\t}else if(is_int($value)){\n\t\t\t\t\t\t\t\t$sql .= \" $key <> $value OR $key <> 0 OR $key <> NULL AND\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$sql .= \" $key <> '$value' OR $key <> 0 OR $key <> NULL AND\";\n\t\t\t\t\t\t}\n\n\t\t\t\t}elseif( strstr($value,\"!<\") ){\n\t\t\t\t\t\t$value = substr($value, 2);\n\t\t\t\t\t\tif (strtolower($value) == \"empty\"){\n\t\t\t\t\t\t\t\t$sql .= \" $key <= '' AND\";\n\t\t\t\t\t\t}else if(is_int($value)){\n\t\t\t\t\t\t\t\t$sql .= \" $key <= $value AND\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$sql .= \" $key <= '$value' AND\";\n\t\t\t\t\t\t}\n\n\t\t\t\t}elseif( strstr($value,\"!>\") ){\n\t\t\t\t\t\t$value = substr($value, 2);\n\t\t\t\t\t\tif (strtolower($value) == \"empty\"){\n\t\t\t\t\t\t\t\t$sql .= \" $key >= '' AND\";\n\t\t\t\t\t\t}else if(is_int($value)){\n\t\t\t\t\t\t\t\t$sql .= \" $key >= $value AND\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$sql .= \" $key >= '$value' AND\";\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(is_int($value)){\n\t\t\t\t\t\t$sql .= \" $key LIKE $value AND\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t$sql .= \" $key LIKE '$value' AND\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$strCut = strlen($sql)-3;\n\t\t\t$sql = substr($sql,0,$strCut);\n\n\t\t}else{\n\n\t\t\t$sql .= \" $where \";\n\n\t\t}\n\n\t\t//envia sql para total rows\n\t\t$this->sql = $sql;\n\n\t\tif(!empty($order)) $sql .= \" ORDER BY \";\n\n\n\t\tif(is_array($order)){\n\n\t\t\tforeach ($order as $value){\n\t\t\t\t$sql .= \"$value ,\";\n\t\t\t}\n\n\t\t\t$strCut = strlen($sql)-1;\n\t\t\t$sql = substr($sql,0,$strCut);\n\n\t\t}else{\n\n\t\t\t$sql .= \" $order \";\n\n\t\t}\n\n\t\tif(!empty($tipo)) $sql .= \" $tipo \";\n\n\t\tif(!empty($limite)) $sql .= \" LIMIT $limite \";\n\n\t\t$qr = mysql_query($sql) or die($sql . \" <hr> \" . mysql_error());\n\t\t$rows = mysql_num_rows($qr);\n\n\t if($rows){\n\n\t\t\twhile ($rs = mysql_fetch_array($qr) ) {\n\n\t\t\t\t$exFetch[] = $rs;\n\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t\t$exFetch = false;\n\t\t}\n\n\t\treturn $exFetch;\n\n\t}", "function queryRicercaTuttiGliUtenti(){\r\n \r\n $sql = 'SELECT email_utente, nickname, utente_esperto, utente_seguito, utente_seguace, path_img_profilo, data_ora_richiesta, ' .\r\n 'richiesta_accettata, data_ora_risposta ' . \r\n 'FROM (utente NATURAL JOIN info_utente ) LEFT OUTER JOIN seguaci_seguiti ' . \r\n 'ON email_utente = utente_seguito AND utente_seguace =' . \r\n \"'\" . $_SESSION['email_utente'] . \"'\" ;\r\n \r\n return $sql;\r\n}", "function get_personal_info($arguments, $names){\n $table_header=\"<table class='table table-hover table-dark'><thead><tr><th scope='col'>henkiloId\";\n \n for ($i=0; $i < count($arguments); $i++){\n $table_header .= \"<th scope='col'>\".str_replace(\"'\", \"\", $arguments[$i]) .\"</th>\";\n }\n $table_header .= \"</tr></thead>\";\n \n $sql = (\"SELECT idhenkilo,\".str_replace(\"'\",\"\",implode(\",\", $arguments)).\" FROM henkilo WHERE idhenkilo IN (\".implode(',',$names).\") \n ORDER BY idhenkilo\");\n $result = execute_query($sql);\n $table_row=\"\";\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n $table_row .= \"<tr>\";\n foreach ($row as $item) {\n $table_row .= \"<td>\". $item.\"</td>\";\n }\n $table_row .= \"</tr>\";\n }\n $html_table=$table_header. $table_row. \"</table>\";\n return $html_table;\n } else {\n return \"Antamillasi hakuehdoilla ei löytynyt tuloksia\";\n //return $sql;\n }\n \n}", "function orario($id,$p){\n $ora='';\n $sql_orario=\"SELECT Giorno, Orario FROM \".BLOCCHI.\" WHERE Codice_Corso=:id\";\t\n if($stmt1 = $p->prepare($sql_orario)){\n // Bind variables to the prepared statement as parameters\n $stmt1->bindParam(\":id\", $id, PDO::PARAM_STR);\n \n // Attempt to execute the prepared statement\n if($stmt1->execute()){\n \n // Check results\n while($row = $stmt1->fetch()){\n $ora.=$row[\"Giorno\"].\" \".$row[\"Orario\"].\"<br>\";\n\n \n }\n \n \n } else{\n echo \"Oops! Something went wrong. Please try again later.\";\n }\n\n}\nunset($stmt1);\nreturn($ora);\n\n\n}", "private function GeneraSelectQuery($fields,$where)\r\n\t{\r\n\t\t$sql=\"select \r\n\t\t\t\".$fields.\" \r\n\t\t\tfrom Tabla\r\n\t\t\tinner join Tabla1 on Tabla1.id=Tabla.idTabla1\r\n\t\t\t\".(($where)?\" WHERE \".$where:\"\");\r\n\t\treturn $sql;\r\n\t}", "function armarCodigoPrestacion($aux) {\r\n $q = \"SELECT * FROM nomenclador.grupo_prestacion\r\n WHERE id_grupo_prestacion=$aux\";\r\n $result_codigo = sql($q, \"Error al consultar grupo_prestacion $aux\", 0) or\r\n excepcion(\"Error al consultar grupo_prestacion\");\r\n $codigoarmado = $result_codigo->fields['categoria_padre'] . $result_codigo->fields['profesional'] . $result_codigo->fields['codigo'];\r\n return $codigoarmado;\r\n}", "function sql_query_registrosProcessamentoArquivo($sCampos = \"*\", $sWhere = null, $sGroupBy = null, $sOrderBy = null) {\n\n \t\n \t\n \t$sql = \"select case when quantidade_cgm = 1 \";\n $sql .= \" then true \";\n $sql .= \" else false \";\n $sql .= \" end as cnpj_valido, \";\n $sql .= \" * \";\n $sql .= \" from (select (select count(z01_numcgm) \";\n $sql .= \" from cgm \";\n $sql .= \" where z01_cgccpf =issarqsimplesreg.q23_cnpj) as quantidade_cgm, \";\n \t$sql .= !empty($sCampos) ? $sCampos : \"*\";\n $sql .= \" from issarqsimplesreg \";\n $sql .= \" inner join issarqsimples \";\n $sql .= \" on issarqsimples.q17_sequencial = issarqsimplesreg.q23_issarqsimples \";\n $sql .= \" left join issarqsimplesregissbase \";\n $sql .= \" on issarqsimplesregissbase.q134_issarqsimplesreg = issarqsimplesreg.q23_sequencial \";\n $sql .= \" inner join db_config \";\n $sql .= \" on db_config.codigo = issarqsimples.q17_instit \";\n \t$sql .= !empty($sWhere) ? \" where {$sWhere} \\n\" : \"\"; \n \t$sql .= !empty($sGroupBy) ? \" group by {$sGroupBy} \\n\" : \"\"; \n \t$sql .= !empty($sOrderBy) ? \" order by {$sOrderBy} \\n\" : \"\";\n $sql .= \" ) as x \";\n \treturn $sql;\n }", "function mysql11($tabla,$enQueColumna,$queBuscar){\n\t$query1=\"SELECT * FROM $tabla WHERE $enQueColumna='$queBuscar';\";\n\t$query2=mysql_query($query1);\n\t$resultado=mysql_fetch_row($query2);\n\treturn $resultado;\n\n/*\nComo usar\n\n$tabla = '';\n$enQueColumna = '';\n$queBuscar = '';\n$rtdo = mysql11($tabla,$enQueColumna,$queBuscar);\n\nComo ver datos\nforeach($rtdo as $value){\n \techo $value;\n}\n*/\n}", "function dbacha($sql, $retorno) {\r\n $qtemp = DBExecute($sql . \" LIMIT 0,1\");\r\n foreach ($qtemp as $r) {\r\n $campo = $r[$retorno];\r\n }\r\n return $campo;\r\n }", "function cursoPorComponenteAsistencia($param){\n \n $sql=\"SELECT justificadas.curso, justificadas.total, justificadas.excusamedica, justificadas.calamidad, justificadas.estudio , justificadas.transportemas, nojustificadas.totalinasistencia, nojustificadas.trabajo, nojustificadas.nojustificada, nojustificadas.trasnportemenos\n\nFROM\n(select si1.curso, si1.total, si1.excusamedica, si1.calamidad, si2.estudio , si2.transportemas\nfrom\n(select no1.curso, no1.inasistencia as total, no1.inasistencia2 as excusamedica, no2.inasistencia2 as calamidad\nfrom\n (select asistencia.curso, asistencia.inasistencia, motivo1.inasistencia2\n from\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia from a_grupos, (select substr(cu.codigo,7,3) as \nnombre, count (asiste)as inasistencia from cu_asistencias cu where substr(cu.codigo,1,6)=(select cod_componente \nfrom v_componentes_programas where cod_componente='$param' and semestre='1' and \ncod_programa='003') and substr(cu.codigo,7,3) IN (select codigo from a_grupos where cod_programa='003') \nand asiste=false and cod_interno IN (select cod_interno from a_persona where cod_estado='11') group by \nnombre order by nombre asc)as pi where codigo=nombre and cod_programa='003') asistencia\nleft join\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia2 from a_grupos, \n (select substr(cu.codigo,7,3) as nombre, count (asiste)as inasistencia2 from cu_asistencias cu where substr \n(cu.codigo,1,6)=(select cod_componente from v_componentes_programas where \ncod_componente='$param' and semestre='1' and cod_programa='003') and substr \n(cu.codigo,7,3) IN (select codigo from a_grupos where cod_programa='003') and asiste=false and cod_motivo='1' \nand cod_interno IN (select cod_interno from a_persona where cod_estado='11') group by nombre order by \nnombre asc)as pi where codigo=nombre and cod_programa='003') motivo1\nON(asistencia.curso= motivo1.curso))as no1\nleft join\n(select asistencia.curso, asistencia.inasistencia, motivo1.inasistencia2\n from\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia from a_grupos, (select substr(cu.codigo,7,3) as \nnombre, count (asiste)as inasistencia from cu_asistencias cu where substr(cu.codigo,1,6)=(select \ncod_componente from v_componentes_programas where nombre_componente='$param' and \nsemestre='1' and cod_programa='003') and substr(cu.codigo,7,3) IN (select codigo from a_grupos where \ncod_programa='003') and asiste=false and cod_interno IN (select cod_interno from a_persona where \ncod_estado='11') group by nombre order by nombre asc)as pi where codigo=nombre and cod_programa='003') \nasistencia\nleft join\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia2 from a_grupos, \n (select substr(cu.codigo,7,3) as nombre, count (asiste)as inasistencia2 from cu_asistencias cu where substr \n(cu.codigo,1,6)=(select cod_componente from v_componentes_programas where \ncod_componente='$param' and semestre='1' and cod_programa='003') and substr \n(cu.codigo,7,3) IN (select codigo from a_grupos where cod_programa='003') and asiste=false and cod_motivo='2' \nand cod_interno IN (select cod_interno from a_persona where cod_estado='11') group by nombre order by \nnombre asc)as pi where codigo=nombre and cod_programa='003') motivo1\nON(asistencia.curso= motivo1.curso))as no2\nON(no1.curso=no2.curso))as si1\nleft join\n(select no1.curso, no1.inasistencia as total, no1.inasistencia2 as estudio , no2.inasistencia2 as transportemas\nfrom\n (select asistencia.curso, asistencia.inasistencia, motivo1.inasistencia2\n from\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia from a_grupos, (select substr(cu.codigo,7,3) as \nnombre, count (asiste)as inasistencia from cu_asistencias cu where substr(cu.codigo,1,6)=(select cod_componente \nfrom v_componentes_programas where cod_componente='$param' and semestre='1' and \ncod_programa='003') and substr(cu.codigo,7,3) IN (select codigo from a_grupos where cod_programa='003') \nand asiste=false and cod_interno IN (select cod_interno from a_persona where cod_estado='11') group by \nnombre order by nombre asc)as pi where codigo=nombre and cod_programa='003') asistencia\nleft join\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia2 from a_grupos, \n (select substr(cu.codigo,7,3) as nombre, count (asiste)as inasistencia2 from cu_asistencias cu where substr \n(cu.codigo,1,6)=(select cod_componente from v_componentes_programas where \ncod_componente='$param' and semestre='1' and cod_programa='003') and substr \n(cu.codigo,7,3) IN (select codigo from a_grupos where cod_programa='003') and asiste=false and cod_motivo='4' \nand cod_interno IN (select cod_interno from a_persona where cod_estado='11') group by nombre order by \nnombre asc)as pi where codigo=nombre and cod_programa='003') motivo1\nON(asistencia.curso= motivo1.curso))as no1\nleft join\n(select asistencia.curso, asistencia.inasistencia, motivo1.inasistencia2\n from\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia from a_grupos, (select substr(cu.codigo,7,3) as \nnombre, count (asiste)as inasistencia from cu_asistencias cu where substr(cu.codigo,1,6)=(select \ncod_componente from v_componentes_programas where cod_componente='$param' and \nsemestre='1' and cod_programa='003') and substr(cu.codigo,7,3) IN (select codigo from a_grupos where \ncod_programa='003') and asiste=false and cod_interno IN (select cod_interno from a_persona where \ncod_estado='11') group by nombre order by nombre asc)as pi where codigo=nombre and cod_programa='003') \nasistencia\nleft join\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia2 from a_grupos, \n (select substr(cu.codigo,7,3) as nombre, count (asiste)as inasistencia2 from cu_asistencias cu where substr \n(cu.codigo,1,6)=(select cod_componente from v_componentes_programas where \ncod_componente='$param' and semestre='1' and cod_programa='003') and substr \n(cu.codigo,7,3) IN (select codigo from a_grupos where cod_programa='003') and asiste=false and cod_motivo='6' \nand cod_interno IN (select cod_interno from a_persona where cod_estado='11') group by nombre order by \nnombre asc)as pi where codigo=nombre and cod_programa='003') motivo1\nON(asistencia.curso= motivo1.curso))as no2\nON(no1.curso=no2.curso))as si2\nON(si1.curso=si2.curso)\n\n)as justificadas\n\nLEFT JOIN\n\n(select no1.curso, no1.inasistencia as totalinasistencia, no1.inasistencia2 as trabajo, no2.inasistencia as nojustificada, no2.inasistencia2 as trasnportemenos\nfrom\n (select asistencia.curso, asistencia.inasistencia, motivo1.inasistencia2\n from\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia from a_grupos, (select substr(cu.codigo,7,3) as \nnombre, count (asiste)as inasistencia from cu_asistencias cu where substr(cu.codigo,1,6)=(select \ncod_componente from v_componentes_programas where cod_componente='$param' and \nsemestre='1' and cod_programa='003') and substr(cu.codigo,7,3) IN (select codigo from a_grupos where \ncod_programa='003') and asiste=false and cod_interno IN (select cod_interno from a_persona where \ncod_estado='11') group by nombre order by nombre asc)as pi where codigo=nombre and cod_programa='003') \nasistencia\nleft join\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia2 from a_grupos, \n (select substr(cu.codigo,7,3) as nombre, count (asiste)as inasistencia2 from cu_asistencias cu where substr \n(cu.codigo,1,6)=(select cod_componente from v_componentes_programas where \ncod_componente='$param' and semestre='1' and cod_programa='003') and substr \n(cu.codigo,7,3) IN (select codigo from a_grupos where cod_programa='003') and asiste=false and cod_motivo='3' \nand cod_interno IN (select cod_interno from a_persona where cod_estado='11') group by nombre order by \nnombre asc)as pi where codigo=nombre and cod_programa='003') motivo1\nON(asistencia.curso= motivo1.curso))as no1\n\nleft join\n(select asistencia.curso, asistencia.inasistencia, motivo1.inasistencia2\n from\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia from a_grupos, (select substr(cu.codigo,7,3) as \nnombre, count (asiste)as inasistencia from cu_asistencias cu where substr(cu.codigo,1,6)=(select \ncod_componente from v_componentes_programas where cod_componente='$param' and \nsemestre='1' and cod_programa='003') and substr(cu.codigo,7,3) IN (select codigo from a_grupos where \ncod_programa='003') and asiste=false and cod_motivo='0' and cod_interno IN (select cod_interno from a_persona \nwhere cod_estado='11') group by nombre order by nombre asc)as pi where codigo=nombre and \ncod_programa='003') asistencia\nleft join\n (SELECT (grupo||'-'||subgrupo)as curso, inasistencia2 from a_grupos, \n (select substr(cu.codigo,7,3) as nombre, count (asiste)as inasistencia2 from cu_asistencias cu where substr \n(cu.codigo,1,6)=(select cod_componente from v_componentes_programas where \ncod_componente='$param' and semestre='1' and cod_programa='003') and substr \n(cu.codigo,7,3) IN (select codigo from a_grupos where cod_programa='003') and asiste=false and cod_motivo='5' \nand cod_interno IN (select cod_interno from a_persona where cod_estado='11') group by nombre order by \nnombre asc)as pi where codigo=nombre and cod_programa='003') motivo1\nON(asistencia.curso= motivo1.curso))as no2\nON(no1.curso=no2.curso)) as nojustificadas\n\nON(justificadas.curso=nojustificadas.curso)\";\nreturn DB::query($sql);\n\n }", "function formatAndQuery() {\n\tglobal $DB;\n\t$args = func_get_args();\n\t$query = array_shift($args); #remove the first element of the array as its own variable\n\t$query = str_replace(\"%sv\",\"'%s'\",$query);\n\tforeach ($args as $key => $val)\n\t {\n\t $args[$key] = $DB->real_escape_string($val);\n\t\t\t$args[$key] = htmlspecialchars($val);\n\t }\n\t$query = vsprintf($query, $args);\n\t$result = $DB->query($query);\n\tif (!$result)\n\t{\n\tthrow new Exception($DB->error.\" [$query]\");\n\t}\n\treturn $result;\n}", "function buildQuery(){\n\t\t$r = ($this->fieldName == \"\") ? \"SELECT * FROM \" . $this->tableName . \";\" : \"SELECT * FROM \" . $this->tableName . \" WHERE \" . $this->fieldName . \" = \" . $this->fieldValue . \";\";\n\t\t//print \"executing $r <br/>\";\n\t\treturn $r;\n\t}", "public function createQuery(): string\n {\n return 'INSERT INTO products(name,quantity,price,msrp) \n VALUES(:name,:quantity,:price,:msrp)';\n }", "private function getSyntaxe(){\n $Fields = implode(', ', array_keys($this->Dados));\n $Places = ':' . implode(', :', array_keys($this->Dados));\n\n $this->Create = \"INSERT INTO {$this->Tabela} ({$Fields}) VALUES ({$Places})\";\n }", "public function cpSelect($tablename,$value1=0,$value2=0) {\n /*\n * Prepare the select statement\n */\n $sql=\"SELECT * FROM $tablename\";\n if($value1!=0)\n { $key1= key($value1);\n $sql.=\" where $key1='$value1[$key1]'\";\n }\n if($value1!=0 && $value2!=0) \n {\n $key2= key($value2);\n $sql.=\" AND $key2='$value2[$key2]'\";\n }\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}", "function sql_query_issplaninscr ($q20_planilha, $campos = \"*\") {\n\t \t\n\t \t$sql = \"select \";\n\t \tif ( $campos != \"*\") {\n\t \t\t\n\t \t\t$campos_sql = split(\"#\",$campos);\n\t \t\t$virgula = \"\";\n\t \t\tfor($i=0;$i<sizeof($campos_sql);$i++){\n\t \t\t\t$sql .= $virgula.$campos_sql[$i];\n\t \t\t\t$virgula = \",\";\n\t \t\t}\n\t \t} else { \n\t \t\t$sql .= $campos;\n\t \t}\n\t \t\n\t \t$sql .= \" from issplan\";\n\t \t$sql .= \" \tleft join issplaninscr on q24_planilha = q20_planilha\";\n\t \t$sql .= \" left join issplannumpre on q32_planilha = q20_planilha\";\n\t \t$sql .= \" where issplan.q20_planilha = {$q20_planilha}\";\n\n\t \treturn $sql;\n\t }", "function clonResultados($T_RESULTADOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO){\n\n global $mysqli;\n $TRES = $T_RESULTADOS;\n $query = new Query($mysqli, \"INSERT INTO \".$TRES.\" SELECT * FROM resultadostmp WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "public function traerDatos(Sql $sql);", "function parsingSql()\r\n\t{\r\n\t\tif ( preg_match(\"/{(.*?)}/\",$this->sql,$match) )\r\n\t\t{\r\n\t\t\t$this->valueToReplace = $match[0]; // {blabla}\r\n\t\t\t$this->fieldToSelect = $match[1]; // nama field yang akan di cek\r\n\t\t}else{\r\n\t\t\tdie(\"SQL query yg anda masukan harus mengandung {}\");\r\n\t\t\treturn ;\r\n\t\t}\r\n\t}", "function mysql29($campos, $tabla1, $columna1, $queBuscar1, $columna2, $queBuscar2, $columna3, $queBuscar3, $colOrden, $orden, $limite){\n\t$query01=\"SELECT $campos FROM $tabla1 WHERE $columna1 = '$queBuscar1' AND $columna2 = '$queBuscar2' AND $columna3 = '$queBuscar3' ORDER BY $colOrden $orden Limit $limite\";\n $query02=mysql_query($query01);\n\t$resultado = array();\n\twhile( $line = mysql_fetch_array($query02, MYSQL_ASSOC) ){\n\t\t$resultado[] = $line;\n\t}\n\treturn $resultado;\n/*\n$campos = '';\n$tabla1 = '';\n$columna1 = '';\n$queBuscar1 = '';\n$columna2 = '';\n$queBuscar2 = '';\n$columna3 = '';\n$queBuscar3 = '';\n$colOrden = '';\n$orden = '';\n$limite = '';\n*/\n}", "function listQueryPeriodeGA() {\n $sql = \"select * from \" . static::table('ga_periodegaji');\n\n return $sql;\n }", "public\n\tfunction limpiadorSql( $valor ) {\n\n\t\t$variable = mysqli_real_escape_string( $this->connection, $valor );\n\n\t\treturn $variable;\n\n\t}", "function campo($tabla,$campo,$criterio,$pos,$and=''){\n\t$array=CON::getRow(\"SELECT $pos FROM $tabla WHERE $campo='$criterio' $and\");\n\treturn $array[$pos];\n}", "public function consultarDatos($consultaSQL){\n $conexionBD=$this->conectarBD();\n\n //2.Preparar la consulta que se va a realizar\n $consultaBuscarDatos= $conexionBD->prepare($consultaSQL);\n\n //3. Definir la forma en la que vmos a traer los datos\n // setFetchMode\n $consultaBuscarDatos->setFetchMode(PDO::FETCH_ASSOC);\n\n //4.Ejecutar la consulta\n $consultaBuscarDatos->execute();\n\n //5. Retornar los datos consultados\n return($consultaBuscarDatos->fetchAll());\n\n\n\n}", "function querySegui($utente_seguito){\r\n \r\n $sql = 'INSERT INTO seguaci_seguiti(utente_seguace, utente_seguito) ' .\r\n 'VALUES(' . \"'\" . $_SESSION['email_utente'] . \"'\" . ',' . $utente_seguito . ')';\r\n \r\n \r\n return $sql;\r\n \r\n}", "function &fDefineQry(&$db, $pQry=false){\n global $rsH, $rsG;\n // echo 'original: '.$pQry;\n $db->Execute(\"SET lc_time_names = 'es_EC'\");\n $v=substr ($pQry, 0, 13);\n $f1=substr ($pQry, 23, 8);\n $f2=substr ($pQry, 38, 8);\n list($d,$m,$a)=explode(\"/\",$f1);\n $f1n='20'.$a.\"-\".$m.\"-\".$d;\n list($d,$m,$a)=explode(\"/\",$f2);\n $f2n='20'.$a.\"-\".$m.\"-\".$d;\n \n if($v=='com_FecContab')\n {\n $slCond=$pQry;\n $slCond='com_FecContab BETWEEN \"'.$f1n.'\" AND \"'.$f2n.'\"';\n }\n else\n {\n $slCond=$pQry;\n }\n \n // ECHO 'condicion: '.$slCond; \n \n $slSqlH =\"select\n\t\t com_NumComp as factura, \n\t\t com_codreceptor , \n\t\t com_refoperat as 'semana', \n\t\t cl.aux_nombre AS 'productor', \n\t\t bo.aux_codigo AS 'cod_bod_origen', \n\t\t SUBSTRING(bo.aux_nombre,8) AS 'bodega', \n\t\t cl.aux_codigo AS 'codProductor', \n\t\t act_codauxiliar AS coditem, \n\t\t concat(act_descripcion, ' ', ifnull(act_descripcion1,'')) as 'item', \n\t\t det_ValUnitario as 'valor_unitario' ,\n\t\t det_cantequivale as 'cantidad',\n\t\t \n\t\t CASE WHEN (act_IvaFlag=2) THEN det_ValTotal\n\t\t WHEN (act_IvaFlag=3) THEN (det_ValTotal/(1+(tsd_PorcentajeBI/100)))\n\t\t ELSE det_ValTotal\n\t\t END AS 'BASE_IMPONIBLE',\n\t\t \n\t\t \n\t\t CASE WHEN (act_IvaFlag=0) THEN '0'\n\t\t ELSE tsd_PorcentajeBI\n\t\t END AS 'PORCENTAJE_IVA',\n\t\t CASE WHEN (act_IvaFlag=0) THEN '0'\n\t\t ELSE det_ValTotal*(tsd_PorcentajeBI/100)\n\t\t END AS 'IVA',\n\t\t CASE WHEN (act_IvaFlag=2) THEN (det_ValTotal+(det_ValTotal*(tsd_PorcentajeBI/100)))\n\t\t WHEN (act_IvaFlag=3) THEN det_ValTotal\n\t\t ELSE det_ValTotal\n\t\t END AS 'TOTAL'\n\t from\n\t\t concomprobantes\n\t\t left join invdetalle on det_regnumero = com_regnumero \n\t\t left join v_conauxiliar cl on cl.aux_codigo = com_codreceptor \n\t\t left join v_conauxiliar bo on bo.aux_codigo = com_emisor \n\t\t left join conactivos it on it.act_codauxiliar = det_coditem \n\t\t left join invprecios on pre_lisprecios = 2 and pre_coditem = det_coditem \n\t\t left join invprocesos on pro_codproceso = 5 and cla_TipoTransacc = com_TipoComp,\n\t\t gentasacabecera,\n\t\t gentasadetalle\n\t WHERE \n\t\t com_TipoComp='FA' AND \n\t\t tsc_ID=tsd_ID AND\n\t\t tsd_Rubro=1 AND $slCond\n\t ORDER BY\n\t\t\tbodega,productor\";\n\n $rsG = $db->Execute($slSqlH);\n return $rsG;\t\n}", "function clonInscritos($T_INSCRITOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $query = new Query($mysqli, \"INSERT INTO \".$TINS.\" SELECT * FROM inscritostmp WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "private function list_data_sql()\n\t{\n\t\t$this->db\n\t\t\t->from('tweb_penduduk u')\n\t\t\t->join('tweb_keluarga d', 'u.id_kk = d.id', 'left')\n\t\t\t->join('tweb_wil_clusterdesa a', 'd.id_cluster = a.id', 'left')\n\t\t\t->join('tweb_penduduk_sex x', 'u.sex = x.id', 'left')\n\t\t\t->join('tweb_penduduk_agama g', 'u.agama_id = g.id', 'left')\n\t\t\t->join('tweb_status_dasar sd', 'u.status_dasar = sd.id', 'left')\n\t\t\t->join('log_penduduk log', 'u.id = log.id_pend', 'left')\n\t\t\t->join('ref_pindah rp', 'rp.id = log.ref_pindah', 'left')\n\t\t\t->where('u.status_dasar >', 1)\n\t\t\t->where_in('log.id_detail', array(2, 3, 4));\n\n\t\t$this->search_sql();\n\t\t$this->status_dasar_sql();\n\t\t$this->sex_sql();\n\t\t$this->agama_sql();\n\t\t$this->dusun_sql();\n\t\t$this->rw_sql();\n\t\t$this->rt_sql();\n\t}", "function constitueCommande($idProd,$idCommande,$qteProd){\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"INSERT INTO `constitue`(`idProduit`, `idCommande`, `qteProduit`) \n VALUES (:idp,:idc,:qteP);\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':idc', $idCommande);\n $statement->bindParam(':idp', $idProd);\n $statement->bindParam(':qteP', $qteProd);\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $statement->execute();\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n\n}", "public function busca() {\r\n $this->SQL = \"SELECT rcja_usuarios.empleado, rcja_usuarios.nif, rcja_usuarios.nombre, \";\r\n $this->SQL .= \"\t\t rcja_usuarios.perfil_Usuario, rcja_usuarios.etiqueta_Emp, rcja_usuarios.observaciones_Emp, rcja_usuarios.centro_Directivo_Depart, \";\r\n $this->SQL .= \"\t\t rcja_usuarios.centro_Trabajo, rcja_usuarios.puesto_Trabajo, rcja_usuarios.servicio, rcja_usuarios.tipo_Usuario, rcja_usuarios.grupo_Nivel \";\r\n $this->SQL .= \" FROM rcja_usuarios\";\r\n //$this->debug($this->SQL);\r\n return $this->SQL;\r\n }", "function sql_query_dados_plano ( $c60_anousu=null, $campos=\"*\",$ordem=null,$dbwhere=\"\") {\n $sql = \"select \";\n if($campos != \"*\" ){\n $campos_sql = split(\"#\",$campos);\n $virgula = \"\";\n for($i=0;$i<sizeof($campos_sql);$i++){\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }else{\n $sql .= $campos;\n }\n $sql .= \" from conplanoorcamento \";\n $sql .= \" left join conplanoorcamentoanalitica on conplanoorcamento.c60_codcon = conplanoorcamentoanalitica.c61_codcon \";\n $sql .= \" and conplanoorcamento.c60_anousu = conplanoorcamentoanalitica.c61_anousu \";\n $sql .= \" left join conplanoorcamentoconta on conplanoorcamento.c60_codcon = conplanoorcamentoconta.c63_codcon \";\n $sql .= \" and conplanoorcamento.c60_anousu = conplanoorcamentoconta.c63_anousu \";\n $sql .= \" left join conplanoorcamentocontabancaria on conplanoorcamento.c60_codcon = conplanoorcamentocontabancaria.c56_codcon \";\n $sql .= \" and conplanoorcamento.c60_anousu = conplanoorcamentocontabancaria.c56_anousu \";\n $sql .= \" inner join conclass on conplanoorcamento.c60_codcla = conclass.c51_codcla \";\n $sql2 = \"\";\n if($dbwhere==\"\"){\n if($c60_anousu!=null ){\n $sql2 .= \" where conplanoorcamento.c60_anousu = $c60_anousu \";\n }\n }else if($dbwhere != \"\"){\n $sql2 = \" where $dbwhere\";\n }\n\n //$sql2 .= ($sql2!=\"\"?\" and \":\" where \") . \" c61_instit = \" . db_getsession(\"DB_instit\");\n $sql .= $sql2;\n if($ordem != null ){\n $sql .= \" order by \";\n $campos_sql = split(\"#\",$ordem);\n $virgula = \"\";\n for($i=0;$i<sizeof($campos_sql);$i++){\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }\n return $sql;\n }", "function showDataVAI($PROVINCIA, $CLAVE, $TOMO, $FOLIO,$T_INSCRITOS)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $query = new Query($mysqli, \"SELECT nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,fac_iia,esc_iia,car_iia,fac_iiia,esc_iiia,car_iiia FROM \".$TINS.\" WHERE provincia =? and clave=? and tomo =? and folio =?\");\n $parametros = array(\"ssss\", &$PROVINCIA, &$CLAVE,&$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}", "public function select(string $query)\n{\n // guardamos lo que venga como parametros en la funcion select\n $this->strquery = $query;\n // preparamos el query\n $result = $this->conexion->prepare($this->strquery);\n $result->execute();\n // se utiliza fetch porque solo devuelve un resultado\n $data = $result->fetch(PDO::FETCH_ASSOC);\n return $data;\n}", "private function parseVariablesIntoSql($sql, $connection) {\n $connection = $this->model->getMeta()->getConnection();\n $statementParser = $connection->getStatementParser();\n\n foreach ($this->variables as $variable => $value) {\n if ($value instanceof ModelQuery) {\n $statement = self::$queryParser->parseQuery($value);\n $value = $statementParser->parseStatement($statement);\n\n $sql = str_replace('%' . $variable . '%', '(' . $value . ')', $sql);\n } elseif (is_array($value)) {\n foreach ($value as $k => $v) {\n $value[$k] = $connection->quoteValue($v);\n }\n\n $sql = str_replace('%' . $variable . '%', '(' . implode(', ', $value) . ')', $sql);\n } else {\n $sql = str_replace('%' . $variable . '%', $connection->quoteValue($value), $sql);\n }\n }\n\n return $sql;\n }", "function campo($tabla,$campo,$criterio,$pos,$and=''){\n\t$array=$GLOBALS['cn']->queryRow('SELECT '.$pos.' FROM '.$tabla.' WHERE '.$campo.'=\"'.$criterio.'\" '.$and);\n\treturn $array[$pos];\n}", "function frame_search_sql($obj)\n\n\t{\n\n\t\t\n\n\t\t$param_array = func_get_args();\n\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::frame_search_sql() - PARAMETER LIST : ', $param_array);\n\n\t\n\n\t\tif($obj->get_search_types[0]['search_condition'] == \"depend_object_setting\" && is_array($obj->search_types))\n\n\t\t{\n\n\t\t\t\n\n\t\t\t$str = \"\";\n\n\t\t\t\n\n\t\t\t$_SESSION[$obj->srch_ses_val] = array();\n\n\t\t\t\n\n\t\t\t$start = 0;\n\n\t\t\t\n\n\t\t\t$enter_switch = 0;\n\n\t\t\t\n\n\t\t\tforeach($obj->search_types as $key => $value)\n\n\t\t\t{\n\n\t\t\t\t$enter_switch = 0;\n\n\t\t\t\tif(strtolower($obj->match_case) == \"yes\")\n\n\t\t\t\t{\n\n\t\t\t\t\t$fld_name = $_REQUEST[$value['tbl_fld_name']];\n\n\t\t\t\t\t$fld_value = $_REQUEST[$value['tbl_fld_value']];\n\n\t\t\t\t}\n\n\t\t\t\telse\n\n\t\t\t\t{\n\n\t\t\t\t\t$fld_name = strtolower($_REQUEST[$value['tbl_fld_name']]);\n\n\t\t\t\t\t$fld_value = strtolower($_REQUEST[$value['tbl_fld_value']]);\n\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\tif($key == \"between\")\n\n\t\t\t\t{\n\n\t\t\t\t\t$fld_value_frm = stripslashes($_REQUEST[$value['tbl_fld_value_frm']]);\n\n\t\t\t\t\t$fld_value_to = stripslashes($_REQUEST[$value['tbl_fld_value_to']]);\n\n\n\n\t\t\t\t\tif(strlen($fld_name) > 0 && strlen($fld_value_frm) > 0 && strlen($fld_value_to) > 0)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t$_SESSION[$obj->srch_ses_val][$key] = array('tbl_fld_name' => stripslashes($_REQUEST[$value['tbl_fld_name']]), 'tbl_fld_value_frm' => $fld_value_frm, 'tbl_fld_value_to' => $fld_value_to);\n\n\t\t\t\t\t$enter_switch = 1;\n\n\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\n\t\t\t\telse if(strlen($fld_name) > 0 && strlen($fld_value) > 0)\n\n\t\t\t\t{\n\n\t\t\t\t\t$_SESSION[$obj->srch_ses_val][$key] = array('tbl_fld_name' => stripslashes($_REQUEST[$value['tbl_fld_name']]), 'tbl_fld_value' => stripslashes($_REQUEST[$value['tbl_fld_value']]));\n\n\t\t\t\t\t$enter_switch = 1;\n\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\tif($enter_switch == 1)\n\n\t\t\t\t{\n\n\n\n\t\t\t\t\tswitch ($key)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcase \"contains\":\n\n\t\t\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif($obj->match_case == \"yes\")\n\n\t\t\t\t\t\t\t\t$str .= $fld_name . \" like '\" . wrap_values(\"%\" . str_replace(' ', '%', $fld_value) . \"%\") . \"'\";\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t\t$str .= \"lower(\" . $fld_name . \") like '\" . wrap_values(\"%\" . str_replace(' ', '%', $fld_value) . \"%\") . \"'\";\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcase \"startswith\":\n\n\t\t\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif($obj->match_case == \"yes\")\n\n\t\t\t\t\t\t\t\t$str .= $fld_name . \" like '\" . wrap_values($fld_value . \"%\") . \"'\";\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t\t$str .= \"lower(\" . $fld_name . \") like '\" . wrap_values($fld_value . \"%\") . \"'\";\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcase \"endswith\":\n\n\t\t\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif($obj->match_case == \"yes\")\n\n\t\t\t\t\t\t\t\t$str .= $fld_name . \" like '\" . wrap_values(\"%\" . $fld_value) . \"'\";\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t\t$str .= \"lower(\" . $fld_name . \") like '\" . wrap_values(\"%\" . $fld_value) . \"'\";\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcase \"equalto\":\n\n\t\t\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif($obj->match_case == \"yes\")\n\n\t\t\t\t\t\t\t\t$str .= $fld_name . \" = '\" . wrap_values($fld_value) . \"'\";\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t\t$str .= \"lower(\" . $fld_name . \") = '\" . wrap_values($fld_value) . \"'\";\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcase \"lessthan\": //since numeric fields can only be compared for <, > and between case match is not checked.\n\n\t\t\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t$str .= $fld_name . \" < '\" . wrap_values($fld_value) . \"'\";\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcase \"greaterthan\":\n\n\t\t\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t$str .= $fld_name . \" > '\" . wrap_values($fld_value) . \"'\";\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcase \"between\":\n\n\t\t\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t$str .= $fld_name . \" between '\" . $fld_value_frm . \"' and '\" . $fld_value_to . \"'\";\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcase \"sort_by\":\n\n\t\t\t\t\t\t\t$order_by_str = \" \" . $fld_name . \" \" . $fld_value;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t}//end switch\t\t\t\n\n\n\n\t\t\t\t}//end if($enter_switch == 1)\n\n\n\n\t\t\t}//end foreach\n\n\t\t\n\n\t\t}//end if(is_array\n\n\t\telse if($obj->get_search_types[1]['search_condition'] == \"depend_request\" && is_array($obj->search_types))\n\n\t\t{\n\n\t\t\t\n\n\t\t\t$fld_name = $_REQUEST[$obj->get_search_types['search_condition_tbl_fld_name']];\n\n\t\t\t$fld_value = $_REQUEST[$obj->get_search_types['search_condition_tbl_fld_value']];\n\n\t\t\t$srch_typ = $_REQUEST[$obj->get_search_types['search_condition_fld_name']];\n\n\t\t\t\n\n\t\t\t$_SESSION[$obj->srch_ses_val]['depend_request'][$obj->get_search_types['search_condition_tbl_fld_name']] = $fld_name;\n\n\t\t\t$_SESSION[$obj->srch_ses_val]['depend_request'][$obj->get_search_types['search_condition_tbl_fld_value']] = $fld_value;\n\n\n\n\t\t\tswitch ($srch_typ)\n\n\t\t\t{\n\n\t\t\t\t\n\n\t\t\t\tcase \"contains\":\n\n\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\t\tif($obj->match_case == \"yes\")\n\n\t\t\t\t\t\t$str .= $fld_name . \" like '\" . wrap_values(\"%\" . str_replace(' ', '%', $fld_value) . \"%\") . \"'\";\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\t$str .= \"lower(\" . $fld_name . \") like '\" . wrap_values(\"%\" . str_replace(' ', '%', $fld_value) . \"%\") . \"'\";\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase \"startswith\":\n\n\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\t\tif($obj->match_case == \"yes\")\n\n\t\t\t\t\t\t$str .= $fld_name . \" like '\" . wrap_values($fld_value . \"%\") . \"'\";\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\t$str .= \"lower(\" . $fld_name . \") like '\" . wrap_values($fld_value . \"%\") . \"'\";\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase \"endswith\":\n\n\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\t\tif($obj->match_case == \"yes\")\n\n\t\t\t\t\t\t$str .= $fld_name . \" like '\" . wrap_values(\"%\" . $fld_value) . \"'\";\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\t$str .= \"lower(\" . $fld_name . \") like '\" . wrap_values(\"%\" . $fld_value) . \"'\";\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase \"equalto\":\n\n\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\t\tif($obj->match_case == \"yes\")\n\n\t\t\t\t\t\t$str .= $fld_name . \" = '\" . wrap_values($fld_value) . \"'\";\n\n\t\t\t\t\telse\n\n\t\t\t\t\t\t$str .= \"lower(\" . $fld_name . \") = '\" . wrap_values($fld_value) . \"'\";\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase \"lessthan\": //since numeric fields can only be compared for <, > and between case match is not checked.\n\n\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\t\t$str .= $fld_name . \" < '\" . wrap_values($fld_value) . \"'\";\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase \"greaterthan\":\n\n\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\t\t$str .= $fld_name . \" > '\" . wrap_values($fld_value) . \"'\";\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase \"between\":\n\n\t\t\t\t\tif($start == 0)\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" and (\";\n\n\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$str .= \" \" . $obj->search_cond . \" \";\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\t\t$str .= $fld_name . \" between '\" . $fld_value_frm . \"' and '\" . $fld_value_to . \"'\";\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t\tcase \"sort_by\":\n\n\t\t\t\t\t$order_by_str = \" \" . $fld_name . \" \" . $fld_value;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\n\n\t\t\t}//end switch\t\t\t\n\n\n\n\t\t}\n\n\t\t\n\n\t\t$group_by_qry = \"\";\n\n\t\t\n\n\t\t\n\n\t\tif($start == 1)\n\n\t\t$str .= \")\";\n\n\t\t\n\n\t\t$qry = $obj->search_sql . $str . $group_by_qry . $order_by_str;\n\n\t\t\n\n\t\t$_SESSION[$obj->srch_ses_qry_str] = $qry;\n\n\t\t\n\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::frame_search_sql() - Return Value : ', 'Frames the search query in session and returns void');\n\n\n\n\t}", "function recorre_tabla($nombret,$campot){\r\n$sql_query= \"Select $campot From $nombret\";\r\n$consulta = pg_query($sql_query);\r\nwhile($fila=pg_fetch_row($consulta)) \r\n { echo \"<option value='\".$fila[0].\"'>\".$fila[0].\"</option>\"; } \r\n}", "private function cargar_parametros_familias(){\n $sql = \"SELECT id,codigo,descripcion FROM mos_requisitos_familias ORDER BY orden\";\n $columnas_fam = $this->dbl->query($sql, array());\n return $columnas_fam;\n }", "function get_parametros_db_negocio()\n\t{\n\t\t$fuentes = $this->get_indice_fuentes();\n\t\tif (empty($fuentes)) {\n\t\t\treturn;\n\t\t}\n\t\t$fuente_defecto = toba_info_editores::get_fuente_datos_defecto($this->identificador);\n\t\tif (! isset($fuente_defecto)) {\n\t\t\t$fuente_defecto = current($fuentes);\n\t\t}\n\t\t$id_def_base = $this->construir_id_def_base($fuente_defecto);\n\t\treturn $this->get_instalacion()->get_parametros_base($id_def_base);\n\t}", "function _get_select_fields()\r\n\t{\r\n\t\t$sql_exec_fields = array();\r\n\t\tforeach ($this->_params as $key => $val)\r\n\t\t{\r\n\t\t\t$tmp_field = $this->_node_table . '.' . $key . ' AS ' . $val;\r\n\t\t\t$sql_exec_fields[] = $tmp_field;\r\n\t\t} \r\n\r\n\t\t$fields = implode(', ', $sql_exec_fields);\r\n\t\treturn $fields;\r\n\t}", "function insert_stmt(){\n\t\tglobal $in;\n\t\tif ($this->attributes['BYTB']!='' )$this->fields_value_bytb($this->attributes['BYTB']);\n\t\t\n\t\t\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\t\t\t\t\n\t\t\t\t$this->field_stmt[$i]=\"{$key}\";\n\t\t\t\t$this->value_stmt[$i]=\"{$in[$key]}\";\n\t\t\t\t\n\t\t\t\tif($in[$key]==1){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->field_stmt[$i]=\"D_{$key}\";\n\t\t\t\t\t#GC 20/04/2015 gestione popolamento decode\n\t\t\t\t\tif (isset($this->attributes['DECODE'][$key])) $this->value_stmt[$i]=\"{$this->attributes['DECODE'][$key]}\";\n\t\t\t\t\telse $this->value_stmt[$i]=$val;\n\t\t\t\t}\n\t\t\t\t#GC 20/04/2015 gestione sbiancamento decode\n\t\t\t\tif($in[$key]==0){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->field_stmt[$i]=\"D_{$key}\";\n\t\t\t\t\t$this->value_stmt[$i]=\"\";\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t}", "function createSelect($_table, $_value, $_colum)\n{\n\n $_prev_par= false;\n $_query = \"SELECT * FROM $_table\";\n\n foreach ($_value as $_key => $_value)\n {\n if ($_value != \"\")\n {\n if ($_prev_par)\n {\n $_query.= \" AND \";\n }\n else\n {\n $_query.= \" WHERE \";\n }\n\n $_query.= $_colum[$_key].\" = '$_value'\";\n $_prev_par = true;\n }\n }\n $_query.=\";\";\n\n return $_query;\n}", "function localidadConsultarNombreTec($criterio) {\n\n\t$query = \"SELECT localidad FROM localidades WHERE id=\".$criterio;\t\n\t$res = ejecutarQuerySQL($query);\n\t$actual = getFila($res);\n\t\t\t\nreturn $actual['localidad'];\n}", "function namaMahasiswa(){\n global $db; // https://stackoverflow.com/questions/3041171/php-variable-not-working-inside-of-function\n echo $db->executeGetScalar(\"SELECT nama FROM MAHASISWA WHERE NRP = '{$_SESSION['user']}'\");\n }", "public function createQuery()\n\t{\n\t\t$this->tab[] = $this->action;\n\t\t$this->tab[] = !is_array($this->field) ? $this->field : join(', ',$this->field);\n\t\t$this->tab[] = ' FROM '.$this->from;\n\t\tif(!empty($this->where)){$this->tab[] = 'WHERE '.$this->where;}\n\t\tif(!empty($this->and)){$this->tab[] = 'AND '.$this->and;}\n\t\tif(!empty($this->or)){$this->tab[] = 'OR '.$this->or;}\n\t\tif(!empty($this->in)){$this->tab[] = 'IN '.$this->in;}\n\t\tif(!empty($this->beetween)){$this->tab[] = 'BEETWEEN '.$this->beetween;}\n\t\tif(!empty($this->not)){$this->tab[] = 'NOT '.$this->not;}\n\t\tif(!empty($this->like)){$this->tab[] = 'LIKE '.$this->like;}\n\t\tif(!empty($this->order)){$this->tab[] = 'ORDER BY '.$this->order;}\n\t\treturn join(\" \",$this->tab);\n\t}", "public function get_sql()\n {\n }", "public function get_datos_pac_rec_ini($sucursal,$id_usuario){\n\n $conectar= parent::conexion();\n\t \n\t $sql= \"select v.id_ventas,v.sucursal,v.subtotal,v.numero_venta,p.nombres,p.telefono,p.id_paciente,v.tipo_pago,v.vendedor from ventas as v join pacientes as p where p.id_paciente=v.id_paciente and v.sucursal=? and v.id_usuario=? order by id_ventas DESC limit 1;\";\n\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $sucursal);\n $sql->bindValue(2, $id_usuario);\n $sql->execute();\n\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n\n}" ]
[ "0.6623784", "0.6563229", "0.64704484", "0.6253002", "0.6168803", "0.61628234", "0.61376", "0.60776997", "0.60756654", "0.604257", "0.60166776", "0.599603", "0.5940931", "0.5929678", "0.58914566", "0.5888518", "0.5864434", "0.5862955", "0.5853247", "0.5853172", "0.5834608", "0.58345383", "0.583279", "0.58266807", "0.5808007", "0.5795856", "0.5791423", "0.5790283", "0.5784481", "0.57697874", "0.57608694", "0.5756779", "0.57457805", "0.5737961", "0.57288826", "0.57234424", "0.56822747", "0.5682008", "0.56811583", "0.56806344", "0.56785554", "0.5648518", "0.5644957", "0.5636331", "0.563152", "0.5631348", "0.56294215", "0.5628355", "0.5628289", "0.5627969", "0.56205887", "0.56190044", "0.56160396", "0.56151706", "0.56076735", "0.560713", "0.56050104", "0.5601849", "0.5600675", "0.5600164", "0.5597023", "0.55926144", "0.5589137", "0.5586834", "0.5575885", "0.55728436", "0.55710447", "0.55710196", "0.55707836", "0.55582947", "0.55551726", "0.5553361", "0.55469227", "0.5542636", "0.5541402", "0.55384547", "0.5538011", "0.5535641", "0.5534508", "0.5533788", "0.55319446", "0.5525826", "0.5520004", "0.5517879", "0.55129576", "0.55115265", "0.551049", "0.550673", "0.55047584", "0.55046165", "0.5500281", "0.549931", "0.54981613", "0.54904723", "0.54846764", "0.5480973", "0.54780203", "0.54771054", "0.5472574", "0.54716283" ]
0.57408243
33
/ carga de la plantilla del sitio y del sitio como tal
function _load(){ //verificar la session if(isset($_GET['adm'])&&!inicie_sesion()){ if(isset($_COOKIE['sessionHash'])&&$_COOKIE['sessionHash']!=''){ login_user_hash($_COOKIE['sessionHash']); _load(); exit; } if(isset($_GET['ajax'])){ echo json_encode(array('error'=>'session')); exit; }else{ header('Location: '.__url_real.'xlogin/login/'.base64_encode($_SERVER['REQUEST_URI']).'/'); exit; } } if(isset($_GET['adm'])&&inicie_sesion()){ //verifica si el usuario que inicio la sesion tiene permiso para acceder if(logueado::permitirAcceso()){//logueado::tieneAcceso() require('plantillas/admin/admin.php'); }else{ header('Location: '.__url_real.'xlogin/login/'.base64_encode($_SERVER['REQUEST_URI']).'/'); exit; } }else{ if (isMobile()) { if(file_exists(__path.'index.mobile.php')){ require (__path.'index.mobile.php'); }else{ require (__path.'index.php'); } }else{ require (__path.'index.php'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function obtener_plantilla_controlador(){\r\n\t\t\treturn require_once \"./vistas/plantilla.php\";\r\n\t\t}", "function crearPlantilla($datos);", "private function setRutasVista() {\n /* variable relacionadas a un controlador especifico */\n $this->_rutas = [\n 'vista' => RUTA_MODULOS . 'vista' . DS . $this->_controlador . DS,\n 'img' => URL_MODULOS . \"vista/\" . $this->_controlador . \"/img/\",\n 'js' => URL_MODULOS . \"vista/\" . $this->_controlador . \"/js/\",\n 'css' => URL_MODULOS . \"vista/\" . $this->_controlador . \"/css/\",\n ];\n }", "function compilar_metadatos_generales()\n\t{\n\t\t$this->manejador_interface->titulo(\"Compilando datos generales\");\n\t\ttoba_proyecto_db::set_db( $this->db );\n\t\t$path = $this->get_dir_generales_compilados();\n\t\ttoba_manejador_archivos::crear_arbol_directorios( $path );\n\t\t$this->compilar_metadatos_generales_basicos();\n\t\t$this->compilar_metadatos_generales_grupos_acceso();\n\t\t$this->compilar_metadatos_generales_puntos_control();\n\t\t$this->compilar_metadatos_generales_mensajes();\n\t\t$this->compilar_metadatos_generales_dimensiones();\n\t\t$this->compilar_metadatos_generales_consultas_php();\n\t\t$this->compilar_metadatos_generales_servicios_web();\n\t\t$this->compilar_metadatos_generales_pms();\n\n\t}", "public function catalogo(){\n \n $inicio['recomendado'] = $this->carga_recomendado();\n $inicio['categorias'] = $this->carga_menu_categorias();\n $this->Plantilla(\"catalogo\", $inicio);\n \n }", "function opcion__ejecutar_tareas()\n\t{\n\t\t$param = $this->get_parametros();\n\t\t$manejador_interface = null;\n\t\tif (isset($param['-v']) && $param['-v']) {\n\t\t $manejador_interface = $this->consola;\n\t\t} else {\n\t\t\t$this->consola->set_verbose(false);\n\t\t}\n\t\t//Incluye el contexto consola\n\t\trequire_once(\"nucleo/toba.php\");\n\t\ttoba::nucleo()->iniciar_contexto_desde_consola($this->get_id_instancia_actual(true), $this->get_id_proyecto_actual(true));\n\n\t\t//Ejecuta el planificador\n\t\t$planificador = new toba_planificador_tareas();\n\t\t$planificador->ejecutar_pendientes($manejador_interface);\n\t}", "public function servicos() {\n $this->load_template('servicos');\n }", "function organismes()\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t$db = cmsms()->GetDb();\n\t\t$designation = '';\n\t\t$tableau = array('F','Z','L','D');\n\t\t//on instancie la classe servicen\n\t\t$service = new Servicen();\n\t\t$page = \"xml_organisme\";\n\t\tforeach($tableau as $valeur)\n\t\t{\n\t\t\t$var = \"type=\".$valeur;\n\t\t\t//echo $var;\n\t\t\t$scope = $valeur;\n\t\t\t//echo \"la valeur est : \".$valeur;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$designation.= \"service coupé\";\n\t\t\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t\t\t$status = 'Echec';\n\t\t\t\t$action = 'retrieve_ops';\n\t\t\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t///on initialise un compteur général $i\n\t\t\t\t$i=0;\n\t\t\t\t//on initialise un deuxième compteur\n\t\t\t\t$compteur=0;\n\t\t\t//\tvar_dump($xml);\n\n\t\t\t\t\tforeach($xml as $cle =>$tab)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$idorga = (isset($tab->id)?\"$tab->id\":\"\");\n\t\t\t\t\t\t$code = (isset($tab->code)?\"$tab->code\":\"\");\n\t\t\t\t\t\t$libelle = (isset($tab->libelle)?\"$tab->libelle\":\"\");\n\t\t\t\t\t\t// 1- on vérifie si cette épreuve est déjà dans la base\n\t\t\t\t\t\t$query = \"SELECT idorga FROM \".cms_db_prefix().\"module_ping_organismes WHERE idorga = ?\";\n\t\t\t\t\t\t$dbresult = $db->Execute($query, array($idorga));\n\n\t\t\t\t\t\t\tif($dbresult && $dbresult->RecordCount() == 0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_organismes (libelle, idorga, code, scope) VALUES (?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t//echo $query;\n\t\t\t\t\t\t\t\t$compteur++;\n\t\t\t\t\t\t\t\t$dbresultat = $db->Execute($query,array($libelle,$idorga,$code,$scope));\n\n\t\t\t\t\t\t\t\tif(!$dbresultat)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$designation.= $db->ErrorMsg();\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t}// fin du foreach\n\n\t\t\t}\n\t\t\tunset($scope);\n\t\t\tunset($var);\n\t\t\tunset($lien);\n\t\t\tunset($xml);\n\t\t\tsleep(1);\n\t\t}//fin du premier foreach\n\t\t\n\n\t\t$designation.= $compteur.\" organisme(s) récupéré(s)\";\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$status = 'Ok';\n\t\t$action = 'retrieve_ops';\n\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\n\t\t\t\n\t\t\n\t}", "public function plantilla(){\n\n\n include \"./vista/plantilla.php\";\n\n }", "public function catalogos() \n\t{\n\t}", "function RellenarMinuta()\r\n {\r\n $this->AddPage();\r\n\r\n $this->RellenarTitulo();\r\n\r\n $this->RellenarAsistentes();\r\n\r\n $this->RellenarStatusCompromisosYAsistencias();\r\n\r\n $this->RellenarIndice();\r\n\r\n $this->RellenarDesarrolloReunion();\r\n }", "function getTitulos() {\n //arreglo para remplazar los titulos de las columnas \n $titulos_campos['dep_id'] = COD_DEPARTAMENTO;\n $titulos_campos['dep_nombre'] = NOMBRE_DEPARTAMENTO;\n\n $titulos_campos['der_id'] = COD_DEPARTAMENTO_REGION;\n $titulos_campos['der_nombre'] = NOMBRE_DEPARTAMENTO_REGION;\n\n $titulos_campos['mun_id'] = COD_MUNICIPIO;\n $titulos_campos['mun_nombre'] = NOMBRE_MUNICIPIO;\n $titulos_campos['mun_poblacion'] = POB_MUNICIPIO;\n\n $titulos_campos['ope_id'] = OPERADOR;\n $titulos_campos['ope_nombre'] = OPERADOR_NOMBRE;\n $titulos_campos['ope_sigla'] = OPERADOR_SIGLA;\n $titulos_campos['ope_contrato_no'] = OPERADOR_CONTRATO_NRO;\n $titulos_campos['ope_contrato_valor'] = OPERADOR_CONTRATO_VALOR;\n\n $titulos_campos['Id_Ciudad'] = TITULO_CIUDAD;\n $titulos_campos['Id_Pais'] = NOMBRE_PAIS;\n $titulos_campos['Nombre_Ciudad'] = NOMBRE_CIUDAD;\n\n $titulos_campos['Nombre_Pais'] = NOMBRE_PAIS;\n\n $titulos_campos['Id_Familia'] = TITULO_FAMILIAS;\n $titulos_campos['Descripcion_Familia'] = DESCRIPCION_FAMILIA;\n\n $titulos_campos['Id_Moneda'] = TITULO_MONEDA;\n $titulos_campos['Descripcion_Moneda'] = DESCRIPCION_MONEDA;\n\n $titulos_campos['cfi_numero'] = CUENTA_NUMERO;\n $titulos_campos['cfi_nombre'] = CUENTA_NOMBRE;\n\n $titulos_campos['cft_id'] = CUENTA_TIPO;\n $titulos_campos['cft_nombre'] = CUENTA_TIPO;\n\n $titulos_campos['mov_descripcion'] = MOVIMIENTO_DESCRIPCION;\n $titulos_campos['mov_tipo'] = MOVIMIENTO_TIPO;\n\n $titulos_campos['idCentroPoblado'] = TITULO_CENTRO_POBLADO;\n $titulos_campos['codigoDane'] = CODIGO_DANE_CENTRO_POBLADO;\n $titulos_campos['nombre'] = NOMBRE_CENTRO_POBLADO;\n $titulos_campos['mun_id'] = MUNICIPIO_CENTRO_POBLADO;\n\n $titulos_campos['enc_tipo_nombre'] = TIPO_INSTRUMENTO;\n $titulos_campos['enc_tipo_desc'] = DESCRIPCION_ACTIVIDAD;\n\n $titulos_campos['Descripcion_Tipo'] = \"Plan\";\n \n $titulos_campos['descripcionTipoHallazgo'] = DESCRIPCION_TIPO_HALLAZGO;\n $titulos_campos['descripcion'] = AREA_TIPO_HALLAZGO;\n\n return $titulos_campos;\n }", "public function quienesSomos()\n {\n require_once \"_Vista/_Plantillas/head.php\";\n require_once \"_Vista/_Plantillas/navBar.php\";\n require_once \"_Vista/QuienesSomosVista.php\";\n }", "private function appConsolaOpciones() {\r\n\t\t\tdefine('ENV_ENTORNO', $this->entorno);\r\n\t\t\tdefine('ENV_TIPO', 'MVC');\r\n\t\t\tdate_default_timezone_set(ConfigAcceso::leer($this->aplicacion, 'sistema', 'tiempo', 'zona'));\r\n\t\t\t\r\n\t\t\trequire implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Configuracion', 'Parametros.php'));\r\n\t\t\t\r\n\t\t\t$consola = new \\AutoCargador('Consola', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t\t$consola->registrar();\r\n\t\t\t\r\n\t\t\t$entidades = new \\AutoCargador('Entidades', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'ORM')));\r\n\t\t \t$entidades->registrar();\r\n\t\t \t\r\n\t\t \t$formulario = new \\AutoCargador('Formularios', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$formulario->registrar();\r\n\t\t \t\r\n\t\t \t\r\n\t\t\t$interface = new \\AutoCargador('Interfaces', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$interface->registrar();\r\n\t\t \t\r\n\t\t \tAutoloader::register(implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'ORM', 'Proxy')), 'Proxy');\r\n\t\t \t\r\n\t\t\t$utilidades = new \\AutoCargador('Utilidades', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$utilidades->registrar();\r\n\t\t \t\r\n\t\t \t$modeloMVC = new \\AutoCargador('Modelo', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Sistema')));\r\n\t\t \t$modeloMVC->registrarModelo();\r\n\t\t \t\r\n\t\t \t$this->consolaObjeto();\r\n\t\t}", "function listarSitios(){\n $sql = \"SELECT\n sitioid,\n imagenIcono,\n titulo,\n introduccion,\n imagenPortada,\n descripcion\n from sitio\";\n $rs = $this->consultaSQL($sql);\n\n return $rs;\n }", "function getTitulos() {\r\n //arreglo para remplazar los titulos de las columnas\r\n $titulos_campos['ivg_id'] = INVENTARIO_GRUPO;\r\n $tirulos_campos['ivg_nombre'] = INVENTARIO_GRUPO;\r\n\r\n $titulos_campos['ine_id'] = INVENTARIO_EQUIPO;\r\n $titulos_campos['ine_nombre'] = INVENTARIO_NOMBRE_EQUIPO;\r\n $titulos_campos['ine_reposicion'] = INVENTARIO_EQUIPO_REPOSICION;\r\n\r\n $titulos_campos['ies_id'] = INVENTARIO_ESTADO;\r\n $titulos_campos['ies_nombre'] = INVENTARIO_NOMBRE_ESTADO;\r\n\r\n $titulos_campos['inm_id'] = INVENTARIO_MARCA;\r\n $titulos_campos['inm_nombre'] = INVENTARIO_MARCA;\r\n\r\n $tirulos_campos['obc_id'] = OBLIGACION_CLAUSULA;\r\n $tirulos_campos['obc_nombre'] = OBLIGACION_CLAUSULA;\r\n\r\n $tirulos_campos['oco_id'] = OBLIGACION_COMPONENTE;\r\n $tirulos_campos['oco_nombre'] = OBLIGACION_COMPONENTE;\r\n\r\n $titulos_campos['dti_id'] = DOCUMENTO_TIPO;\r\n\t $titulos_campos['dti_nombre'] = DOCUMENTO_TIPO;\r\n \t\t$titulos_campos['dti_estado'] = DOCUMENTO_ESTADO_CONTROL;\r\n \t\t$titulos_campos['dti_responsable'] = DOCUMENTO_RESPONSABLE_CONTROL;\r\n\r\n \t\t$titulos_campos['dot_id'] = DOCUMENTO_TEMA;\r\n \t\t$titulos_campos['dot_nombre'] = DOCUMENTO_TEMA;\r\n\r\n \t\t$titulos_campos['dos_id'] = DOCUMENTO_SUBTEMA;\r\n \t\t$titulos_campos['dos_nombre'] = DOCUMENTO_SUBTEMA;\r\n\r\n \t\t$titulos_campos['doa_id'] = DOCUMENTO_RESPONSABLE;\r\n \t\t$titulos_campos['doa_nombre'] = DOCUMENTO_RESPONSABLE;\r\n \t\t$titulos_campos['doa_sigla'] = DOCUMENTO_SIGLA;\r\n\r\n \t\t$titulos_campos['tib_nombre'] = DOCUMENTO_BUSQUEDA;\r\n\r\n \t\t$titulos_campos['doe_nombre'] = DOCUMENTO_ESTADOS;\r\n \t\t$titulos_campos['der_nombre'] = DOCUMENTO_ESTADO_RESPUESTA;\r\n \t\t$titulos_campos['see_nombre'] = SEGUIMIENTO_ESTADOS;\r\n \t\t$titulos_campos['ces_nombre'] = COMPROMISO_ESTADOS;\r\n\r\n \t\t$titulos_campos['dta_id'] = DOCUMENTO_TIPO_ACTOR;\r\n \t\t$titulos_campos['dta_nombre'] = DOCUMENTO_TIPO_ACTOR;\r\n\r\n \t\t$titulos_campos['rpr_nombre'] = PROBABILIDAD;\r\n \t\t$titulos_campos['rpr_valor'] = PROBABILIDAD_VALOR;\r\n\r\n \t\t$titulos_campos['rca_nombre'] = CATEGORIA;\r\n \t\t$titulos_campos['rca_minimo'] = CATEGORIA_MINIMO;\r\n \t\t$titulos_campos['rca_maximo'] = CATEGORIA_MAXIMO;\r\n\r\n \t\t$titulos_campos['rim_nombre'] = IMPACTO;\r\n \t\t$titulos_campos['rim_valor'] = IMPACTO_VALOR;\r\n\r\n \t\t$titulos_campos['rer_id'] = COD_ROL;\r\n \t\t$titulos_campos['rer_nombre'] = COD_ROL;\r\n\r\n\t $titulos_campos['dep_id'] = COD_DEPARTAMENTO;\r\n\t $titulos_campos['dep_nombre'] = NOMBRE_DEPARTAMENTO;\r\n\r\n\t $titulos_campos['dpr_id'] = COD_DEPARTAMENTO_REGION;\r\n\t $titulos_campos['dpr_nombre'] = NOMBRE_DEPARTAMENTO_REGION;\r\n\r\n \t\t$titulos_campos['mun_id'] = COD_MUNICIPIO;\r\n \t\t$titulos_campos['mun_nombre'] = NOMBRE_MUNICIPIO;\r\n \t\t$titulos_campos['mun_poblacion'] = POB_MUNICIPIO;\r\n\r\n $titulos_campos['tia_nombre'] = TIPO_ACTOR;\r\n\r\n $titulos_campos['ope_id'] = OPERADOR;\r\n $titulos_campos['ope_nombre'] = OPERADOR_NOMBRE;\r\n $titulos_campos['ope_sigla'] = OPERADOR_SIGLA;\r\n \t\t$titulos_campos['ope_contrato_no'] = OPERADOR_CONTRATO_NRO;\r\n \t\t$titulos_campos['ope_contrato_valor'] = OPERADOR_CONTRATO_VALOR;\r\n\r\n return $titulos_campos;\r\n }", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "function _comprobarEstructuraContenido(){\n\n\t$campos_requeridos = array(\n\t\t'body',\n\t\t'og_group_ref',\n\t\t'field_download',\n\t\t'field_servicio_categoria',\n\t\t'field_acciones',\n\t\t'field_costo',\n\t\t'field_dirigido',\n\t\t'field_modalidad_digital',\n\t\t'field_modalidad_otro',\n\t\t'field_modalidad_otro_especificar',\n\t\t'field_modalidad_presencial',\n\t\t'field_modalidad_telefonico',\n\t\t'field_pasos',\n\t\t'field_requisitos_collection',\n\t\t'field_vigencia',\n\t\t'field_id_migracion',\n\t\t'field_es_migrado',\n\t\t//Relevamiento\n\t\t'field_transaccion_tipo',\n\t\t'field_digitalizacion_medir',\n\t\t'field_digitalizacion_observacion',\n\t\t'field_descargas_obligatorias',\n\t\t'field_formulario_digital',\n\t\t'field_turno_requerido',\n\t\t'field_turno_digital',\n\t\t'field_identificacion_digital',\n\t\t'field_posee_notificaciones',\n\t\t'field_notificaciones',\n\t\t'field_pago_requerido_list',\n\t\t'field_pago_electronico_list',\n\t\t'field_resumen_nivel',\n\t\t'field_relevamiento_observaciones'\n\t);\n\n\t$fields = field_info_instances('node', 'tramite');\n\n\tforeach($fields as $key => $value){\n\t\t$campos_servicio[] = $key;\n\t}\n\t\n\tforeach ($campos_requeridos as $key => $value) {\n\t\tif(!in_array($value, $campos_servicio)){\n\t\t\tdie('El campo '.$value.' no esta presente verificar la feature de servicios');\n\t\t}\n\t}\n\n}", "private function inicializa_propiedades(): array\n {\n $identificador = \"cat_sat_tipo_producto_id\";\n $propiedades = array(\"label\" => \"SAT - Tipo\");\n $pr = $this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_division_producto_id\";\n $propiedades = array(\"label\" => \"SAT - División\", \"con_registros\" => false);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n\n $identificador = \"cat_sat_grupo_producto_id\";\n $propiedades = array(\"label\" => \"SAT - Grupo\", \"con_registros\" => false);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_clase_producto_id\";\n $propiedades = array(\"label\" => \"SAT - Clase\", \"con_registros\" => false);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_producto_id\";\n $propiedades = array(\"label\" => \"SAT - Producto\", \"con_registros\" => false, \"cols\" => 12);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_unidad_id\";\n $propiedades = array(\"label\" => \"SAT - Unidad\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_obj_imp_id\";\n $propiedades = array(\"label\" => \"Objeto del Impuesto\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"com_tipo_producto_id\";\n $propiedades = array(\"label\" => \"Tipo Producto\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"cat_sat_conf_imps_id\";\n $propiedades = array(\"label\" => \"Conf Impuestos\", \"cols\" => 12);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"codigo\";\n $propiedades = array(\"place_holder\" => \"Código\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"descripcion\";\n $propiedades = array(\"place_holder\" => \"Producto\", \"cols\" => 12);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n $identificador = \"precio\";\n $propiedades = array(\"place_holder\" => \"Precio\", \"cols\" => 6);\n $pr =$this->asignar_propiedad(identificador:$identificador, propiedades: $propiedades);\n if(errores::$error){\n return $this->errores->error(mensaje: 'Error al inicializa',data: $pr);\n }\n\n return $this->keys_selects;\n }", "function maquetador_genera($plantilla, $controladorDefecto=false, $accionDefecto=false) {\n global $aEstado ;\n \n $pendientes = false;\n\n\t // precarga de modulos\n\t if ( !is_array($aEstado) ){ \n\t maquetador_evaluar_estado($controladorDefecto, $accionDefecto);\t \n\t }\n\t \n\t if ( !isset($aEstado[\"modulos\"]) ){\n\t maquetador_precarga_modulos();\n\t }\n\n // leer la plantilla\n if ( !file_exists($plantilla) ) {\n echo t(\"No exista la plantilla: [$plantilla]\");\n return false; \n }\n $html = maquetador_insertar_include ( $plantilla ); \n $aGenerar = maquetador_extraer_marcas ( $html );\n\n foreach ( $aGenerar as $marca=>$contenido ) {\n $aDatos = maquetador_extrae_modulo ( $marca );\n\n // averiguar el modulo\n if ( $aDatos[\"modulo\"] == \"contenido\") {\n $modulo = $aEstado[\"controlador\"];\n $aDatos[\"accion\"]= ( $aDatos[\"accion\"]=='' ? $aEstado[\"accion\"] : $aDatos['accion']);\n $aDatos[\"id\"] = ( $aDatos[\"id\"] =='' ? $aEstado[\"id\"] : $aDatos['id']);\n } elseif ($aDatos[\"modulo\"]==\"maquetador\") {\n $pendientes[$marca] = $aDatos[\"accion\"];\n continue;\n } else {\n $modulo = $aDatos[\"modulo\"];\n }\n\n // comprobamos que el modulo es correcto\n if ( $modulo == \"t\") {\n $aGenerar[$marca] = t($aDatos[\"accion\"]);\n } else {\n // ver si es un modulo\n if ( $modulo!=\"PUT\" and $modulo!=\"PHP\" and !isset( $aEstado[\"modulos\"][$modulo]) ) {\n $aGenerar[$marca] = \"controlador desconocido: $modulo\";\n } else {\n // si inserta el modulo si cumple la condición\n if ( $aDatos['condicional']==\"\" or maquetador_evalua ( $aDatos['condicional'])) {\n // hay que mostrar el modulo\n switch ( $modulo ) {\n case \"PUT\":\n $aGenerar[$marca] = $aDatos[\"accion\"];\n break;\n case \"PHP\":\n $aGenerar[$marca] = eval(\"return \" . $aDatos[\"accion\"]. \";\" ) ;\n break;\n\n default:\n if ( $aEstado[\"modulos\"][$modulo]) {\n include_once $aEstado[\"modulos\"][$modulo];\n $aEstado[\"modulos\"][$modulo]= false;\n }\n $aGenerar[$marca] = $modulo( $aDatos[\"accion\"], $aDatos[\"id\"] ) ;\n }\n }\n }\n } // else T\n } // for\n\n if ( $pendientes ) {\n foreach ( $pendientes as $k=>$accion) {\n $aGenerar[$k] = maquetador_script(\"genera\", $accion );\n }\n }\n \n // ahorita solo queda calcular e imprimir el resultado \n echo strtr ( $html, $aGenerar );\n\n}", "private function cargarGuion() {\n\t\t\t$pl = $this->Modelo->consultaPlantilla('MATRIZ', 'TRIPLEPLAY', 'PRIORIDAD '.$this->peticion->post->obtener('PRIORIDAD'));\n\t\t\t\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Datos', $this->peticion->post->obtener());\n\t\t\t$plantilla->Parametro('plantilla', $pl['PLANTILLA']);\n\t\t\t\n\t\t\t$this->peticion->post->crear('GUION', $plantilla->MostrarPlantilla('TriplePlay', 'ajaxProcesoPlantilla.html'));\n\t\t\t$fecha = explode('/', $this->peticion->post->obtener('HORAFIN'));\n\t\t\t$this->peticion->post->reemplazar('HORAFIN', trim($fecha[0]));\n\t\t\t\n\t\t\t$this->procesar();\n\t\t}", "public function PC() {\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Titulo', 'Service-Co');\n\t\t\t$plantilla->Parametro('avisos', array_chunk($this->Modelo->avisos(), 8));\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'PC.html')));\n\t\t}", "public function especiais()\n {\n $metaTags = [\n 'title' => 'Displan Saúde - Planos empresariais',\n 'description' => 'Displan Seguros. Planos diferenciados para empresas, profissionais e individuais.',\n 'keywords' => 'Displan, Seguros, Preços'\n ];\n\n $dados = array(\n 'operadoras' => $this->operadoras->getByCategory('especiais'),\n 'categorias' => $this->categorias->all(),\n 'metaTags' => $metaTags,\n 'breadcrumb' => [\n ['title' => 'Home', 'url' => '/', 'class' => ''],\n ['title' => 'Planos para Profissionais', 'url' => 'planos-especiais/', 'class' => 'active']\n ]\n );\n\n $this->load->view('inc/header', $dados);\n $this->load->view('planos/especiais', $dados);\n $this->load->view('inc/footer');\n }", "function ProcesarPeticion($peticion){\n\t\t\n\t\t$vista= $this->getVista();\t\t\n\t\t$vista->plantillaContenido='contenido/'.$peticion->accion;\t\n\t\t\n\t\t//return $vista->mostrar($layout = 'inicio');\t\t\n\t\treturn $vista->mostrar($layout = 'crud');\t\t\n\t}", "function ProcesarPeticion($peticion){\n\t\t\n\t\t$vista= $this->getVista();\t\t\n\t\t$vista->plantillaContenido='contenido/'.$peticion->accion;\t\n\t\t\n\t\t//return $vista->mostrar($layout = 'inicio');\t\t\n\t\treturn $vista->mostrar($layout = 'crud');\t\t\n\t}", "function pre_descuento_familia_articulos(&$Sesion) {\n\t$id_cliente=$Sesion->fetchVar('id_cliente','GET');\n\t$descuentos_familia_borrar=$Sesion->fetchVar('descuentos_familia_borrar','POST');\n\t$descuentos_familia_modificar=$Sesion->fetchVar('descuentos_familia_modificar','POST');\n\t$accion_ejecutar=$Sesion->fetchVar('accion_ejecutar','POST');\n\n\t$id_cliente_sesion = $Sesion->get_var(\"id_cliente_promocion\");\n\t$oDb = $Sesion->get_db('data');\n\n\t//debug(\"glob $id_cliente\");\n\t//debug(\"ses $id_cliente_sesion\");\n\n\tif(isset($id_cliente) AND $id_cliente_sesion != $id_cliente)\n\t\t$Sesion->set_var(\"id_cliente_promocion\",$id_cliente);\n\telse {\n\t\t$id_cliente = $Sesion->get_var(\"id_cliente_promocion\");\n\t\tif(!isset($id_cliente)){\n\t\t\t// debug(\"no hay cliente\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\t//$id_cliente = $Sesion->get_var(\"id_cliente_promocion\");\n\t$usuario = identifica_usuarios($Sesion);\n\t//debug($id_cliente);\n\n\tswitch($accion_ejecutar){\n\t\tcase \"Modificar\" :\n\t\t\tif ($Sesion->verifyVar('descuentos_familia_modificar',IKRN_VAR_CRC_CHANGE) AND $Sesion->verifyVar('descuentos_familia_modificar',IKRN_VAR_CRC_AUTHED)) {\n\t\t\t\tif(isset($descuentos_familia_modificar)) {\n\t\t\t\t\tforeach($descuentos_familia_modificar as $clave => $valor){\n\t\t\t\t\t\t$aTmp = array();\n\t\t\t\t\t\t$aTmp['descuento'] = $descuentos_familia_modificar[$clave];\n\t\t\t\t\t\t$aTmp['id_familia'] = $clave;\n\t\t\t\t\t\t$aTmp['id_cliente'] = $id_cliente;\n\t\t\t\t\t\t$aTmp['id_empresa'] = $usuario['id'];\n\t\t\t\t\t\t$oDb->tb_update('Cliente_familia_articulos',$aTmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\n\t\tcase \"Borrar\" :\n\t\t\tif(isset($descuentos_familia_borrar)){\n\t\t\t\tforeach($descuentos_familia_borrar as $clave => $valor)\n\t\t\t\t\tif($valor == 1 ){\n\t\t\t\t\t\t$aTmp = array();\n\t\t\t\t\t\t$aTmp['id_familia'] = $clave;\n\t\t\t\t\t\t$aTmp['id_cliente'] = $id_cliente;\n\t\t\t\t\t\t$aTmp['id_empresa'] = $usuario['id'];\n\t\t\t\t\t\t$oDb->tb_delete('Cliente_familia_articulos',$aTmp);\n\t\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\n\t\tcase \"Anyadir\" :\n\t\t\tif ($Sesion->verifyVar('descuentos_familia_modificar',IKRN_VAR_CRC_CHANGE) AND $Sesion->verifyVar('descuentos_familia_modificar',IKRN_VAR_CRC_AUTHED)) {\n\t\t\t\tif(isset($descuentos_familia_modificar)){\n\t\t\t\t\tforeach($descuentos_familia_modificar as $clave => $valor){\n\t\t\t\t\t\tif($descuentos_familia_modificar[$clave] != 0){\n\t\t\t\t\t\t\t$aTmp['id_empresa'] = $usuario['id'];\n\t\t\t\t\t\t\t$aTmp['id_cliente'] = $id_cliente;\n\t\t\t\t\t\t\t$aTmp['id_familia'] = $clave;\n\t\t\t\t\t\t\t$aTmp['descuento'] = $descuentos_familia_modificar[$clave];\n\t\t\t\t\t\t\t$oDb->tb_replace('Cliente_familia_articulos',$aTmp);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\n\t}//fin de acciones\n}", "public function publicaciones() //Lleva ID del proveedor para hacer carga de BD\r\n\t{\r\n\t\t//Paso a ser totalmente otro modulo para generar mejor el proceso de visualizacion y carga de datos en la vistas\r\n\r\n\t}", "public function sobrenos() {\n $this->load_template('sobrenos');\n }", "function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}", "function datos_plantilla($id_plantilla) {\n\t\t\n\t\t$query = \"SELECT paneles_templates.*\n\t\tFROM paneles_templates\n\t\tWHERE paneles_templates.id_template_panel='$id_plantilla'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query);\n\t\t$row=mysql_fetch_array($result); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "private function compilar_metadatos_generales_servicios_web()\n\t{\n\t\t//-- Datos basicos --\n\t\t$this->manejador_interface->mensaje('Servicios Web', false);\n\t\t$nombre_clase = 'toba_mc_gene__servicios_web';\n\t\t$archivo = $this->get_dir_generales_compilados() . '/' . $nombre_clase . '.php';\n\t\t$clase = new toba_clase_datos( $nombre_clase );\n\t\tforeach(toba_info_editores::get_servicios_web_acc() as $serv_web) {\n\t\t\t$datos = toba_proyecto_db::get_info_servicio_web($this->get_id(), $serv_web['servicio_web']);\n\t\t\t$clase->agregar_metodo_datos('servicio__'.$serv_web['servicio_web'], $datos );\n\t\t\t$this->manejador_interface->progreso_avanzar();\n\t\t}\n\t\t//Creo el archivo\n\t\t$clase->guardar( $archivo );\n\t\t$this->manejador_interface->progreso_fin();\n\t}", "function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}", "function LbuscarExamenesLaboratorio($datos) {\n $o_DLaboratorio = new DLaboratorio();\n $resultado = $o_DLaboratorio->DbuscarExamenesLaboratorio($datos);\n foreach ($resultado as $key => $value) {\n array_push($resultado[$key], \"../../../../fastmedical_front/imagen/icono/b_ver_on.gif ^ Puntos Control\");\n }\n return $resultado;\n }", "public function vistaRecomendacion()\n { \n \n require_once 'Vista/Header.php';\n require_once 'Vista/Recomendaciones/MainRecomendaciones.php'; \n require_once 'Vista/Footer.php'; \n\n }", "function getEstadisticaPorDia() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $dias_semana;\n\t\tglobal $usr;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'rendimiento_por_dia.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_DIA', 'es_primero_dia');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global_pordiasemana(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"rendimiento_resumen_global_pordiasemana\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"rendimiento_resumen_global_pordiasemana\"]);\n\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t$T->setVar('__objetivo_nombre', $conf_objetivo->getAttribute('nombre'));\n\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($dias_semana as $dia_id => $dia_nombre){\n\t\t\t\t$primero = true;\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@dia_id='.(($dia_id == 7)?0:$dia_id).']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t$T->setVar('es_primero_dia', '');\n\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t$T->setVar('__dia_nombre', $dia_nombre);\n\t\t\t\t\t\t$T->setVar('__dia_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t$T->parse('es_primero_dia', 'ES_PRIMERO_DIA', false);\n\t\t\t\t\t}\n\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t\t\t$T->setVar('__paso_minimo', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t$T->setVar('__paso_maximo', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t$T->setVar('__paso_promedio', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t$primero = false;\n\t\t\t\t\t$linea++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "function loadUbicaciones($where, $paso, $pais){\n\tinclude 'libcon.php';\n //$ubica = \"\";\n $bandera = false;\n if($pais == \"\"){\n $sql = \"SELECT * FROM web_salones WHERE concepto = $where AND estado = 1 ORDER BY regionsalon ASC;\";\n $result = miBusquedaSQL($sql);\n $ubica = armarUbicaciones($result, $paso);\n return $ubica;\n } else{\n $nuevoarray = array();$i=0;\n $sqlreg = \"SELECT campo, campo2, campo3, campo4, B.CONCEPTO, B.REGIONSALON, B.ESTADO FROM ms_configuracion A INNER JOIN (SELECT CONCEPTO, ESTADO, REGIONSALON FROM web_salones) B ON A.campo = B.REGIONSALON WHERE A.grupo = 'regiones' AND B.CONCEPTO = \".$where.\" AND B.ESTADO = 1;\";\n $regiones = (array) json_decode(miBusquedaSQL($sqlreg), true);\n foreach ($regiones as $r) {\n if($r[3] == $pais){\n $region = $r[0];\n $bandera = true;\n }\n\n $nuevoarray[$i] = $r[0];\n $i++;\n }\n\n if($bandera == true){\n $sql = \"SELECT * FROM web_salones WHERE concepto = $where AND estado = 1 AND regionsalon = \".$region.\" ORDER BY regionsalon ASC;\";\n $result = miBusquedaSQL($sql);\n $ubica = armarUbicaciones($result, $paso);\n } else if($bandera == false){\n $ubica = \"<b>No hubo resultados en la región consultada. Consulte en: </b><br><br><div class='blog-posts grid-view grid-concepto'><div class='isotope row'>\";\n $flag = \"\";$j=0;$hola=\"\";\n $unique = array_keys(array_flip($nuevoarray)); \n //var_dump($unique);\n $first_names = array_column($regiones, 'campo3');\n $unique2 = array_keys(array_flip($first_names)); \n //print_r($unique2);\n\n foreach ($unique as $r) {\n //$flag .= \"<img src='\".$r[2].\"' width='30px!important' height='22px' style='width:30px!important;''><br>\";\n \n\n $flag .= '<div class=\"col-md-2 col-sm-3 grid-view-post item\">\n <div class=\"item1 post\">\n <div class=\"box text-center\">\n <a href=\"?country='.abrevRegion($r).'\"><img class=\"ubiflags\" src=\"'.$unique2[$j].'\"><strong>'.cambiarRegion($r).'</strong></a>\n </div> \n </div>\n </div>';\n \n $j++;\n }\n\n $ubica .= $flag . \"</div></div>\";\n }\n\n return $ubica;\n }\n }", "public function mostrarservicios(){\n $mostrarservicios = $this->mostrar();\n require '../inicio/servicios.php';\n }", "public function run()\n {\n //\n\n\t $servicio = [\n\t \t'nombre' => 'Landing Insert',\n\t\t 'slug' => 'landing_insert',\n\t\t 'datos' => 'insertRegistroDc.php?cliente=DERCONTADOR&token=5393aa431688ad3b008ee4b27f535325',\n\t\t 'estado' => 1,\n\t\t 'crm_id' => 1,\n\t\t 'campos' => [\n\t\t \t[\n\t\t \t\t'nombre' => 'Nombre',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Cedula',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Celular',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'numeric',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Email',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Nombre_de_formulario',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Descripcion_carro',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Precio_lista',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Descuento',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Precio_Dercontador',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Marca',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Linea',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Modelo',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Fecha_de_separacion',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Direccion',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Ciudad',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Concesionario',\n\t\t\t\t 'requerido' => false,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Acepto_terminos_condiciones',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'Acepto_que_mi_informacion',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'registroId',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'string',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n\t\t\t [\n\t\t\t\t 'nombre' => 'timestamp',\n\t\t\t\t 'requerido' => true,\n\t\t\t\t 'tipo' => 'time_unix',\n\t\t\t\t 'estado' => 1\n\t\t\t ],\n [\n 'nombre' => 'color',\n 'requerido' => false,\n 'tipo' => 'string',\n 'estado' => 1\n ]\n\t\t ]\n\t ];\n\n\t $landings = [\n\t [\n\t \t'nombre' => 'Log de pagos',\n\t\t 'endpoint' => 'http://webprojects.rocks/clientes/massdigital/dercontador2017/wordpress/wp-content/plugins/exports-and-reports/api.php?report=7&full=1&action=json&token=5956cef64daa1&export_type=json',\n\t\t 'db_name' => 'landing_log_de_pagos',\n\t\t 'landing_identificador' => 'referencia',\n\t\t 'campo_fecha' => 'fecha_creacion',\n\t\t 'activo' => true,\n\t\t 'campos' => [\n\t\t \t 'Nombre_de_formulario',\n\t\t\t 'nombre',\n\t\t\t\t 'telefono',\n\t\t\t\t 'email',\n\t\t\t\t 'direccion',\n\t\t\t\t 'cedula',\n\t\t\t\t 'ciudad',\n\t\t\t\t 'agencia',\n\t\t\t\t 'meta_value',\n\t\t\t\t 'vehiculo',\n\t\t\t\t 'estado'\n\t\t ]\n\t ],\n\t [\n\t \t'nombre' => 'Interesados',\n\t\t 'endpoint' => 'http://webprojects.rocks/clientes/massdigital/dercontador2017/wordpress/wp-content/plugins/exports-and-reports/api.php?report=3&full=1&action=json&token=5956cef64daa1&export_type=json',\n\t\t 'db_name' => 'landing_interesados',\n\t\t 'landing_identificador' => 'id',\n\t\t 'campo_fecha' => 'datetime',\n\t\t 'activo' => true,\n\t\t 'campos' => [\n\t\t \t 'Nombre_de_formulario',\n\t\t\t 'nombre',\n\t\t\t\t 'email',\n\t\t\t\t 'celular',\n\t\t\t\t 'id_vehiculo',\n\t\t\t\t 'vehiculo',\n\t\t\t\t 'color_carro',\n\t\t\t\t 'acepto_tyc',\n\t\t\t\t 'acepto_mar',\n\t\t\t\t 'meta_value'\n\t\t ]\n\t ],\n\t [\n\t \t'nombre' => 'PQR',\n\t\t 'endpoint' => 'http://webprojects.rocks/clientes/massdigital/dercontador2017/wordpress/wp-content/plugins/exports-and-reports/api.php?report=8&full=1&action=json&token=5956cef64daa1&export_type=json',\n\t\t 'db_name' => 'landing_pqr',\n\t\t 'landing_identificador' => 'id_pqr',\n\t\t 'campo_fecha' => 'fecha',\n\t\t 'activo' => true,\n\t\t 'campos' => [\n\t\t \t 'Nombre_de_formulario',\n\t\t\t 'nombre',\n\t\t\t\t 'email',\n\t\t\t\t 'nro_identificacion',\n\t\t\t\t 'ciudad',\n\t\t\t\t 'direccion',\n\t\t\t\t 'celular',\n\t\t\t\t 'marca',\n\t\t\t\t 'linea',\n\t\t\t\t 'modelo',\n\t\t\t\t 'placa',\n\t\t\t\t 'vin',\n\t\t\t\t 'kms',\n\t\t\t\t 'taller',\n\t\t\t\t 'persona_contactada',\n\t\t\t\t 'mensaje',\n\t\t\t\t 'dia',\n\t\t\t\t 'mes',\n\t\t\t\t 'ano',\n\t\t\t\t 'acepto_tyc',\n\t\t\t\t 'acepto_mar'\n\t\t ]\n\t ],\n\t [\n\t \t'nombre' => 'Contacto',\n\t\t 'endpoint' => 'http://webprojects.rocks/clientes/massdigital/dercontador2017/wordpress/wp-content/plugins/exports-and-reports/api.php?report=9&full=1&action=json&token=5956cef64daa1&export_type=json',\n\t\t 'db_name' => 'landing_contacto',\n\t\t 'landing_identificador' => 'id_contact',\n\t\t 'campo_fecha' => 'fecha',\n\t\t 'activo' => true,\n\t\t 'campos' => [\n\t\t\t 'Nombre_de_formulario',\n\t\t\t 'nombre',\n\t\t\t 'email',\n\t\t\t 'nro_identificacion',\n\t\t\t 'ciudad',\n\t\t\t 'direccion',\n\t\t\t 'celular',\n\t\t\t 'asunto',\n\t\t\t 'mensaje',\n\t\t\t 'acepto_tyc',\n\t\t\t 'acepto_mar',\n\t\t ]\n\t ]\n\t ];\n\n\t $nuevoServicio = \\App\\Models\\Admin\\ServicioCrm::where('slug', 'landing_insert')->first();\n\n\t if(!isset($nuevoServicio)) {\n\t\t $nuevoServicio = \\App\\Models\\Admin\\ServicioCrm::create( array_except( $servicio, 'campos' ) );\n\n\t\t foreach ( $servicio['campos'] as $campo ) {\n\t\t\t $nuevoServicio->camposServiciosCrms()\n\t\t\t ->save( new \\App\\Models\\Admin\\CampoServicioCrm( $campo ) );\n\t\t }\n\t }\n\n\t foreach ( $landings as $landingData ) {\n\n\t\t \\Illuminate\\Support\\Facades\\DB::transaction(function() use ($landingData, $nuevoServicio) {\n\n\t\t $campos = $landingData['campos'];\n\t $landing = \\App\\Models\\Admin\\Landing::create(array_except($landingData, 'campos'));\n\n\t\t\t // Crear tabla para el landing\n\t\t\t \\Illuminate\\Support\\Facades\\Schema::create($landing->db_name, function (\\Illuminate\\Database\\Schema\\Blueprint $table) use ($campos) {\n\t\t\t\t $table->string('id');\n\t\t\t\t $table->string('landing_identificador');\n\t\t\t\t $table->string('fecha_creacion');\n\t\t\t\t $table->boolean('habeas')->default(true);\n\t\t\t\t $table->boolean('terminos')->default(true);\n\n\t\t\t\t foreach ($campos as $campo) {\n\t\t\t\t\t $table->string(\\App\\Providers\\FuncionesProvider::limpiaCadena($campo));\n\t\t\t\t }\n\n\t\t\t\t $table->timestamps();\n\t\t\t });\n\n\t\t\t // asociar el landing al servicio del crm\n\t\t\t \\App\\Models\\Admin\\ServiciosCrmsXLanding::create(['landing_id' => $landing->id, 'servicios_crm_id' => $nuevoServicio->id, 'estado' => true]);\n\t\t });\n\t }\n\n\n }", "public function Movil() {\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Titulo', 'Comunicación');\n\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'Movil.html')));\n\t\t}", "function getVista()\n {\n try {\n $list = $this->mCategory->get_All();\n include_once('./vistes/categoria.php');\n }catch(Exception $e){\n $this->error->throwException('304', 'No s`ha pogut carregar les dades i la vista', $e);\n }\n }", "function __construct($sitio) {\n\t\t\t$this->direccion=$sitio;\n\t\t}", "function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function crear_campos_dinamicos($modulo,$id_registro=null,$col_lab=4,$col_cam=10){\n if(!class_exists('Template')){\n import(\"clases.interfaz.Template\");\n }\n \n $ut_tool = new ut_Tool();\n $html = '';\n \n $columnas_fam=$this->cargar_parametros_familias();//cargar datos de familias\n \n $desc_valores_params = $valores_params = array();\n if ($id_registro!= null){\n //echo \"id registro: \".$id_registro;\n $sql = \"SELECT item_f.id id_item,item_f.descripcion descripcion_item FROM mos_requisitos_item as item INNER JOIN mos_requisitos_items_familias as item_f ON item.id_item=item_f.id WHERE id_requisitos = $id_registro\";\n //echo $sql;\n $data_params = $this->dbl->query($sql, array());\n foreach ($data_params as $value_data_params) {\n $valores_params[$value_data_params[id_item]] = $value_data_params[id_item];\n $desc_valores_params[$value_data_params[id_item]] = $value_data_params[descripcion_item];\n } \n }\n \n $js = $html = $nombre_campos = \"\";\n $html .= '<div class=\"form-group\">'\n . '<label class=\"col-md-4 control-label\" control-label\">FAMILIAS:</label></div>';\n $cont=0;\n foreach ($columnas_fam as $value) {\n $condicion=\"\";\n $primera_opc=' <option selected=\"\" value=\"\">-- Seleccione --</option>';\n if($id_registro!= null && isset($data_params[$cont][id_item])){//para editar\n $primera_opc= '<option selected=\"\" value=\"'.$data_params[$cont][id_item].'\">'.$data_params[$cont][descripcion_item].'</option>';\n $condicion=\"and id<>\".$data_params[$cont][id_item];\n }\n if($id_registro== null){// un nuevo*/\n $primera_opc=' <option selected=\"\" value=\"\">-- Seleccione --</option>';\n $condicion=\"\";\n }\n $nombre_campos .= \"campo_\".$value[id].\",\";\n//construir los select dinamicos para el formulario de requisitos\n $html .= '<div class=\"form-group\">'\n . '<label for=\"campo-'.$value[id].'\" class=\"col-md-4 control-label\">' . ucwords(strtolower($value[descripcion] )). '</label>'; \n $html .= '<div class=\"col-md-10\"> \n <select class=\"form-control\" name=\"campo_' . $value[id] . '\" id=\"campo_' . $value[id] . '\" data-validation=\"required\">';\n $html.=$primera_opc;// si es editar muestra de primera opcion el que tiene y si es nuevo. muestra opcion seleccione\n //echo \"SELECT id, descripcion from mos_requisitos_items_familias where id_familia=\".$value[id].\" \".$condicion.\"\";\n $html .= $ut_tool->OptionsCombo(\"SELECT id, descripcion from mos_requisitos_items_familias where id_familia=\".$value[id].\" \".$condicion.\"\"\n , 'id'\n , 'descripcion', $valores_params[$value[id]]);\n $cont++;\n $html .= '</select></div>';\n $html .= '</div>';\n\n \n \n }\n $array[nombre_campos] = $nombre_campos;\n $array[html] = $html;\n return $array;\n }", "function ogretmen_odev_getir ()\n {\n // if($odev=$this->vtb->query($sorgu))\n // {\n // $odevlist = $odev->fetchAll();\n\n // foreach ($odevlist as $o)\n // {\n // echo \"<div class='panel_akis_kutusu'>\".\"<p>\" . $o['odevadi'] . \"</p>\" . \"<p>\" . $o['dersadi'] . \"</p><p>\". $o['dtarih'] . \" \". $o['ttarih'] . \"</p></div>\" ;\n // }\n // }\n $sorgu=new sorgubul(\"select * from seviye_odevleri\",\"dersid\",\"=\",$_SESSION['dersler'],\"0,30\",\"or\");\n $sorgu=$sorgu->sorgu;\n\n if ($odev=$this->vtb->query($sorgu))\n {\n $odevlist = $odev->fetchAll();\n\n foreach ($odevlist as $o)\n {\n if ($a=$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid']) and $b =$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid'] . ' and okundumu = 0') )\n {\n $c = $a->fetchColumn();\n $d = $b->fetchColumn();\n $derssev=$this->vtb->prepare(\"select seviyeno,dersid from ders_seviyeler where seviyeid = ?\");\n $derssev->execute(array($o['seviye']));\n $derssev=$derssev->fetch();\n $ders=$this->vtb->prepare(\"select dersadi from dersler where dersid = ?\");\n $ders->execute(array($o['dersid']));\n $ders=$ders->fetchColumn();\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p style='padding: 10px 0px 0px 100px;float:left;'>\". $c . \" kişi teslim etti,\". $d . \" kişiyi okumadınız</p><a style='margin-left:20px;' class='soruonay' href='ogretmen_ders_goruntuleme.php?dersid=\" . $derssev['dersid'] . \"&seviyeno=\" . $derssev['seviyeno'] . \"&dersadi=\" . $ders .\"'>Kontrol et</a></div></div>\" ;\n\n }\n else\n {\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p>Kimse teslim etmedi</p></div></div>\" ;\n }\n }\n }\n\n }", "public function cargarPreguntas(){\n\t$this->load->view('../views/complementos/header');// se carga el encabezado\n\t$datos['preguntas'] = $this->mlPreguntas->getPreguntas();// se enlistan todas las preguntas y elmacena en este arreglo \n\t//$datos['datos2'] = $this->mlPreguntas->getDatosMicriosip();\n\t$this->load->view('encuesta', $datos);//Se carga la vista de encuesta y se le pasan los datos\n\t$this->load->view('../views/complementos/footer');// Se carga el pie de pagina\n\t}", "function cl_issplan() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issplan\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function elPlanTieneEstructuraDefinida(){\r\n \r\n $plan_id = $this->data['Anio']['plan_id'];\r\n\r\n $et = $this->Plan->tieneEstructuraDefinida($plan_id);\r\n\r\n return $et;\r\n\r\n }", "function carregarSistemas() {\n global $db;\n\n if ($_SESSION['usucpf'] != $_SESSION['usucpforigem']) {\n\n $sql = sprintf(\n \"SELECT s.sisid,\n trim(s.sisabrev) as sisabrev,\n trim(s.sisdsc) as sisdsc\n\n FROM seguranca.usuario u\n\n INNER JOIN seguranca.perfilusuario pu USING ( usucpf )\n INNER JOIN seguranca.perfil p ON pu.pflcod = p.pflcod\n INNER JOIN seguranca.sistema s ON p.sisid = s.sisid\n INNER JOIN seguranca.usuario_sistema us ON s.sisid = us.sisid AND u.usucpf = us.usucpf\n\n WHERE u.usucpf = '%s' AND\n us.suscod = 'A' AND\n p.pflstatus = 'A' AND\n u.suscod = 'A' AND\n s.sisstatus = 'A' AND\n s.sisid = %d\n GROUP BY s.sisid, s.sisabrev, s.sisdsc\n ORDER BY s.sisabrev\", $_SESSION['usucpf'], $_SESSION['sisid']\n );\n } else {\n $sql = sprintf(\n \"SELECT s.sisid,\n trim(s.sisabrev) as sisabrev,\n trim(s.sisdsc) as sisdsc\n\n FROM seguranca.usuario u\n INNER JOIN seguranca.perfilusuario pu USING ( usucpf )\n INNER JOIN seguranca.perfil p ON pu.pflcod = p.pflcod\n INNER JOIN seguranca.sistema s ON p.sisid = s.sisid\n INNER JOIN seguranca.usuario_sistema us ON s.sisid = us.sisid AND u.usucpf = us.usucpf\n\n WHERE u.usucpf = '%s' AND\n us.suscod = 'A' AND\n p.pflstatus = 'A' AND\n s.sisstatus = 'A' AND\n u.suscod = 'A'\n GROUP BY s.sisid, s.sisabrev, s.sisdsc\n ORDER BY s.sisabrev\", $_SESSION['usucpf']\n );\n }\n\n $sistemas = $db->carregar($sql);\n\n return $sistemas;\n }", "function ComandoConsultarPParticulares()\n\t{\n\t\t$lineaComando = $this->ConstruirComando(SP_PParticulares);\n\t\t$lineaComando = $lineaComando . $this->_cierre;\n\t\t//echo \"Comando: \".$lineaComando;\n\t\t//var_dump($lineaComando);\n\t\treturn $lineaComando;\n\t}", "public function dibujarPantalla( ) {\n $this->activarPantalla();\n $this->enviarNumero();\n\t $this->enviarVolumen();\n\t $this->enviarComando();\n $this->enviarNoInterrumpir();\n\t $this->enviarNuestroSonido();\n\t //this.pnlControl.getModuloControl().control_videoconferencia.llamadasactivas();\n }", "function action_rapide_sauve_pack() {\r\n\t$titre0 = $titre = _T('couteauprive:pack_actuel', array('date'=>cs_date())); $n=0;\r\n\tif(isset($GLOBALS['cs_installer'][$titre]))\r\n\t\twhile(isset($GLOBALS['cs_installer'][\"$titre (\".++$n.')']));\r\n\tif($n) $titre = \"$titre ($n)\";\r\n\tinclude_spip(_DIR_CS_TMP.'config');\r\n\t$pack = \"\\n# Le Couteau Suisse : pack de configuration du \".date(\"d M Y, H:i:s\").\"\\n\\$GLOBALS['cs_installer']['$titre'] = \" . var_export($GLOBALS['cs_installer'][$titre0], true) . \";\\n\";\r\n\t$fo = strlen(_FILE_OPTIONS)? _FILE_OPTIONS:false;\r\n\t$t='';\r\n\tif ($fo) {\r\n\t\tif (lire_fichier($fo, $t) && strlen($t)) {\r\n\t\t\t$t = preg_replace(',\\?'.'>\\s*$,m', $pack.'?'.'>', $t, 1);\r\n\t\t\tif(ecrire_fichier($fo, $t)) return;\r\n\t\t\telse cs_log(\"ERREUR : l'ecriture du fichier $fo a echoue !\");\r\n\t\t} else cs_log(\" -- fichier $fo illisible. Inclusion non permise\");\r\n\t\tif(strlen($t)) return;\r\n\t}\r\n\t// creation\r\n\t$fo = defined('_SPIP19100')?_DIR_RESTREINT.'mes_options.php':_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES._NOM_CONFIG.'.php';\r\n\t$ok = ecrire_fichier($fo, '<?'.\"php\\n\".$pack.\"\\n?\".'>');\r\ncs_log(\" -- fichier $fo absent \".($ok?'mais cree avec l\\'inclusion':' et impossible a creer'));\r\n}", "function autorizar_producto_san_luis($id_mov){\r\n\r\nglobal $db;\t\r\n \r\n $db->starttrans();\r\n $fecha_hoy=date(\"Y-m-d H:i:s\",mktime());\r\n \r\n //traigo el deposito origen\r\n $sql = \"select deposito_origen,deposito_destino\r\n from movimiento_material where id_movimiento_material = $id_mov\"; \r\n $res = sql($sql) or fin_pagina();\r\n $id_deposito_origen = $res->fields[\"deposito_origen\"];\r\n $id_deposito_destino = $res->fields[\"deposito_destino\"];\r\n \t \r\n //traigo el detalle de los movimientos a liberar \t \r\n $sql=\"select * from detalle_movimiento where id_movimiento_material=$id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\r\n $comentario = \" Autorizacion de PM Producto San Luis nro: $id_mov\";\r\n $id_tipo_movimiento = 7;\r\n\r\n //por cada detalle voy liberando las reservas del pm autorizado \r\n for($i=0;$i<$res->recordcount();$i++) {\r\n \t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n $cantidad = $res->fields[\"cantidad\"];\r\n $id_detalle_movimiento = $res->fields[\"id_detalle_movimiento\"]; \r\n ///////////////////////////////////////\r\n $sql = \"select id_recibidos_mov,cantidad\r\n from recibidos_mov where id_detalle_movimiento=$id_detalle_movimiento \r\n and ent_rec=0\";\r\n $detalle_rec = sql($sql) or fin_pagina();\r\n $id_recibido_mov = $detalle_rec->fields[\"id_recibidos_mov\"];\r\n if($id_recibido_mov==\"\") {\r\n\t \t //insert\r\n\t\t $sql = \"select nextval('recibidos_mov_id_recibidos_mov_seq') as id_recibido_mov\";\r\n\t\t $res_1 = sql($sql) or fin_pagina();\r\n\t\t $id_recibido_mov = $res_1->fields[\"id_recibido_mov\"];\r\n\t\t $sql=\"insert into recibidos_mov(id_recibidos_mov,id_detalle_movimiento,cantidad,ent_rec)\r\n\t\t values($id_recibido_mov,$id_detalle_movimiento,$cantidad,0)\";\r\n }else {\r\n\t //update\r\n\t $sql=\"update recibidos_mov set cantidad=cantidad+$cantidad\r\n\t where id_recibidos_mov=$id_recibido_mov\";\r\n }//del else\r\n sql($sql) or fin_pagina();\r\n $sql =\"insert into log_recibidos_mov(id_recibidos_mov,usuario,fecha,cantidad_recibida,tipo)\r\n values($id_recibido_mov,'\".$_ses_user[\"name\"].\"','$fecha_hoy',$cantidad,'entrega')\";\r\n sql($sql) or fin_pagina();\r\n /////////////////////////////////////// \r\n descontar_reserva($id_prod_esp,$cantidad,$id_deposito_origen,$comentario,$id_tipo_movimiento,\"\",$id_detalle_movimiento,\"\");\r\n $res->movenext(); \r\n }//del for\r\n \t \r\n //Inserto la Mercaderia entrante en el stock BS AS \r\n $sql = \"select * from mercaderia_entrante where id_movimiento_material = $id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n $comentario = \"Producto San Luis perteneciente al PM nro: $id_mov\";\r\n for($i=0;$i<$res->recordcount();$i++){\r\n\t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n\t $cantidad = $res->fields[\"cantidad\"];\r\n\t $descripcion = $res->fields[\"descripcion\"]; \r\n\t //el id_tipo_movimiento le hardcodeo uno de la tabla stock.tipo_movimiento\r\n\t $id_tipo_movimiento='13';\r\n\t //el ingreso del producto es a \"disponible\" por lo tanto la funcion no toma en cuenta los parametros que siguen\r\n\t $a_stock='disponible';\r\n\t agregar_stock($id_prod_esp,$cantidad,$id_deposito_destino,$comentario,$id_tipo_movimiento,$a_stock,$id_tipo_reserva,\"\",$id_detalle_movimiento,$id_licitacion,$nro_caso);\r\n\t $res->movenext();\r\n }//del for\r\n $db->completetrans();\r\n\r\n }", "function getEstadisticaResumen() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'rendimiento_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t\t$horarios[($this->horario_id*-1)] = new Horario(($this->horario_id*-1));\n\t\t\t$horarios[($this->horario_id*-1)]->nombre = \"Horario Inhabil\";\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\t\t\t$T->setVar('lista_pasos', '');\n\n\t\t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n//\t\t\t\t\tprint $sql;\n\t\t\t$res =& $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"rendimiento_resumen_global\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"rendimiento_resumen_global\"]);\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif ($horario->horario_id == \"0\" and $xpath->query('//detalle[@paso_orden]/datos/dato')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre', $horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t/* DATOS DE LA TABLA */\n\t\t\t$linea = 1;\n\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t$tag_dato = $xpath->query('//detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/datos/dato')->item(0);\n\t\t\t\tif ($tag_dato == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t$linea++;\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado =$T->parse('out', 'tpl_tabla');\n\t}", "function projectMetircsSitewise(){\n\n\t$sql=\"SELECT Distinct `site` FROM `pmdb_pi` where `project_name` = 'avel_mro_doc'\";\n\t$result = dbi_query($sql);\n\t$i=0;\n\twhile($row = dbi_fetch_row($result))\n\t{\n\t\t$site[$i]=$row[0];\n\t\t$site[$i]=str_replace(\" \",\"_\",$site[$i]);\n\t\t$i++;\n\t}\n\tdbi_free_result ( $result );\n\t$sql=\"SELECT date_format (Billing_Cutoff_dt,'%M-%Y')as datee,\";\n\tfor($i=0;$i<count($site);$i++)\n\t$sql .=\"COUNT(IF(p.`site` = '$site[$i]',1,NULL))as $site[$i],\";\n\t$sql.=\"COUNT(*)as Total FROM avel_mro_doc a\n\tJOIN pmdb_pi p\n\tON p.pi=a.pi\n\twhere DATE_FORMAT(Billing_Cutoff_dt,'%Y')= \\\"2010\\\"\n\tgroup by DATE_FORMAT(Billing_Cutoff_dt,'%m')\n\torder by DATE_FORMAT(Billing_Cutoff_dt ,'%m')\";\n\t$result = dbi_query($sql);\n\t$i=0;\n\twhile($row = dbi_fetch_row($result))\n\t{\n\t\t$Month[$i]=$row[0];\n\t\t$Phoenix[$i] = $row[1];\n\t\t$Wichita[$i] = $row[2];\n\t\t$Coon_Rapids[$i] = $row[3];\n\t\t$Shanghai[$i] = $row[4];\n\t\t$Strongsville[$i] = $row[5];\n\t\t$Minneapolis[$i] = $row[6];\n\t\t$Irving[$i] = $row[7];\n\t\t$Renton[$i] = $row[8];\n\t\t$Urbana[$i] = $row[9];\n\t\t$Olathe[$i] = $row[10];\n\t\t$Penang[$i] = $row[11];\n\t\t$Tucson[$i] = $row[12];\n\t\t$total[$i]=$row[13];\n\n\t\t$i++;\n\t}\n\tdbi_free_result ( $result );\n\n\techo $data1_[0];\n\t$strXMLx = \"\";\n\t$strXMLx = \"<chart labelDisplay='ROTATE' bgColor='d9e1e4' showBorder='1' slantLabels='1' plotGradientColor='000222' placeValuesInside='1' caption='AvEl - MRO ORI Completion Status' yAxisMaxValue='5' rotateValues='1' xAxisName='Months' yAxisName='ORIs delevered' showValues='$chartValues' legendPosition='RIGHT'\";\n\t$strXMLx .= \"exportEnabled='1' exportAtClient='0' exportAction='download' exportHandler='http://localhost/WEB/FusionCharts/FusionCharts_Evaluation/ExportHandlers/PHP/FCExporter.php' exportFileName='MyFileName'>\";\n\t$strXMLx .= \"<categories>\";\n\tFor($i=0;$i<count($Month);$i++){\n\t\t$strXMLx .= \"<category label='$Month[$i]' />\";\n\t}\n\t$strXMLx .= \"</categories>\";\n\t$strXMLx .= \"<dataset seriesName='Phoenix'>\";\n\tFor($i=0;$i<count($Month);$i++){\n\t\t$strXMLx .= \"<set value='$Phoenix[$i]' />\";\n\t}$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Wichita'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Wichita[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Coon_Rapids'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Coon_Rapids[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Shanghai'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Shanghai[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Strongsville'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Strongsville[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx.= \"<dataset seriesName='Minneapolis'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Minneapolis[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Irving'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Irving[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Renton'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Renton[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Urbana'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Urbana[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Olathe'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Olathe[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Penang'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Penang[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"<dataset seriesName='Tusion'>\";\n\tFor($i=0;$i<count($Month);$i++)\n\t$strXMLx .= \"<set value='$Tucson[$i]' />\";\n\t$strXMLx .= \"</dataset>\";\n\t$strXMLx .= \"</chart>\";\n\techo renderChart(\"./Charts/StackedColumn2D.swf\", \"\", $strXMLx, \"myNext4\",1200, 400, 0, 0);\n\n}", "function get() {\n\n\n $node_id = $this->input->post('node_id');\n $plans = Doctrine_Core::getTable('Plan')->retrieveCurrents($node_id);\n\n //ESTA INTRUCCION SOLO SE OCUPA SI SE ESTA EN UN SERVODOR WINDOWS\n $dir = str_replace(\"\\\\\", \"/\", $this->config->item('plan_dir'));\n // si posee algun plano asociado\n if ($plans->count()) {\n $size = $plans->count();\n $plans = $plans->toArray();\n\n $ruta = 'plans/' . $plans[0]['plan_filename'];\n\n if (!file_exists($ruta)) {\n\n $plans[0]['plan_filename'] = \"not_image_icon.png\";\n }\n\n echo '({\"total\":\"' . $size . '\", \"plan_dir\": \"' . $dir . '\", \"results\":' . $this->json->encode($plans) . '})';\n } else {\n\n //El caso de no poseer plano se busca si posee linea asociada\n $line = Doctrine_Core::getTable('PlanNode')->findPlanNode($node_id);\n\n if ($line->count()) {\n $line = $line->toArray();\n $nodeLine = intval($line[0]['nodeLine']);\n $associatedLine = Doctrine_Core::getTable('Plan')->retrieveCurrents($nodeLine);\n if ($associatedLine->count()) {\n $associatedLine = $associatedLine->toArray();\n $associatedLine[0]['handler'] = $line[0]['handler'];\n $associatedLine[0]['plan_node_id'] = $line[0]['plan_node_id'];\n $associatedLine[0]['plan_section_id'] = $line[0]['plan_section_id'];\n\n echo '({\"total\":\"' . $plans->count() . '\", \"plan_dir\": \"' . $dir . '\", \"results\":' . $this->json->encode($associatedLine) . '})';\n } else {\n echo '({\"total\":\"0\", \"results\":[]})';\n }\n }\n }\n }", "function procesar_carga ($datos){\n \n if(strcmp($datos['tipo'], \"Definitiva\")==0){\n $this->s__dia=$datos['dia_semana'];\n \n //if($this->validar_datos($datos['hora_inicio'], $datos['hora_fin'])){\n //if($this->existe_definitiva($datos)){\n $secuencia= recuperar_secuencia('asignacion_id_asignacion_seq');\n $this->registrar_asignacion($datos);\n $this->registrar_asignacion_definitiva($datos);\n //agregamos el equipo de catedra si existe\n if(count($this->s__docentes_seleccionados)>0){\n foreach($this->s__docentes_seleccionados as $clave=>$docente){\n $catedra=array(\n 'id_asignacion' => $secuencia,\n 'nro_doc' => $docente['nro_doc'],\n 'tipo_doc' => $docente['tipo_doc']\n );\n \n $this->dep('datos')->tabla('catedra')->nueva_fila($catedra);\n $this->dep('datos')->tabla('catedra')->sincronizar();\n $this->dep('datos')->tabla('catedra')->resetear();\n }\n }\n //}\n// else{\n// $mensaje=\" Está intentando solapar asignaciones \";\n// //$mensaje=\"Error Horario Repetido {$this->s__error}\";\n// toba::notificacion()->agregar(utf8_d_seguro($mensaje));\n// }\n// }\n// else{\n// $mensaje=\" La hora de inicio debe ser menor a la hora de fin \";\n// toba::notificacion()->agregar($mensaje);\n// }\n }\n else{\n if($this->validar_datos($datos['hora_inicio'], $datos['hora_fin'], $datos['fecha_inicio'], $datos['fecha_fin'])){\n if($this->existe_periodo($datos)){\n $this->registrar_asignacion($datos);\n $this->registrar_asignacion_periodo($datos);\n }\n else{\n $mensaje=\" Está intentando solapar asignaciones \";\n toba::notificacion()->agregar(utf8_decode($mensaje), $nivel);\n }\n }\n else{\n $mensaje=\" Datos inconsistentes en la fecha u hora \";\n toba::notificacion()->agregar($mensaje, $nivel);\n }\n }\n }", "public function enlacesPaginasControladores(){\r\n $enlacesControladores=$_GET[\"action\"];\r\n# esta veriable esta pidiendo que tome la clase enlaces y que se conecte a enlacespaginasModelos\r\n $respuesta=EnlacesPaginas::enlacesPaginasModelos($enlacesControladores);\r\n\r\n#aqui solo borramos el \"echo $enlacesControladores\" y los sutituimos por \"include $respuesta\" rescordemos que\r\n# el echo solo imprime textos y el include incluye formatos enteros o contenidos\r\n include $respuesta;\r\n\r\n }", "private function compilar_metadatos_generales_basicos()\n\t{\n\t\t//-- Datos basicos --\n\t\t$this->manejador_interface->mensaje('Info basica', false);\n\t\t$nombre_clase = 'toba_mc_gene__basicos';\n\t\t$archivo = $this->get_dir_generales_compilados() . '/' . $nombre_clase . '.php';\n\t\t$clase = new toba_clase_datos( $nombre_clase );\n\t\t$datos = toba_proyecto_db::cargar_info_basica( $this->get_id() );\n\t\t$clase->agregar_metodo_datos('info_basica', $datos);\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Fuentes --\n\t\tforeach( $this->get_indice_fuentes() as $fuente ) {\n\t\t\t$datos = toba_proyecto_db::get_info_fuente_datos( $this->get_id(), $fuente );\n\t\t\t//-- Se busca la relacion entre nombre_tabla y dt\n\t\t\t$mapeo = toba_proyecto_db::get_mapeo_tabla_dt($this->get_id(), $fuente);\n\t\t\t$datos['mapeo_tablas_dt'] = $mapeo;\n\t\t\t$clase->agregar_metodo_datos('info_fuente__'.$fuente, $datos );\n\t\t}\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Permisos --\n\t\tforeach( $this->get_indice_permisos() as $permiso ) {\n\t\t\t$datos = toba_proyecto_db::get_descripcion_permiso( $this->get_id(), $permiso );\n\t\t\t$clase->agregar_metodo_datos('info_permiso__'.$permiso, $datos );\n\t\t}\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//-- Indice de componentes --\n\t\t$datos = toba_proyecto_db::get_mapeo_componentes_indice( $this->get_id() );\n\t\t$clase->agregar_metodo_datos('info_indices_componentes', $datos );\n\t\t$this->manejador_interface->progreso_avanzar();\n\t\t//Creo el archivo\n\t\t$clase->guardar( $archivo );\n\t\t$this->manejador_interface->progreso_fin();\n\t}", "function listar_originales_idioma($registrado,$id_tipo,$letra,$filtrado,$orden,$id_subtema,$id_idioma,$tipo_pictograma,$txt_locate,$sql) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND palabras.id_tipo_palabra='.$id_tipo.''; }\n\t\t\t\n\t\tif (isset($sql) && $sql !='') { \n\t\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\t\t'.$sql; \n\t\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t} else {\n\t\t\t\n\t\t\tif ($id_subtema==99999) { \n\t\t\t\t$sql_subtema=''; \n\t\t\t\t$subtema_tabla='';\n\t\t\t\t$subtema_tabla_from='';\n\t\t\t} \n\t\t\telse { \n\t\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\tAND palabra_subtema.id_subtema='.$id_subtema.''; \n\t\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($letra==\"\") { $sql_letra=''; } \n\t\telse { \n\t\t\n\t\t\tswitch ($txt_locate) { \n\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 2:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '%%$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 3:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '%%$letra'\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion='$letra'\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}\t\n\t\t\n\t\tif ($filtrado==1) { $sql_filtrado='imagenes.ultima_modificacion'; } \n\t\telseif ($filtrado==2) { $sql_filtrado='palabras.palabra'; }\n\t\t\n\t\t$query = \"SELECT COUNT(*)\n\t\tFROM palabra_imagen, imagenes, palabras, traducciones_\".$id_idioma.\" $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabra_imagen.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabras.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".traduccion IS NOT NULL\n\t\t$sql_letra\n\t\t$sql_tipo\n\t\t$sql_subtema\t\n\t\tAND imagenes.id_tipo_imagen=$tipo_pictograma\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\t$mostrar_registradas\n\t\tORDER BY $sql_filtrado $orden\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row[0];\n\t\t\n\t}", "function conf(){\n $this->s__perfil = toba::manejador_sesiones()->get_perfiles_funcionales();\n // print_r($this->s__perfil); \n \n $p = array_search('autoridad_mesa', $this->s__perfil);\n if($p !== false){//Es autoridad de mesa\n //Cargar datos del usuario especifico\n //obtengo el nombre de usuario logueado\n $usr = toba::manejador_sesiones()->get_id_usuario_instancia();\n \n $id_mesa = $this->dep('datos')->tabla('mesa')->get_de_usr($usr);\n if(sizeof($id_mesa)>0){\n $this->s__id_mesa = $id_mesa[0]['id_mesa'];\n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \n if($this->s__mesa['estado'] >= 2){//Ya fue validado por la secretaria\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else//No se encuentra mesa asociada al usuario logueado\n toba::notificacion()->agregar(\"No se encuentra el usuario ingresado\",\"info\");\n }\n else{\n $this->s__id_mesa = toba::memoria()->get_parametro('c');//el parametro c tiene el id mesa\n \n $this->s__retorno = toba::memoria()->get_parametro('k');//el parametro k tiene la dir de retorno\n $this->s__retorno_estado = toba::memoria()->get_parametro('f');\n \n \n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \t\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Es junta electoral\n $this->controlador()->evento('procesar')->set_etiqueta('Confirmar');\n $this->controlador()->evento('enviar')->ocultar();\n\n if($this->s__mesa['estado'] > 3){//Ya fue validado por la secretaria\n// $this->dep('form_ml_directivo')->set_solo_lectura('votos');\n// $this->dep('form_ml_superior')->set_solo_lectura('votos');\n// $this->dep('form_ml_extra')->set_solo_lectura('votos');\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);//print_r(isset($p)?'no es false':'es false');\n if($p !== false){//Es secretaria\n $this->controlador()->evento('procesar')->set_etiqueta('Validar');\n $this->controlador()->evento('enviar')->ocultar();\n\n }\n \n }\n }\n \n if(isset($this->s__id_mesa)){//Si el pedido viene de la operacion Confirmar/Cargar// \n $this->s__claustro = $this->s__mesa['id_claustro'];\n $this->s__id_nro_ue = $this->dep('datos')->tabla('sede')->get_unidad($this->s__mesa['id_sede']);\n $this->s__id_sede = $this->s__mesa['id_sede'];\n }\n }", "function get_ubicacion()\n {\n $usuario = consultas::get_pf();\n $dep = consultas::get_dep_habilitada();\n if($usuario == 'acor_mesa')\n {\n if($dep['id_dep'] == 3)\n { //-- 3:Mesa de EyS --//\n $datos['motivo'] = 'and m1.id_motivo = 10'; //-- 10: Salida de Mesa de EyS --//\n $datos['ubicacion'] = 'DPTO. MESA DE EyS';\n $datos['ubi'] = 5;\n $datos['id_motivo'] = '10';\n }\n }elseif($usuario == 'acor_carga')\n {\n if($dep['id_dep'] == 1)\n { //-- 1:Gestion de deudas --//\n $datos['motivo'] = 'and m1.id_motivo = 11'; //-- 10: Salida de Gestion de deudas --//\n $datos['ubicacion'] = 'DIR. GESTION DE DEUDAS';\n $datos['ubi'] = 6;\n $datos['id_motivo'] = '11';\n }\n elseif($dep['id_dep'] == 2)\n { //-- 2:Procuracion y legales --//\n $datos['motivo'] = 'and m1.id_motivo = 12'; //-- 10: Salida de Procuracion y legales --//\n $datos['ubicacion'] = 'DIR. PROCURACION Y LEGALES';\n $datos['ubi'] = 7;\n $datos['id_motivo'] = '12';\n }\n }\n return $datos;\n }", "function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "function CargarIdioma2($Ruta)\n{\n\t//asignamos idioma español como defecto\n\tif (!(isset($_SESSION['idioma'])))\n\t$_SESSION['idioma'] = 'ESPANHOL';\n\n\tswitch ($_SESSION['idioma'])\n\t{\n\tcase 'ESPANHOL':\n\t\tinclude_once $Ruta.'GESTAPP/Modelos/ESPANHOL.php';\n\t\t\n\t\tbreak;\n\tcase 'GALEGO':\n\t\tinclude_once $Ruta.'GESTAPP/Modelos/GALEGO.php';\n\t\t\n\t\tbreak;\n\tcase 'ENGLISH':\n\t\tinclude_once $Ruta.'GESTAPP/Modelos/ENGLISH.php';\n\t\t\n\t\tbreak;\n\tDEFAULT:\n\t\tbreak;\n\t}\n\treturn $Idioma;\n}", "function listarTramitesAjustables(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_LISTRAPE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('fecha_ajuste','fecha_ajuste','date');\n\t\t$this->captura('id_gestion','int4');\n $this->captura('nro_tramite','varchar');\n $this->captura('codigo','varchar');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function mostrarConfEste(){\n return $resultado2=$this->conexion->query(\"SELECT Nombre,Ciudad,Division FROM equipos WHERE Conferencia='East'\");\n }", "public function tutti()\n {\n\n $utentiDao = new AutoreDao();\n $res = $utentiDao->read();\n\n $view = new ViewCore();\n echo $view->render(\n 'gestione_utenti\\tutti_gli_utenti.html',\n ['autori' => $res]\n );\n\n\n\n //print_r($twig);\n }", "function exec_suivi() {\n\t$id_auteur = (int) _request('id_auteur');\n\t$id_article = (int) _request('id_article');\n\t$nouv_auteur = (int) _request('nouv_auteur');\n\t$contexte = array();\n\t$idper = '';\n\t$nom = '';\n\t$prenom = '';\n\t$statutauteur = '6forum';\n\t$inscrit = '';\n\t$statutsuivi = '';\n\t$date_suivi = '';\n\t$heure_suivi = '';\n\n\t//Addon fields\n\t$sante_comportement = '';\n\t$alimentation = '';\n\t$remarques_inscription = '';\n\t$ecole = '';\n\t$places_voitures = '';\n\t$brevet_animateur = '';\n\t$historique_payement = '';\n\t$extrait_de_compte = '';\n\t$statut_payement = '';\n\t$tableau_exception = '';\n\t$recus_fiche_medical = '';\n $facture = '';\n $adresse_facturation = '';\n\n\n\t//----------- lire DB ---------- AND id_secteur=2\n\t$req = sql_select('id_article,idact,titre,date_debut', 'spip_articles', \"id_article=$id_article\");\n\tif ($data = sql_fetch($req)) {\n $idact = $data['idact'];\n\t\t$titre = $data['titre'];\n $date_debut = $data['date_debut'];\n\t}\n\telse\n\t\t$id_article = 0;\n\n\t$req = sql_select('*', \n \"spip_auteurs AS A LEFT JOIN spip_auteurs_articles AS S ON S.id_auteur=$id_auteur AND S.id_article=$id_article AND S.inscrit<>''\", \"A.id_auteur=$id_auteur\");\n\tif ($data = sql_fetch($req)) {\n\t\t$idper = $data['idper'];\n\t\t$nom = $data['nom'];\n\t\t$prenom = $data['prenom'];\n\t\t$statutauteur = $data['statut'];\n\t\tif ($data['inscrit']) {\n\t\t\t$inscrit = 'Y';\n\t\t\t$statutsuivi = $data['statutsuivi'];\n\t\t\t$date_suivi = $data['date_suivi'];\n\t\t\t$heure_suivi = $data['heure_suivi'];\n\n\t\t\t$sante_comportement = $data['sante_comportement'];\n\t\t\t$alimentation = $data['alimentation'];\n\t\t\t$remarques_inscription = $data['remarques_inscription'];\n\t\t\t$ecole = $data['ecole'];\n\t\t\t$places_voitures = $data['places_voitures'];\n\t\t\t$brevet_animateur = $data['brevet_animateur'];\n\t\t\t$historique_payement = $data['historique_payement'];\n\t\t\t$extrait_de_compte = $data['extrait_de_compte'];\n\t\t\t$statut_payement = $data['statut_payement'];\n\t\t\t$tableau_exception = $data['tableau_exception'];\n\t\t\t$recus_fiche_medical = $data['recus_fiche_medical'];\n\t\t\t$prix_special = $data['prix_special'];\n $facture = $data['facture'];\n $adresse_facturation = $data['adresse_facturation'];\n\t\t}\n\t}\n\telse\n\t\t$id_auteur = 0;\n\n\t//-------- form soumis -----------\n\tif (_request('okconfirm') && $id_article && ($id_auteur || $nouv_auteur))\n\t\tif ($GLOBALS['connect_statut']!='0minirezo' || ! autoriser('modifier', 'article', $id_article))\n\t\t\t$contexte['message_erreur'] = 'Autorisation refusée';\n\t\telse {\n\t\t\t$statutsuivi = _request('statutsuivi');\n\t\t\t$date_suivi = _request('date_suivi');\n\t\t\t$heure_suivi = _request('heure_suivi');\n \n $sante_comportement = _request('sante_comportement');\n $alimentation = _request('alimentation');\n $remarques_inscription = _request('remarques_inscription');\n $ecole = _request('ecole');\n $places_voitures = _request('places_voitures');\n $brevet_animateur = _request('brevet_animateur');\n $extrait_de_compte = _request('extrait_de_compte');\n $historique_payement = str_replace(',', '.', _request('historique_payement'));\n $statut_payement = _request('statut_payement');\n $tableau_exception = _request('tableau_exception');\n $recus_fiche_medical = _request('recus_fiche_medical');\n $prix_special = _request('prix_special');\n $facture = _request('facture');\n $adresse_facturation = _request('adresse_facturation');\n\n\t\t\tinclude_spip('inc/date_gestion');\n\t\t\t$contexte['erreurs'] = array();\n\t\t\tif (@verifier_corriger_date_saisie('suivi', false, $contexte['erreurs']))\n\t\t\t\t$date_suivi = substr($date_suivi, 6, 4).'-'.substr($date_suivi, 3, 2).'-'.substr($date_suivi, 0, 2);\n\t\t\telse\n\t\t\t\t$contexte['message_erreur'] = 'Erreur';\n\n\t\t\tif (! $contexte['message_erreur'])\n\t\t\t\tif ($nouv_auteur) {\n\t\t\t\t\t$req = sql_select('A.id_auteur,id_article',\"spip_auteurs AS A LEFT JOIN spip_auteurs_articles AS S ON S.id_auteur=$nouv_auteur AND S.id_article=$id_article\", \"A.id_auteur=$nouv_auteur\");\n\t\t\t\t\tif ($data = sql_fetch($req)) {\n\t\t\t\t\t\t$id_auteur = $data['id_auteur'];\n\t\t\t\t\t\tif (! $data['id_article'])\n\t\t\t\t\t\t\tsql_insertq('spip_auteurs_articles', array('id_auteur'=>$id_auteur, 'id_article'=>$id_article, 'inscrit'=>'Y'));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$contexte['message_erreur'] = 'Erreur';\n\t\t\t\t\t\t$contexte['erreurs']['nouv_auteur'] = 'auteur ID inconnu';\n\t\t\t\t\t\t$id_auteur = 0;\n\t\t\t\t\t\t$inscrit = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif ($id_auteur && ! $contexte['message_erreur']) {\n\t\t\t\tsql_updateq('spip_auteurs_articles', \n array(\n \t\t'inscrit'=>'Y', \n \t\t'statutsuivi'=>$statutsuivi, \n \t\t'date_suivi'=>$date_suivi, \n \t\t'heure_suivi'=>$heure_suivi,\n \t'sante_comportement'=>$sante_comportement,\n \t'alimentation'=>$alimentation,\n \t'remarques_inscription'=>$remarques_inscription,\n \t'ecole'=>$ecole,\n \t'brevet_animateur'=>$brevet_animateur,\n \t'places_voitures'=>$places_voitures,\n \t'extrait_de_compte' => $extrait_de_compte,\n \t'historique_payement' => $historique_payement,\n \t'statut_payement' => $statut_payement,\n \t'tableau_exception' => $tableau_exception,\n \t'recus_fiche_medical' => $recus_fiche_medical,\n \t'prix_special' => $prix_special,\n 'facture' => $facture,\n 'adresse_facturation' => $adresse_facturation\n ), \"id_auteur=$id_auteur AND id_article=$id_article\");\n\n // On fait l'update de la date_validation via sql_update plutôt que sql_updateq.\n sql_update('spip_auteurs_articles', array('date_validation' => 'NOW()'), 'id_auteur='.sql_quote($id_auteur).' AND id_article='.sql_quote($id_article));\n\t\t\t\t$contexte['message_ok'] = 'Ok, l\\'inscription est mise à jour';\n\t\t\t\t$inscrit = 'Y';\n\n /*\n * Si c'est une nouvelle inscription faite par un admin, on envoie un mail\n */\n if (_request('new') == 'oui') {\n $p = 'Bonjour,'.\"\\n\\n\".'Voici une nouvelle inscription :'.\"\\n\\n\";\n $p .= 'Sexe : '.$data['codecourtoisie'].\"\\n\";\n $p .= 'Prénom : '.$prenom.\"\\n\";\n $p .= 'Nom : '.$nom.\"\\n\";\n $p .= 'e-mail : '.$data['email'].\"\\n\";\n $p .= 'Date naissance : '.$data['date_naissance'].\"\\n\";\n $p .= 'Lieu naissance : '.$data['lieunaissance'].\"\\n\";\n \n $p .= 'Adresse : '.$data['adresse'].\"\\n\";\n $p .= 'No : '.$data['adresse_no'].\"\\n\";\n $p .= 'Code postal : '.$data['codepostal'].\"\\n\";\n $p .= 'Localité : '.$data['localite'].\"\\n\";\n $p .= 'Téléphone : '.$data['tel1'].\"\\n\";\n $p .= 'GSM : '.$data['gsm1'].\"\\n\";\n $p .= 'Fax : '.$data['fax1'].\"\\n\";\n \n $p .= \"\\n*******\\n\\n\";\n \n $p .= 'Études en cours et établissement : '.$data['etude_etablissement'].\"\\n\";\n $p .= 'Profession : '.$data['profession'].\"\\n\";\n $p .= 'Demandeur d’emploi : '.$data['demandeur_emploi'].\"\\n\";\n $p .= 'Membre d’une association : '.$data['membre_assoc'].\"\\n\";\n $p .= 'Pratique : '.$data['pratique'].\"\\n\";\n $p .= 'Formations : '.$data['formation'].\"\\n\";\n $p .= 'Facture : '.$data['facture'].\"\\n\";\n $p .= 'Adresse de facturation : '.$data['adresse_facturation'].\"\\n\";\n $p .= 'Régime alimentaire : '.$alimentation.\"\\n\";\n $p .= 'Places dans votre voiture : '.$places_voitures.\"\\n\";\n $p .= 'Brevet d’animateur : '.$brevet_animateur.\"\\n\";\n $p .= 'Remarques : '.$remarques_inscription.\"\\n\";\n \n $p .= \"\\n*******\\n\\n\";\n \n $p .= 'id_auteur : '.$id_auteur.\"\\n\";\n $p .= 'Statut : '.$statutsuivi.\"\\n\";\n $p .= 'Action : '.$titre.\"\\n\";\n $p .= 'Dates : '.$date_debut.\"\\n\";\n $p .= 'id_article : '.$id_article.\"\\n\";\n $p .= \"\\n\".'-----'.\"\\n\";\n\n\n $envoyer_mail = charger_fonction('envoyer_mail','inc');\n \n $p = $envoyer_mail(\n $GLOBALS['meta']['email_webmaster'].', [email protected]',\n $GLOBALS['meta']['nom_site'].' : nouvelle inscription '.$data['idact'].'-'.$id_auteur, \n $p,\n $GLOBALS['meta']['email_webmaster']);\n \n }\n\n\n\t\t\t\tinclude_spip('inc/headers');\n\t\t\t\tredirige_par_entete(parametre_url('?exec=articles', 'id_article', $id_article, '&'));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t//-------- desinscrire -----------\n\tif (_request('noinscr') && $id_article && $id_auteur)\n\t\tif ($GLOBALS['connect_statut']!='0minirezo' || ! autoriser('modifier', 'article', $id_article))\n\t\t\t$contexte['message_erreur'] = 'Autorisation refusée';\n\t\telse {\n\t\t\tif ($statutauteur == '6forum')\n\t\t\t\tsql_delete('spip_auteurs_articles', \"id_auteur=$id_auteur AND id_article=$id_article\");\n\t\t\telse\n\t\t\t\tsql_updateq('spip_auteurs_articles', array('inscrit'=>''), \"id_auteur=$id_auteur AND id_article=$id_article\");\n\t\t\t$inscrit = '';\n\t\t\t$contexte['message_ok'] = 'Ok, la désinscription est faite';\n\t\t\tinclude_spip('inc/headers');\n\t\t\tredirige_par_entete(parametre_url('?exec=articles', 'id_article', $id_article, '&'));\n\t\t\texit();\n\t\t}\n\n\t//--------- page + formulaire ---------\n\t\t$commencer_page = charger_fonction('commencer_page', 'inc');\n\t\techo $commencer_page('Suivi des inscriptions', '', '');\n\n\t\techo '<br />',gros_titre('Suivi des inscriptions');\n\n\t\techo debut_gauche('', true);\n\t\techo debut_boite_info(true);\n\t\techo 'Suivi des inscriptions<br /><br />Explications',\"\\n\";\n\t\techo fin_boite_info(true);\n\n\t\techo debut_droite('', true);\n\n\t\tinclude_spip('fonctions_gestion_cemea');\n\t\tinclude_spip('prive/gestion_update_db');\n\n\t\techo debut_cadre_relief('', true, '', '');\n\n\t\t$contexte['id_article'] = $id_article;\n\t\t$contexte['id_auteur'] = $id_auteur;\n\t\t$contexte['idact'] = $idact;\n\t\t$contexte['titre'] = $titre;\n\t\t$contexte['idper'] = $idper;\n\t\t$contexte['nom'] = $nom;\n\t\t$contexte['prenom'] = $prenom;\n\t\t$contexte['inscrit'] = $inscrit;\n\t\t$contexte['statutsuivi'] = $statutsuivi;\n\t\t$contexte['date_suivi'] = $date_suivi;\n\t\t$contexte['heure_suivi'] = $heure_suivi;\n\n\t\t$contexte['sante_comportement'] = $sante_comportement;\n\t\t$contexte['alimentation'] = $alimentation;\n\t\t$contexte['remarques_inscription'] = $remarques_inscription;\n\t\t$contexte['ecole'] = $ecole;\n\t\t$contexte['places_voitures'] = $places_voitures;\n\t\t$contexte['brevet_animateur'] = $brevet_animateur;\n\t\t$contexte['extrait_de_compte'] = $extrait_de_compte;\n\t\t$contexte['historique_payement'] = str_replace('.', ',', $historique_payement);\n\t\t$contexte['statut_payement'] = $statut_payement;\n\t\t$contexte['tableau_exception'] = $tableau_exception;\n\t\t$contexte['recus_fiche_medical'] = $recus_fiche_medical;\n\t\t$contexte['prix_special'] = $prix_special;\n $contexte['facture'] = $facture;\n $contexte['adresse_facturation'] = $adresse_facturation;\n\n\t\t$contexte['editable'] = ' ';\n\n\t\t$milieu = recuperer_fond(\"prive/form_suivi\", $contexte);\n\t\techo pipeline('editer_contenu_objet',array('args'=>array('type'=>'auteurs_article','contexte'=>$contexte),'data'=>$milieu));\n\n\t\techo fin_cadre_relief(true);\n\t\techo fin_gauche();\n\t\techo fin_page();\n}", "function Tareas_admin_new()\n{\n\tif (!SecurityUtil::checkPermission('Tareas::', '::', ACCESS_ADMIN)) {\n\t\treturn LogUtil::registerPermissionError();\n\t}\n \t//Lenguaje\n\t$dom = ZLanguage::getModuleDomain('Tareas');\n\t\n\t// Obtener todas las variables del modulo\n\t$modvars = pnModGetVar('Tareas');\n\t\n\t$prioridades = explode(\"/\", $modvars['prioridad']);\n\t$estados \t = explode(\"/\", $modvars['estado']);\n\t\n\t// Construimos y devolvemos la Vista\n\t$render = & pnRender::getInstance('Tareas');\n\t//Pasamos variables a plantilla\n\t$render->assign('prioridades', $prioridades);\n\t$render->assign('estados', $estados);\n\n\treturn $render->fetch('Tareas_admin_new.htm');\n \n}", "static function crear( toba_modelo_instancia $instancia, $nombre, $usuarios_a_vincular , $dir_inst_proyecto=null)\n\t{\n\t\t//- 1 - Controles\n\t\t$dir_template = toba_dir() . self::template_proyecto;\n\t\tif ( $nombre == 'toba' ) {\n\t\t\tthrow new toba_error(\"INSTALACIÓN: No es posible crear un proyecto con el nombre 'toba'\");\n\t\t}\n\t\tif ( self::existe( $nombre ) ) {\n\t\t\ttoba_logger::instancia()->error(\"INSTALACIÓN: Ya existe una carpeta con el nombre '$nombre' en la carpeta 'proyectos'\");\n\t\t\tthrow new toba_error(\"INSTALACIÓN: Ya existe una carpeta con el nombre especificado en la carpeta 'proyectos'\");\n\t\t}\n\t\ttry {\n\n\t\t\t//- 2 - Modificaciones en el sistema de archivos\n\t\t\t$dir_proyecto = (is_null($dir_inst_proyecto)) ? $instancia->get_path_proyecto($nombre): $dir_inst_proyecto;\n\t\t\t$url_proyecto = $instancia->get_url_proyecto($nombre);\n\n\t\t\t// Creo la CARPETA del PROYECTO\n\t\t\t$excepciones = array();\n\t\t\t$excepciones[] = $dir_template.'/www/aplicacion.produccion.php';\n\t\t\ttoba_manejador_archivos::copiar_directorio( $dir_template, $dir_proyecto, $excepciones);\n\n\t\t\t// Modifico los archivos\n\t\t\t$editor = new toba_editor_archivos();\n\t\t\t$editor->agregar_sustitucion( '|__proyecto__|', $nombre );\n\t\t\t$editor->agregar_sustitucion( '|__instancia__|', $instancia->get_id() );\n\t\t\t$editor->agregar_sustitucion( '|__toba_dir__|', toba_manejador_archivos::path_a_unix( toba_dir() ) );\n\t\t\t$editor->agregar_sustitucion( '|__version__|', '1.0.0');\n\t\t\t$editor->procesar_archivo( $dir_proyecto . '/www/aplicacion.php' );\n\n\t\t\t$modelo = $dir_proyecto . '/php/extension_toba/modelo.php';\n\t\t\t$comando = $dir_proyecto . '/php/extension_toba/comando.php';\n\t\t\t$editor->procesar_archivo($comando);\n\t\t\t$editor->procesar_archivo($modelo);\n\t\t\t$editor->procesar_archivo($dir_proyecto.'/www/rest.php');\n\t\t\t$editor->procesar_archivo($dir_proyecto.'/www/servicios.php');\n\n\t\t\trename($modelo, str_replace('modelo.php', $nombre.'_modelo.php', $modelo));\n\t\t\trename($comando, str_replace('comando.php', $nombre.'_comando.php', $comando));\n\t\t\t$ini = $dir_proyecto.'/proyecto.ini';\n\t\t\t$editor->procesar_archivo($ini);\n\n\t\t\t// Asocio el proyecto a la instancia\n\t\t\t$instancia->vincular_proyecto( $nombre, $dir_inst_proyecto, $url_proyecto);\n\n\t\t\t//- 3 - Modificaciones en la BASE de datos\n\t\t\t$db = $instancia->get_db();\n\t\t\ttry {\n\t\t\t\t$db->abrir_transaccion();\n\t\t\t\t$db->retrasar_constraints();\n\t\t\t\t$db->ejecutar( self::get_sql_metadatos_basicos( $nombre ) );\n\t\t\t\t$sql_version = self::get_sql_actualizar_version( toba_modelo_instalacion::get_version_actual(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$nombre);\n\t\t\t\t$db->ejecutar($sql_version);\n\t\t\t\tforeach( $usuarios_a_vincular as $usuario ) {\n\t\t\t\t\tself::do_vincular_usuario($db, $nombre, $usuario, array('admin'));\n\t\t\t\t}\n\t\t\t\t$db->cerrar_transaccion();\n\t\t\t} catch ( toba_error $e ) {\n\t\t\t\t$db->abortar_transaccion();\n\t\t\t\t$txt = 'PROYECTO : Ha ocurrido un error durante la carga de METADATOS del PROYECTO. DETALLE: ';\n\t\t\t\ttoba_logger::instancia()->error($txt . $e->getMessage());\n\t\t\t\tthrow new toba_error( $txt );\n\t\t\t}\n\t\t} catch ( toba_error $e ) {\n\t\t\t// Borro la carpeta creada\n\t\t\tif ( is_dir( $dir_proyecto ) ) {\n\t\t\t\t$instancia->desvincular_proyecto( $nombre );\n\t\t\t\ttoba_manejador_archivos::eliminar_directorio( $dir_proyecto );\n\t\t\t}\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function cargar(){\n\t\t$resp = false;\n\t\t$base=new BaseDatos();\n\t\t$sql=\"SELECT * FROM estadotipos WHERE idestadotipos= \".$this->getId();\n\t\tif ($base->Iniciar()) {\n\t\t\t$res = $base->Ejecutar($sql);\n\t\t\tif($res>-1){\n\t\t\t\tif($res>0){\n\t\t\t\t\t$row = $base->Registro();\n\t\t\t\t\t$this->setear($row['idestadotipos'],$row['etdescripcion'],$row['etactivo']);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setmensajeoperacion(\"EstadoTipos->listar: \".$base->getError());\n\t\t}\n\t\treturn $resp;\n\t}", "function generar_layout() {\r\n //Es imprescindible especificar la extension del archivo que estamos abriendo, caso contrario dicho\r\n //archivo no se puede abrir.\r\n// $ruta=\"C:/Users/Bruno/Desktop/mosaico_de_japon.png\";\r\n// print_r($ruta);\r\n \r\n //abrimos el achivo en modo lectura para transferir su contenido al archivo temporal\r\n// $fp= fopen($ruta, 'r');\r\n \r\n //obtenemos una ruta a un directorio temporal\r\n// $img=toba::proyecto()->get_www_temp('mosaico_de_japon.png');\r\n \r\n //abrimos el archivo temporal en modo escritura para guardar el contenido de $fp\r\n// $temp_fp= fopen($img['path'], 'w');\r\n //copiamos el contenido de $fp en $temp_fp\r\n// stream_copy_to_stream($fp, $temp_fp);\r\n //cerramos $temp_fp y $fp\r\n// fclose($temp_fp);\r\n// fclose($fp);\r\n// print_r($img);\r\n \r\n //imprimimos la imagen en la pantalla\r\n// echo \"<img src='{$img['url']}'>\";\r\n// ------------------------------------------------------------------------------------------------ \r\n \r\n //desactivamos la pantalla pant_edicion\r\n $this->controlador()->pantalla()->tab('pant_edicion')->desactivar();\r\n \r\n //recuperamos el id_aula almacenado en el arreglo $_SESSION\r\n $id_aula=toba::memoria()->get_dato_operacion(1);\r\n //print_r(\"Este es el id_aula en memoria : \".$id_aula);\r\n \r\n //cargarmos el datos tabla aula con un unico registro\r\n $this->controlador()->dep('datos')->tabla('aula')->cargar(array('id_aula' => $id_aula));\r\n \r\n //obtenemos el registro almacenado en el datos tabla, lo que nos interesa es poder utilizar el\r\n //atributo x_dbr_clave\r\n $aula=$this->controlador()->dep('datos')->tabla('aula')->get();\r\n \r\n //obtenemos el blob almacenado el la bd, usando el atributo x_dbr_clave\r\n $fp_imagen=$this->controlador()->dep('datos')->tabla('aula')->get_blob('imagen', $aula['x_dbr_clave']);\r\n \r\n if(isset($fp_imagen)){\r\n \r\n //creamos un nombre temporal para el archivo de imagen que vamos a mostrar por pantalla\r\n $temp_nombre= md5(uniqid(time()));\r\n \r\n //obtenemos path y url del archivo temporal\r\n $temp_archivo=toba::proyecto()->get_www_temp($temp_nombre);\r\n //print_r($temp_archivo);\r\n \r\n //abrimos el archivo temporal en modo escritura para guardar el blob que sacamos de la bd\r\n $fp= fopen($temp_archivo['path'], 'w');\r\n //copiamos el contenido del blob almacenado en la bd a nuestro archivo temporal\r\n stream_copy_to_stream($fp_imagen, $fp);\r\n //cerramos el archivo temporal\r\n fclose($fp);\r\n \r\n echo \"<div style='background-color:#C5C4CB;border:2px solid;margin-bottom:10px;'><p style='font-size:15px'>{$aula['ubicacion']}</p></div>\";\r\n //pegamos la imagen en la pantalla usando la url del archivo temporal\r\n echo \"<div ><img src='{$temp_archivo['url']}' width='750px' height='400px' id=1></div>\";\r\n \r\n //reseteamos el datos tabla para que el cursor no quede posicionado en el mismo registro. \r\n //Si esto ocurre, en la pantalla, vamos a visualizar siempre la misma imagen\r\n $this->controlador()->dep('datos')->tabla('aula')->resetear();\r\n }\r\n \r\n }", "function all2($cod_programa) {\n \n $sql = \"SELECT * FROM inasistencia_grupo_motivos\";\n \n return DB::query($sql);\n }", "function cl_alunoaltcampos() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"alunoaltcampos\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function partnamber()\n\t\t{\n\t\t\t\n\n\t\t\t$loader = new \\Twig\\Loader\\FilesystemLoader('app/view');\n\t\t\t$twig = new \\Twig\\Environment($loader);\n\t\t\t$template = $twig->load('cadastro_partnamber.html');\n\t\t\n\t\t\t$parametros = array();\n\t\t\t\t\t\n\t\t\t\t\t// $parametros ['produtos'] = $estoque;\n\n\t\t\t$conteudo = $template->render($parametros);\n\n\t\t\t\t\t// var_dump($parametros);\n\t\t\techo $conteudo;\n\n\t\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 }", "function autorizar_esp_pm_acumulado_servicio_tecnico($id_mov){\r\n\r\nglobal $db;\t\r\n \r\n $db->starttrans();\r\n \r\n //traigo el deposito origen\r\n $sql = \"select deposito_origen from movimiento_material where id_movimiento_material = $id_mov\"; \r\n $res = sql($sql) or fin_pagina();\r\n $id_deposito_oriden = $res->fields[\"deposito_origen\"];\r\n \t \r\n //traigo el detalle de los movimientos a liberar \t \r\n $sql=\"select * from detalle_movimiento where id_movimiento_material=$id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\r\n $comentario = \" Autorizacion de PM acumulado de servicio tecnico nro: $id_mov\";\r\n $id_tipo_movimiento = 7;\r\n\r\n //por cada detalle voy liberando las reservas del pm autorizado \r\n for($i=0;$i<$res->recordcount();$i++) {\r\n \t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n $cantidad = $res->fields[\"cantidad\"];\r\n $id_detalle_movimiento = $res->fields[\"id_detalle_movimiento\"];\r\n descontar_reserva($id_prod_esp,$cantidad,$id_deposito_oriden,$comentario,$id_tipo_movimiento,\"\",$id_detalle_movimiento,\"\");\r\n $res->movenext(); \r\n }//del for\r\n \t \r\n \t \r\n //Inserto la Mercaderia entrante en el stock BS AS \r\n \r\n $sql = \"select * from mercaderia_entrante where id_movimiento_material = $id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\t\t\t \r\n\t\t\t \r\n $comentario = \"Producto de lista de mercaderia entrante del PM nro: $id_mov, a travez de una Autorizacion Especial\";\r\n\t\t\t \r\n for($i=0;$i<$res->recordcount();$i++){\r\n\t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n\t $cantidad = $res->fields[\"cantidad\"];\r\n\t $descripcion = $res->fields[\"descripcion\"]; \r\n\t //el deposito origen es Buenos Aires que es igual a 2 segun la tabla general.depositos \r\n\t $deposito_origen='2';\r\n\t //el id_tipo_movimiento le hardcodeo uno de la tabla stock.tipo_movimiento\r\n\t $id_tipo_movimiento='13';\r\n\t //el ingreso del producto es a \"disponible\" por lo tanto la funcion no toma en cuenta los parametros que siguen\r\n\t $a_stock='disponible';\r\n\t agregar_stock($id_prod_esp,$cantidad,$deposito_origen,$comentario,$id_tipo_movimiento,$a_stock,$id_tipo_reserva,\"\",$id_detalle_movimiento,$id_licitacion,$nro_caso);\r\n\t $res->movenext();\r\n }//del for\r\n $db->completetrans();\r\n\r\n }", "function buscar_originales_por_tema($id_tema,$tipo_pictograma) {\n\t\n\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\tAND palabra_subtema.tema_id='.$id_tema.''; \n\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t$subtema_tabla_from=', palabra_subtema';\t\n\t\t\n\t\t$query = \"SELECT DISTINCT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.* $subtema_tabla\n\t\tFROM palabra_imagen, imagenes, palabras $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n\t\t$sql_subtema\n\t\tAND imagenes.id_tipo_imagen=$tipo_pictograma\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t\t\n\t}", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "function imagenes_por_palabra_y_tipo_imagen($id_palabra,$registrado,$estado,$id_tipo_imagen) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($estado !='' && $estado < 4 && $estado > 0) {\n\t\t\t$sql_estado='AND imagenes.estado='.$estado.'';\n\t\t} elseif ($estado='all') {\n\t\t\t$sql_estado='';\n\t\t} else {\n\t\t\t$sql_estado='AND imagenes.estado=1';\n\t\t}\n\t\t\n\t\tif ($id_tipo_imagen==99) { $sql_tipo_imagen=''; } \n\t\telse { $sql_tipo_imagen='AND imagenes.id_tipo_imagen='.$id_tipo_imagen.''; }\n\t\t\n\t\t$query = \"SELECT palabra_imagen.*,\n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename\n\t\tFROM palabra_imagen, imagenes\n\t\tWHERE palabra_imagen.id_palabra='$id_palabra'\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\t$sql_tipo_imagen\n\t\t$mostrar_registradas\n\t\t$sql_estado\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function run()\n {\n // CATEGORIA POSTRES\n\n $catalogo = new Catalogue();\n $catalogo->titulo = \"Enrollado de Chirimoya\";\n $catalogo->categoria = \"postres\";\n $catalogo->descripcion = \"Bizcochuelo de vainilla, relleno con tres capas, manjar, chantilly y pulpa de chirimoya, cubierto con fudge. Pídelo en su versión de 6 a 8 porciones.\";\n $catalogo->imagen = \"enrolladochirimoya.jpg\";\n $catalogo->save();\n\n $catalogo1 = new Catalogue();\n $catalogo1->titulo = \"Cheescake de zarzamoras\";\n $catalogo1->categoria = \"postres\";\n $catalogo1->descripcion = \"Una base de galleta rellena de una crema de queso y trozos de zarzamoras con el dulce clásico del cheescake, cubierto con mermelada y frutos.\";\n $catalogo1->imagen = \"cheescake.jpg\";\n $catalogo1->save();\n\n $catalogo2 = new Catalogue();\n $catalogo2->titulo = \"Crema Volteada\";\n $catalogo2->categoria = \"postres\";\n $catalogo2->descripcion = \"La más cremosa versión horneada con caramelo y un delicioso aroma a vainilla. Pídela desde 22cms\";\n $catalogo2->imagen = \"cremavolteada.jpg\";\n $catalogo2->save();\n\n $catalogo3 = new Catalogue();\n $catalogo3->titulo = \"Explosión de fresas\";\n $catalogo3->categoria = \"postres\";\n $catalogo3->descripcion = \"Bizcochuelo de vainilla embebido en un almíbar de fresas con licor, rellena con una capa de mermelada de fresas hecha en casa, una segunda capa de chantilly con fresas en trozos; cubierta en chantilly y decorada con fresas maceradas en jalea.\";\n $catalogo3->imagen = \"explosionfresa.jpg\";\n $catalogo3->save();\n\n $catalogo4 = new Catalogue();\n $catalogo4->titulo = \"Tarta de durazno\";\n $catalogo4->categoria = \"postres\";\n $catalogo4->descripcion = \"Una galleta horneada rellena con una crema pastelera de vainilla, cubierta con duraznos en jalea.\";\n $catalogo4->imagen = \"tartadurazno.jpg\";\n $catalogo4->save();\n\n $catalogo5 = new Catalogue();\n $catalogo5->titulo = \"Tartaleta de Fresas\";\n $catalogo5->categoria = \"postres\";\n $catalogo5->descripcion = \"Una galleta horneada rellena con una crema pastelera de vainilla, cubierta con fresas en jalea y decorada con copos de chantilly.\";\n $catalogo5->imagen = \"tartaletafresa.jpg\";\n $catalogo5->save();\n\n $catalogo6 = new Catalogue();\n $catalogo6->titulo = \"Torta húmeda de chocolate\";\n $catalogo6->categoria = \"postres\";\n $catalogo6->descripcion = \"Queque húmedo de chocolate embebido en un almíbar de chocolate, rellena con dos capas de fudge, cubierta con fudge. Pídela desde su versión mini (10 porciones).\";\n $catalogo6->imagen = \"tortahumeda.jpg\";\n $catalogo6->save();\n\n $catalogo7 = new Catalogue();\n $catalogo7->titulo = \"Tres Leches\";\n $catalogo7->categoria = \"postres\";\n $catalogo7->descripcion = \"Un suave bizcochuelo de vainilla o chocolate, embebido en nuestra deliciosa preparación de tres leches, rellena y cubierta de chantilly y envuelta en una deliciosa corona de chocolate bitter. Pídela desde su versión mini (10 porciones)\";\n $catalogo7->imagen = \"tresleches.jpg\";\n $catalogo7->save();\n\n\n //BODAS\n\n\n $catalogo8 = new Catalogue();\n $catalogo8->titulo = \"Naked\";\n $catalogo8->categoria = \"bodas\";\n $catalogo8->descripcion = \"Una torta en tendencia, pese a su sencillez luce super elegante, decorada con flores naturales o de tela.\";\n $catalogo8->imagen = \"naked.jpg\";\n $catalogo8->save();\n\n $catalogo9 = new Catalogue();\n $catalogo9->titulo = \"Azul\";\n $catalogo9->categoria = \"bodas\";\n $catalogo9->descripcion = \"Si deseas tematizar una torta y salir del blanco convencional he aquí la idea principal, una hermosa torta de bodas con azul metalizado.\";\n $catalogo9->imagen = \"azul.jpg\";\n $catalogo9->save();\n\n \n $catalogo10 = new Catalogue();\n $catalogo10->titulo = \"B&A\";\n $catalogo10->categoria = \"bodas\";\n $catalogo10->descripcion = \"Una torta ejecutada para la celebración de Bodas de Oro, aplicaciones de fondant.\";\n $catalogo10->imagen = \"bya.jpg\";\n $catalogo10->save();\n\n $catalogo11 = new Catalogue();\n $catalogo11->titulo = \"Love Gaby\";\n $catalogo11->categoria = \"bodas\";\n $catalogo11->descripcion = \"Una delicada versión que incluye acolchado, perlas y rosas, predominando el color perla\";\n $catalogo11->imagen = \"lovegaby.jpg\";\n $catalogo11->save();\n\n \n $catalogo12 = new Catalogue();\n $catalogo12->titulo = \"Love Volados\";\n $catalogo12->categoria = \"bodas\";\n $catalogo12->descripcion = \"Hermosa versión de bodas con flores y unos volados que envuelven todo el pastel para un efecto diferente. Aplicaciones en fondant\";\n $catalogo12->imagen = \"lovevolado.jpg\";\n $catalogo12->save();\n\n $catalogo13 = new Catalogue();\n $catalogo13->titulo = \"Siluetas\";\n $catalogo13->categoria = \"bodas\";\n $catalogo13->descripcion = \"Una idea para personalizar tu boda, usando siluetas de los novios en fotos reales, hará de ese recuerdo algo muy especial.\";\n $catalogo13->imagen = \"silueta.jpg\";\n $catalogo13->save();\n\n \n $catalogo14 = new Catalogue();\n $catalogo14->titulo = \"Mesa de Postres\";\n $catalogo14->categoria = \"bodas\";\n $catalogo14->descripcion = \"Una idea para complementar tu recepción una mesa completa de mini postres para el deleite de tus invitados.\";\n $catalogo14->imagen = \"mesapostre.jpg\";\n $catalogo14->save();\n\n //INFANTILES\n\n $catalogo15 = new Catalogue();\n $catalogo15->titulo = \"Mario Bross\";\n $catalogo15->categoria = \"infantiles\";\n $catalogo15->descripcion = \"El fontanero engreído de niños y adultos. Torta de 20 porciones\";\n $catalogo15->imagen = \"mariobross.jpg\";\n $catalogo15->save();\n\n \n $catalogo16 = new Catalogue();\n $catalogo16->titulo = \"Mickey\";\n $catalogo16->categoria = \"infantiles\";\n $catalogo16->descripcion = \"Aunque pasen los años este ratón seguirá robando el corazón de nuestros pequeños. Torta de 30 porciones (2 pisos) la cabecita de Mickey en chocolate forrado.\";\n $catalogo16->imagen = \"mickey.jpg\";\n $catalogo16->save();\n\n $catalogo17 = new Catalogue();\n $catalogo17->titulo = \"Spiderman\";\n $catalogo17->categoria = \"infantiles\";\n $catalogo17->descripcion = \"El super héroe favorito de muchos. Torta de 30 porciones\";\n $catalogo17->imagen = \"spiderman.jpg\";\n $catalogo17->save();\n\n \n $catalogo18 = new Catalogue();\n $catalogo18->titulo = \"Unicornio\";\n $catalogo18->categoria = \"infantiles\";\n $catalogo18->descripcion = \"Llevando a un mundo de sueños, color y fantasía. Torta de 20 porciones\";\n $catalogo18->imagen = \"unicornio.jpg\";\n $catalogo18->save();\n\n $catalogo19 = new Catalogue();\n $catalogo19->titulo = \"Hot Wheels\";\n $catalogo19->categoria = \"infantiles\";\n $catalogo19->descripcion = \"Para los amantes de la velocidad y por supuesto para los coleccionistas. Torta de 3 pisos (80 porciones)\";\n $catalogo19->imagen = \"hotwheels.jpg\";\n $catalogo19->save();\n\n \n $catalogo20 = new Catalogue();\n $catalogo20->titulo = \"Jasmine\";\n $catalogo20->categoria = \"infantiles\";\n $catalogo20->descripcion = \"Una princesa con el temperamento de su mascota. Torta de 2 pisos (50 porciones)\";\n $catalogo20->imagen = \"jasmine.jpg\";\n $catalogo20->save();\n\n $catalogo21 = new Catalogue();\n $catalogo21->titulo = \"Angry Birds\";\n $catalogo21->categoria = \"infantiles\";\n $catalogo21->descripcion = \"El clásico juego que conquistó a grandes y pequeños. Torta de 20 porciones\";\n $catalogo21->imagen = \"angrybirds.jpg\";\n $catalogo21->save();\n\n \n $catalogo22 = new Catalogue();\n $catalogo22->titulo = \"Blanca Nieves\";\n $catalogo22->categoria = \"infantiles\";\n $catalogo22->descripcion = \"No podría faltar nuestra primera princesa Disney. Temática blanca nieves, torta de 4 pisos (110 porciones) y dulces tematizados.\";\n $catalogo22->imagen = \"blancanieve.jpg\";\n $catalogo22->save();\n\n\n // Bocaditos\n\n\n $catalogo23 = new Catalogue();\n $catalogo23->titulo = \"Alfajores de Maicena\";\n $catalogo23->categoria = \"bocaditos\";\n $catalogo23->descripcion = \"Dos galletitas de maicena con una fina y delicada consistencia que se deshace en la boca rellenas con manjar de leche.\";\n $catalogo23->imagen = \"alfajore.jpg\";\n $catalogo23->save();\n\n \n $catalogo24 = new Catalogue();\n $catalogo24->titulo = \"Empanaditas de carne\";\n $catalogo24->categoria = \"bocaditos\";\n $catalogo24->descripcion = \"Una Deliciosa masa saladita rellena de un guiso con carne, pasas, ají amarillo, llevadas al horno. No podrás parar de comerlas.\";\n $catalogo24->imagen = \"empanada.jpg\";\n $catalogo24->save();\n\n $catalogo25 = new Catalogue();\n $catalogo25->titulo = \"Enrolladitos de hot dog\";\n $catalogo25->categoria = \"bocaditos\";\n $catalogo25->descripcion = \"Masa de hojaldre rellena de hot dog de ternera, llevada al horno, simplemente Yumi¡¡¡.\";\n $catalogo25->imagen = \"enrollado.jpg\";\n $catalogo25->save();\n\n \n $catalogo26 = new Catalogue();\n $catalogo26->titulo = \"Fresas Crocantes\";\n $catalogo26->categoria = \"bocaditos\";\n $catalogo26->descripcion = \"Dulces fresas cubiertas en chocolate bitter, la combinación de ambos ingredientes al paladar no tiene descripción.\";\n $catalogo26->imagen = \"fresacrocante.jpg\";\n $catalogo26->save();\n\n $catalogo27 = new Catalogue();\n $catalogo27->titulo = \"Mini pye de manzana\";\n $catalogo27->categoria = \"bocaditos\";\n $catalogo27->descripcion = \"Un clásico postre en un bocado, la deliciosa galletita se mezcla con el sabor de aquella manzana horneada con canela, azúcar y clavo.\";\n $catalogo27->imagen = \"minipye.jpg\";\n $catalogo27->save();\n\n \n $catalogo28 = new Catalogue();\n $catalogo28->titulo = \"Trufas de chocolate\";\n $catalogo28->categoria = \"bocaditos\";\n $catalogo28->descripcion = \"Pequeñas bolitas elaboradas con galletas, castañas y un toquecito de licor, cubiertas con una capita de chocolate bitter.\";\n $catalogo28->imagen = \"trufas.jpg\";\n $catalogo28->save();\n\n $catalogo29 = new Catalogue();\n $catalogo29->titulo = \"Rolatines de jamón y queso\";\n $catalogo29->categoria = \"bocaditos\";\n $catalogo29->descripcion = \"Pequeños piononos de pan pulman relleno de jamón y queso en rolatines.\";\n $catalogo29->imagen = \"rolatines.jpg\";\n $catalogo29->save();\n\n \n $catalogo30 = new Catalogue();\n $catalogo30->titulo = \"Petit pan con pollo\";\n $catalogo30->categoria = \"bocaditos\";\n $catalogo30->descripcion = \"Clásico sandwish y el favorito de muchos, un suave pancito de yema relleno de pollo deshilachado con apio y mayonesa de la casa.\";\n $catalogo30->imagen = \"petit.jpg\";\n $catalogo30->save();\n\n\n \n\n }", "function getAccueil($sub_path = 'portfolio') {\r\n include 'models/bdd.php';\r\n include 'models/twig.php';\r\n $retour_projets = $bdd->query(\"SELECT id, nom, img_desktop, contributeurs, description FROM projets\");\r\n $retour_data = $bdd->query('SELECT nom FROM projets');\r\n echo $twig->render(\r\n \"accueil.html.twig\", \r\n [\r\n \"data\" => $retour_data,\r\n \"projets\" => $retour_projets,\r\n 'sub_path' => $sub_path\r\n ]\r\n );\r\n}", "function preCreateCatalog($ar){\n // lot\n $rs = selectQueryGetAll('select count(distinct categ) as nb from '.$this->wtscatalog);\n $newval = 'Groupe '.($rs[0]['nb']+1);\n $fdl = new XShortTextDef();\n $fdl->field = 'categ';\n $fdl->table = $this->wtscatalog;\n $fdl->fieldcount = '32';\n $fdl->compulsory = 1;\n $fvl = $fdl->edit($newval);\n XShell::toScreen2('br', 'ocateg', $fvl);\n // configuration\n $fdl = new XLinkDef();\n $fdl->field = 'prdconf';\n $fdl->table = $this->wtscatalog;\n $fdl->target = $this->wtsprdconf;\n $fdl->fieldcount = '1';\n $fdl->compulsory = 0;\n $fvl = $fdl->edit();\n XShell::toScreen2('br', 'oprdconf', $fvl);\n // liste des secteurs wts\n $fdl = new XLinkDef();\n $fdl->field = 'wtspool';\n $fdl->table = $this->wtscatalog;\n $fdl->target = $this->wtspool;\n $fdl->fieldcount = '1';\n $fdl->compulsory = 0;\n $fdl->checkbox = 0;\n $fvl = $fdl->edit();\n XShell::toScreen2('br', 'owtspool', $fvl);\n // liste des personnes wts\n $this->dswtsperson->browse(array('selectedfields'=>'all', 'tplentry'=>'br_wtsperson', 'pagesize'=>999));\n // liste des forfaits wts\n $this->dswtsticket->browse(array('selectedfields'=>'all', 'tplentry'=>'br_wtsticket', 'pagesize'=>999));\n // liste des pools ta\n $bpools = $this->dstapool->browse(array('selectedfields'=>'all', 'tplentry'=>'br_pool', 'pagesize'=>999));\n // liste des tickets ta par pool ta\n $tickets = array();\n foreach($bpools['lines_oid'] as $poid){\n $tickets[] = $this->dstaticket->browse(array('selectedfields'=>'all', 'tplentry'=>TZR_RETURN_DATA, 'pagesize'=>999,\n 'select'=>$this->dstaticket->select_query(array('cond'=>array('tapool'=>array('=', $poid))))\n )\n );\n }\n XShell::toScreen2('br', 'ticket', $tickets);\n // liste des types de personnes ta\n $this->dstaperson->browse(array('selectedfields'=>'all', 'tplentry'=>'br_person', 'pagesize'=>999));\n // date de recherche\n $fd = new XDateDef();\n $fd->field = 'validfrom';\n $r = $fd->edit(date('Y-m-d'));\n XShell::toScreen2('br', 'ovalidfrom', $r);\n }", "protected function entidades(){\n\t\tfor($i=1; $i < 6;$i++) $niveis[$i] = \"nivel de busca {$i}\";\n\t\t$this->visualizacao->nivel = VComponente::montar(VComponente::caixaCombinacao, 'nivel', isset($_POST['nivel']) ? $_POST['nivel'] : 1 ,null,$niveis);\n\t\t$this->visualizacao->filtro = isset($_POST['filtro']) ? $_POST['filtro'] : null;\n\t\t$this->visualizacao->listagens = false;\n\t\tif(!$this->visualizacao->filtro) return;\n\t\t$d = dir(\".\");\n\t\t$negocios = new colecao();\n\t\t$controles = new colecao();\n\t\twhile (false !== ($arquivo = $d->read())) {\n\t\t\tif( is_dir($arquivo) && ($arquivo{0} !== '.') ){\n\t\t\t\tif(is_file($arquivo.'/classes/N'.ucfirst($arquivo).'.php')){\n\t\t\t\t\t$negocio = 'N'.ucfirst($arquivo);\n\t\t\t\t\t$obNegocio = new $negocio();\n\t\t\t\t\tif( $obNegocio instanceof negocioPadrao ) {\n\t\t\t\t\t\t$ordem[$arquivo] = array(\n\t\t\t\t\t\t\t'nome'=>$obNegocio->pegarInter()->pegarNome(),\n\t\t\t\t\t\t\t'caminho'=>$arquivo.'/classes/N'.ucfirst($arquivo).'.php'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$negocios->$arquivo = $obNegocio;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$d->close();\n\t\tasort($ordem);\n\t\t$this->visualizacao->ordem = $ordem;\n\t\t$listagens = array();\n\t\tforeach($ordem as $idx => $arquivo){\n\t\t\t$obNegocio = $negocios->pegar($idx);\n\t\t\t$nome['controle'] = definicaoEntidade::controle($obNegocio, 'verPesquisa');\n\t\t\tif($this->exibirListagem($arquivo)){\n\t\t\t\t$colecao = $obNegocio->pesquisaGeral($this->pegarFiltro(),$this->pegarPagina(),isset($_POST['nivel']) ? $_POST['nivel'] : 1);\n\t\t\t\tcall_user_func_array(\"{$nome['controle']}::montarListagem\", array($this->visualizacao,$colecao,$this->pegarPagina(),$nome['controle']));\n\t\t\t\t$this->visualizacao->listagem->passarControle($nome['controle']);\n\t\t\t\tif($colecao->contarItens()){\n\t\t\t\t\t$listagens[$idx]['listagem'] = $this->visualizacao->listagem;\n\t\t\t\t\t$listagens[$idx]['ocorrencias'] = $colecao->contarItens();\n\t\t\t\t\t$listagens[$idx]['nome'] = $arquivo['nome'];\n\t\t\t\t\t$listagens[$idx]['controlePesquisa'] = $nome['controle'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($this->visualizacao->listagem);\n\t\t$this->visualizacao->listagens = $listagens;\n\t}", "function grab(){\n\n\t\t$domains = explode(\",\",$this->conf->startUp[\"APPS.DOMAIN\"]);\n\t\tif(in_array(\"\".$_SERVER[\"HTTP_HOST\"],$domains)){\n\t\t\t$domain = $_SERVER[\"HTTP_HOST\"];\n\t\t}else{\n\t\t\t$domain = \"localhost\";\n\t\t}\t\n\n\t\t$bruto_url = $_SERVER[\"REQUEST_SCHEME\"].\"://\".\n\t\t\t$domain.$_SERVER[\"REQUEST_URI\"];\n\n\t\t$net_url = isset($bruto_url) ? $bruto_url : false;\n\n\t\tif($net_url)\n\t\t{\n\t\t\t//format HMVC [modules][controller ++model++views]\n\t\t\t//format MVC controler ++model++views\n\t\t\t$modeHMVC = self::$confStatic->startUp[\"APPS.MODULAR\"];\n\t\t\t$net_url \t= parse_url($net_url);\n\t\t\t$array_path = explode('/',ltrim($net_url['path'],'/'));\n\n\t\t\t$pageComponent=[];\n\t\t\tif($modeHMVC == \"true\"){ \n\t\t\t\t//jika dijalankan pada mode lokal atau online\n\t\t\t\tif($domain == \"localhost\" || $domain == \"127.0.0.1\"){\n\t\t\t\t\t$pageComponent['modul']\t\t= ucfirst($array_path[1]);\n\t\t\t\t\t$pageComponent['class'] \t= isset($array_path[2]) ? $array_path[2] : $this->conf->startUp[\"APPS.BASEPAGE\"];\n\t\t\t\t\t$pageComponent['func'] \t\t= isset($array_path[3]) ? $array_path[3] : $this->conf->startUp[\"APPS.FUNC\"];\n\t\t\t\t\t$pageComponent['params'] \t= isset($array_path[3]) ? array_slice($array_path,4) : null;\t\t\t\n\n\t\t\t\t}\n\t\t\t\t//jika tidak mode local\n\t\t\t\telse{\n\t\t\t\t\t$pageComponent['modul'] \t\t= ucfirst($array_path[0]);\n\t\t\t\t\t$pageComponent['class'] \t\t= isset($array_path[1]) ? $array_path[1] : $this->conf->startUp[\"APPS.BASEPAGE\"];\n\t\t\t\t\t$pageComponent['func'] \t\t\t= isset($array_path[2]) ? $array_path[2] : $this->conf->startUp[\"APPS.FUNC\"];\n\t\t\t\t\t$pageComponent['params']\t\t= isset($array_path[2]) ? array_slice($array_path,3) : null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//jika mode local\n\t\t\t\tif($domain == \"localhost\" || $domain == \"127.0.0.1\"){\n\t\t\t\t\t$pageComponent['modul'] \t\t= \"\";\n\t\t\t\t\t$pageComponent['class'] \t\t= $array_path[1];\n\t\t\t\t\t$pageComponent['func'] \t\t\t= isset($array_path[2]) ? $array_path[2] : $this->conf->startUp[\"APPS.FUNC\"];\n\t\t\t\t\t$pageComponent['params']\t\t= isset($array_path[2]) ? array_slice($array_path,3) : null;\n\t\t\t\t}\n\t\t\t\t//jika tidak mode lokal\n\t\t\t\telse{\n\t\t\t\t\t$pageComponent['modul'] \t\t= \"\";\n\t\t\t\t\t$pageComponent['class'] \t\t= $array_path[0];\n\t\t\t\t\t$pageComponent['func'] \t\t\t= isset($array_path[1]) ? $array_path[1] : $this->conf->startUp[\"APPS.FUNC\"];\n\t\t\t\t\t$pageComponent['params'] \t\t= isset($array_path[1]) ? array_slice($array_path,2) : null;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t$pageComponent = (object) $pageComponent;\n\n\n\t\t\tif(isset($net_url['query'])){\n\n\t\t\t\tparse_str($net_url['query'],$array_query_string);\n\t\t\t\treq::setQueryGET($array_query_string);\t\n\t\t\t\t//var_dump($array_query_string);\n\t\t\t}else{\n\t\t\t\t$array_query_string = [];\n\t\t\t\t//var_dump($array_query_string);\n\t\t\t}\n\n\t\t\tif($pageComponent->class==\"\"){$pageComponent->class = self::$confStatic->startUp[\"APPS.BASEPAGE\"];}\n\t\t\treq::setParamsFunc((array)$pageComponent->params);\n\t\t\tself::setupPage(self::$rutes,$pageComponent);\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"whoopppsss something went wrong\";\n\t\t\t//error whoopsss plugin\n\t\t}\n\t}", "function listarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_sel';\r\n\t\t$this->transaccion='tgv_SERVIC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_servicio','int4');\r\n\t\t$this->captura('estado','varchar');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('id_lugar_destino','int4');\r\n\t\t$this->captura('id_ep','int4');\r\n\t\t$this->captura('fecha_asig_fin','date');\r\n\t\t$this->captura('fecha_sol_ini','date');\r\n\t\t$this->captura('descripcion','varchar');\r\n\t\t$this->captura('id_lugar_origen','int4');\r\n\t\t$this->captura('cant_personas','int4');\r\n\t\t$this->captura('fecha_sol_fin','date');\r\n\t\t$this->captura('id_funcionario','int4');\r\n\t\t$this->captura('fecha_asig_ini','date');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('fecha_reg','timestamp');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('fecha_mod','timestamp');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('desc_funcionario','text');\r\n\t\t$this->captura('desc_lugar_ini','varchar');\r\n\t\t$this->captura('desc_lugar_des','varchar');\r\n\t\t$this->captura('id_funcionario_autoriz','int4');\r\n\t\t$this->captura('observaciones','varchar');\r\n\t\t$this->captura('desc_funcionario_autoriz','text');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//echo '--->'.$this->getConsulta(); exit;\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function opcion__cargar($datos = null)\n\t{\n\t\t$param = $this->get_parametros();\n\t\tif (! isset($datos)) {\n\t\t\t$path = null;\n\t\t\t$id_proyecto = $this->get_id_proyecto_actual(false);\n\t\t\tif (!isset($id_proyecto)) {\n\t\t\t\tlist($id_proyecto, $path) = $this->seleccionar_proyectos(false, false);\n\t\t\t\tif ($id_proyecto == $path) {\n\t\t\t\t\t$path=null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($param['-d'])) {\n\t\t\t\t$path = realpath($param['-d']);\n\t\t\t}\n\t\t} else {\n\t\t\t$id_proyecto = $datos[0];\n\t\t\t$path = $datos[1];\n\t\t}\n\t\t$i = $this->get_instancia();\n\t\tif ( ! $i->existen_metadatos_proyecto( $id_proyecto ) ) {\n\n\t\t\t//-- 1 -- Cargar proyecto\n\t\t\t$this->consola->enter();\n\t\t\t$this->consola->subtitulo(\"Carga del Proyecto \".$id_proyecto);\n\t\t\t$i->vincular_proyecto( $id_proyecto, $path );\n\t\t\t$p = $this->get_proyecto($id_proyecto);\n\t\t\t$p->cargar_autonomo();\n\n\t\t\t//TODO: esto esta duplicado porque en el paso de vincular_proyecto aun no estan los metadatos cargados\n\t\t\t$i->generar_ini_rest($id_proyecto);\n\n\t\t\t$this->consola->mensaje(\"Vinculando usuarios\", false);\n\t\t\t$usuarios = $this->seleccionar_usuarios( $p->get_instancia() );\n\t\t\t$grupo_acceso = $this->seleccionar_grupo_acceso($p);\n\t\t\tforeach ( $usuarios as $usuario ) {\n\t\t\t\t$p->vincular_usuario($usuario, array($grupo_acceso));\n\t\t\t\ttoba_logger::instancia()->debug(\"Vinculando USUARIO: $usuario, GRUPO ACCESO: $grupo_acceso\");\n\t\t\t\t$this->consola->progreso_avanzar();\n\t\t\t}\n\t\t\t$this->consola->progreso_fin();\n\n\t\t\t//-- 2 -- Exportar proyecto\n\t\t\t$this->consola->enter();\n\t\t\t// Exporto la instancia con la nueva configuracion (por fuera del request)\n\t\t\t$i->exportar_local();\n\t\t} else {\n\t\t\t$p = $this->get_proyecto($id_proyecto);\n\t\t\t$this->consola->mensaje(\"El proyecto '\" . $p->get_id() . \"' ya EXISTE en la instancia '\".$i->get_id().\"'\");\n\t\t}\n\n\t\tif (! $p->esta_publicado()) {\n\t\t\t//--- Generación del alias\n\t\t\t$this->consola->separador();\n\t\t\tif (isset($param['-a']) && $param['-a'] == 1) {\n\t\t\t\t$agregar = true;\n\t\t\t} else {\n\t\t\t\t$agregar = $this->consola->dialogo_simple(\"¿Desea agregar el alias de apache al archivo toba.conf?\", true);\n\t\t\t}\n\t\t\tif ($agregar) {\n\t\t\t\t$url = (isset($param['--alias-nombre'])) ?$param['--alias-nombre'] : null;\n\t\t\t\t$full_url = (isset($param['--full-url'])) ?$param['--full-url'] : null;\n\t\t\t\t$p->publicar($url, $full_url);\n\t\t\t\t$this->consola->mensaje('OK. Debe reiniciar el servidor web para que los cambios tengan efecto');\n\t\t\t}\n\t\t}\n\t}", "public function getPlanesEstudiosDependiente() {\n\t\t$oPlanEstudio = Doctrine_Core::getTable('PlanesEstudios')->find($this->getIdplanestudiod());\n \t\t\t\n\t\treturn $oPlanEstudio;\n\t}", "static function get_sql_metadatos_basicos( $id_proyecto )\n\t{\n\t\t// Creo el proyecto\n\t\t$sql[] = \"INSERT INTO apex_proyecto (proyecto, estilo,descripcion,descripcion_corta,listar_multiproyecto, item_inicio_sesion, menu, requiere_validacion, log_archivo, log_archivo_nivel, sesion_tiempo_no_interac_min, registrar_solicitud)\n\t\t\t\t\t\t\t\t\tVALUES ('$id_proyecto','plastik','\".strtoupper($id_proyecto).\"','\".ucwords($id_proyecto).\"',1, '2','css', 1, 1, 7, 30, 1);\";\n\t\t//Le agrego los items basicos\n\t\t$sql[] = \"INSERT INTO apex_item (proyecto, item, padre_proyecto, padre, carpeta, nivel_acceso, solicitud_tipo, pagina_tipo_proyecto, pagina_tipo, nombre, descripcion, actividad_buffer_proyecto, actividad_buffer, actividad_patron_proyecto, actividad_patron) VALUES ('$id_proyecto','1','$id_proyecto','1','1','0',NULL,'toba','NO','Raiz PROYECTO','','toba','0','toba','especifico');\";\n\t\t$sql[] = \"INSERT INTO apex_item (proyecto, item, padre_proyecto, padre, carpeta, nivel_acceso, solicitud_tipo, pagina_tipo_proyecto, pagina_tipo, nombre, descripcion, actividad_buffer_proyecto, actividad_buffer, actividad_patron_proyecto, actividad_patron,actividad_accion,menu,orden) VALUES ('$id_proyecto','2','$id_proyecto','1','0','0','web','toba','normal','Inicio','','toba','0','toba','especifico','item_inicial.php',1,'0');\";\n\t\t// Creo un grupo de acceso\n\t\t$sql[] = \"INSERT INTO apex_usuario_grupo_acc (proyecto, usuario_grupo_acc, nombre, nivel_acceso, descripcion) VALUES ('$id_proyecto','admin','Administrador','0','Accede a toda la funcionalidad');\";\n\t\t$sql[] = \"INSERT INTO apex_usuario_grupo_acc_item ( proyecto, usuario_grupo_acc, item ) VALUES ('$id_proyecto', 'admin', '2');\";\n\t\t// Crea una fuente de datos\n\t\t$sql[] = \"INSERT INTO apex_fuente_datos (proyecto, fuente_datos, fuente_datos_motor, descripcion, descripcion_corta, link_instancia, instancia_id) VALUES ('$id_proyecto','$id_proyecto', 'postgres7', 'Fuente $id_proyecto', '$id_proyecto', 1, '$id_proyecto');\";\n\t\t// Pone la fuente de datos como predeterminada\n\t\t$sql[] = \"UPDATE apex_proyecto SET fuente_datos='$id_proyecto' WHERE proyecto='$id_proyecto';\";\n\t\treturn $sql;\n\t}", "function registrar_pago_virtual($acceso)\n{\n\t$acceso1=conexion();\n\t$ini_u = 'AA';\n\t$acceso->objeto->ejecutarSql(\"select id_pago from pagos where (id_pago ILIKE '$ini_u%') ORDER BY id_pago desc LIMIT 1 offset 0 \"); \n\t$id_pago = $ini_u.verCodLargo($acceso,\"id_pago\");\n\t$acceso->objeto->ejecutarSql(\"select nro_factura,inc from pagos,caja_cobrador,caja where caja_cobrador.id_caja=caja.id_caja and pagos.id_caja_cob=caja_cobrador.id_caja_cob and tipo_doc='PAGO' ORDER BY nro_factura desc LIMIT 1 offset 0 \");\n\t$nro_factura = verNumero_factura_v4($acceso,\"nro_factura\",8);\n\t$id_caja_cob=verifica_caja_virtual($acceso);\n\t$acceso->objeto->ejecutarSql(\"select id_tp from detalle_tipopago_temp where (id_tp ILIKE '$ini_u%') ORDER BY id_tp desc LIMIT 1 offset 0 \"); \n\t$id_tp= $ini_u.verCoo($acceso,\"id_tp\");\n\n\t$fecha_proc= date(\"Y-m-d\");\n\n require_once \"Clases/pagos.php\";\n $dat = array();\n $detalle_tipopago = array();\n $pago_factura = array();\n\n $sql_id_pd=\"\";\n\tif($id_pd!=''){\n\t\t$sql_id_pd=\" and id_pd='$id_pd'\";\n\t}\n\n $acceso1->objeto->ejecutarSql(\" select * from pagodeposito where status_pd='CONFIRMADO' $sql_id_pd ;\");\n while($row=row($acceso1)){\n\t$id_pd=trim($row[\"id_pd\"]);\n\t//echo \"<br>id_pd:$id_pd\";\n\t$monto_pago=trim($row[\"monto_dep\"]);\n\t$monto_tp=trim($row[\"monto_dep\"]);\n\t$id_banco=trim($row[\"banco\"]);\n\t$numero_ref=trim($row[\"numero_ref\"]);\n\t$id_contrato=trim($row[\"id_contrato\"]);\n\n\t$detalle_tipopago[0]['id_pago']=$id_pago;\n\t$detalle_tipopago[0]['id_tipo_pago']=\"TPA00003\";\n\t$detalle_tipopago[0]['monto_tp']=$monto_tp;\n\t$detalle_tipopago[0]['id_banco']=$id_banco;\n\t$detalle_tipopago[0]['refer_tp']=$numero_ref;\n\t$detalle_tipopago[0]['lote_tp']=$id_pd;\n\n\t$dat['id_pago']=$id_pago;\n\t$dat['id_caja_cob']=$id_caja_cob;\n\t$dat['monto_pago']=$monto_pago;\n\t$dat['obser_pago']=\"pago en lotes\";\n\t$dat['status_pago']=\"PAGADO\";\n\t$dat['nro_factura']=$nro_factura;\n\t$dat['id_contrato']=$id_contrato;\n\t$dat['nro_control']='';\n\t$dat['desc_pago']=0;\n\t$dat['por_iva']=12;\n\t$dat['n_credito']='';\n\t$dat['impresion']='SI';\n\t$dat['detalle_tipopago']=$detalle_tipopago;\n\t\n\t$id_select = ajusta_cargo_pago_factura($acceso,$id_contrato,$monto_pago);\n\t$cargo=explode(\"=@\",$id_select);\n\t$indice=0;\n\n\tfor($j=1;$j<count($cargo);$j++)\n\t{\n\t\t$id_cont_serv=$cargo[$j];\n\t\t$pago_factura[$indice]['id_pago']=$id_pago;\n\t\t$pago_factura[$indice]['id_cont_serv']=$id_cont_serv;\n\t\t$indice++;\n\t}\n\t$dat['pago_factura']=$pago_factura;\n\n\t//echo \"<br>id_pago:$id_pago\";\n\n\t$obj_pago=new pagos($dat);\n\t$obj_pago->incluir($acceso);\n\n\t$id_pago=$ini_u.verCodLargoInc($acceso,$id_pago);\n\t$id_tp=$ini_u.verCoo_inc($acceso,$id_tp);\n\t$nro_factura = verNumero_factura_v4Inc($acceso,$nro_factura,8);\n//ECHO \"<br>Update pagodeposito Set fecha_proc='$fecha_proc', status_pd='PROCESADO' Where id_pd='$id_pd'\";\n\t$acceso->objeto->ejecutarSql(\"Update pagodeposito Set fecha_proc='$fecha_proc', status_pd='PROCESADO' Where id_pd='$id_pd'\");\n }//if pagodeposito\n}", "function cl_conplanosis() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanosis\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function dependencias2() { // se construye la sentencia de busqueda de la tupla\n //Variable que almacena las dependencias\n $dependencias2 = null;//inicializamos la variable a null\n //Variable que almacena la sentencia sql\n\t\t$sql = \"SELECT NombreTrabajo, QA.LoginEvaluador, LoginEvaluado, AliasEvaluado FROM ASIGNAC_QA QA, ENTREGA E, TRABAJO T WHERE QA.LoginEvaluado = '$this->login' AND QA.LoginEvaluado = E.login AND QA.IdTrabajo = T.IdTrabajo\";//se construye la sentencia sql\n $resultado = $this->mysqli->query( $sql );//se ejecuta la query\n //miramos si el número de tuplas es mayor o igual que uno\n if ( $resultado->num_rows >= 1 ) {\n $dependencias2 = $resultado;//le pasamos a la variable dependencias2 todas las tablas de las que depende\n }\n \n return $dependencias2;\n\t}", "public function dibujarPantalla( ) {\n $this->activarPantalla();\n $this->enviarComando();\n $this->enviarMenu();\n }", "function listar_palabras_catalogadas_por_tema_limit($id_tema,$inicial,$cantidad) {\n\t\t\n\t\t$query = \"SELECT palabras.*, palabra_subtema_tmp.*, temas_tmp.*, subtemas_tmp.*\n\t\tFROM palabras, palabra_subtema_tmp, temas_tmp, subtemas_tmp\n\t\tWHERE palabra_subtema_tmp.tema_id='$id_tema'\n\t\tAND palabra_subtema_tmp.id_palabra=palabras.id_palabra \n\t\tAND palabra_subtema_tmp.id_subtema=subtemas_tmp.id_subtema\n\t\tAND palabra_subtema_tmp.tema_id=temas_tmp.id_tema\n\t\tGROUP BY palabra_subtema_tmp.id_palabra\n\t\tORDER BY palabras.id_palabra asc\n\t\tLIMIT $inicial,$cantidad\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function cargar_cuenta_de_ingreso() {\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '7%' ORDER BY cuenta_plan_contable\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function cl_conplanoconplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoconplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function preparatoriasBYInstitucionTiposEstudios_get(){\n $id=$this->get('id');\n if (count($this->get())>2) {\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"Demasiados datos enviados\",\n \"validations\" =>array(\n \"id\"=>\"Envia Id (get) para obtener un especifico articulo o vacio para obtener todos los articulos\"\n ),\n \"data\"=>null\n );\n }else{\n if ($id) {\n $data = $this->DAO->selectEntity('Vw_tipoEstudio',array('idInstitucion'=>$id),false);\n }\n else{\n $data = $this->DAO->selectEntity('Vw_tipoEstudio',null,false);\n }\n if ($data) {\n $response = array(\n \"status\" => \"success\",\n \"status_code\" => 201,\n \"message\" => \"Articulo Cargado correctamente\",\n \"validations\" =>null,\n \"data\"=>$data\n );\n }else{\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"No se recibio datos\",\n \"validations\" =>null,\n \"data\"=>null\n );\n }\n }\n $this->response($response,200);\n }", "function RellenarTitulo()\r\n {\r\n $this->Imprimir('ANÁLSIS DE FALLAS DE DISTRIBUCIÓN');\r\n\r\n $this->Imprimir($this->convocatoria->getLugar(), 93, 10);\r\n\r\n $this->Imprimir(strftime(\"%A %d de %B de %Y\", strtotime($this->convocatoria->getFecha())) .\r\n ' - Hora: ' . $this->convocatoria->getHoraIni() . ' a ' .\r\n $this->convocatoria->getHoraFin(), 95, 10, 16);\r\n }", "public function installWpInfo($id){\n\n $porciones = explode(\":\", $id);\n $dominio = $porciones[0]; // porción1\n $dominio= base64_decode($dominio);\n $name = $porciones[1]; // porción2\n $language = $porciones[2]; // porción3\n $language = str_replace('_','-',$language);\n $exist =DB::table('w59_dominio')->where('url', '=', $dominio)->get();\n \n if(count($exist)==0){\n DB::table('w59_dominio')->insert(\n ['id'=> NULL, 'nombre' => $name , 'idioma' => $language, 'url' => $dominio, 'IDgroup' => '2']\n ); \n } \n\n\n $idDom = DB::table('w59_dominio')->where('url',$dominio)->first();\n\n /// lo agrego a la cola de Trabajo\n DB::table('work_queue')->insert(\n ['id' => NULL,'name_work' => 'get_pages' , 'id_base' => $idDom->id, 'response' => '']\n );\n\n /// get all pages\n\n// $get_infoDomain_list =DB::table('w59_page')\n// ->select('w59_page.idpost', 'w59_dominio.url as domainurl')\n// ->join('w59_dominio', 'w59_page.IDdominio', '=', 'w59_dominio.id') \n// ->where('IDdominio', '=',338)->get();\n\n// $sendata='';\n// $result_Domain = '';\n// if($get_infoDomain_list == NULL){\n// // /// lleno los contenedores \n// foreach($get_infoDomain_list as $ids){\n// $sendata = $sendata.$ids->idpost.\",\";\n// }\n// $sendata = json_encode($sendata);\n// }else{\n// $sendata = '9999999';\n// }\n// // /// URL de destino\n// $url =\"https://\".$dominio.\"/wp-json/kb/v3/worked/?key=1\";\n\n// $curl = curl_init();\n\n// curl_setopt_array($curl, array(\n// CURLOPT_URL => $url,\n// CURLOPT_RETURNTRANSFER => true,\n// CURLOPT_ENCODING => \"\",\n// CURLOPT_MAXREDIRS => 10,\n// CURLOPT_TIMEOUT => 0,\n// CURLOPT_FOLLOWLOCATION => true,\n// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n// CURLOPT_CUSTOMREQUEST => \"POST\",\n// CURLOPT_POSTFIELDS =>json_encode($sendata),\n// CURLOPT_HTTPHEADER => array(\n// \"Content-Type: application/json\"\n// ),\n// ));\n \n// $successArray = curl_exec($curl);\n \n// curl_close($curl);\n// var_dump($successArray);\n// if(is_array($successArray)){\n// foreach($successArray as $data){\n// echo \"<p>added url : https://www.\".$result_Domain.$data->permalink.\"</p>\";\n// $title = $data->post_title;\n// $date = date('Y');\n// $Formate_title = str_replace('[sc_year]',$date, $title);\n// DB::table('w59_page')->insert(\n// ['id' => NULL, 'title' => $Formate_title, 'descripcion' => '', 'url' => $data->permalink, 'IDdominio' => $po, 'idpost' => $data->ID, 'IDgroudpage' => '0' ]\n// );\n// }\n// }\n \n }", "function cl_conplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }" ]
[ "0.6222192", "0.59357166", "0.5881839", "0.5851187", "0.5839516", "0.57855976", "0.57337683", "0.57190156", "0.5709565", "0.56901073", "0.5675262", "0.5636738", "0.5586401", "0.55425847", "0.55406094", "0.5537599", "0.55358523", "0.55174476", "0.5512077", "0.5508782", "0.5498706", "0.5480641", "0.54760027", "0.54600763", "0.54600763", "0.54600334", "0.54531294", "0.54470867", "0.5446793", "0.54370445", "0.543426", "0.54340863", "0.5433272", "0.5429769", "0.54286546", "0.54237145", "0.5415202", "0.54096395", "0.5399403", "0.5397406", "0.53922683", "0.53914076", "0.5388789", "0.53783333", "0.5354305", "0.5348671", "0.53481627", "0.53465205", "0.53437805", "0.534373", "0.532256", "0.53182435", "0.5318121", "0.5314976", "0.53126943", "0.53102237", "0.53033996", "0.53024805", "0.53007877", "0.5294202", "0.5291552", "0.529138", "0.52911925", "0.52882445", "0.52855194", "0.5283363", "0.52820206", "0.52799547", "0.5272763", "0.52666855", "0.5260993", "0.52543795", "0.5254094", "0.5248783", "0.5243897", "0.524262", "0.5236496", "0.5236344", "0.5235881", "0.5230292", "0.52297586", "0.5221516", "0.5219805", "0.5218772", "0.521669", "0.52111745", "0.52108765", "0.52091885", "0.5204553", "0.520163", "0.51999474", "0.51965106", "0.51958144", "0.51953274", "0.51946926", "0.51925313", "0.5190587", "0.51891464", "0.51888686", "0.5187071", "0.5186946" ]
0.0
-1
/ carga los contenidos de los sitios
function cargar_contenidos(){ $mod=(isset($_GET['modulo']))?$_GET['modulo']:'index'; //habilitar limpiado de contenidos $c = false; $func=(isset($_GET['funcion']))?$_GET['funcion']:$mod; if(isset($_GET['adm'])){ $localreq=__path.'componentes/'.$mod.'/index.admin.php'; $globalreq='componentes/'.$mod.'/index.admin.php'; }else{ $localreq=__path.'componentes/'.$mod.'/index.php'; $globalreq='componentes/'.$mod.'/index.php'; } if(file_exists($localreq)){ require($localreq); }else{ if(file_exists($globalreq)){ require($globalreq); }else{ errLog('ERROR<<< No se reconoce el modulo que debia ejecutarse'); } } $funcc=$func; if(isset($_GET['ajax'])){ ob_clean(); //habilitar cors header("Access-Control-Allow-Origin: *"); } //habilitar guiones medios en las url $funcc = str_replace('-', '_', $funcc); if (function_exists($funcc)) { $funcc(); }else{ errLog('ERROR<<< No se reconoce la acci&oacute;n que debia ejecutarse'); } if(isset($_GET['ajax'])){ require ('processor.php'); exit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listarSitios(){\n $sql = \"SELECT\n sitioid,\n imagenIcono,\n titulo,\n introduccion,\n imagenPortada,\n descripcion\n from sitio\";\n $rs = $this->consultaSQL($sql);\n\n return $rs;\n }", "protected function cargarArchivosIdiomas(){\n $this->lang->load('menu', $this->idioma);\n $this->lang->load('uri', $this->idioma);\n $this->lang->load('label', $this->idioma);\n $this->lang->load('static', $this->idioma);\n $this->lang->load('messages', $this->idioma);\n }", "public function enlacesPaginasControladores(){\r\n $enlacesControladores=$_GET[\"action\"];\r\n# esta veriable esta pidiendo que tome la clase enlaces y que se conecte a enlacespaginasModelos\r\n $respuesta=EnlacesPaginas::enlacesPaginasModelos($enlacesControladores);\r\n\r\n#aqui solo borramos el \"echo $enlacesControladores\" y los sutituimos por \"include $respuesta\" rescordemos que\r\n# el echo solo imprime textos y el include incluye formatos enteros o contenidos\r\n include $respuesta;\r\n\r\n }", "public function silo_contents()\n\t{\n\t}", "function getContent(){\n\t\t\n\t\t$nombreSeccion=Moe::$myRoute;\n\t\t//printVar($idSeccion);\n\t\t$seccion = model(\"LallamaradaSeccion\");\n\t\t$newContent = model('LallamaradaContenido');\n\t\t$newUrl = model('LallamaradaUrl');\n\t\t$newMutlXUrl = model('LallamaradaMultXUrl');\n\t\t$newSexXContent = model('LallamaradaSeccionXContenido');\n\t\t$seccions = $seccion->getData();\n\t\tforeach ($seccions as $seccionGet) {\n\t\t\t// Cuando el nombre de la ruta es distinta a \"/\" agrega un / al final\n\t\t\t$ruta=($seccionGet['nombre']==\"/\") ? $seccionGet['nombre'] : $seccionGet['nombre'].\"/\";\n\t\t\tif (isset($seccionGet['idPadre']) && $seccionGet['idPadre']!=0) {\n\t\t\t\t$idPadre=$seccionGet['idPadre'];\n\t\t\t\tdo{\n\t\t\t\t\t$padre = $seccion->getData(array(\n\t\t\t\t\t\t\"fields\" => array(\"id\",\"nombre\",\"idPadre\"),\n\t\t\t\t\t\t'conditions'=>array(\"id\"=>$idPadre),\n\t\t\t\t\t\t));\n\t\t\t\t\t//$ruta= $padre[0]['nombre'].\"/\".$ruta;\n\t\t\t\t\t$ruta = (substr($ruta, 0, 1)==\"/\" && strlen($ruta)>1) ? substr($ruta,2) : $ruta ;\t\t\n\t\t\t\t\t$idPadre=$padre[0]['idPadre'];\n\n\t\t\t\t}while($idPadre > 0);\n\t\t\t}\n\t\t\tif ($ruta==$nombreSeccion) {\n\t\t\t\t$mySeccionId=$seccionGet['id'];\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t\n\n\t\t/*Se pasan los parametros de busqueda*/\n\t\t$conf=array(\n\t\t\t\"conditions\" => 'idSeccion = '.$mySeccionId,\n\t\t\t\"fields\" => array('idContenido','idMultXUrl','posicion'),\n\t\t\t'order' => 'posicion ASC'\n\t\t\t);\n\t\t/*Se Obtiene los datos del contenido en la seccion*/\n\t\t$traeContenido=$newSexXContent->getData($conf);\n\t\t//printVar($mySeccionId);\n\t\t//printVar($traeContenido,\"este do\");\n\t\t\n\t\t/*Recorre contenidos por posicion*/\n\t\tforeach ($traeContenido as $contenidoOrd) {\n\t\t\t# code...\n\t\t\t//printVar($contenidoOrd['idMultXUrl']);\n\t\t\tif(isset($contenidoOrd['idContenido']) && $contenidoOrd['idContenido']!=''){\n\n\t\t\t\t//printVar($contenidoOrd);\n\t\t\t\t$cont=array(\n\t\t\t\t\t'conditions'=> 'id ='.$contenidoOrd['idContenido'].' AND visible=\"S\"',\n\t\t\t\t\t'fields' => array('titulo','contenido')\n\t\t\t\t\t);\n\t\t\t\t$buscaContenido=$newContent->getData($cont);\n\t\t\t\t//printVar($buscaContenido[0]);\n\t\t\t\tview()->assign(\"titulo\",$buscaContenido[0]['titulo']);\n\t\t\t\tview()->assign(\"contenido\",$buscaContenido[0]['contenido']);\n\t\t\t\t$internaD=\"interna.html\"; \n\t\t\t}else if(isset($contenidoOrd['idMultXUrl'])){\n\n\n\t\t\t\t\n\t\t\t\t# code...\n\t\t\t\t$getIdUrl=array(\n\t\t\t\t\t'conditions'=> 'idMultimedia ='.$contenidoOrd['idMultXUrl'],\n\t\t\t\t\t'fields' => array('idUrl')\n\t\t\t\t\t);\n\t\t\t\t$buscaUrl=$newMutlXUrl->getData($getIdUrl);\n\t\t\t\t//printVar(count($buscaUrl));\n\t\t\t\t$pasaString=array();\n\t\t\t\t$string = '';\n\t\t\t\tfor ($j=0; $j < count($buscaUrl) ; $j++) { \n\t\t\t\t\t//printVar($buscaUrl[$j]['idUrl']);\n\t\t\t\t\t$string.=\",\".$buscaUrl[$j]['idUrl'];\n\t\t\t\t}\t\n\n\t\t\t\t$string = substr($string, 1); // remove leading \",\"\n\t\t\t\t//printVar($string);\n\t\t\t\t\n\t\t\t\t//debug(1);\n\t\t\t\t$getUrlC=array(\n\t\t\t\t\t'conditions'=> 'id IN ('.$string.')',\n\t\t\t\t\t'fields' => array('id','orden','url','descipcion'),\n\t\t\t\t\t'order' => 'orden ASC'\n\t\t\t\t\t);\n\t\t\t\t$numC=$contenidoOrd['posicion'];\n\t\t\t\t$traeDatosUrl=$newUrl->getData($getUrlC);\n\t\t\t\t$buscaContenidoUrl[$numC]=(count($traeDatosUrl)>0) ? $traeDatosUrl : array() ;\t\t\n\t\t\t\t//view()->assign(\"contenido\",$buscaContenido[0]['contenido']);*/\n\t\t\t\t\n\t\t\t\t//$internaD=\"indexNew.html\";\n\n\t\t\t}\n\n\t\t}\n\n\n\t\t/*Trae datos de la tabla contenido*/\n\t\t\n\t\tview()->assign(\"multimedia\",$buscaContenidoUrl);\n\n\t\tview()->assign(\"idSeccion\",$mySeccionId);\n\t\t//printVar($internaD);\n\t\tview()->display(\"youth/indexNew.html\");\n\t}", "public function servicos() {\n $this->load_template('servicos');\n }", "public function list(){\n\n $urls = Urls::all();\n \n $capturas = array();\n foreach($urls as $key=>$val){\n $status = $this->status_url($val['url']);\n $conteudo = $this->content_url($val['url']);\n /* bem simples. salva os dados no banco */\n $capturas[] = array('conteudo' => $conteudo, 'status' => $status, 'url_id' => $val['id']);\n }\n\n $this->salvar($capturas);\n }", "function getVista()\n {\n try {\n $list = $this->mCategory->get_All();\n include_once('./vistes/categoria.php');\n }catch(Exception $e){\n $this->error->throwException('304', 'No s`ha pogut carregar les dades i la vista', $e);\n }\n }", "public function ObtenerDatos($idsitioweb){\n\t\t\ttry {\n\t\t\t\t$sql=\"select * from sitiosweb where idsitioweb='$idsitioweb'\";\n\t\t\t\tif ($this->CS($sql)) {\n\t\t\t\t\tif ($fila=$this->mDatos->fetch_assoc()) { \t\n\t\t\t\t\t\t//Login correcto, obtenemos el código y nombre:\n\t\t\t\t\t\t$this->nombre=$fila[\"nombre\"];\n\t\t\t\t\t\t$this->url=$fila[\"url\"];\n\t\t\t\t\t}\n\t\t\t\t\t$this->mDatos->close();\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow $e;\n\t\t\t}\t\t\t\t\t\n\t\t}", "public function ajaxDescargarEscribanos(){\n\n #DESCARGAR ESCRIBANOS DEL ENLACE\n $item = null;\n $valor = null;\n \n $escribanos = ControladorEnlace::ctrMostrarEscribanosEnlace($item,$valor);\n \n #ELIMINAR LOS ESCRIBANOS DE LOCALHOST\n ControladorEnlace::ctrEliminarEnlace('escribanos');\n\n foreach ($escribanos as $key => $value) {\n\n $tabla = \"escribanos\";\n $datos =array(\"id\"=>$value[\"id\"],\n \"nombre\"=>strtoupper($value[\"nombre\"]),\n \"documento\"=>$value[\"documento\"],\n \"id_tipo_iva\"=>$value[\"id_tipo_iva\"],\n \"tipo\"=>$value[\"tipo\"],\n \"facturacion\"=>$value[\"facturacion\"],\n \"tipo_factura\"=>$value[\"tipo_factura\"],\n \"cuit\"=>$value[\"cuit\"],\n \"direccion\"=>strtoupper($value[\"direccion\"]),\n \"localidad\"=>strtoupper($value[\"localidad\"]),\n \"telefono\"=>$value[\"telefono\"],\n \"email\"=>strtoupper($value[\"email\"]),\n \"id_categoria\"=>$value[\"id_categoria\"],\n \"id_escribano_relacionado\"=>$value[\"id_escribano_relacionado\"],\n \"id_osde\"=>$value[\"id_osde\"],\n \"ultimolibrocomprado\"=>strtoupper($value[\"ultimolibrocomprado\"]),\n \"ultimolibrodevuelto\"=>strtoupper($value[\"ultimolibrodevuelto\"]),\n \"inhabilitado\"=>$value[\"inhabilitado\"]);\n #registramos los productos\n $respuesta = ModeloEnlace::mdlIngresarEscribano($tabla, $datos);\n\t }\n echo count($escribanos);\n $datos = array(\"nombre\"=>\"escribanos\",\"fecha\"=>date(\"Y-m-d\"));\n $respuesta=ControladorModificaciones::ctrMostrarModificaciones($datos);\n \n \n if (empty($respuesta)){\n\n ControladorModificaciones::ctrIngresarModificaciones($datos); \n }\n \n }", "function get_servicios_web_ofrecidos()\n\t{\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\titem as servicio_web,\n\t\t\t\tnombre\n\t\t\tFROM apex_item\n\t\t\tWHERE\n\t\t\t\tproyecto = '{$this->get_id()}'\n\t\t\t\tAND solicitud_tipo = 'servicio_web'\n\t\t\tORDER BY item;\n\t\t\";\n\t\treturn $this->get_db(true)->consultar($sql);\n\t}", "public function mostrarservicios(){\n $mostrarservicios = $this->mostrar();\n require '../inicio/servicios.php';\n }", "function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}", "function Cargar_servicios($clave, $filadesde, $buscar_tipo){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\r\n\t\tif($buscar_tipo != null){\r\n\t\t\t$CADENA_BUSCAR = \" and s.CLAVE_CUADRO = '\".$clave.\"' AND s.TIPO = '\".$buscar_tipo.\"'\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" and s.CLAVE_CUADRO = '\".$clave.\"'\"; \r\n \t\t}\r\n\t\t\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT s.numero, s.id_proveedor, s.codigo_servicio, v.nombre, s.dia, s.orden, s.tipo\r\n\t\t\t\t\t\t\t\t\t\tFROM hit_producto_cuadros_servicios s, hit_servicios v\r\n\t\t\t\t\t\t\t\t\t\tWHERE s.id_proveedor = v.id_proveedor and s.codigo_servicio = v.codigo \".$CADENA_BUSCAR.\" ORDER BY dia, orden\");\r\n\r\n\t\tif ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'PRODUCTO_CUADROS_SERVICIOS' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$folletos_servicios = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['numero'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($folletos_servicios,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $folletos_servicios;\t\t\t\t\t\t\t\t\t\t\t\r\n\t}", "function cargar_imagenes($idc=null,$seccion){\r\r\n $html = \"\";\r\r\n if (!is_null($idc))\r\r\n $ims = zen_deserializar($this->padre->bd->seleccion_unica(\"imagenes from contenidos where idc=\".$idc)); \r\r\n else \r\r\n $ims = array();\r\r\n $n = count($ims);\r\r\n for ($i=0; $i<$n; $i++){\r\r\n\t $im = ZF_SITIO_WEB.'media/img/'.$seccion.'/'.$ims[$i];\r\r\n\t $html .= '<a href=\"'.$im.'\" target=\"_blank\"><img src=\"'.$im.\r\r\n\t \t'\" border=\"0\"></a>[<label for=\"borrar_'.$ims[$i].\r\r\n\t \t'\">borrar</label><input type=\"checkbox\" id=\"borrar_'.$ims[$i]\r\r\n\t \t.'\" name=\"borrar_'.$ims[$i].'\"/>]<br/>';\r\r\n }\r\r\n return $html;\r\r\n }", "public function use_obtener_otros_sucursales(){\n $cuenta = $this->ci->session->userdata('usuario'); \n $suc = $this->ci->session->userdata('sucursal');\n $sucursales = $this->ci->arixkernel->select_all_content_where('sucursal_id serial, numero, nombre','config.v_cuenta_sucursal', array('cuenta_id' => $cuenta, 'sucursal_id !=' => $suc, 'estado' => true));\n return $sucursales;\n }", "private function compilar_metadatos_generales_servicios_web()\n\t{\n\t\t//-- Datos basicos --\n\t\t$this->manejador_interface->mensaje('Servicios Web', false);\n\t\t$nombre_clase = 'toba_mc_gene__servicios_web';\n\t\t$archivo = $this->get_dir_generales_compilados() . '/' . $nombre_clase . '.php';\n\t\t$clase = new toba_clase_datos( $nombre_clase );\n\t\tforeach(toba_info_editores::get_servicios_web_acc() as $serv_web) {\n\t\t\t$datos = toba_proyecto_db::get_info_servicio_web($this->get_id(), $serv_web['servicio_web']);\n\t\t\t$clase->agregar_metodo_datos('servicio__'.$serv_web['servicio_web'], $datos );\n\t\t\t$this->manejador_interface->progreso_avanzar();\n\t\t}\n\t\t//Creo el archivo\n\t\t$clase->guardar( $archivo );\n\t\t$this->manejador_interface->progreso_fin();\n\t}", "public function sobrenos() {\n $this->load_template('sobrenos');\n }", "function carga_clases($clase) {\n\t\t$ficheros = array();\n\t\t\n\t\t$ruta = $_SERVER['DOCUMENT_ROOT'];\n\t\t\n\t\t$ficheros[] = $ruta.\"/../app/clases/slim/\".$clase.\".php\";\n\t\t$ficheros[] = $ruta.\"/../app/clases/funciones/\".$clase.\".php\";\n\t\t\n\t\tforeach ($ficheros as $key => $fichero) {\n\t\t\tif (file_exists($fichero))\n\t\t\t\tinclude_once ($fichero);\n\t\t}\n\t\t\n\t\t\n\t}", "function listarCitasDisponibles()\n\t\t{\n\t\t\t$dia = $this->uri->segment(3);\n\t\t\t$mes = $this->uri->segment(4);\n\t\t\t$year = $this->uri->segment(5);\n\t\t\t$diaDeLaSemana = date('N',mktime(0, 0, 0, $mes, $dia, $year));\n\t\t\t\n\t\t\t//Obetenemos los arrays de horarios del dia de la semana concreto\n\t\t\t$diasSemana = $this->PacienteModel->getCalendario();\n\t\t\tforeach ($diasSemana as $value) {\n\t\t\t\tif($diaDeLaSemana == $value->Dia)\n\t\t\t\t{\n\t\t\t\t\t$horaInicio = explode(':', $value->HoraInicio);\n\t\t\t\t\t$horaFin = explode(':', $value->HoraFin);\n\t\t\t\t\t$duracionCita[] = $value->DuracionCita;\n\t\t\t\t\t$unixInicio[] = mktime($horaInicio[0], $horaInicio[1], 0, $mes, $dia, $year);\n\t\t\t\t\t$unixFin[] = mktime($horaFin[0], $horaFin[1], 0, $mes, $dia, $year);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Comprobamos las citas planificadas para el dia concreto\n\t\t\t$data = $this->PacienteModel->getCitasDisponibles($dia, $mes, $year);\n\t\t\tforeach ($data as $value) {\n\t\t\t\t$aux = explode(\" \", $value->FechaIni);\n\t\t\t\t$aux = $aux[1];\n\t\t\t\t$aux = explode(\":\", $aux);\n\t\t\t\t$hora[] = $aux[0];\n\t\t\t\t$min[] = $aux[1];\n\t\t\t}\n\t\t\t\n\t\t\t//Si no hay ninguna cita se ponen los arrays fuera de rango\n\t\t\tif(!isset($hora) && !isset($min))\n\t\t\t{\n\t\t\t\t$hora[0] = -1;\n\t\t\t\t$min[0] = -1;\n\t\t\t}\n\n\t\t\t//Visualizamos las citas disponibles\n\t\t\techo '<ul class=\"list-group\">';\n\t\t\techo '<li class=\"list-group-item\">'.date('d-m-Y',mktime(0, 0, 0, $mes, $dia, $year)).'</li>';\n\t\t\tfor($j = 0; $j < sizeof($unixInicio); $j++)\n\t\t\t\tfor($i = $unixInicio[$j]; $i < $unixFin[$j]; $i += 60*$duracionCita[$j] )\n\t\t\t\t{\n\t\t\t\t\tif ( (in_array(date('H',$i), $hora) && in_array(date('i',$i), $min) )\n\t\t\t\t\t\t|| time()>$i )\n\t\t\t\t\t\techo '<li class=\"list-group-item\">'.date('H:i',$i).'</li>';\n\t\t\t\t\telse \n\t\t\t\t\t\techo '<li class=\"list-group-item active\">\n\t\t\t\t\t\t\t<a style=\"color: black;\" onclick=\"crearCita(\\''.$this->session->userdata('id').'\\',\n\t\t\t\t\t\t\t\\''.date('Y-m-d H:i:s',$i).'\\',\n\t\t\t\t\t\t\t\\''.date('Y-m-d H:i:s',$i + 60 * $duracionCita[$j]).'\\'\n\t\t\t\t\t\t\t)\">'.date('H:i',$i).'</a></li>';\n\t\t\t\t}\n\t\t\techo '</ul>';\n\t\t}", "function arquivos() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t//carregar lista de arquivos:\n\t\t$templateMgr->assign('files', $this->listar());\n\t\t$templateMgr->display('files/files.tpl');\n\t}", "public function getRealContenidos() {\r\n// FROM contenidos c1 \r\n// JOIN contenidos c2 ON c1.padre=c2.id \r\n// JOIN contenidos c3 ON c2.padre=c3.id \r\n// ORDER BY c1.nombre ASC';\r\n\t\t\t\t$sql = 'SELECT c1.* \r\n FROM contenidos c1 \r\n WHERE padre = 0 \r\n ORDER BY c1.nombre ASC';\r\n \r\n return $this->getList(new SqlQuery($sql));\r\n \r\n }", "protected function obtenerListadoDeArchivos(){\n $directorio = storage_path() . '/app/backup';\n // Array en el que obtendremos los resultados\n $res = array();\n\n // Agregamos la barra invertida al final en caso de que no exista\n if(substr($directorio, -1) != \"/\") $directorio .= \"/\";\n\n // Creamos un puntero al directorio y obtenemos el listado de archivos\n $dir = @dir($directorio) or die(\"getFileList: Error abriendo el directorio $directorio para leerlo\");\n while (($archivo = $dir->read()) !== false) {\n // Obviamos los archivos ocultos\n if($archivo[0] == \".\") continue;\n if(is_dir($directorio . $archivo)) {\n $res[] = array(\n \"nombre\" => $archivo,\n \"tamaño\" => 0,\n \"modificado\" => filemtime($directorio . $archivo)\n );\n } else if (is_readable($directorio . $archivo)) {\n $fileTime = Carbon::now()->timestamp(filemtime($directorio . $archivo));\n $res[] = array(\n \"nombre\" => $archivo,\n \"tamaño\" => $this->formatBytes(filesize($directorio . $archivo)),\n //\"modificado\" => date(\"F d Y H:i:s.\",filemtime($directorio . $archivo))\n //\"modificado\" => filemtime($directorio . $archivo)->diffForHuman()\n \"modificado\" => $fileTime->diffForHumans(),\n );\n }\n }\n $dir->close();\n return $res;\n }", "public function getImagenesIndexCategorias(){\n foreach($this->indexContent as $content){\n //echo \"--------------------- Imagenes --------------<br>\";\n $vectorImagenes = array();\n $dom = new DOMDocument();\n $dom->loadHTML(\"$content\");\n $xpath = new DOMXPath($dom);\n $tag = \"div\";\n $class = \"home-category-box\";\n $consulta = \"//\".$tag.\"[@class='\".$class.\"']\";\n $resultados = $xpath->query($consulta);\n if ($resultados->length > 0){\n $contador = 0;\n foreach($resultados as $imagenes){\n if ($contador == 0){\n $todasImagenes = $imagenes->getElementsByTagName(\"img\");\n if ($todasImagenes->length > 0){\n foreach($todasImagenes as $imagen){\n $urlImagen = $imagen->getAttribute(\"src\");\n //echo \"url imagen categorias padre: \".$urlImagen.\"<br>\";\n array_push($vectorImagenes,$urlImagen);\n }\n }\n }\n $contador++;\n }\n }\n //echo \"--------------------- Fin Imagenes --------------<br>\";\n }\n return $vectorImagenes;\n }", "function listarTodos2(){\n\tglobal $ruta_archivo;\n\t$array_result=array();\n\t$contenido_verificacion = file_get_contents($ruta_archivo);\n\t$lineas = explode(\"\\n\", $contenido_verificacion);\n return $lineas;\n\n\n//------USO---------\n /*\n\t$lineas_count = count($lineas);\n\n//---recorremos desde la segunda linea\n\tfor($i = 1; $i < $lineas_count; $i++) {\n\n\t\tif(empty($lineas[$i]) || $lineas[$i]==\"\"){\n\t\t\tcontinue;\n\t\t//echo $i.\"-\".$lineas[$i].\"-\";\n\t\t}\n\n\t\t$array_fila = explode('|', $lineas[$i]);\n\n\t\techo $array_fila[1].\"<br>\";\n\t\t\n\t}\n\t\n*/\n}", "function get_internacionalizacion_page_content($idioma,$id_page) {\n\t\t$query = \"SELECT * FROM internacionalizacion\n\t\tWHERE id_page='$id_page' OR id_page=1\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\n\t\t$result = mysql_query($query);\n\t\t$numrows = mysql_num_rows($result);\n\t\t\n\t\t\n\t\tif ($numrows == 0) {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\twhile ($data=mysql_fetch_array($result)) {\n\t\t\t\t\n\t\t\t\t$key=$data['key'];\n\t\t\t\t\n\t\t\t\tif ($data[''.$idioma.''] == '' || $data[''.$idioma.'']==NULL) { \n\t\t\t\t\t$lang[$key]=$data['es'];\n\t\t\t\t} else {\n\t\t\t\t\t$lang[$key]=$data[''.$idioma.''];\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\tmysql_close($connection);\n\t\t\treturn $lang;\n\t\t}\n\t}", "function cargar_cuenta_de_ingreso() {\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '7%' ORDER BY cuenta_plan_contable\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function getAllFilesRobot() {\n $sql = \"SELECT * FROM archivo_organizado\";\n $result = $this->_db->prepare($sql);\n $result->execute();\n\n if(!is_null($result->errorInfo()[2]))\n return array('error' => $result->errorInfo()[2]);\n else\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }", "public function all_content()\n \t{\n \t\t$result='';\n \t\tforeach($this->content as $target)\n \t\t\tforeach($target as $content)\n \t\t\t\t$result.=$content;\n\n \t\treturn $result;\n \t}", "public function get_content()\n {\n $query = \"SELECT id, title FROM statti\";\n $result = $this->db->query($query);\n\n echo \"<div id='main'>\";\n echo \"<h3><a href='?option=add_statti' style='color: #510000;'>Добавить новую статью</a></h3><hr />\";\n\n //если перенаправленны с другой страницы и сессия содержит информацию\n if($_SESSION['res']) {\n echo $_SESSION['res'];\n //удаляем переменную 'res' из сессии\n unset($_SESSION['res']);\n }\n\n if(!$result) {\n exit(\"Не удалось обрабботать запрос - \" . $this->db->error);\n }\n else {\n $row = array();\n for ($i = 0; $i < $result->num_rows; $i++) {\n $row = $result->fetch_assoc();\n printf(\"<p style='font-size: 14px;'>\n <a href='?option=update_statti&id_text=%s' style='color: #585858;'>%s</a> |\n <a href='?option=delete_statti&del=%s' style='color: red;'>Удалить</a>\n </p>\", $row['id'], $row['title'], $row['id']);\n }\n }\n\n echo \"</div>\n </div>\";\n }", "public function retrieve(){\n\t\tswitch ($this->host) {\n\t\t\tcase 'www.subito.it':\n\t\t\t\t$this->retrieveAllSubito();\n\t\t\t\tbreak;\n\t\t\tcase 'www.portaportese.it':\n\t\t\t\t// call the appropriate method when it is written\n\t\t\t\tbreak;\n\t\t}\n\t}", "function buscar_originales_por_tema($id_tema,$tipo_pictograma) {\n\t\n\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\tAND palabra_subtema.tema_id='.$id_tema.''; \n\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t$subtema_tabla_from=', palabra_subtema';\t\n\t\t\n\t\t$query = \"SELECT DISTINCT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.* $subtema_tabla\n\t\tFROM palabra_imagen, imagenes, palabras $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n\t\t$sql_subtema\n\t\tAND imagenes.id_tipo_imagen=$tipo_pictograma\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t\t\n\t}", "function loadContents() ;", "private function _consultarListaArchivos() {\n $_objMTablas = new \\cprogresa\\MTablas();\n $tabla2 = $_objMTablas->getTablaCheckBox(2);\n $tabla6 = $_objMTablas->getTablaCheckBox(6);\n //print_r($tabla2);\n //print_r($tabla6);\n $R = [];\n foreach ($tabla2 as $id => $valor) {\n $R[] = ['id' => $id, 'archivo' => $valor, 'descripcion' => $tabla6[$id]];\n }\n $this->_ok = 1;\n $this->_mensaje = \"Lista de archivos\";\n $this->_guardarLog($_SESSION['id_usu_cent'], ['accion' => 'consulta', 'metodo' => get_class() . ':_consultarListaArchivos', 'parametros' => '']);\n return $R;\n }", "function listar_directorios_ruta($ruta, $vlpadre){\n if (is_dir($ruta)) { \n if ($dh = opendir($ruta)) { \n\t\t$tmstmp = time();\n\t\t $rutabase = \"../docs/\".$_POST[\"idcliente\"].\"/\";\n\t\tmkdir($rutabase, 0777); \n\t\t \n while (($file = readdir($dh)) !== false) { \n //esta l�nea la utilizar�amos si queremos listar todo lo que hay en el directorio \n //mostrar�a tanto archivos como directorios \n //echo \"<br>Nombre de archivo: $file : Es un: \" . filetype($ruta . $file); \n if (is_dir($ruta . $file) && $file!=\".\" && $file!=\"..\"){ \n //solo si el archivo es un directorio, distinto que \".\" y \"..\" \n echo \"<br>Directorio: \".$ruta.\" --\".$file; \n\t\t\t\t$carpeta = creacarpetacliente($_POST[\"idcliente\"], substr($ruta,2).$file, $vlpadre );\n\t\t\t\t//print \"<br>EL Id de carpeta es: \".$carpeta;\n\t\t\t\t//exit;\n\t\t\t\tmkdir($rutabase.$carpeta, 0777);\n listar_directorios_ruta($ruta . $file . \"/\", $carpeta); \n } elseif($file!=\".\" && $file!=\"..\" && $file!=\"cmasivo.php\" && $file!=\"proceso.php\"){\n\t\t\t$arrfile =split(\"/\",substr($ruta,1).$file );\n\t\t\t\t$totarr = count($arrfile)-1;\n\n\t\t\t\t$tamano= filesize($rutabase.$vlpadre.\"/\".$arrfile[$totarr]);\n\t\t\t\tcopy($ruta.$file , $rutabase.$vlpadre.\"/\".$arrfile[$totarr] );\n\t\t\t\t echo \"<br>Copiar y subir a BD Archivo: $ruta$file\".\" -- \".$rutabase.$vlpadre.\"/\".$arrfile[$totarr];\n\t\t\t\t$pathtofile = $_POST[\"idcliente\"].\"/\".$vlpadre.\"/\".$arrfile[$totarr];\n\t\t\t\tinsertaarchivobd($_POST[\"idcliente\"], substr($ruta,1).$file, $pathtofile, $vlpadre, $tamano );\n\t\t\t\t\n\t\t\t}\n } \n closedir($dh); \n } \n }else \n echo \"<br>No es ruta valida\"; \n}", "public function getAsistencias(){\n\t\t$filasPagina = 10;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraAsistencias\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM asistencia \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM asistencia LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "function getAllDatas() {\n if (isset($_GET['application'])) {\n $application=htmlentities($_GET['application']);\n $path = \"../data/\".$application;\n }\n //liste les fichiers dans les dossiers de donnees\n $nb_fichier = 0;\n if($dossier = opendir($path)) {\n while(false !== ($fichier = readdir($dossier))){\n if($fichier != '.' && $fichier != '..' && $fichier != 'index.php' && $fichier != '.DS_Store' && $fichier != 'template.csv'){ \n $nb_fichier++;\n $nomFichier = substr($fichier, 0, -4);\n echo '<option value=\"'. $nomFichier .'\">'. $nomFichier .'</option>';\n } \n } \n closedir($dossier);\n } else {\n \t\techo'<option value=\"erreur\">erreur</option>';\n\t}\n}", "public function obtenerViajesplus();", "protected function entidades(){\n\t\tfor($i=1; $i < 6;$i++) $niveis[$i] = \"nivel de busca {$i}\";\n\t\t$this->visualizacao->nivel = VComponente::montar(VComponente::caixaCombinacao, 'nivel', isset($_POST['nivel']) ? $_POST['nivel'] : 1 ,null,$niveis);\n\t\t$this->visualizacao->filtro = isset($_POST['filtro']) ? $_POST['filtro'] : null;\n\t\t$this->visualizacao->listagens = false;\n\t\tif(!$this->visualizacao->filtro) return;\n\t\t$d = dir(\".\");\n\t\t$negocios = new colecao();\n\t\t$controles = new colecao();\n\t\twhile (false !== ($arquivo = $d->read())) {\n\t\t\tif( is_dir($arquivo) && ($arquivo{0} !== '.') ){\n\t\t\t\tif(is_file($arquivo.'/classes/N'.ucfirst($arquivo).'.php')){\n\t\t\t\t\t$negocio = 'N'.ucfirst($arquivo);\n\t\t\t\t\t$obNegocio = new $negocio();\n\t\t\t\t\tif( $obNegocio instanceof negocioPadrao ) {\n\t\t\t\t\t\t$ordem[$arquivo] = array(\n\t\t\t\t\t\t\t'nome'=>$obNegocio->pegarInter()->pegarNome(),\n\t\t\t\t\t\t\t'caminho'=>$arquivo.'/classes/N'.ucfirst($arquivo).'.php'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$negocios->$arquivo = $obNegocio;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$d->close();\n\t\tasort($ordem);\n\t\t$this->visualizacao->ordem = $ordem;\n\t\t$listagens = array();\n\t\tforeach($ordem as $idx => $arquivo){\n\t\t\t$obNegocio = $negocios->pegar($idx);\n\t\t\t$nome['controle'] = definicaoEntidade::controle($obNegocio, 'verPesquisa');\n\t\t\tif($this->exibirListagem($arquivo)){\n\t\t\t\t$colecao = $obNegocio->pesquisaGeral($this->pegarFiltro(),$this->pegarPagina(),isset($_POST['nivel']) ? $_POST['nivel'] : 1);\n\t\t\t\tcall_user_func_array(\"{$nome['controle']}::montarListagem\", array($this->visualizacao,$colecao,$this->pegarPagina(),$nome['controle']));\n\t\t\t\t$this->visualizacao->listagem->passarControle($nome['controle']);\n\t\t\t\tif($colecao->contarItens()){\n\t\t\t\t\t$listagens[$idx]['listagem'] = $this->visualizacao->listagem;\n\t\t\t\t\t$listagens[$idx]['ocorrencias'] = $colecao->contarItens();\n\t\t\t\t\t$listagens[$idx]['nome'] = $arquivo['nome'];\n\t\t\t\t\t$listagens[$idx]['controlePesquisa'] = $nome['controle'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($this->visualizacao->listagem);\n\t\t$this->visualizacao->listagens = $listagens;\n\t}", "public function get_contents($params)\n\t{\n\t\t$data = array();\n\t\t$theVillaData = new DOMDocument();\n\t\t$xcache = VILLA_XML_PATH.$params['theme'].'/'.$params['cacheName'].'.xml.cache';\n\t\t$theVillaData->load($xcache);\n\t\t\n\t\t/* \n\t\t\tStart Parse XML Data \n\t\t*/\n\t\t\n\t\t/* Check if content is for mobile or for desktop site */\n\t\tif( !$params['ismobile'] ): /* Site is desktop/laptop environment */\n\t\t\t$villaData = $theVillaData->getElementsByTagName('Content');\n\t\t\t$d = 0;\n\t\t\tforeach ($villaData as $vData):\n\t\t\t\t$data[$d]['pageTitle'] = $vData->getAttribute('desc');\n\t\t\t\t$data[$d]['contentid'] = $vData->getAttribute('contentid');\n\t\t\t\t$data[$d]['contenttypeid'] = $vData->getAttribute('contenttypeid');\n\t\t\t\t$data[$d]['desc'] = (string) trim(html_entity_decode($vData->getElementsByTagName('Description')->item(0)->nodeValue));\n\t\t\t\t$villaSubContents = $vData->getElementsByTagName('SubContent');\n\t\t\t\t$s = 0;\n\t\t\t\tforeach ($villaSubContents as $subContents):\n\t\t\t\t\t$data[$d]['SubContents'][$s]['Heading'] = (string) trim($subContents->getElementsByTagName('Heading')->item(0)->nodeValue);\n\t\t\t\t\t$data[$d]['SubContents'][$s]['Description'] = (string) trim(html_entity_decode($subContents->getElementsByTagName('Description')->item(0)->nodeValue));\n\t\t\t\t\t$pageImages = $subContents->getElementsByTagName('Image');\n\t\t\t\t\t$i = 0;\n\t\t\t\t\tforeach ($pageImages as $pageImage):\n\t\t\t\t\t\t$data[$d]['SubContents'][$s]['Image'][$i]['Caption'] = (string) trim($pageImage->getElementsByTagName('Caption')->item(0)->nodeValue);\n\t\t\t\t\t\t$data[$d]['SubContents'][$s]['Image'][$i]['ThumbSizeUrl'] = (string) trim($pageImage->getElementsByTagName('ThumbSizeUrl')->item(0)->nodeValue);\n\t\t\t\t\t\t$data[$d]['SubContents'][$s]['Image'][$i]['FullSizeUrl'] = (string) trim($pageImage->getElementsByTagName('FullSizeUrl')->item(0)->nodeValue);\n\t\t\t\t\t\t$i++;\n\t\t\t\t\tendforeach;\n\t\t\t\t\t$s++;\n\t\t\t\tendforeach;\n\t\t\t\t$d++;\n\t\t\tendforeach;\n\t\t\t$pageData = $this->xSearch($data, 'contenttypeid', $params['content']);\n\t\t\treturn $pageData;\n\t\telse: /* Site is tablet/mobile environment */\n\t\t\t$mobileData = $theVillaData->getElementsByTagName('ExtraInfo');\n\t\t\tforeach ($mobileData as $mData):\n\t\t\t\t$g = 0;\n\t\t\t\t$mG = array();\n\t\t\t\t$mobileImages = $mData->getElementsByTagName('Images');\n\t\t\t\tforeach ($mobileImages as $mblImages):\n\t\t\t\t\t$mblGallery = $mblImages->getElementsByTagName('Gallery');\n\t\t\t\t\tforeach ($mblGallery as $mi) :\n\t\t\t\t\t\t$Imgs = $mi->getElementsByTagName('Image');\n\t\t\t\t\t\tforeach ($Imgs as $Img):\n\t\t\t\t\t\t\t$mG[$g]['Caption'] = $Img->getElementsByTagName('Caption')->item(0)->nodeValue;\n\t\t\t\t\t\t\t$mG[$g]['ThumbSizeUrl'] = $Img->getElementsByTagName('ThumbSizeUrl')->item(0)->nodeValue;\n\t\t\t\t\t\t\t$mG[$g]['FullSizeUrl'] = $Img->getElementsByTagName('FullSizeUrl')->item(0)->nodeValue;\n\t\t\t\t\t\t\t$g++;\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\tendforeach;\n\t\t\t\tendforeach;\n\t\t\n\t\t\t\t$data['VillaName'] = $mData->getElementsByTagName('VillaName')->item(0)->nodeValue;\n\t\t\t\t$data['SubLocation'] = $mData->getElementsByTagName('SubLocation')->item(0)->nodeValue;\n\t\t\t\t$data['Location'] = $mData->getElementsByTagName('Location')->item(0)->nodeValue;\n\t\t\t\t$data['Country'] = $mData->getElementsByTagName('Country')->item(0)->nodeValue;\n\t\t\t\t$data['ShortDesc'] = (string) trim(html_entity_decode($mData->getElementsByTagName('ShortDesc')->item(0)->nodeValue));\n\t\t\n\t\t\t\t$gpsCoordinates = $mData->getElementsByTagName('GPSCoordinates');\n\t\t\t\tforeach ($gpsCoordinates as $gps):\n\t\t\t\t\t$data['contenttypeid'] = $gps->getAttribute('contenttypeid');\n\t\t\t\t\t$decimal = $gps->getElementsByTagName('Decimal');\n\t\t\t\t\tforeach ($decimal as $value):\n\t\t\t\t\t\t$data['Latitude'] = $value->getElementsByTagName('Latitude')->item(0)->nodeValue;\n\t\t\t\t\t\t$data['Longitude'] = $value->getElementsByTagName('Longitude')->item(0)->nodeValue;\n\t\t\t\t\tendforeach;\n\t\t\t\tendforeach;\n\t\t\n\t\t\t\t$rooms = $mData->getElementsByTagName('Rooms');\n\t\t\t\tforeach ($rooms as $room):\n\t\t\t\t\t$rm = $room->getElementsByTagName('Room');\n\t\t\t\t\tforeach ($rm as $r):\n\t\t\t\t\t\t$data['RoomName'] = $r->getElementsByTagName('RoomName')->item(0)->nodeValue;\n\t\t\t\t\t\t$data['MinRate'] = $r->getElementsByTagName('MinRate')->item(0)->nodeValue;\n\t\t\t\t\t\t$data['MaxRate'] = $r->getElementsByTagName('MinRate')->item(0)->nodeValue;\n\t\t\t\t\tendforeach;\n\t\t\t\tendforeach;\n\t\t\tendforeach;\n\t\t\t$data['mobileImages'] = $mG;\n\t\t\treturn $data;\n\t\tendif;\n\t\t/* End check if content is mobile or desktop site */\n\t\t\n\t\t/* \n\t\t\tEnd Parse XML Data \n\t\t*/\n\t\t\n\t}", "function getPageFiles() {\n\t$directory = \"../\";\n\t$pages = glob($directory . \"*.php\");\n\tforeach ($pages as $page){\n\t\t$fixed = str_replace('../','/'.$us_url_root,$page);\n\t\t$row[$fixed] = $fixed;\n\t}\n\treturn $row;\n}", "function datos_simbolos_seleccion($id_seleccion,$id_usuario) {\n\t\t$query = \"SELECT seleccion_simbolos.*,repositorio_archivos.*\n\t\tFROM seleccion_simbolos,repositorio_archivos\n\t\tWHERE seleccion_simbolos.id_seleccion = '$id_seleccion'\n\t\tAND seleccion_simbolos.id_file=repositorio_archivos.file_id\n\t\tAND repositorio_archivos.id_usuario='$id_usuario'\n\t\tORDER BY seleccion_simbolos.orden asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function cargarVista()\n {\n session_start();\n // load views\n if ($_SESSION['tipeUser'] != 1) {\n\n header('location:'.URL.'Cuentas/access');\n exit();\n\n }else{\n $user = $this->model->cargarPaciente($_SESSION[\"idUser\"],$_SESSION['tipeUser']);\n foreach ($user as $value) {\n $this->model->setId_Paciente($value->id_paciente);\n $this->model->setNombre($value->primer_nombre.' '.$value->segundo_nombre);\n $this->model->setApellido($value->primer_apellido.' '.$value->segundo_apellido);\n $_SESSION['historia'] = $value->id_historia_clinica;\n }\n $_SESSION['userName'] = (\"Paciente : \".$this->model->getNombre(). ' ' .$this->model->getApellido());\n $_SESSION['idPaciente'] = $this->model->getId_Paciente();\n $_SESSION['userName'] = ($this->model->getNombre(). ' ' .$this->model->getApellido());\n $_SESSION['userHome'] = ($this->model->getUrl());\n \n }\n $paciente = $this->model->consultarPaciente($_SESSION['idPaciente']);\n foreach ($paciente as $item) \n {\n $this->model->setId_Paciente($item->id_paciente);\n $this->model->setNombre($item->primer_nombre.' '.$item->segundo_nombre);\n $this->model->setApellido($item->primer_apellido.' '.$item->segundo_apellido);\n $this->model->setTipo_Documento($item->tdocumento);\n $this->model->setDocumento($item->documento);\n $this->model->setGenero($item->genero);\n $this->model->setTelefono($item->telefono);\n $this->model->setEscolaridad($item->escolaridad);\n $this->model->setHistoria($item->historia);\n }\n $_SESSION['historia'] = $this->model->getHistoria();\n $_SESSION['documento'] = $this->model->getDocumento();\n\n }", "public function readAllVoto(){\n\n return self::read('voto','voto'); \n }", "public function cargar(){\n\t\t$resp = false;\n\t\t$base=new BaseDatos();\n\t\t$sql=\"SELECT * FROM estadotipos WHERE idestadotipos= \".$this->getId();\n\t\tif ($base->Iniciar()) {\n\t\t\t$res = $base->Ejecutar($sql);\n\t\t\tif($res>-1){\n\t\t\t\tif($res>0){\n\t\t\t\t\t$row = $base->Registro();\n\t\t\t\t\t$this->setear($row['idestadotipos'],$row['etdescripcion'],$row['etactivo']);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setmensajeoperacion(\"EstadoTipos->listar: \".$base->getError());\n\t\t}\n\t\treturn $resp;\n\t}", "function cargar()\n\t{\n\t\ttoba_logger::instancia()->debug(\"Cargando proyecto '{$this->identificador}'\");\n\t\tif( ! ( $this->instancia->existe_proyecto_vinculado( $this->identificador ) ) ) {\n\t\t\ttoba_logger::instancia()->error(\"PROYECTO: El proyecto '{$this->identificador}' no esta asociado a la instancia actual\");\n\t\t\tthrow new toba_error('PROYECTO: El proyecto no esta asociado a la instancia actual, revise el log');\n\t\t}\n\t\t$this->cargar_tablas();\n\t\t$this->cargar_componentes();\n\t\t$errores = $this->cargar_perfiles();\n\t\t$this->generar_roles_db();\n\t\t//Regenero el checksum para el proyecto\n\t\tif ($this->get_instalacion()->chequea_sincro_svn()) {\n\t\t\t$this->generar_estado_codigo();\n\t\t}\n\t\treturn $errores;\n\t}", "public function lCargartablaPerfiles() {\n $oDLaboratorio = new DLaboratorio();\n $rs = $oDLaboratorio->dCargartablaPerfiles();\n foreach ($rs as $key => $value) {\n array_push($rs[$key], \"../../../../fastmedical_front/imagen/icono/smile9.gif ^ Seleccionar\");\n }\n return $rs;\n }", "public function catalogos() \n\t{\n\t}", "function opcion__cargar($datos = null)\n\t{\n\t\t$param = $this->get_parametros();\n\t\tif (! isset($datos)) {\n\t\t\t$path = null;\n\t\t\t$id_proyecto = $this->get_id_proyecto_actual(false);\n\t\t\tif (!isset($id_proyecto)) {\n\t\t\t\tlist($id_proyecto, $path) = $this->seleccionar_proyectos(false, false);\n\t\t\t\tif ($id_proyecto == $path) {\n\t\t\t\t\t$path=null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($param['-d'])) {\n\t\t\t\t$path = realpath($param['-d']);\n\t\t\t}\n\t\t} else {\n\t\t\t$id_proyecto = $datos[0];\n\t\t\t$path = $datos[1];\n\t\t}\n\t\t$i = $this->get_instancia();\n\t\tif ( ! $i->existen_metadatos_proyecto( $id_proyecto ) ) {\n\n\t\t\t//-- 1 -- Cargar proyecto\n\t\t\t$this->consola->enter();\n\t\t\t$this->consola->subtitulo(\"Carga del Proyecto \".$id_proyecto);\n\t\t\t$i->vincular_proyecto( $id_proyecto, $path );\n\t\t\t$p = $this->get_proyecto($id_proyecto);\n\t\t\t$p->cargar_autonomo();\n\n\t\t\t//TODO: esto esta duplicado porque en el paso de vincular_proyecto aun no estan los metadatos cargados\n\t\t\t$i->generar_ini_rest($id_proyecto);\n\n\t\t\t$this->consola->mensaje(\"Vinculando usuarios\", false);\n\t\t\t$usuarios = $this->seleccionar_usuarios( $p->get_instancia() );\n\t\t\t$grupo_acceso = $this->seleccionar_grupo_acceso($p);\n\t\t\tforeach ( $usuarios as $usuario ) {\n\t\t\t\t$p->vincular_usuario($usuario, array($grupo_acceso));\n\t\t\t\ttoba_logger::instancia()->debug(\"Vinculando USUARIO: $usuario, GRUPO ACCESO: $grupo_acceso\");\n\t\t\t\t$this->consola->progreso_avanzar();\n\t\t\t}\n\t\t\t$this->consola->progreso_fin();\n\n\t\t\t//-- 2 -- Exportar proyecto\n\t\t\t$this->consola->enter();\n\t\t\t// Exporto la instancia con la nueva configuracion (por fuera del request)\n\t\t\t$i->exportar_local();\n\t\t} else {\n\t\t\t$p = $this->get_proyecto($id_proyecto);\n\t\t\t$this->consola->mensaje(\"El proyecto '\" . $p->get_id() . \"' ya EXISTE en la instancia '\".$i->get_id().\"'\");\n\t\t}\n\n\t\tif (! $p->esta_publicado()) {\n\t\t\t//--- Generación del alias\n\t\t\t$this->consola->separador();\n\t\t\tif (isset($param['-a']) && $param['-a'] == 1) {\n\t\t\t\t$agregar = true;\n\t\t\t} else {\n\t\t\t\t$agregar = $this->consola->dialogo_simple(\"¿Desea agregar el alias de apache al archivo toba.conf?\", true);\n\t\t\t}\n\t\t\tif ($agregar) {\n\t\t\t\t$url = (isset($param['--alias-nombre'])) ?$param['--alias-nombre'] : null;\n\t\t\t\t$full_url = (isset($param['--full-url'])) ?$param['--full-url'] : null;\n\t\t\t\t$p->publicar($url, $full_url);\n\t\t\t\t$this->consola->mensaje('OK. Debe reiniciar el servidor web para que los cambios tengan efecto');\n\t\t\t}\n\t\t}\n\t}", "public function ConsultarCambioEstados($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVACE($tipodocumento,$busqueda);\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $host= $_SERVER[\"HTTP_HOST\"];\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $ruta= \"<a href='/\".$fila['Ruta'].\"'>Descargar Archivo</a>\";\n array_push($registro, $fila['TipoIdentificacion'],$fila['NumeroIdentificacion'],$fila['Nombres'],$fila['Fecha'],$fila['EstadoAnterior'],$fila['EstadoNuevo'],$fila['TipoArchivo'], $ruta ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "public function buscarTodos() {\r\n global $conn;\r\n $qry = $conn->query(\"SELECT * FROM conta\");\r\n $items = array();\r\n while($linha = $qry->fetch()) {\r\n $items[] = new Conta($linha[\"saldo\"], $linha[\"numero\"], $linha[\"cpf\"],$linha[\"cnpj\"]);\r\n }\r\n return $items;\r\n }", "public function listar_liberados_controlador(/*$privilegio,$codigo*/){\n\t\t\t\t\t\n\t\t\t\t\t$tabla=\"\";\n\t\t\t\t\t//Consulta para la busqueda de reasignación de hardware \n\t\t\t\t\t//Para la búsqueda se utilizo una tabla dinamica de la plantilla de Gentellas Master\n\t\t\t\t\t$consulta=\"SELECT *,T1.hardwareqr FROM hardware as T1, hardware_ingreso as T2, estado_info_hardware as T3, estado_asignacion_hardware as T4, tipo_hardware as T5, marca_hardware as T6, modelo_hardware as T7, color_hardware as T8, informe_ingreso_hardware as T9, empleados as T10, cargo as T11, departemento as T12, empresa as T13 WHERE T1.hiserie=T2.hiserie AND T2.estadoinfoharcodigo=T3.estadoinfoharcodigo AND T3.estadoinfoharnombre='APROBADO' AND T2.estadoasigharcodigo=T4.estadoasigharcodigo AND T4.estadoasigharnombre='NO REASIGNADO' AND T2.tipohardwarecodigo=T5.tipohardwarecodigo AND T2.marcahardwarecodigo=T6.marcahardwarecodigo AND T2.modelohardwarecodigo=T7.modelohardwarecodigo AND T2.colorhardwarecodigo=T8.colorhardwarecodigo AND T2.icodigo=T9.icodigo AND T1.empleadocodigo=T10.empleadocodigo AND T10.cargocodigo=T11.cargocodigo AND T11.departamentocodigo=T12.departamentocodigo AND T12.empresacodigo=T13.empresacodigo\n\t\t\t\t\t\";\n\n\t\t\t\t\t$conexion = mainModel::conectar();\n\t\t\t\t\t$datos = $conexion->query($consulta);\n\t\t\t\t\t$datos= $datos->fetchAll();\n\n\t\t\t\t\t\n\t\t\t//InicioTabla_______________________________________________________________\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>#</th>\n\t\t\t\t\t<th>COD. DE INVENTARIO</th>\n\t\t\t\t\t<th>SERIE DEL HARDWARE</th>\n\t\t\t\t\t<th>TIPO DE HARDWARE</th>\n\t\t\t\t\t<th>MARCA DE HARDWARE</th>\n\t\t\t\t\t<th>MODELO DE HARDWARE</th>\n\t\t\t\t\t<th>COLOR DE HARDWARE</th>\n\t\t\t\t\t<th>FECHA DE INGRESO</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t$tabla.='\n\t\t\t\t\t<th>ACCIONES</th>\n\t\t\t\t\t\n\t\t\t\t\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t$tabla.='</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>';\n\t\t\t\t\t\n\t\t\t\t\t$contador=0;\n\t\t\t\t\tforeach ($datos as $rows) {\n\t\t\t\t\t\t$contador=$contador+1;\n\t\t\t\t\t\t$a=$rows['hiserie'];\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>'.$contador.'</td>\n\t\t\t\t\t\t<td>'.$rows['hiserie'].'</td>\n\t\t\t\t\t\t<td>'.$rows['serireexterno'].'</td>\n\t\t\t\t\t\t<td>'.$rows['tipohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['marcahardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['modelohardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['colorhardwarenombre'].'</td>\n\t\t\t\t\t\t<td>'.$rows['hifecha'].'</td>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t<form method=\"POST\" action=\"'.SERVERURL.'reasignacioninfo/\">\n\t\t\t\t\t\t<input type=\"hidden\" value=\"'.($a).'\" name=\"codigo\">\n\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\"><i class=\"fa fa-folder-open-o\"></i> Ingresar</button>\n\t\t\t\t\t\t</form> \n\t\t\t\t\t\t</td>\n\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\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t//$contador++;\n\t\t\t\t//}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\t\t\t\t\t\treturn $tabla;\n\t\t\t\t\t}", "function ObtenerColectivos()\n {\n $user = User::where('id', 1)->first();\n \\Auth::loginUsingId($user->id);\n \n $this->get(\"/colectivo\")\n \t ->assertStatus(200)\n \t ->assertJson([\n \t \t\t'colectivos' => true,\n \t\t]);\n }", "public function obtener_seccion(){\n\t\t//si por get viene una seccion correcta, se buscara su include \n\t\tif(isset($_GET[$this->seccion['id']])){\n\t\t\tif(!empty($this->seccion['include'])){\n\t\t\t\t\t//var_dump($this->seccion['include']);\n\t\t\t\t\tinclude $this->seccion['include'].'.php';\n\t\t\t}\n\n\t\t}else if(empty($_GET)){\n\t\t\t//no existe seccion que se envia por get, se continua con seccion predefinida\n\t\t\t//'secciones/promo.php' o 'modulos/main_con.php'\n\t\t\t\n\t\t\t$this->direccion_generica();\n\t\t}else{\n\t\t\t//es algo en GET desconocido por el sistema\n\t\t\t//header(\"HTTP/1.0 404 Not Found\");\n\t\t\t//header(\"Status: 404 Not Found\");\n\t\t\tif($this->seccion['id'] == 'no_disponible'){\n\t\t\t\tinclude $this->seccion['include'].'.php';\n\t\t\t}else{\n\t\t\t\tinclude 'modulos/error/404.php';\t\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public function buscarArticulosSEA() {\n $rawData = array();\n $obj_con = new cls_Base();\n $conApp = $obj_con->conexionServidor();\n $sql = \"SELECT COD_ART,DES_COM,COD_LIN,COD_TIP,COD_MAR,EXI_TOT,PAUX_03,P_PROME,P_COSTO \"\n . \" FROM \" . $obj_con->BdServidor . \".IG0020 WHERE EST_LOG=1 AND EXI_TOT>0 \";\n $sentencia = $conApp->query($sql);\n //return $sentencia->fetch_assoc();\n if ($sentencia->num_rows > 0) {\n while ($fila = $sentencia->fetch_assoc()) {//Array Asociativo\n $rawData[] = $fila;\n }\n }\n return $rawData;\n }", "public function listar()\n\t{\t\n\n\t\t//Se consiguen los valores desde POST y se Sanitizan\n\t\t$vin = SanitizadorDatos::validaNumero($_POST['vin']);\n\t\t\n\t\t$result = $this->modelo->listar($vin);\n\n\t\t//Revisa si se puede listar la ubicacion\n\t\tif(isset($result))\n\t\t{\t\n\t\t\t$diccionario = array('{vin}'=>$this->modelo->datos['vin'],\n\t\t\t '{ubicacion}'=>$this->modelo->datos['ubicacion'],\n\t\t\t '{subUbicacion}'=>$this->modelo->datos['subUbicacion'],\n\t\t\t '{nombre_sesion}'=>$_SESSION['usuario']);\n\t\t\t$vista = file_get_contents('Vista/UbicacionEncontrada.html');\n\t\t\tforeach ($diccionario as $dato => $significado) {\n\t\t\t\t$vista =str_replace( $dato, $significado , $vista);\n\t\t\t}\n\t\t\techo $vista;\n\t\t}\n\t\telse\n\t\t{\n\t\t\trequire('Vista/UbicacionInexistente.html');\n\t\t}\n\t}", "function buscarEspaciosVistos(){\r\n $i=0;\r\n $espacios_vistos=isset($espacios_vistos)?$espacios_vistos:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if(is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $espacio) {\r\n $espacios[$i]=$espacio[0];\r\n $i++;\r\n }\r\n }\r\n \r\n if(is_array($espacios)){\r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $espacios_vistos[$key]['CODIGO']=$cursado['CODIGO'];\r\n $espacios_vistos[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n }\r\n }else{\r\n $espacios_vistos=$espacios;\r\n }\r\n \r\n }\r\n return $espacios_vistos;\r\n }", "function buscar_originales_idioma_por_subtema($id_subtema,$id_idioma,$tipo_pictograma) {\n\t\n\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\tAND palabra_subtema.id_subtema='.$id_subtema.''; \n\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t$subtema_tabla_from=', palabra_subtema';\t\n\t\t\n\t\t$query = \"SELECT DISTINCT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.*, traducciones_\".$id_idioma.\".* $subtema_tabla\n\t\tFROM palabra_imagen, imagenes, palabras, traducciones_\".$id_idioma.\" $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabra_imagen.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabras.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".traduccion IS NOT NULL\n\t\t$sql_subtema\t\n\t\tAND imagenes.id_tipo_imagen=$tipo_pictograma\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t\t\n\t}", "public function lista(){\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"SELECT * FROM sedecchamados\");\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$app->render('default.php',[\"data\"=>$result],200); \n\t\t}", "function loadTodos($intProject = null){\n\t\t\t\tglobal $AppUI;\n\n\t\t\t\t$arTmp = array();\n\n\t\t\t\t// Traigo los todos que tiene permitidas //\n\n\t\t\t\t if ($AppUI->user_type == 1){\n\t\t\t\t\t $strSql = \"SELECT id_todo,description, project_id\"\n\t\t\t\t\t\t\t\t. \"\\nFROM project_todo \"\n\t\t\t\t\t\t\t\t.\"\\n WHERE user_assigned = $AppUI->user_id\"\n\t\t\t\t\t\t\t\t. \"\\n order by description\";\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t $strSql = \"SELECT DISTINCT project_id \n\t\t\t\t\t\t\t FROM project_todo \n\t\t\t\t\t\t\t\t\tWHERE user_assigned= $AppUI->user_id \n\t\t\t\t\t\t\t\t\t\";\n \n $allowed = db_loadColumn($strSql);\n\n\t\t\t\t\t\t if (count($allowed)==\"0\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$allowed[0] =\"-1\" ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t $strSql = \"SELECT id_todo,description, project_id\n\t\t\t\t\t\t\t\t\tFROM project_todo\n\t\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\tproject_id IN (\" . implode( ',', $allowed ) . \")\n\t\t\t\t\t\t\t\t and user_assigned= $AppUI->user_id \n\t\t\t\t\t\t\t\t\torder by description asc\";\n \n\t\t\t\t }\n\t\t\t\t\n\t\t\t\t$arTodos = db_loadList($strSql);\n\t\t\t\t\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($arTodos as $ToDo)\n\t\t\t\t{\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&aacute;\",\"á\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&eacute;\",\"é\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&iacute;\",\"í\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&oacute;\",\"ó\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&uacute;\",\"ú\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&apos;\",\"'\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&#039;\",\"'\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&quot;\",\"'\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t$arTodos[$i][\"description\"] = ereg_replace(\"&apos;\",\"'\",$arTodos[$i][\"description\"]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$this->todos = $arTodos;\n\n\t\t\t\tif($this->_addItems_forEachProject_inTodos && count($this->items) > 0){\n\t\t\t\t\t$intProjectId = \"\";\n\t\t\t\t\tforeach($arTodos as $rRow){\n\t\t\t\t\t\tif($rRow[\"project_id\"] != $intProjectId){\n\t\t\t\t\t\t\t$intProjectId = $rRow[\"project_id\"];\n\t\t\t\t\t\t\tforeach($this->items as $kItem => $rItem){\n\t\t\t\t\t\t\t\t$this->addItemAtBeginOfTodos($this->addItemTodo($intProjectId, key($rItem), $rItem[key($rItem)]));\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\tif($this->_breset_Items) $this->items = array();\n\t\t\t\t}\n\t\t\t}", "public function getIncidencias(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraIncidencias\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM incidencias \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM incidencias LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function catalogo(){\n \n $inicio['recomendado'] = $this->carga_recomendado();\n $inicio['categorias'] = $this->carga_menu_categorias();\n $this->Plantilla(\"catalogo\", $inicio);\n \n }", "public function cargarModificaciones()\n {\n $modificaciones = ArchivoCargadoEstado::listar(\"idarchivocargado=\" . $this->getIdArchivoCargado());\n $this->setModificacionesArchivo($modificaciones);\n }", "private function cargarActas() {\n $this->aActas = array();\n $res = Funciones::gEjecutarSQL(\"SELECT FECHA,DATE_FORMAT(FECHA,'%d-%m-%Y') AS FECHAISO,COUNT(*) AS PUNTOS FROM ACTAS_PUNTOS GROUP BY FECHA ORDER BY FECHA DESC\");\n while($aRow = $res->fetch(PDO::FETCH_ASSOC)) {\n $this->aActas[$aRow['FECHA']] = array($aRow['FECHAISO'], $aRow['PUNTOS']);\n }\n $res->closeCursor(); \n }", "function listarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_sel';\r\n\t\t$this->transaccion='tgv_SERVIC_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_servicio','int4');\r\n\t\t$this->captura('estado','varchar');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('id_lugar_destino','int4');\r\n\t\t$this->captura('id_ep','int4');\r\n\t\t$this->captura('fecha_asig_fin','date');\r\n\t\t$this->captura('fecha_sol_ini','date');\r\n\t\t$this->captura('descripcion','varchar');\r\n\t\t$this->captura('id_lugar_origen','int4');\r\n\t\t$this->captura('cant_personas','int4');\r\n\t\t$this->captura('fecha_sol_fin','date');\r\n\t\t$this->captura('id_funcionario','int4');\r\n\t\t$this->captura('fecha_asig_ini','date');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('fecha_reg','timestamp');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('fecha_mod','timestamp');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('desc_funcionario','text');\r\n\t\t$this->captura('desc_lugar_ini','varchar');\r\n\t\t$this->captura('desc_lugar_des','varchar');\r\n\t\t$this->captura('id_funcionario_autoriz','int4');\r\n\t\t$this->captura('observaciones','varchar');\r\n\t\t$this->captura('desc_funcionario_autoriz','text');\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//echo '--->'.$this->getConsulta(); exit;\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "function Cargar_servicios_precios($clave, $filadesde, $buscar_servicio, $buscar_fecha){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\r\n\t\tif($buscar_servicio != null){\r\n\t\t\t$fech = \" AND '\".date(\"Y-m-d\",strtotime($buscar_fecha)).\"' BETWEEN FECHA_DESDE AND FECHA_HASTA\";\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"' AND CLAVE_SERVICIO = '\".$buscar_servicio.\"'\";\r\n\t\t\tif($buscar_fecha != null){\r\n\t\t\t\t$CADENA_BUSCAR .= $fech;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_fecha != null){\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"' AND '\".date(\"Y-m-d\",strtotime($buscar_fecha)).\"' BETWEEN FECHA_DESDE AND FECHA_HASTA\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"'\"; \r\n \t\t}\r\n\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT clave_servicio,clave_calendario, pax_desde, pax_hasta, precio, precio_ninos\r\n\t\t\t\t\t\t\t\t\t\tFROM hit_producto_cuadros_servicios_precios \r\n\t\t\t\t\t\t\t\t\t\tWHERE \".$CADENA_BUSCAR.\" ORDER BY numero, fecha_desde, pax_desde\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'PRODUCTO_CUADROS_SERVICIOS_PRECIOS' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$folletos_servicios_precios = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['clave_servicio'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($folletos_servicios_precios,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $folletos_servicios_precios;\r\n\t}", "function cargar_dato($dato)\t\t\t\r\n {\r\n $ncampos=5;\r\n\tif($ncampos==count($dato))\r\n\t{\r\n\t $this->id_aplicacion=$dato[0];\r\n\t $this->nombre_subaplicacion=$dato[1]; \r\n $this->file_subaplicacion=$dato[2];\r\n $this->imagen_subaplicacion=$dato[3];\r\n $this->orden_subaplicacion=$dato[4];\r\n\t} \r\n }", "function Cargar_comisiones($id, $filadesde, $buscar_producto){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\t\r\n\t\tif($buscar_producto != null){\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"' AND PRODUCTO LIKE '%\".$buscar_producto.\"%' \";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" WHERE ID = '\".$id.\"'\";\r\n\t\t}\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT DATE_FORMAT(fecha_desde, '%d-%m-%Y') AS fecha_desde, DATE_FORMAT(fecha_hasta, '%d-%m-%Y') AS fecha_hasta, producto, folleto, cuadro, paquete, comision_paquetes, comision_alojamientos, comision_transportes,\t\r\n\t\t\t\t\t\t\t\t\t comision_servicios FROM hit_minoristas_comisiones \".$CADENA_BUSCAR.\" ORDER BY fecha_desde, fecha_hasta, producto, folleto, cuadro, paquete\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta');\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'MINORISTAS_COMISIONES' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$minoristas_comisiones = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['fecha_desde'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($minoristas_comisiones,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $minoristas_comisiones;\t\t\t\t\t\t\t\t\t\t\t\r\n\t}", "public function getCorporativos() {\n $this->consulta = \"SELECT usuario.idUsuario, usuario.idCorporativo, \n corporativo.razonSocial, usuario.login, \n usuario.fechaHoraUltIN, usuario.estado \n FROM usuario \n INNER JOIN corporativo ON usuario.idCorporativo = corporativo.idCorporativo \n WHERE usuario.tipoUsuario = 'Cliente Corporativo'\";\n if ($this->consultarBD() > 0) {\n $this->mensaje = 'Seccion Usuarios Corporativos <br> Registros Encontrados: <b>' . count($this->registros) . '</b>';\n return true;\n } else {\n return false;\n }\n }", "function listar_originales_idioma($registrado,$id_tipo,$letra,$filtrado,$orden,$id_subtema,$id_idioma,$tipo_pictograma,$txt_locate,$sql) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND palabras.id_tipo_palabra='.$id_tipo.''; }\n\t\t\t\n\t\tif (isset($sql) && $sql !='') { \n\t\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\t\t'.$sql; \n\t\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t} else {\n\t\t\t\n\t\t\tif ($id_subtema==99999) { \n\t\t\t\t$sql_subtema=''; \n\t\t\t\t$subtema_tabla='';\n\t\t\t\t$subtema_tabla_from='';\n\t\t\t} \n\t\t\telse { \n\t\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\tAND palabra_subtema.id_subtema='.$id_subtema.''; \n\t\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($letra==\"\") { $sql_letra=''; } \n\t\telse { \n\t\t\n\t\t\tswitch ($txt_locate) { \n\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 2:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '%%$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 3:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '%%$letra'\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion='$letra'\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}\t\n\t\t\n\t\tif ($filtrado==1) { $sql_filtrado='imagenes.ultima_modificacion'; } \n\t\telseif ($filtrado==2) { $sql_filtrado='palabras.palabra'; }\n\t\t\n\t\t$query = \"SELECT COUNT(*)\n\t\tFROM palabra_imagen, imagenes, palabras, traducciones_\".$id_idioma.\" $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabra_imagen.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabras.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".traduccion IS NOT NULL\n\t\t$sql_letra\n\t\t$sql_tipo\n\t\t$sql_subtema\t\n\t\tAND imagenes.id_tipo_imagen=$tipo_pictograma\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\t$mostrar_registradas\n\t\tORDER BY $sql_filtrado $orden\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row[0];\n\t\t\n\t}", "private function cargar_acceso_nodos($parametros){\r\n // echo $_SESSION[CookIdUsuario];\r\n //print_r($parametros);\r\n if (strlen($parametros[cod_link])>0){\r\n if(!class_exists('mos_acceso')){\r\n import(\"clases.mos_acceso.mos_acceso\");\r\n }\r\n $acceso = new mos_acceso(); \r\n if ($_SESSION[SuperUser]=='S')\r\n unset($parametros[terceros]); \r\n $data_ids_acceso = $acceso->obtenerNodosArbol($_SESSION[CookIdUsuario],$parametros[cod_link],$parametros[modo],$parametros[terceros]);\r\n //print_r($data_ids_acceso);\r\n foreach ($data_ids_acceso as $value) {\r\n $this->id_org_acceso[$value[id]] = $value;\r\n } \r\n }\r\n }", "public function listarSocios() {\r\n $sql = \"select j.nombre,j.apellido,j.cedula,j.fechanac, j.porcentaje, m.nombre from juntadirectiva as j, municipio as m \"\r\n\t\t .\" where j.ciudadnac = m.id\";\t\t\r\n $respuesta = $this->object->ejecutar($sql);\r\n $this->construirListadoSocio($respuesta);\r\n }", "function buscarContatos($nome) {\n require_once('../modulo/config.php');\n\n //Import do arquivo de função para conectar no BD \n require_once('conexaoMysql.php');\n\n if(!$conex = conexaoMysql())\n {\n echo(\"<script> alert('\".ERRO_CONEX_BD_MYSQL.\"'); </script>\");\n //die; //Finaliza a interpretação da página\n }\n\n $sql = \"select tblContatos.*, tblEstados.sigla from tblContatos, tblEstados where tblContatos.idEstado = tblEstados.idEstado and statusContato = 1 and tblContatos.nome like '%\".$nome.\"%'\";\n\n $select = mysqli_query($conex, $sql);\n \n while($rsContatos = mysqli_fetch_assoc($select)) {\n //varios itens para o json\n $dados[] = array (\n // => - o que alimenta o dado de um array\n 'idContato' => $rsContatos['idContato'],\n 'nome' => $rsContatos['nome'],\n 'celular' => $rsContatos['celular'],\n 'email' => $rsContatos['email'],\n 'idEstado' => $rsContatos['idEstado'],\n 'sigla' => $rsContatos['sigla'],\n 'dataNascimento' => $rsContatos['dataNascimento'],\n 'sexo' => $rsContatos['sexo'],\n 'obs' => $rsContatos['obs'],\n 'foto' => $rsContatos['foto'],\n 'statusContato' => $rsContatos['statusContato']\n\n ); \n } \n\n //faça um header para dados importantes\n // $headerDados = array (\n // 'status' => 'success',\n // 'data' => date('d-m-y'),\n // 'contatos' => $dados\n // );\n if (isset($dados))\n $listContatosJson = convertJson($dados);\n else \n false;\n //verificar se foi gerado um arquivo json\n if (isset($listContatosJson)) \n return $listContatosJson;\n else\n return false;\n }", "function listar_originales_limit_para_generador($inicial,$cantidad,$id_tipo_simbolo) {\n\t\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND imagenes.id_tipo_imagen='.$id_tipo_simbolo.''; }\n\t\t\t\n\t\t$query = \"SELECT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.*\n\t\tFROM palabra_imagen, imagenes, palabras\n\t\tWHERE imagenes.estado=1\n\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n\t\t$sql_tipo\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\tORDER BY palabra_imagen.id_imagen asc\n\t\tLIMIT $inicial,$cantidad\";\n\t\t\n\t\t//$query = \"SELECT palabra_imagen.*, imagenes.*, palabras.*\n//\t\tFROM palabra_imagen, imagenes, palabras\n//\t\tWHERE imagenes.estado=1\n//\t\tAND palabra_imagen.id_palabra=8762\n//\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n//\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function imagenes_disponibles_solo_por_tipo($id_tipo,$limite) {\n\t\t$query = \"SELECT palabras.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabra_imagen.*,autores.*,licencias.*\n\t\tFROM palabras, imagenes, palabra_imagen,autores,licencias\n\t\tWHERE imagenes.id_tipo_imagen='$id_tipo'\n\t\tAND imagenes.id_imagen=palabra_imagen.id_imagen\n\t\tAND palabra_imagen.id_palabra = palabras.id_palabra\n\t\tAND imagenes.id_autor=autores.id_autor\n\t\tAND imagenes.id_licencia=licencias.id_licencia\n\t\tORDER BY imagenes.id_imagen desc\n\t\tLIMIT 0,$limite\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t}", "public function getSiteData ()\n {\n //sections selected in order with all top level sections ordered first, then all 2nd level sections next\n $q = 'SELECT section_id, section_name, section_level, section_id, parent_id, order_num, active FROM sections where page_type_id=\"1\" or page_type_id=\"2\" order by section_level, order_num';\n $sections = tdb::getInstance()->getFromQ ( $q );\n array_pop ( $sections );\n $sections_hierachy = array();\n //$sectionIndexById is an associative array where you can find the index of a section in the $secions array by using the section_id as the array key \n $sectionIndexById = array();\n foreach ( $sections as $k => $v ) {\n //if this is a top level section / menu item\n if ( $v [ 'section_level' ] == '1' ) {\n //store its index in $sections_hierachy so it can be called using it's section_id as a key\n $sectionIndexById [ $v ['section_id'] ] = $k;\n //this section goes straight in the final array\n $sections_hierachy [ $k ] = $v;\n } elseif ( $v [ 'section_level' ] == '2' ) {\n //get the index of this sections parent in $sections_hierachy by using this sections PARENT_ID (corresponds to the section_id stored above)\n $parent_index = $sectionIndexById [ $v [ 'parent_id' ] ];\n if ( !$sections_hierachy [ $parent_index ] [ 'subsections' ] ) {\n //create the array if it doesn't exists\n $sections_hierachy [ $parent_index ] [ 'subsections' ] = array();\n }\n //store the subsection\n $sections_hierachy [ $parent_index ] [ 'subsections' ] [] = $v;\n }\n }\n $this->jsonSend [ 'sections' ] = $sections_hierachy;\n\n //get the IMAGE DATA\n $q = 'select images.image_id, images.section_id, images.order_num, images.image_orig_width, images.image_orig_height, images.image_has_sizes, sections.section_name from images inner join sections on sections.section_id=images.section_id where active_status=\"1\" order by section_name, images.order_num limit 0,9999';\n $images = tdb::getInstance()->getFromQ ( $q );\n array_pop ( $images );\n\n $this->jsonSend [ 'image_ids' ] = array();\n foreach ( $images as $k=>$v )\n {\n //$this->jsonSend [] = array ( $v [ 'image_id'], $v ['image_orig_width'], $v ['image_orig_height'], $v [ 'image_has_sizes'], $v [ 'section_name'] );\n $this->jsonSend [ 'image_ids' ] [] = array ( $v [ 'image_id'], $v [ 'image_has_sizes'], $v [ 'section_name'] );\n }\n\n $this->sendJson();\n }", "function loadUbicaciones($where, $paso, $pais){\n\tinclude 'libcon.php';\n //$ubica = \"\";\n $bandera = false;\n if($pais == \"\"){\n $sql = \"SELECT * FROM web_salones WHERE concepto = $where AND estado = 1 ORDER BY regionsalon ASC;\";\n $result = miBusquedaSQL($sql);\n $ubica = armarUbicaciones($result, $paso);\n return $ubica;\n } else{\n $nuevoarray = array();$i=0;\n $sqlreg = \"SELECT campo, campo2, campo3, campo4, B.CONCEPTO, B.REGIONSALON, B.ESTADO FROM ms_configuracion A INNER JOIN (SELECT CONCEPTO, ESTADO, REGIONSALON FROM web_salones) B ON A.campo = B.REGIONSALON WHERE A.grupo = 'regiones' AND B.CONCEPTO = \".$where.\" AND B.ESTADO = 1;\";\n $regiones = (array) json_decode(miBusquedaSQL($sqlreg), true);\n foreach ($regiones as $r) {\n if($r[3] == $pais){\n $region = $r[0];\n $bandera = true;\n }\n\n $nuevoarray[$i] = $r[0];\n $i++;\n }\n\n if($bandera == true){\n $sql = \"SELECT * FROM web_salones WHERE concepto = $where AND estado = 1 AND regionsalon = \".$region.\" ORDER BY regionsalon ASC;\";\n $result = miBusquedaSQL($sql);\n $ubica = armarUbicaciones($result, $paso);\n } else if($bandera == false){\n $ubica = \"<b>No hubo resultados en la región consultada. Consulte en: </b><br><br><div class='blog-posts grid-view grid-concepto'><div class='isotope row'>\";\n $flag = \"\";$j=0;$hola=\"\";\n $unique = array_keys(array_flip($nuevoarray)); \n //var_dump($unique);\n $first_names = array_column($regiones, 'campo3');\n $unique2 = array_keys(array_flip($first_names)); \n //print_r($unique2);\n\n foreach ($unique as $r) {\n //$flag .= \"<img src='\".$r[2].\"' width='30px!important' height='22px' style='width:30px!important;''><br>\";\n \n\n $flag .= '<div class=\"col-md-2 col-sm-3 grid-view-post item\">\n <div class=\"item1 post\">\n <div class=\"box text-center\">\n <a href=\"?country='.abrevRegion($r).'\"><img class=\"ubiflags\" src=\"'.$unique2[$j].'\"><strong>'.cambiarRegion($r).'</strong></a>\n </div> \n </div>\n </div>';\n \n $j++;\n }\n\n $ubica .= $flag . \"</div></div>\";\n }\n\n return $ubica;\n }\n }", "public function buscarUsuarios(){\n $usuarios = file_get_contents('usuarios.json');\n $arrUsuariosJSON = explode(PHP_EOL,$usuarios);\n $arrUsuarioPHP = [];\n array_pop($arrUsuariosJSON);\n foreach ($arrUsuariosJSON as $key => $usuario) {\n $arrUsuarioPHP[] = json_decode($usuario,true);\n }\n return $arrUsuarioPHP;\n }", "public static function obtenerServiciosYProductos() {\n error_reporting(0);\n $serviciosproductos = \"<elementos>\";\n $mensajeRespuesta = '<mensaje';\n\n $con = @mysqli_connect($GLOBALS['DIRECCION_BD'], $GLOBALS['USUARIO_BD'], $GLOBALS['CONTRASENA_BD'], $GLOBALS['NOMBRE_BD']);\n\n \n // Check connection\n if (mysqli_connect_errno() || !$con) {\n //Mensaje de fallo de conexion a bd \n $mensajeRespuesta= FuncionesComunes::obtenerMensaje('db0003');\n } else {\n\n\n $sql = \"SELECT * FROM serviciosyproductos\";\n $result = mysqli_query($con, $sql);\n //$serviciosproductos= array();\n\n if ($result) {\n if($result->num_rows==0){\n //Mensaje de no hay registros en la tabla:\n $mensajeRespuesta= FuncionesComunes::obtenerMensaje('db0002');\n }else{\n //Mensaje de operacion exitosa\n $mensajeRespuesta= FuncionesComunes::obtenerMensaje('db0000');\n }\n \n while ($row = mysqli_fetch_array($result)) {\n //Configuramos el nuevo serviciooproducto\n $nuevo = \"<serviciooproducto \";\n $nuevo.=\"id='\" . $row['id'] . \"' \";\n $nuevo.=\"nombre='\" . $row['nombre'] . \"' \";\n $nuevo.=\"precio='\" . $row['precio'] . \"'></serviciooproducto>\";\n //$serviciosproductos[$indice]=$nuevo; \n $serviciosproductos.=$nuevo;\n }\n } else {\n //Mensaje de que no hay registros en la tabla\n $mensajeRespuesta= FuncionesComunes::obtenerMensaje('db0002');\n }\n }\n if ($con) {\n mysqli_close($con);\n }\n\n $serviciosproductos.=\"</elementos>\";\n $respuesta = \"<respuesta>\\n\\t\\t\" . $mensajeRespuesta . \"\\n\\t\\t\" . $serviciosproductos . \"\\n\\t\\t</respuesta>\\n\\r\";\n $xmlrespuesta = new SimpleXMLElement($respuesta);\n\n //return $respuesta;\n return $xmlrespuesta->asXML();\n }", "public function listadoHijosNietosImagenes($content){\n $contador = 0;\n $vectorImagenes = array();\n $dom = new DOMDocument();\n $dom->loadHTML(\"$content\");\n $xpath = new DOMXPath($dom);\n $tag = \"div\";\n $class = \"widget em-widget-new-products-grid\";\n $consulta = \"//\".$tag.\"[@class='\".$class.\"']\";\n $widget = $xpath->query($consulta);\n //var_dump($widget);\n if ($widget->length > 0){\n foreach($widget as $res){\n if ($contador == 0){\n $resultados = $res->getElementsByTagName(\"img\");\n if ($resultados->length > 0){\n foreach($resultados as $img){\n $urlImagen = $img->getAttribute(\"src\");\n array_push($vectorImagenes,$urlImagen);\n }\n }\n }\n $contador++;\n }\n }\n return $vectorImagenes;\n }", "function consultarCitasSinLocalidad($idEspecie) {\n\t\t \n\t$query = \"SELECT localidades_id, especies_id, referencias_id \n\t\t\t\t\t\tFROM localidades_distribucion \n\t\t\t\t\t\tWHERE especies_id = $idEspecie AND referencias_id <>'' AND localidades_id = 0\"; \t\t\t\t\t\t\t\n\t$res = ejecutarQuerySQL($query);\n\t$total = getNumFilas($res);\n\t\n\t$citas=\"\"; $i=1;\t\n\tif ($total > 0 ) {\n\t\t $citas=\"<b>Sin especificar localización: </b>\";\t\n\t\t while ($i <= $total) {\n\t\t \t$actual = getFila($res);\n\t\t\t$valores = $actual['referencias_id'];\n\t\t\tif (strpos($valores, \",\") ) {\n\t\t\t\t // caso del reporte de varios autores para la especie y la localidad\n\t\t\t\t$valores = explode(\",\", $valores);\n\t\t\t\t$total2 = count($valores); $j=1; // inicia en 1 para evitar el caracter de control del inicio\n\t\t\t\t$autorRef = \"\"; $agno=\"\";\n\t\t\t\twhile ($j < $total2) {\t\t\t\t\t\t \t\n\t\t\t\t\t consultarCita($valores[$j], $autorRef, $agno);\t\t\t\t\t \n\t\t\t\t\t $citas = $citas . $autorRef . \" (\" . $agno . \")\";\n\t\t\t\t\t if ($j < $total2-1) $citas = $citas . \"; \"; \n\t\t\t\t\t $j++;\n\t\t\t }\t\t\t \n\t\t}\n\t\telse\n\t\t{ // caso del reporte de un sólo autor para la especie y la localidad\t\t\t\t \n\t\t\t\t $valores = explode(\",\", $valores);\n\t\t\t\t consultarCita($valores[0], $autorRef, $agno);\n\t\t\t\t if ($autorRef <>\"\") $citas = $citas . $autorRef . \" (\" . $agno . \")\";\t\t\n\t\t}\t\t\n\t\t$i++;\n\t\t }\n\t\t$citas = $citas . \".\" ;\n\t}\n\t\nreturn $citas;\n}", "public function getListeTypeContent () \n {\n $db = $this->getModel('db');\n $sql = \"SHOW TABLES LIKE '\" . $this->table_cms_contenu . \"_%'\";\n $stmt = $db->query($sql);\n for (true; $res = $db->fetch_assoc($stmt); true) {\n $liste_type_content[] = $res['Tables_in_' . Clementine::$config['clementine_db']['name'] . ' (' . $this->table_cms_contenu . '_%)']; \n }\n return $liste_type_content;\n }", "public function getForosComentarios(){\n\t\tif($this->get_request_method() != \"GET\") $this->response('', 406);\n\n\t\t//get data sent\n\t\t$ses_id = $_GET['ses_id'];\n\t\t$user = $_GET['user'];\n\t\t$id_tema = $_GET['id_tema'];\n\t\t$regs = $_GET['regs'];\n\t\t$page = $_GET['page'];\n\t\t$inicio = ($page - 1) * $regs;\n\n\t\t// Session validation\n\t\tif ($this->checkSesId($ses_id, $user)){\n\t\t\t// Input validations\n\t\t\tif(trim($user) != ''){\t\t\n\t\t\t\t$foro = new foro();\n\t\t\t\t$filtro_comentarios = \" AND c.id_tema=\".$id_tema.\" AND estado=1 AND id_comentario_id=0\";\n\t\t\t\t$result = $foro->getComentarios($filtro_comentarios.' ORDER BY date_comentario DESC LIMIT '.$inicio.','.$regs); \n\t\t\t\t$this->response($this->json($result), 200);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Sesion incorrecta\");\n\t\t\t$this->response($this->json($error), 400);\t\t\n\t\t}\n\t}", "public static function getAllLogos(){\n $files = array();\n $files[\"nativo\"] = \"Ninguno\";\n $dir = realpath( dirname(__FILE__) . \"/../res/img/logos/\" ) . \"/\";\n foreach( glob($dir.\"*.png\") as $file){\n $file = reset( new ArrayObject( explode(\".\", basename($file) ) ) );\n $files[ $file ] = $file;\n }\n return $files;\n }", "function lista_clientes() {\n\tob_start();\n include_once 'templates/lista_clientes.php';\n\treturn ob_get_clean();\n}", "function LbuscarExamenesLaboratorio($datos) {\n $o_DLaboratorio = new DLaboratorio();\n $resultado = $o_DLaboratorio->DbuscarExamenesLaboratorio($datos);\n foreach ($resultado as $key => $value) {\n array_push($resultado[$key], \"../../../../fastmedical_front/imagen/icono/b_ver_on.gif ^ Puntos Control\");\n }\n return $resultado;\n }", "private function loadContent() {\n\t\t$expression =\n\t\t\t'/sunflower-'. // match only right files\n\t\t\t'(\\d+\\.\\d+\\w?)[\\.-](\\d+)'. // version\n\t\t\t'(?:-(\\d)+)?'. // package build number\n\t\t\t'(?:[\\.-](all|any|noarch|i386|amd64))?(?:\\.([\\w\\d]+))?'. // architecture and os\n\t\t\t'(\\.[\\w\\d\\.]+)/iu'; // extension\n\n\t\t// get files from directory\n\t\t$data = array();\n\t\t$files = scandir($this->file_path);\n\t\tforeach ($files as $file_name) {\n\t\t\t$matched = preg_match($expression, $file_name, $matches) == 1;\n\n\t\t\tif ($matched) {\n\t\t\t\t$build = $matches[2];\n\n\t\t\t\t// create storage array for build number\n\t\t\t\tif (!isset($data[$build]))\n\t\t\t\t\t$data[$build] = array();\n\n\t\t\t\t// treat different extensions differently\n\t\t\t\tswitch($matches[6]) {\n\t\t\t\t\tcase '.tgz.sig':\n\t\t\t\t\tcase '.deb.sig':\n\t\t\t\t\tcase '.rpm.sig':\n\t\t\t\t\t\t$key_name = substr($file_name, 0, strlen($file_name) - 4);\n\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$key_name]))\n\t\t\t\t\t\t\t$data[$build][$key_name] = array();\n\n\t\t\t\t\t\t// store signature to file name\n\t\t\t\t\t\t$data[$build][$key_name]['signature'] = url_GetFromFilePath($this->file_path.'/'.$file_name);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '.tgz.sha256':\n\t\t\t\t\tcase '.deb.sha256':\n\t\t\t\t\tcase '.rpm.sha256':\n\t\t\t\t\t\t$key_name = substr($file_name, 0, strlen($file_name) - 7);\n\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$key_name]))\n\t\t\t\t\t\t\t$data[$build][$key_name] = array();\n\n\t\t\t\t\t\t// store signature to file name\n\t\t\t\t\t\t$data[$build][$key_name]['hash'] = file_get_contents($this->file_path.'/'.$file_name);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// make sure storage array exists\n\t\t\t\t\t\tif (!isset($data[$build][$file_name]))\n\t\t\t\t\t\t\t$data[$build][$file_name] = array();\n\n\t\t\t\t\t\t// get storage array for easier access\n\t\t\t\t\t\t$file_data = $data[$build][$file_name];\n\n\t\t\t\t\t\t// populate parameters\n\t\t\t\t\t\t$file_data['url'] = url_GetFromFilePath($this->file_path.'/'.$file_name);\n\t\t\t\t\t\t$file_data['version'] = $matches[1];\n\t\t\t\t\t\t$file_data['build'] = $matches[2];\n\t\t\t\t\t\t$file_data['package_build'] = $matches[3];\n\t\t\t\t\t\t$file_data['architecture'] = $matches[4];\n\t\t\t\t\t\t$file_data['platform'] = $matches[5];\n\t\t\t\t\t\t$file_data['extension'] = $matches[6];\n\n\t\t\t\t\t\t// store data array back to main array\n\t\t\t\t\t\t$data[$build][$file_name] = $file_data;\n\n\t\t\t\t\t\t// store version to reference list\n\t\t\t\t\t\t$this->version_list[$build] = $matches[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort version list\n\t\tkrsort($this->version_list);\n\n\t\t// store parsed data\n\t\t$this->file_list = $data;\n\t}", "function listado_subtemas_completo_tmp() {\n\n\t\t$query = \"SELECT * FROM subtemas_tmp ORDER BY subtema\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\t\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n}", "function PCODER_ListadoVisualExploracionArchivos($RutaExploracion=\"\",$Filtro_contenido=\"\",$TituloExploracion=\"\",$PermitirDescarga=1)\n {\n global $MULTILANG_TotalRegistros,$MULTILANG_Explorar,$MULTILANG_Filtro,$MULTILANG_Descargar,$MULTILANG_Tipo,$MULTILANG_Fecha,$MULTILANG_Peso;\n //Si la ruta de exploracion es diferente de vacio hace el proceso de busqueda de archivos\n if ($RutaExploracion!=\"\")\n {\n //Inicia Marco de presentacion de archivos\n echo '\n <div class=\"panel panel-default\"> <!-- Clase chat-panel para altura -->\n <div class=\"well well-sm\">\n <span class=\"label label-primary\">'.$TituloExploracion.'</span> '.$MULTILANG_Explorar.' <b>'.$RutaExploracion.'</b> '.$MULTILANG_Filtro.' '.$Filtro_contenido.':\n </div>\n <div class=\"panel-body\">\n <ul class=\"chat\">';\n\n $ConteoElementos=0;\n $TotalTamanoElementos=0;\n \n //Obtiene la lista de archivos\n $ListadoArchivos=PCODER_ListadoExploracionArchivos($RutaExploracion,$Filtro_contenido);\n \n //Recorre el arreglo de archivos encontrados para presentarlo\n $ContenidoDirectorio = opendir($RutaExploracion);\n foreach ($ListadoArchivos as $Archivo)\n {\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<li class=\"left clearfix\">\n\t\t\t\t\t\t\t<span class=\"chat-img pull-left\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-file-archive-o fa-2x fa-fw icon-gray\"></i>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<div class=\"chat-body clearfix\">\n\t\t\t\t\t\t\t\t<div class=\"header\">\n\t\t\t\t\t\t\t\t\t<strong class=\"primary-font\">'.$Archivo[\"Nombre\"].'</strong> \n\t\t\t\t\t\t\t\t\t<small class=\"pull-right text-muted\">';\n\t\t\t\t\t\t\t\t\t\t//Si se debe presentar el boton de descarga lo agrega (por defecto), sino no lo muestra\n\t\t\t\t\t\t\t\t\t\tif($PermitirDescarga==1)\n\t\t\t\t\t\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"'.$Archivo[\"Enlace\"].'\" class=\"btn btn-xs btn-default\"><i class=\"fa fa-download fa-fw\"></i> '.$MULTILANG_Descargar.'</a>\n\t\t\t\t\t\t\t\t\t\t\t\t<br>';\n\n\t\t\t\t\t\t\t\t\t\techo ''.$MULTILANG_Peso.' <span class=\"badge\">'.$Archivo[\"Tamano\"].' Kb</span>\n\t\t\t\t\t\t\t\t\t</small>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<i class=\"icon-gray\">&nbsp;&nbsp;&nbsp;\n\t\t\t\t\t\t\t\t\t'.$MULTILANG_Fecha.': '.$Archivo[\"Fecha\"].'\n\t\t\t\t\t\t\t\t\t('.$MULTILANG_Tipo.' '.$Archivo[\"Tipo\"].')\n\t\t\t\t\t\t\t\t\t</i>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>'; \n\t\t\t\t\t\t$ConteoElementos++;\n\t\t\t\t\t\t$TotalTamanoElementos+=$Archivo[\"Tamano\"];\n }\n\n //Cierra Marco de presentacion de archivos\n echo '\n </ul>\n </div> <!-- /.panel-body -->\n <div class=\"well well-sm\">'.$MULTILANG_TotalRegistros.': <b>'.$ConteoElementos.'</b> '.$MULTILANG_Peso.': <b>'.$TotalTamanoElementos.' Kb</b></div>\n </div> <!-- /.panel .chat-panel -->';\n }\n }", "function ultimas_fichas_software_destacado_limit($inicial,$cantidad) {\n\t\n\t\t\n\t\t$query = \"SELECT software.*, software_descripcion.*, software_informacion_adicional.*, software_objetivo.*, licencias.*\n\t\tFROM software, software_descripcion, software_informacion_adicional, software_objetivo, licencias\n\t\tWHERE software.id_software=software_descripcion.id_software\n\t\tAND software.id_software=software_informacion_adicional.id_software\n\t\tAND software.id_software=software_objetivo.id_software\n\t\tAND software.software_licencia=licencias.id_licencia\n\t\tAND software.software_destacado=1\n\t\tORDER BY RAND()\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public static function pesquisaTodos($request){\n $externa = \"https://www.seminovosbh.com.br/resultadobusca/index/\";\n\n //Filtro veículo\n if($request->veiculo == \"carro\")\n $externa .= \"veiculo/carro/\";\n if($request->veiculo == \"moto\")\n $externa .= \"veiculo/moto/\";\n if($request->veiculo == \"caminhao\")\n $externa .= \"veiculo/caminhao/\";\n \n //Filtro estado de conservação\n if($request->estado_conservacao == \"0km\")\n $externa .= \"estado-conservacao/0km/\";\n if($request->estado_conservacao == \"seminovo\")\n $externa .= \"estado-conservacao/seminovo/\";\n\n //Filtro de marca e modelo\n $externa .= \"marca/\".$request->marca.\"/\";\n $externa .= \"modelo/\".$request->modelo.\"/\";\n\n //Filtro de cidade\n if(isset($request->cidade))\n $externa .= \"cidade/\".$request->cidade.\"/\";\n \n //Filtro de valores\n if(isset($request->valor1) && isset($request->valor2))\n $externa .= \"valor1/\".$request->valor1.\"/valor2/\".$request->valor2.\"/\";\n \n //Filtro de anos\n if(isset($request->ano1) && isset($request->ano2))\n $externa .= \"ano1/\".$request->ano1.\"/ano2/\".$request->ano2.\"/\";\n \n //Filtro de tipo de usuário\n if($request->usuario == \"particular\")\n $externa .= \"usuario/particular/\";\n else if($request->usuario == \"revenda\")\n $externa .= \"usuario/revenda/\";\n else \n $externa .= \"usuario/todos/\";\n \n //Maior quantidade de registros possíveis\n $externa .= \"qtdpag/50/\";\n\n //Escolhe a página\n if(isset($request->pagina))\n $externa .= \"pagina/\".$request->pagina.\"/\";\n \n //Extrai os dados da página e retira deles a lista de carros resultante\n $resultados = file_get_contents($externa);\n $resultados_filtro = explode('<dd class=\"titulo-busca\">', $resultados);\n unset($resultados_filtro[0]);\n\n //Pega a quantidade total de páginas da consulta\n $aux1 = explode('<strong class=\"total\">', $resultados);\n $aux2 = explode('</strong>', $aux1[1]);\n $totalPaginas = $aux2[0];\n\n //Cria o array que será utilizado como retorno e informa na primeira posição qual a quantidade de páginas para o usuário navegar entre os resultados\n $compilado = array();\n $compilado[0] = array(\"totalpaginas\" => $totalPaginas);\n $i = 1;\n\n //Para cada resultado, separa-se o título e o código do anúncio para utilizar no outro endpoint \n foreach($resultados_filtro as $resultado){\n $resto = explode('</dd>', $resultado);\n $linha = $resto[0];\n\n $arrayCodigo = explode('/', $linha);\n $codigo = $arrayCodigo[1].\"/\".$arrayCodigo[2].\"/\".$arrayCodigo[3].\"/\".$arrayCodigo[4].\"/\".$arrayCodigo[5].\"/\";\n\n $aux1 = explode('<h4>', $linha);\n $aux2 = explode('</h4>', $aux1[1]);\n $titulo = strip_tags($aux2[0]);\n\n $compilado[$i] = array(\"codigo\"=> $codigo, \"titulo\" => $titulo);\n $i++;\n }\n\n return response()->json($compilado, 200);\n }", "function compilar_metadatos_generales()\n\t{\n\t\t$this->manejador_interface->titulo(\"Compilando datos generales\");\n\t\ttoba_proyecto_db::set_db( $this->db );\n\t\t$path = $this->get_dir_generales_compilados();\n\t\ttoba_manejador_archivos::crear_arbol_directorios( $path );\n\t\t$this->compilar_metadatos_generales_basicos();\n\t\t$this->compilar_metadatos_generales_grupos_acceso();\n\t\t$this->compilar_metadatos_generales_puntos_control();\n\t\t$this->compilar_metadatos_generales_mensajes();\n\t\t$this->compilar_metadatos_generales_dimensiones();\n\t\t$this->compilar_metadatos_generales_consultas_php();\n\t\t$this->compilar_metadatos_generales_servicios_web();\n\t\t$this->compilar_metadatos_generales_pms();\n\n\t}", "function buscarDocumentos($datos) {\n global $textos, $sql, $configuracion, $sesion_usuarioSesion;\n\n $juego = new Juego();\n $destino = \"/ajax\".$juego->urlBase.\"/searchGames\";\n\n if (empty($datos)) {\n\n $forma2 = HTML::campoOculto(\"datos[criterio]\", \"titulo\");\n $forma2 .= HTML::parrafo($textos->id(\"TITULO\"), \"negrilla margenSuperior\");\n $forma2 .= HTML::parrafo(HTML::campoTexto(\"datos[patron]\", 30, 255).HTML::boton(\"buscar\", $textos->id(\"BUSCAR\")), \"margenSuperior\");\n\n // $codigo1 = HTML::forma($destino, $forma1);\n $codigo1 = HTML::forma($destino, $forma2);\n $codigo = HTML::contenedor($codigo1, \"bloqueBorde\");\n $codigo .= HTML::contenedor(\"\",\"margenSuperior\", \"resultadosBuscarJuegos\");\n\n $respuesta[\"generar\"] = true;\n $respuesta[\"codigo\"] = $codigo;\n $respuesta[\"destino\"] = \"#cuadroDialogo\";\n $respuesta[\"titulo\"] = HTML::contenedor(HTML::frase(HTML::parrafo($textos->id(\"BUSCAR_JUEGOS\"), \"letraNegra negrilla\"), \"bloqueTitulo-IS\"), \"encabezadoBloque-IS\");\n $respuesta[\"ancho\"] = 500;\n $respuesta[\"alto\"] = 400;\n\n } else {\n\n if (!empty($datos[\"criterio\"]) && !empty($datos[\"patron\"])) {\n\n if ($datos[\"criterio\"] == \"titulo\") {\n $palabras = explode(\" \", $datos[\"patron\"]);\n\n foreach ($palabras as $palabra) {\n $listaPalabras[] = trim($palabra);\n }\n }\n\n $tablas = array(\n \"j\" => \"juegos\",\n \"i\" => \"imagenes\"\n );\n\n $columnas = array(\n \"id\" => \"j.id\",\n \"nombre\" => \"j.nombre\",\n \"descripcion\" => \"j.descripcion\", \n \"id_imagen\" => \"j.id_imagen\",\n \"idImagen\" => \"i.id\",\n \"ruta\" => \"i.ruta\"\n );\n $condicion = \"(j.id_imagen = i.id AND j.nombre REGEXP '(\".implode(\"|\", $palabras).\")') OR( j.id_imagen = i.id AND j.descripcion REGEXP '(\".implode(\"|\", $palabras).\")')\";\n \n //$sql->depurar = true;\n $consulta = $sql->seleccionar($tablas, $columnas, $condicion);\n \n $resaltado = HTML::frase($datos['patron'], \"resaltado\");\n $listaJuegos = array();\n \n while ($fila = $sql->filaEnObjeto($consulta)) {\n $imagen = $configuracion[\"SERVIDOR\"][\"media\"].$configuracion[\"RUTAS\"][\"imagenesDinamicas\"].\"/\".$fila->imagen; \n $item = HTML::enlace(HTML::imagen($imagen, \"flotanteIzquierda margenDerecha miniaturaListaUltimos5\"), HTML::urlInterna(\"JUEGOS\", $fila->id)); \n $item3 = HTML::parrafo(HTML::enlace(str_ireplace($palabras, $resaltado, $fila->nombre).\" \".\" \".HTML::imagen($configuracion[\"SERVIDOR\"][\"media\"].$configuracion[\"RUTAS\"][\"imagenesEstilos\"].\"goButton.png\"), HTML::urlInterna(\"JUEGOS\", $fila->id)), \"negrilla\");\n $item3 .= HTML::parrafo( substr($fila->descripcion, 0, 50).\"...\", \" cursiva pequenia\"); \n $item = HTML::contenedor($item3, \"fondoBuscadorBlogs\");//barra del contenedor gris\n $listaJuegos[] = $item;\n\n }\n\n $listaJuegos = HTML::lista($listaJuegos, \"listaVertical listaConIconos bordeSuperiorLista\");\n \n\n $respuesta[\"accion\"] = \"insertar\";\n $respuesta[\"contenido\"] = $listaJuegos;\n $respuesta[\"destino\"] = \"#resultadosBuscarJuegos\";\n\n } else {\n $respuesta[\"error\"] = true;\n $respuesta[\"mensaje\"] = $textos->id(\"ERROR_FALTA_CADENA_BUSQUEDA\");\n }\n\n }\n\n Servidor::enviarJSON($respuesta);\n}", "function organismes()\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t$db = cmsms()->GetDb();\n\t\t$designation = '';\n\t\t$tableau = array('F','Z','L','D');\n\t\t//on instancie la classe servicen\n\t\t$service = new Servicen();\n\t\t$page = \"xml_organisme\";\n\t\tforeach($tableau as $valeur)\n\t\t{\n\t\t\t$var = \"type=\".$valeur;\n\t\t\t//echo $var;\n\t\t\t$scope = $valeur;\n\t\t\t//echo \"la valeur est : \".$valeur;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$designation.= \"service coupé\";\n\t\t\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t\t\t$status = 'Echec';\n\t\t\t\t$action = 'retrieve_ops';\n\t\t\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t///on initialise un compteur général $i\n\t\t\t\t$i=0;\n\t\t\t\t//on initialise un deuxième compteur\n\t\t\t\t$compteur=0;\n\t\t\t//\tvar_dump($xml);\n\n\t\t\t\t\tforeach($xml as $cle =>$tab)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$idorga = (isset($tab->id)?\"$tab->id\":\"\");\n\t\t\t\t\t\t$code = (isset($tab->code)?\"$tab->code\":\"\");\n\t\t\t\t\t\t$libelle = (isset($tab->libelle)?\"$tab->libelle\":\"\");\n\t\t\t\t\t\t// 1- on vérifie si cette épreuve est déjà dans la base\n\t\t\t\t\t\t$query = \"SELECT idorga FROM \".cms_db_prefix().\"module_ping_organismes WHERE idorga = ?\";\n\t\t\t\t\t\t$dbresult = $db->Execute($query, array($idorga));\n\n\t\t\t\t\t\t\tif($dbresult && $dbresult->RecordCount() == 0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_organismes (libelle, idorga, code, scope) VALUES (?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t//echo $query;\n\t\t\t\t\t\t\t\t$compteur++;\n\t\t\t\t\t\t\t\t$dbresultat = $db->Execute($query,array($libelle,$idorga,$code,$scope));\n\n\t\t\t\t\t\t\t\tif(!$dbresultat)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$designation.= $db->ErrorMsg();\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t}// fin du foreach\n\n\t\t\t}\n\t\t\tunset($scope);\n\t\t\tunset($var);\n\t\t\tunset($lien);\n\t\t\tunset($xml);\n\t\t\tsleep(1);\n\t\t}//fin du premier foreach\n\t\t\n\n\t\t$designation.= $compteur.\" organisme(s) récupéré(s)\";\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$status = 'Ok';\n\t\t$action = 'retrieve_ops';\n\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\n\t\t\t\n\t\t\n\t}", "function cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto) {\n if ($this->moneda == 1) {\n $numero = $monto / $this->tipo_cambio;\n $importe_dolares = number_format($numero, 2, '.', '');\n $importe_soles = $monto;\n } elseif ($this->moneda == 2) {\n $importe_soles = $monto * $this->tipo_cambio;\n $importe_dolares = $monto;\n }\n $datos_enviar[] = $this->id_comprobante;\n $datos_enviar[] = \"D\";\n $datos_enviar[] = $id_cuenta;\n $datos_enviar[] = $codigo_cuenta;\n $datos_enviar[] = $tipo;\n $datos_enviar[] = $importe_soles;\n $datos_enviar[] = $importe_dolares;\n $datos_enviar[] = $this->id_anexo;\n $datos_enviar[] = $this->codigo_anexo;\n $datos_enviar[] = $this->id_tipo_comprobante;\n $datos_enviar[] = $this->codigo_tipo_comprobante;\n $datos_enviar[] = $this->nro_comprobante;\n $datos_enviar[] = $this->emision_comprobante;\n $datos_enviar[] = $this->moneda;\n $datos_enviar[] = $this->codigo_moneda;\n $datos_enviar[] = $this->cuenta_costo;\n $datos_enviar[] = $this->nombre_cuenta_costo;\n $datos_enviar[] = $this->detalle_comprobante;\n $datos_enviar[] = $this->serie_comprobante;\n\n return $datos_enviar;\n }", "public function listaMovimientos()\n {\n $conexion = conexion::conectar();\n $sql = \"SELECT * FROM movimientos WHERE compra_venta ='c' order by id_producto asc;\";\n $stmt = $conexion->prepare($sql);\n $stmt->execute();\n $array = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt = null;\n return $array;\n }", "protected function getAllFiles() {\n $sql = \"SELECT * FROM satdatameta\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n $results = $stmt->fetchAll();\n return $results;\n }", "public function read_alltiendas(){\r\n $sql=\"select p.id_proveedor, p.nombre_establecimiento, p.direccion_fisica, p.direccion_web,\r\n p.descripcion_tienda, p.id_usuario\r\n from proveedor p\r\n INNER JOIN usuario u on p.id_usuario = u.id_usuario\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n\r\n }", "public static function traerTodos()\n {\n $query = \"SELECT * FROM posteos ORDER BY idposteo DESC\";\n $db = DBConnection::getConnection();\n $stmt = $db->prepare($query);\n $stmt->execute();\n\n $salida = [];\n\n while($fila = $stmt->fetch()) {\n\n $post = new Posteo();\n\n $post->cargarDatos($fila);\n\n $salida[] = $post;\n }\n\n return $salida;\n }", "function ultimas_fichas_software_limit($inicial,$cantidad) {\n\t\n\t\t\n\t\t$query = \"SELECT software.*, software_descripcion.*, software_informacion_adicional.*, software_objetivo.*, licencias.*\n\t\tFROM software, software_descripcion, software_informacion_adicional, software_objetivo, licencias\n\t\tWHERE software.id_software=software_descripcion.id_software\n\t\tAND software.id_software=software_informacion_adicional.id_software\n\t\tAND software.id_software=software_objetivo.id_software\n\t\tAND software.software_licencia=licencias.id_licencia\n\t\tORDER BY software.fecha_alta desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}" ]
[ "0.66017437", "0.61777204", "0.59924364", "0.5941101", "0.59369826", "0.5894734", "0.58513874", "0.5840232", "0.58258766", "0.58137476", "0.5802826", "0.5693212", "0.56732106", "0.5670481", "0.5668076", "0.56402105", "0.56332386", "0.5630327", "0.5626877", "0.5610573", "0.560908", "0.55897355", "0.5589162", "0.5588811", "0.5588202", "0.55861765", "0.5582089", "0.5561521", "0.55530185", "0.55489105", "0.55364543", "0.5535799", "0.5528727", "0.55241346", "0.55176216", "0.55099916", "0.5498676", "0.54936624", "0.54904425", "0.5487022", "0.5484602", "0.54809797", "0.5477765", "0.5475778", "0.5474606", "0.54739", "0.5466366", "0.5457775", "0.54568654", "0.54498005", "0.5445149", "0.5441347", "0.5440738", "0.5435578", "0.5430677", "0.54276747", "0.5423928", "0.54229045", "0.5420393", "0.5418169", "0.5417674", "0.54123014", "0.54110444", "0.5409982", "0.5408795", "0.5408385", "0.540527", "0.54051584", "0.5403603", "0.54025435", "0.5402486", "0.54007345", "0.539941", "0.53960294", "0.5395014", "0.539043", "0.53864753", "0.5383666", "0.5380294", "0.5380287", "0.53740203", "0.5373585", "0.5371322", "0.5370618", "0.53697", "0.53646475", "0.5359361", "0.53492254", "0.534738", "0.5345868", "0.53448176", "0.5328221", "0.53170484", "0.531658", "0.5314843", "0.5313745", "0.53134394", "0.53130186", "0.5312828", "0.53115994" ]
0.59826434
3
/ Cargar el linkManager de los componentes del sistema
function LM(){ $mod=(isset($_GET['modulo']))?$_GET['modulo']:'index'; $func=(isset($_GET['funcion']))?$_GET['funcion']:$mod; $localreq=__path.'componentes/'.$mod.'/LM.php'; $globalreq='componentes/'.$mod.'/LM.php'; if(file_exists($localreq)){ require($localreq); }else{ if(file_exists($globalreq)){ include_once($globalreq); if(function_exists($func)){ echo json_encode(Encoding::toUTF8($func($res))); }else{ exit(); } }else{ exit(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function maybe_disable_link_manager()\n {\n }", "public function getManagerLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'), 'text' => $this->__('Manager'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_albums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_media'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_previews'), 'text' => $this->__('Previews'), 'class' => 'z-icon-es-displa');\n }\n\t\t//unused yet\n\t\t//if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n // $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager_invitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-displa');\n // }\n \n\t\t\t\n return $links;\n }", "private function load_dependencies() {\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-online-magazine-manager-admin.php';\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-online-magazine-manager-public.php';\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-online-magazine-theme-functions.php';\n\n require_once plugin_dir_path( __FILE__ ) . 'class-online-magazine-loader.php';\n $this->loader = new Online_Magazine_Loader();\n\n // like wpdb we make an instance of Online_Magazine_Manager_Public to make interface available to the users\n global $ommp;\n $ommp = new Online_Magazine_Manager_Public($this->version);\n\n }", "public function load(ObjectManager $manager)\n {\n $contentParent = $manager->find(null, '/cms/content');\n $routeParent = $manager->find(null, '/cms/routes');\n $menuBase = $manager->find(null, '/cms/menu');\n\n $enRoute = new Route();\n $enRoute->setPosition($routeParent, 'en');\n $manager->persist($enRoute);\n $deRoute = new Route();\n $deRoute->setPosition($routeParent, 'de');\n $manager->persist($deRoute);\n\n $enServiceRoute = new Route();\n $enServiceRoute->setPosition($enRoute, 'services');\n $manager->persist($enServiceRoute);\n $deServiceRoute = new Route();\n $deServiceRoute->setPosition($deRoute, 'dienstleistungen');\n $manager->persist($deServiceRoute);\n\n $content = new StaticContent();\n $content->setParentDocument($contentParent);\n $content->setName('symfony-service');\n $manager->persist($content);\n\n\n $content->setTitle('Symfony Service');\n $content->setBody('A page about Symfony service');\n $manager->bindTranslation($content, 'en');\n $contentRoute = new Route();\n $contentRoute->setPosition($enServiceRoute, 'symfony-service');\n $contentRoute->setContent($content);\n $manager->persist($contentRoute);\n\n $content->setTitle('Symfony Dienstleistungen');\n $content->setBody('Eine Seite über Symfony Dienstleistungen');\n $manager->bindTranslation($content, 'de');\n $contentRoute = new Route();\n $contentRoute->setPosition($deServiceRoute, 'symfony-dienstleistungen');\n $contentRoute->setContent($content);\n $manager->persist($contentRoute);\n\n $menu = new Menu();\n $menu->setPosition($menuBase, 'footer');\n $manager->persist($menu);\n\n $menuNode = new MenuNode();\n $menuNode->setParentDocument($menu);\n $menuNode->setContent($content);\n $menuNode->setName('symfony-service');\n $manager->persist($menuNode);\n\n $menuNode->setLabel('Symfony Services');\n $manager->bindTranslation($menuNode, 'en');\n $menuNode->setLabel('Symfony Dienstleistungen');\n $manager->bindTranslation($menuNode, 'de');\n\n $manager->flush();\n }", "protected function getLinkHandlers() {}", "protected function getLinkHandlers() {}", "public function getModuleManager();", "function load(ObjectManager $manager)\n {\n\n\n\n }", "protected function setUpInstanceCoreLinks() {}", "public function getLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n \t\t\t\t 'text' => $this->__(' Info'),\n \t\t\t\t 'class' => 'mediasharex-icon-laptop',\n\t\t\t\t\t\t\t 'links' => $this->getInfoLinks());\n }\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info_docs'),\n \t\t\t\t 'text' => $this->__(' Documentation'),\n \t\t\t\t 'class' => 'mediasharex-icon-cabinet');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'),\n \t\t\t\t 'text' => $this->__(' Settings'),\n \t\t\t\t 'class' => 'mediasharex-icon-cogs',\n\t\t\t\t\t\t\t 'links' => $this->getSettingsLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'),\n \t\t\t\t 'text' => $this->__(' Content manager'),\n \t\t\t\t 'class' => 'mediasharex-icon-folder',\n\t\t\t\t\t\t\t 'links' => $this->getManagerLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'),\n \t\t\t\t 'text' => $this->__(' Sources & Handlers'),\n \t\t\t\t 'class' => 'mediasharex-icon-equalizer',\n\t\t\t\t\t\t\t 'links' => $this->getSandHLinks());\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'media_types'),\n \t\t\t\t 'text' => $this->__(' Media types'),\n \t\t\t\t 'class' => 'mediasharex-icon-star',\n\t\t\t\t\t\t\t 'links' => $this->getMediaTypesLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'),\n \t\t\t\t 'text' => $this->__(' Import'),\n \t\t\t\t 'class' => 'mediasharex-icon-loop',\n\t\t\t\t\t\t\t 'links' => $this->getImportLinks());\n }\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\t\n\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mainsettings'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-config');\n }\n\n\n\n\n\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageitems'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managemediastore'), 'text' => $this->__('Media store'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managehandlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-display');\n }\n\t\t\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managesources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageinvitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-filter');\n }\t\n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t */\t\n \n return $links;\n }", "public function __construct(MenuLinkManagerInterface $link) {\n $this->link = $link;\n }", "public function links_load($settings);", "protected static function link()\n {\n foreach (self::fetch('links') as $file) {\n Bus::need($file);\n }\n }", "protected function registerManager()\r\n\t{\r\n\t\t$this->royalcms->bindShared('storage', function($royalcms)\r\n\t\t{\r\n\t\t\treturn new FilesystemManager($royalcms);\r\n\t\t});\r\n\t}", "protected function addLinks()\n {\n }", "protected function getModule_ManagerService()\n {\n return $this->services['module.manager'] = new \\phpbb\\module\\module_manager(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'}, 'phpbb_modules', './../', 'php');\n }", "private function convertLinks(){\n\t\tif(!isset($this->course['course_links']))\n\t\t\treturn;\n\t\t\n\t\t//Create folder in tmp for links\n mkdir('./tmp/links');\n\t\t$sectionCounter = 0;\n\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Links');\n\n $section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n \n\t\t//First add all general links\n\t\t\n\t\tforeach($this->course['course_links'] as $link_url)\n\t\t{\n\t\t\tif(intval($link_url['category'])==0)\n\t\t\t{\n\t\t\t\t//Create the xml\n\t\t\t\tHelper::createLinkXML($link_url);\t\t\t\t\n\t\n\t\t\t\t//Edit the manifest\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 0);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tforeach($this->course['course_link_categories'] as $cat)\n\t\t{\n\t\t\t//Add the label to the manifest\n\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $cat['name'], 0);\n\n\t\t\t//Add links below the label\n\t\t\tforeach($this->course['course_links'] as $link_url)\n\t\t\t{\n\t\t\t\tif(intval($link_url['category'])==$cat['id'])\n\t\t\t\t{\n\t\t\t\t\t//Create the xml\n\t Helper::createLinkXML($link_url); \n\t\t\t\t\t\n \t\t//Edit the manifest\n\t\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 1);\n \t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t\t\t\n\t\t\n\t}", "public function load(ObjectManager $manager)\n {\n $gal = new Folder();\n $gal->setRel('media');\n $gal->translate('de')->setName('Medien');\n $gal->translate('en')->setName('Media');\n $gal->translate('hu')->setName('Média');\n $gal->setInternal(true);\n $gal->setInternalName('mediaroot');\n $manager->persist($gal);\n $manager->flush();\n $this->addReference('media-folder', $gal);\n\n $subgal = new Folder();\n $subgal->setParent($gal);\n $subgal->setRel('image');\n $subgal->translate('de')->setName('Bilder');\n $subgal->translate('en')->setName('Images');\n $subgal->translate('hu')->setName('Képek');\n $subgal->setInternal(true);\n $subgal->setInternalName('imageroot');\n $manager->persist($subgal);\n $manager->flush();\n $this->addReference('images-folder', $subgal);\n\n $subgal = new Folder();\n $subgal->setParent($gal);\n $subgal->setRel('files');\n $subgal->translate('de')->setName('Dateien');\n $subgal->translate('en')->setName('Files');\n $subgal->translate('hu')->setName('Fájlok');\n $subgal->setInternal(true);\n $subgal->setInternalName('fileroot');\n $manager->persist($subgal);\n $manager->flush();\n $this->addReference('files-folder', $subgal);\n\n $subgal = new Folder();\n $subgal->setParent($gal);\n $subgal->setRel('slideshow');\n $subgal->translate('de')->setName('Folien');\n $subgal->translate('en')->setName('Slides');\n $subgal->translate('hu')->setName('Bemutatók');\n $subgal->setInternal(true);\n $subgal->setInternalName('slideroot');\n $manager->persist($subgal);\n $manager->flush();\n $this->addReference('slides-folder', $subgal);\n\n $subgal = new Folder();\n $subgal->setParent($gal);\n $subgal->setRel('video');\n $subgal->translate('de')->setName('Videos');\n $subgal->translate('en')->setName('Videos');\n $subgal->translate('hu')->setName('Videók');\n $subgal->setInternal(true);\n $subgal->setInternalName('videoroot');\n $manager->persist($subgal);\n $manager->flush();\n $this->addReference('videos-folder', $subgal);\n }", "protected function getObjectManager() {}", "public function getObjectManager() {}", "public function manager();", "function miguel_CModuleManager()\r\n {\r\n $this->miguel_Controller();\r\n $this->setModuleName('moduleManager');\r\n $this->setModelClass('miguel_MModuleManager');\r\n $this->setViewClass('miguel_VModuleManager');\r\n $this->setCacheFlag(false);\r\n }", "function load(ObjectManager $manager)\n {\n }", "function load(ObjectManager $manager)\n {\n }", "protected function getAttachment_ManagerService()\n {\n $a = ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'};\n $b = ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'};\n $c = ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'};\n $d = ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'};\n $e = ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'};\n\n return new \\phpbb\\attachment\\manager(new \\phpbb\\attachment\\delete($a, $b, $c, $d, new \\phpbb\\attachment\\resync($b), './../'), new \\phpbb\\attachment\\resync($b), new \\phpbb\\attachment\\upload(${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, $a, new \\phpbb\\files\\upload($d, ${($_ = isset($this->services['files.factory']) ? $this->services['files.factory'] : ($this->services['files.factory'] = new \\phpbb\\files\\factory($this))) && false ?: '_'}, $e, ${($_ = isset($this->services['php_ini']) ? $this->services['php_ini'] : ($this->services['php_ini'] = new \\bantu\\IniGetWrapper\\IniGetWrapper())) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}), $e, ${($_ = isset($this->services['mimetype.guesser']) ? $this->services['mimetype.guesser'] : $this->getMimetype_GuesserService()) && false ?: '_'}, $c, ${($_ = isset($this->services['plupload']) ? $this->services['plupload'] : $this->getPluploadService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, './../'));\n }", "private static function links()\n {\n $files = ['Link'];\n $folder = static::$root.'Http/Links'.'/';\n\n self::call($files, $folder);\n\n $files = ['LinkKeyNotFoundException'];\n $folder = static::$root.'Http/Links/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "protected function _initAutoLoad(){\n $modulos = new Zend_Application_Module_Autoloader(array(\n 'namespace'=>'',\n 'basePath'=>APPLICATION_PATH.'/modules/default'\n )); \n /* [AUTH] */\n if(Zend_Auth::getInstance()->hasIdentity()){\n \n $id_tipo = Zend_Auth::getInstance()->getStorage()->read()->id_tipo;\n \n if($id_tipo == 1) $nombre_tipo = 'administrador'; \n if($id_tipo == 2) $nombre_tipo = 'basico'; \n \n Zend_Registry::set('id_usuario', Zend_Auth::getInstance()->getStorage()->read()->id_usuario); \n Zend_Registry::set('nombre_usuario', Zend_Auth::getInstance()->getStorage()->read()->nombre_usuario); \n Zend_Registry::set('email_usuario', Zend_Auth::getInstance()->getStorage()->read()->email_usuario); \n Zend_Registry::set('clave_usuario', Zend_Auth::getInstance()->getStorage()->read()->clave_usuario); \n Zend_Registry::set('id_tipo',$id_tipo);\n Zend_Registry::set('rol_acl',$nombre_tipo);\n }else{\n Zend_Registry::set ('rol_acl','visitante'); \n } \n /* [ACL] */\n $this->acl = new Model_Acl();\n $controlador = Zend_Controller_Front::getInstance();\n $controlador->registerPlugin(new Plugin_Acceso($this->acl));\n /* [RETORNO] */\n return $modulos; \n }", "public function getLinks()\n {\n $links = array();\n \n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_READ)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaysysinfo'),\n 'text' => $this->__('Server'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_OVERVIEW)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'displaybrowserinfo'),\n 'text' => $this->__('Client'),\n 'class' => 'z-icon-es-info');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_EDIT)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'backupdb'),\n 'text' => $this->__('Backup'),\n 'class' => 'z-icon-es-export');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'scripts'),\n 'text' => $this->__('Scripts'),\n 'class' => 'z-icon-es-gears');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url('Zfiler', 'admin', 'filer'),\n 'text' => $this->__('Filer'),\n 'class' => 'z-icon-es-folder');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => ModUtil::url($this->name, 'admin', 'modifyconfig'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config');\n }\n if (SecurityUtil::checkPermission('Ztools::', '::', ACCESS_ADMIN)) {\n $links[] = array(\n 'url' => 'https://github.com/nmpetkov/Ztools/wiki',\n 'text' => $this->__('Wiki'),\n 'class' => 'z-icon-es-help');\n }\n\n return $links;\n }", "function genLink () {\n\t\t\t$db_host=\"127.0.0.1\";\n\t\t\t$db_nombre=\"gallery\";\n\t\t\t$db_user=\"gallery\";\n\t\t\t$db_pass=\"gallery\";\n\t\t\t$link=mysql_connect($db_host, $db_user, $db_pass) or die (\"Error conectando a la base de datos.\");\n\t\t\tmysql_select_db($db_nombre ,$link) or die(\"Error seleccionando la base de datos.\");\n\t\t\t$this->link = $link;\n\t\t}", "public function load(ObjectManager $manager)\n {\n\n }", "public function getObjectManager();", "public function getObjectManager();", "public function load(ObjectManager $manager);", "public function load(ObjectManager $manager);", "function load(ObjectManager $manager)\n {\n $setting = $this->container->get('vbee.manager.setting');\n $setting->create('superpanel.item_per_page', 10, 'int');\n $setting->create('blogpanel.item_per_page', 10, 'int');\n $setting->create('blogpanel.filemanager.maxUploadSize', 5, 'int');\n }", "private function dc_load_dependencies() {\n\t\t// admin class and functions\n\t\trequire_once DORANCAFE_PATH . 'includes/dc_class_loader_dorancafe.php';\n\t\t// admin class and functions\n\t\trequire_once DORANCAFE_PATH . 'admin/dc_class_admin_dorancafe.php';\n\t\t// public class and functions\n\t\trequire_once DORANCAFE_PATH . 'public/dc_class_public_dorancafe.php';\n\n\t\t$this->loader = new Dorancafe_Loader();\n\t}", "public function init_component_loaders () {\n\t\t$this->load_active_components( 'bundled' );\n\t\t$this->load_active_components( 'downloadable' );\n\t}", "public function load(ObjectManager $manager)\n {\n $site1 = new Site();\n $site1->setNom('SAINT HERBLAIN');\n\n $site2 = new Site();\n $site2->setNom('VERTOU');\n\n $site3 = new Site();\n $site3->setNom('ANGERS');\n\n $site4 = new Site();\n $site4->setNom('BREST');\n\n $manager->persist($site1);\n $manager->persist($site2);\n $manager->persist($site3);\n $manager->persist($site4);\n\n $manager->flush();\n\n $this->addReference(self::SITE_REFERENCE1, $site1);\n $this->addReference(self::SITE_REFERENCE2, $site2);\n $this->addReference(self::SITE_REFERENCE3, $site3);\n $this->addReference(self::SITE_REFERENCE4, $site4);\n }", "private function load_dependencies() {\n\n\t\t/**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core theme.\n\t\t */\n\t\trequire_once 'class-custom-theme-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public area.\n\t\t */\n\t\trequire_once 'public/class-theme-public.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once 'admin/class-theme-admin.php';\n\n\n\t\t$this->loader = new Wpt_Custom_Theme_Loader();\n\n\t}", "public function initLinks()\n\t{\n\t\tif ($this->collLinks === null) {\n\t\t\t$this->collLinks = array();\n\t\t}\n\t}", "function getAdminLinks()\n {\n }", "public function testComDayCqRewriterLinkcheckerImplLinkInfoStorageImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl';\n\n $crawler = $client->request('POST', $path);\n }", "protected function loadModulesUrl()\n\t{\n\t\t$cacheId = 'modules_urls';\n\t\t$cache=Yii::app()->getComponent('cache');\n\t\tif($cache!==null){\n\t\t\t$rules = $cache->get($cacheId);\n\t\t}\n\n\t\tif(!$rules)\n\t\t{\n\t\t\t$rules = array();\n\t\t\t$dirs = scandir(dirname(__FILE__).'/../modules');\n\n\t\t\t$modules = array();\n\t\t\tforeach ($dirs as $name){\n\t\t\t\tif ($name[0] != '.' && $name<>'admin')\n\t\t\t\t\t$modules[ucfirst($name).'Module'] = 'application.modules.' . $name . '.' . ucfirst($name) . 'Module';\n\t\t\t}\n\n\t\t\tforeach($modules as $name=>$module)\n\t\t\t{\n\t\t\t\tYii::import($module);\n if(method_exists($name, 'rules'))\n {\n\t\t\t\t\t$rules = array_merge(call_user_func($name .'::rules'), $rules);\n }\n\t\t\t}\n\n\t\t\tif($cache!==null){\n\t\t\t\t$cache->set($cacheId, $rules, 3600);\n\t\t\t}\n\t\t}\n\n\t\t$this->rules = array_merge($rules, $this->rules);\n\t}", "public function load(ObjectManager $manager)\n {\n $config = $this->container->get('netbs.fichier.config');\n\n $gc = $config->createGroupeCategorie('unité');\n $gt = $config->createGroupeType();\n\n $gt->setNom('troupe')->setGroupeCategorie($gc)->setAffichageEffectifs(false);\n $manager->persist($gc);\n $manager->persist($gt);\n\n $troupe = $config->createGroupe();\n $troupe->setNom('Les cultivables')->setGroupeType($gt);\n $manager->persist($troupe);\n\n $this->addReference('troupe', $troupe);\n\n $gc = $config->createGroupeCategorie('sous-unité');\n $gt = $config->createGroupeType();\n $gt->setNom('patrouille')->setGroupeCategorie($gc)->setAffichageEffectifs(true);\n\n $manager->persist($gc);\n $manager->persist($gt);\n\n\n $groupe = $config->createGroupe();\n $groupe->setNom('Les betteraves')->setParent($troupe)->setGroupeType($gt);\n $manager->persist($groupe);\n\n $this->addReference('p1', $groupe);\n\n $groupe = $config->createGroupe();\n $groupe->setNom('Les cannes à sucre')->setParent($troupe)->setGroupeType($gt);\n $manager->persist($groupe);\n\n $this->addReference('p2', $groupe);\n $manager->flush();\n }", "public function addLinks()\n {\n if (isset($_GET['page']) == 'bolsista'):\n $css = [\n plugins_url(Path::PLGCSS . 'bootstrap.min.css'),\n plugins_url(Path::PLGCSS . 'custom.css'),\n ];\n\n $js = [\n plugins_url(Path::PLGJS . 'bootstrap.min.js'),\n plugins_url(Path::PLGJS . 'js-view.js')\n ];\n $this->insertCSS($css);\n $this->insertJS($js);\n\n else:\n $css = [\n plugins_url(Path::PLGCSS . 'bootstrap.min.css'),\n plugins_url(Path::PLGCSS . 'custom.css')\n ];\n $js = [\n plugins_url(Path::PLGJS . 'bootstrap.min.js'),\n plugins_url(Path::PLGJS . 'js-view.js')\n ];\n $this->insertCSS($css);\n $this->insertJS($js);\n endif;\n }", "private function load_dependencies() {\n\n\t\t/**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core plugin.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-soisy-pagamento-rateale-loader.php';\n\n /**\n * The class responsible for defining internationalization functionality\n * of the plugin.\n */\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-soisy-pagamento-rateale-i18n.php';\n /**\n * The class responsible for defining settings\n * of the plugin.\n */\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-soisy-pagamento-rateale-gateway-settings.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-soisy-pagamento-rateale-admin.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public-facing\n\t\t * side of the site.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-soisy-pagamento-rateale-public.php';\n\t\t\n\t\t\n\t\t$this->loader = new Soisy_Pagamento_Rateale_Loader();\n\n\t}", "protected function _initAutoload()\n {\n // It is necessary to manually add all of the new components as they are created in the application architecture\n $nameSpaceToPath = array(\n// Example of Game package contained under module\n// 'Model_Game' => 'models/Game'\n );\n\n $autoLoaderResource = $this->getResourceLoader();\n\n /* The Autoloader resource comes with the following mappings to assume subdirectories under the module directory:\n forms/, models/, models/mapper, models/DbTable, plugins/, services/, and views/.\n Create references to the others (in this case, the \"controllers/\" directory since it contains the Abstract */\n $autoLoaderResource\n ->addResourceType('controller', 'controllers', 'Controller');\n\n // now loop through and load the mapper and DbTable for each of the model components\n foreach($nameSpaceToPath as $ns => $path) {\n $autoLoaderResource->addResourceType('mapper',$path.'/mappers',$ns.'_Mapper');\n $autoLoaderResource->addResourceType('DbTable',$path.'/DbTable',$ns.'_DbTable');\n }\n\n return $autoLoaderResource;\n }", "protected function getAvatar_ManagerService()\n {\n return $this->services['avatar.manager'] = new \\phpbb\\avatar\\manager(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['avatar.driver_collection']) ? $this->services['avatar.driver_collection'] : $this->getAvatar_DriverCollectionService()) && false ?: '_'});\n }", "protected function loadResourcesForRegisteredNavigationComponents() {}", "public function load(ObjectManager $manager)\n {\n $assetsDir = '/var/feeds/assets';\n\n if (!is_dir($assetsDir)) {\n $assetsDir = sys_get_temp_dir();\n }\n\n copy('web/images/logo.png', \"$assetsDir/hash.png\");\n }", "public function load(ObjectManager $manager)\n {\n\n $local = new VideoSource();\n $local->setName('local');\n $local->setPath('video/');\n\n $manager->persist($local);\n $manager->flush();\n\n $youtube = new VideoSource();\n $youtube->setName('youtube');\n $youtube->setPath('http://www.youtube.com/embed/');\n\n $manager->persist($youtube);\n $manager->flush();\n\n $this->addReference('local-video', $local);\n $this->addReference('youtube-video', $youtube);\n }", "function mostrar_link(){\n\t\tif (isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM link WHERE id_cat='$id'\";\n\t\t\t$consulta=mysql_query($sql);\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_cat'];\n\t\t\t$this->etiqueta=$resultado['etiqueta_cat'];\n\t\t\t$this->descripcion=$resultado['descripcion_cat'];\n\t\t\t$this->claves=$resultado['claves_cat'];\n\t\t\t$this->tipo=$resultado['tipo_cat'];\n\t\t\t$this->prioridad=$resultado['prioridad_cat'];\n\t\t\t$this->icono=$resultado['icono_cat'];\n\t\t\t$sql=\"SELECT * FROM linkxsub, sublink WHERE link_rel='$id' AND sublink_rel=id_sub ORDER BY prioridad_sub ASC\";\n\t\t\t$consulta=mysql_query($sql);\n\t\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t\t$this->mensaje=\"si\";\n\t\t\t\t$this->listado[] = $resultado;\n\t\t\t}\n\t\t} \n\t}", "private function load_dependencies()\n {\n /**\n * The class responsible for orchestrating the actions and filters of\n * the core plugin.\n */\n require_once plugin_dir_path( dirname( __FILE__ ) ) .\n 'includes/class-myfossil-resources-loader.php';\n\n /**\n * The class responsible for defining internationalization\n * functionality of the plugin.\n */\n require_once plugin_dir_path( dirname( __FILE__ ) ) .\n 'includes/class-myfossil-resources-i18n.php';\n\n /**\n * The class responsible for defining all actions that occur in the\n * Dashboard.\n */\n require_once plugin_dir_path( dirname( __FILE__ ) ) .\n 'admin/class-myfossil-resources-admin.php';\n\n /**\n * The class responsible for defining all actions that occur in the\n * public-facing side of the site.\n */\n require_once plugin_dir_path( dirname( __FILE__ ) ) .\n 'public/class-myfossil-resources-public.php';\n\n $this->loader = new myFOSSIL_Resources_Loader();\n\n }", "function _links_add_base($m)\n {\n }", "protected function getExt_ManagerService()\n {\n return $this->services['ext.manager'] = new \\phpbb\\extension\\manager($this, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, 'phpbb_ext', './../', 'php', ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'});\n }", "public function registerAutoloaders(DiInterface $di = null)\n {\n //$mod = $di->get('modules')->admin;\n //\\Pcan\\mod_LoaderService($di, [$mod->namespace => $mod->dir ]);\n }", "public function getPagesManager() {\n\t\treturn $this->wire('lab_tools');\n\t}", "public function getlinks()\n {\n $links = array();\n\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'main'), 'text' => $this->__('System summary'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 4)), 'text' => $this->__('PHP configuration'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 8)), 'text' => $this->__('PHP modules'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 16)), 'text' => $this->__('Server environment'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'phpinfo', array('info' => 32)), 'text' => $this->__('PHP variables'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'extensions'), 'text' => $this->__('Zikula extensions'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'filesystem'), 'text' => $this->__('Zikula file system'));\n }\n if (SecurityUtil::checkPermission('SysInfo::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url('SysInfo', 'admin', 'ztemp'), 'text' => $this->__('Zikula ztemp directory'));\n }\n\n return $links;\n }", "function load(ObjectManager $manager)\n {\n $design = new Category();\n $design->setName(\"Design\");\n\n $programming = new Category();\n $programming->setName(\"Programming\");\n\n $man = new Category();\n $man->setName(\"Manager\");\n\n $administrator = new Category();\n $administrator->setName(\"Administrator\");\n\n $manager->persist($design);\n $manager->persist($programming);\n $manager->persist($man);\n $manager->persist($administrator);\n\n $manager->flush();\n\n $this->addReference('category-design', $design);\n $this->addReference('category-programming', $programming);\n $this->addReference('category-manager', $manager);\n $this->addReference('category-administrator', $administrator);\n }", "function GhostPool_Addons_Manager() {\n\treturn GhostPool_Addons_Manager::instance();\n}", "private function symlinkModules()\n {\n $filter = function (SplFileInfo $file) {\n return HtaccessAnalyzer::create($file)->grantsAccess();\n };\n\n $this->createSymlinksFromFinder(\n $this->findIn($this->rootDir . '/system/modules')->files()->filter($filter)->name('.htaccess'),\n 'system/modules'\n );\n }", "protected function _initLoadRouter(){\r\n\t}", "public function load(ObjectManager $objectManager)\n {\n }", "public function __construct()\n {\n if (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler'])) {\n foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler'] as $type => $handler) {\n if (!is_object($this->handlers[$type])) {\n $this->handlers[$type] = GeneralUtility::makeInstance($handler);\n }\n }\n }\n }", "public function load(ObjectManager $manager)\n {\n $advert = new Advert();\n $advert->setTitle('Recherche développeur Symfony');\n $advert->setAuthor('Alexandre');\n $advert->setContent(\"Nous recherchons un développeur Symfony débutant sur Lyon. Blabla…\");\n $advert->setUpdatedAt(new \\DateTime('2016-03-12 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('https://symfony.com/images/v5/opengraph/symfony_logo.png?v=4');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Développement web');\n $advert->addCategory($category);\n\n $application1 = new Application();\n $application1->setAuthor('Sophie');\n $application1->setContent(\"J'adore Symfony !\");\n $application1->setAdvert($advert);\n $manager->persist($application1);\n\n /************************* Advert 2 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche développeur PHP');\n $advert->setAuthor('Sophie');\n $advert->setContent(\"Nous recherchons un développeur PHP expert sur Paris.\");\n $advert->setUpdatedAt(new \\DateTime('2016-02-12 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://d3155zmgnpm2ae.cloudfront.net/wp-content/uploads/2014/12/mysql-php-logos.png');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Développement web');\n $advert->addCategory($category);\n\n /************************* Advert 3 ***********************************/\n \n $advert = new Advert();\n $advert->setTitle('Recherche développeur C++');\n $advert->setAuthor('Sophie');\n $advert->setContent(\"Nous recherchons un développeur C++ expert sur Marseille.\");\n $advert->setUpdatedAt(new \\DateTime('2016-02-18 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://buzness.com/wp-content/uploads/2013/11/c++.png');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Développement web');\n $advert->addCategory($category);\n\n /************************* Advert 4 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche développeur Java');\n $advert->setAuthor('Marc');\n $advert->setContent(\"Nous recherchons un développeur Java expert sur Marseille.\");\n $advert->setUpdatedAt(new \\DateTime('2016-01-18 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://blog.d2-si.fr/wp-content/uploads/2015/05/d2si_blog_image__java.jpg');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Développement web');\n $advert->addCategory($category);\n\n /************************* Advert 5 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche développeur HTML & CSS');\n $advert->setAuthor('Marc');\n $advert->setContent(\"Nous recherchons un développeur HTML expert sur Marseille.\");\n $advert->setUpdatedAt(new \\DateTime('2016-01-15 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://nolimitmaroc.com/wp-content/uploads/2014/03/html-css.jpg');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Développement web');\n $advert->addCategory($category);\n\n /************************* Advert 6 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche un graphiste');\n $advert->setAuthor('Marc');\n $advert->setContent(\"Nous recherchons un graphiste débutant sur Paris.\");\n $advert->setUpdatedAt(new \\DateTime('2016-01-19 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://pitus.fr/images/dessin-graphiste.png');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Graphisme');\n $advert->addCategory($category);\n\n /************************* Advert 7 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche un graphiste');\n $advert->setAuthor('Marc');\n $advert->setContent(\"Nous recherchons un graphiste débutant sur Paris.\");\n $advert->setUpdatedAt(new \\DateTime('2016-01-10 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://pitus.fr/images/dessin-graphiste.png');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Graphisme');\n $advert->addCategory($category);\n\n /************************* Advert 8 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche un graphiste');\n $advert->setAuthor('Marc');\n $advert->setContent(\"Nous recherchons un graphiste débutant sur Paris.\");\n $advert->setUpdatedAt(new \\DateTime('2016-01-11 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://pitus.fr/images/dessin-graphiste.png');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Graphisme');\n $advert->addCategory($category);\n\n /************************* Advert 9 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche un graphiste');\n $advert->setAuthor('Marc');\n $advert->setContent(\"Nous recherchons un graphiste débutant sur Paris.\");\n $advert->setUpdatedAt(new \\DateTime('2016-01-12 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://pitus.fr/images/dessin-graphiste.png');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Graphisme');\n $advert->addCategory($category);\n\n /************************* Advert 10 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche un graphiste');\n $advert->setAuthor('Marc');\n $advert->setContent(\"Nous recherchons un graphiste débutant sur Paris.\");\n $advert->setUpdatedAt(new \\DateTime('2016-01-13 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://pitus.fr/images/dessin-graphiste.png');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Graphisme');\n $advert->addCategory($category);\n\n /************************* Advert 11 ***********************************/\n\n $advert = new Advert();\n $advert->setTitle('Recherche un graphiste');\n $advert->setAuthor('Marc');\n $advert->setContent(\"Nous recherchons un graphiste débutant sur Paris.\");\n $advert->setUpdatedAt(new \\DateTime('2016-01-14 12:00:00'));\n // On la persiste\n $manager->persist($advert);\n\n $image = new Image();\n $image->setUrl('http://pitus.fr/images/dessin-graphiste.png');\n $image->setAlt('Job de rêve');\n $advert->setImage($image);\n\n $category = new category('Graphisme');\n $advert->addCategory($category);\n\n // On flush tout ce qu'on vient de créer\n $manager->flush();\n }", "private function load_dependencies() {\n\n\t\t/**\n\t\t * The class responsible for contants\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'lib/class-aps-constants.php';\n\n\t\t/**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core plugin.\n\t\t */\n\t\t/* The class responsible to load all libraries */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining internationalization functionality\n\t\t * of the plugin.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-i18n.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-aps-admin.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public-facing\n\t\t * side of the site.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-aps-public.php';\n\n\t\t/**\n\t\t * The class responsible for loading config fields\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-fields-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the aps gateway\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-gateway-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all ajax actions that occur in the aps gateway\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-ajax.php';\n\n\t\t/**\n\t\t * This class is responsible to all common woocommerce hooks\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-aps-wc-hooks.php';\n\n\t\t$this->loader = new APS_Loader();\n\n\t}", "public function configureObjectManager() {}", "public function configureObjectManager() {}", "function servicio($link)\r\n\t{\r\n\t\t$this->enlace = $link;\r\n\t}", "function admin_preload ()\n\t{\n\t\t$this->CI->admin_navigation->child_link('configuration',65,'phpBB3',site_url('admincp/phpbb'));\n\t}", "public function getLinks()\n {\n $links = array();\n $submenulinks = array();\n\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view'), 'text' => $this->__('Users list'), 'class' => 'z-icon-es-view');\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $pending = ModUtil::apiFunc($this->name, 'registration', 'countAll');\n if ($pending) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'viewRegistrations'), 'text' => $this->__('Pending registrations') . ' ('.DataUtil::formatForDisplay($pending).')', 'class' => 'user-icon-adduser');\n }\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADD)) {\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'newUser'), 'text' => $this->__('Create new user'));\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import users'));\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADMIN)) {\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'exporter'), 'text' => $this->__('Export users'));\n }\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'newUser'), 'text' => $this->__('Create new user'), 'class' => 'z-icon-es-new', 'links' => $submenulinks);\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'search'), 'text' => $this->__('Find users'), 'class' => 'z-icon-es-search');\n }\n if (SecurityUtil::checkPermission('Users::MailUsers', '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mailUsers'), 'text' => $this->__('E-mail users'), 'class' => 'z-icon-es-mail');\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'config'), 'text' => $this->__('Settings'), 'class' => 'z-icon-es-config');\n }\n\n return $links;\n }", "public function getLinkFun() {}", "public function getModelsManager() {}", "public function __construct(){\n\t\t\t$this->genLink();\n\t\t}", "public function testComDayCqWcmDesignimporterParserTaghandlersFactoryLinkTagHandle()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.wcm.designimporter.parser.taghandlers.factory.LinkTagHandlerFactory';\n\n $crawler = $client->request('POST', $path);\n }", "public function getLink() {}", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n // configurer la langue\n $tab = ['admin','formateur','CM','apprenant'];\n\n for ($p=0; $p < count($tab); $p++) { \n $profil = new Profil();\n // profiles\n $profil->setLibelle($tab[$p]);\n if($tab[$p]=='admin'){\n $this->addReference(self::PROFIL_admin,$profil);\n }\n elseif($tab[$p]=='apprenant'){\n $this->addReference(self::PROFIL_apprenant,$profil);\n\n }\n elseif($tab[$p]=='formateur'){\n $this->addReference(self::PROFIL_formateur,$profil);\n\n }\n elseif($tab[$p]=='CM'){\n $this->addReference(self::PROFIL_cm,$profil);\n\n }\n\n // persist\n $manager->persist($profil);\n }\n\n $manager->flush();\n }", "function compilar_componentes()\n\t{\n\t\t$this->manejador_interface->titulo(\"Compilando componentes\");\n\t\tforeach ($this->get_lista_tipo_componentes() as $tipo) {\n\t\t\t$c = 0;\n\t\t\t$this->manejador_interface->mensaje( $tipo, false );\n\t\t\tif ( $tipo == 'toba_item' ) {\n\t\t\t\t$directorio = $this->get_dir_componentes_compilados() . '/item';\n\t\t\t} else {\n\t\t\t\t$directorio = $this->get_dir_componentes_compilados() . '/comp';\n\t\t\t}\n\t\t\ttoba_manejador_archivos::crear_arbol_directorios( $directorio );\n\t\t\tforeach ( $this->get_lista_componentes( $tipo ) as $id_componente) {\n\t\t\t\t$this->compilar_componente( $tipo, $id_componente, $directorio );\n\t\t\t\t$c++;\n\t\t\t}\n\t\t\t$this->manejador_interface->mensaje(\"($c) OK\");\n\t\t}\n\t}", "function mostrar_link(){\n if (isset($_GET['id']) && $_GET['id']!=\"\"){\n $sql='SELECT * FROM link WHERE id_cat = ?';\n\n try{\n $query = $this->connection->prepare($sql);\n $query->bindParam(1, $_GET['id']);\n $query->execute();\n\n if($resultado = $query->fetch()){\n $this->id = $_GET['id'];\n $this->nombre = $resultado['nombre_cat'];\n $this->etiqueta = $resultado['etiqueta_cat'];\n $this->descripcion = $resultado['descripcion_cat'];\n $this->claves = $resultado['claves_cat'];\n $this->tipo = $resultado['tipo_cat'];\n $this->prioridad = $resultado['prioridad_cat'];\n\n $sql='SELECT * FROM linkxsub, sublink WHERE link_rel = ? AND sublink_rel = id_sub ORDER BY prioridad_sub ASC';\n try{\n $query2 = $this->connection->prepare($sql);\n\n $query2->bindParam(1, $_GET['id']);\n $query2->execute();\n\n if ($this->listado = $query2->fetchAll()){\n $this->mensaje = 'si';\n }\n }catch (PDOException $e){\n echo ('Error Code: '.$e);\n }\n $this->connection->Close();\n }\n }catch(PDOException $e){\n echo('Error Code: '.$e->getMessage());\n exit();\n }\n }\n }", "function buscar_links($id){\t\n\t\t$this->asignar_valores();\n\t\t$sql=\"SELECT * FROM linkxsub, sublink WHERE link_rel='$id' AND sublink_rel=id_sub ORDER BY prioridad_sub\";\n\t\t$buscar=mysql_query($sql);\n\t\tunset($this->listado2);\n\t\twhile ($resultado = mysql_fetch_array($buscar)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->listado2[] = $resultado;\n\t\t}\n\t\t\n\t}", "public function load( ObjectManager $manager )\n {\n $this->loadCategories( $manager );\n $manager->flush();\n $this->loadDefaultSoundClips( $manager );\n $manager->flush();\n }", "function manage_banners(){\r\n\r\n\tglobal $cfg;\r\n\t\r\n\tinclude('./include/admin/adm_item.php');\r\n\t\r\n\t$manager = new adm_item();\r\n\t\r\n\t$manager->type =\t\t\t\t'banner';\r\n\t$manager->type_plural =\t\t\t'banners';\r\n\t$manager->url = \t\t\t\t'##pageroot##/?mode=banner';\r\n\t\r\n\t// initialize fields\r\n\t$manager->sql_item_table = \t\t$cfg['t_banner_items'];\t\t\r\n\t$manager->sql_item_id = \t\t'item_id';\t\t\t\r\n\t$manager->sql_item_data = \t\tarray('alt','src');\t\t\t\r\n\t$manager->sql_item_desc = \t\tarray('Display Text','URL');\r\n\r\n\t$manager->sql_item_unique_keys = array(0,1);\r\n\t\r\n\t$manager->sql_item_hidden =\t\tarray();\r\n\t\r\n\t$manager->sql_join_table = \t\t$cfg['t_banner_groups'];\t\t\r\n\t$manager->sql_order_field = \tfalse;\r\n\t\r\n\t$manager->sql_group_table = \t$cfg['t_banners'];\t\t\r\n\t$manager->sql_group_id =\t\t'banner_id';\t\t\t\r\n\t$manager->sql_group_name = \t\t'name';\r\n\r\n\t$manager->do_content_update = \ttrue;\r\n\t\r\n\t// hooks\r\n\t//$manager->item_delete_hook = \t'user_delete';\r\n\t//$manager->remove_hook = \t\t'user_remove';\r\n\t//$manager->edit_item_hook = \t'user_edititem';\r\n\t\r\n\t$manager->custom_functions = \tarray('banner_autofill');\r\n\t$manager->item_html =\t\t\t\r\n\t\"<p><a href=\\\"$manager->url&amp;action=banner_autofill\\\">Autofill banner images from $cfg[img_autofill_dir]/</a></p>\";\r\n\t\r\n\t$manager->ShowItems();\r\n\t\r\n}", "public function load(ObjectManager $manager)\n {\n $repository = $manager->getRepository('Gedmo\\\\Translatable\\\\Entity\\\\Translation');\n\n $attribute = new Attribute();\n $attribute\n ->setName('class')\n ->setValue('slideHomeNews')\n ->setLabel('Slide Home News')\n ->setType(Attribute::TYPE_BLOCK)\n ;\n $manager->persist($attribute);\n\n $sidebar = new Sidebar\\Template\\Block();\n $sidebar->setTranslatableLocale('en');\n $sidebar->setActive(true);\n $sidebar->setSlug('seh-home-news');\n $sidebar->setName('[Blocs News] Home SEH');\n $sidebar->setTemplate('block_newsSeh');\n $manager->persist($sidebar);\n\n\n $block = new TitleDesc();\n $block->setTranslatableLocale('en');\n $block->setActive(true);\n $block->setName('Widget Interview');\n $block->setSlug('widget-interview');\n $block->setTitle('Hoteliers join us');\n $block->setTemplate('title_desc_widget');\n $block->setAction('widget_interview');\n $repository->translate($block, 'title', 'fr', 'Hôteliers rejoignez-nous');\n $manager->persist($block);\n\n $sidebarBlock = new SidebarBlock();\n $sidebarBlock->setBlock($block);\n $sidebarBlock->setSidebar($sidebar);\n $sidebarBlock->setPosition(0);\n $sidebarBlock->setTemplate('title_desc/title_desc_widget');\n\n $sidebar->addBlock($sidebarBlock);\n\n $block = new TitleDesc();\n $block->setTranslatableLocale('en');\n $block->setActive(true);\n $block->setName('Widget News');\n $block->setTitle('News');\n $block->setSlug('widget-news');\n $block->setAction('widget_news');\n $block->setTemplate('title_desc_widget');\n $repository->translate($block, 'title', 'fr', 'Les news');\n $manager->persist($block);\n\n $sidebarBlock = new SidebarBlock();\n $sidebarBlock->setBlock($block);\n $sidebarBlock->setSidebar($sidebar);\n $sidebarBlock->setPosition(1);\n $sidebarBlock->setTemplate('title_desc/title_desc_widget');\n\n $sidebar->addBlock($sidebarBlock);\n\n $manager->flush();\n }", "private function cargar_acceso_nodos($parametros){\r\n // echo $_SESSION[CookIdUsuario];\r\n //print_r($parametros);\r\n if (strlen($parametros[cod_link])>0){\r\n if(!class_exists('mos_acceso')){\r\n import(\"clases.mos_acceso.mos_acceso\");\r\n }\r\n $acceso = new mos_acceso(); \r\n if ($_SESSION[SuperUser]=='S')\r\n unset($parametros[terceros]); \r\n $data_ids_acceso = $acceso->obtenerNodosArbol($_SESSION[CookIdUsuario],$parametros[cod_link],$parametros[modo],$parametros[terceros]);\r\n //print_r($data_ids_acceso);\r\n foreach ($data_ids_acceso as $value) {\r\n $this->id_org_acceso[$value[id]] = $value;\r\n } \r\n }\r\n }", "public function get_links()\n {\n }", "public function getSharedManager();", "protected function addAdminServices()\n {\n $this->container->SefLinks = function ($container) {\n return new SefLinks($container);\n };\n }", "protected function _initAutoload(){\n\t $autoLoader = Zend_Loader_Autoloader::getInstance();\n\t $autoLoader->registerNamespace('CMS_');\n\t $resourceLoader = new Zend_Loader_Autoloader_Resource(\n\t \tarray(\n\t\t\t 'basePath' => APPLICATION_PATH,\n\t\t\t 'namespace' => '',\n\t\t\t 'resourceTypes' => array(\n\t\t\t \t'form' => array(\n\t\t\t\t \t'path' => 'forms/',\n\t\t\t\t \t'namespace' => 'Form_',\n\t\t\t\t ),\n\t \t\t\t\n\t \t\t),\n\t \t)\n\t );\n\t // Return it so that it can be stored b the bootstrap\n\t return $autoLoader;\n\t }", "function components_rebuildcache()\n\t{\n\t\t$this->ipsclass->cache['components'] = array();\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'components',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'com_enabled=1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'com_position ASC' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->cache['components'][] = $r;\n\t\t}\n\n\t\t$this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) );\n\t}", "public function load(ObjectManager $manager)\n {\n $content1 = new Content();\n $content1->setName(\"Test_Content_1\");\n $content1->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content1->setOrdinance(1);\n $manager->persist($content1);\n\n $content2 = new Content();\n $content2->setName(\"Test_Content_2\");\n $content2->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content2->setOrdinance(2);\n $manager->persist($content2);\n\n $content3 = new Content();\n $content3->setName(\"Test_Content_3\");\n $content3->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content3->setOrdinance(3);\n $manager->persist($content3);\n\n $content4 = new Content();\n $content4->setName(\"Test_Content_4\");\n $content4->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content4->setOrdinance(4);\n $manager->persist($content4);\n\n $content5 = new Content();\n $content5->setName(\"Test_Content_5\");\n $content5->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content5->setOrdinance(5);\n $manager->persist($content5);\n\n $manager->flush();\n }", "protected function initializeObjectManager() {}", "private function load_dependencies() {\n\n\t\t$this->loader = new Service_Tracker_Loader();\n\n\t}", "protected function _resolve()\n\t{\n\t\t$this->_content = new HTML_Div('magic_urls_id', 'magic_urls_class');\n\t\t$this->_content->add(new HTML_Text(\"url = $this->url\"));\n\t}", "private function configureObjectManager()\n {\n $frameworkSetup = $this->configurationManager\n ->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\n if (!is_array($frameworkSetup['objects'])) {\n return;\n }\n $objectContainer = GeneralUtility::makeInstance(Container::class);\n foreach ($frameworkSetup['objects'] as $classNameWithDot => $classConfiguration) {\n if (isset($classConfiguration['className'])) {\n $originalClassName = rtrim($classNameWithDot, '.');\n $objectContainer->registerImplementation($originalClassName, $classConfiguration['className']);\n }\n }\n }", "function load($manager)\n {\n $feature1 = new Feature();\n $feature1->setType('size');\n $feature1->setName('20x20');\n $feature1->setSearchTerm('size');\n\n $feature2 = new Feature();\n $feature2->setType('weight');\n $feature2->setName('31');\n $feature2->setSearchTerm('weight');\n\n $feature3 = new Feature();\n $feature3->setType('pages');\n $feature3->setName('230');\n $feature3->setSearchTerm('pages');\n\n $o_gr = new OptionGroup();\n $o_gr->setName(\"color\");\n $o_gr->setRequired(1);\n $o_gr->setDisplay('my');\n\n\n $opt = new Option();\n $opt->setType('color');\n $opt->setValue('white');\n\n $opt2 = new Option();\n $opt2->setType('color');\n $opt2->setValue('green');\n\n\n $o_gr->addOption($opt);\n $o_gr->addOption($opt2);\n\n /** @var $pm \\Jeka\\ShopBundle\\Document\\ProductManager */\n $pm = $this->container->get('vespolina.product_manager');\n\n $prod = $pm->createProduct();\n $prod->setPrice(110.2);\n $prod->setName('Test product');\n $prod->setDescription('Test product\\'s description');\n $prod->addCategories($this->getReference('cat_1_1_1'));\n $prod->addImages($this->getReference('image_1'));\n $prod->addImages($this->getReference('image_2'));\n $prod->addImages($this->getReference('image_3'));\n $prod->setSlug('test-product');\n $prod->setType(Product::PHYSICAL);\n\n $prod->addOptionGroup($o_gr);\n\n $prod->addFeature($feature1);\n $prod->addFeature($feature2);\n $prod->addFeature($feature3);\n\n $manager->persist($prod);\n\n $feature1->setName('23x10');\n $feature2->setName('9');\n $feature3->setName('114');\n\n $prod1 = $pm->createProduct();\n $prod1->setPrice(55.99);\n $prod1->setName('Бутылка пива');\n $prod1->setSlug('butilka-piva');\n\n $prod1->setDescription('Описание товара');\n $prod1->addCategories($this->getReference('cat_1_1_1'));\n $prod1->addImages($this->getReference('image_2'));\n $prod1->addImages($this->getReference('image_3'));\n $prod1->addImages($this->getReference('image_4'));\n $prod1->setType(Product::PHYSICAL);\n// $prod1->addFeature($feature1);\n// $prod1->addFeature($feature2);\n// $prod1->addFeature($feature3);\n\n $manager->persist($prod1);\n\n\n $feature1->setName('30x50');\n $feature2->setName('19');\n $feature3->setName('184');\n\n $prod2 = $pm->createProduct();\n $prod2->setPrice(1250);\n $prod2->setName('Фотоальбом');\n $prod2->setSlug('fotoalbom');\n $prod2->setDescription('Описание товара2');\n $prod2->addCategories($this->getReference('cat_1_1_1'));\n $prod2->addCategories($this->getReference('cat_1_1_2'));\n $prod2->addImages($this->getReference('image_3'));\n $prod2->addImages($this->getReference('image_4'));\n $prod2->addImages($this->getReference('image_5'));\n $prod2->setType(Product::PHYSICAL);\n\n// $prod2->addFeature($feature1);\n// $prod2->addFeature($feature2);\n// $prod2->addFeature($feature3);\n\n $manager->persist($prod2);\n\n\n $prod3 = $pm->createProduct();\n $prod3->setName('Доставка курьером');\n $prod3->setSlug('courier-delivery');\n $prod3->setType(Product::SERVICE|Product::UNIQUE);\n $prod3->setPrice('200');\n $prod3->addCategories($this->getReference('cat_1_2'));\n// $prod->addImages($this->getReference('image_5'));\n// $prod->addImages($this->getReference('image_6'));\n// $prod->addImages($this->getReference('image_7'));\n $manager->persist($prod3);\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n\n $parent = new Parents();\n $parent->setPrenom(\"Soiei\");\n $parent->setNom(\"SIe\");\n $parent->setEmail(\"SIseos\");\n $parent->setAdr(\"SOskaoisa\");\n $parent->setMethodeContact(\"OISoeie\");\n $parent->setTel(\"S0Keiosk\");\n $parent->setResponsable(\"OSkes\");\n\n $parents=new ArrayCollection();\n $parents->add($parent);\n\n // create 20 products! Bam!\n for ($i = 0; $i < 3; $i++) {\n $eleve = new Eleve();\n $parent->setEleve($eleve);\n\n $eleve->setNom('NomEns '.$i);\n $eleve->setPrenom('PrenomEns '.$i);\n $eleve->setUsername('setUsername '.$i);\n $eleve->setPassword('setPassword '.$i);\n $eleve->setEmail('setEmail '.$i);\n $eleve->setAdresse('setAdresse '.$i);\n $eleve->setRoles(['ROLE_ELEVE']);\n $eleve->setImageName(\"tester.jpg\");\n $eleve->setDateNaissance(new \\DateTime());\n $eleve->setTelephone(\"2205826\".$i);\n $eleve->setSex(\"H\");\n $eleve->addParent($parent);\n\n\n $manager->persist($eleve);\n $this->addReference('eleve'.$i, $eleve);\n\n }\n\n $manager->flush();\n }", "public function absorb(LinkManager $ls){\n\t\tforeach($ls->list as $k => $v)\n\t\t\t$this->add($k, $v);\n\t}", "private function load_dependencies() {\n\n\t\t$this->loader = new Loader();\n\t\t$TSB_hooks_loader = new Init_Functions();\n\t\t$this->loader->add_action( 'init', $TSB_hooks_loader, 'app_output_buffer' );\n\n//\t\t$this->loader->add_action( 'init', \t$TSB_hooks_loader, 'remove_admin_bar' );\n\n\t}", "public function getSocialShareLinkManager() {\n if (empty($this->socialShareLinkManager)) {\n $this->socialShareLinkManager = \\Drupal::service('social_share.link_manager');\n }\n\n return $this->socialShareLinkManager;\n }", "function buscar_links($id){\n $this->asignar_valores();\n $sql=\"SELECT * FROM linkxsub, sublink WHERE link_rel='$id' AND sublink_rel=id_sub ORDER BY prioridad_sub\";\n $buscar=mysql_query($sql);\n unset($this->listado2);\n while ($resultado = mysql_fetch_array($buscar)){\n $this->mensaje=\"si\";\n $this->listado2[] = $resultado;\n }\n\n }", "private function findAndLinkDependencies (TypeRegistry $typeRegistry, Component $component) : void\n {\n try\n {\n $source = $this->twig->getLoader()->getSourceContext($component->getTemplatePath());\n $tokenStream = $this->twig->tokenize($source);\n $module = $this->twig->parse($tokenStream);\n\n\n $this->visitor->reset();\n $this->traverser->traverse($module);\n $usages = $this->visitor->getUsages();\n\n foreach ($usages as $type => $names)\n {\n foreach ($names as $name)\n {\n $dependency = $typeRegistry->getComponent($type, $name);\n $component->addDependency($dependency);\n $dependency->addUsage($component);\n }\n }\n }\n catch (Error $e)\n {\n $component->setError(new CompilationError($e));\n }\n catch (ComponentNotFoundException $e)\n {\n $component->setError(new GluggiError(\"Invalid import: {$e->getMessage()}\"));\n }\n }" ]
[ "0.5935237", "0.59285134", "0.59028524", "0.5693557", "0.55867624", "0.55867624", "0.5578843", "0.5577812", "0.5560919", "0.55029273", "0.54935783", "0.5478747", "0.54342324", "0.5432871", "0.5398975", "0.5395888", "0.53832924", "0.5376758", "0.5374401", "0.53715265", "0.5306373", "0.529722", "0.5286687", "0.5286687", "0.5284079", "0.52755696", "0.52480966", "0.5233762", "0.521895", "0.52150774", "0.5193185", "0.5193185", "0.5172169", "0.5172169", "0.5158529", "0.51475495", "0.51176596", "0.50990164", "0.50883967", "0.5073925", "0.5069504", "0.50466764", "0.50337684", "0.5014383", "0.5007683", "0.497341", "0.49733198", "0.49636537", "0.4962658", "0.49546188", "0.49301338", "0.4916058", "0.4903926", "0.48967338", "0.48952994", "0.4895233", "0.4894524", "0.489009", "0.48875913", "0.48856562", "0.48856413", "0.48838705", "0.48801625", "0.4880104", "0.48766944", "0.48759758", "0.48744893", "0.4874086", "0.48734114", "0.48661652", "0.48632592", "0.4855928", "0.48531532", "0.48519343", "0.484779", "0.4846731", "0.4839944", "0.48360196", "0.48305216", "0.48264682", "0.48263204", "0.48216596", "0.48185766", "0.4816422", "0.48112175", "0.48067448", "0.48055437", "0.48029205", "0.48025176", "0.48015863", "0.47983646", "0.47944796", "0.479418", "0.47862506", "0.47782558", "0.47758466", "0.4773322", "0.47657183", "0.4762373", "0.4761515", "0.47584584" ]
0.0
-1
/ obtiene las direcciones ip de los visitantes
function getUserIP(){ $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forward; } else { $ip = $remote; } return $ip; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function obtenerDireccionIP() {\n if (isset($_SERVER[\"HTTP_CLIENT_IP\"])) {\n return $_SERVER[\"HTTP_CLIENT_IP\"];\n } elseif (isset($_SERVER[\"HTTP_X_FORWARDED_FOR\"])) {\n return $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n } elseif (isset($_SERVER[\"HTTP_X_FORWARDED\"])) {\n return $_SERVER[\"HTTP_X_FORWARDED\"];\n } elseif (isset($_SERVER[\"HTTP_FORWARDED_FOR\"])) {\n return $_SERVER[\"HTTP_FORWARDED_FOR\"];\n } elseif (isset($_SERVER[\"HTTP_FORWARDED\"])) {\n return $_SERVER[\"HTTP_FORWARDED\"];\n } else {\n return $_SERVER[\"REMOTE_ADDR\"];\n }\n }", "public function ObtenerIp()\n { \n\n return str_replace(\".\",\"\",$this->getIP()); //Funcion que quita los puntos de la IP\n\n }", "function getIPs() {\r\n $ip = $_SERVER[\"REMOTE_ADDR\"];\r\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n \t$ip .= '_'.$_SERVER['HTTP_X_FORWARDED_FOR'];\r\n }\r\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\r\n \t$ip .= '_'.$_SERVER['HTTP_CLIENT_IP'];\r\n }\r\n return $ip;\r\n}", "function iploc($ip){\n\t\t/* preg_match(\"/<li>Country : (.*?) <img/\",$html,$data); */\n\t\t$d['pais'] = \"nada\";\n\t\t/* preg_match(\"/<li>State\\/Province : (.*?)<\\/li>/\",$html,$data); */\n\t\t$d['estado'] = \"nada\";\n\t\t/* preg_match(\"/<li>City : (.*?)<\\/li>/\",$html,$data); */\n\t\t$d['ciudad'] = \"nada\";\n\t\treturn ($d);\n\t}", "private function getIp()\n\t {\n\t \n\t if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&( $_SERVER['HTTP_X_FORWARDED_FOR'] != '' ))\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t \n\t // los proxys van añadiendo al final de esta cabecera\n\t // las direcciones ip que van \"ocultando\". Para localizar la ip real\n\t // del usuario se comienza a mirar por el principio hasta encontrar\n\t // una dirección ip que no sea del rango privado. En caso de no\n\t // encontrarse ninguna se toma como valor el REMOTE_ADDR\n\t \n\t $entries = split('[, ]', $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t \n\t reset($entries);\n\t while (list(, $entry) = each($entries))\n\t {\n\t $entry = trim($entry);\n\t if ( preg_match(\"/^([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)/\", $entry, $ip_list) )\n\t {\n\t // http://www.faqs.org/rfcs/rfc1918.html\n\t $private_ip = array(\n\t '/^0\\./',\n\t '/^127\\.0\\.0\\.1/',\n\t '/^192\\.168\\..*/',\n\t '/^172\\.((1[6-9])|(2[0-9])|(3[0-1]))\\..*/',\n\t '/^10\\..*/');\n\t \n\t $found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);\n\t \n\t if ($client_ip != $found_ip)\n\t {\n\t $client_ip = $found_ip;\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t else\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t }\n\t \n\t return $client_ip;\n\t \n\t}", "public function getVisitorIP(){\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t$proxy = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\n\t\tif(preg_match(\"/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/\",$proxy))\n\t\t $ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\n\t\t//return '127.0.0.1';\n\t\treturn $ip;\n\t}", "abstract public function getIpLocation($ip);", "function getVisitorIP() {\n $ip = \"0.0.0.0\";\n if( ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) && ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) ) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif( ( isset( $_SERVER['HTTP_CLIENT_IP'])) && (!empty($_SERVER['HTTP_CLIENT_IP'] ) ) ) {\n $ip = explode(\".\",$_SERVER['HTTP_CLIENT_IP']);\n $ip = $ip[3].\".\".$ip[2].\".\".$ip[1].\".\".$ip[0];\n } elseif((!isset( $_SERVER['HTTP_X_FORWARDED_FOR'])) || (empty($_SERVER['HTTP_X_FORWARDED_FOR']))) {\n if ((!isset( $_SERVER['HTTP_CLIENT_IP'])) && (empty($_SERVER['HTTP_CLIENT_IP']))) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n }\n return $ip;\n}", "function getVisitorIP()\r\n {\r\n $ip_regexp = \"/^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})/\"; \r\n\r\n //Retrieve IP address from which the user is viewing the current page \r\n if (isset ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"]) && !empty ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"]))\r\n { \r\n $visitorIP = (!empty ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"])) ? $HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"] : ((!empty ($HTTP_ENV_VARS['HTTP_X_FORWARDED_FOR'])) ? $HTTP_ENV_VARS['HTTP_X_FORWARDED_FOR'] : @ getenv ('HTTP_X_FORWARDED_FOR')); \r\n } \r\n else\r\n { \r\n $visitorIP = (!empty ($HTTP_SERVER_VARS['REMOTE_ADDR'])) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ((!empty ($HTTP_ENV_VARS['REMOTE_ADDR'])) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : @ getenv ('REMOTE_ADDR')); \r\n } \r\n\r\n return $visitorIP; \r\n }", "function ip_visiteur() {\n\tif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\telseif(isset($_SERVER['HTTP_CLIENT_IP']))\n\t{\n\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t}\n\telse\n\t{\n\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t}\n\treturn $ip;\n}", "public function ip()\n {\n $serverAll = parent::server();\n\n // source: https://stackoverflow.com/a/41769505\n foreach (['HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'] as $key) {\n if (array_key_exists($key, $serverAll) === true) {\n foreach (explode(',', $serverAll[$key]) as $ip) {\n $ip = trim($ip); // just to be safe\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n\n return parent::ip();\n }", "private function _getVisitorIP() {\n $rVal = \"\";\n\n if ( isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"]) ) {\n $rVal = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n } else {\n if (getenv('HTTP_X_FORWARDED_FOR')) {\n $rVal = getenv('HTTP_X_FORWARDED_FOR');\n } else {\n $rVal = getenv('REMOTE_ADDR');\n }\n }\n\n // Return the IPv4 Address\n return NoNull($rVal);\n }", "function getLocationInfoByIp() {\n\t\t$client = @$_SERVER['HTTP_CLIENT_IP'];\n\t\t$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t$remote = @$_SERVER['REMOTE_ADDR'];\n\t\t$result = array('country'=>'', 'city'=>'');\n\t\tif(filter_var($client, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $client;\n\t\t}elseif(filter_var($forward, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $forward;\n\t\t}else{\n\t\t\t$ip = $remote;\n\t\t}\n\t\t$ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\n\t\tif($ip_data && $ip_data->geoplugin_countryName != null){\n\t\t\t$result['country'] = $ip_data->geoplugin_countryName;\n\t\t\t$result['city'] = $ip_data->geoplugin_city;\n\t\t\t$result['ip'] = $remote;\n\t\t}\n\t\treturn $result;\n }", "function forwarded_ip() {\n\n $server=array(\n 'HTTP_X_FORWARDED_FOR'=>'123.123.123.123.',\n );\n\n\n $keys = array(\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'HTTP_CLIENT_IP',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n );\n\n foreach($keys as $key) {\n if(isset($server[$key])) {\n $ip_array = explode(',', $server[$key]);\n foreach($ip_array as $ip) {\n $ip = trim($ip);\n if(validateIp($ip)){\n return $ip;\n }\n\n }\n }\n }\n return '';\n }", "public function getDeviceIP();", "function mswIPAddresses() {\n $ip = array();\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip[] = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'],',')!==FALSE) {\n $split = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($split AS $value) {\n $ip[] = $value;\n }\n } else {\n $ip[] = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n } else {\n $ip[] = (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '');\n }\n return (!empty($ip) ? implode(', ',$ip) : '');\n}", "function getIpAddress()\n {\n foreach ([\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'\n ] as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n $ip = trim($ip);\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "function get_ip() {\n $ip = '127.0.0.1';\n $ipServerVars = array(\n 'REMOTE_ADDR',\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED'\n );\n $globals = & class_loader('GlobalVar', 'classes');\n foreach ($ipServerVars as $var) {\n if ($globals->server($var)) {\n $ip = $globals->server($var);\n break;\n }\n }\n // Strip any secondary IP etc from the IP address\n if (strpos($ip, ',') > 0) {\n $ip = substr($ip, 0, strpos($ip, ','));\n }\n return $ip;\n }", "protected function buscarIp()\n {\n $ip = '';\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_X_FORWARDED'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED'];\n } elseif (isset($_SERVER['HTTP_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_FORWARDED'])) {\n $ip = $_SERVER['HTTP_FORWARDED'];\n } elseif (isset($_SERVER['REMOTE_ADDR'])) {\n $ip = $_SERVER['REMOTE_ADDR'];\n } else {\n $ip = 'DESCONHECIDO';\n }\n\n return $ip;\n }", "public function ipAddress(){\n return $this->getServerVar('REMOTE_ADDR');\n }", "function get_ip_address()\n{\n $ip = $_SERVER['REMOTE_ADDR'];\n return $_SERVER['REMOTE_ADDR'];\n //return var_export(unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip)));\n}", "public function getIPAddress(): string;", "public function getIpAdress(){\n return $this->auth['ip_adress'];\n }", "public static function ip_info()\r\n {\r\n\r\n $a = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.self::get_client_ip()));\r\n \r\n $a = Input::filter_text($a);\r\n \r\n return $a;\r\n \r\n }", "function getIp()\n{\n $ip = false;\n\n if(!empty($_SERVER['HTTP_CLIENT_IP']))\n {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n {\n $ips = explode(\",\", \n $_SERVER['HTTP_X_FORWARDED_FOR']);\n for ($i = 0; $i < count($ips); $i++)\n {\n $ips = trim($ips[$i]);\n if (!eregi(\"^(10|172\\.16|192\\.168)\\.\", \n $ips[$i]))\n {\n $ip = $ips[$i];\n break;\n }\n }\n }\n elseif (!empty($_SERVER['HTTP_VIA']))\n {\n $ips = explode(\",\", \n $_SERVER['HTTP_VIA']);\n for ($i = 0; $i < count($ips); $i++)\n {\n $ips = trim($ips[$i]);\n if (!eregi(\"^(10|172\\.16|192\\.168)\\.\", \n $ips[$i]))\n {\n $ip = $ips[$i];\n break;\n }\n }\n }\n elseif (!empty($_SERVER['REMOTE_ADDR']))\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n if (($longip = ip2long($ip)) !== false)\n {\n if ($ip == long2ip($longip))\n {\n return $ip;\n }\n }\n \n return false;\n}", "private function _getProxyIpAddress() {\n static $forwarded = [\n 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED',\n ];\n $flags = FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE;\n foreach ($forwarded as $key) {\n if (!array_key_exists($key, $_SERVER)) {\n continue;\n }\n sscanf($_SERVER[$key], '%[^,]', $ip);\n if (filter_var($ip, FILTER_VALIDATE_IP, $flags) !== FALSE) {\n return $ip;\n }\n }\n return '';\n }", "public function getRemoteIp();", "function forwarded_ip(){\n\n // for testing \n $server = array(\n // 'HTTP_X_FORWARDED_FOR'=> \"0.0.0.0,1sd.1.2.3\",\n // 'HTTP_X_FORWARDED' => \"jlaldjfl,99adf,123.123.123.123,1.2.4.4\",\n \n );\n\n $keys = array(\n 'HTTP_X_FORWARDED_FOR', \n 'HTTP_X_FORWARDED', \n 'HTTP_FORWARDED_FOR', \n 'HTTP_FORWARDED',\n 'HTTP_CLIENT_IP', \n 'HTTP_X_CLUSTER_CLIENT_IP',\n );\n\n foreach($keys as $key){\n if(isset($_SERVER[$key])){\n $ip_array = explode(\",\",$_SERVER[$key]);\n\n foreach($ip_array as $ip){\n $ip = trim($ip);\n if(validate_ip($ip)){\n return $ip;\n }\n }\n }\n }\n\n return \"\";\n\n}", "function VisitorIP() { \n\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t$TheIp=$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t} else { $TheIp=$_SERVER['REMOTE_ADDR']; }\t\t\n\t\treturn trim($TheIp);\n }", "function getIP(){\r\n$ip = $_SERVER['REMOTE_ADDR'];\r\n\t//lay IP neu user truy cap qua Proxy\r\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n } else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n }\r\nreturn $ip;\r\n}", "function get_client_ip_2() {\r\n $ipaddress = '';\r\n if (isset($_SERVER['HTTP_CLIENT_IP']))\r\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\r\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\r\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\r\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\r\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\r\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\r\n else if(isset($_SERVER['HTTP_FORWARDED']))\r\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\r\n else if(isset($_SERVER['REMOTE_ADDR']))\r\n $ipaddress = $_SERVER['REMOTE_ADDR'];\r\n else\r\n $ipaddress = 'IP tidak dikenali';\r\n return $ipaddress;\r\n}", "private function getUserIP()\n\t\t\t{\n\t\t\t\tif (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\t\t\t\t\tif (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') > 0):\n\t\t\t\t\t\t\t\t$addr = explode(\",\",$_SERVER['HTTP_X_FORWARDED_FOR']);\n\t\t\t\t\t\t\t\treturn trim($addr[0]);\n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t\t\t\tendif;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn $_SERVER['REMOTE_ADDR'];\n\t\t\t\t}", "function getRemoteAddr()\n{\n\tif (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND $_SERVER['HTTP_X_FORWARDED_FOR'] AND (!isset($_SERVER['REMOTE_ADDR']) OR preg_match('/^127\\..*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^172\\.16.*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^192\\.168\\.*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^10\\..*/i', trim($_SERVER['REMOTE_ADDR']))))\n\t{\n\t\tif (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ','))\n\t\t{\n\t\t\t$ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t\t\treturn $ips[0];\n\t\t}\n\t\telse\n\t\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\treturn $_SERVER['REMOTE_ADDR'];\n}", "public function getIpAddress();", "public static function getRemoteAddr() {\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND $_SERVER['HTTP_X_FORWARDED_FOR'] AND ( !isset($_SERVER['REMOTE_ADDR']) OR preg_match('/^127\\..*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^172\\.16.*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^192\\.168\\.*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^10\\..*/i', trim($_SERVER['REMOTE_ADDR'])))) {\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')) {\n $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n return $ips[0];\n } else\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n return $_SERVER['REMOTE_ADDR'];\n }", "function get_ip_address() {\n // check for shared internet/ISP IP\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if ($this->validate_ip($ip))\n return $ip;\n }\n } else {\n if ($this->validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "public function find_users_ip(){\n\t\tif ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {\n\t\t\t//check ip from share internet\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\t} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {\n\t\t\t//to check ip is pass from proxy\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t} else {\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\treturn $ip;\n\t}", "protected function resolveIp(): string\n {\n return Request::ip();\n }", "private static function resolveClientIp(): string{\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "public function allIpAction() {\n\n $url = \"156.17.231.34\";\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_exec($ch);\n $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n if ($retcode >= 100 && $retcode <= 505) {\n //echo \"work \" . $retcode . \"<br/>\";\n } else {\n // echo \"nie dziala \" . $retcode . \"<br/>\";\n }\n }", "function eventoni_get_visitor_ip()\n{\n\treturn $_SERVER['REMOTE_ADDR'];\n}", "function get_ip(){?\r\r\t$do_check = 1;\r\r\t$addrs = array();\r\r\r\r\tif( $do_check )\r\r\t{\r\r\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\r\t\t foreach( array_reverse(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])) as $x_f )\r\r \t\t{\r\r \t\t\t$x_f = trim($x_f);\r\r \t\t\tif( preg_match('/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/', $x_f) )\r\r \t\t\t{\r\r \t\t\t\t$addrs[] = $x_f;\r\r \t\t\t}\r\r \t\t}\r\r\t\t}\r\r \r\r\r\r\t\tif(isset($_SERVER['HTTP_CLIENT_IP'])) $addrs[] = $_SERVER['HTTP_CLIENT_IP'];\r\r\t\tif(isset($_SERVER['HTTP_PROXY_USER'])) $addrs[] = $_SERVER['HTTP_PROXY_USER'];\r\r\t}\r\r\r\r\t$addrs[] = $_SERVER['REMOTE_ADDR'];\r\r\r\r\tforeach( $addrs as $v )\r\r\t{\r\r\t\tif( $v )\r\r\t\t{\r\r\t\t\tpreg_match(\"/^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/\", $v, $match);\r\r\t\t\t$ip = $match[1].'.'.$match[2].'.'.$match[3].'.'.$match[4];\r\r\r\r\t\t\tif( $ip && $ip != '...' )\r\r\t\t\t{\r\r\t\t\t\tbreak;\r\r\t\t\t}\r\r\t\t}\r\r\t}\r\r\r\r\tif( ! $ip || $ip == '...' )\r\r\t{\r\r\t\techo \"Không thể xác định địa chỉ IP của bạn.\";\r\r\t}\r\r\r\r\treturn $ip;\r\r}", "public static function getIPs(): array\n {\n return self::$ips;\n }", "public function get_ip_address() {\n // Check for shared internet/ISP IP\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_CLIENT_IP']))\n return $_SERVER['HTTP_CLIENT_IP'];\n\n // Check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // Check if multiple IP addresses exist in var\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if ($this->validate_ip($ip))\n return $ip;\n }\n }\n \n if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // Return unreliable IP address since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "public static function real_ip() {\n foreach (array(\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'\n ) as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n $ip = trim($ip); // just to be safe\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "public function _before_index(){\n// $ip = get_client_ip();\n// $res = $ip_class->getlocation('113.102.162.102');\n// print_r($res);\n \n \n }", "public function get_visitor_ip_address() {\n\t\t$forwarded_for = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n\n\t\t// Field HTTP_X_FORWARDED_FOR may contain multiple addresses, separated by a\n\t\t// comma. The first one is the real client, followed by intermediate proxy\n\t\t// servers\n\t\t$ip_addresses = explode(',', $forwarded_for);\n\t\t$visitor_ip = trim(array_shift($ip_addresses));\n\n\t\t$visitor_ip = apply_filters('wc_aelia_visitor_ip', $visitor_ip, $forwarded_for);\n\t\treturn $visitor_ip;\n\t}", "function ip_address() /* Get IP Address */\n {\n return isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n }", "function ipInfo($ip)\n {\n $geoplugin_url = 'http://www.geoplugin.net/php.gp?ip=' . $ip;\n $ip_details = unserialize(file_get_contents($geoplugin_url));\n return $ip_details;\n }", "public function ip()\n {\n return $this->rule('ip');\n }", "function getClientIp() {\n foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "function getIpCustomer(){\n$ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'IP Tidak Dikenali';\n \n return $ipaddress;\n}", "function listNetworkIp($net,$broadcast,$sn) {\n\n $lista=[]; // lista da ritornare \n\n $no = explode('.', $net); // array con gli ottetti dell'indirizzo NET\n $bo = explode('.', $broadcast); // array con gli ottetti dell'indirizzo NET\n\n $nbit = 32-$sn; // numero di bit assegnati agli host\n \n $nhost = pow(2,$nbit); // numero totale degli host\n\n $start = (int) $no[3]+1;\n $end = (int) $bo[3]-1;\n $roots = $no[0].\".\".$no[1].\".\".$no[2].\".\";\n $roote = $bo[0].\".\".$bo[1].\".\".$bo[2].\".\";\n $primo = $roots.$start;\n $ultimo = $roote.$end;\n $hosts = [];\n\n //echo $start.\" - \".$end.\"<br>\";\n\n // verifica che gli IP disponibili non superino le 5000 unità -> stila la lista\n if($nhost > 35000) {\n $lista[0] = $primo;\n $lista[1] = $ultimo;\n }\n else {\n for($i=ip2long($primo); $i<=ip2long($ultimo); $i++) {\n\n $ip2conv = $i;\n $ip2write = long2ip($ip2conv);\n $lista[] = $ip2write;\n \n $host=gethostbyaddr($ip2write); // prelevo il nome del host (se disponibile)\n //echo $host.\" | \";\n\n // se il nome host NON è uguale all'IP -> salvo il nome Host in una lista\n if(!filter_var($host, FILTER_VALIDATE_IP)) {\n $hosts[] = \"IP: $ip2write ==> Nome Host:<b> $host </b><br>\";\n }\n\n }\n }\n\n $ret['hostnames'] = $hosts;\n $ret['primo'] = $primo;\n $ret['ultimo'] = $ultimo;\n $ret['lista'] = $lista;\n $ret['nhost'] = $nhost; \n\n return $ret;\n}", "public function getRealIpAddr(){\n\t\t//check ip from share internet\n\t if (!empty($_SERVER['HTTP_CLIENT_IP'])){\n\t\t\t$ip=$_SERVER['HTTP_CLIENT_IP'];\n\t }elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n\t\t\t//to check ip is pass from proxy\n\t\t\t$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t } else {\n\t\t\t$ip=$_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\treturn $ip;\n\t}", "public function getIpv4();", "function bps_get_proxy_real_ip_address() {\n\t\n\tif ( is_admin() && wp_script_is( 'bps-accordion', $list = 'queue' ) && current_user_can('manage_options') ) {\n\t\tif ( isset($_SERVER['HTTP_CLIENT_IP'] ) ) {\n\t\t\t$ip = esc_html($_SERVER['HTTP_CLIENT_IP']);\n\t\t\techo __('HTTP_CLIENT_IP IP Address: ', 'bulletproof-security').'<strong>'.$ip.'</strong><br>';\n\t\t} elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {\n\t\t\t$ip = esc_html($_SERVER['HTTP_X_FORWARDED_FOR']);\n\t\t\techo __('Proxy X-Forwarded-For IP Address: ', 'bulletproof-security').'<strong>'.$ip.'</strong><br>';\n\t\t} elseif ( isset( $_SERVER['REMOTE_ADDR'] ) ) {\n\t\t\t$ip = esc_html($_SERVER['REMOTE_ADDR']);\n\t\t\techo __('Public Internet IP Address (ISP): ', 'bulletproof-security').'<strong>'.$ip.'</strong><br>';\n\t\t}\n\t}\n}", "static function getIP()\r\n {\r\n return self::getRemoteIP();\r\n }", "private function getIP(){\n \n if( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ){ \n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n \n else{\n \n if( isset($_SERVER ['HTTP_VIA']) ){\n $ip = $_SERVER['HTTP_VIA'];\n }\n else{\n \n if( isset( $_SERVER ['REMOTE_ADDR'] )){\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n else{\n $ip = null ;\n }\n }\n \n }\n \n \n return $ip; //retorna la IP\n }", "function getIPAddress() {\n if(!empty($_SERVER['HTTP_CLIENT_IP'])) { \n $ip = $_SERVER['HTTP_CLIENT_IP']; \n } \n //whether ip is from the proxy \n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { \n $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; \n } \n //whether ip is from the remote address \n else{ \n $ip = $_SERVER['REMOTE_ADDR']; \n } \n return $ip; \n }", "function getUserIP() {\n\tif (array_key_exists ( 'HTTP_X_FORWARDED_FOR', $_SERVER ) && ! empty ( $_SERVER ['HTTP_X_FORWARDED_FOR'] )) {\n\t\tif (strpos ( $_SERVER ['HTTP_X_FORWARDED_FOR'], ',' ) > 0) {\n\t\t\t$addr = explode ( \",\", $_SERVER ['HTTP_X_FORWARDED_FOR'] );\n\t\t\treturn trim ( $addr [0] );\n\t\t} else {\n\t\t\treturn $_SERVER ['HTTP_X_FORWARDED_FOR'];\n\t\t}\n\t} else {\n\t\treturn $_SERVER ['REMOTE_ADDR'];\n\t}\n}", "function getIP() {\n if(!empty($_SERVER['HTTP_CLIENT_IP'])){\n //ip from share internet\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n //ip pass from proxy\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }else{\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip === '::1' ? '127.0.0.1' : $ip;\n}", "public function getIPAddress()\n {\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && filter_var($_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (stristr($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $ip = trim(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])[0]);\n\n if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && filter_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (!empty($_SERVER['HTTP_X_REAL_IP']) && filter_var($_SERVER['HTTP_X_REAL_IP'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['HTTP_X_REAL_IP'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n return preg_replace(\"([^0-9\\.])\", '', $ip);\n }", "function get_location_ip($ip){\n\t$url = 'http://www.geoplugin.net/php.gp?ip='.$ip;\n\tif($geo = unserialize(file_get_contents($url))){\n\t\t$geo = array(\n\t\t\t'lat' => $geo['geoplugin_latitude'],\n\t\t\t'lon' => $geo['geoplugin_longitude'],\n\t\t\t'city' => $geo['geoplugin_city'],\n\t\t\t'ccode' => $geo['geoplugin_countryCode'],\n\t\t\t'county' => $geo['geoplugin_countryName']\n\t\t);\n\t\treturn $geo;\n\t}\n\telse {\n\t\treturn array();\n\t}\n}", "public function getIpAddress() {\n return [\n '#markup' => $this->t('Your Ip address is: @ipaddress', array('@ipaddress' => $this->personalizationIpService->getIpAddress()))\n ];\n }", "function getIPAddress() {\r\nif(!empty($_SERVER['HTTP_CLIENT_IP'])) { \r\n $ip = $_SERVER['HTTP_CLIENT_IP']; \r\n} \r\n//whether ip is from the proxy \r\nelseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { \r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; \r\n} \r\n//whether ip is from the remote address \r\nelse{ \r\n $ip = $_SERVER['REMOTE_ADDR']; \r\n} \r\nreturn $ip; \r\n}", "function ip()\n{\n return \\SumanIon\\CloudFlare::ip();\n}", "public static function getIp() {\n\t\tforeach (array(\"HTTP_CLIENT_IP\", \"HTTP_X_FORWARDED_FOR\", \"HTTP_X_FORWARDED\", \"HTTP_X_CLUSTER_CLIENT_IP\", \"HTTP_FORWARDED_FOR\", \"HTTP_FORWARDED\", \"REMOTE_ADDR\") as $key) {\n\t\t\tif (!array_key_exists($key, $_SERVER)) \n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\tforeach (explode(\",\", $_SERVER[$key]) as $ip) {\n\t\t\t\t$ip = trim($ip);\n\t\t\t\t\n\t\t\t\tif (filter_var($ip, FILTER_VALIDATE_IP/*, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE*/) !== false)\n\t\t\t\t\treturn $ip;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "function f_getIP() {\r\n $ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');\r\n foreach ($ip_keys as $key) {\r\n if (array_key_exists($key, $_SERVER) === true) {\r\n foreach (explode(',', $_SERVER[$key]) as $ip) {\r\n // trim for safety measures\r\n $ip = trim($ip);\r\n // attempt to validate IP\r\n ferror_log(\"Detected IP address: \" . $ip);\r\n if (f_validateIP($ip)) {\r\n return $ip;\r\n }\r\n }\r\n }\r\n }\r\n return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false;\r\n}", "function getIp(){\n\t$ip=$_SERVER['REMOTE_ADDR'];\n\t\tif(!empty($_SERVER['HTTP_CLIENT_IP'])){\n\t\t\t$ip= $_SERVER['HTPP_CLIENT_IP'];\n\t\t}elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n\t\t\t$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t}\n\t\treturn $ip;\n}", "public function gatewayIpAddr()\n {\n $datas = 'N.A';\n\n if(exec('ip route | awk \\'/a/ { print $3 }\\'',$output))\n $datas = $output[0];\n\n return $datas;\n }", "function get_ip() {\n\tif ( function_exists( 'apache_request_headers' ) ) {\n\t\t$headers = apache_request_headers();\n\t} else {\n\t\t$headers = $_SERVER;\n\t}\n\t$the_ip='';\n\t//Get the forwarded IP if it exists\n\tif ( array_key_exists( 'X-Forwarded-For', $headers ) && filter_var( $headers['X-Forwarded-For'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {\n\t\t$the_ip = $headers['X-Forwarded-For'];\n\t} elseif ( array_key_exists( 'HTTP_X_FORWARDED_FOR', $headers ) && \n\t\tfilter_var( $headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 )) {\n\t\t$the_ip = $headers['HTTP_X_FORWARDED_FOR'];\n\t} else \n\t\t$the_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );\n\tif (empty($the_ip)) $the_ip='10.0.0.1';\n\treturn $the_ip;\n\t/*$ipaddress ='';\n\tif ($_SERVER['HTTP_CLIENT_IP'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n\telse if ($_SERVER['HTTP_X_FORWARDED_FOR'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\telse if ($_SERVER['HTTP_X_FORWARDED'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\telse if ($_SERVER['HTTP_FORWARDED_FOR'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\telse if ($_SERVER['HTTP_FORWARDED'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_FORWARDED'];\n\telse if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['REMOTE_ADDR'];\n\telse\n\t$ipaddress = 'UNKNOWN';\n\treturn $ipaddress;*/\n}", "function getIPAddress() {\n if(!empty($_SERVER['HTTP_CLIENT_IP'])) { \n $ip = $_SERVER['HTTP_CLIENT_IP']; \n } \n //whether ip is from the proxy \n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { \n $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; \n } \n//whether ip is from the remote address \n else{ \n $ip = $_SERVER['REMOTE_ADDR']; \n } \n return $ip; \n}", "public function getIp() {\n\t\treturn $_SERVER['REMOTE_ADDR'];\t\n\t}", "function get_ip_address()\n{\n//\tif( isDev() )\n//\t\treturn \"66.135.205.14\";\t// US (ebay.com)\n//\t\treturn \"46.122.252.60\"; // ljubljana\n//\t\treturn \"190.172.82.24\"; // argentinia?\n//\t\treturn \"84.154.26.132\"; // probably invalid ip from munich\n//\t\treturn \"203.208.37.104\"; // google.cn\n//\t\treturn \"62.215.83.54\";\t// kuwait\n//\t\treturn \"41.250.146.224\";\t// Morocco (rtl!)\n//\t\treturn \"66.135.205.14\";\t// US (ebay.com)\n//\t\treturn \"121.243.179.122\";\t// india\n//\t\treturn \"109.253.21.90\";\t// invalid (user says UK)\n//\t\treturn \"82.53.187.74\";\t// IT\n//\t\treturn \"190.172.82.24\";\t// AR\n//\t\treturn \"99.230.167.125\";\t// CA\n//\t\treturn \"95.220.134.145\";\t// N/A\n//\t\treturn \"194.126.108.2\";\t// Tallinn/Estonia (Skype static IP)\n\n\tstatic $DETECTED_CLIENT_IP = 'undefined';\n\n\tif( $DETECTED_CLIENT_IP !== 'undefined' )\n\t\treturn $DETECTED_CLIENT_IP;\n\n\t$proxy_headers = array(\n\t\t'HTTP_VIA',\n\t\t'HTTP_X_FORWARDED_FOR',\n\t\t'HTTP_FORWARDED_FOR',\n\t\t'HTTP_X_FORWARDED',\n\t\t'HTTP_FORWARDED',\n\t\t'HTTP_CLIENT_IP',\n\t\t'HTTP_FORWARDED_FOR_IP',\n\t\t'VIA',\n\t\t'X_FORWARDED_FOR',\n\t\t'FORWARDED_FOR',\n\t\t'X_FORWARDED',\n\t\t'FORWARDED',\n\t\t'CLIENT_IP',\n\t\t'FORWARDED_FOR_IP',\n\t\t'HTTP_PROXY_CONNECTION',\n\t\t'REMOTE_ADDR' // REMOTE_ADDR must be last -> fallback\n\t);\n\n\tforeach( $proxy_headers as $ph )\n\t{\n\t\tif( !empty($_SERVER) && isset($_SERVER[$ph]) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = $_SERVER[$ph];\n\t\t\tbreak;\n\t\t}\n\t\telseif( !empty($_ENV) && isset($_ENV[$ph]) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = $_ENV[$ph];\n\t\t\tbreak;\n\t\t}\n\t\telseif( @getenv($ph) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = getenv($ph);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif( !isset($DETECTED_CLIENT_IP) )\n\t\treturn false;\n\n\t$is_ip = preg_match('/^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})/',$DETECTED_CLIENT_IP,$regs);\n\tif( $is_ip && (count($regs) > 0) )\n\t\t$DETECTED_CLIENT_IP = $regs[1];\n\treturn $DETECTED_CLIENT_IP;\n}", "public static function get_ip_address()\n {\n foreach (array(\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR') as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "function ip() {\n if (isset($_SERVER)) {\n if(isset($_SERVER['HTTP_CLIENT_IP'])){\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }\n elseif(isset($_SERVER['HTTP_FORWARDED_FOR'])){\n $ip = $_SERVER['HTTP_FORWARDED_FOR'];\n }\n elseif(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n else{\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n }\n else\n {\n if (getenv( 'HTTP_CLIENT_IP')) {\n $ip = getenv( 'HTTP_CLIENT_IP' );\n }\n elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ip = getenv('HTTP_FORWARDED_FOR');\n }\n elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip = getenv('HTTP_X_FORWARDED_FOR');\n }\n else {\n $ip = getenv('REMOTE_ADDR');\n }\n }\n return $ip;\n}", "private function getIP(){\n\t\tif( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] )) $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\telse if( isset( $_SERVER ['HTTP_VIA'] )) $ip = $_SERVER['HTTP_VIA'];\n\t\telse if( isset( $_SERVER ['REMOTE_ADDR'] )) $ip = $_SERVER['REMOTE_ADDR'];\n\t\telse $ip = null ;\n\t\treturn $ip;\n\t}", "function getUserIp(){\n switch(true){\n case (!empty($_SERVER['HTTP_X_REAL_IP'])): \n return $_SERVER['HTTP_X_REAL_IP'];\n break;\n \n case (!empty($_SERVER['HTTP_CLIENT_IP'])): \n return $_SERVER['HTTP_CLIENT_IP'];\n break;\n \n case (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])): \n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n break;\n \n default : \n return $_SERVER['REMOTE_ADDR'];\n }\n }", "function bps_get_server_ip_address_sysinfo() {\n\n\tif ( is_admin() && wp_script_is( 'bps-accordion', $list = 'queue' ) && current_user_can('manage_options') ) {\n\t\tif ( isset( $_SERVER['SERVER_ADDR'] ) ) {\n\t\t\t$ip = esc_html($_SERVER['SERVER_ADDR']);\n\t\t\techo __('Server|Website IP Address: ', 'bulletproof-security').'<strong>'.$ip.'</strong><br>';\n\t\t} elseif ( isset( $_SERVER['HTTP_HOST'] ) ) {\n\t\t\t$ip = esc_html( gethostbyname( $_SERVER['HTTP_HOST'] ) );\n\t\t\techo __('Server|Website IP Address: ', 'bulletproof-security').'<strong>'.$ip.'</strong><br>';\t\t\n\t\t} else { \n\t\t\t$ip = @dns_get_record( bpsGetDomainRoot(), DNS_ALL );\n\t\t\techo __('Server|Website IP Address: ', 'bulletproof-security').'<strong>'.$ip[0]['ip'].'</strong><br>';\t\n\t\t}\n\t}\n}", "function ip()\n {\n return util::ip();\n }", "function getRealIpAddr()\n{\nif(!empty($_SERVER['HTTP_CLIENT_IP']))\n//check if from share internet\n{\n\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n}\n elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n //to check ip is pass from proxy\n {\n\t $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n else{\n\t $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n}", "public function Persona (){ \n\n $this->ip=$this->getIP();\n }", "public static function getDomainIp() : string\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n\n if (! empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (! empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif ($ip == '::1') {\n $ip = gethostbyname(getHostName());\n }\n return $ip;\n }", "protected function ip_address()\n\t{\n\t\t//return $this->ip2int(ipaddress::get());\n\t\t//return $this->ip2int(server('REMOTE_ADDR'));\n\t\treturn server('REMOTE_ADDR');\n\t}", "function ipextract ($str, $remote_ip='')\r\n{\r\n global $ip_private_arr;\r\n\r\n if (empty($ip_private_arr) || !is_array($ip_private_arr)) {\r\n $ip_private_arr = array();\r\n $ip_private_arr[] = array('from' => '0.0.0.0', 'to' => '9.255.255.255');\r\n $ip_private_arr[] = array('from' => '10.0.0.0', 'to' => '10.255.255.255');\r\n $ip_private_arr[] = array('from' => '97.160.0.0', 'to' => '97.255.255.255');\r\n $ip_private_arr[] = array('from' => '100.0.0.0', 'to' => '111.255.255.255');\r\n $ip_private_arr[] = array('from' => '127.0.0.0', 'to' => '127.255.255.255');\r\n $ip_private_arr[] = array('from' => '145.0.0.0', 'to' => '145.0.255.255');\r\n $ip_private_arr[] = array('from' => '163.0.0.0', 'to' => '163.0.255.255');\r\n $ip_private_arr[] = array('from' => '169.254.0.0', 'to' => '169.254.255.255');\r\n $ip_private_arr[] = array('from' => '172.0.0.0', 'to' => '172.127.255.255');\r\n $ip_private_arr[] = array('from' => '175.0.0.0', 'to' => '185.255.255.255');\r\n $ip_private_arr[] = array('from' => '191.0.0.0', 'to' => '192.0.255.255');\r\n $ip_private_arr[] = array('from' => '192.88.0.0', 'to' => '192.88.255.255');\r\n $ip_private_arr[] = array('from' => '192.101.0.0', 'to' => '192.114.255.255');\r\n $ip_private_arr[] = array('from' => '192.140.0.0', 'to' => '192.145.255.255');\r\n $ip_private_arr[] = array('from' => '192.168.0.0', 'to' => '192.178.255.255');\r\n $ip_private_arr[] = array('from' => '194.55.0.0', 'to' => '194.55.255.255');\r\n $ip_private_arr[] = array('from' => '198.17.0.0', 'to' => '198.20.255.255');\r\n $ip_private_arr[] = array('from' => '224.0.0.0', 'to' => '239.255.255.255');\r\n }\r\n\r\n $iplong = ip2long(trim($remote_ip));\r\n $valarr = empty($str) ? array() : preg_split('/[,\\s]+/', trim($str));\r\n foreach ($valarr as $ipval) {\r\n if (preg_match('%(\\d{1,3}(?:[.]\\d{1,3}){3})%', $ipval, $matches)) {\r\n $iptest = ip2long($matches[1]);\r\n if ($iptest) {\r\n if (empty($iplong)) $iplong = $iptest;\r\n if (!empty($ip_private_arr)) {\r\n foreach ($ip_private_arr as $ip_range) {\r\n $ipfrom = ip2long(trim($ip_range['from']));\r\n $ipto = ip2long(trim($ip_range['to']));\r\n if ($ipfrom<=$iptest && $iptest<=$ipto) {\r\n $iptest = 0;\r\n break;\r\n }\r\n }\r\n if ($iptest) $iplong = $iptest;\r\n }\r\n }\r\n }\r\n }\r\n return (!$iplong || $iplong==-1) ? FALSE : long2ip($iplong);\r\n}", "static function getRealIpAddr()\r\n\t{\r\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP']) && ($_SERVER['HTTP_CLIENT_IP']!=\"unknown\")) //check ip from share internet\r\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\r\n\t\telseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && ($_SERVER['HTTP_X_FORWARDED_FOR']!=\"unknown\")) //to check ip is pass from proxy\r\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t\telse\r\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\r\n\r\n\t\treturn $ip;\r\n\t}", "function getRealIpAddr()\n{\n if (!empty($_SERVER['HTTP_CLIENT_IP']))\n {\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n //to check ip is pass from proxy\n {\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n else\n {\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n}", "private function findIP()\n {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_address = $_SERVER['HTTP_CLIENT_IP'];\n }\n //whether ip is from proxy\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n //whether ip is from remote address\n else {\n $ip_address = $_SERVER['REMOTE_ADDR'];\n }\n return $ip_address;\n }", "function getUserIPAddress(){\n\tif(!empty($_SERVER['HTTP_CLIENT_IP'])){\n\t\t//ip from share internet\n\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t}elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n\t\t//ip pass from proxy\n\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}else{\n\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t}\n\treturn $ip;\n}", "public function locate($ip);", "function get_client_ip() {\r\n $ipaddress = '';\r\n if (getenv('HTTP_CLIENT_IP'))\r\n $ipaddress = getenv('HTTP_CLIENT_IP');\r\n else if(getenv('HTTP_X_FORWARDED_FOR'))\r\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\r\n else if(getenv('HTTP_X_FORWARDED'))\r\n $ipaddress = getenv('HTTP_X_FORWARDED');\r\n else if(getenv('HTTP_FORWARDED_FOR'))\r\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\r\n else if(getenv('HTTP_FORWARDED'))\r\n $ipaddress = getenv('HTTP_FORWARDED');\r\n else if(getenv('REMOTE_ADDR'))\r\n $ipaddress = getenv('REMOTE_ADDR');\r\n else\r\n $ipaddress = 'IP tidak dikenali';\r\n return $ipaddress;\r\n}", "public function ip()\n\t{\n\t\treturn $this->Players->ip($this->SqueezePlyrID);\n\t}", "public function getGivenIp()\n\t{\n\t\treturn $this->given_ip;\n\t}", "public function ip_address() {\n\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n //check ip from share internet\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n //to check ip is pass from proxy\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "function get_user_ip()\n{\n if (empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n return$_SERVER['REMOTE_ADDR'];\n }\n $ip = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n return $ip[0];\n}", "function getIp()\n{\n\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet\n\t{\n\t\t$ip=$_SERVER['HTTP_CLIENT_IP'];\n\t}\n\telseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy\n\t{\n\t\t$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\telse\n\t{\n\t\t$ip=$_SERVER['REMOTE_ADDR'];\n\t}\n\treturn $ip;\n}", "function get_client_ip() {\n $ipaddress = '';\n\t\t\n\t\tif (isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n /* else if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if (isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if (isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];*/\n else\n $ipaddress = 'UNKNOWN';\n\n //To avoid multiple ip. That is because of ip forwarding.\n if (strpos($ipaddress, ',') !== false) {\n $ips = explode(',', $ipaddress);\n $ipaddress = trim($ips[0]); // taking the first one\n }\n return $ipaddress;\n }", "function real_ip_ad () {\n\t\t\n\t\tif (!empty($_SERVER[\"HTTP_CLIENT_IP\"]))\n\t\t{\n\t\t# check for ip from shared internet\n\t\t$ip = $_SERVER[\"HTTP_CLIENT_IP\"];\n\t\t}\n\t\telseif (!empty($_SERVER[\"HTTP_X_FORWARDED_FOR\"]))\n\t\t{\n\t\t// Check for the Proxy User\n\t\t$ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t}\n\t\t// This will print user's real IP Address\n\t\t// does't matter if user using proxy or not.\n\t\treturn $ip;\n\t}", "public function getUseIPAddress() \n \t{\n \t\treturn $this->use_ipaddr;\n \t}", "function get_user_ip() {\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n\n if(filter_var($client, FILTER_VALIDATE_IP))\n {\n $ip = $client;\n }\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\n {\n $ip = $forward;\n }\n else\n {\n $ip = $remote;\n }\n\n return $ip;\n }", "function get_ip() {\n\t\t$mainIp = '';\n\t\tif (getenv('HTTP_CLIENT_IP'))\n\t\t\t$mainIp = getenv('HTTP_CLIENT_IP');\n\t\telse if(getenv('HTTP_X_FORWARDED_FOR'))\n\t\t\t$mainIp = getenv('HTTP_X_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_X_FORWARDED'))\n\t\t\t$mainIp = getenv('HTTP_X_FORWARDED');\n\t\telse if(getenv('HTTP_FORWARDED_FOR'))\n\t\t\t$mainIp = getenv('HTTP_FORWARDED_FOR');\n\t\telse if(getenv('HTTP_FORWARDED'))\n\t\t\t$mainIp = getenv('HTTP_FORWARDED');\n\t\telse if(getenv('REMOTE_ADDR'))\n\t\t\t$mainIp = getenv('REMOTE_ADDR');\n\t\telse\n\t\t\t$mainIp = 'UNKNOWN';\n\t\treturn $mainIp;\n\t}" ]
[ "0.738927", "0.7246671", "0.7190098", "0.7126971", "0.70113254", "0.6845851", "0.6823245", "0.67787135", "0.6759557", "0.6666617", "0.6663436", "0.66491956", "0.6616005", "0.6567725", "0.6557975", "0.65462434", "0.64780617", "0.64559", "0.64496815", "0.64425415", "0.64092106", "0.6408062", "0.64004385", "0.6398804", "0.6388408", "0.6385242", "0.6385099", "0.6376617", "0.63705736", "0.6347091", "0.6326036", "0.6289243", "0.62844497", "0.62835956", "0.6280172", "0.6279184", "0.6278746", "0.62767506", "0.6268019", "0.62585723", "0.6253622", "0.6243576", "0.62403166", "0.62401587", "0.62246174", "0.6220253", "0.622015", "0.6218605", "0.62018764", "0.6193358", "0.61741006", "0.6171654", "0.6166092", "0.61623055", "0.6159843", "0.61515313", "0.615151", "0.61483675", "0.6133382", "0.61309254", "0.61304224", "0.6129627", "0.611345", "0.61118084", "0.6111271", "0.6097212", "0.60970443", "0.6096519", "0.60964787", "0.6095054", "0.6089052", "0.6084088", "0.6083762", "0.6083188", "0.6083078", "0.60817856", "0.60795236", "0.60773045", "0.6074006", "0.6073042", "0.60693616", "0.6069003", "0.60659945", "0.60628873", "0.6061051", "0.6056596", "0.6053117", "0.6051106", "0.6050815", "0.6050566", "0.6041945", "0.6038786", "0.6037402", "0.6036817", "0.6032976", "0.6031656", "0.6031586", "0.6028853", "0.6028628", "0.6027469", "0.60215175" ]
0.0
-1
/ version minimificada de un codigo html =>
function minify_html($input){ if(trim($input) === "") return $input; // Remove extra white-space(s) between HTML attribute(s) $input = preg_replace_callback('#<([^\/\s<>!]+)(?:\s+([^<>]*?)\s*|\s*)(\/?)>#s', function($matches) { return '<' . $matches[1] . preg_replace('#([^\s=]+)(\=([\'"]?)(.*?)\3)?(\s+|$)#s', ' $1$2', $matches[2]) . $matches[3] . '>'; }, str_replace("\r", "", $input)); // Minify inline CSS declaration(s) if(strpos($input, ' style=') !== false) { $input = preg_replace_callback('#<([^<]+?)\s+style=([\'"])(.*?)\2(?=[\/\s>])#s', function($matches) { return '<' . $matches[1] . ' style=' . $matches[2] . minify_css($matches[3]) . $matches[2]; }, $input); } return preg_replace( array( // t = text // o = tag open // c = tag close // Keep important white-space(s) after self-closing HTML tag(s) '#<(img|input)(>| .*?>)#s', // Remove a line break and two or more white-space(s) between tag(s) '#(<!--.*?-->)|(>)(?:\n*|\s{2,})(<)|^\s*|\s*$#s', '#(<!--.*?-->)|(?<!\>)\s+(<\/.*?>)|(<[^\/]*?>)\s+(?!\<)#s', // t+c || o+t '#(<!--.*?-->)|(<[^\/]*?>)\s+(<[^\/]*?>)|(<\/.*?>)\s+(<\/.*?>)#s', // o+o || c+c '#(<!--.*?-->)|(<\/.*?>)\s+(\s)(?!\<)|(?<!\>)\s+(\s)(<[^\/]*?\/?>)|(<[^\/]*?\/?>)\s+(\s)(?!\<)#s', // c+t || t+o || o+t -- separated by long white-space(s) '#(<!--.*?-->)|(<[^\/]*?>)\s+(<\/.*?>)#s', // empty tag '#<(img|input)(>| .*?>)<\/\1>#s', // reset previous fix '#(&nbsp;)&nbsp;(?![<\s])#', // clean up ... '#(?<=\>)(&nbsp;)(?=\<)#', // --ibid // Remove HTML comment(s) except IE comment(s) '#\s*<!--(?!\[if\s).*?-->\s*|(?<!\>)\n+(?=\<[^!])#s' ), array( '<$1$2</$1>', '$1$2$3', '$1$2$3', '$1$2$3$4$5', '$1$2$3$4$5$6$7', '$1$2$3', '<$1$2', '$1 ', '$1', "" ), $input); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHtmlVer() {}", "function tidy_get_html_ver(tidy $object) {}", "function hi_updateVersion() {\n global $pth;\n\n return '<h1>CMSimple_XH - Update-Check</h1>' . \"\\n\"\n . tag('img src=\"' . $pth['folder']['plugins'] . 'hi_updatecheck/images/software-update-icon.png\" class=\"upd_plugin_icon\"')\n . '<p>Version: ' . UPD_VERSION . ' - ' . UPD_DATE . '</p>' . \"\\n\"\n . '<p>Copyright &copy;2013-2014 <a href=\"http://cmsimple.holgerirmler.de/\">Holger Irmler</a> - all rights reserved' . tag('br')\n . '<p class=\"upd_license\">License: GPL3</p>' . \"\\n\"\n . '<p class=\"upd_license\">THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR'\n . ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,'\n . ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE'\n . ' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER'\n . ' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,'\n . ' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE'\n . ' SOFTWARE.</p>' . \"\\n\";\n}", "public function getVersionFromHtml()\n {\n if (preg_match('/WordPress\\s+([\\d.]+)/', $this->siteAnatomy->html, $matches)) {\n if ( ! empty($matches[1])) {\n $version = $matches[1];\n $this->setVersion($version);\n }\n }\n }", "function shortcodes_xh_version()\n{\n global $pth;\n\n return '<h1>Shortcodes_xh</h1>'.\"\\n\"\n\t. tag('img src=\"'.$pth['folder']['plugins'].'shortcodes_xh/help/ShortCode_XH.png\" style=\"float: left; margin: 0 20px 20px 0\"')\n\t. '<p>This plugin is to use the familiar <a href=\"https://codex.wordpress.org/Shortcode_API\" target=\"_blank\">WordPress shortcode syntax</a> in CMSimple_XH.</p>'\n\t. '<p>Version: '.SHORTCODES_XH_VERSION.'</p>'.\"\\n\"\n\t. '<p>Copyright &copy; 2015 <a href=\"http://cmsimple-jp.org\" target=\"_blank\">cmsimple-jp.org</a></p>'.\"\\n\"\n\t. '<p>Original <a href=\"https://github.com/Badcow/Shortcodes\" target=\"_blank\">Badcow/Shortcodes Latest commit 5 Apr 2015</a></p>'\n\t. '<p style=\"text-align: justify\">'\n\t. '<b>License</b>'. tag('br') . \"\\n\"\n\t. ' Art License Terms : <a href=\"http://creativecommons.org/licenses/by-sa/4.0/\" target=\"_blank\">Creative Commons License </a> . Detail <a href=\"https://github.com/Badcow/Shortcodes\" target=\"_blank\">https://github.com/Badcow/Shortcodes</a>'. tag('br').\"\\n\"\n\t. ' Software License terms : <a href=\"http://www.gnu.org/licenses/\" target=\"_blank\">GPLv3.</a>';\n}", "function bl_version_head() {\r\n\techo '<meta name=\"generator\" content=\"Beaverlodge v' . EDD_BEAVERLODGE_VERSION . '\"/>' ;\r\n}", "function sf_render_version_strip()\r\n{\r\n\r\n\t$site = SF_PLUGIN_URL.\"/forum/ahah/sf-ahahacknowledge.php\";\r\n\t$out = '<br /><div id=\"sfversion\">&copy; '.SFPLUGHOME;\r\n\t$out.= '&nbsp;&nbsp;<a href=\"'.$site.'\" onclick=\"return hs.htmlExpand(this, { objectType: \\'ajax\\', preserveContent: true, reflow: true, width: 650} )\"><img class=\"sficon\" src=\"'.SFRESOURCES.'information.png\" alt=\"\" title=\"'.__(\"acknowledgements\", \"sforum\").'\" /></a>';\r\n\r\n\t$out.= '</div><br />'.\"\\n\";\r\n\treturn $out;\r\n}", "abstract public function version();", "abstract public function version();", "abstract public function get_version();", "function htmlHeader($currentVersion) {\necho <<<HTML\n\t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\nHTML;\n?>\n<!DOCTYPE html \n PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n\t<head>\n\t\t<title>phpWebFTP <?=$currentVersion;?> By Edwin van Wijk</TITLE>\n\t\t<link rel=\"stylesheet\" href=\"style/cm.css\" title=\"contemporary\" type=\"text/css\"></link>\n\t\t<script type=\"text/javascript\" src=\"include/script.js\"></script>\n\t</head>\n\t<body>\n<?\n}", "public function version();", "public function version();", "public function version();", "public function version();", "public function version();", "function mainHTML()\n {\n ?>\n <h1>Upgrade Andromeda From Subversion</h1>\n \n <br/>\n This program will pull the latest release code for\n Andromeda directly from our Sourceforget.net Subversion tree. \n\n <br/>\n <br/>\n <b>This program directly overwrites the running Node Manager\n Code.</b> <span style=\"color:red\"><b>If you have been making changes to your Andromeda\n code on this machine all of those changes will be lost!</b><span>\n \n <br/>\n <br/>\n <a href=\"javascript:Popup('?gp_page=a_pullsvna&gp_out=none')\"\n >Step 1: Pull Code Now</a>\n \n <br/>\n <br/>\n <a href=\"javascript:Popup('?gp_page=a_builder&gp_out=none&txt_application=andro')\"\n >Step 2: Rebuild Node Manager</a>\n \n <?php\n \n }", "public function get_version();", "static function nextgen_version() {\n global $ngg;\n echo apply_filters('show_nextgen_version', '<!-- <meta name=\"NextGEN\" version=\"'. $ngg->version . '\" /> -->' . \"\\n\");\n }", "function block_version($content)\n {\n }", "public function getVersion(): string\n {\n $link = \"https://docs.phalcon.io/\"\n . Version::getPart(Version::VERSION_MAJOR)\n . \".\"\n . Version::getPart(Version::VERSION_MEDIUM)\n . \"/en/\";\n\n return '<div class=\"version\">Phalcon Framework '\n . '<a href=\"' . $link . '\" target=\"_new\">'\n . Version::get() . \"</a></div>\";\n }", "function print_phpWebNotes_version() {\r\n\t\tif ( ON == config_get( 'show_version' ) ) {\r\n\t\t\techo '<span class=\"version\">phpWebNotes - ' . config_get( 'phpWebNotes_version' ) . '</span><br />';\r\n\t\t}\r\n\t}", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "public function version() {\n\t\t\t$this->output->layout = \"empty\";\n\t\t\t$this->output->set(\"date\", Settings::get(\"dynamic.Content Published\", date(\"y-m-d H:i:s\"), true));\n\t\t\t$this->output->set(\"version\", Settings::get(\"dynamic.Content Version\", 1.0, true));\n\t\t\t$this->output->view(\"api/xml/version.php\");\n\t\t\t$this->output->header(\"Content-Type: text/xml\");\n\t\t\t$this->output->cache($this->default_cache_timeout);\n\t\t}", "function ff_hh_shortcode_versions( $atts, $content, $name ) {\n\t$domain = 'ffhh';\n\t$branch = 'stable';\n\t$grep = false;\n\t$filter = false;\n\tif ( is_array( $atts ) ) {\n\t\tif ( array_key_exists( 'domain', $atts ) && ! empty( $atts['domain'] ) ) {\n\t\t\t$domain = $atts['domain'];\n\t\t}\n\t\tif ( array_key_exists( 'branch', $atts ) && ! empty( $atts['branch'] ) ) {\n\t\t\t$branch = $atts['branch'];\n\t\t}\n\t\tif ( array_key_exists( 'grep', $atts ) && ! empty( $atts['grep'] ) ) {\n\t\t\t$grep = $atts['grep'];\n\t\t}\n\t\tif ( array_key_exists( 'filter', $atts ) && ! empty( $atts['filter'] ) ) {\n\t\t\t$filter = explode ( ',', $atts['filter'] );\n\t\t}\n\t}\n\n\t$branch_url = FF_HH_UPDATES_URL . $domain . '/' . $branch;\n\tif ( $domain === 'multi' ) { $branch_url = $branch_url . '/images'; }\n\t$manifest = ff_hh_getmanifest( $branch_url, $domain, $branch );\n\n\t$outstr = \"<div class=\\\"ff $name\\\">\";\n\t$outstr .= '<table><tr><th>Modell</th><th>Erstinstallation</th><th>Aktualisierung</th></tr>';\n\n\tksort($manifest);\n\tforeach ( $manifest as $hw => $versions ) {\n\t\t// select some models\n\t\tif ( $grep && ( false === strpos( $hw, $grep ) ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\t// filter others\n\t\tif ( $filter ) {\n\t\t\t$filtered = false;\n\t\t\tforeach ( $filter as $flt ) {\n\t\t\t\tif ( strpos ( $hw, $flt ) !== false ) {\n\t\t\t\t\t$filtered = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( $filtered ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t$hw = ff_hh_beautify_hw_name( $hw, $grep );\n\t\t$outstr .= sprintf( \"\\n<tr><td>%s</td>\", $hw );\n\n\t\t// factory versions\n\t\t$hw_ver_links = array();\n\t\tforeach ( $versions as $hw_ver => $filename ) {\n\t\t\tif ( strpos( $hw, 'Unifi Ac Pro' ) || strpos( $hw, 'Unifi Ac Lite' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$filename = str_replace( '-sysupgrade', '', $filename );\n\t\t\tif (strpos($filename,'netgear') !== false) {\n\t\t\t\t$filename = str_replace( '.bin', '.img', $filename );\n\t\t\t\t$filename = str_replace( '.tar', '.img', $filename );\n\t\t\t}\n\t\t\t$hw_ver_links[] = sprintf(\n\t\t\t\t'<a href=\"%s%s\">%s.x</a>',\n\t\t\t\t$branch_url . '/factory/',\n\t\t\t\t$filename,\n\t\t\t\t$hw_ver\n\t\t\t);\n\t\t}\n\t\tif ( count($hw_ver_links) > 0) {\n\t\t\t$outstr .= '<td>Hardware Ver. ' . join( ', ', $hw_ver_links ) . '</td>';\n\t\t} else {\n\t\t\t$outstr .= '<td><i>Benutze das Image</br>zur Aktualisierung</i></td>';\n\t\t}\n\n\t\t// sysupgrade versions\n\t\t$hw_ver_links = array();\n\t\tforeach ( $versions as $hw_ver => $filename ) {\n\t\t\t$hw_ver_links[] = sprintf(\n\t\t\t\t'<a href=\"%s%s\">%s.x</a>',\n\t\t\t\t$branch_url . '/sysupgrade/',\n\t\t\t\t$filename,\n\t\t\t\t$hw_ver\n\t\t\t);\n\t\t}\n\t\t$outstr .= '<td>Hardware Ver. ' . join( ', ', $hw_ver_links ) . '</td>';\n\n\t\t$outstr .= '</tr>';\n\t}\n\n\t$outstr .= '</table>';\n\t$outstr .= '</div>';\n\t// $outstr .= '<pre>'.print_r( $manifest, true ).'</pre>';\n\treturn $outstr;\n}", "function cl_version_in_header() {\n echo '<meta name=\"generator\" content=\"Custom Login v' . CUSTOM_LOGIN_VERSION . '\" />' . \"\\n\";\n }", "function dimaan_remove_version() { return ''; }", "function pramble_remove_version(){\n\t\t\t\treturn '';\n\t\t\t}", "function getVersion() {\r\n\t\treturn '1.1';\r\n\t}", "function _kala_migrate_grab_version($check) {\n // Grab the downloads section\n $dloads = stristr($check, '<div class=\"view view-drupalorg-project-downloads');\n\n // Look through the table for the version.\n $divs = explode('<div class=\"release', $dloads);\n if (isset($divs[1])) {\n foreach ($divs as $div) {\n // Grab all releases.\n $ver_grabs[] = _kala_migrate_get_between($div, 'releases/', '\">');\n }\n $ver_grabs = array_filter($ver_grabs);\n // Filter out D8 versions.\n foreach ($ver_grabs as $ver) {\n if (stripos($ver, '8.x-') !== FALSE) {\n if (stripos($ver, '-dev') !== FALSE) {\n $vers['dev'] = $ver;\n }\n else {\n $vers['stable'] = strstr($ver, '\"', TRUE);\n }\n }\n }\n // Send this out the door.\n if (isset($vers)) {\n return array_key_exists('stable', $vers) ? $vers['stable'] : $vers['dev'];\n }\n }\n\n return '';\n}", "function ff_hh_shortcode_latestversion( $atts, $content, $name ) {\n\t$domain = 'ffhh';\n\t$branch = 'stable';\n\tif ( is_array( $atts ) ) {\n\t\tif ( array_key_exists( 'domain', $atts ) && ! empty( $atts['domain'] ) ) {\n\t\t\t$domain = $atts['domain'];\n\t\t}\n\t\tif ( array_key_exists( 'branch', $atts ) && ! empty( $atts['branch'] ) ) {\n\t\t\t$branch = $atts['branch'];\n\t\t}\n\t}\n\n\t$branch_url = FF_HH_UPDATES_URL . $domain . '/' . $branch;\n\tif ( $domain === 'multi' ) { $branch_url = $branch_url . '/images'; }\n\t$sw_ver = ff_hh_getlatest( $branch_url, $domain, $branch );\n\t$outstr = \"<span class=\\\"ff $name\\\">$sw_ver</span>\";\n\treturn $outstr;\n}", "public function testHtml2Default() {\n $this->assertEquals(\n '<!DOCTYPE html PUBLIC \"' . strtolower(FpiList::FPI_HTML_2) . '\">',\n $this->generator->version(2)->generate()\n );\n }", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "function material_press_remove_script_version( $src ) {\n \t$parts = explode( '?ver', $src );\n \treturn $parts[0];\n }", "function versionPhp(){\r\n\t\t$test = phpversion();\r\n\t\t// on teste le premier chiffre\r\n\t\t$version = mb_substr($test, 0, 1);\r\n\t\tif ($version == 7) {\r\n\t\t\t$retour = '<span style=\"color: green;\">'.phpversion().' (Gepi nécessite php 5.2.x minimum)</span>';\r\n\t\t} elseif ($version == 5) {\r\n\t\t\t$retour = '<span style=\"color: green;\">'.phpversion().' (Gepi nécessite php 5.2.x minimum)</span>';\r\n\t\t} elseif($version == 4 AND mb_substr($test, 2, 2) >= 3){\r\n\t\t\t$retour = '<span style=\"color: green;\">'.phpversion().'(Attention, Gepi ne fonctionne pas avec cette version, elle est trop ancienne)</span>';\r\n\t\t}else{\r\n\t\t\t$retour = '<span style=\"color: red;\">'.phpversion().'(version ancienne !)</span>';\r\n\t\t}\r\n\t\treturn $retour;\r\n\t}", "function siguiente_Version($sAntigua)\n{\n $aTrocearAntigua = explode('\\.', $sAntigua);\n $iVersion = (int)$aTrocearAntigua[0];\n $iRevisionMayor = (int)$aTrocearAntigua[1];\n $iRevisionMenor = (int)$aTrocearAntigua[2];\n if ($iRevisionMenor < 9) {\n $iRevisionMenor++;\n } else if ($iRevisionMayor < 9) {\n $iRevisionMayor++;\n $iRevisionMenor = 0;\n }\n return ($iVersion . \".\" . $iRevisionMayor . \".\" . $iRevisionMenor);\n}", "function ff_hh_shortcode_versions( $atts, $content, $name ) {\n\t$manifest = ff_hh_getmanifest( FF_HH_STABLE_BASEDIR );\n\n\t$outstr = \"<div class=\\\"ff $name\\\">\";\n\t$outstr .= '<table><tr><th>Modell</th><th>Erstinstallation</th><th>Aktualisierung</th><th>Preissuche</th></tr>';\n\n\t# optionally filter output by given substring\n\tif ( is_array( $atts )\n\t\t&& array_key_exists( 'grep', $atts )\n\t\t&& ! empty( $atts['grep'] ) ) {\n\t\t$grep = $atts['grep'];\n\t} else {\n\t\t$grep = false;\n\t}\n\n\tforeach ( $manifest as $hw => $versions ) {\n\t\t// filter\n\t\tif ( $grep && ( false === strpos( $hw, $grep ) ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\t$hw = ff_hh_beautify_hw_name( $hw, $grep );\n\t\t$outstr .= sprintf( \"\\n<tr><td>%s</td>\", $hw );\n\n\t\t// factory versions\n\t\t$hw_ver_links = array();\n\t\tforeach ( $versions as $hw_ver => $filename ) {\n\t\t\t$filename = str_replace( '-sysupgrade', '', $filename );\n\t\t\t$hw_ver_links[] = sprintf(\n\t\t\t\t'<a href=\"%s%s\">%s.x</a>',\n\t\t\t\tFF_HH_STABLE_BASEDIR.'factory/',\n\t\t\t\t$filename, $hw_ver\n\t\t\t);\n\t\t}\n\t\t$outstr .= '<td>Hardware Version ' . join( ', ', $hw_ver_links ) . '</td>';\n\n\t\t// sysupgrade versions\n\t\t$hw_ver_links = array();\n\t\tforeach ( $versions as $hw_ver => $filename ) {\n\t\t\t$hw_ver_links[] = sprintf(\n\t\t\t\t'<a href=\"%s%s\">%s.x</a>',\n\t\t\t\tFF_HH_STABLE_BASEDIR.'sysupgrade/',\n\t\t\t\t$filename, $hw_ver\n\t\t\t);\n\t\t}\n\t\t$outstr .= '<td>Hardware Version ' . join( ', ', $hw_ver_links ) . '</td>';\n\n\t\t// link to Geizhals\n\n\t\t$outstr .= sprintf( \"\\n<tr><td><a href=\\\"http://geizhals.de/?fs=%s\\\" target=\\\"_blank\\\">Suchen</a></td>\", $hw );\n\n\t\t$outstr .= '</tr>';\n\t}\n\n\t$outstr .= '</table>';\n\t$outstr .= '</div>';\n\t// $outstr .= '<pre>'.print_r( $manifest, true ).'</pre>';\n\treturn $outstr;\n}", "function displayTagTopHtml(){\n echo\n '<!DOCTYPE html>\n <html lang=\"fr\">';\n}", "public function get_updated_html()\n {\n }", "function plugin_version_estimation() {\n return [\n 'name' => 'Оценка качества работы с заявкой',\n 'version' => PLUGIN_ESTIMATION_VERSION,\n 'author' => 'Roman Gonyukov',\n 'license' => '',\n 'homepage' => '',\n 'requirements' => [\n 'glpi' => [\n 'min' => '9.2',\n ]\n ]\n ];\n}", "function dibujar_versiones($lista)\n{\n $cadena = '';\n\n if(count($lista) > 0){\n foreach($lista as $objeto){\n $cadena = $cadena.'<p><strong style=\"color:#2babcf\">'.$objeto->version->abreviatura.'</strong><br>'.$objeto->texto.'</p>';\n }\n }\n\n return $cadena;\n}", "function cms_version_pretty()\n{\n $minor = cms_version_minor();\n $dotted = strval(cms_version()) . (($minor == '') ? '' : '.' . $minor);\n return preg_replace('#\\.(alpha|beta|RC)#', ' ${1}', $dotted);\n}", "public function latest_version();", "public function getVersion()\n\t{\n\t\t$insert = $this->inject();\n\t\t$injectURL = $this->url . $insert . 'null%2c version%28%29%23&Submit=Submit#';\n\t\treturn $injectURL;\n\t}", "function spartan_rss_version() { return ''; }", "function get_web_mill_version() {\n @require_once $_SERVER['DOCUMENT_ROOT'] . '/php/admin/config.php';\n return $VERSION;\n }", "function get_tools() {\n global $asf;\n return <<<EOD\n<p>Tools: \n<a href=\"http://validator.w3.org/check/referer\">html5</a>\n<a href=\"http://jigsaw.w3.org/css-validator/check/referer?profile=css3\">css3</a>\n<a href=\"http://jigsaw.w3.org/css-validator/check/referer?profile=css21\">css21</a>\n<a href=\"http://validator.w3.org/unicorn/check?ucn_uri=referer&amp;ucn_task=conformance\">unicorn</a>\n<a href=\"http://validator.w3.org/checklink?uri={$asf->request->current_url}\">links</a>\n<a href=\"http://qa-dev.w3.org/i18n-checker/index?async=false&amp;docAddr={$asf->request->current_url}\">i18n</a>\n<!-- <a href=\"link?\">http-header</a> -->\n<a href=\"http://csslint.net/\">css-lint</a>\n<a href=\"http://jslint.com/\">js-lint</a>\n<a href=\"http://jsperf.com/\">js-perf</a>\n<a href=\"http://www.workwithcolor.com/hsl-color-schemer-01.htm\">colors</a>\n<a href=\"http://dbwebb.se/style\">style</a>\n</p>\n\n<p>Docs:\n<a href=\"http://www.w3.org/2009/cheatsheet\">cheatsheet</a>\n<a href=\"http://dev.w3.org/html5/spec/spec.html\">html5</a>\n<a href=\"http://www.w3.org/TR/CSS2\">css2</a>\n<a href=\"http://www.w3.org/Style/CSS/current-work#CSS3\">css3</a>\n<a href=\"http://php.net/manual/en/index.php\">php</a>\n<a href=\"http://www.sqlite.org/lang.html\">sqlite</a>\n<a href=\"http://www.blueprintcss.org/\">blueprint</a>\n</p>\nEOD;\n}", "protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {\n\t\t$version = (string) Mage::getConfig()->getModuleConfig('Blueknow_Bluecart')->version;\n \treturn '<strong>'.$version.'</strong>';\n }", "public static function get_CDN_HTML(): string\n {\n $html = '\n <option value=\"jquery.1.11.1.js\" selected=\"selected\"> jquery.1.11.1.js</option>\n<option value=\"jquery.1.11.1 UI\"> jquery.1.11.1 UI</option>\n<option value=\"jquery.1.11.1 tablesorter\"> jquery.1.11.1 tablesorter</option>\n<option value=\"mustache.min.js\" selected=\"selected\"> mustache.min.js</option>\n<option value=\"copernicus.min.css\" selected=\"selected\"> copernicus.min.css</option>\n<option value=\"unsemantic.min.css\" selected=\"selected\"> unsemantic.min.css</option>\n<option value=\"copernicus.min.js\" selected=\"selected\"> copernicus.min.js</option>\n<option value=\"htmlgenerator-v2.js\" selected=\"selected\"> htmlgenerator-v2.js</option>\n<option value=\"photoswipe.css\" selected=\"selected\"> photoswipe.css</option>\n<option value=\"photoswipe.min.js\" selected=\"selected\"> photoswipe.min.js</option>\n<option value=\"bootstrap-2.3.2 (css &amp; js)\"> bootstrap-2.3.2 (css &amp; js)</option>\n<option value=\"bootstrap-3.3.7 (css &amp; js)\"> bootstrap-3.3.7 (css &amp; js)</option>\n<option value=\"bootstrap-4.0.0 (css &amp; js)\" selected=\"selected\"> bootstrap-4.0.0 (css &amp; js)</option>\n<option value=\"dszparallexer\" selected=\"selected\"> dszparallexer</option>\n<option value=\"fontawesome v4.7.0\" selected=\"selected\"> fontawesome v4.7.0</option>\n<option value=\"fontawesome v5.10.1\"> fontawesome v5.10.1</option>\n<option value=\"fontawesome v5.11.2 Pro (don\\'t use with version 4)\"> fontawesome v5.11.2 Pro (don\\'t use with version 4)</option>\n<option value=\"fontawesome v5.11.2 Pro (use only with version 4)\" selected=\"selected\"> fontawesome v5.11.2 Pro (use only with version 4)</option>\n ';\n\n return $html;\n }", "function shapeSpace_remove_version_scripts_styles($src) {\n\tif (strpos($src, 'ver=')) {\n\t\t$src = remove_query_arg('ver', $src);\n\t}\n\treturn $src;\n}", "protected function http_version()\n {\n }", "function po_rss_version() { return ''; }", "function _remove_script_version( $src ){\n$parts = explode( '?ver', $src );\nreturn $parts[0];\n}", "function wap8_version_cache() {\n\t// Theme version number for caching purposes\n\treturn '1.1.0';\n}", "public function my_footer_version()\n {\n return '';\n }", "function tlh_rss_version() {\n\treturn '';\n}", "function shapeSpace_remove_version_scripts_styles($src) {\n if (strpos($src, 'ver=')) {\n $src = remove_query_arg('ver', $src);\n }\n return $src;\n}", "function version() {\r\n return(\"4.0\");\r\n }", "public function version(){\n\t\t/*echo \"<pre>\";\n\t\tprint_r($this->dataInfos['XMLPM']['VERSION']);\n\t\techo \"</pre>\";*/\n\t\t$version = $this->dataInfos['XMLPM']['VERSION'];\n\t\tif($version!=\"\") return $version;\n\t\treturn \"1.0\";\n\t}", "function version() \n {\n return \"@package_version@\";\n }", "public static function getVersion()\r\n {\r\n \t$i = self::getVersionInfo();\r\n \treturn trim(\"{$i['major']}.{$i['minor']}.{$i['revision']}\" . ($i['patch'] != '' ? \".{$i['patch']}\" : \"\")\r\n \t. \"-{$i['stability']}{$i['number']}\", '.-');\r\n }", "function bft_remove_version() {\n\treturn '';\n}", "function nc_netshop_get_cml_version($filename) {\n global $INCLUDE_FOLDER;\n // check file existance\n if (!file_exists($filename)) return false;\n // get info from file\n $import_file = fopen($filename, \"r\");\n $first_string = fgets($import_file);\n $second_string = fgets($import_file);\n fclose($import_file);\n nc_preg_match(\"/<\\?xml\\s+.*?encoding=\\\"([\\w\\d-]+)\\\".*?\\?>/is\", $first_string, $matches);\n $reqex = \"/<КоммерческаяИнформация\\s+.*?ВерсияСхемы=\\\"([\\d\\.]+)\\\".*?/is\";\n\n nc_preg_match($reqex, $second_string, $matches);\n $cml_version = isset($matches[1]) && str_replace(\".\", \"\", $matches[1]) >= 203 ? 2 : 1;\n // return version\n return $cml_version;\n}", "public function getVersion(): string;", "public function getVersion(): string;", "function _remove_script_version( $src ){\n\t\t\t$parts = explode( '?ver', $src );\n\t\t\treturn $parts[0];\n\t\t}", "public function version()\n {\n\n }", "function echo_src_archive_2($title, $internal_name, $github_name, $engine_ver)\n {\n $version_const_name = 'VERSION_' . strtoupper($internal_name);\n $version = constant($version_const_name);\n\n echo '<dt>' . $title . ' source code:</dt><dd><p><b>Stable version</b>: ' .\n sf_download_link('Download sources of ' . $title,\n $internal_name . '-' . $version . '-src.tar.gz');\n\n if ($engine_ver == VERSION_CASTLE_GAME_ENGINE) {\n echo '. <br>The stable version is compatible with the latest ';\n download_engine_version($engine_ver);\n echo '.';\n } else\n if ($engine_ver == 'github') {\n echo '. <br>The stable version was tested with the latest <a href=\"https://github.com/castle-engine/castle-engine/\">(unstable) Castle Game Engine on GitHub</a>. (As soon as the next CGE will be released, this will be updated to depend on a stable engine version).';\n } else\n if ($engine_ver != '') {\n echo '. <br>The stable version is compatible with the ';\n download_engine_version($engine_ver);\n } else\n {\n throw new Exception('Invalid engine_ver');\n }\n\n ?>\n\n <p><b>Unstable (latest) version</b>: You can download it from the GitHub:\n <a href=\"https://github.com/castle-engine/<?php echo $github_name; ?>\">https://github.com/castle-engine/<?php echo $github_name; ?></a><br>\n It is compatible with the <a href=\"https://github.com/castle-engine/castle-engine/\">latest Castle Game Engine version from GitHub</a>.\n </dd>\n\n <?php\n }", "public function veriCode() {}", "function bajweb_remove_meta_version() {\n\treturn '';\n}", "function skin_diff_main_overview($content) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<script type=\"text/javascript\" src='{$this->ipsclass->skin_acp_url}/acp_template.js'></script>\n<div class='tableborder'>\n <div class='tableheaderalt'>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td align='left' width='95%' style='font-size:12px; vertical-align:middle;font-weight:bold; color:#FFF;'>Отчет сравнения стилей</td>\n </tr>\n</table>\n </div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td class='tablesubheader' width='90%'><strong>Название</strong></td>\n <td class='tablesubheader' width='5%'>Создано</a>\n <td class='tablesubheader' width='5%'>&nbsp;</a>\n </tr>\n $content\n </table>\n <div align='right' class='tablefooter'>&nbsp;</div>\n</div>\n<br />\n<form action='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=skin_diff' enctype='multipart/form-data' method='POST'>\n<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />\n<div class='tableborder'>\n <div class='tableheaderalt'>Создать новый отчет сравнения стилей</div>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td class='tablerow1'><strong>Введите название</strong><div class='desctext'>Это название будет использовано в списке выше, когда сравнение будет завершено</div></td>\n <td class='tablerow2'><input class='textinput' type='text' size='30' name='diff_session_title' /></td>\n </tr>\n <tr>\n <td class='tablerow1'><strong>Пропускать все новые/ошибочные шаблоны?</strong><div class='desctext'>Если вы сравниваете старый ipb_templates.xml из более старого IPB, вы можете отключить этот пункт. Если вы сравниваете с XML файлом из измененного стиля, вы должны включить этот пункт.</div></td>\n <td class='tablerow2'><input class='textinput' type='checkbox' value='1' name='diff_session_ignore_missing' /></td>\n </tr>\n <tr>\n <td class='tablerow1'><strong>Выберите корректный файл «ipb_templates.xml».</strong><div class='desctext'>Будет произведено сравнение с HTML шаблонами главного стиля</div></td>\n <td class='tablerow2'><input class='textinput' type='file' size='30' name='FILE_UPLOAD' /></td>\n </tr>\n </table>\n <div align='center' class='tablefooter'><input type='submit' class='realbutton' value='Импортировать' /></div>\n</div>\n</form>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public function version() {\n $versionsTable = TableRegistry::get('Versions');\n $data = $versionsTable->findAllVersion();\n $this->set('web', $data[0]);\n $this->set('iOS', $data[1]);\n $this->set('android', $data[2]);\n }", "public function getResourceVersion();", "public function page_check_version()\n\t{\n\t\tif (!$content = Http::get_file_on_server(FSB_REQUEST_SERVER, FSB_REQUEST_VERSION, 10))\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\t$content = explode(\"\\n\", $content);\n\n\t\tif (count($content) < 3)\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\tif (strpos('http', $content[2]) === false)\n\t\t{\n\t\t\tarray_shift($content);\n\t\t}\n\n\t\t@list($last_version, $url, $level) = $content;\n\t\t$last_version = trim($last_version);\n\n\t\t// Aucune redirection\n\t\tFsb::$session->data['u_activate_redirection'] = 2;\n\n\t\tif (!is_last_version(Fsb::$cfg->get('fsb_version'), $last_version))\n\t\t{\n\t\t\tDisplay::message(sprintf(Fsb::$session->lang('adm_old_version'), $last_version, Fsb::$cfg->get('fsb_version'), $url, $url, Fsb::$session->lang('adm_version_' . trim($level))) . '<br /><br />' . sprintf(Fsb::$session->lang('adm_click_view_newer'), $url));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDisplay::message('adm_version_ok', 'index.' . PHPEXT, 'index_adm');\n\t\t}\n\t}", "function adminbartweak_version() {return \"1.0.0\";}", "function wpb_remove_version() {\nreturn '';\n}", "function cms_version(): string {\n $v = new UliCMSVersion();\n return implode('.', $v->getInternalVersion());\n}" ]
[ "0.7347078", "0.6888472", "0.66132015", "0.651782", "0.6430769", "0.63862866", "0.63454545", "0.6319209", "0.6319209", "0.62528956", "0.6243193", "0.6224757", "0.6224757", "0.6224757", "0.6224757", "0.6224757", "0.61367357", "0.6129585", "0.60586226", "0.6036473", "0.6009289", "0.59921163", "0.5974194", "0.5974194", "0.5974194", "0.5974194", "0.5967555", "0.59612525", "0.5944945", "0.59323436", "0.5895492", "0.587504", "0.586092", "0.5851032", "0.5819288", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58124536", "0.58118993", "0.58077693", "0.58065695", "0.58021414", "0.57990414", "0.5764204", "0.5752067", "0.57512623", "0.5750807", "0.5744741", "0.57390726", "0.57151955", "0.5710846", "0.5709644", "0.570436", "0.57016605", "0.5695364", "0.5694434", "0.5680587", "0.5678006", "0.5671155", "0.56615204", "0.5646338", "0.56391454", "0.5638654", "0.5630426", "0.562817", "0.5627398", "0.5626523", "0.5620691", "0.5617194", "0.5617194", "0.5607253", "0.5590755", "0.55891573", "0.5583627", "0.5572883", "0.55701405", "0.5566938", "0.556179", "0.5559118", "0.5556174", "0.55545175", "0.55450153" ]
0.0
-1
/ version minimificada de css =>
function minify_css($input) { if(trim($input) === "") return $input; return preg_replace( array( // Remove comment(s) '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')|\/\*(?!\!)(?>.*?\*\/)|^\s*|\s*$#s', // Remove unused white-space(s) '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\'|\/\*(?>.*?\*\/))|\s*+;\s*+(})\s*+|\s*+([*$~^|]?+=|[{};,>~+]|\s*+-(?![0-9\.])|!important\b)\s*+|([[(:])\s++|\s++([])])|\s++(:)\s*+(?!(?>[^{}"\']++|"(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')*+{)|^\s++|\s++\z|(\s)\s+#si', // Replace `0(cm|em|ex|in|mm|pc|pt|px|vh|vw|%)` with `0` '#(?<=[\s:])(0)(cm|em|ex|in|mm|pc|pt|px|vh|vw|%)#si', // Replace `:0 0 0 0` with `:0` '#:(0\s+0|0\s+0\s+0\s+0)(?=[;\}]|\!important)#i', // Replace `background-position:0` with `background-position:0 0` '#(background-position):0(?=[;\}])#si', // Replace `0.6` with `.6`, but only when preceded by `:`, `,`, `-` or a white-space '#(?<=[\s:,\-])0+\.(\d+)#s', // Minify string value '#(\/\*(?>.*?\*\/))|(?<!content\:)([\'"])([a-z_][a-z0-9\-_]*?)\2(?=[\s\{\}\];,])#si', '#(\/\*(?>.*?\*\/))|(\burl\()([\'"])([^\s]+?)\3(\))#si', // Minify HEX color code '#(?<=[\s:,\-]\#)([a-f0-6]+)\1([a-f0-6]+)\2([a-f0-6]+)\3#i', // Replace `(border|outline):none` with `(border|outline):0` '#(?<=[\{;])(border|outline):none(?=[;\}\!])#', // Remove empty selector(s) '#(\/\*(?>.*?\*\/))|(^|[\{\}])(?:[^\s\{\}]+)\{\}#s' ), array( '$1', '$1$2$3$4$5$6$7', '$1', ':0', '$1:0 0', '.$1', '$1$3', '$1$2$4$5', '$1$2$3', '$1:0', '$1$2' ), $input); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function css();", "public static function css();", "public static function getCssRevision()\n {\n return 16;\n }", "public function build_css() {\n\t\t\t\n\t\t}", "function SA_dev_register_style($handle, $src, $ver){echo '<link rel=\"stylesheet\" href=\"'.$src.'\" type=\"text/css\" charset=\"utf-8\" />'.\"\\n\";}", "function cc_css() {\n\t// This makes sure that the positioning is also good for right-to-left languages\n\t$x = is_rtl() ? 'left' : 'right';\n\n\techo \"\n\t<style type='text/css'>\n\t#content_commander_logo {\n\t\tfloat: $x;\n\t\tpadding-$x: 2px;\n\t\tpadding-top: 2px;\t\t\n\t\tmargin: 0;\n\t\theight: 22px;\n\t}\n #arb_html {\n width: 50%; \n min-height: 300px;\n }\n\t</style>\n\t\";\n}", "protected function generateCSS() {}", "function cssuni($name)\n{\n\t$cssbegin = '<link rel=\"stylesheet\" href=\"';\n\t$cssend = '\">';\n//\tif (current_user_can('administrator')) $csspath = '/css/';\n\t$csspath = '/css/'; //$csspath='/css/';\n\t$filename = get_stylesheet_directory() . $csspath . $name;\n\tif (file_exists($filename)) return $cssbegin . get_template_directory_uri() . $csspath . $name . '?v=' . filemtime($filename) . $cssend;\n\treturn $cssbegin . get_template_directory_uri() . $csspath . $name . $cssend;\n}", "private function addCSS()\n {\n Filters::add('head', array($this, 'renderRevisionsCSS'));\n }", "public function get_cssAdmin(){\n \n return BASE_URL.\"wear/\".$this->back.\"/\".\"css/\";\n \n }", "function head_css()\n{\n return get_view()->headLink() . get_view()->headStyle();\n}", "public function formatCSS() {\n echo $this->head;\n echo \"<link rel='stylesheet' href='desktop.css'>\";\n }", "function wpgrade_noversion_css_js( $src ) {\r\n if ( strpos( $src, 'ver=' ) )\r\n $src = remove_query_arg( 'ver', $src );\r\n return $src;\r\n}", "function fragmention_insert_head_css($flux) {\n\tstatic $vu = false;\n\n\n\tif (!$vu) {\n\t\t$flux .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.find_in_path('css/fragmention.css').'\" media=\"all\" />'.\"\\n\";\n\t\t$vu = true;\n\t}\n\treturn $flux;\n}", "private function _include_css()\n {\n if ( !$this->cache['css'] )\n {\n $this->EE->cp->add_to_head('<style type=\"text/css\">\n .vz_range { padding-bottom:0.5em; }\n .vz_range input { width:97%; padding:4px; }\n .vz_range_min { float:left; width:46%; }\n .vz_range_max { float:right; width:46%; }\n .vz_range_sep { float:left; width:8%; text-align:center; line-height:2; }\n</style>');\n\n $this->cache['css'] = TRUE;\n }\n }", "public function getCompressCss() {}", "public function ActiveCSS() {\r\n\t\t$url = $_SERVER [\"REQUEST_URI\"];\r\n\t\t$url = htmlspecialchars ( $url );\r\n\t\t$class = str_replace ( '/', '-', $url );\r\n\t\t$class = substr ( $class, 1 );\r\n\t\t\r\n\t\t$vowels = array (\"@\", \"?\" );\r\n\t\t$pieces['request'] = str_replace ( $vowels, \"\", $class );\r\n\t\tif (empty($pieces['request'])) {\r\n\t\t\t$pieces['request'] = 'home';\r\n\t\t}\r\n\t\t\r\n\t\t$pieces['version'] = 'v1';\r\n\t\t$activecss = implode (' ', $pieces );\r\n\t\techo $activecss;\r\n\t}", "function ft_hook_add_css() {}", "function css()\n{\n\t$cssbegin = '<link rel=\"stylesheet\" href=\"';\n\t$cssend = '\">';\n//\tif (current_user_can('administrator')) $csspath = '/css/';\n\t$csspath = '/css/'; //$csspath='/css/';\n\t$name = substr(basename(get_page_template()), 0, -4) . '.css';\n\t$filename = get_stylesheet_directory() . $csspath . $name;\n\tif (file_exists($filename)) return $cssbegin . get_template_directory_uri() . $csspath . $name . '?v=' . filemtime($filename) . $cssend;\n\telse { //create new file if no exists\n\t\t$fp = fopen($filename, \"w\");\n\t\tfwrite($fp, 'This is new file, add your styles @media(min-width:992px){} @media(max-width:991px) and (min-width:601px){} @media(max-width:600px){}');\n\t\tfclose($fp);\n\t\treturn $cssbegin . get_template_directory_uri() . $csspath . $name . $cssend;\n\t}\n}", "public function selloCSS() \n {\n \t$style = '.sello-module {\n\t\t\tposition: absolute;\n\t\t\ttop: 0%;\n\t\t\twidth: 20%;\n\t\t\theight: auto;\n\t\t\tright: 0;\n\t\t}\n\n\t\t.sello-module .img-sello-module {\n\t\t\twidth: 80%;\n\t\t\tdisplay: block;\n\t\t\tmargin: 0 auto;\n\t\t}';\n\n\t\treturn $style;\n }", "protected function _css()\n\t{\n\t\tif ( !self::$_firstRun ) return '';\n\t\tself::$_firstRun = FALSE;\n\n\t\t$dir = KINT_DIR . 'view/' . ( self::$devel ? 'src/' : '' ); // load uncompressed sources if in devel mode\n\n\t\treturn '<script>' . file_get_contents( $dir . 'kint.js' ) . '</script>'\n\t\t\t. '<style>' . file_get_contents( $dir . 'kint.css' ) . '</style>';\n\t}", "function css($arquivo);", "function remove_cssjs_ver( $src ) {\nif( strpos( $src, '?ver=' ) )\n$src = remove_query_arg( 'ver', $src );\nreturn $src;\n}", "function remove_cssjs_ver( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function remove_cssjs_ver( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "public function admin_css() {\n\t\t\treturn '';\n\t\t}", "function css( $params ){\n\t\n\t\tglobal $mainframe;\n\t\t\n\t\t$document =& JFactory::getDocument();\n\t\t\n\t\t$cssFile = 'ja_contentslide.css';\n\t\n\t\tif( file_exists(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.$cssFile) ) {\n\t\t\t$document->addStyleSheet( JURI::base().'templates/'.$mainframe->getTemplate().'/css/'.$cssFile );\n\t\t} else { \n\t\t\t$document->addStyleSheet( JURI::base().'modules/mod_ja_contentslide/assets/css/'.$cssFile );\n\t\t}\n\t}", "function theme_remove_wp_ver_css_js($src) {\n if ( strpos($src, 'ver=') ) {\n $src = remove_query_arg('ver', $src);\n }\n return $src;\n}", "function vc_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function flexfour_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "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}", "function v2_mumm_css_alter(&$css) {\n $path = drupal_get_path('theme', 'v2_mumm');\n if ($_GET['q'] === 'outdated-browser') {\n unset($css[$path . '/css/style.css']);\n }\n else {\n unset($css[$path . '/css/unsupported-browsers.css']);\n }\n}", "public function getCss();", "public function getCss();", "function vc_remove_wp_ver_css_js( $src )\n{\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function borealis_css() {\n\t// This makes sure that the positioning is also good for right-to-left languages\n\t$x = is_rtl() ? 'left' : 'right';\n\n\techo \"\n\t<style type='text/css'>\n\t#seymour {\n\t\tfloat: $x;\n\t\tpadding-$x: 15px;\n\t\tpadding-top: 5px;\n\t\tmargin: 0;\n\t\tfont-size: 11px;\n\t}\n\t</style>\n\t\";\n}", "function bones_remove_wp_ver_css_js($src)\n{\n\tif (strpos($src, 'ver='))\n\t\t$src = remove_query_arg('ver', $src);\n\treturn $src;\n}", "function css_src($file, $dir = 'css', $version = OMEKA_VERSION)\n{\n return src($file, $dir, 'css', $version);\n}", "function pd_remove_wp_ver_css_js($src)\n{\n if (strpos($src, 'ver='))\n $src = remove_query_arg('ver', $src);\n return $src;\n}", "function remove_cssjs_ver($src) {\n\t\t\t\tif( strpos($src, '?ver=') )\n\t\t\t\t\t$src = remove_query_arg('ver', $src);\n\t\t\t\treturn $src;\n\t\t\t}", "public function getConcatenateCss() {}", "private function SiteBasicCss() {\n $basiccss = '';\n $basiccss .=$this->coreCss();\n $basiccss .=$this->siteFonts();\n //$basiccss .=$this->otherCss();\n return $basiccss;\n }", "function basecss_pied_de_biche($head){\n\t$search = \"<link\";\n\tif (preg_match(\",<link\\s[^>]*stylesheet,Uims\", $head, $match))\n\t\t$search = $match[0];\n\t$p = stripos($head, $search);\n\t$h = recuperer_fond('inclure/basecss-head',array());\n\t$h = \"\\n\".trim($h).\"\\n\";\n\n\t$head = substr_replace($head, $h, $p, 0);\n\treturn $head;\n}", "public function renderCSS()\n {\n }", "function po_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) ) $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function AbbcCss()\r\n{\r\n\tglobal $UNB;\r\n\treturn '@import url(' . $UNB['LibraryURL'] . 'abbc.css.php);';\r\n}", "function article_css() {\n return Registry::prop('article', 'css');\n}", "public function css()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n $files = $dir->scanRecursive(\"*.css\");\n\n echo \"\\nMinifying Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // Skip all foo.#.js (e.g foo.52.js) which are files from a previous build\n if (is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)))\n continue;\n\n /**\n * @var $destFile \\Ninja\\File\n */\n $destFile = $sourceFile->getParent()->ensureFile($sourceFile->getName(true) . '.' . self::REVISION . '.' . $sourceFile->getExtension());\n\n $destFile->write(\\Minify_Css::process($sourceFile->read()));\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n\n unset($sourceFile);\n }\n }", "public function get_custom_css()\n {\n }", "function echotheme_refresh_mce( $ver ) {\n\t$ver += 3;\n\treturn $ver;\n}", "public function css() {\n\t\theader(\"Content-Type: text/css\");\n\t\techo file_get_contents(APPPATH.'third_party/blog/css/mojoblog.css');\n\t}", "function bulledev_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function shapeSpace_remove_version_scripts_styles($src) {\n\tif (strpos($src, 'ver=')) {\n\t\t$src = remove_query_arg('ver', $src);\n\t}\n\treturn $src;\n}", "function my_login_stylesheet() {\n\n\tglobal $stylesVersion;\n\n ?>\n <link rel=\"stylesheet\" id=\"custom_wp_admin_css\" href=\"<?php echo get_bloginfo( 'stylesheet_directory' ) . '/style-login.css?v=' . $stylesVersion; ?>\" type=\"text/css\" media=\"all\" />\n<?php }", "function vc_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function css()\n {\n # determine the media\n global $TMPL;\n $media = ( $temp = $TMPL->fetch_param('media') ) ? 'media=\"' . $temp . '\"' : '';\n \n return ( '<link rel=\"stylesheet\" type=\"text/css\" ' . $media .\n ' href=\"http://gist.github.com/stylesheets/gist/embed.css\" />' );\n }", "function anva_custom_css() {\n\t$styles = '';\n\t$custom_css = anva_get_option( 'custom_css' );\n\t$custom_css = anva_compress( $custom_css );\n\tif ( ! empty( $custom_css ) ) {\n\t\t$styles = '<style type=\"text/css\">' . $custom_css . '</style>';\n\t}\n\techo $styles; \n}", "function ecomaster_scripts() {\n wp_enqueue_style( 'ecomaster-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );\n}", "protected function doCompressCss() {}", "public function css_includes()\n {\n }", "function shoestrap_generateCSS() {\n global $smof_details;\n $old = get_theme_mod( 'shoestrap_customizer_preSave' );\n remove_theme_mod( 'shoestrap_customizer_preSave' ); // Cleanup\n $new = get_theme_mods();\n\n foreach ( $smof_details as $key=>$option ) {\n if ( $option['less'] == true ) {\n if ( $old[$option['id']] != $new[$option['id']] ) {\n shoestrap_makecss();\n break;\n }\n }\n }\n}", "function oh_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function shapeSpace_remove_version_scripts_styles($src) {\n if (strpos($src, 'ver=')) {\n $src = remove_query_arg('ver', $src);\n }\n return $src;\n}", "function remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "function remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "function addHeaderCode() {\r\n echo '<link type=\"text/css\" rel=\"stylesheet\" href=\"' . plugins_url('css/bn-auto-join-group.css', __FILE__).'\" />' . \"\\n\";\r\n}", "function sdt_remove_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "function spartan_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function yoda_css() {\n\techo \"\n\t<style type='text/css'>\n\t#yoda {\n\t\tfloat: right;\n\t\tpadding: 5px 10px;\n\t\tmargin: 0;\n\t\tfont-size: 12px;\n line-height: 1.6666;\n color: green;\n\n\t}\n\n\t.table{\n\t\ttext-align: center;\n\t}\n\t.rtl #yoda {\n\t\tfloat: left;\n\t}\n\t.block-editor-page #yoda {\n\t\tdisplay: none;\n\t}\n\t@media screen and (max-width: 782px) {\n\t\t#yoda,\n\t\t.rtl #yoda {\n\t\t\tfloat: none;\n\t\t\tpadding-left: 0;\n\t\t\tpadding-right: 0;\n\t\t}\n\t}\n\t</style>\n\t\";\n}", "private function _addCss() {\r\n JHtml::styleSheet( Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');\r\n }", "public function styles(){\n\n\t\t//wp_enqueue_style('component-header_fixed-style', $this->directory_uri . '/assets/dist/css/headerFixed.css');\n\t}", "function svs_css_customizer() {\n\t?>\n\t<style type = \"text/css\">\n\t\n\t\tbody { background-color: #<?php echo get_theme_mod('background_color'); ?>;}\n\t\t\n\t\th1,h2,h3,h4,h5,h6,h7,h8 {color: <?php echo get_theme_mod('headers_color'); ?>;}\n\t\t\n\t\ta {\tcolor: <?php echo get_theme_mod('link_color'); ?>;}\n\t\t\n\t\ta:hover, a:focus { color: <?php echo get_theme_mod('link_hover_color'); ?>;}\n\t\n\t<?php\n\t$content_layout = get_theme_mod('content_layout_setting');\n\n\tif ($content_layout == 'compressed') : ?>\n\t\t\n\t\t.the-post {\n\t\t\twidth: 95%;\n\t\t\theight: 100%; <!-- important!!! -->\n\t\t\tmargin: 5px 0 15px 0;\n\t\t\tborder-bottom: 1px solid #eee;\n\t\t}\n\t\t\n\t\t.vid-col {\n\t\t\twidth: 100%;\n\n\t\t}\n\t\t\n\t\t.vid-title {\n\t\t\tmargin-bottom: 5px;\n\t\t}\n\t\t\n\t\t.content-show, .content-hide {\n\t\t\tfont-size: 11px;\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.content-layout{ display: none;}\n\t\t\n\t\n\t<?php endif;?>\n\t\t\n\t</style>\n\t\n\t<?php\n}", "private function coreCss() {\n $corecss = '';\n $corecss .= ' <!-- CSS Files -->\n <link rel=\"stylesheet\" href=\" ' . $this->baseUrl(\"assets/css/normalize.css\") . ' \">\n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"assets/css/bootstrap.min.css\") . '\"/>\n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"assets/css/material-kit.css\") . '\"/>\n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"assets/css/animate.css\") . '\">\n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"assets/css/link-effects.css\") . '\">\n \n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"plugins/mdb/css/mdb.min62d0.css\") . '\">\n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"plugins/Simple-Background-Carousel-Plugin-with-jQuery-and-Animate-css-Crosscover/dist/css/crosscover.css\") . '\">\n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"plugins/x-hipster-as-f-cards-v1.1/assets/css/hipster_cards.css\") . '\">\n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"plugins/Waves-master/dist/waves.min.css\") . '\">\n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"plugins/odometer-master/odometer-theme-default.css\") . '\"> \n <link rel=\"stylesheet\" href=\"' . $this->baseUrl(\"plugins/bootstrap-select-1.10.0/dist/css/bootstrap-select.css\") . '\"> \n \n ';\n\n return $corecss;\n }", "protected function loadCss() {}", "function tlh_remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' ) ) {\n\t\t$src = remove_query_arg( 'ver', $src );\n\t}\n\treturn $src;\n}", "function mdwpfp_remove_wp_ver_css_js($src) {\n if (strpos($src, 'ver='))\n $src = remove_query_arg('ver', $src);\n return $src;\n}", "function ra_builder_css()\n\t\t{\n\t\t\t$this->output('<meta name=\"generator\" content=\"rahularyan\">');\n\t\t\tif($this->template == 'user'){\n\t\t\t\tif(defined('QA_WORDPRESS_INTEGRATE_PATH')){\n\t\t\t\t\t$id = $this->content['raw']['userid'];\n\t\t\t\t\t$cover = get_user_meta( $id, 'cover' );\n\t\t\t\t\t$cover = $cover[0];\n\t\t\t\t}else{\n\t\t\t\t\t@$cover = ra_user_profile(@$this->content['raw']['account']['handle'], 'cover');\n\t\t\t\t}\n\t\t\t\tif($cover)\n\t\t\t\t\t$this->output('<style>#user .user-bar{background:url(\"'.qa_opt('site_url').'images/'.$cover.'\") no-repeat scroll 0 0 / cover;}</style>');\n\t\t\t\t\n\t\t\t}\n\t\t\tif(ra_is_home()){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_home').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'questions'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_questions').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'unanswered'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_unanswered').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'tags'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_tags').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'categories'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_categories').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'users'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_users').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'user'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_user').ra_db_builder('css_bottom').'</style>');\n\t\t\t}\n\t\t}", "function manofbytes_remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' ) ) {\n\t\t$src = remove_query_arg( 'ver', $src );\n\t}\n\treturn $src;\n}", "public static function css() {\r\n\t\t\t$s = '';\r\n\t\t\tforeach(func_get_args() as $css) {\r\n\t\t\t\t$file = WEB_ROOT . '/' . $css;\r\n\t\t\t\tif(!file_exists($file)) {\r\n\t\t\t\t\tABPF::logger()->error(\"CSS file $file doesn't exist!\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$v = filemtime($file);\r\n\t\t\t\t$s .= sprintf('<link rel=\"stylesheet\" type=\"text/css\" href=\"%s/%s?v=%d\" />', BASE_URL, $css, $v);\r\n\t\t\t}\r\n\t\t\treturn $s;\r\n\t\t}", "function cpt_webtonio_head(){\t\n\techo \"<link type='text/css' rel='stylesheet' href='\" . get_bloginfo(\"template_url\") . \"/css/cpt-admin.css\".\"' />\";\n\n}", "function get_css_header();", "function my_refresh_mce($ver) {\r\n\t\t\r\n\t $ver += 3;\r\n\t return $ver;\r\n\t \r\n\t}", "private function \t\t\t\tbuild_style_tags() {\n\t\t$load=array(\n\t\t\t\"assets/css/bootstrap/bootstrap-grid.min.css\",\n\t\t\t\"assets/css/bootstrap/bootstrap-reboot.min.css\",\n\t\t\t\"assets/css/bootstrap/bootstrap.min.css\",\n\t\t\t\"assets/css/fontawesome/all.min.css\",\n\t\t\t\"assets/css/style.css\"\n\t\t);\n\n\n\t\treturn array_reduce(array_unique(array_merge($load, $this->section_css)), function($_acum, $_item) {\n\t\t\t$_acum.=<<<R\n\n\t\t<link rel=\"stylesheet\" title=\"estilos\" type=\"text/css\" href=\"{$_item}\" media=\"screen\" />\nR;\n\t\t\treturn $_acum;\n}, '');\n\t}", "function wplastfm_css() {\r\n $relpath = '/'.dirname(plugin_basename(__FILE__)).'/wplastfm.css';\r\n if (file_exists(WP_PLUGIN_DIR.$relpath)) {\r\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.WP_PLUGIN_URL.$relpath.'\" />'.\"\\n\";\r\n }\r\n }", "function vip_admin_gallery_css_extras() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "function zilla_custom_css($content) {\n\t\t$zilla_values = get_option( 'zilla_framework_values' );\n\t\tif( array_key_exists( 'style_custom_css', $zilla_values ) && $zilla_values['style_custom_css'] != '' ){\n\t\t\t$content .= '/* Custom CSS */' . \"\\n\";\n\t\t\t\t$content .= stripslashes($zilla_values['style_custom_css']);\n\t\t\t\t$content .= \"\\n\\n\";\n\t\t}\n\t\treturn $content;\n\t\t\n}", "function ws_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "public function enableConcatenateCss() {}", "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 locale_stylesheet()\n {\n }", "function cookiebar_insert_head_css($flux){\n $flux .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.find_in_path(\"css/jquery.cookiebar.css\").'\" />';\n return $flux;\n}", "public function enableCompressCss() {}", "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}", "function prop_remove_cssjs_ver( $src ) {\n\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n\n}", "function thememount_min_css(){\n\tglobal $howes;\n\t\n\t// Checking if MIN enabled\n\tif(!is_admin()) {\n\t\tif( isset($howes['minify-css-js']) && $howes['minify-css-js']=='0' ){\n\t\t\tdefine('TM_MIN', '');\n\t\t} else {\n\t\t\tdefine('TM_MIN', '.min');\n\t\t}\n\t}\n}", "function dw2_header_prive($flux) {\r\n\t\t$flux .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'._DIR_PLUGIN_DW2.'dw2_styles.css\" />'.\"\\n\";\r\n\t\t$flux .= '<script type=\"text/javascript\" src=\"'._DIR_PLUGIN_DW2.'dw2_back.js\"></script>'.\"\\n\";\r\n\t\treturn $flux;\r\n\t}", "function output_css() {\n\t\t\techo $this->get_css();\n\t\t}", "function remove_css_js_version( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function custom_remove_cssjs_ver( $src ) {\n\tif ( strpos( $src, '?ver=' ) ) {\n\t\t$src = remove_query_arg( 'ver', $src );\n\t}\n\n\treturn $src;\n}", "function studeon_vc_merge_styles($list) {\n\t\t$list[] = 'plugins/js_composer/js_composer.css';\n\t\treturn $list;\n\t}", "function omfg_mobile_pro_shortcode_styles() {\n\n\tglobal $omfgmobilepro_pluginroot;\n\n\techo '<link rel=\"stylesheet\" href=\"'.$omfgmobilepro_pluginroot.'shortcodes/shortcodes.css\">';\n\n}" ]
[ "0.6989226", "0.69082993", "0.68470657", "0.68090916", "0.6535704", "0.6479604", "0.6478211", "0.6450226", "0.644263", "0.6416634", "0.64081115", "0.6401576", "0.6377028", "0.6357637", "0.63272446", "0.6326733", "0.6275637", "0.6243151", "0.6241626", "0.6233753", "0.62233734", "0.62117004", "0.6209701", "0.6193071", "0.6193071", "0.6187077", "0.6168333", "0.6161555", "0.61508614", "0.61501366", "0.6147325", "0.6141248", "0.61277586", "0.61277586", "0.61104643", "0.6098286", "0.60880023", "0.60847306", "0.60701996", "0.6069841", "0.6067247", "0.6064346", "0.60610974", "0.6058045", "0.6057538", "0.60520077", "0.6044513", "0.6036596", "0.60308516", "0.6028994", "0.60230553", "0.6019848", "0.6014182", "0.6012278", "0.6011979", "0.6006108", "0.60029864", "0.5997372", "0.59914374", "0.59879285", "0.59842694", "0.59770536", "0.5976543", "0.59762233", "0.59762233", "0.59740305", "0.5969633", "0.5966167", "0.5957796", "0.59552723", "0.5951782", "0.59506947", "0.5947021", "0.59461105", "0.59413743", "0.5933125", "0.5932268", "0.59280455", "0.5925167", "0.5918817", "0.5917639", "0.58971405", "0.58967125", "0.58922803", "0.5888583", "0.5882685", "0.58755213", "0.5875506", "0.5874796", "0.586484", "0.5864212", "0.58600736", "0.5858408", "0.58547604", "0.5850459", "0.5849308", "0.584919", "0.5841945", "0.5835785", "0.58302796", "0.58206934" ]
0.0
-1
/ version minimificada de javascript =>
function minify_js($input) { if(trim($input) === "") return $input; return preg_replace( array( // Remove comment(s) '#\s*("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')\s*|\s*\/\*(?!\!|@cc_on)(?>[\s\S]*?\*\/)\s*|\s*(?<![\:\=])\/\/.*(?=[\n\r]|$)|^\s*|\s*$#', // Remove white-space(s) outside the string and regex '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\'|\/\*(?>.*?\*\/)|\/(?!\/)[^\n\r]*?\/(?=[\s.,;]|[gimuy]|$))|\s*([!%&*\(\)\-=+\[\]\{\}|;:,.<>?\/])\s*#s', // Remove the last semicolon '#;+\}#', // Minify object attribute(s) except JSON attribute(s). From `{'foo':'bar'}` to `{foo:'bar'}` '#([\{,])([\'])(\d+|[a-z_][a-z0-9_]*)\2(?=\:)#i', // --ibid. From `foo['bar']` to `foo.bar` '#([a-z0-9_\)\]])\[([\'"])([a-z_][a-z0-9_]*)\2\]#i' ), array( '$1', '$1$2', '}', '$1$3', '$1.$3' ), $input); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function js_2()\n {\n }", "public function js();", "public static function js();", "public function js_1()\n {\n }", "public function js()\n {\n }", "private function javascripter()\n {\n //@return : $stri_js => retourne le code javascript (return javascript)\n \n $stri_js=\"<script>\n function verif_form_page()\n {\n //vérification du formulaire (verify form)\n //@return : false => formulaire erroné (error)\n // void => valide le formulaire (submit form)\n \n // vérifie que le numéro de la page soit bien un chiffre (verify the n° of page is integer)\n if(isNaN(document.form_page.start.value))\n { \n alert('\"._ERROR_FIELD.\"'); //envoi du message d'erreur (send error message)\n document.form_page.start.focus(); //met le focus sur le textbox\n return false;\n }\n document.form_page.submit(); //valide le formulaire (submit form)\n }\n </script>\n \";\n \n return $stri_js; \n }", "function ajouter_liens_javascript($java)\n{\n\tif ($java == \"2\")\n\t{\n\t\t$javascript = ecrire_js();\n\t\t$javascript .= bbcode_js();\n\t}\n\telse\n\t{\n\t\t$javascript = \"\";\n\t}\n\treturn $javascript;\n}", "public function getCompressJavascript() {}", "abstract public function version();", "abstract public function version();", "function pulcherrimum_javascript_detection()\n {\n echo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n }", "public function getJavaScript() {}", "function wpgrade_noversion_css_js( $src ) {\r\n if ( strpos( $src, 'ver=' ) )\r\n $src = remove_query_arg( 'ver', $src );\r\n return $src;\r\n}", "public function version();", "public function version();", "public function version();", "public function version();", "public function version();", "function get_input_js($args){\n\t\t\n\t\t// nothing since 8.4\n\t}", "public function elementor_js() {\n }", "function libreriasJS(){\n\t\t$libreriasJAVA='<script type=\"text/javascript\" src=\"js/jquery-2.min.js\"></script>\n\t\t\t \t<script type=\"text/javascript\" src=\"js/jqueryui.js\"></script>\n\t\t\t \t<script type=\"text/javascript\" src=\"js/funComunes.js\"></script>\n\t\t\t \t<link type=\"text/css\" href=\"css/jquery-ui-min.css\" rel=\"stylesheet\" />\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n\t\treturn $libreriasJAVA;\n\t}", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "function remove_cssjs_ver($src) {\n\t\t\t\tif( strpos($src, '?ver=') )\n\t\t\t\t\t$src = remove_query_arg('ver', $src);\n\t\t\t\treturn $src;\n\t\t\t}", "function starter_javascript_detection() {\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "function twentyseventeen_javascript_detection() {\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "function version() {\r\n return(\"4.0\");\r\n }", "function jsuni($name)\n{\n\t$jsbegin = '<script type=\"text/javascript\" src=\"';\n\t$jsend = '\"></script>';\n\tif (current_user_can('administrator')) $jspath = '/js/';\n\telse $jspath = '/js/'; //$jspath='/js/';\n\t$filename = get_stylesheet_directory() . $jspath . $name;\n\tif (file_exists($filename)) return $jsbegin . get_template_directory_uri() . $jspath . $name . '?v=' . filemtime($filename) . $jsend;\n\treturn $jsbegin . get_template_directory_uri() . $jspath . $name . $jsend;\n}", "function zurpal_js_alter(&$javascript)\n{\n// Swap out jQuery to use an updated version of the library.\n $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.js';\n $javascript['misc/jquery.js']['version'] = '1.9.0';\n //drupal_static_reset('drupal_add_js');\n}", "function jscript();", "function en_javascript($valeurs,$dates) {\n\t\t\t$v = '[';\n\t\t\tfor ($i = 0; $i < count($valeurs); $i++) {\n\t\t\t\t$v = $v . '[\\'' . $dates[$i] . '\\',' . $valeurs[$i] . '] , ';\n\t\t\t}\n\t\t\t$v = substr($v,0,strlen($v)-3);\n\t\t\t$v = $v . ']';\n\t\t\treturn $v;\n\t\t}", "protected function generateJavascript()\n\t{\n\t}", "function sdt_remove_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "public static function getJsRevision()\n {\n return 3;\n }", "function elytra_javascript_detection() {\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "function bones_remove_wp_ver_css_js($src)\n{\n\tif (strpos($src, 'ver='))\n\t\t$src = remove_query_arg('ver', $src);\n\treturn $src;\n}", "function ajan_version() {\n\techo ajan_get_version();\n}", "public function getJs();", "function bl_version_head() {\r\n\techo '<meta name=\"generator\" content=\"Beaverlodge v' . EDD_BEAVERLODGE_VERSION . '\"/>' ;\r\n}", "function remove_cssjs_ver( $src ) {\nif( strpos( $src, '?ver=' ) )\n$src = remove_query_arg( 'ver', $src );\nreturn $src;\n}", "function remove_cssjs_ver( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function remove_cssjs_ver( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function js_detection() {\n\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "function _remove_script_version( $src ){\n$parts = explode( '?ver', $src );\nreturn $parts[0];\n}", "public function getHeadJavascript()\n\t{\n\n $url = Config::$url;\n $googleAnalyticsToken = Config::$googleAnalyticsToken;\n\n\t\treturn<<<js\n<script type=\"text/javascript\" data-comment=\"Google Analytics\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', '$googleAnalyticsToken']);\n _gaq.push(['_trackPageview']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n</script>\n\n<!-- package-javascript\nAll external javascript file, including the minified SNAP javascript,\nare listed here and in the project makefile to be bundled into a single\njavascript file. The 'package-javascript' and 'end-package' tokens\nare used to determine the region to be replaced with a single script inclusion.\n\nIf you add a file here, you must add it to the makefile for packaging. See the README in the js/ directory.\n-->\n<script src=\"js/underscore-min.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery-1.8.2.min.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery.blockUI.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery.hoverIntent.minified.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.cycle.all.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.url.js\" type=\"text/javascript\"></script>\n<script src=\"js/plugins.js\" type=\"text/javascript\"></script>\n<script src=\"js/highcharts.js\" type=\"text/javascript\"></script>\n<script src=\"js/exporting.src.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery-ui-1.8.24.custom.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.ba-hashchange.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.validate.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.ba-bbq.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.scrollTo-min.js\" type=\"text/javascript\"></script>\n\n<script src=\"js/licenseModal.js\" type=\"text/javascript\"></script>\n<script src=\"js/charts.js\" type=\"text/javascript\"></script>\n<script src=\"js/maps.js\" type=\"text/javascript\"></script>\n<!-- end-package -->\n\n<script type=\"text/javascript\">\n\n// Interpolate server-side configs as appropriate\nwindow.snapConfig = {\n url: '$url',\n geonetworkMetadataUrl: 'http://athena.snap.uaf.edu:8080/geonetwork/srv/en/metadata.show.embedded?id=',\n dataPath: '/data/'\n}\n</script>\n\njs;\n\t}", "function script()\n {\n }", "function wpg_javascript_detection() {\n echo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "function raiseit_javascript_detection() {\n\techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n\n}", "function getVersion() {\r\n\t\treturn '1.1';\r\n\t}", "function flexfour_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "public function detect_javascript() {\n\t\t\tif( ! defined( 'YIT' ) ):\n\t\t\t\t?>\n\t\t\t\t<script>document.documentElement.className = document.documentElement.className + ' yes-js js_active js'</script>\n\t\t\t<?php\n\t\t\tendif;\n\t\t}", "function adminbartweak_version() {return \"1.0.0\";}", "function pd_remove_wp_ver_css_js($src)\n{\n if (strpos($src, 'ver='))\n $src = remove_query_arg('ver', $src);\n return $src;\n}", "abstract public function get_version();", "function _remove_script_version( $src ){\n\t\t\t$parts = explode( '?ver', $src );\n\t\t\treturn $parts[0];\n\t\t}", "function _remove_script_version($src) {\n $parts = explode('?ver', $src);\n return $parts[0];\n}", "function material_press_remove_script_version( $src ) {\n \t$parts = explode( '?ver', $src );\n \treturn $parts[0];\n }", "function _remove_script_version( $src ){\n$parts = explode( '?', $src );\nreturn $parts[0];\n}", "function tlh_remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' ) ) {\n\t\t$src = remove_query_arg( 'ver', $src );\n\t}\n\treturn $src;\n}", "public function getJavascriptCode() {}", "function remove_css_js_version( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function material_press_javascript_detection() {\n \techo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js' )})(document.documentElement);</script>\\n\";\n }", "function flatsome_javascript_detection() {\n echo \"<script>(function(html){html.className = html.className.replace(/\\bno-js\\b/,'js')})(document.documentElement);</script>\\n\";\n}", "function theme_remove_wp_ver_css_js($src) {\n if ( strpos($src, 'ver=') ) {\n $src = remove_query_arg('ver', $src);\n }\n return $src;\n}", "function article_js() {\n return Registry::prop('article', 'js');\n}", "function manofbytes_remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' ) ) {\n\t\t$src = remove_query_arg( 'ver', $src );\n\t}\n\treturn $src;\n}", "function remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "function remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "private function j() {\n }", "function custom_remove_cssjs_ver( $src ) {\n\tif ( strpos( $src, '?ver=' ) ) {\n\t\t$src = remove_query_arg( 'ver', $src );\n\t}\n\n\treturn $src;\n}", "public function js_includes()\n {\n }", "function vc_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "public static function getJqueryCompatibility()\n\t{\n\t\treturn '\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjq13 = jQuery.noConflict(true); \n\t\t\t</script>\n\t\t\t<script type=\"text/javascript\" src=\"'.self::$moduleURL.'/jquery-1.4.4.min.js\"></script>';\n\t}", "function spartan_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "protected function initJavascriptCode() {}", "private function coreJs() {\n $corejs = '';\n $corejs .= '\n <script src=\"' . $this->baseUrl(\"assets/js/jquery.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/bootstrap.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/bootstrap-hover-dropdown.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/material.min.js\") . '\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/nouislider.min\") . '\"></script>\n <script src=\"' . $this->baseUrl(\"plugins/mdb/js/mdb.min.js\") . '\"></script>\n <script src=\"' . $this->baseUrl(\"plugins/mdb/js/tether.min.js\") . '\"></script>\n <script src=\"' . $this->baseUrl(\"plugins/x_lbd_free_v1.3/assets/js/pro/bootstrap-selectpicker.js\") . '\"></script>';\n\n return $corejs;\n }", "public function get_version();", "function remove_cssjs_ver( $src ) {\n\t$src = remove_query_arg( array('v', 'ver', 'rev'), $src );\n\treturn esc_url($src);\n}", "function jlc_scripts() {\r\n\t\r\n echo '<!--[if lt IE 9]>';\r\n echo '\t<script src=\"http://html5shim.googlecode.com/svn/trunk/html5.js\"></script>';\r\n echo '\t<script stc=\"'. TEMPPATH.'/js/respond.min.js\"></script>';\r\n echo '<![endif]-->';\r\n\t\r\n}", "function export_add_js()\n {\n }", "public function version()\n {\n\n }", "function getServerVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "public function getJs()\n\t{\n $ret = '<script>\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/'.$this->lang.'/all.js#xfbml=1\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, \"script\", \"facebook-jssdk\"));\n </script>';\n \n return $ret;\n\t}", "function generate_remove_cssjs_ver( $src ) {\n if ( strpos( $src, '?ver=' ) ) {\n $src = remove_query_arg( 'ver', $src );\n }\n return $src;\n}", "function js_tag($file, $dir = 'javascripts', $version = OMEKA_VERSION)\n{\n $href = src($file, $dir, 'js', $version);\n return '<script type=\"text/javascript\" src=\"' . html_escape($href) . '\" charset=\"utf-8\"></script>';\n}", "function oh_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function javascript( $params ){\n\t\n\t\t$document =& JFactory::getDocument();\n\t\t// if load mootools lib.\n\t\tif( $params->get('mootools') ) {\n\t\t\t$document->addScript( JURI::base().'modules/mod_ja_contentslide/js/mootools.v1.1.pak.js' );\n\t\t}\n\t\t$document->addScript( JURI::base().'modules/mod_ja_contentslide/assets/js/ja_contentslide.js' );\n\t}", "function po_remove_wp_ver_css_js( $src ) {\n if ( strpos( $src, 'ver=' ) ) $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function vc_remove_wp_ver_css_js( $src )\n{\n if ( strpos( $src, 'ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function mdwpfp_remove_wp_ver_css_js($src) {\n if (strpos($src, 'ver='))\n $src = remove_query_arg('ver', $src);\n return $src;\n}", "function versionPhp(){\r\n\t\t$test = phpversion();\r\n\t\t// on teste le premier chiffre\r\n\t\t$version = mb_substr($test, 0, 1);\r\n\t\tif ($version == 7) {\r\n\t\t\t$retour = '<span style=\"color: green;\">'.phpversion().' (Gepi nécessite php 5.2.x minimum)</span>';\r\n\t\t} elseif ($version == 5) {\r\n\t\t\t$retour = '<span style=\"color: green;\">'.phpversion().' (Gepi nécessite php 5.2.x minimum)</span>';\r\n\t\t} elseif($version == 4 AND mb_substr($test, 2, 2) >= 3){\r\n\t\t\t$retour = '<span style=\"color: green;\">'.phpversion().'(Attention, Gepi ne fonctionne pas avec cette version, elle est trop ancienne)</span>';\r\n\t\t}else{\r\n\t\t\t$retour = '<span style=\"color: red;\">'.phpversion().'(version ancienne !)</span>';\r\n\t\t}\r\n\t\treturn $retour;\r\n\t}", "function optionsproduits_insert_head($flux) {\n\t$flux .= \"<script type='text/javascript' src='\".timestamp(find_in_path('javascript/optionsproduits.js')).\"'></script>\";\n\treturn $flux;\n}", "function auto_update_javascript()\n\t{\n\t\treturn 'var zhoutQueue = [];var first_state_update = false;var autoTimeoutId = 0;var autoIntervalId =0; \n\t\t\t\tfunction autoUpdate()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (zhoutQueue.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//console.log(\\'%o\\',\\'masuk-2\\');\n\t\t\t\t\t autoIntervalId = setInterval(\\'fetchDataZhout()\\','.$this->_INTERVAL_TIME_AT_SECOND.');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (! first_state_update)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//console.log(\\'%o\\',\\'masuk-1\\');\n\t\t\t\t\t\t\tgetLatestZhout();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//console.log(\\'%o\\',\\'masuk\\');\n\t\t\t\t\t\tautoTimeoutId = setTimeout(\\'getLatestZhout()\\','.$this->_INTERVAL_TIME_AT_FIRST.');\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}';\n\t}", "protected function doCompressJavaScript() {}", "function sem_usaepay_js_header()\r\n{\r\n\twp_print_scripts( array('sack') );\r\n\t?>\r\n\t<script type='text/javascript'>\r\n\r\n\t</script>\r\n\t<?php\r\n}", "public function getConcatenateJavascript() {}", "function main()\n{\n\t\t$version = $_GET[\"version\"];\n\t\t$jsfile = DIR.\"/mxClient-$version.js\";\n\t\t\n\t\tdeliver(getScript($jsfile));\n}" ]
[ "0.6834386", "0.64720696", "0.64274794", "0.64174646", "0.619034", "0.6189757", "0.6187709", "0.6169745", "0.61534584", "0.61534584", "0.6108636", "0.6055908", "0.6047977", "0.60175663", "0.60175663", "0.60175663", "0.60175663", "0.60175663", "0.6005991", "0.5972561", "0.597208", "0.594897", "0.59472483", "0.5933619", "0.59298074", "0.58889335", "0.5887715", "0.58872974", "0.5881218", "0.58669", "0.58343357", "0.58269435", "0.5816295", "0.57897645", "0.5786119", "0.57849187", "0.5782122", "0.57768136", "0.577462", "0.57688165", "0.5749386", "0.5749386", "0.5749033", "0.5740564", "0.5728377", "0.5726003", "0.57219464", "0.5720731", "0.57067657", "0.5702185", "0.56979746", "0.5692296", "0.5686173", "0.568563", "0.56731915", "0.5668196", "0.56567985", "0.56550366", "0.5647151", "0.56443584", "0.5637762", "0.5627872", "0.5622826", "0.5617268", "0.5616913", "0.5615784", "0.5608046", "0.5608046", "0.5606944", "0.5604628", "0.5602103", "0.559971", "0.5588346", "0.55793625", "0.556409", "0.5563609", "0.5558694", "0.55567986", "0.5553784", "0.55524457", "0.55479133", "0.55433095", "0.5542726", "0.5542726", "0.5542726", "0.5542726", "0.55393595", "0.55345905", "0.5529623", "0.55293465", "0.55279356", "0.55265087", "0.5520829", "0.551437", "0.5513611", "0.5512418", "0.5510911", "0.55075705", "0.55060375", "0.55027246", "0.55019224" ]
0.0
-1
/ Limpia espacios, saltos de linea y comentarios en cadenas html
function limpiahtml($salida){ $regex = "/<script.*?>.*?<\/script>/ims"; preg_match_all($regex, $salida, $matches, null, 0); if(count($matches)>0){ $tags2add = ""; foreach($matches[0] as $tag){ if(!strstr($tag, "inmovil")){ $retag = $tag; $tag = JSMin::minify($tag); $tags2add .= $tag; $salida = str_replace($retag, "", $salida); } } } $salida = minify_html($salida); $salida = str_replace(array("</body>"),array($tags2add."</body>"),$salida); return $salida; echo preg_last_error(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChapterBody() {\n //$conn->SQL(\"select * from esquema.almacen_ubicacion\");\n\n\n\n\n //aqui metemos los parametros del contenido\n //$this->SetWidths(array(25,25,30,22,40,20));\n $this->SetWidths(array(10,30,22,22,25,21,23,25,32,20));\n //$this->SetAligns(array(\"C\",\"C\",\"C\",\"C\",\"C\",\"C\"));\n $this->SetAligns(array(\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\"));\n //$this->SetFillColor(232,232,232,232,232,232);\n $this->SetFillColor(232,232,232,232,232,232,232,232,232,232);\n // $cantidaditems = $this->array_movimiento[0][\"numero_item\"];\n\n $subtotal = 0;\n // for($i=0;$i<$cantidaditems;$i++) {\n // $this->SetLeftMargin(30);\n // $width = 5;\n // $this->SetX(14);\n // $this->SetFont('Arial','',7);\n\n // $this->Row(\n // array( $this->array_movimiento[$i][\"cod_item\"],\n // $this->array_movimiento[$i][\"descripcion1\"],\n // $this->array_movimiento[$i][\"cantidad_item\"]),1);\n\n // }\n $i = 0;\n foreach ($this->array_mercadeo as $key => $value) {\n $i++;\n $this->SetLeftMargin(30);\n $width = 7;\n $this->SetX(14);\n $this->SetFont('Arial','',9);\n $this->Row(\n array(//$value[\"fecha\"],\n $i,\n $value[\"COD\"],\n $value[\"nombre\"],\n //$value[\"precio\"],\n number_format($value[\"costo_unitario\"], 2, ',', ''),\n $value[\"costo_operativo\"],\n //number_format($value[\"costo_operativo\"], 2, ',', ''),\n number_format($value[\"costo_sin_iva\"], 2, ',', ''),\n //$value[\"costo_iva\"],\n number_format($value[\"costo_iva\"], 2, ',', ''),\n //$value[\"precio_sugerido\"],\n number_format($value[\"precio_sugerido\"], 2, ',', ''),\n $value[\"margen_ganancia\"],\n //number_format($value[\"margen_ganancia\"], 2, ',', ''),\n //$value[\"pvp\"]),\n number_format($value[\"pvp\"], 2, ',', '')),\n 1);\n //$this->SetX(14);\n /*if( $value[\"cantidad_item\"] != $value[\"c_esperada\"] && $this->array_mercadeo[0][\"tipo_movimiento_almacen\"]==3){\n $this->Cell(196,5,'Observacion : '.$value[\"observacion_dif\"],1,1,'L');\n }*/\n \n\n }\n\n }", "function escreverTexto($sText) {\n\n /**\n * Aplicando negrito\n */\n $sText = str_replace(\"<b>\", chr(27) . chr(69), $sText);\n $sText = str_replace(\"</b>\", chr(27) . chr(70), $sText);\n /**\n * Aplicando italico\n */\n $sText = str_replace(\"<i>\", chr(27) . chr(52), $sText);\n $sText = str_replace(\"</i>\", chr(27) . chr(53), $sText);\n /**\n * Aplicando sublinhado\n */\n $sText = str_replace(\"<s>\", chr(27) . chr(45) . \"1\", $sText);\n $sText = str_replace(\"</s>\", chr(27) . chr(45) . \"0\", $sText);\n \n // $sText = $this->truncarLinhas($sText,48);\n $sText = $this->strToAsc($sText);\n \n $sComando = chr(27) . str_replace(\"\\n\", chr(10), $sText);\n parent::addComando($sComando);\n \n }", "public function mostrarConteudo() {\r\n echo \" \r\n <section class='margin-left12'>\r\n <p class='font33px'> Carrinho <img src='img/carrinho2.png'/></p>\r\n <figure>\r\n <figcaption class='margin-left'>\r\n <table style='width:50%'>\r\n <tr>\r\n <td><p class='font25px'><b>Seu carrinho está VAZIO!</b></td>\r\n <td></td> \r\n <td></td>\r\n </tr>\r\n <tr>\r\n <td></td>\r\n <td>\r\n <div>\r\n\r\n </div>\r\n </td>\r\n <td>\r\n\r\n <div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td><a href='catalogo.html'> Venha Conhecer nossas camisetas!</a></td>\r\n </tr>\r\n <tr>\r\n </tr>\r\n </table>\r\n </figcaption>\r\n </figure>\t\t\r\n </section>\";\r\n }", "function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n // $html .= $this->tablaDatos();\n $html .= $this->Pata();\n echo $html;\n }", "function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n // $html .= $this->tablaDatos();\n $html .= $this->Pata();\n echo $html;\n }", "function sobre_planeacion($minimoMes,$maximoMes,$vigencia,$unidades,$tipo_usuario)\n\t\t{\n\t\t\t//$tipo_usuario ALMACENA EL TIPO DE USUARIO( I O E), EN UN ARRAY, ESTE SE CARGA EN LA PAGINA DE PLANEACION DE PROYECTOS (upHTplaneacionProy.PHP)\t\n//echo $unidades[0].\" - $minimoMes - $maximoMes - $vigencia ********************** <br><br>\";\n\t\t?>\n\n<?\t\t\n\t\t$ban_reg=0; //PERMITE IDENTIFICAR, SI SE ENCONTRO ALMENOS, UN USUARIO SOBRE PLANEADO, DE NO SER ASI, NO SE ENVIA EL CORREO\n\t\t$pTema ='<table width=\"100%\" border=\"0\">\n\t\t <tr class=\"Estilo2\" >\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td width=\"5%\" >Asunto:</td>\n\t\t\t<td >Sobre planeaci&oacute;n de participantes.</td>\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t \n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td colspan=\"2\">Los siguientes participantes, tienen una dedicaci&oacute;n superior a 1 en los siguientes proyectos:</td>\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t\n\t\t </tr>\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>&nbsp;</td>\n\t\t\n\t\t </tr>\n\t\t\n\t\t <tr class=\"Estilo2\">\n\t\t\t<td colspan=\"2\" >\n\t\t\t\t<table width=\"100%\" border=\"1\" >\n\n\t\t\t\t <tr class=\"Estilo2\">\n\t\t\t\t\t<td colspan=\"5\"></td>\n\t\t\t\t\t<td colspan=\"'.(($maximoMes-$minimoMes)+1).'\" align=\"center\" >'.$vigencia.'</td>\n\t\t\t\t </tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t <tr class=\"Estilo2\">\n\t\t\t\t\t<td>Unidad</td>\n\t\t\t\t\t<td>Nombre</td>\n\t\t\t\t\t<td>Departamento</td>\n\t\t\t\t\t<td>Divisi&oacute;n</td>\n\t\t\t\t\t<td>Proyecto</td>';\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t$vMeses= array(\"\",\"Ene\",\"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"); \n\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t{\n\n\t\t\t\t\t $pTema = $pTema.'<td>'.$vMeses[$m].' </td>';\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t $pTema = $pTema.' </tr>';\n\t\t\t\t$cur_tipo_usu=0; //CURSOR DEL ARRAY, DEL TIPO DE USUARIO \n\t\t\t\tforeach($unidades as $unid)\n\t\t\t\t{\n//tipo_usuario\n\t\t\t\t\tif($tipo_usuario[$cur_tipo_usu]==\"I\")\t\n\t\t\t\t\t{\n\t\t\t\t\t//CONSULTA SI EL USUARIO ESTA SOBREPLANEADO EN ALMENOS, UN MES DURANTE LA VIGENCIA\n\n\t\t\t\t\t//COSNULTA PARA LOS USUARIOS INTERNOS\n\t\t\t\t\t\t\t$sql_planea_usu=\"select top(1) SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.unidad ,mes \n\t\t\t\t\t\t\t\t\t\t\t--,PlaneacionProyectos.id_proyecto\n\t\t\t\t\t\t\t\t\t\t\t, PlaneacionProyectos.unidad, Usuarios.nombre, \n\t\t\t\t\t\t\t\t\t\t\tUsuarios.apellidos ,Divisiones.nombre as div,Departamentos.nombre as dep\n\t\t\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t\t\t inner join Usuarios on PlaneacionProyectos.unidad=Usuarios.unidad \n\t\t\t\t\t\t\t\t\t\t\t inner join Departamentos on Departamentos.id_departamento=Usuarios.id_departamento \n\t\t\t\t\t\t\t\t\t\t\t inner join Divisiones on Divisiones.id_division=Departamentos.id_division \n\t\t\t\t\t\t\t\t\t\t\t inner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\t\t\twhere vigencia=\".$vigencia.\" and mes in( \"; \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\" \".$m.\",\";\n\t\t//PlaneacionProyectos.id_proyecto,\t\t\t\t\n\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\"0) and PlaneacionProyectos.unidad=\".$unid.\" \n\t\t\t\t\t\t\t\t\t\t\tand esInterno='I'\n\t\t\t\t\t\t\t\t\t\t\tgroup by PlaneacionProyectos.unidad,mes,Usuarios.nombre, Usuarios.apellidos,Divisiones.nombre ,Departamentos.nombre \n\t\t\t\t\t\t\t\t\t\t\tHAVING (SUM (hombresMes))>1 \";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif($tipo_usuario[$cur_tipo_usu]==\"E\")\t\n\t\t\t\t\t{\n\t\t\t\t\t\t//COSNULTA PARA LOS USUARIOS EXTERNOS\n\t\t\t\t\t\t$sql_planea_usu=\" select top(1) SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.unidad ,mes \n\t\t\t\t\t\t\t\t\t--,PlaneacionProyectos.id_proyecto\n\t\t\t\t\t\t\t\t\t, PlaneacionProyectos.unidad, TrabajadoresExternos.nombre, \n\t\t\t\t\t\t\t\t\tTrabajadoresExternos.apellidos,'' div, ''dep\n\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t inner join TrabajadoresExternos on PlaneacionProyectos.unidad=TrabajadoresExternos.consecutivo \n\t\t\t\t\t\t\t\t\t inner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\twhere vigencia=\".$vigencia.\" and mes in( \";\n\t\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\" \".$m.\",\";\n\n\t\t\t\t\t\t\t$sql_planea_usu=$sql_planea_usu.\"0) and PlaneacionProyectos.unidad=\".$unid.\" \n\t\t\t\t\t\t\t\t\tand esInterno='E'\n\t\t\t\t\t\t\t\t\tgroup by PlaneacionProyectos.unidad,mes,TrabajadoresExternos.nombre, TrabajadoresExternos.apellidos\n\t\t\t\t\t\t\t\t\tHAVING (SUM (hombresMes))>1 \t\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$cur_planea_usu=mssql_query($sql_planea_usu);\n//echo $sql_planea_usu.\" ---- <br>\".mssql_get_last_message().\" *** \".mssql_num_rows($cur_planea_usu).\"<br>\";\n\t\t\t\t\twhile($datos__planea_usu=mssql_fetch_array($cur_planea_usu))\n\t\t\t\t\t{\n\t\t\t\t\t\t$ban_reg=1; //SI ENCUENTRA ALMENOS UN USUARIO SOBREPLANEADO, ENVIA EL CORREO\n\t\t\t\t\n\t\t\t\t\t\t//CONSULTA LOS PROYECTOS, EN LOS CUALES EL PARTICIAPENTE HA SIDO PLANEADO, ESTO PARA PODER DOBUJAR LA TABLA DE FORMA CORRECTA\n\t\t\t\t\t\t$sql_uu=\" select distinct(id_proyecto),nombre,codigo,cargo_defecto from (select SUM (hombresMes) as total_hombre_mes ,unidad, mes,PlaneacionProyectos.id_proyecto ,Proyectos.nombre,Proyectos.codigo,Proyectos.cargo_defecto \n\t\t\t\t\t\t\t\t\tfrom PlaneacionProyectos\n\t\t\t\t\t\t\t\t\t\tinner join Proyectos on PlaneacionProyectos.id_proyecto=Proyectos.id_proyecto \n\t\t\t\t\t\t\t\t\t where vigencia=\".$vigencia.\" and mes in( \";\n\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$sql_uu=$sql_uu.\" \".$m.\",\";\n\t\t\t\t\t\t\t\t\t\t$total_planeado[$m]=0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql_uu=$sql_uu.\"0) and unidad in(\".$unid.\") and esInterno= '\".$tipo_usuario[$cur_tipo_usu].\"' group by unidad, mes , PlaneacionProyectos.id_proyecto,Proyectos.nombre,Proyectos.codigo,Proyectos.cargo_defecto ) aa \";\n// HAVING (SUM (hombresMes)\t>1\t\n\t\t\t\t\t\t$cur_uu=mssql_query($sql_uu);\n\t\t\t\t\t\t$cant_proy=mssql_num_rows($cur_uu);\n//echo \"<br><BR>---//**************--------------\".$sql_uu.\" \".mssql_get_last_message().\"<br>\".$cant_proy.\"<br>\";\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<?\n\t\t\t\t//echo $sql_proy_planea.\" ---- <br>\".mssql_get_last_message().\"<br><br>\";\n\t\t\t\t\n\t\t\t\t\t\t$total_planeado= array();\n\t\t\t\t\t\t$cont=0;\n\t\t\t\t\t\twhile($datos_uu=mssql_fetch_array($cur_uu))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($cont==0)\n\t\t\t\t\t\t\t{\n\t\n\t\t\t\t\t\t\t\t $pTema = $pTema.' <tr class=\"Estilo2\">\t\t\t\t\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \"> '.$datos__planea_usu[\"unidad\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'.$datos__planea_usu[\"apellidos\"].' '.$datos__planea_usu[\"nombre\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'. $datos__planea_usu[\"dep\"].' </td>\n\t\t\t\t\t\t\t\t<td rowspan=\"'.$cant_proy.' \">'. $datos__planea_usu[\"div\"].' </td>';\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$pTema = $pTema.'<td class=\"Estilo2\" >['.$datos_uu[\"codigo\"].'.'.$datos_uu[\"cargo_defecto\"].'] '. $datos_uu[\"nombre\"].' </td>';\n\n\t\t\t\t\t\t\t//CONSULTA LA INFORMACION DE LO PLANEADO EN CADA MES, DE ACUERDO AL PORYECTO CONSULTADO\n\t\t\t\t\t\t\t$sql_pro=\"select SUM (hombresMes) as total_hombre_mes ,PlaneacionProyectos.id_proyecto,PlaneacionProyectos.unidad,mes\n\t\t\t\t\t\t\t\t\t\t from PlaneacionProyectos \n\t\t\t\t\t\t\t\t\t\t where vigencia=\".$vigencia.\" and PlaneacionProyectos.unidad=\".$unid.\" and id_proyecto=\".$datos_uu[\"id_proyecto\"].\" and mes in(\";\n\t\t\t\t\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$sql_pro=$sql_pro.\" \".$m.\",\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$sql_pro=$sql_pro.\" 0) and esInterno= '\".$tipo_usuario[$cur_tipo_usu].\"' group by PlaneacionProyectos.id_proyecto ,PlaneacionProyectos.unidad ,mes order by (mes) \";\n// HAVING (SUM (hombresMes))>1\n\t\t\t\t\t\t\t$cur_proy_planea=mssql_query($sql_pro);\n//\t\t\t\techo $sql_pro.\" --22222222222-- <br>\".mssql_get_last_message().\"<br><br>\";\n\t\t\t\t\t\t\t$m=$minimoMes;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($datos_proy_planea=mssql_fetch_array($cur_proy_planea))\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\tfor ($m;$m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($datos_proy_planea[\"mes\"]==$m)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$total_planeado[$m]+=( (float) $datos_proy_planea[\"total_hombre_mes\"]);\n\n\t\t\t\t\t\t\t\t\t\t$pTema = $pTema.'<td class=\"Estilo2\" align=\"right\" >'.((float) $datos_proy_planea[\"total_hombre_mes\"] ).'</td>';\n\n\t\t\t\t\t\t\t\t\t\t$m=$datos_proy_planea[\"mes\"];\n\t\t\t\t\t\t\t\t\t\t$m++;\n\t\t\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>&nbsp; </td>';\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$m--;\n\t\t\t\t\t\t\tfor ($m++;$m<=$maximoMes; $m++) \n\t\t\t\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t\t\t\t $pTema = $pTema.'<td>&nbsp;</td>';\n\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t$cont++;\n\t\t\t\t\t\t\tunset($datos_proy_planea);\n\n\t\t\t\t\t\t\t $pTema = $pTema.' </tr>';\n\n\t\t\t\t//\t\t\techo $datos_proy_planea[\"total_hombre_mes\"].\"<br>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t $pTema = $pTema.' <tr class=\"Estilo2\">\n\t\t\t\t\t\t<td colspan=\"4\" >&nbsp;</td>\n\n\t\t\t\t\t\t<td>Total planeaci&oacute;n</td>';\n\n\t\t\t\t\t\tfor ($m=$minimoMes; $m<=$maximoMes; $m++) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($total_planeado[$m]==0)\n\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>&nbsp;</td>';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$pTema = $pTema.'<td>'.$total_planeado[$m].'</td>';\n\t\t\t\t\t\t}\n \n\t\t\t\t\t $pTema = $pTema.' </tr>\n\t\t\t\t\t <tr >\n\t\t\t\t\t\t<td colspan=\"17\">&nbsp;</td>\n\t\t\t\t\t </tr>\t';\n\n\t\t\t\t\t}\n\t\t\t\t\t$cur_tipo_usu++;\n\t\t\t\t}\n\t\t\t\t$pTema = $pTema.'\n\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t </tr>\n\t\t<tr class=\"Estilo2\"><td colspan=\"2\" >Para consultar en detalle la planeaci&oacute;n de un participante, en un proyecto especifico, utilice el reporte Usuarios por proyecto, accediendo a el, atravez del boton Consolidados por divisi&oacute;n, ubicado en la parte superior de la pagina principal de la planeaci&oacute;n por proyectos. </td></tr>\n\t\t</table>';\n\n\t\t/*\n\t\t\t\t//consulta la unidad del director y el coordinador de proyecto\n\t\t\t\t$sql=\"SELECT id_director,id_coordinador FROM HojaDeTiempo.dbo.proyectos where id_proyecto = \" . $cualProyecto.\" \" ;\n\t\t\t\t$eCursorMsql=mssql_query($sql);\n\t\t\t\t$usu_correo= array(); //almacena la unidad de los usuarios a los que se le enviara el correo\n\t\t\t\t$i=1;\n\t\t\t\twhile($datos_dir_cor=mssql_fetch_array($eCursorMsql))\n\t\t\t\t{\n\t\t\t\t\t$usu_correo[$i]=$datos_dir_cor[\"id_coordinador\"];\n\t\t\t\t\t$i++;\n\t\t\t\t\t$usu_correo[$i]=$datos_dir_cor[\"id_director\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\n\t\t\t\t//consulta la unidad porgramadores y ordenadores de gasto\t\t\t\n\t\t//select unidad from HojaDeTiempo.dbo.Programadores where id_proyecto=\".$cualProyecto.\" union\n\t\t\t\t$sql_pro_orde=\" select unidadOrdenador from GestiondeInformacionDigital.dbo.OrdenadorGasto where id_proyecto=\".$cualProyecto;\n\t\t\t\t$cur_pro_orde=mssql_query($sql_pro_orde);\n\t\t\t\twhile($datos_pro_orde=mssql_fetch_array($cur_pro_orde))\n\t\t\t\t{\n\t\t\t\t\t$usu_correo[$i]=$datos_pro_orde[\"unidad\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\t\t\t\n\t\t\n\t\t\t\t$i=0;\n\t\t\t\t//consulta el correo de los usuarios(director,cordinador,ordenadroes de G, y programadores) asociados al proyecto\n\t\t\t\t$sql_usu=\" select email from HojaDeTiempo.dbo.Usuarios where unidad in(\";\n\t\t\t\tforeach($usu_correo as $unid)\n\t\t\t\t{\n\t\t\t\t\tif($i==0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_usu=$sql_usu.\" \".$unid;\t\t\n\t\t\t\t\t\t$i=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$sql_usu=$sql_usu.\" ,\".$unid;\n\t\t\t\t}\n\t\t\t\t$sql_usu=$sql_usu.\") and retirado is null\";\n\t\t\t\t$cur_usu=mssql_query($sql_usu);\t\t\t\t\n\t\t\n\t\t\t\t//se envia el correo a el director, cordinador, orenadores de gasto, y programadores del proyecto\t\n\t\t\t\twhile($eRegMsql = mssql_fetch_array($cur_usu))\n\t\t\t\t{\t\t\n\t\t\t\t $miMailUsuarioEM = $eRegMsql[email] ;\n\t\t\t\n\t\t\t\t //***EnviarMailPEAR\t\n\t\t\t\t $pPara= trim($miMailUsuarioEM) . \"@ingetec.com.co\";\n\t\t\t\n\t\t\t\t enviarCorreo($pPara, $pAsunto, $pTema, $pFirma);\n\t\t\t\n\t\t\t\t //***FIN EnviarMailPEAR\n\t\t\t\t $miMailUsuarioEM = \"\";\n\t\t\t\n\t\t\t\t}\n\t\t*/\n\t\t\tif($ban_reg==1) //SEW ENVIA EL CORREO SI EXISTE ALMENOS UN USUARIO SOBREPLANEADO\n\t\t\t{\n\t\t///////////////////////////**********************************************************PARA QUITAR\n\t\t\t $miMailUsuarioEM = 'carlosmaguirre'; //$eRegMsql[email] ;\t\n\t\t\t\t$pAsunto='Sobre planeaci&oacute;n de proyectos';\n\t\t\t //***EnviarMailPEAR\t\n\t\t\t $pPara= trim($miMailUsuarioEM) . \"@ingetec.com.co\";\t\n\t\t\t enviarCorreo($pPara, $pAsunto, $pTema, $pFirma);\t\n\t\t\t //***FIN EnviarMailPEAR\n\t\t\t $miMailUsuarioEM = \"\";\n\t\t\t}\n\t\t\n\t\t?>\n\n<?\n}", "public function encabezadoTramite($encabezado){\n \n $_string='<table class=\"table table-bordered\">\n <!----------------------------INICIA CABEZOTE DATOS BASICOS --------------------------------->\n <tr>\n <td class=\"datosbasicos1\"> N&uacute;mero Solicitud </td>\n <td class=\"datosbasicos2\">'. $encabezado['num_solicitud'] .' </td>\n <td class=\"datosbasicos1\"> N&uacute;mero del Tramite </td>\n <td class=\"datosbasicos2\">'. $encabezado['num_tramite'].'</td>\n <td class=\"datosbasicos1\">C&oacute;digo del Tr&aacute;mite </td>\n <td class=\"datosbasicos2\">'.$encabezado['cod_solicitud_tecnico'].'</td>\n \n </tr>\n <tr>\n <td class=\"datosbasicos1\"> C&oacute;digo ARCA / SENAGUA </td>\n <td class=\"datosbasicos2\" colspan=\"3\">'. $encabezado['proceso_arca'].' / '.$encabezado['proceso_senagua'].'</td>\n <td class=\"datosbasicos1\"> Estado </td>\n <td class=\"datosbasicos2\">'. $encabezado['nom_eproceso'].'</td>\n </tr>\n <tr>\n <td class=\"datosbasicos1\"> Responsable </td>\n <td class=\"datosbasicos2\" colspan=\"3\">'. $encabezado['responsable'].'</td>\n <td class=\"datosbasicos1\"> Fecha de Solicitud </td>\n <td class=\"datosbasicos2\">'. $encabezado['fecha_solicitud'].'</td>\n </tr>\n <tr>\n <td class=\"datosbasicos1\"> Fecha &Uacute;ltima Actividad </td>\n <td class=\"datosbasicos2\" colspan=\"3\">'. $encabezado['ult_fecha_actividad'].'</td>\n <td class=\"datosbasicos1\"> Fecha &Uacute;ltimo Estado </td>\n <td class=\"datosbasicos2\">'. $encabezado['ult_fecha_estado'].'</td>\n </tr></table>';\n \n return $_string;\n }", "public function StampaCarrello() {\n\t\t$somma=0;\n\t\tif (count($this->contenuto) > 0) \n\t\t{ ?>\n\n\t\t\t<table>\n\t\t\t\t<tbody>\n\t\t\t\t\t<?\n\t\t\t\t\t?><tr >\n\t\t\t\t\t\t\t<th>Prodotto</th>\n\t\t\t\t\t\t\t<th>Quantità</th>\n\t\t\t\t\t\t</tr><?\n\n\t\t\t\t\t\tfor ($i=0;$i<count($this->contenuto);$i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><?= $this->contenuto[$i]->getNome() ;?></br> \n\t\t\t\t\t\t\t\t<td><?= $this->quantita[$i] ,' Kg';?></br> <?\n\t\t\t\t\t\t\t\t$somma=$somma+($this->contenuto[$i]->getPrezzo()*$this->quantita[$i]);?></br> \n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<?php\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</tbody>\n\t\t\t</table>\n\t\t\t<p> Totale:<?=$somma, ' Euro' ?></p>\n\t\t\t<form method=\"post\" action=\"index.php?page=utente&subpage=home&somma=<?= $somma ?>\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"completaOrdine\"/>\n\t\t\t\t\t\t<label for=\"date\">Inserisci la data di consegna</label>\n\t\t\t\t\t\t<input type=\"date\" name=\"date\" value=\"2000-01-01\"/>\n\t\t\t\t\t\t<button type=\"submit\">Conferma ordine </button>\n \t\t\t</form>\n\n\t<?php } \n\telse \n\t\t{ \n\t\t\t?><p class=\"messaggio\"> Nessun prodotto inserito </p><?\n\t\t} \n\t}", "public function mostrarDatosComprobantesDeclarados(){\r\n\t\t$html = null;\t\t\r\n\r\n\t\t$month = date('m');\r\n \t$year = date('Y');\r\n \t$day = date(\"d\");\r\n\r\n\t\t$fecemi = date('Y-m-d');\r\n\r\n\t\t$canales=$_POST['canalesDeclarado'];\r\n\r\n\t\t$inicio = $_POST['fechainicioDeclarado'];\r\n\t\t$fin = $_POST['fechafinDeclarado'];\r\n\r\n\t\t$serie = $_POST['numeroSerieDeclarado'];\t\r\n\r\n\t\tif (substr($serie, 0, 1) == 'B') {\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaDecSoles($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaDecDolares($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span>&nbsp;<span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\t\t\t$html .= \"<br>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t//$html .=\"<th>Id Comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de Emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombres y Apellidos</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>DNI</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t//\tfor ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$boleta = $this->comprobante_pago_mdl->getDatosBoletaDeclarada($inicio, $fin, $serie);\r\n\r\n\t\t\t\t\tforeach ((array) $boleta as $b):\r\n\r\n\t\t\t\t\t\tif ($b->tipo_moneda=='PEN') {\r\n\t\t\t\t\t\t\t$moneda = 'S/. ';\r\n\t\t\t\t\t\t} elseif ($b->tipo_moneda=='USD') {\r\n\t\t\t\t\t\t\t$moneda = '$ ';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$importe = $b->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importe, 2, '.', ',');\r\n\r\n\t\t\t\t\t\t$estado = $b->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($b->fecha_emision));\r\n\r\n\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t//$html .= \"<td align='left'>\".$$b->idcomprobante.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->serie.\" - \".$b->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$b->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->contratante.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante[]' value='\".$b->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cont_numDoc.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".utf8_decode($b->nombre_plan).\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$moneda.$importe2.\"</td>\";\r\n\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'></td>\";\r\n\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t$html .=\"</td>\";\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$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\r\n\t\t\t\t\t//}\r\n\t\t\t\t\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\t\t} elseif (substr($serie, 0, 1) == 'F') {\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaDecSoles($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaDecDolares($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span>&nbsp;<span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\t\t\t$html .=\"<hr>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha para emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Razon Social</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>RUC</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t//for ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$factura = $this->comprobante_pago_mdl->getDatosFacturaDeclarada($inicio, $fin, $serie);\r\n\r\n\t\t\t\t\tforeach ((array)$factura as $f):\r\n\r\n\t\t\t\t\t\tif ($f->tipo_moneda=='PEN') {\r\n\t\t\t\t\t\t\t$moneda = 'S/. ';\r\n\t\t\t\t\t\t} elseif ($f->tipo_moneda=='USD') {\r\n\t\t\t\t\t\t\t$moneda = '$ ';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$importeDos = $f->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importeDos, 2, '.', ',');\r\n\t\t\t\t\t\t$estado = $f->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($f->fecha_emision));\r\n\r\n\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$f->serie.\" - \".$f->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie' value='\".$f->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->razon_social_cli.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante' value='\".$f->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->numero_documento_cli.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_plan.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$moneda.$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'></td>\";\r\n\t\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\t\t}\r\n\r\n\t\techo json_encode($html);\r\n\t}", "function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n $html .= $this->Pata();\n echo $html;\n }", "private function generate_data_content($p_resultat,$p_edit)\r\n\t\t{\r\n\t\t\t// Flag for the line color\r\n\t\t\t$i_color = 0;\r\n\r\n\t\t\t// Line counter\r\n\t\t\t$line = 1;\r\n\t\t\t\r\n\t\t\t// Vimofy content\r\n\t\t\t$vimofy = '';\r\n\t\t\t\r\n\t\t\t// Quantity of rows\r\n\t\t\t$num_rows = $this->c_obj_bdd->rds_num_rows($p_resultat);\r\n\t\t\t\r\n\t\t\t// Line selected flag\r\n\t\t\t$line_selected = false;\r\n\t\t\t\r\n\t\t\t// Last displayed column\r\n\t\t\t$last_display_col = $this->get_last_display_column();\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t* Define the columns & rows style\r\n\t\t\t====================================================================*/\t\r\n\t\t\t($this->c_cols_sep_display) ? $sep_column = '__'.$this->c_theme.'_col_sep_on' : $sep_column = '__'.$this->c_theme.'_col_sep_off';\r\n\t\t\t($this->c_cols_sep_display) ? $sep_column_end = '__'.$this->c_theme.'_col_sep_end_on' : $sep_column_end = '__'.$this->c_theme.'_col_sep_end_off';\r\n\t\t\t($this->c_rows_sep_display) ? $sep_cell = '__'.$this->c_theme.'_cell_sep' : $sep_cell = '';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t// Parsing sql result\r\n\t\t\twhile($row = $this->c_obj_bdd->rds_fetch_array($p_resultat))\r\n\t\t\t{\r\n\t\t\t\t// Manages the end of line, add a cell_sep if it is the last line\r\n\t\t\t\tif($num_rows == $line) $sep_cell = '__'.$this->c_theme.'_cell_sep';\r\n\t\t\t\t\r\n\t\t\t\t/**==================================================================\r\n\t\t\t\t* Line selected managment\r\n\t\t\t\t====================================================================*/\t\r\n\t\t\t\tif(is_array($this->c_selected_lines['key_concat']) && in_array($row['vimofy_internal_key_concat'],$this->c_selected_lines['key_concat']))\r\n\t\t\t\t{\r\n\t\t\t\t\t// The line is seleted\r\n\t\t\t\t\t$line_selected_class = 'line_selected_color_'.$i_color.'_'.$this->c_id;\r\n\t\t\t\t\t$checked = 'checked';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// The line isn't selected\r\n\t\t\t\t\t$line_selected_class = 'lc_'.$i_color.'_'.$this->c_id;\r\n\t\t\t\t\t$checked = '';\r\n\t\t\t\t}\r\n\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\r\n\t\t\t\t/**==================================================================\r\n\t\t\t\t* Create a new line\r\n\t\t\t\t====================================================================*/\r\n\t\t\t\tif(!$this->c_type_internal_vimofy)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Principal Vimofy\r\n\t\t\t\t\tif(!$p_edit)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$vimofy .= '<tr onclick=\"vimofy_checkbox('.$line.',event,null,\\''.$this->c_id.'\\');\" id=\"l'.$line.'_'.$this->c_id.'\" class=\"'.$line_selected_class.'\">';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$vimofy .= '<tr id=\"l'.$line.'_'.$this->c_id.'\" class=\"'.$line_selected_class.'\">';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Internal Vimofy\r\n\t\t\t\t\tswitch($this->c_type_internal_vimofy) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase '__POSSIBLE_VALUES__':\r\n\t\t\t\t\t\t\t$vimofy .= '<tr onclick=\"vimofy_child_insert_into_parent(\\'div_td_l'.$line.'_c'.$this->get_id_col_lov($this->c_col_return).'_'.$this->c_id.'\\',\\''.$this->c_id_parent.'\\','.$this->c_id_parent_column.');\" id=\"l'.$line.'_'.$this->c_id.'\" class=\"lc_'.$i_color.'_'.$this->c_id.'\" '.$this->hover_out_lib(65,65).'>';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase '__LOAD_FILTER__':\r\n\t\t\t\t\t\t\t$vimofy .= '<tr onclick=\"vimofy_load_filter(\\''.$this->c_id_parent.'\\',\\'div_td_l'.$line.'_c'.$this->get_id_col_lov($this->c_col_return).'_'.$this->c_id.'\\');\" id=\"l'.$line.'_'.$this->c_id.'\" class=\"lc_'.$i_color.'_'.$this->c_id.'\">';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\r\n\t\t\t\t/**==================================================================\r\n\t\t\t\t* Create the first column (checkbox and edit button)\r\n\t\t\t\t====================================================================*/\r\n\t\t\t\t$vimofy .= '<td align=\"left\" id=\"td_l'.$line.'_c0_'.$this->c_id.'\" class=\"__'.$this->c_theme.'__cell_opt '.$sep_cell.'\"><div id=\"div_td_l'.$line.'_c0_'.$this->c_id.'\"><table><tr>';\r\n\t\t\t\tif(!$p_edit)\r\n\t\t\t\t{\r\n\t\t\t\t\t$vimofy .= '<td><input class=\"vimofy_checkbox\" '.$checked.' onclick=\"vimofy_checkbox('.$line.',event,true,\\''.$this->c_id.'\\');\" id=\"chk_l'.$line.'_c0_'.$this->c_id.'\" type=\"checkbox\" '.$this->hover_out_lib(77,77).'/></td>';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$vimofy .= '<td></td>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// If the vimofy is in read & write mode, add the edit button\r\n\t\t\t\tif($this->c_readonly == __RW__ && !$p_edit)\r\n\t\t\t\t{\r\n\t\t\t\t\t$vimofy .= '<td style=\"padding:0;vertical-align:middle;\"><div '.$this->hover_out_lib(16,16).' onclick=\"edit_lines(event,'.$line.',\\''.$this->c_id.'\\');\" class=\"__'.$this->c_theme.'_ico __'.$this->c_theme.'_ico_page_edit\"></div></td>';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$vimofy .= '<td style=\"padding:0;vertical-align:middle;\"><div '.$this->hover_out_lib(16,16).' onclick=\"edit_lines(event,'.$line.',\\''.$this->c_id.'\\');\" class=\"__'.$this->c_theme.'_ico __'.$this->c_theme.'_ico_page_edit\" style=\"visibility:hidden;\"></div></td>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$vimofy .= '</tr></table></div></td>';\r\n\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\r\n\t\t\t\t/**==================================================================\r\n\t\t\t\t* Create all data columns\r\n\t\t\t\t====================================================================*/\r\n\t\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($val_col['display'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t($line == 1) ? $key_cold_l = 'id=\"td_0_c'.$key_col.'_'.$this->c_id.'\"' : $key_cold_l = '';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$vimofy .= '<td '.$key_cold_l.' class=\"'.$sep_cell.$this->c_columns[$key_col]['nowrap'].'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$content = $this->get_data_in_html($key_col,$row[$this->c_columns[$key_col]['sql_as']]);\r\n\t\t\t\t\t\t// Data column\r\n\t\t\t\t\t\tif($line == 1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$key_cold_id_l1 = 'id=\"td_1_c'.$key_col.'_'.$this->c_id.'\"';\r\n\t\t\t\t\t\t\t$key_cold_id_l2 = 'id=\"td_2_c'.$key_col.'_'.$this->c_id.'\"';\r\n\t\t\t\t\t\t\t$key_cold_id_l3 = 'id=\"td_3_c'.$key_col.'_'.$this->c_id.'\"';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$key_cold_id_l1 = '';\r\n\t\t\t\t\t\t\t$key_cold_id_l2 = '';\r\n\t\t\t\t\t\t\t$key_cold_id_l3 = '';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$vimofy .= '<td '.$key_cold_id_l1.' align=\"'.$this->c_columns[$key_col]['alignment'].'\" class=\"__'.$this->c_theme.'__cell '.$sep_cell.''.$this->c_columns[$key_col]['nowrap'].'\"><div id=\"div_td_l'.$line.'_c'.$key_col.'_'.$this->c_id.'\" class=\"div_content\">'.$content.'</div></td>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Right border column\r\n\t\t\t\t\t\t$vimofy .= '<td class=\"'.$sep_cell.$this->c_columns[$key_col]['nowrap'].'\" '.$key_cold_id_l2.'><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Sep column\r\n\t\t\t\t\t\tif($key_col != $last_display_col)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$vimofy .= '<td '.$key_cold_id_l3.' class=\"__'.$this->c_theme.'__sep '.$sep_column.'\"></td>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$vimofy .= '<td '.$key_cold_id_l3.' class=\"__'.$this->c_theme.'__sep '.$sep_column_end.'\"></td>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\r\n\t\t\t\t$vimofy .= '</tr>';\r\n\r\n\t\t\t\t($i_color == count($this->c_color_mask) - 1) ? $i_color = 0 : $i_color = $i_color + 1;\r\n\t\t\t\t$line = $line + 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $vimofy;\r\n\t\t}", "function entete_table($position_entete) {\n global $pdf;\n $pdf->SetDrawColor(183); // Couleur du fond RVB\n $pdf->setFillColor(89,133,255); // Couleur des filets RVB\n $pdf->SetTextColor(0); // Couleur du texte noir\n $pdf->SetY($position_entete);\n // position de colonne 1 (10mm à gauche)\n $pdf->SetX(5);\n $pdf->Cell(40,8,'Prestation',1,0,'C',1); // 60 >largeur colonne, 8 >hauteur colonne\n // position de la colonne 2 (70 = 10+60)\n $pdf->SetX(45);\n $pdf->Cell(40,8,'Date',1,0,'C',1);\n $pdf->SetX(85);\n $pdf->Cell(40,8,'Prix HT',1,0,'C',1);\n $pdf->SetX(125);\n $pdf->Cell(40,8,'Tva',1,0,'C',1);\n $pdf->SetX(165);\n $pdf->Cell(40,8,iconv(\"UTF-8\", \"CP1250//TRANSLIT\", \"Quantité/Durée\"),1,0,'C',1);\n\n // position de la colonne 3 (130 = 70+60)\n\n\n $pdf->Ln(); // Retour à la ligne\n}", "function Cuerpo($acceso,$desde,$hasta,$id_f)\n\t{\n\t\t\n\t\t$tipo=utf8_decode($tipo);\n\t\t$this->SetFont('Arial','B',9);\n\t\t\n\t\t$acceso1=conexion();\n\t\t\n\t\t\n\t\t//$acceso->objeto->ejecutarSql(\"SELECT *FROM parametros where id_param='2'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$por_iva=trim($row['valor_param']);\n\t\t}\n\t\t\n\t\t$this->SetDrawColor(0,0,0);\n\t\t$this->SetLineWidth(.2);\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\t\n\t$w=array(20,20,25);\t\n\t$col=5;\n\t$right=10;\n\t$alto=49;\t\n\t\t$this->SetX($right);\n\t\t\t\n\t\t$this->SetX($right);\n\t\t\t$this->SetFont('Arial','BIU',8);\n\t\t\t$this->Cell($right,6,strtoupper(_('ingresos cobrados por franquicia')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln(12);\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',7);\n\t\t\t\t$this->Cell($w[0],7,\"\",\"LRB\",0,\"L\");\n\t\t\t\t$der=15;\n\t\t\t\t$this->RotatedText($der, $alto, \"FECHA\", 25);\n\t\t\t\t$der=$der+$w[1];\n\t\t\t\t$dato=lectura($acceso,\"SELECT *FROM franquicia order by nombre_franq\");\n\t\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t\t$nombre_franq=trim($dato[$j][\"nombre_franq\"]);\n\t\t\t\t\t$this->RotatedText($der, $alto, $nombre_franq, 25);\n\t\t\t\t\t$der=$der+$w[1];\n\t\t\t\t\t$this->Cell($w[1],7,\"\",\"LRB\",0,\"C\");\n\t\t\t\t}\n\t\t\t\t$der=$der+5;\n\t\t\t\t$this->RotatedText($der, $alto, \"TOTAL\", 25);\n\t\t\t\t$this->Cell($w[2],7,\"\".\" \",\"LRB\",0,\"C\");\n\t\t\n\t\t\t$this->Ln(7);\n\t\t\n\t\t\t$sum_total=array();\n\t\t\t$sum_t=0;\n\twhile(comparaFecha($desde,$hasta)<=0){\n\t\t//ECHO \"SELECT sum(monto_pago) as monto FROM pagos where fecha_pago='$desde' \";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT monto_pago as monto FROM pagos where fecha_pago='$desde' and pagos.id_caja_cob<>'EA00000001' limit 1 \");\n\t\t$row=row($acceso);\n\t\t$monto=trim($row[\"monto\"])+0;\n\t\t$cant=trim($row[\"cant\"])+0;\n\t\t\n\t\t\n\t if($monto>0){\n\t\t$wi=0;\n\t\t$j=0;\n\t\t$suma=0;\n\t\t$suma_m=0;\n\t\t$this->SetX(10);\n\t\t//list($ano,$mes,$dia)=explode(\"-\",$desde);\n\t\t$fecha=$desde;\n\t\t$dia=formatofecha($desde);\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->Cell($w[$wi],$col,$dia,\"LR\",0,\"C\",$fill);\n\t\t$wi++;\n\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$sum_t=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos ,caja_cobrador,caja where pagos.id_caja_cob=caja_cobrador.id_caja_cob and caja_cobrador.id_caja=caja.id_caja and fecha_pago='$fecha' and status_pago='PAGADO' and id_franq='$id_franq' and pagos.id_caja_cob<>'EA00000001' \");\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$monto_pago=trim($row[\"monto_pago\"])+0;\n\t\t\t\t$sum_total[$j]+=$monto_pago;\n\t\t\t\t$sum_t+=$monto_pago;\n\t\t\t\t$this->Cell($w[$wi],$col,number_format($monto_pago+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t$sum_total[$j]+=$sum_t;\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell($w[2],$col,number_format($sum_t+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t$fill=!$fill;\n\t\t\t\n\t\t$this->Ln();\n\t\t\t\n\t\t}//if monto\t\n\t\t$desde=sumadia($desde);\n\t\t\t\n\t}\n\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell($w[0],7,\"TOTAL\",\"1\",0,\"R\",$fill);\n\t\t\t$sum_to=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t//$sum_to+=$sum_total[$j];\n\t\t\t\t$this->Cell($w[1],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->SetFont('Arial','B',10);\n\t\t\t$this->Cell($w[2],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\n\t}", "private function datosHorizontal($productosDelUsuario)\n {\n $this->SetTextColor(0,0,0);\n $this->SetFont('Arial','B',16);\n $top_datos=105;\n $this->SetXY(35, $top_datos);\n $this->Cell(190, 10, utf8_decode(\"DATOS DE LA TIENDA\"), 0, 2, \"J\");\n $this->SetFont('Arial','',10);\n $this->MultiCell(190, //posición X\n 5, //posición Y\n utf8_decode(\n \"ID Vendedor: \".\"1.\".\"\\n\".\n \"Vendedor: \".\"Mr. X.\".\"\\n\".\n \"Dirección: \".\"Medrano 951.\".\"\\n\".\n \"Provincia: \".\"C.A.B.A.\".\"\\n\".\n \"Telefono: \".\"+54 9 11 4867-7511.\".\"\\n\".\n \"Código Postal: \".\"1437.\"),\n 0, // bordes 0 = no | 1 = si\n \"J\", // texto justificado \n false);\n\n\n // Datos del cliente\n $this->SetFont('Arial','B',16);\n $this->SetXY(120, $top_datos);\n $this->Cell(190, 10, utf8_decode(\"DATOS DEL CLIENTE\"), 0, 2, \"J\");\n $this->SetFont('Arial','',10);\n $this->MultiCell(\n 190, //posición X\n 5, //posicion Y\n utf8_decode(\n \"DNI: \".\"20.453.557\".\"\\n\".\n \"Nombre y Apellido: \".\"Chuck Norris.\".\"\\n\".\n \"Dirección: \".\"Rivadavia 5227.\".\"\\n\".\n \"Provincia: \".\"C.A.B.A.\".\"\\n\".\n \"Telefono: \".\"+54 9 11 4741-7219.\".\"\\n\".\n \"Código Postal: \".\"3714.\"),\n 0, // bordes 0 = no | 1 = si\n \"J\", // texto justificado\n false);\n\n //Salto de línea\n $this->Ln(2);\n\n\n //Creación de la tabla de los detalles de los productos productos\n $top_productos = 165;\n $this->SetFont('Arial','B',16);\n $this->SetXY(30, $top_productos);\n $this->Cell(40, 5, utf8_decode('UNIDAD'), 0, 1, 'C');\n $this->SetXY(75, $top_productos);\n $this->Cell(40, 5, utf8_decode('PRODUCTO'), 0, 1, 'C');\n $this->SetXY(115, $top_productos);\n $this->Cell(70, 5, utf8_decode('PRECIO X UNIDAD'), 0, 1, 'C'); \n \n \n $this->SetXY(25, 150);\n $this->SetTextColor(241,241,241);\n $this->Cell(70, 5, '____________________________________________________', 0, 1, 'L'); \n\n $this->SetTextColor(0,0,0);\n $y = 170; // variable para la posición top desde la cual se empezarán a agregar los datos\n\n $precioTotal = 0;\n foreach($productosDelUsuario as $productoX)\n {\n $nombreProducto = $productoX['nombre'];\n $precioProducto = $productoX['precio'];\n \n $this->SetFont('Arial','',10);\n \n $this->SetXY(40, $y);\n $this->Cell(20, 5, utf8_decode(\"1\"), 0, 1, 'C');\n $this->SetXY(80, $y);\n $this->Cell(30, 5, utf8_decode(\"$nombreProducto\"), 0, 1, 'C');\n $this->SetXY(135, $y);\n $this->Cell(30, 5, utf8_decode(\"$$precioProducto\"), 0, 1, 'C');\n\n // aumento del top 5 cm\n $y = $y + 5;\n\n $precioTotal += $precioProducto;\n }\n\n $this->SetFont('Arial','B',16);\n $this->SetXY(100, 215);\n $this->Cell(0, 10, utf8_decode(\"Gastos de envío: $\".\"XXXX\"), 0, 1, \"C\");\n $this->SetXY(100, 223);\n $this->Cell(0, 10, utf8_decode(\"PRECIO TOTAL: $$precioTotal\"), 0, 1, \"C\");\n\n $this->Image('img/pdf/footer.jpg' , 0, 242, 210 , 55,'JPG');\n }", "public function encabezadoSolicitud($encabezado){\n \n $_string = \"<table class='table table-bordered'>\n \t<tr>\n <td class='datosbasicos1'> N&uacute;mero Solicitud </td>\n <td class='datosbasicos2'>\". $encabezado['numero'].\" </td>\n <td class='datosbasicos1'> Fecha Ingreso </td>\n <td class='datosbasicos2'>\". $encabezado['fecha_ingreso'].\" </td>\n </tr>\n <tr>\n <td class='datosbasicos1'> C&oacute;digo ARCA / SENAGUA </td>\n <td class='datosbasicos2'>\". $encabezado['qpxarca'].' / '.$encabezado['qpxsenagua'].\" </td>\n <td class='datosbasicos1'> Estado </td>\n <td class='datosbasicos2'>\". $encabezado['nom_eproceso'] .\" </td>\n </tr>\n <tr>\n <td class='datosbasicos1'> Enviado Por </td>\n <td class='datosbasicos2'>\". $encabezado['enviado_por'] .\" </td>\n <td class='datosbasicos1'> Rol </td>\n <td class='datosbasicos2'>\". $encabezado['nom_cda_rol'].\" </td>\n </tr>\n <tr>\n <td class='datosbasicos1'> Responsable </td>\n <td class='datosbasicos2'>\". $encabezado['nombres'].\" </td>\n <td class='datosbasicos1'> Fecha de Solicitud </td>\n <td class='datosbasicos2'>\". $encabezado['fecha_solicitud'].\" </td>\n </tr>\n <tr>\n <td class='datosbasicos1'> Fecha &Uacute;ltima Actividad </td>\n <td class='datosbasicos2'>\". $encabezado['ult_fecha_actividad'].\" </td>\n <td class='datosbasicos1'> Fecha &Uacute;ltimo Estado </td>\n <td class='datosbasicos2'>\". $encabezado['ult_fecha_estado'].\" </td>\n </tr>\n </table> \";\n \n return $_string;\n \n }", "public function passaAtributo(){\n\t\t$this->seletor = 0; // Por algum motivo que não quero investigar, a condicional for nñao está se comportando como eu esperava. Por isso estou usando while\n\t\t$this->alvo = file_get_contents($this->alvo);\n\t\t\twhile ($this->seletor < $this->atributos) { \n\n\t\t\t\t\t\t\t\t$dom = new DOMDocument();\n\t\t\t\t\t\t\t\t$dom->loadHTMLFile($this->modelo);\n\t\t\t\t\t\t\t\t$controle = 0; // Variável de controle\n\t\t\t\t\t\t\t\t// Consultando os links\n\t\t\t\t\t\t\t\t$links = $dom->getElementsByTagName($this->valores[$this->seletor]); // Seleione a tag de pesquisa atual\n\t\t\t\t\t\t\t\tforeach ($links as $link) {\n\t\t\t\t\t\t\t\t\t\t\t\tif ($controle == 0) { // Pega primeiro valor da class e assume como padrão (uma por tag)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->tag = $this->valores[$this->seletor];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->class = $link->getAttribute('class'); // Retorna tag do HTML com a nova class\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->alvo = str_replace(\"<$this->tag\", \"<$this->tag class='$this->class' \", $this->alvo);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$controle++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t/*echo \"<p>Executando...\".$this->valores[$this->seletor].\"\"; */\n\t\t\t\t$this->seletor++;\n\t\t\t}\n\t\t\techo \"<p>\".$this->alvo;\n\n\n\t}", "function EdtDuJourHorizontal($tab_data, $jour, $flags) \r\n{\r\n $result = \"\";\r\n $entetes = ConstruireEnteteEDT();\r\n $creneaux = ConstruireCreneauxEDT();\r\n $hauteur_demicreneaux = 30;\r\n\t$hauteur_creneaux = $hauteur_demicreneaux * 2;\r\n\t$nb_creneaux = $creneaux['nb_creneaux'];\r\n if (($nb_creneaux == 0) OR ($nb_creneaux == 1)) {\r\n $width = \"94px\";\r\n }\r\n else {\r\n $width = $nb_creneaux*2*$hauteur_demicreneaux + $hauteur_creneaux+4;\r\n $width = $width.\"px;\";\r\n } \r\n while (!isset($entetes['entete'][$jour])) {\r\n $jour--;\r\n }\r\n $jour_sem = $entetes['entete'][$jour];\r\n\r\n $result .= \" <div class=\\\"fond_h\\\">\\n\";\r\n $result .= \"<div class=\\\"ligne\\\" style=\\\"width : \".$width.\"\\\">\\n\";\r\n $jour_sem = $entetes['entete'][$jour];\r\n $result .= \"<div class=\\\"entete_h\\\" style=\\\"width : \".$hauteur_creneaux.\"px;\\\"><div class=\\\"cadre\\\">\".$jour_sem.\"</div></div>\\n\";\r\n $index_box = 0;\r\n\t$AlreadyInContainer = false;\r\n while (isset($tab_data[$jour]['type'][$index_box]))\r\n {\r\n if ($tab_data[$jour]['type'][$index_box] == \"vide\") {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n \r\n if (strpos($tab_data[$jour]['couleur'][$index_box], \"Repas\") !== FALSE) {\r\n $result .= \"<div class=\\\"cadreRepas\\\">\\n\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cadre\\\">\\n\";\r\n }\r\n if (isset($tab_data[$jour]['extras'][$index_box])) {\r\n $result .= \"Hello\".$tab_data[$jour]['extras'][$index_box];\r\n }\r\n $result .= \"</div></div>\\n\"; \r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"erreur\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule_h\\\" style = \\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n $result .= \"<div class=\\\"cadreRouge\\\">\\n\";\r\n $result .= $tab_data[$jour]['contenu'][$index_box];\r\n $result .= \"</div></div>\\n\"; \r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"conteneur\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n\t\t\tif (!$AlreadyInContainer) {\r\n\t\t\t\t$result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n\t\t\t}\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule_h\\\" style =\\\"width : \".$hauteur.\";display:block;\\\">\";\r\n\t\t\t\tif (!$AlreadyInContainer) {\r\n\t\t\t\t\t$CountBeforeOutOfContainer = 2;\r\n\t\t\t\t}\r\n\t\t\t\t$AlreadyInContainer = true;\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule_h\\\" style = \\\"width : \".$hauteur.\";display:block;\\\">\";\r\n\t\t\t\tif (!$AlreadyInContainer) {\r\n\t\t\t\t\t$CountBeforeOutOfContainer = 3;\r\n\t\t\t\t}\r\n\t\t\t\t$AlreadyInContainer = true;\t\t\t\t\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n\t\t\t\tif (!$AlreadyInContainer) {\r\n\t\t\t\t\t$CountBeforeOutOfContainer = 1;\r\n\t\t\t\t}\r\n\t\t\t\t$AlreadyInContainer = true;\t\t\t\t\r\n }\r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"cours\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n if (strpos($tab_data[$jour]['couleur'][$index_box], \"Couleur\") !== FALSE) {\r\n $result .= \"<div class=\\\"cadreCouleur\\\">\\n\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cadre\\\">\\n\";\r\n }\r\n if (isset($tab_data[$jour]['extras'][$index_box])) {\r\n $result .= \"Hello\".$tab_data[$jour]['extras'][$index_box];\r\n }\r\n if ($flags & INFOBULLE) {\r\n $lesson_content_1 = str_replace(\"<br />\", \" - \", $tab_data[$jour]['contenu'][$index_box]);\r\n $lesson_content_2 = str_replace(\"<i>\", \" \", $lesson_content_1);\r\n $lesson_content = str_replace(\"</i>\", \" \", $lesson_content_2);\r\n $result .=\"<div class=\\\"ButtonBar\\\"><div class=\\\"image\\\"><img src=\\\"../../templates/DefaultEDT/images/info.png\\\" title=\\\"\".$lesson_content.\"\\\" /></div></div>\";\r\n $result .= \"</div></div>\\n\";\r\n\r\n }\r\n else {\r\n $result .= $tab_data[$jour]['contenu'][$index_box];\r\n $result .= \"</div></div>\\n\";\r\n }\r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"fin_conteneur\")\r\n {\r\n $result .= \"</div>\\n\";\r\n\t\t\t$CountBeforeOutOfContainer--;\r\n\t\t\tif ($CountBeforeOutOfContainer == 0) {\r\n\t\t\t\t$result .= \"</div>\\n\";\r\n\t\t\t\t$AlreadyInContainer = false;\r\n\t\t\t}\r\n }\r\n else \r\n {\r\n // ========= type de box non implémentée\r\n\r\n }\r\n\r\n\r\n $index_box++;\r\n }\r\n\r\n $result .= \"</div><div style=\\\"clear:both\\\"></div>\\n\";\r\n\r\n\tif ($flags & CRENEAUX_INVISIBLES) {\r\n\t\t$result .= '</div>';\r\n\t\r\n\t}\r\n\telse {\r\n\t\t// ===== affichage de la colonne créneaux\r\n\r\n\t\t$result .= \"<div class=\\\"ligne_creneaux\\\" style=\\\"width : \".$width.\"\\\">\\n\";\r\n\t\t$result .= \"<div class=\\\"entete_creneaux_h\\\" style=\\\"width : \".$hauteur_creneaux.\"px;\\\"><div class=\\\"cadre\\\" style=\\\"width : \".$hauteur_creneaux.\"px;\\\">\";\r\n\t\tif (isset($tab_data['entete_creneaux'])) {\r\n\t\t\t$result .= $tab_data['entete_creneaux'];\r\n\t\t}\r\n\t\t$result .= \"</div></div>\\n\";\r\n\t\tfor ($i = 0; $i < $creneaux['nb_creneaux']; $i++)\r\n\t\t{\r\n\t\t\t$hauteur = 2 * $hauteur_demicreneaux;\r\n\t\t\t$hauteur = $hauteur.\"px;\";\r\n\t\t\t$result .= \"<div class=\\\"cellule_h\\\" style=\\\"width : \".$hauteur.\";\\\">\";\r\n\t\t\t$result .= \"<div class=\\\"cellule_creneaux\\\"><div class=\\\"cadre\\\">\".$creneaux['creneaux'][$i].\"</div></div>\\n\";\r\n\t\t\t$result .= \"</div>\";\r\n\t\t}\r\n\r\n\t\t$result .= \"</div></div><div style=\\\"clear:both\\\"></div>\";\r\n\t}\r\n return $result;\r\n}", "function TablaVentasDiariasVendedor()\n {\t\n\t\n\t $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n\t $this->SetXY(10, 15); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n //$this->Cell(130);\n //Título\n $this->Cell(140,8,'',0,0,'');\n\t$this->Cell(180,8,'LISTADO DE VENTAS DIARIAS DEL '.date(\"d-m-Y\"),0,1,'C');\n\t\n $this->Cell(140,8,'',0,0,'');\n\t$this->Cell(180,8,'DE CAJA N°.'.base64_decode($_GET['caja']),0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarVentasDiarias();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$PagototalCompras=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago'];\n $PagototalCompras+=$reg[$i]['totalpago2']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n\t$UtilidadBruto= $Pagototal-$PagototalCompras;\n\t$MargenBruto = ( $UtilidadBruto == '' ? \"0.00\" : number_format($UtilidadBruto/$PagototalCompras, 2, '.', ','));\n\t\n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n\t$this->Cell(35,5,'',0,0,'C');\n\t$this->Cell(15,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(22,5,'',0,0,'C');\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(37,5,\"TOTAL GANANCIAS\",1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(30,5,utf8_decode(number_format($MargenBruto*100, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "function Contenido($imagenlogo) {\n \t$this->SetMargins(10,10,151.5);\n\n \t//declaramos las fuentes a usar o tentativamente a usar ya que no sabemos cual es la original\n\t $this->AddFont('Gotham-B','','gotham-book.php');\n\t $this->AddFont('Gotham-B','B','gotham-book.php');\n\t $this->AddFont('Gotham-M','','gotham-medium.php');\n\t $this->AddFont('Helvetica','','helvetica.php');\n\n //variables locales\n $numero_de_presidiums=6;\n\n $presidium_orden=\"1\";\n $presidium_nombre=\"Cesar Gibran Cadena Espinosa de los Monteros\";\n $presidium_cargo=\"Dirigente de Redes y Enlaces \";\n\n \t//la imagen del PVEM\n \t$this->Image($imagenlogo, $this->GetX()+10, $this->GetY()+10, 100,40);\n\n \t//el primer espacio\n \t$this->Ln(3);\n $this->SetFillColor(231, 234,243); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetFont('Helvetica', '', 9); //font de cuando se va a rellenar la informacion\n $this->SetTextColor(0,0,0); //color gris para las letras\n $this->Cell(35, 5,utf8_decode(\"Distribución Logística:\"), 0,0, 'C', 1);\n\n $this->setY($this->GetY()+45);\n $this->Ln();\n $this->SetFillColor(231, 234,243); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetFont('Helvetica', '', 9); //font de cuando se va a rellenar la informacion\n $this->SetTextColor(0,0,0); //color gris para las letras\n $this->Cell(40, 5,utf8_decode(\"Presídium (Primera Fila):\"), 0,0, 'C', 1);\n\n $this->Ln(); \n $this->Ln(); \n\n $this->SetFillColor(160,68,68); //color de fondo donde se va a rellenar los campos (como azul claro)\n $this->SetTextColor(255); //color gris para las letras\n $tamano= ($numero_de_presidiums*7.5)/2;\n $this->setX((120/2)-$tamano);\n\n if ( ($numero_de_presidiums) % 2 ==1){ //es impar\n $candidato=($numero_de_presidiums/2)+.5;\n }else{\n $candidato=($numero_de_presidiums/2)+1;\n }\n\n for($i=0;$i<=$numero_de_presidiums;$i++){\n\n if ( ($i+1) == $candidato ){\n $this->Cell(7, 7,utf8_decode(\"*\"), 1, 0, 'C', 1);\n }else{\n $this->Cell(7, 7,utf8_decode(\"\"), 1, 0, 'C', 1); \n }\n }\n $this->Ln(); \n $this->Ln(5); \n\n\n //CONFIGURACION DE COLOR VERDE CON BLANCO\n $this->SetFont('Gotham-B','',6.5);\n $this->SetFillColor(73, 168, 63);\n $this->SetTextColor(255);\n $this->Cell(9, 5,utf8_decode(\"Orden\"), 'LR', 0, 'C', 1);\n $this->Cell(55, 5,utf8_decode(\"Nombre\"), 'LR', 0, 'C', 1);\n $this->Cell(0, 5,utf8_decode(\"Cargo\"), 'LR', 0, 'C', 1);\n\n\n $this->Ln(); \n\n\n //CONFIGURACION SIN COLOR de fondo\n $this->SetFont('Helvetica', '', 6.5); //font de cuando se va a rellenar la informacion\n $this->SetFillColor(255, 255, 255);\n $this->SetTextColor(0);\n\n\n //ESTO ES LO QUE IRIA EN UN FOR\n for($i=0;$i<=7;$i++){\n \n $this->Cell(9, 5,utf8_decode($presidium_orden), 1, 0, 'C', 1);\n $this->Cell(55, 5,utf8_decode($presidium_nombre), 1, 0, 'C', 1);\n $this->MultiCell(0, 5,utf8_decode($presidium_cargo), 1, 'C', 1);\n $this->Ln(1);\n } \n \n }", "public function gerenciar(){\n\t\t\n\t\tset_tema('footerinc', load_js(array('data-table', 'table')), FALSE);\n\t\tset_tema('titulo', 'Registros de coment&aacute;rios');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'gerenciar'));\n\t\tload_template();\n\t}", "function TituloCampos()\n\t{\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,70,25,20,20,25,80);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('Estacion de trabajo')),strtoupper(_('reporte z')),strtoupper(_('fecha')),strtoupper(_('hora')),strtoupper(_('TOTAL')),strtoupper(_('OBSERVACION')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'J',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "function TablaComprasGeneral()\n {\t\n\t //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO GENERAL DE COMPRAS',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'CÓDIGO COMPRA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'PROVEEDOR',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA COMPRA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTICULOS',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'TOTAL DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarCompras();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasic'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanoc'];\n\t$Totaliva+=$reg[$i]['totalivac']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentoc']; \n\t$Pagototal+=$reg[$i]['totalc']; \n\t\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(30,5,$reg[$i][\"codcompra\"],1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomproveedor\"]),1,0,'C');\n\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statuscompra']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statuscompra']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t\t\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechacompra']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivasic'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivanoc'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['ivac'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['totalivac'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['descuentoc'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['totaldescuentoc'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalc'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\n $this->Cell(60,5,'',0,0,'C');\t\n $this->Cell(15,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n\t\n }", "function TablaVentasFechas()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO DE VENTAS DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"].'',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DESC',1,0,'C', True);\n\t$this->CellFitSpace(27,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->BuscarVentasFechas();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(27,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(52,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(27,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "function TablaCreditosFechas()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',10);\n //Movernos a la derecha\n $this->Cell(100);\n //Título\n $this->Cell(110,20,'LISTADO DE CRÉDITOS PENDIENTES POR FECHAS '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"].'',0,0,'C');\n //Salto de línea\n $this->Ln(25);\t\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(40,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(45,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(40,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(45,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(8,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'CÉDULA',1,0,'C', True);\n\t$this->CellFitSpace(55,8,'NOMBRE CLIENTE',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'N° CAJA',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'DIAS VENC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'TOT FACTURA',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT ABONO',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DEBE',1,1,'C', True);\n\t\n \t$tra = new Login();\n $reg = $tra->BuscarCreditosFechas(); \n\t$TotalFactura=0;\n\t$TotalCredito=0;\n\t$TotalDebe=0;\n\t$a=1;\n\tfor($i=0;$i<sizeof($reg);$i++){ \n\t$TotalFactura+=$reg[$i]['totalpago'];\n\t$TotalCredito+=$reg[$i]['abonototal'];\n\t$TotalDebe+=$reg[$i]['totalpago']-$reg[$i]['abonototal'];\n\n\t$this->SetFont('courier','',7); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,5,$a++,1,0,'C');\n $this->CellFitSpace(20,5,$reg[$i]['cedcliente'],1,0,'C');\n\t$this->CellFitSpace(55,5,$reg[$i][\"nomcliente\"],1,0,'C');\n\t$this->CellFitSpace(20,5,$reg[$i]['nrocaja'],1,0,'C');\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(20, 5,utf8_decode(\"0\"),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(20, 5,utf8_decode(\"0\"),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(20, 5,utf8_decode(Dias_Transcurridos(date(\"Y-m-d\"),$reg[$i]['fechavencecredito'])),1,0,'C');\n\t}\n\t$this->CellFitSpace(30,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(25,5,date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa'])),1,0,'C');\n $this->CellFitSpace(25,5,number_format($reg[$i]['totalpago'], 2, '.', ','),1,0,'C');\n\t$this->CellFitSpace(20,5,number_format($reg[$i]['abonototal'], 2, '.', ','),1,0,'C');\n\t$this->CellFitSpace(20,5,number_format($reg[$i]['totalpago']-$reg[$i]['abonototal'], 2, '.', ','),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(8,5,'',0,0,'C');\n $this->Cell(20,5,'',0,0,'C');\n $this->Cell(55,5,'',0,0,'C');\n $this->Cell(20,5,'',0,0,'C');\n $this->Cell(17,5,'',0,0,'C');\n $this->Cell(20,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(25,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',7);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(25,5,utf8_decode(number_format($TotalFactura, 2, '.', ',')),1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($TotalCredito, 2, '.', ',')),1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($TotalDebe, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n\n \n $this->Ln(15); \n $this->SetFont('courier','B',9);\n $this->Cell(250,0,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]).' RECIBIDO POR:___________________________','',1,'C');\n $this->Ln(4);\n }", "function Cuerpo($acceso,$where)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t$this->SetFont('Arial','',8);\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$cad=\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\deff0\\\\deflang11274{\\\\fonttbl{\\\\f0\\\\fswiss\\\\fcharset0 Arial;}}\n{\\\\*\\\\generator Msftedit 5.41.15.1512;}\\\\viewkind4\\\\uc1\\\\pard\\\\tx1988\\\\f0\\\\fs32 hola\\\\par\n\";\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"1\",0,\"C\",$fill);\n\t\t\t$nro_contrato=trim($dato[$i][\"nro_contrato\"]);\n\t\t\t$cedula=trim($dato[$i][\"cedula\"]);\n\t\t\t$nombre=utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"]));\n\t\t\t$etiqueta=utf8_decode(trim($dato[$i][\"etiqueta\"]));\n\t\t\t$telefono=utf8_decode(trim($dato[$i][\"telefono\"]));\n\t\t\t$deuda=number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.');\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"zona\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,5,utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$nombre_zona=utf8_decode(trim($dato[$i][\"nombre_zona\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(14,5,strtoupper(_(\"sector\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"calle\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_calle=utf8_decode(trim($dato[$i][\"nombre_calle\"]));\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(17,5,strtoupper(_(\"nro casa\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$num_casa=utf8_decode(trim($dato[$i][\"numero_casa\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"edif\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$edificio=utf8_decode(trim($dato[$i][\"edificio\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"piso\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$n_p=utf8_decode(trim($dato[$i][\"numero_piso\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(8,5,strtoupper(_(\"ref\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$direc_adicional=utf8_decode(trim($dato[$i][\"direc_adicional\"]));\n\t\t\t//$this->MultiCell(81,5,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',2);\n\t\t\t$this->Ln();\n\t\t\t$this->SetX(114);\n\t\t//\t$this->Cell(89,3,'',\"LR\",0,\"C\",$fill);\n\t\t\t//$this->Cell(array_sum($w),3,'',\"RL\",0,\"C\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==11 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t$cad.=\"$nro_contrato \\\\tab $nro_contrato \\\\tab\n\";\n\t\t$cont++;\n\t\t}\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"}\n\";\n\t\treturn $cad;\n\t}", "public function linea_colectivo();", "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 articulos($id_compras_orden=false){\r\n\t\t$table \t\t\t\t= '';\r\n\t\t$accion \t\t\t= $this->tab['articulos'];\r\n\t\t$uso_interno\t\t= (!$id_compras_orden)?false:true;\r\n\t\t$id_compras_orden \t= (!$id_compras_orden)?$this->ajax_post('id_compras_orden'):$id_compras_orden;\r\n\t\t$detalle \t\t\t= $this->ordenes_model->get_orden_unico($id_compras_orden);\r\n\r\n\t\t$data_sql = array('id_compras_orden'=>$id_compras_orden);\r\n\t\t$data_listado=$this->db_model->db_get_data_orden_listado_registrado_unificado($data_sql);\r\n\t\t$moneda = $this->session->userdata('moneda');\r\n\t\tif(count($data_listado)>0){\r\n\t\t\t\t$style_table='display:block';\r\n\t\t\t\t$html='';\r\n\t\t\tfor($i=0;count($data_listado)>$i;$i++){\r\n\t\t\t\t// Lineas\r\n\t\t\t\t$peso_unitario = (substr($data_listado[$i]['peso_unitario'], strpos($data_listado[$i]['peso_unitario'], \".\" ))=='.000')?number_format($data_listado[$i]['peso_unitario'],0):$data_listado[$i]['peso_unitario'];\r\n\t\t\t\t$presentacion_x_embalaje = (substr($data_listado[$i]['presentacion_x_embalaje'], strpos($data_listado[$i]['presentacion_x_embalaje'], \".\" ))=='.000')?number_format($data_listado[$i]['presentacion_x_embalaje'],0):$data_listado[$i]['presentacion_x_embalaje'];\r\n\t\t\t\t$embalaje = ($data_listado[$i]['embalaje'])?$data_listado[$i]['embalaje'].' CON ':'';\r\n\r\n\t\t\t\t//print_debug($data_listado);\r\n\t\t\t\t$Data['consecutivo'] \t\t\t\t =\t ($i+1);\r\n\t\t\t\t$Data['id_compras_articulo_precios'] =\t $data_listado[$i]['id_compras_articulo_precios'];\r\n\t\t\t\t$Data['id_compras_articulo_presentacion'] =\t $data_listado[$i]['id_compras_articulo_presentacion'];\r\n\t\t\t\t$Data['id_compras_orden_articulo'] =\t $data_listado[$i]['id_compras_orden_articulo'];\r\n\t\t\t\t$Data['id_compras_articulo'] \t\t =\t $data_listado[$i]['id_compras_articulo'];\r\n\t\t\t\t$Data['id_articulo_tipo'] \t\t \t =\t $data_listado[$i]['id_articulo_tipo'];\r\n\t\t\t\t$Data['id_compras_um'] \t\t\t \t =\t $data_listado[$i]['id_compras_um'];\r\n\t\t\t\t$Data['um_x_embalaje'] \t\t\t \t =\t $data_listado[$i]['um_x_embalaje'];\r\n\t\t\t\t$Data['um_x_presentacion'] \t\t \t =\t $data_listado[$i]['um_x_presentacion'];\r\n\t\t\t\t$Data['unidad_minima'] \t\t\t \t =\t $data_listado[$i]['unidad_minima'];\r\n\t\t\t\t$Data['cl_um']\t\t\t\t\t \t =\t $data_listado[$i]['cl_um'];\r\n\t\t\t\t$Data['nombre_comercial']\t\t\t =\t $data_listado[$i]['nombre_comercial'];\r\n\t\t\t\t$Data['articulo']\t\t\t\t\t =\t $data_listado[$i]['articulo'].' - '.$data_listado[$i]['presentacion_detalle'];\r\n\t\t\t\t$Data['peso_unitario'] \t\t\t \t =\t $peso_unitario;\r\n\t\t\t\t$Data['upc'] \t\t\t\t\t\t =\t 'SKU:'.$data_listado[$i]['sku'].' UPC:'.$data_listado[$i]['upc'];\r\n\t\t\t\t$Data['presentacion_x_embalaje'] \t =\t $embalaje.$presentacion_x_embalaje;\r\n\t\t\t\t$Data['presentacion'] \t\t\t\t =\t $data_listado[$i]['presentacion'];\r\n\t\t\t\t$Data['costo_sin_impuesto'] \t\t =\t $data_listado[$i]['costo_sin_impuesto'];\r\n\t\t\t\t$Data['moneda'] \t\t\t\t\t =\t $moneda;\r\n\t\t\t\t$Data['cantidad'] \t\t\t\t\t =\t $data_listado[$i]['cantidad'];\r\n\t\t\t\t$Data['costo_x_cantidad'] \t\t\t =\t $data_listado[$i]['costo_x_cantidad'];\r\n\t\t\t\t$Data['descuento'] \t\t\t\t \t =\t $data_listado[$i]['descuento'];\r\n\t\t\t\t$Data['subtotal'] \t\t\t\t\t =\t $data_listado[$i]['subtotal'];\r\n\t\t\t\t$Data['impuesto_porcentaje'] \t\t =\t $data_listado[$i]['impuesto_porcentaje'];\r\n\t\t\t\t$Data['valor_impuesto']\t\t\t \t =\t $data_listado[$i]['valor_impuesto'];\r\n\t\t\t\t$Data['total'] \t\t\t\t\t \t =\t $data_listado[$i]['total'];\r\n\t\t\t\t$Data['number_costo_sin_impuesto'] =\t number_format($data_listado[$i]['costo_sin_impuesto'],2);\r\n\t\t\t\t$Data['number_cantidad'] \t\t\t =\t number_format($data_listado[$i]['cantidad'],0);\r\n\t\t\t\t$Data['number_costo_x_cantidad'] \t =\t number_format($data_listado[$i]['costo_x_cantidad'],2);\r\n\t\t\t\t$Data['number_descuento'] \t\t\t =\t number_format($data_listado[$i]['descuento'],0);\r\n\t\t\t\t$Data['number_subtotal']\t\t\t =\t number_format($data_listado[$i]['subtotal'],2);\r\n\t\t\t\t$Data['number_impuesto_porcentaje'] =\t number_format($data_listado[$i]['impuesto_porcentaje'],0);\r\n\t\t\t\t$Data['number_valor_impuesto']\t\t =\t number_format($data_listado[$i]['valor_impuesto'],2);\r\n\t\t\t\t$Data['number_total']\t\t\t\t =\t number_format($data_listado[$i]['total'],2);\r\n\r\n\t\t\t\t$url_listado_tpl = $this->modulo.'/'.$this->seccion.'/'.$this->submodulo.'/'.'entradas_recepcion_listado';\r\n\t\t\t\t$html.=$this->load_view_unique($url_listado_tpl ,$Data, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$style_table='display:none';\r\n\t\t\t$html='';\r\n\t\t}\r\n\t\t$data='';\r\n\t\t$proveedores = $this->ordenes_model->db_get_proveedores($data,$detalle[0]['id_proveedor']);\r\n\t\t$sucursales\t = $this->sucursales_model->get_orden_unico_sucursal($detalle[0]['id_sucursal']);\r\n\t\t$forma_pago\t = $this->formas_de_pago_model->get_orden_unico_formapago($detalle[0]['id_forma_pago']);\r\n\t\t$creditos\t = $this->creditos_model->get_orden_unico_credito($detalle[0]['id_credito']);\r\n\t\t$orden_tipo\t = $this->ordenes_model->db_get_tipo_orden($detalle[0]['id_orden_tipo']);\r\n\t\t\r\n\t\t$fec=explode('-',$detalle[0]['entrega_fecha']);\r\n\t\t$entrega_fecha=$fec[2].'/'.$fec[1].'/'.$fec[0];\r\n\t\t$fec2=explode('-',$detalle[0]['orden_fecha']);\r\n\t\t$orden_fecha=$fec2[2].'/'.$fec2[1].'/'.$fec2[0];\r\n\t\t$tabData['id_compras_orden']\t\t = $id_compras_orden;\r\n\t\t$tabData['orden_num'] \t\t\t = $this->lang_item(\"orden_num\",false);\r\n $tabData['proveedor'] \t \t\t\t = $this->lang_item(\"proveedor\",false);\r\n\t\t$tabData['sucursal'] \t\t\t = $this->lang_item(\"sucursal\",false);\r\n $tabData['orden_fecha'] \t\t = $this->lang_item(\"orden_fecha\",false);\r\n\t\t$tabData['entrega_fecha'] = $this->lang_item(\"entrega_fecha\",false);\r\n $tabData['observaciones'] \t = $this->lang_item(\"observaciones\",false);\r\n $tabData['forma_pago'] \t\t\t = $this->lang_item(\"forma_pago\",false);\r\n\t\t$tabData['articulo'] \t\t\t \t = $this->lang_item(\"articulo\",false);\r\n\t\t$tabData['costo_unitario']\t \t\t = $this->lang_item(\"costo_unitario\",false);\r\n\t\t$tabData['cantidad'] \t\t\t \t = $this->lang_item(\"cantidad\",false);\r\n\t\t$tabData['costo_cantidad'] \t = $this->lang_item(\"costo_cantidad\",false);\r\n\t\t$tabData['descuento'] \t\t\t \t = $this->lang_item(\"descuento\",false);\r\n\t\t$tabData['subtotal'] \t\t\t \t = $this->lang_item(\"subtotal\",false);\r\n\t\t$tabData['imp'] \t\t\t \t\t = $this->lang_item(\"imp\",false);\r\n\t\t$tabData['valor_imp'] \t\t\t \t = $this->lang_item(\"valor_imp\",false);\r\n\t\t$tabData['total'] \t\t\t \t\t = $this->lang_item(\"total\",false);\r\n\t\t$tabData['accion'] \t\t\t\t = $this->lang_item(\"accion\",false);\r\n\t\t$tabData['impuesto'] \t\t\t\t = $this->lang_item(\"impuesto\",false);\r\n\t\t$tabData['a_pagar'] \t\t\t\t = $this->lang_item(\"a_pagar\",false);\r\n\t\t$tabData['cerrar_orden'] \t\t \t = $this->lang_item(\"cerrar_orden\",false);\r\n\t\t$tabData['cancelar_orden']\t\t\t = $this->lang_item(\"cancelar_orden\",false);\r\n\t\t$tabData['presentacion']\t\t\t = $this->lang_item(\"embalaje\",false);\r\n\t\t$tabData['consecutivo']\t\t\t\t = $this->lang_item(\"consecutivo\",false);\r\n\t\t$tabData['moneda']\t\t\t\t \t = $moneda;\r\n\t\t$tabData['aceptar_orden']\t\t\t = $this->lang_item(\"aceptar_orden\",false);\r\n\t\t$tabData['devolucion_orden']\t\t = $this->lang_item(\"devolucion_orden\",false);\r\n\t\t$tabData['no_factura']\t\t \t\t = $this->lang_item(\"no_factura\",false);\r\n\t\t$tabData['fecha_factura']\t\t \t = $this->lang_item(\"fecha_factura\",false);\r\n\t\t$tabData['#']\t\t \t \t\t\t = $this->lang_item(\"#\",false);\r\n\t\t$tabData['costo_unitario']\t\t \t = $this->lang_item(\"costo_unitario\",false);\r\n\t\t$tabData['costo_cantidad']\t\t \t = $this->lang_item(\"costo_cantidad\",false);\r\n\t\t$tabData['valor_imp']\t\t \t \t = $this->lang_item(\"valor_imp\",false);\r\n\t\t$tabData['aceptar']\t\t \t \t\t = $this->lang_item(\"aceptar\",false);\r\n\t\t$tabData['comentarios_entrada']\t\t = $this->lang_item(\"comentarios_entrada\",false);\r\n\t\t$tabData['recibir_enetrada']\t\t = $this->lang_item(\"recibir_enetrada\",false);\r\n\t\t$tabData['rechazar_entrada']\t\t = $this->lang_item(\"rechazar_entrada\",false);\r\n\t\t$tabData['fecha_caducidad']\t\t \t = $this->lang_item(\"fecha_caducidad\",false);\r\n\t\t$tabData['acciones']\t\t \t \t = $this->lang_item(\"acciones\",false);\r\n\t\t$tabData['lote']\t\t \t \t \t = $this->lang_item(\"lote\",false);\r\n\t\t\r\n\r\n\t\t//DATA\r\n\t\t$tabData['orden_num_value']\t \t\t = $detalle[0]['orden_num'];\r\n\t\t$tabData['estatus']\t \t\t \t\t = $detalle[0]['estatus'];\r\n\t\t$tabData['observaciones_value']\t \t = $detalle[0]['observaciones'];\r\n\t\t$tabData['fecha_registro']\t \t \t = $detalle[0]['timestamp'];\r\n\t\t$tabData['list_sucursales']\t\t\t = $sucursales[0]['sucursal'];\r\n\t\t$tabData['orden_fecha_value']\t \t = $orden_fecha;\r\n\t\t$tabData['entrega_fecha_value']\t = $entrega_fecha;\r\n\t\t$tabData['list_forma_pago']\t\t\t = $forma_pago[0]['forma_pago'];\r\n\t\t$tabData['table']\t\t\t\t\t = $html;\r\n\t\t$tabData['style_table']\t\t\t\t = $style_table;\r\n\r\n\t\t$uri_view = $this->path.$this->submodulo.'/'.$accion;\r\n\t\tif(!$uso_interno){\r\n\t\t\techo json_encode( $this->load_view_unique($uri_view ,$tabData, true));\r\n\t\t}else{\r\n\t\t\t$includes['css'][] = array('name' => 'style.default', 'dirname' => '');\r\n\t\t\t$includes['css'][] = array('name' => 'estilos-custom', 'dirname' => '');\r\n\t\t\treturn $this->load_view_unique($uri_view ,$tabData, true, $includes);\r\n\t\t}\r\n\t}", "public function cropHtmlWorksWithLinebreaks() {}", "function getTrCommune($row) {\n \n $str_commune = '';\n if($row['zone_geograpique'] == \"etendue\") {\n /*$commune = unserialize($row['commune']);\n for($i=0; $i<count($commune); $i++) {\n if($str_commune != '') { $str_commune .= \", \"; }\n $str_commune .= $commune[$i];\n }*/\n $str_commune = $row['commune'] ;\n }else {\n $str_commune = \"Territoire de compétence complet\";\n }\n //return \"<tr><td valign='top' class='pmeTdDetailExtract'>Communes</td><td valign='top'>:</td><td class='pmeTdDetailExtract'><textarea class='pmeTxtComm' READONLY>\".htmlentities(utf8_decode($str_commune), ENT_QUOTES).\"</textarea></td></tr>\";\n return \"<tr><td valign='top' class='pmeTdDetailExtract'>Communes</td><td valign='top'>:</td><td class='pmeTdDetailExtract'><textarea class='pmeTxtComm' READONLY>\".$str_commune.\"</textarea></td></tr>\";\n}", "public function htmlValue() {\n \n //Tableau Entête\n //- objet de la table_entete \n $arra_module = pnModGetInfo(pnModGetIDFromName($_GET['name']));\n //Si module visuclient affichage site ou groupe(si plusieurs site)\n if ($this->bool_title) {\n if ($arra_module['displayname'] == _DISPLAY_MOD_VISUCLIENT) {\n if ($_SESSION['SITE_CLIENT'] != \"TOUS\") {\n $affichage = str_replace(\"_\", \" \", $_SESSION['SITE_CLIENT']);\n } else {\n $affichage = _ALL_SITE . \"\" . str_replace(\"_\", \" \", $_SESSION['GROUPE_CLIENT']);\n } //Afichage sans underscore mais avec espace\n $obj_font_title0 = new font($arra_module['displayname'] . ' ' . $affichage, true);\n $obj_font_title0->setStyle('font-size:27px');\n } else {\n if ($arra_module['displayname']!=\"\"){\n $obj_font_title0 = new font($arra_module['displayname'] . ' V ' . $arra_module['version'], true);\n $obj_font_title0->setStyle('font-size:27px');\n }\n }\n } else {\n $obj_font_title0 = new font($this->stri_title, true);\n $obj_font_title0->setStyle('font-size:27px');\n }\n\n //LOGO SAVOYELINE\n if ($_SERVER['SERVER_ADDR'] == '10.10.100.98') {\n $obj_img_Savoye = new img(\"images/MaJ_graphique/logo_a_sis_test.gif\");\n $obj_img_Savoye->setStyle(\"cursor:pointer;padding:2px;\");\n $obj_img_Savoye->setBorder(\"0\");\n $obj_img_Savoye->setHeight(\"60px\");\n $obj_img_Savoye->setWidth(\"150px\"); \n $obj_img_Savoye->setTitle(\"Savoyeline\");\n $obj_img_Savoye->setAlt(\"Savoyeline\");\n $obj_a_Savoye = new a(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\", $obj_img_Savoye->htmlValue(), true);\n $obj_a_Savoye->setTarget(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\");\n } else {\n $obj_img_Savoye = new img(\"images/MaJ_graphique/logo_a_sis_gf.png\");\n $obj_img_Savoye->setStyle(\"cursor:pointer;padding:2px;\");\n $obj_img_Savoye->setBorder(\"0\");\n $obj_img_Savoye->setHeight(\"60px\");\n $obj_img_Savoye->setWidth(\"150px\");\n $obj_img_Savoye->setTitle(\"Savoyeline\");\n $obj_img_Savoye->setAlt(\"Savoyeline\");\n $obj_a_Savoye = new a(\"/index.php\", $obj_img_Savoye->htmlValue(), true);\n }\n\n //LOGO ENTREPRISE\n $obj_img_logo = new img($this->CreateLogo());\n //$obj_img_logo->setStyle(\"cursor:pointer;padding:2px;padding-right:10px;\");\n $obj_img_logo->setStyle(\"padding:2px;padding-right:10px;\");\n $obj_img_logo->setBorder(\"0\");\n $obj_img_logo->setTitle($this->getRaisonSociale());\n $obj_img_logo->setAlt($this->getRaisonSociale());\n $obj_img_logo->setHeight(\"60px\");\n $obj_img_logo->setWidth(\"165px\");\n //$obj_a_logo = new a(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\", $obj_img_logo->htmlValue(), true);\n //$obj_a_logo->setTarget(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\");\n\n //Création table \n $obj_table_entete = new table();\n $obj_tr = $obj_table_entete->addTr();\n \n //Bascule\n $obj_a_Savoye=($this->bool_logo_savoye)?$obj_a_Savoye:null;\n\n $obj_td = $obj_tr->addTd($obj_a_Savoye);\n $obj_td->setWidth(\"150px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('left');\n\n $obj_td = $obj_tr->addTd($obj_font_title0);\n $obj_td->setAlign('center');\n $obj_td->setStyle('height : 64px;');\n \n //Bascule\n $obj_img_logo=($this->bool_logo_firm)?$obj_img_logo:null;\n\n $obj_td = $obj_tr->addTd($obj_img_logo);\n $obj_td->setWidth(\"150px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('right');\n\n if($this->bool_lang)\n {\n $obj_td = $obj_tr->addTd($this->displayLang());\n $obj_td->setWidth(\"180px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('right');\n }\n else\n {$obj_td = $obj_tr->addTd(\"\");}\n\n \n $obj_table_entete->setClass(\"titre0\");\n $obj_table_entete->setBorder(\"0\");\n $obj_table_entete->setWidth(\"100%\");\n\n return $obj_table_entete->htmlValue();\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}", "function formatGuruMeditationException($e)\n{\n return \"\n <html>\n <head>\n <title>Guru Meditation</title>\n\n\n <style>\n .wrap{\n width: 67%;\n margin: 0 0 1em 14%;\n padding: 2% 3% 2% 5%;\n BACKGROUND: white;\n border-style: solid;\n border-width: 1px;\n top: -1px;\n }\n h2,h3,h4{\n position: relative;\n clear: both;\n }\n h1 {\n position: relative;\n font-size: 14pt;\n clear: both;\n }\n body {\n margin: 0;\n padding: 0;\n background: white;\n //font: 0.8em trebuchet ms;\n }\n em {\n background: #ffc;\n }\n pre {\n font-size: 10pt;\n background: #f0f0f0;\n -moz-border-radius: 10px;\n padding: 1em;\n }\n pre span {\n font-weight: bold;\n }\n .selector, pre b {\n color: red;\n }\n\n .beh {\n color: blue;\n }\n .event{\n color: green;\n }\n\n #sortable-list li{\n cursor:move;\n -moz-user-select: none;\n width: 100%;\n }\n\n .dropout li{\n width: 100px;\n line-height: 100px;\n text-align: center;\n float: left;\n margin: 5px;\n border: 1px solid #ccc;\n list-style: none;\n background: red;\n }\n\n .dropout li.hover{\n background: yellow;\n }\n\n #mw_logger\n {\n }\n\n #mw_log\n {\n border: 8px solid #ff0000;\n padding: 8px;\n visibility:visible;\n background-color: black ;\n }\n\n #mw_log_border\n {\n border: 8px solid black;\n visibility:visible;\n background-color: black ;\n }\n\n #mw_log_content\n {\n }\n\n\n #mw_log_logo\n {\n font-weight:bold;\n color: #FF0000;\n border-color:Black;\n text-align:center;\n }\n\n #mw_log *\n {\n background-repeat: no-repeat;\n //font-size: 9pt;\n //font-family:Courier New;\n margin: 0;\n padding: 0;\n }\n\n #mw_log p, #mw_log h6, #mw_log ul\n {\n text-align: left;\n }\n\n #mw_log p\n {\n margin-left: 3px;\n padding-left: 20px;\n background-position: top left;\n line-height: 1.4em;\n }\n\n #mw_log a\n {\n font-weight:bold;\n margin-left: 3px;\n padding-left: 20px;\n }\n\n #mw_log table\n {\n width:90%;\n text-align:center;\n font-size: 10pt;\n }\n\n </style>\n\n <script>\n setInterval(blinkBorder, 1000);\n\n function blinkBorder()\n {\n var id = document.getElementById('mw_log');\n\n if (id.style.borderColor == 'black black black black') {\n id.style.borderColor = 'red red red red';\n } else {\n id.style.borderColor = 'black black black black';\n }\n }\n </script>\n\n </head>\n <body>\n\n <div id='mw_log_border'>\n <div id='mw_log'>\n <table id='mw_log_table'>\n <tr width='100%'>\n <td id='mw_log_logo'>\n <h1>Guru Meditation #30000001</h1><br/>\n '\".$e->getMessage().\"'\n <br/>\n In file \".basename($e->getFile()).\n \" at line \".$e->getLine().\n \"</td>\n </tr>\n </table>\n </div>\n </div>\n\n\n <pre>\".print_r($e, true).\"</pre>\n\n </body>\n </html>\";\n}", "function encabezadoReporte() {\n ?>\n <table width=\"100%\">\n <tr>\n <caption class=\"sigma centrar\">\n REPORTE DE INSCRIPCION\n </caption>\n </tr>\n </table>\n <?\n }", "function contenu()\n{\n // reprendre l'exercice sur Celsius\n\t$cels= -50;\n\t$far = -58;\n\n\tprint(\"<h1>\" .'Correspondance Celsius\tFahrenheit'.\"</h1>\");\n\tprint(\"\\n\");\n\n\tprint(\"\\t\". \"<table>\" .\"\\n\");\n\tprint(\"\\t\\t\". \"<thead>\" .\"\\n\");\n\n\tprint(\"\\t\\t\" .\"<tr>\". \"\\n\");\n\t\tprint(\"\\t\\t\". \"<th>\" .\"Celsius\". \"</th>\" .\"\\n\");\n\t\tprint(\"\\t\\t\". \"<th>\" .\"Fahrenheit\". \"</th>\" .\"\\n\");\n\tprint(\"\\t\\t\" .\"</tr>\". \"\\n\");\n\n\tprint(\"\\t\\t\". \"</thead>\" .\"\\n\");\n\n\tfor($cpt=0; $cpt<21; $cpt++)\n\t{\n\t\tprint(\"\\t\\t\". \"<tr class=\\\"bleu_fonc\\\">\" .\"\\n\");\n\n\t\tprint(\"\\t\\t\\t\". \"<td>\");\n\t\tprint($cels);\n\t\tprint(\"\\t\\t\". \"</td>\" .\"\\n\");\n\t\t//print(\"\\t\");\n\t\tprint(\"\\t\\t\\t\". \"<td>\");\n\t\tprint($far);\n\t\tprint(\"\\t\\t\". \"</td>\" .\"\\n\");\n\t\t//print(\"<br />\" .\"\\n\");\n\t\tprint(\"\\t\\t\". \"</tr>\" .\"\\n\");\n\n\t\t$cels += 5;\n\t\t$far += 9;\n\t}\n\n\tprint(\"\\t\". \"</table>\" .\"\\n\");\n}", "function TablaListarCajas()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n //Movernos a la derecha\n $this->Cell(100);\n //Título\n $this->Cell(65,20,'LISTADO GENERAL DE CAJAS DE VENTAS',0,0,'C');\n //Salto de línea\n $this->Ln(25);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es BLANCO)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->Cell(10,8,'N°',1,0,'C', True);\n\t$this->Cell(25,8,'N° CAJA',1,0,'C', True);\n\t$this->Cell(45,8,'NOMBRE DE CAJA',1,0,'C', True);\n\t$this->Cell(40,8,'CÉDULA CAJERO',1,0,'C', True);\n\t$this->Cell(70,8,'NOMBRE CAJERO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarCajas();\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n $this->CellFitSpace(45,5,utf8_decode($reg[$i][\"nombrecaja\"]),1,0,'C');\n $this->CellFitSpace(40,5,utf8_decode($reg[$i][\"cedula\"]),1,0,'C');\n\t$this->CellFitSpace(70,5,utf8_decode($reg[$i][\"nombres\"]),1,0,'C');\n $this->Ln();\n\t\n }\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(60,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(60,6,'',0,0,'');\n $this->Ln(4);\n }", "public function genera_txt($param_final){\n\n\t\t$allrows = $param_final;\n\t\t\n\t\t$id_us = $this->session->userdata('session_id'); \n\n\t\t$archivo = fopen($_SERVER['DOCUMENT_ROOT'].'/reportes_villatours_v/referencias/archivos/archivos_egencia_lay_data_import_sp/udids_'.$id_us.'.txt', \"w+\");\n\t\t\n\t\t$header = ['Link_Key','BookingID','UdidNumber','UdidValue','UdidDefinitions'];\n\n\t\t$str_body = '';\n\t\tforeach ($header as $key => $value) {\n\t\t\t\n\t\t\t\t\t$str_body = $str_body . $value.\"\t\";\n\n\t\t\t\t}\n\n\n\t\tfwrite($archivo, $str_body);\n\t\t\t\n\n\t $nueva_plantilla = [];\n\n\t\tforeach ($allrows['rep'] as $key => $value) {\n\t\n\n\t\t\tarray_push($nueva_plantilla, $value);\n\t\t\t\n\n\t\t}\n\n\t\t\n\t foreach($nueva_plantilla as $key => $value) {\n\n\t \tfwrite($archivo,\"\\r\\n\");\n\t \t\n\t \t$str_body = '';\n\t \tforeach($value as $value2) {\n\n\t \t\t$str_body = $str_body . $value2.\"\t\";\n\n\t \t}\n\n\t \tfwrite($archivo, $str_body);\n\n\t\t}\n\n\t\t\n\n\t\tfclose($archivo);\n\n }", "function TituloCampos()\n\t{\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(195,212,235);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,20,21,74,25,25,18);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('nro abo.')),strtoupper(_('cedula')),strtoupper(_('nombre y apellido')),strtoupper(_('Etiqueta')),strtoupper(_('telefono')),strtoupper(_('deuda')));\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(10);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'J',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "function TituloCampos()\n\t{\n\t\t$this->Ln();\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(20,74,42,44);\n\t\t$header=array(strtoupper(_('numero')),strtoupper(_('nombre')),strtoupper(_('familia')),strtoupper(_('unidad medida')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'J',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "public function mostrarDatosComprobantes(){\r\n\t\t$html = null;\t\t\r\n\r\n\t\t$month = date('m');\r\n \t$year = date('Y');\r\n \t$day = date(\"d\");\r\n\r\n\t\t$data['fechaEmision'] = date('Y-m-d');\r\n\r\n\t\t$fecemi = $data['fechaEmision'];\r\n\r\n\t\t$canales=$_POST['canalesDos'];\r\n\t\t$datos['canalesDos'] = $canales;\r\n\r\n\t\t$inicio = $_POST['fechainicioDos'];\r\n\t\t//$fin = $_POST['fechafinDos'];\r\n\r\n\t\t$serie = $_POST['numeroSerie'];\t\r\n\t\t//$data['nameCheck'] = $_POST['nameCheck'];\r\n\t\t//$idPlan = $data['nameCheck'];\r\n\r\n\r\n\t\tif (substr($serie, 0, 1) == 'B') {\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaEmiSoles($inicio, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaEmiDolares($inicio, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span>&nbsp;<span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\t\t\t$html .= \"<br>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t//$html .=\"<th>Id Comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de Emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombres y Apellidos</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>DNI</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t//\tfor ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$boleta = $this->comprobante_pago_mdl->getDatosBoletaEmitida($inicio, $serie);\r\n\r\n\t\t\t\t\tforeach ((array) $boleta as $b):\r\n\r\n\t\t\t\t\t\t$importe = $b->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importe, 2, '.', ',');\r\n\r\n\t\t\t\t\t\t$estado = $b->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($b->fecha_emision));\r\n\r\n\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t//$html .= \"<td align='left'>\".$$b->idcomprobante.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->serie.\" - \".$b->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$b->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->contratante.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante[]' value='\".$b->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cont_numDoc.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".utf8_decode($b->nombre_plan).\"</td>\";\r\n\t\t\t\t\t\t\tif ($b->tipo_moneda == 'PEN') {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>S/. \".$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t} elseif ($b->tipo_moneda == 'USD') {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>$ \".$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t$html .=\"</td>\";\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$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\r\n\t\t\t\t\t//}\r\n\t\t\t\t\r\n\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t$html .= \"</table>\";\r\n\t\t$html .= \"</div>\";\r\n\r\n\t\t} elseif (substr($serie, 0, 1) == 'F') {\r\n\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaEmiSoles($inicio, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaEmiDolares($inicio, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span>&nbsp;<span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\r\n\t\t\t$html .=\"<hr>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha para emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Razon Social</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>RUC</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t//for ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$factura = $this->comprobante_pago_mdl->getDatosFacturaEmitida($inicio, $serie);\r\n\r\n\t\t\t\t\tforeach ((array)$factura as $f):\r\n\r\n\t\t\t\t\t\t$importeDos = $f->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importeDos, 2, '.', ',');\r\n\t\t\t\t\t\t$estado = $f->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($f->fecha_emision));\r\n\r\n\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$f->serie.\" - \".$f->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie' value='\".$f->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->razon_social_cli.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante' value='\".$f->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->numero_documento_cli.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_plan.\"</td>\";\r\n\t\t\t\t\t\t\t\tif ($f->tipo_moneda == 'PEN') {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>S/. \".$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t\t} elseif ($f->tipo_moneda == 'USD') {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>$ \".$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$f->idcomprobante.\"/\".$canales.\"/F001' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$f->idcomprobante.\"/\".$canales.\"/F001' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t$html .= \"</table>\";\r\n\t\t$html .= \"</div>\";\r\n\t\t}\r\n\r\n\t\techo json_encode($html);\r\n\t}", "function echo_resultats_sp($query){\n\t// $file=\"\";\n\techo '<table id=\"traitementsp_fr\" class=\"display\" width=\"100%\" cellspacing=\"0\">\n\t\t\t<thead>\n\t\t\t\t<tr>';\n\t// Noms des colonnes du tableau\n\t// Si la box \"tout\" est cochée ou si aucune ne sont cochées, affiche toutes les colonnes\n\t\techo '\n\t\t\t\t<th>EC Number</th>\n\t\t\t\t<th>Systematic Names</th>\n\t\t\t\t<th>Accepted Names</th>\n\t\t\t\t<th>Synonyms</th>\n\t\t\t\t<th>Cofactors</th>\n\t\t\t\t<th>Activity</th>\n\t\t\t\t<th>History</th>\n\t\t\t\t<th>Prosite</th>\n\t\t\t\t<th>Swissprot</th>\t\n\t\t\t</tr>\n\t\t</thead>\n\t<tbody>';\n\n\t$ec_courant=\"\";\n\t$flag=false;\n\t\n\twhile ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n\t\tif($row['ec']!=$ec_courant) {\n\t\t\t$ec_courant=$row['ec'];\n\t\t\tif($flag) {\n\t\t\t\t$syn.='</td>';\n\t\t\t\t$swi.='</td>';\n\t\t\t\t\n\t\t\t\techo '<tr>'.$ec.$syst.$acc.$syn.$co.$act.$his.$pro.$swi.'</tr>';\n\t\t\t}\n\t\t\telse $flag=true;\n\t\t\t\n\t\t\t$syn_l=array();\n\t\t\t$swi_l=array();\n\t\t\t\n\t\t\t$ec='<td><a target=\"_blank\" href=\"traitementfiche_fr.php?ec='.$row['ec'].'\">'.$row['ec'].'</a></td>';\n\t\t\t$syst='<td>'.$row['systematic_name'].'</td>';\n\t\t\t$acc='<td>'.$row['accepted_name'].'</td>';\n\t\t\t$co='<td>'.$row['cofactors'].'</td>';\n\t\t\t$act='<td>'.$row['activity'].'</td>';\n\t\t\t$his='<td>'.$row['history'].'</td>';\n\t\t\t$pro='<td><a target=\"_blank\" href=\"https://prosite.expasy.org/'.$row['num_prosite'].'\">'.$row['num_prosite'].'</a></td>';\n\t\t\t$syn='<td>';\n\t\t\t$swi='<td>';\n\t\t\t\n\t\t\t\n\t\t\tif(!empty($row['synonyme'])) {\n\t\t\t\tif(!in_array($row['synonyme'],$syn_l)) {\n\t\t\t\t\t$syn=$syn.$row['synonyme'].\"\\t \";\n\t\t\t\t\t$syn_l[]=$row['synonyme'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!empty($row['code_swissprot'])) {\n\t\t\t\tif(!in_array($row['code_swissprot'],$swi_l)) {\n\t\t\t\t\t$swi=$swi.'<a target=\"_blank\" href=\"http://www.uniprot.org/uniprot/'.$row['num_swissprot'].'\">'.$row['code_swissprot'].'</a>'.\"\\t \";\n\t\t\t\t\t$swi_l[]=$row['code_swissprot'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(!empty($row['synonyme'])) {\n\t\t\t\tif(!in_array($row['synonyme'],$syn_l)) {\n\t\t\t\t\t$syn=$syn.$row['synonyme'].\"\\t \";\n\t\t\t\t\t$syn_l[]=$row['synonyme'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!empty($row['code_swissprot'])) {\n\t\t\t\tif(!in_array($row['code_swissprot'],$swi_l)) {\n\t\t\t\t\t$swi=$swi.'<a target=\"_blank\" href=\"http://www.uniprot.org/uniprot/'.$row['num_swissprot'].'\">'.$row['code_swissprot'].'</a>'.\"\\t \";\n\t\t\t\t\t$swi_l[]=$row['code_swissprot'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t$syn.='</td>';\n\t$swi.='</td>';\n\t\t\t\t\n\techo '<tr>'.$ec.$syst.$acc.$syn.$co.$act.$his.$pro.$swi.'</tr>';\n\techo '</tbody>\n\t</table>';\n\n\techo \"\n\t\t<script type=\\\"text/javascript\\\">\n\t\t\t$(document).ready(function() {\n\t\t\t\t$('#traitementsp_fr').DataTable({\n\t\t\t\t\tdom: 'Bfrtip',\n\t\t\t\t\tlengthMenu: [\n\t\t\t [ 10, 25, 50, -1 ],\n\t\t\t [ '10 rows', '25 rows', '50 rows', 'Show all' ]\n\t\t\t ],\n\t\t\t columnDefs: [\n\t\t\t {\n\t\t\t targets: -1,\n\t\t\t visible: false\n\t\t\t } \n \t\t\t\t],\n\n\t\t\t\t\tbuttons: [\n\n\t\t\t\t\t \t{\n\t\t\t\t\t\t\textend: 'collection',\n\t\t\t text: 'Export',\n\t\t\t buttons: [\n\t\t\t \t{\n\t\t\t\t\t extend: 'copyHtml5',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t }\n\t\t\t\t\t },\n\t\t\t\t\t {\n\t\t\t\t\t extend: 'csvHtml5',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t }\n\t\t\t\t\t },\n\t\t\t\t\t {\n\t\t\t\t\t extend: 'excelHtml5',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t }\n\t\t\t\t\t },\n\t\t\t\t\t {\n\t\t\t\t\t extend: 'pdfHtml5',\n\t\t\t\t\t orientation: 'landscape',\n \t\t\t\t\t\tpageSize: 'LEGAL',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t }\n\t\t\t\t\t },\n\t\t\t\t\t {\n\t\t\t\t\t extend: 'print',\n\t\t\t\t\t exportOptions: {\n\t\t\t\t\t columns: ':visible'\n\t\t\t\t\t \t}\n\t\t\t\t\t }\n\t\t\t ]\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'pageLength',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\textend: 'colvis'\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</script>\";\n}", "function TablaListarClientes()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO GENERAL DE CLIENTES',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln();\n\t\n\t$this->Ln();\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es BLANCO)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->Cell(10,8,'N°',1,0,'C', True);\n\t$this->Cell(35,8,'CÉDULA',1,0,'C', True);\n\t$this->Cell(70,8,'NOMBRES',1,0,'C', True);\n\t$this->Cell(110,8,'DIRECCIÓN DOMICILIARIA',1,0,'C', True);\n\t$this->Cell(35,8,'N° TELÉFONO',1,0,'C', True);\n\t$this->Cell(75,8,'CORREO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarClientes();\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(35,5,utf8_decode($reg[$i][\"cedcliente\"]),1,0,'C');\n $this->CellFitSpace(70,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n $this->CellFitSpace(110,5,utf8_decode($reg[$i][\"direccliente\"]),1,0,'C');\n\t$this->Cell(35,5,utf8_decode($reg[$i][\"tlfcliente\"]),1,0,'C');\n\t$this->Cell(75,5,utf8_decode($reg[$i][\"emailcliente\"]),1,0,'C');\n $this->Ln();\n\t\n }\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "public function stampaDipendenti() {\n echo '<p> Nome: ' . $this->nome . '</p>';\n echo '<p> Cognome: ' . $this->cognome . '</p>';\n echo '<p> Software utilizzati: ' . $this->software . '</p>';\n }", "function texto($fichero=\"\") {\n echo '<div class=\"row\"> <blockquote class=\"blockquote ml-3 text-justify\">';\n if (\"$fichero\" == \"\") {\n echo '<br>';\n } else {\n // Leer fichero\n $texto=file_get_contents($fichero);\n $texto='<p>' . str_replace(\"·\", \"<br>\",$texto) . '</p>';\n echo $texto;\t \n }\t \n echo '</blockquote> </div>';\n}", "function EdtDuJourVertical($tab_data, $jour, $flags) \r\n{\r\n $result = \"\";\r\n $entetes = ConstruireEnteteEDT();\r\n $creneaux = ConstruireCreneauxEDT();\r\n $hauteur_demicreneaux = 20;\r\n\t$hauteur_creneaux = $hauteur_demicreneaux * 2;\r\n\t$nb_creneaux = $creneaux['nb_creneaux'];\r\n if (($nb_creneaux == 0) OR ($nb_creneaux == 1)) {\r\n $height = \"94px\";\r\n }\r\n else {\r\n $height = $nb_creneaux*2*$hauteur_demicreneaux + $hauteur_demicreneaux+1;\r\n $height = $height.\"px;\";\r\n } \r\n while (!isset($entetes['entete'][$jour])) {\r\n $jour--;\r\n }\r\n $jour_sem = $entetes['entete'][$jour];\r\n\r\n $result .= \" <div class=\\\"fond\\\">\\n\";\r\n $result .= \"<div class=\\\"colonne\\\" style=\\\"height : \".$height.\"\\\">\\n\";\r\n $jour_sem = $entetes['entete'][$jour];\r\n $result .= \"<div class=\\\"entete\\\" style=\\\"height : \".$hauteur_demicreneaux.\"px;\\\"><div class=\\\"cadre\\\">\".$jour_sem.\"</div></div>\\n\";\r\n $index_box = 0;\r\n while (isset($tab_data[$jour]['type'][$index_box]))\r\n {\r\n if ($tab_data[$jour]['type'][$index_box] == \"vide\") {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n \r\n if (strpos($tab_data[$jour]['couleur'][$index_box], \"Repas\") !== FALSE) {\r\n $result .= \"<div class=\\\"cadreRepas\\\">\\n\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cadre\\\">\\n\";\r\n }\r\n if (isset($tab_data[$jour]['extras'][$index_box])) {\r\n $result .= \"Hello\".$tab_data[$jour]['extras'][$index_box];\r\n }\r\n $result .= \"</div></div>\\n\"; \r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"erreur\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule\\\" style = \\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n $result .= \"<div class=\\\"cadreRouge\\\">\\n\";\r\n $result .= $tab_data[$jour]['contenu'][$index_box];\r\n $result .= \"</div></div>\\n\"; \r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"conteneur\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule\\\" style =\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule\\\" style = \\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n \r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"cours\")\r\n {\r\n $hauteur = $tab_data[$jour]['duree_valeur'][$index_box] * $hauteur_demicreneaux * 2;\r\n $hauteur = $hauteur.\"px;\";\r\n if (strpos($tab_data[$jour]['duree'][$index_box], \"demi\") !== FALSE) {\r\n $result .= \"<div class=\\\"demicellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n elseif (strpos($tab_data[$jour]['duree'][$index_box], \"tiers\") !== FALSE) {\r\n $result .= \"<div class=\\\"tierscellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n }\r\n $result .= \"<div style=\\\"display:none;\\\">\".$tab_data[$jour]['affiche_creneau'][$index_box].\" - durée = \".$tab_data[$jour]['duree_valeur'][$index_box].\" heure(s)</div>\\n\";\r\n if (strpos($tab_data[$jour]['couleur'][$index_box], \"Couleur\") !== FALSE) {\r\n $result .= \"<div class=\\\"cadreCouleur\\\">\\n\";\r\n }\r\n else {\r\n $result .= \"<div class=\\\"cadre\\\">\\n\";\r\n }\r\n if (isset($tab_data[$jour]['extras'][$index_box])) {\r\n $result .= $tab_data[$jour]['extras'][$index_box];\r\n }\r\n if ($flags & INFOBULLE) {\r\n $lesson_content_1 = str_replace(\"<br />\", \" - \", $tab_data[$jour]['contenu'][$index_box]);\r\n $lesson_content_2 = str_replace(\"<i>\", \" \", $lesson_content_1);\r\n $lesson_content = str_replace(\"</i>\", \" \", $lesson_content_2);\r\n $result .=\"<div class=\\\"ButtonBar\\\"><div class=\\\"image\\\"><img src=\\\"../../templates/DefaultEDT/images/info.png\\\" title=\\\"\".$lesson_content.\"\\\" /></div></div>\";\r\n $result .= \"</div></div>\\n\";\r\n\r\n }\r\n else {\r\n $result .= $tab_data[$jour]['contenu'][$index_box];\r\n $result .= \"</div></div>\\n\";\r\n }\r\n\r\n }\r\n else if ($tab_data[$jour]['type'][$index_box] == \"fin_conteneur\")\r\n {\r\n $result .= \"</div>\\n\";\r\n }\r\n else \r\n {\r\n // ========= type de box non implémentée\r\n\r\n }\r\n\r\n\r\n $index_box++;\r\n }\r\n\r\n $result .= \"</div>\\n\";\r\n\r\n\tif ($flags & CRENEAUX_INVISIBLES) {\r\n\t\t$result .= '</div>';\r\n\t}\r\n\telse {\r\n\t\t// ===== affichage de la colonne créneaux\r\n\r\n\t\t$result .= \"<div class=\\\"colonne_creneaux\\\">\\n\";\r\n\t\t$result .= \"<div class=\\\"entete_creneaux\\\" style=\\\"height : \".$hauteur_demicreneaux.\"px;\\\">\";\r\n\t\tif (isset($tab_data['entete_creneaux'])) {\r\n\t\t\t$result .= $tab_data['entete_creneaux'];\r\n\t\t}\r\n\t\t$result .= \"</div>\\n\";\r\n\r\n\t\tfor ($i = 0; $i < $creneaux['nb_creneaux']; $i++)\r\n\t\t{\r\n\t\t\t$hauteur = 2 * $hauteur_demicreneaux;\r\n\t\t\t$hauteur = $hauteur.\"px;\";\r\n\t\t\t$result .= \"<div class=\\\"cellule\\\" style=\\\"height : \".$hauteur.\";\\\">\";\r\n\t\t\t$result .= \"<div class=\\\"cellule_creneaux\\\"><div class=\\\"cadre\\\">\".$creneaux['creneaux'][$i].\"</div></div>\\n\";\r\n\t\t\t$result .= \"</div>\";\r\n\t\t}\r\n\t}\r\n\t\t$result .= \"</div></div><div class=\\\"spacer\\\"></div>\";\r\n return $result;\r\n}", "function maquetador_enlace( $texto, $c=\"\", $a=\"\", $i=\"\", $marcador=\"\" , $adicional=\"\", $paras=\"\") {\n if ( is_array( $texto) ){\n\t\t \n $tempPara = ( is_array($texto['parametros']) ? \n \t\t\t\t\t\t\tmImplode( \"%s=%s\",$texto['parametros'], \"&amp;\" ): \n \t\t\t\t\t $texto['parametros'] );\n\t\t $tempAdicional = ( is_array($texto['adicional']) ? \n \t\t\t\t\t\t\tmImplode( \"%s='%s' \",$texto['adicional'] ): \n \t\t\t\t\t $texto['adicional'] ); \t\t\t\t\t \t\t\t\t\t\t\n \t \n \t $cRet = sprintf (\"<a href='%s?%s%s%s%s'%s>%s</a>\" ,\n \t \t\t\t ( isset($texto['pagina']) ? \"{$texto[pagina]}\" : \"\" ),\n \t ( isset($texto['controlador'])? \"c={$texto[controlador]}\" : \"\" ),\n\t\t\t\t\t ( isset($texto['accion']) ? \"&amp;a={$texto[accion]}\" : \"\" ), \t \t \n \t ( isset($texto['id']) ? \"&amp;i={$texto[id]}\" : \"\" ) ,\n \t ( isset($texto['parametros']) ? \"&amp;$tempPara\" : \"\" ), \n \t ( isset($texto['adicional']) ? \" $tempAdicional\" : \"\" ),\n \t ( isset($texto['texto']) ? \"{$texto[texto]}\" : \"\" ) ); \t \n\t if ( isset ($texto[\"etiqueta\"]) ) {\n\t $cRet = cerrar_etiquetas( $texto[\"etiqueta\"], $cRet);\n\t }\n \n } else {\n\t $cRet = \"<a href='?c=$c&amp;a=$a\" . ( $i!=\"\" ? \"&amp;i=$i\" : \"\" ) . \"&amp;$paras' $adicional >$texto</a>\";\n\t if ( $marcador !='') {\n\t $cRet = cerrar_etiquetas( $marcador, $cRet);\n\t }\n }\n return $cRet;\n}", "function TablaPedidosProductos()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 15 ,10, 55 , 17 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$pe = new Login();\n $pe = $pe->PedidosPorId();\n\t\n################################################# BLOQUE N° 1 ###################################################\t\n\n //Bloque de membrete principal\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 10, 190, 17, '1.5', '');\n\t\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 12, 12, 12, '1.5', 'F');\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 12, 12, 12, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',16);\n $this->SetXY(101, 14);\n $this->Cell(20, 5, 'P', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(98, 19);\n $this->Cell(20, 5, 'Pedido', 0 , 0);\n\t\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',11);\n $this->SetXY(135, 12);\n $this->Cell(20, 5, 'N° PEDIDO ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 12);\n $this->Cell(20, 5,utf8_decode($pe[0]['codpedido']), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 16);\n $this->Cell(20, 5, 'FECHA PEDIDO ', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 16);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($pe[0]['fechapedido']))), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 20);\n $this->Cell(20, 5, 'FECHA EMISIÓN', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 20);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\")), 0 , 0);\n\t\n\t\n################################################# BLOQUE N° 2 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 29, 190, 18, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 30);\n $this->Cell(20, 5, 'DATOS DE LA EMPRESA ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 34);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(40, 34);\n $this->Cell(20, 5,utf8_decode($con[0]['nomempresa']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(147, 34);\n $this->Cell(90, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 34);\n $this->Cell(90, 5,utf8_decode($con[0]['rifempresa']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 38);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(32, 38);\n $this->Cell(20, 5,utf8_decode($con[0]['direcempresa']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(140, 38);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 38);\n $this->Cell(20, 5,utf8_decode($con[0]['tlfempresa']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 42);\n $this->Cell(20, 5, 'GERENTE :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(30, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['nomresponsable']), 0 , 0);\n\t//Linea de membrete Nro 7\n\t$this->SetFont('courier','B',7);\n $this->SetXY(94, 42);\n $this->Cell(20, 5, 'CÉDULA :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['cedresponsable']), 0 , 0);\n\t//Linea de membrete Nro 8\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 42);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['correoresponsable']), 0 , 0);\n\t\n################################################# BLOQUE N° 3 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 49, 190, 14, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 50);\n $this->Cell(20, 5, 'DATOS DEL PROVEEDOR ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 54);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(36, 54);\n $this->Cell(20, 5,utf8_decode($pe[0]['nomproveedor']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(100, 54);\n $this->Cell(70, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 54);\n $this->Cell(75, 5,utf8_decode($pe[0]['ritproveedor']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 54);\n $this->Cell(90, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 54);\n $this->Cell(90, 5,utf8_decode($pe[0]['emailproveedor']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 58);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(33, 58);\n $this->Cell(20, 5,utf8_decode($pe[0]['direcproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(90, 58);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 58);\n $this->Cell(20, 5,utf8_decode($pe[0]['tlfproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 58);\n $this->Cell(20, 5, 'CONTACTO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(150, 58);\n $this->Cell(20, 5,utf8_decode($pe[0]['contactoproveedor']), 0 , 0);\n\t\n\t$this->Ln(7);\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(3, 3, 3); // Establece el color del texto (en este caso es Negro)\n $this->SetFillColor(229, 229, 229); // establece el color del fondo de la celda (en este caso es GRIS\n\t$this->Cell(8,8,'N°',1,0,'C', True);\n\t$this->Cell(28,8,'CÓDIGO',1,0,'C', True);\n\t$this->Cell(97,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->Cell(35,8,'CATEGORIA',1,0,'C', True);\n\t$this->Cell(22,8,'CANTIDAD',1,1,'C', True);\n\t\n\t################################################# BLOQUE N° 4 DE DETALLES DE PRODUCTOS ###################################################\t\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 75, 190, 180, '1.5', '');\n\t\n $this->Ln(3);\n $tra = new Login();\n $reg = $tra->VerDetallesPedidos();\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,4,$a++,0,0,'C');\n\t$this->CellFitSpace(28,4,utf8_decode($reg[$i][\"codproducto\"]),0,0,'C');\n $this->CellFitSpace(97,4,utf8_decode($reg[$i][\"producto\"]),0,0,'C');\n $this->CellFitSpace(35,4,utf8_decode($reg[$i][\"nomcategoria\"]),0,0,'C');\n\t$this->CellFitSpace(22,4,utf8_decode($reg[$i][\"cantpedido\"]),0,0,'C');\n $this->Ln();\n\t\n }\n \n $this->Ln(175); \n $this->SetFont('courier','B',9);\n $this->Cell(190,0,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]).' RECIBIDO POR:___________________________','',1,'C');\n $this->Ln(4);\n }", "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}", "function TablaComprasProductos()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 15 ,10, 55 , 18 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n //Movernos a la derecha\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$co = new Login();\n $co = $co->ComprasPorId();\n\t\n################################################# BLOQUE N° 1 ###################################################\t\n\n //Bloque de membrete principal\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 10, 190, 20, '1.5', '');\n\t\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 14, 12, 12, '1.5', 'F');\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 14, 12, 12, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',16);\n $this->SetXY(101, 14);\n $this->Cell(20, 5, 'C', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(98, 19);\n $this->Cell(20, 5, 'Compra', 0 , 0);\n\t\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 10);\n $this->Cell(20, 5, 'N° COMPRA ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 10);\n $this->Cell(20, 5,utf8_decode($co[0]['codcompra']), 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 13);\n $this->Cell(20, 5, 'N° SERIE ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 13);\n $this->Cell(20, 5,utf8_decode($co[0]['codseriec']), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 16);\n $this->Cell(20, 5, 'N° AUTORIZACIÓN ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 16);\n $this->Cell(20, 5,utf8_decode($co[0]['codautorizacionc']), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 19);\n $this->Cell(20, 5, 'FECHA COMPRA ', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 19);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($co[0]['fechacompra']))), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 22);\n $this->Cell(20, 5, 'FECHA EMISIÓN', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 22);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\")), 0 , 0);\n\t\n\t$dias = ( $co[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : Dias_Transcurridos($co[0]['fechavencecredito'],date(\"Y-m-d\")));\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 25);\n $this->Cell(20, 5, 'STATUS COMPRA', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 25);\n \n\tif($co[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode($co[0]['statuscompra']), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode($co[0]['statuscompra']), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"VENCIDA\"), 0 , 0);\n\t}\n\n\n\t\n\t\n################################################# BLOQUE N° 2 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 32, 190, 18, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 32);\n $this->Cell(20, 5, 'DATOS DE LA EMPRESA ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 36);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(40, 36);\n $this->Cell(20, 5,utf8_decode($con[0]['nomempresa']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(147, 36);\n $this->Cell(90, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 36);\n $this->Cell(90, 5,utf8_decode($con[0]['rifempresa']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 40);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(32, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['direcempresa']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(140, 40);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['tlfempresa']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 44);\n $this->Cell(20, 5, 'GERENTE :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(30, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['nomresponsable']), 0 , 0);\n\t//Linea de membrete Nro 7\n\t$this->SetFont('courier','B',7);\n $this->SetXY(94, 44);\n $this->Cell(20, 5, 'CÉDULA :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['cedresponsable']), 0 , 0);\n\t//Linea de membrete Nro 8\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 44);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['correoresponsable']), 0 , 0);\n\t\n################################################# BLOQUE N° 3 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 52, 190, 14, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 52);\n $this->Cell(20, 5, 'DATOS DEL PROVEEDOR ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 56);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(36, 56);\n $this->Cell(20, 5,utf8_decode($co[0]['nomproveedor']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(100, 56);\n $this->Cell(70, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 56);\n $this->Cell(75, 5,utf8_decode($co[0]['ritproveedor']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 56);\n $this->Cell(90, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 56);\n $this->Cell(90, 5,utf8_decode($co[0]['emailproveedor']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 60);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(33, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['direcproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(90, 60);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['tlfproveedor']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 60);\n $this->Cell(20, 5, 'CONTACTO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(150, 60);\n $this->Cell(20, 5,utf8_decode($co[0]['contactoproveedor']), 0 , 0);\n\t\n\t$this->Ln(8);\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(3, 3, 3); // Establece el color del texto (en este caso es Negro)\n $this->SetFillColor(229, 229, 229); // establece el color del fondo de la celda (en este caso es GRIS)\n\t$this->Cell(6,8,'N°',1,0,'C', True);\n\t$this->Cell(15,8,'CÓDIGO',1,0,'C', True);\n\t$this->Cell(50,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->Cell(22,8,'CATEGORIA',1,0,'C', True);\n\t$this->Cell(20,8,'PRECIO',1,0,'C', True);\n\t$this->Cell(15,8,'CANT',1,0,'C', True);\n\t$this->Cell(18,8,'LOTE',1,0,'C', True);\n\t$this->Cell(20,8,'VENCE',1,0,'C', True);\n\t$this->Cell(25,8,'IMPORTE',1,1,'C', True);\n\t\n\t################################################# BLOQUE N° 4 DE DETALLES DE PRODUCTOS ###################################################\t\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 78, 190, 170, '1.5', '');\n\t\n\t$this->Ln(3);\n $tra = new Login();\n $reg = $tra->VerDetallesCompras();\n\t$cantidad=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$cantidad+=$reg[$i]['cantcompra'];\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(6,4,$a++,0,0,'C');\n\t$this->CellFitSpace(15,4,utf8_decode($reg[$i][\"codproducto\"]),0,0,'C');\n $this->CellFitSpace(50,4,utf8_decode($reg[$i][\"producto\"]),0,0,'C');\n $this->CellFitSpace(22,4,utf8_decode($reg[$i][\"nomcategoria\"]),0,0,'C');\n\t$this->CellFitSpace(20,4,utf8_decode(number_format($reg[$i][\"precio1\"], 2, '.', ',')),0,0,'C');\n\t$this->CellFitSpace(15,4,utf8_decode($reg[$i][\"cantcompra\"]),0,0,'C');\n\t$this->CellFitSpace(18,4,utf8_decode($reg[$i][\"lote\"]),0,0,'C');\n\t$this->CellFitSpace(20,4,utf8_decode($reg[$i][\"vence\"]),0,0,'C');\n\t$this->CellFitSpace(24,4,utf8_decode(number_format($reg[$i][\"importecompra\"], 2, '.', ',')),0,0,'C');\n $this->Ln();\n }\n \n################################################# BLOQUE N° 5 DE TOTALES ###################################################\t\n\t//Bloque de Informacion adicional\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 250, 110, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',10);\n $this->SetXY(44, 250);\n $this->Cell(20, 5, 'INFORMACIÓN ADICIONAL', 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 254);\n $this->Cell(20, 5, 'CANTIDAD DE PRODUCTOS :', 0 , 0);\n $this->SetXY(60, 254);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($cantidad), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 257.2);\n $this->Cell(20, 5, 'TIPO DE DOCUMENTO :', 0 , 0);\n $this->SetXY(60, 257.2);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode(\"FACTURA\"), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 260.5);\n $this->Cell(20, 5, 'TIPO DE PAGO :', 0 , 0);\n $this->SetXY(60, 260.5);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($co[0]['tipocompra'].\" - \".$co[0]['formacompra']), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 263.5);\n $this->Cell(20, 5, 'FECHA DE VENCIMIENTO :', 0 , 0);\n $this->SetXY(60, 263.5);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($vence = ( $co[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : date(\"d-m-Y\",strtotime($co[0]['fechavencecredito'])))), 0 , 0);\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 266.5);\n $this->Cell(20, 5, 'DIAS VENCIDOS :', 0 , 0);\n $this->SetXY(60, 266.5);\n\t$this->SetFont('courier','',8);\n\t\n if($co[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($co[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(Dias_Transcurridos(date(\"Y-m-d\"),$co[0]['fechavencecredito'])), 0 , 0);\n\t}\n\t//$this->Cell(20, 5,$dias = ( $co[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : Dias_Transcurridos($co[0]['fechavencecredito'],date(\"Y-m-d\"))), 0 , 0);\n\t\n\t//Linea de membrete Nro 7\n\t$this->SetXY(52, 33);\n\t$this->Codabar(13,271,utf8_decode(\"133923786899444489448576556789\"));\n\t//Linea de membrete Nro 2\n $this->SetFont('courier','B',6.5); \n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->SetXY(48, 271);\n $this->Cell(20, 5, 'Este documento no constituye un comprobante de pago', 0 , 0);\n\t\n\t//Bloque de Totales de factura\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(122, 250, 78, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 252);\n $this->Cell(20, 5, 'SUBTOTAL IVA '.$co[0][\"ivac\"].'% :', 0 , 0);\n $this->SetXY(167, 252);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"subtotalivasic\"], 2, '.', ',')), 0 , 0);\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 256);\n $this->Cell(20, 5, 'SUBTOTAL IVA 0% :', 0 , 0);\n $this->SetXY(167, 256);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"subtotalivanoc\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 260);\n $this->Cell(20, 5, 'IVA '.$co[0][\"ivac\"].'% :', 0 , 0);\n $this->SetXY(167, 260);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"totalivac\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 264);\n $this->Cell(20, 5, 'DESC '.$co[0][\"descuentoc\"].'% :', 0 , 0);\n $this->SetXY(167, 264);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"totaldescuentoc\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 268);\n $this->Cell(20, 5, 'TOTAL PAGO :', 0 , 0);\n $this->SetXY(167, 268);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($co[0][\"totalc\"], 2, '.', ',')), 0 , 0);\n \n}", "function draw_body(){\r\n\t\r\n\tglobal $PPT;\r\n\t\r\n\t\t$out='';\r\n\r\n\t\tif($this->total_items>0){\r\n\t\t\t$arr_width=explode(',',$this->width);\r\n\t\t\t\r\n\t\t\tfor($i=0; $i<count($this->data);$i++){$c=0;\r\n\t\t\t\t$out.='<tr'.($this->odd_even ? ($i%2==0 ? ' class=\"odd\"' : ' class=\"even\"') : '').'>';\r\n\t\t\t\tforeach($this->data[$i] as $key => $value){\r\n\t\t\t\t\r\n\t\t\t\t$arr_header=explode(',',$this->header);\r\n\t\t\t\t\r\n\t\t\t\t\tif($arr_header[$c] == \"ORDER ID\"){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$out.='<td'.(($i==0 and $this->width!='' and $arr_width[$key]>0) ? ' width=\"'.$arr_width[$key].'\"' : '').'>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<a href=\"javascript:void(0);\" onClick=\"document.getElementById(\\'delo\\').value =\\''.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'\\';document.DeleteOrder.submit();\" title=\"delete order\"><img src=\"../wp-content/themes/'.strtolower(constant('PREMIUMPRESS_SYSTEM')).'/images/premiumpress/led-ico/cross.png\" align=\"middle\"></a>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<a href=\"../wp-content/themes/'.strtolower(constant('PREMIUMPRESS_SYSTEM')).'/admin/_invoice.php?id='.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'\" target=\"_blank\" title=\"view invoice\"><img src=\"../wp-content/themes/'.strtolower(constant('PREMIUMPRESS_SYSTEM')).'/images/premiumpress/led-ico/page.png\" align=\"middle\"></a>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<a href=\"admin.php?page=orders&id='.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'\" title=\"edit order\"><img src=\"../wp-content/themes/'.strtolower(constant('PREMIUMPRESS_SYSTEM')).'/images/admin/icon-edit.gif\" align=\"middle\"> '.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'</a></td>';\r\n\t\t\t\r\n\t\t\t\t\t}elseif($arr_header[$c] == \"TOTAL\"){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$out.='<td'.(($i==0 and $this->width!='' and $arr_width[$key]>0) ? ' width=\"'.$arr_width[$key].'\"' : '').'>'.number_format(str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])),2).'</td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}elseif($arr_header[$c] == \"STATUS\"){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tswitch(str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i]))){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase \"0\": { \t$O1 = \"Awaiting Payment\";\t$O2 = \"#0c95ff\";\t\t} break;\r\n\t\t\t\t\t\t\tcase \"3\": { \t$O1 = \"Paid & Completed \";\t$O2 = \"green\";\t\t} break;\t\r\n\t\t\t\t\t\t\tcase \"5\": { \t$O1 = \"Payment Received\";\t$O2 = \"green\";\t\t} break;\t\r\n\t\t\t\t\t\t\tcase \"6\": { \t$O1 = \"Payment Failed\";\t\t$O2 = \"red\";\t\t} break;\r\n\t\t\t\t\t\t\tcase \"7\": { \t$O1 = \"Payment Pending\";\t$O2 = \"orange\";\t\t} break;\t\r\n\t\t\t\t\t\t\tcase \"8\": { \t$O1 = \"Payment Refunded\";\t$O2 = \"black\";\t\t} break;\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\t\r\n\t\t\t\t\t\t\t$out.='<td'.(($i==0 and $this->width!='' and $arr_width[$key]>0) ? ' width=\"'.$arr_width[$key].'\"' : '').' style=\"background-color:'.$O2.'\"><span style=\"color:white;\">'.$O1.'</span></td>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t$out.='<td'.(($i==0 and $this->width!='' and $arr_width[$key]>0) ? ' width=\"'.$arr_width[$key].'\"' : '').'>'.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'</td>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$c++; \r\n\t\t\t\t}\r\n\t\t\t\t$out.='</tr>'; \r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$arr_header=explode(',',$this->header);\r\n\r\n\t\t\tif($this->no_results!==false)\r\n\t\t\t\t$out.='<tr id=\"'.$this->id.'_no_results\"><td colspan=\"'.count($arr_header).'\">'.$this->no_results.'</td></tr>';\r\n\t\t}\r\n\r\n\t\treturn $out;\r\n\t}", "function escribir_pedido($cliente) {\r\n\t$conn = mysql_connect(BD_HOST, BD_USERNAME, BD_PASSWORD);\r\n\tmysql_select_db(BD_DATABASE1);\r\n\t//busco la serie para pedidos de clientes\r\n\t$ssql = 'SELECT SPCCFG FROM F_CFG';\r\n\t$rs1 = mysql_query($ssql, $conn);\r\n\t$datos1 = mysql_fetch_array($rs1);\r\n\t//busco los pedidos por serie, cliente y estado \r\n\t$ssql = 'SELECT * FROM F_PCL WHERE CLIPCL=' . $cliente . ' AND TIPPCL=\\'' . $datos1['SPCCFG'] . '\\' AND ESTPCL=\\'0\\'';\r\n\tmysql_select_db(BD_DATABASE1);\r\n\t$rs = mysql_query($ssql, $conn);\r\n\techo (mysql_error());\r\n\tif (mysql_num_rows($rs) != 0) {\r\n\t\t$datos = mysql_fetch_array($rs);\r\n\t\t//cojo el detalle del pedido por orden de lineas\r\n\t\t$ssql = 'SELECT * FROM F_LPC WHERE CODLPC=' . $datos['CODPCL'] . ' AND TIPLPC=\\'' . $datos['TIPPCL'] . '\\' ORDER BY POSLPC ASC'; \r\n\t\t$rs1 = mysql_query($ssql, $conn);\r\n\t\tif (mysql_num_rows($rs1) != 0) {\r\n\t\t\t$total = 0;\r\n\t\t\t$colorcelda = COLOROSCUROCELDA;\r\n\t\t\twhile ($linea = mysql_fetch_array($rs1)) {\r\n\t\t\t\tif($colorcelda == COLORCLAROCELDA) {\r\n\t\t\t\t\t$colorcelda = COLOROSCUROCELDA;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$colorcelda = COLORCLAROCELDA;\r\n\t\t\t\t}\r\n\t\t\t\t//compruebo que el producto no tenga 0 en cantidad y si es así lo borro\r\n\t\t\t\techo('<tr bordercolor=\"#cccccc\" bgcolor=\"#ffffff\">');\r\n\t\t\t\techo('<td bgcolor=\"' . $colorcelda . '\">' . $linea['ARTLPC'] . '</td>');\r\n\t\t\t\techo('<td bgcolor=\"' . $colorcelda . '\">' . $linea['DESLPC'] . '</td>');\r\n\t\t\t\techo('<td align=\"right\" bgcolor=\"' . $colorcelda . '\">');\r\n\t\t\t\tprintf(\"%.2f\", $linea['PRELPC']);\r\n\t\t\t\techo('</td>');\r\n\t\t\t\techo('<td align=\"right\" nowrap bgcolor=\"' . $colorcelda . '\"><img src=\"plantillas/' . PLANTILLA . '/imagenes/menos.gif\" border=\"0\" style=\"cursor:pointer\" onclick=\"sumaresta2(\\'num' . $linea['POSLPC'] . '\\',\\'-\\');actualizar.submit();\" >&nbsp;<input value=\"');\r\n\t\t\t\techo(decimal($linea['CANLPC']));\r\n\t\t\t\techo('\" name=\"num' . $linea['POSLPC'] . '\" id=\"num' . $linea['POSLPC'] . '\" size=\"10\" maxlength=\"10\" type=\"text\" onfocus=\"this.blur()\" style=\"text-align:right;\">&nbsp;<img src=\"plantillas/' . PLANTILLA . '/imagenes/mas.gif\" border=\"0\" onclick=\"sumaresta2(\\'num' . $linea['POSLPC'] . '\\',\\'+\\');actualizar.submit();\" style=\"cursor:pointer\"></td>');\r\n\t\t\t\techo('<td align=\"right\" bgcolor=\"' . $colorcelda . '\">');\r\n\t\t\t\tprintf(\"%.2f\", $linea['DT1LPC']);\r\n\t\t\t\techo('%</td>');\r\n\t\t\t\techo('<td align=\"right\" bgcolor=\"' . $colorcelda . '\">');\r\n\t\t\t\t$total = number_format($total + ($linea['TOTLPC']), 2, '.', '');\r\n\t\t\t\tprintf(\"%.2f\", ($linea['TOTLPC']));\r\n\t\t\t\techo('</td>');\r\n\t\t\t\tif ($linea['IINLPC'] != 0) {\r\n\t\t\t\t\techo('<td align=\"center\" bgcolor=\"' . $colorcelda . '\">SI</td>');\r\n\t\t\t\t}else{\r\n\t\t\t\t\techo('<td align=\"center\" bgcolor=\"' . $colorcelda . '\">NO</td>');\r\n\t\t\t\t}\r\n\t\t\t\techo('<td align=\"center\" bgcolor=\"' . $colorcelda . '\"><img src=\"plantillas/' . PLANTILLA . '/imagenes/nor.gif\" border=\"0\" align=\"middle\" style=\"cursor:pointer\" onclick=\"borrarart(' . $linea['POSLPC'] . ')\" alt=\"Borrar art&iacute;culo\">&nbsp;</td>');\r\n\t\t\t\techo('</tr>');\r\n\t\t\t}\r\n\t\t\techo('<tr bordercolor=\"#999999\" align=\"right\" bgcolor=\"#cccccc\">');\r\n\t\t\techo('<td colspan=\"6\"><font color=\"#000000\" face=\"Verdana\" size=\"2\"><b>Total:</b></font></td>');\r\n\t\t\techo('<td colspan=\"2\"><font color=\"#000000\" face=\"Verdana\" size=\"2\"><b>');\r\n\t\t\tprintf(\"%.2f\", $total);\r\n\t\t\techo('</b></font></td>');\r\n\t\t\techo('</tr>');\r\n\t\t}else{\r\n\t\t\techo('<tr bordercolor=\"#cccccc\" align=\"center\" bgcolor=\"#ffffff\">');\r\n\t\t\techo('<td colspan=\"7\" align=\"center\">NO SE HAN ENCONTRADO ARTICULOS</td>');\r\n\t\t\techo('</tr>');\r\n\t\t\techo('<tr bordercolor=\"#999999\" align=\"center\" bgcolor=\"#cccccc\">');\r\n\t\t\techo('<td colspan=\"2\"><font color=\"#000000\" face=\"Verdana\" size=\"2\"><b>Total:</b></font></td>');\r\n\t\t\techo('<td></td><td>&nbsp;</td><td>&nbsp;</td>');\r\n\t\t\techo('<td><font color=\"#cccccc\">.</font></td>');\r\n\t\t\techo('<td><font color=\"#cccccc\">.</font></td>');\r\n\t\t\techo('<td><font color=\"#cccccc\">.</font></td>');\r\n\t\t\techo('</tr>');\r\n\t\t} \r\n\t}else{\r\n\t\techo('<tr bordercolor=\"#cccccc\" align=\"center\" bgcolor=\"#ffffff\">');\r\n\t\techo('<td height=\"30\" colspan=\"8\">NO SE HAN ENCONTRADO ARTICULOS EN EL PEDIDO</td></tr>');\r\n\t\techo('<tr bordercolor=\"#999999\" align=\"center\" bgcolor=\"#cccccc\">');\r\n\t\techo('<td colspan=\"8\"><font color=\"#000000\" face=\"Verdana\" size=\"2\"><b>&nbsp;</b></font></td>');\r\n\t\techo('</tr>');\r\n\t}\r\n}", "function TablaServiciosFechas()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',10);\n //Movernos a la derecha\n $this->Cell(100);\n //Título\n $this->Cell(65,20,'LISTADO DE SERVICIOS DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"].'',0,0,'C');\n //Salto de línea\n $this->Ln(25);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(8,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'CÓDIGO SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(18,8,'N° CAJA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'FECHA SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'SERVICIOS',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'SUBTOTAL',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'DESCUENTO',1,0,'C', True);\n\t$this->CellFitSpace(26,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->BuscarServiciosFechas();\n\t$serviciosTotal=0;\n\t$pagoSubtotal=0;\n\t$pagoIva=0;\n\t$pagoDescuento=0;\n\t$pagoTotal=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$serviciosTotal+=$reg[$i]['cantidad'];\n\t$pagoSubtotal+=$reg[$i]['subtotal']; \n\t$pagoIva+=$reg[$i]['totaliva']; \n\t$pagoDescuento+=$reg[$i]['totaldescuento']; \n\t$pagoTotal+=$reg[$i]['totalpago'];\n\t$this->SetFont('courier','',7); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,5,$a++,1,0,'C');\n\t$this->CellFitSpace(30,5,$reg[$i][\"codservicio\"],1,0,'C');\n $this->CellFitSpace(18,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaservicio']))),1,0,'C');\n\t$this->CellFitSpace(20,5,utf8_decode($reg[$i][\"cantidad\"]),1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['subtotal'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaliva'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuento'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(26,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(8,5,'',1,0,'C');\n $this->Cell(30,5,'',1,0,'C');\n $this->Cell(18,5,'',1,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(28,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',7);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(20,5,utf8_decode($serviciosTotal),1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($pagoSubtotal, 2, '.', ',')),1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($pagoIva, 2, '.', ',')),1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($pagoDescuento, 2, '.', ',')),1,0,'C'); \n $this->CellFitSpace(26,5,utf8_decode(number_format($pagoTotal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n \n $this->Ln(15); \n $this->SetFont('courier','B',9);\n $this->Cell(190,0,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]).' RECIBIDO POR:___________________________','',1,'C');\n $this->Ln(4);\n }", "function TablaVentasGeneral()\n {\t\n\t //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO GENERAL DE VENTAS',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DESC',1,0,'C', True);\n\t$this->CellFitSpace(27,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarVentas();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(27,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(52,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(27,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n\t\n }", "function visualizar(){\n\t\t$consulta=$this->sql;\n\t\t$result=mysql_query($consulta);\n\t\t\n\t\techo \"<center><table class='enhancedtablerowhover'>\n\t\t\t<caption>\".$this->comentarioTabla($this->nombreTabla($result,0)).\"</caption>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t<td scope='col' colspan=2></td>\n\t\t\t\";\n\t\tfor($i=0;$i<mysql_num_fields($result);$i++)\n\t\t{\t\n\t\t \tif(!$this->mostrarCampo($this->nombreCampo($result,$i)) or stripos($this->nombreCampo($result,$i),\"imagen\"))continue;\n\t\t \t$des = str_replace(\"/*\",\"\",$this->comentario($this->nombreCampo($result, $i), $this->nombreTabla($result, $i)));\n\t\t\techo \"<th scope='col' ><a href='?order='>$des</a></th>\";\n\t\t}\n\t\techo\"\t\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\";\n\t\twhile ($row = mysql_fetch_array($result)) {\n\t\t$filtro=$this->cifrar($row,$result);\n\t\techo \"<tr>\";\n\t\techo \"<td class='CrearReporte'>\n\t\t\t\t<a href='$_SERVER[PHP_SELF]?operacion=m&$filtro'>\n\t\t\t\t<img src='\".$this->PathImages.\"editar.png'>\n\t\t\t</a>\n\t\t </td>\";\n\t\techo \"<td class='CrearReporte' >\n\t <a href='$_SERVER[PHP_SELF]?operacion=b&$filtro'>\n\t\t\t\t<img src='\".$this->PathImages.\"eliminar.png'>\n\t\t\t\t</a>\n\t\t\t </td>\n\t\t\t \";\n\t\t //?columna=$row[0]&operacion=q \n\t\tfor ($i = 0; $i < mysql_num_fields($result); $i++){\n\t\t \tif(!$this->mostrarCampo($this->nombreCampo($result,$i)) or stripos($this->nombreCampo($result,$i),\"imagen\"))continue;\n\t\t\techo \"<td>\".$row[$i].\"</td>\";\n\t\t}\n\t\techo \"</tr>\";\n\t}\n\techo \"</tr></tbody></table></center>\";\n\t}", "function TablaServicios()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 15 ,10, 55 , 17 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$se = new Login();\n $se = $se->ServiciosPorId();\n\t\n################################################# BLOQUE N° 1 ###################################################\t\n\n //Bloque de membrete principal\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 10, 190, 17, '1.5', '');\n\t\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 12, 13, 13, '1.5', 'F');\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 12, 13, 13, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',16);\n $this->SetXY(102, 14);\n $this->Cell(19, 5, 'S', 0 , 0);\n\t$this->SetFont('courier','B',7);\n $this->SetXY(98, 19);\n $this->Cell(20, 5, 'Servicio', 0 , 0);\n\t\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',10);\n $this->SetXY(135, 10);\n $this->Cell(20, 5, 'N° SERVICIO ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 10);\n $this->Cell(20, 5,utf8_decode($se[0]['codservicio']), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 13);\n $this->Cell(20, 5, 'FECHA SERVICIO ', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 13);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($se[0]['fechaservicio']))), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 16);\n $this->Cell(20, 5, 'FECHA EMISIÓN', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 16);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\")), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 19);\n $this->Cell(20, 5, 'N° DE CAJA', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 19);\n $this->Cell(20, 5,utf8_decode($se[0]['nrocaja']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 22);\n $this->Cell(20, 5, 'TIPO DE PAGO', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 22);\n $this->Cell(20, 5,utf8_decode($se[0]['tipopago']), 0 , 0);\n\t\n\t\n################################################# BLOQUE N° 2 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 29, 190, 18, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 30);\n $this->Cell(20, 5, 'DATOS DE LA EMPRESA ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 34);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(40, 34);\n $this->Cell(20, 5,utf8_decode($con[0]['nomempresa']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(147, 34);\n $this->Cell(90, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 34);\n $this->Cell(90, 5,utf8_decode($con[0]['rifempresa']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 38);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(32, 38);\n $this->Cell(20, 5,utf8_decode($con[0]['direcempresa']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(140, 38);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 38);\n $this->Cell(20, 5,utf8_decode($con[0]['tlfempresa']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 42);\n $this->Cell(20, 5, 'GERENTE :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(30, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['nomresponsable']), 0 , 0);\n\t//Linea de membrete Nro 7\n\t$this->SetFont('courier','B',7);\n $this->SetXY(94, 42);\n $this->Cell(20, 5, 'CÉDULA :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['cedresponsable']), 0 , 0);\n\t//Linea de membrete Nro 8\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 42);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 42);\n $this->Cell(20, 5,utf8_decode($con[0]['correoresponsable']), 0 , 0);\n\t\n################################################# BLOQUE N° 3 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 49, 190, 14, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 50);\n $this->Cell(20, 5, 'DATOS DEL CLIENTE ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 54);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(38, 54);\n $this->Cell(20, 5,utf8_decode($se[0]['nomcliente']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(112, 54);\n $this->Cell(74, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(122, 54);\n $this->Cell(75, 5,utf8_decode($se[0]['cedcliente']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(150, 54);\n $this->Cell(90, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(166, 54);\n $this->Cell(90, 5,utf8_decode($se[0]['tlfcliente']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 58);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(33, 58);\n $this->Cell(20, 5,utf8_decode($se[0]['direccliente']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(116, 58);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(128, 58);\n $this->Cell(20, 5,utf8_decode($se[0]['emailcliente']), 0 , 0);\n\t\n\t$this->Ln(7);\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(3, 3, 3); // Establece el color del texto (en este caso es Negro)\n $this->SetFillColor(229, 229, 229); // establece el color del fondo de la celda (en este caso es GRIS)\n\t$this->Cell(8,8,'N°',1,0,'C', True);\n\t$this->Cell(19,8,'CÓDIGO',1,0,'C', True);\n\t$this->Cell(95,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->Cell(22,8,'PRECIO',1,0,'C', True);\n\t$this->Cell(22,8,'CANTIDAD',1,0,'C', True);\n\t$this->Cell(24,8,'IMPORTE',1,1,'C', True);\n\t\n\t################################################# BLOQUE N° 4 DE DETALLES DE PRODUCTOS ###################################################\t\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 75, 190, 170, '1.5', '');\n\t\n\t$this->Ln(3);\n $tra = new Login();\n $reg = $tra->VerDetallesServicios();\n\t$cantidad=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$cantidad+=$reg[$i]['cantservicio'];\n\t$this->SetFont('courier','',7); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,4,$a++,0,0,'C');\n\t$this->CellFitSpace(19,4,utf8_decode($reg[$i][\"coditems\"]),0,0,'C');\n $this->CellFitSpace(95,4,utf8_decode($reg[$i][\"nombreitems\"]),0,0,'C');\n $this->CellFitSpace(22,4,utf8_decode(number_format($reg[$i][\"precioservicio\"], 2, '.', ',')),0,0,'C');\n\t$this->CellFitSpace(22,4,utf8_decode($reg[$i][\"cantservicio\"]),0,0,'C');\n\t$this->CellFitSpace(24,4,utf8_decode(number_format($reg[$i][\"importe\"], 2, '.', ',')),0,0,'C');\n $this->Ln();\n }\n \n\t\n\n\n################################################# BLOQUE N° 5 DE TOTALES ###################################################\t\n\t//Bloque de Informacion adicional\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 250, 130, 25, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',12);\n $this->SetXY(46, 252);\n $this->Cell(20, 5, 'INFORMACIÓN ADICIONAL', 0 , 0);\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(12, 258);\n $this->Cell(20, 5, 'CANTIDAD DE SERVICIOS :', 0 , 0);\n $this->SetXY(60, 258);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode($cantidad), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(12, 262);\n $this->Cell(20, 5, 'TIPO DE DOCUMENTO :', 0 , 0);\n $this->SetXY(60, 262);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(\"FACTURA\"), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetXY(52, 33);\n\t$this->Codabar(13,267,utf8_decode(\"133923786899444489448576556789\"));\n\t//Linea de membrete Nro 2\n $this->SetFont('courier','B',7); \n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->SetXY(55, 268);\n $this->Cell(20, 5, 'Este documento no constituye un comprobante de pago.', 0 , 0);\n\t\n\t//Bloque de Totales de factura\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(142, 250, 58, 25, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(143, 254);\n $this->Cell(20, 5, 'SUB TOTAL :', 0 , 0);\n $this->SetXY(167, 254);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($se[0][\"subtotal\"], 2, '.', '.,')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(143, 258);\n $this->Cell(20, 5, 'IVA '.$se[0][\"iva\"].'% :', 0 , 0);\n $this->SetXY(167, 258);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($se[0][\"totaliva\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',9);\n $this->SetXY(143, 262);\n $this->Cell(20, 5, 'DESC '.$se[0][\"descuento\"].'% :', 0 , 0);\n $this->SetXY(167, 262);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($se[0][\"totaldescuento\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(143, 266);\n $this->Cell(20, 5, 'TOTAL PAGO :', 0 , 0);\n $this->SetXY(167, 266);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($se[0][\"totalpago\"], 2, '.', ',')), 0 , 0);\n }", "function tab($texto,$cant){ $i=1;\r\n $a=\"\";\r\n while($i<=$cant){\r\n $a.=\"&nbsp;\";\r\n $i++;\r\n }\r\n return $a.$texto;\r\n }", "function renderda_ülesande_link($sql_rida){\n\t\t\t\n\tglobal $vajalikud;\t\n\t$hakkliha = explode(\"\\n\", $sql_rida['sisu']);\n\t$suvaline_v2rv = sprintf( \"#%06X\\n\", mt_rand( 0, 0x222222 ));\n\t$tulem = \"<div class=\\\"kast_avaleht\\\" style=\\\"background-color:\" .$suvaline_v2rv. \"\\\">\";\n\t\n\t$tulem = $tulem . \"<div class=\\\"maatriksi_konteiner_avaleht\\\">\";\n\tif(isset($_GET['lk'])){\n\t\t$tulem = $tulem . '<a href=\"lahenda.php?lk='.$_GET['lk'].'&ülesanne=' . $sql_rida['id'] . '\">ülesanne ' . $sql_rida['id'] . '</a> ';\n\t}else{\n\t\t$tulem = $tulem . '<a href=\"lahenda.php?ülesanne=' . $sql_rida['id'] . '\">ülesanne ' . $sql_rida['id'] . '</a> ';\n\t}\n\tif ($sql_rida['allikas'] != null){\n\t\t$tulem = $tulem . '<sup><a href=\"#' . $sql_rida['allikas'] . '\">['.$sql_rida['allikas'].']</a></sup>';\n\t\tarray_push ($vajalikud, $sql_rida['allikas']);\n\t}\n\t$tulem = $tulem . \"<table><tbody>\";\n\tforeach($hakkliha as $result) {\n\t\t$tulem = $tulem . \"<tr>\";\n\t\t$hakkliha2 = explode(\" \", $result);\n\t\t\n\t\tforeach($hakkliha2 as $result2) {\n\t\t\t$tulem = $tulem . \"<td><div>\";\n\t\t\t\n\t\t\tif ( strpos($result2, '/') !== false ) {\n\t\t\t\t//$hakkliha3 = explode(\"/\", $result2);\n\t\t\t\t\n\t\t\t\t$tulem = $tulem . '<script>document.write(printMurd(\"'.str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \"\", $result2).'\"))</script>' ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$tulem = $tulem . $result2 ;\n\t\t\t}\n\t\t\t$tulem = $tulem . \"</div></td>\";\n\t\t}\n\n\t\t$tulem = $tulem . \"</tr>\";\n\t}\n\t$tulem = $tulem . \"</tbody></table></div></div>\";\t\t\t\n\t\n\techo $tulem;\n}", "function limpiarHTML($cadena,$largo=0){\n\t$cadena\t= preg_replace(array('@<style[^>]*?>.*?</style>@si','@<[\\/\\!]*?[^<>]*?>@si'),array(\"\",\"\"),$cadena);\n\tif($largo!=0){\n\t\t$cadena = substr ($cadena, 0,$largo);\n\t}\n\treturn $cadena;\n}", "public function generateCommande()\n {\n $current_month = date(\"F Y\");\n $premiermois = date(\"01/m/Y\");\n $data = [\n ['','','','','','BON DE COMMANDE '.$current_month],\n ['MODE D\\'EMPLOI DU BON DE COMMANDE '],\n ['1) Saisir le code article en colonne A et le nombre de colis en colonne B'],\n ['Nota :'],\n ['Lorsqu\\'un code apparaît dans la colonne C \"article de remplacement\" le ressaisir à la place de l\\'ancien code en colonne A'],\n ['', 'Attention : des articles peuvent être remplacés plusieurs fois.'],\n ['Lorsque \"N/A\" apparaît, cela signifie que l\\'article est supprimé. Voir dans le catalogue pour remplacement éventuel par une autre référence.'],\n [''],\n ['2) Lorsque la saisie de la commande est TERMINEE CLIQUEZ SUR LE BOUTON \"Fin Commande\"'],\n [''],\n ['Zone de saisie de commande', '', '','NE SAISIR AUCUNE DONNEE DANS CES COLONNES'],\n ['Code',\t 'Nombre',\t 'Article de',\t 'DLV indicative',\t'Duré de',\t 'DESIGNATION DES MARCHANDISES',\t'PCB',\t 'Qté',\t'Poids',\t'Volume',\t'Tarif', 'UV',\t'Montant',\t'Poids',\t'Volume',\t'Code',\t 'Gencod',\t'Rang',\t 'Code',\t'Origine'],\n ['Article',\t'de colis',\t'remplacement',\t'Au',\t 'Vie',\t '',\t 'Colis',\t'',\t 'Cde',\t 'Cde',\t '', '',\t '',\t 'Colis',\t'Colis', \t'Douanier',\t '',\t 'Catalogue', \t'Produits'],\n ['',\t '',\t 'à ressaisir',\t$premiermois,\t 'Indicative',\t'',\t '', \t'', '', '', '',\t '', \t'', \t '', '',\t 'Indicatif', '', '', \t 'Dangereux']\n ];\n\n return $data;\n }", "function convert_repmes_to_html()\n {\n $date = Carbon::now();\n $currentDate = $date->format('m-y');\n $rep_data = $this->get_repartidores();\n\n $output = '\n <h3 align=\"center\">Informe de reparto del mes '.$currentDate.'</h3>\n <table width=\"50%\" align=\"center\" style=\"border-collapse: collapse; border: 0px;\">\n <tr>\n <th style=\"border: 1px solid; padding:12px;\" width=\"20%\">Id</th>\n <th style=\"border: 1px solid; padding:12px;\" width=\"30%\">Nombre</th>\n <th style=\"border: 1px solid; padding:12px;\" width=\"30%\">Cantidad repartos</th>\n <th style=\"border: 1px solid; padding:12px;\" width=\"30%\">Total venta mensual</th>\n </tr>'; \n foreach($rep_data as $rep)\n {\n $output .= '\n <tr>\n <td style=\"border: 1px solid; padding:12px;\">'.$rep->rep_id.'</td>\n <td style=\"border: 1px solid; padding:12px;\">'.$rep->rep_name.'</td>\n <td style=\"border: 1px solid; padding:12px;\">'.$rep->cantidad_ventas.'</td>\n <td style=\"border: 1px solid; padding:12px;\">$'.$rep->total_ventas.'</td>\n </tr>\n ';\n }\n $output .= '</table>';\n return $output;\n }", "function TablaCreditosClientes()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',10);\n //Movernos a la derecha\n $this->Cell(100);\n //Título\n $this->Cell(65,20,'LISTADO DE CRÉDITOS POR CLIENTES ',0,0,'C');\n //Salto de línea\n $this->Ln(25);\t\n\t\n\t$tra = new Login();\n $reg = $tra->BuscarClientesAbonos();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA CLIENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($reg[0]['cedcliente']),0,0,'');\n $this->Cell(30,5,'NOMBRE CLIENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($reg[0]['nomcliente']),0,1,'');\n\t\n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO CLIENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($reg[0]['tlfcliente']),0,0,'');\n $this->Cell(30,5,'CORREO CLIENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($reg[0]['emailcliente']),0,1,'');\n $this->Ln(6);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(8,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(18,8,'N° CAJA',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'DIAS VENC',1,0,'C', True);\n\t$this->CellFitSpace(26,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'TOT FACTURA',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'TOT ABONO',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DEBE',1,1,'C', True);\n\t\n $TotalFactura=0;\n\t$TotalCredito=0;\n\t$TotalDebe=0;\n\t$a=1;\n\tfor($i=0;$i<sizeof($reg);$i++){ \n\t$TotalFactura+=$reg[$i]['totalpago'];\n\t$TotalCredito+=$reg[$i]['abonototal'];\n\t$TotalDebe+=$reg[$i]['totalpago']-$reg[$i]['abonototal'];\n\n\t$this->SetFont('courier','',7); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,5,$a++,1,0,'C');\n\t$this->CellFitSpace(30,5,$reg[$i][\"codventa\"],1,0,'C');\n $this->CellFitSpace(18,5,$reg[$i]['nrocaja'],1,0,'C');\n\t\n\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\t\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(20, 5,utf8_decode(\"0\"),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(20, 5,utf8_decode(\"0\"),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(20, 5,utf8_decode(Dias_Transcurridos(date(\"Y-m-d\"),$reg[$i]['fechavencecredito'])),1,0,'C');\n\t}\n\t$this->CellFitSpace(26,5,date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa'])),1,0,'C');\n $this->CellFitSpace(25,5,number_format($reg[$i]['totalpago'], 2, '.', ','),1,0,'C');\n\t$this->CellFitSpace(25,5,number_format($reg[$i]['abonototal'], 2, '.', ','),1,0,'C');\n\t$this->CellFitSpace(20,5,number_format($reg[$i]['totalpago']-$reg[$i]['abonototal'], 2, '.', ','),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(8,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(18,5,'',0,0,'C');\n $this->Cell(17,5,'',0,0,'C'); \n $this->Cell(20,5,'',0,0,'C');\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(26,5,'TOTAL GENERAL',1,0,'C', True);\t\n $this->SetFont('courier','B',7);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(25,5,utf8_decode(number_format($TotalFactura, 2, '.', ',')),1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($TotalCredito, 2, '.', ',')),1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($TotalDebe, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n\n \n $this->Ln(15); \n $this->SetFont('courier','B',9);\n $this->Cell(190,0,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]).' RECIBIDO POR:___________________________','',1,'C');\n $this->Ln(4);\n }", "function getDescripcionHorario(){\n\t\tglobal $usr;\n\t\tglobal $dias_semana;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'descripcion_horario.tpl');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_DIA', 'es_primer_dia');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_HORARIO', 'bloque_horario');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TODO_HORARIO', 'bloque_todo_horario');\n\n\t\t$T->setVar('bloque_horario', '');\n\t\t$T->setVar('bloque_todo_horario', '');\n\n\t\t$horario = $usr->getHorario($this->horario_id);\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t$T->setVar('__horario_orden', 1);\n\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t$tiene_horarios = false;\n\n\t\t$linea = 1;\n\t\tforeach ($dias_semana as $dia_id => $dia_nombre) {\n\t\t\t$items = $horario->getDiaSemanaItems($dia_id);\n\t\t\t$primero = true;\n\t\t\tforeach ($items as $id => $item) {\n\t\t\t\tif ($primero == true) {\n\t\t\t\t\t$T->setVar('__dia', $dia_nombre);\n\t\t\t\t\t$T->setVar('__dia_rowspan', count($items));\n\t\t\t\t\t$T->parse('es_primer_dia', 'ES_PRIMERO_DIA', false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$T->setVar('es_primer_dia', '');\n\t\t\t\t}\n\n\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__horaInicio', $item->hora_inicio);\n\t\t\t\t$T->setVar('__horaTermino', $item->hora_termino);\n\t\t\t\t$T->parse('bloque_horario', 'BLOQUE_HORARIO', true);\n\t\t\t\t$primero = false;\n\t\t\t\t$tiene_horarios = true;\n\t\t\t\t$linea++;\n\t\t\t}\n\t\t}\n\t\tif ($tiene_horarios == false) {\n\t\t\t$T->parse('bloque_todo_horario', 'BLOQUE_TODO_HORARIO', false);\n\t\t}\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "function TablaVentasProductos()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 15 ,10, 55 , 18 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',15);\n //Movernos a la derecha\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$ve = new Login();\n $ve = $ve->VentasPorId();\n\t\n################################################# BLOQUE N° 1 ###################################################\t\n\n //Bloque de membrete principal\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 10, 190, 20, '1.5', '');\n\t\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 14, 12, 12, '1.5', 'F');\n\t//Bloque de membrete principal\n $this->SetFillColor(199);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(98, 14, 12, 12, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',16);\n $this->SetXY(101, 14);\n $this->Cell(20, 5, 'V', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(98, 19);\n $this->Cell(20, 5, 'Venta', 0 , 0);\n\t\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 10);\n $this->Cell(20, 5, 'N° VENTA ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 10);\n $this->Cell(20, 5,utf8_decode($ve[0]['codventa']), 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 13);\n $this->Cell(20, 5, 'N° SERIE ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 13);\n $this->Cell(20, 5,utf8_decode($ve[0]['codserieve']), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 16);\n $this->Cell(20, 5, 'N° AUTORIZACIÓN ', 0 , 0);\n\t$this->SetFont('courier','B',8);\n $this->SetXY(165, 16);\n $this->Cell(20, 5,utf8_decode($ve[0]['codautorizacionve']), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 19);\n $this->Cell(20, 5, 'FECHA VENTA ', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 19);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($ve[0]['fechaventa']))), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 22);\n $this->Cell(20, 5, 'FECHA EMISIÓN', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 22);\n $this->Cell(20, 5,utf8_decode(date(\"d-m-Y h:i:s\")), 0 , 0);\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(135, 25);\n $this->Cell(20, 5, 'STATUS VENTA', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(165, 25);\n\t\n\tif($ve[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode($ve[0]['statusventa']), 0 , 0);\n\t} elseif($ve[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode($ve[0]['statusventa']), 0 , 0);\n\t} elseif($ve[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"VENCIDA\"), 0 , 0);\n\t}\t\n\t\n################################################# BLOQUE N° 2 ###################################################\t\n\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 32, 190, 18, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 32);\n $this->Cell(20, 5, 'DATOS DE LA EMPRESA ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 36);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(40, 36);\n $this->Cell(20, 5,utf8_decode($con[0]['nomempresa']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(147, 36);\n $this->Cell(90, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 36);\n $this->Cell(90, 5,utf8_decode($con[0]['rifempresa']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 40);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(32, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['direcempresa']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(140, 40);\n $this->Cell(20, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(156, 40);\n $this->Cell(20, 5,utf8_decode($con[0]['tlfempresa']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 44);\n $this->Cell(20, 5, 'GERENTE :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(30, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['nomresponsable']), 0 , 0);\n\t//Linea de membrete Nro 7\n\t$this->SetFont('courier','B',7);\n $this->SetXY(94, 44);\n $this->Cell(20, 5, 'CÉDULA :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(108, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['cedresponsable']), 0 , 0);\n\t//Linea de membrete Nro 8\n\t$this->SetFont('courier','B',7);\n $this->SetXY(130, 44);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(142, 44);\n $this->Cell(20, 5,utf8_decode($con[0]['correoresponsable']), 0 , 0);\n\t\n################################################# BLOQUE N° 3 ###################################################\t\n\n\t//Bloque de datos de cliente\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 52, 190, 14, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(15, 52);\n $this->Cell(20, 5, 'DATOS DEL CLIENTE ', 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 56);\n $this->Cell(20, 5, 'RAZÓN SOCIAL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(38, 56);\n $this->Cell(20, 5,utf8_decode($ve[0]['nomcliente']), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',7);\n $this->SetXY(112, 56);\n $this->Cell(74, 5, 'RIF :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(122, 56);\n $this->Cell(75, 5,utf8_decode($ve[0]['cedcliente']), 0 , 0);\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',7);\n $this->SetXY(150, 56);\n $this->Cell(90, 5, 'TELÉFONO :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(166, 56);\n $this->Cell(90, 5,utf8_decode($ve[0]['tlfcliente']), 0 , 0);\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',7);\n $this->SetXY(15, 60);\n $this->Cell(20, 5, 'DIRECCIÓN :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(33, 60);\n $this->Cell(20, 5,utf8_decode($ve[0]['direccliente']), 0 , 0);\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',7);\n $this->SetXY(116, 60);\n $this->Cell(20, 5, 'EMAIL :', 0 , 0);\n\t$this->SetFont('courier','',7);\n $this->SetXY(128, 60);\n $this->Cell(20, 5,utf8_decode($ve[0]['emailcliente']), 0 , 0);\n\t\n\t$this->Ln(8);\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(3, 3, 3); // Establece el color del texto (en este caso es Negro)\n $this->SetFillColor(229, 229, 229); // establece el color del fondo de la celda (en este caso es GRIS)\n\t$this->Cell(8,8,'N°',1,0,'C', True);\n\t$this->Cell(17,8,'CÓDIGO',1,0,'C', True);\n\t$this->Cell(67,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->Cell(25,8,'CATEGORIA',1,0,'C', True);\n\t$this->Cell(25,8,'PRECIO',1,0,'C', True);\n\t$this->Cell(23,8,'CANTIDAD',1,0,'C', True);\n\t$this->Cell(25,8,'IMPORTE',1,1,'C', True);\n\t\n\t################################################# BLOQUE N° 4 DE DETALLES DE PRODUCTOS ###################################################\t\n\t//Bloque de datos de empresa\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 78, 190, 170, '1.5', '');\n\t\n\t$this->Ln(3);\n $tra = new Login();\n $reg = $tra->VerDetallesVentas();\n\t$cantidad=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$cantidad+=$reg[$i]['cantventa'];\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,4,$a++,0,0,'C');\n\t$this->CellFitSpace(17,4,utf8_decode($reg[$i][\"codproducto\"]),0,0,'C');\n $this->CellFitSpace(67,4,utf8_decode($reg[$i][\"producto\"]),0,0,'C');\n $this->CellFitSpace(25,4,utf8_decode($reg[$i][\"nomcategoria\"]),0,0,'C');\n\t$this->CellFitSpace(25,4,utf8_decode(number_format($reg[$i][\"precioventa\"], 2, '.', ',')),0,0,'C');\n\t$this->CellFitSpace(23,4,utf8_decode($reg[$i][\"cantventa\"]),0,0,'C');\n\t$this->CellFitSpace(25,4,utf8_decode(number_format($reg[$i][\"importe\"], 2, '.', ',')),0,0,'C');\n $this->Ln();\n }\n \n################################################# BLOQUE N° 5 DE TOTALES ###################################################\t\n\t//Bloque de Informacion adicional\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(10, 250, 110, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',10);\n $this->SetXY(44, 250);\n $this->Cell(20, 5, 'INFORMACIÓN ADICIONAL', 0 , 0);\n\t\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 254);\n $this->Cell(20, 5, 'CANTIDAD DE PRODUCTOS :', 0 , 0);\n $this->SetXY(60, 254);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($cantidad), 0 , 0);\n\t\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 257.2);\n $this->Cell(20, 5, 'TIPO DE DOCUMENTO :', 0 , 0);\n $this->SetXY(60, 257.2);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode(\"FACTURA\"), 0 , 0);\n\t\n\t//Linea de membrete Nro 4\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 260.5);\n $this->Cell(20, 5, 'TIPO DE PAGO :', 0 , 0);\n $this->SetXY(60, 260.5);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($ve[0]['tipopagove'].\" - \".$ve[0]['formapagove']), 0 , 0);\n\t\n\t//Linea de membrete Nro 5\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 263.5);\n $this->Cell(20, 5, 'FECHA DE VENCIMIENTO :', 0 , 0);\n $this->SetXY(60, 263.5);\n\t$this->SetFont('courier','',8);\n $this->Cell(20, 5,utf8_decode($vence = ( $ve[0]['fechavencecredito'] == '0000-00-00' ? \"0\" : date(\"d-m-Y\",strtotime($ve[0]['fechavencecredito'])))), 0 , 0);\n\t\n\t//Linea de membrete Nro 6\n\t$this->SetFont('courier','B',8);\n $this->SetXY(12, 266.5);\n $this->Cell(20, 5, 'DIAS VENCIDOS :', 0 , 0);\n $this->SetXY(60, 266.5);\n\t$this->SetFont('courier','',8);\n\t\n if($ve[0]['fechavencecredito']== '0000-00-00') { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($ve[0]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(\"0\"), 0 , 0);\n\t} elseif($ve[0]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->Cell(20, 5,utf8_decode(Dias_Transcurridos(date(\"Y-m-d\"),$ve[0]['fechavencecredito'])), 0 , 0);\n\t}\n\t\n\t//Linea de membrete Nro 7\n\t$this->SetXY(52, 33);\n\t$this->Codabar(13,271,utf8_decode(\"133923786899444489448576556789\"));\n\t//Linea de membrete Nro 2\n $this->SetFont('courier','B',6.5); \n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->SetXY(48, 271);\n $this->Cell(20, 5, 'Este documento no constituye un comprobante de pago', 0 , 0);\n\t\n\t//Bloque de Totales de factura\n $this->SetFillColor(192);\n $this->SetDrawColor(3,3,3);\n $this->SetLineWidth(.3);\n $this->RoundedRect(122, 250, 78, 28, '1.5', '');\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 252);\n $this->Cell(20, 5, 'SUBTOTAL IVA '.$ve[0][\"ivave\"].'% :', 0 , 0);\n $this->SetXY(167, 252);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"subtotalivasive\"], 2, '.', ',')), 0 , 0);\n\t\n\t//Linea de membrete Nro 1\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 256);\n $this->Cell(20, 5, 'SUBTOTAL IVA 0% :', 0 , 0);\n $this->SetXY(167, 256);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"subtotalivanove\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 260);\n $this->Cell(20, 5, 'IVA '.$ve[0][\"ivave\"].'% :', 0 , 0);\n $this->SetXY(167, 260);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"totalivave\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 3\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 264);\n $this->Cell(20, 5, 'DESC '.$ve[0][\"descuentove\"].'% :', 0 , 0);\n $this->SetXY(167, 264);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"totaldescuentove\"], 2, '.', ',')), 0 , 0);\n\t//Linea de membrete Nro 2\n\t$this->SetFont('courier','B',9);\n $this->SetXY(124, 268);\n $this->Cell(20, 5, 'TOTAL PAGO :', 0 , 0);\n $this->SetXY(167, 268);\n\t$this->SetFont('courier','',9);\n $this->Cell(20, 5,utf8_decode(number_format($ve[0][\"totalpago\"], 2, '.', ',')), 0 , 0);\n}", "private function cabeceraHorizontal()\n {\n $this->Image('img/pdf/header.jpg' , 0, 0, 210 , 94,'JPG');\n\n $id_factura=1;\n $fecha_factura=\"20/12/15\";\n // Encabezado de la factura\n $this->SetFont('Arial','B',24);\n $this->SetTextColor(241,241,241);\n $top_datos=60;\n $this->SetY($top_datos);\n $this->Cell(190, 10, utf8_decode(\"EXPERT X\"), 0, 2, \"C\");\n $this->Cell(190, 10, utf8_decode(\"NOTA DE PEDIDO\"), 0, 2, \"C\");\n $this->SetFont('Arial','B',12);\n $this->MultiCell(190,5, utf8_decode(\"Número de nota: $id_factura\".\"\\n\".\"Fecha: $fecha_factura\"), 0, \"C\", false);\n $this->Ln(2);\n }", "public function mostrarDatos(){\r\n\t\t$html = null;\t\t\r\n\r\n\t\t$month = date('m');\r\n \t$year = date('Y');\r\n \t$day = date(\"d\");\r\n\r\n\t\t$data['fechaEmision'] = date('Y-m-d');\r\n\r\n\t\t$fecemi = $data['fechaEmision'];\r\n\r\n\t\t$canales=$_POST['canales'];\r\n\t\t$datos['canales'] = $canales;\r\n\r\n\t\t$inicio = $_POST['fechainicio'];\r\n\t\t$fin = $_POST['fechafin'];\r\n\r\n\t\t$data['documento'] = $_POST['documento'];\r\n\t\t$serie = $data['documento'];\r\n\r\n\t\t$idserie=$_POST['documento'];\r\n\r\n\t\tif (substr($serie, 0, 1) == 'B') {\r\n\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\t\t\t$html .= \"<hr>\";\r\n\t\t\t$boletaSuma = $this->comprobante_pago_mdl->getDatosSumaBoleta($inicio, $fin, $canales, $serie);\r\n\t\t\tforeach ($boletaSuma as $bs):\r\n\t\t\t\t$suma=$bs->suma;\r\n\t\t\t\t$sumaDos=number_format((float)$suma, 2, '.', ',');\r\n\t\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Boletas: S/. \".$sumaDos.\"</b></span></H1>\";\r\n\t\t\tendforeach;\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover' style='width:100%'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de Cobro</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de certificado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombres y Apellidos</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>DNI</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t\t$boleta = $this->comprobante_pago_mdl->getDatosBoleta($inicio, $fin, $canales, $serie);\r\n\t\t\t\t\t\tforeach ((array) $boleta as $b):\r\n\r\n\t\t\t\t\t\t\t$importe = $b->cob_importe;\r\n\t\t\t\t\t\t\t$importe = $importe/100;\r\n\t\t\t\t\t\t\t$importe2=number_format((float)$importe, 2, '.', ',');\r\n\t\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($b->cob_fechCob));\r\n\r\n\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"<input type='text' class='hidden' id='fechaEmi' name='fechaEmi[]' value='\".$b->cob_fechCob.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cert_num.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$b->numero_serie.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->contratante.\"<input type='text' class='hidden' id='contratante' name='contratante[]' value='\".$b->cont_id.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cont_numDoc.\"<input type='text' class='hidden' id='cobro' name='cobro[]' value='\".$b->cob_id.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->nombre_plan.\"<input type='text' class='hidden' id='idplan' name='idplan[]' value='\".$b->idplan.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>S/. \".$importe2.\"<input type='text' class='hidden' id='importeTotal' name='importeTotal[]' value='\".$importe2.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\t\tendforeach;\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\r\n\t\t} elseif (substr($serie, 0, 1) == 'F') {\r\n\r\n\t\t\t$html .= \"<hr>\";\r\n\r\n\t\t\t$facturaSuma = $this->comprobante_pago_mdl->getDatosSumaFacturas($inicio, $fin, $canales, $serie);\r\n\t\t\tforeach ($facturaSuma as $fs):\r\n\t\t\t\t$suma=$fs->suma;\r\n\t\t\t\t$sumaDos=number_format((float)$suma, 2, '.', ',');\r\n\t\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Facturas: S/. \".$sumaDos.\"</b></span></H1>\";\r\n\t\t\tendforeach;\r\n\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Razon Social</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombre Comercial</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>RUC</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Cantidad</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Seleccione</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t\t$factura = $this->comprobante_pago_mdl->getDatosFacturas($inicio, $fin, $canales, $serie);\r\n\r\n\t\t\t\t\t\t$tot=0; \r\n\t\t\t\t\t\t$totcant=0;\r\n\r\n\t\t\t\t\t\tforeach ((array)$factura as $f):\r\n\r\n\t\t\t\t\t\t\t$importeDos = $f->cob_importe;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$cant=$f->cant;\r\n\t\t\t\t\t\t\t$totcant=$totcant+$cant;\r\n\t\t\t\t\t\t\t$sub=$cant*$importeDos;\r\n\t\t\t\t\t\t\t$tot=$tot+$sub;\r\n\t\t\t\t\t\t\t$cant2=number_format((float)$cant, 0, '', ',');\r\n\t\t\t\t\t\t\t$importe2=number_format((float)$importeDos, 2, '.', '');\r\n\t\t\t\t\t\t\t$sub2=number_format((float)$sub, 2, '.', ''); \r\n\r\n\t\t\t\t\t\t\tif ($cant2 > 0) {\r\n\t\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'><input class='form-control input-mask-date' type='date' id='fechaEmi' name='fechaEmi[]' required='Seleccione una fecha de inicio' value=\".$fecemi.\"></td>\";\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->razon_social_cli.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$f->numero_serie.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_comercial_cli.\"<input type='text' class='hidden' id='empresa' name='empresa[]' value='\".$f->idclienteempresa.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->numero_documento_cli.\"</td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_plan.\"<input type='text' class='hidden' id='idplan' name='idplan[]' value='\".$f->plan_id.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>S/. \".$importe2.\"<input type='text' class='hidden' id='importeTotal' name='importeTotal[]' value='\".$importe2.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$cant2.\"</td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>Pendiente</td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\";\r\n\t\t\t\t\t\t\t\t\t\t//$html .= \"<div class='form-check'>\";\r\n\t\t\t\t\t\t\t\t\t\t $html .= \"<input class='form-check-input' type='checkbox' name='checkPlan[]' value='\".$f->plan_id.\"' id='\".$f->plan_id.\"'>\";\r\n\t\t\t\t\t\t\t\t\t\t//$html .= \"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tendforeach;\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\t\t}\r\n\t\techo json_encode($html);\r\n\t}", "public function renderHTML() {\r\n\t\t// Mois et année du jour\r\n\t\t$time = time ();\r\n\t\t$mois_actuel = date ( 'm', $time );\r\n\t\t$annee_actuelle = date ( 'Y', $time );\r\n\r\n\t\t$aff = $this->renderstyle ();\r\n\t\t$aff .= '<div id=\"FilAriane\"><a href=\"../../../index.php?menu=4\">Site Emploi</a>&nbsp;>&nbsp;';\r\n\t\t$aff .= '<a href=\"?\">Statistiques Site Emploi</a>&nbsp;>&nbsp;Réponses par région et domaine d\\'activité</div><br />';\r\n\r\n\t\t$aff .= '<table><tr>';\r\n\t\t$aff .= '<td><img width=\"15px\" height=\"15px\" src=\"../../../include/images/export.jpg\" /></td>';\r\n\t\t$aff .= '<td> <a target=\"blank\" href=\"../statistiques/metier/getReponseRegion.php?export=1&m=' . (isset ( $_GET ['m'] ) ? $_GET ['m'] : $mois_actuel) . '&a=' . (isset ( $_GET ['a'] ) ? $_GET ['a'] : $annee_actuelle) . '\"> Exporter les données affichées</a></td>';\r\n\t\t$aff .= '</tr>';\r\n\t\t$aff .= '<tr></table>';\r\n\r\n\t\t// *************************************** Début calendrier ******************************************\r\n\r\n\t\t$aff .= '<div align=\"center\" ><form>';\r\n\t\t// Si on a demandé une date\r\n\t\tif (isset ( $_GET ['m'] ) && isset ( $_GET ['a'] )) {\r\n\t\t\t$aff .= '<a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=' . $_GET ['m'] . '&a=' . ($_GET ['a'] - 1);\r\n\t\t\t$aff .= '\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($_GET ['m'] == '01') {\r\n\t\t\t\t$aff .= '12&a=' . ($_GET ['a'] - 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($_GET ['m'] - 1) . '&a=' . $_GET ['a'];\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t\t$aff .= '<select name=\"mois\" onChange=\"window.location=\\'/admin/modules/app-site-emploi/statistiques/index.php?action=rep&m=\\' + this.form.mois.value + \\'&a=' . $_GET ['a'] . '\\'\">';\r\n\t\t\t$i = 1;\r\n\t\t\twhile ( $i <= 12 ) {\r\n\t\t\t\t$aff .= '<option value=\"' . $i . '\" ' . ($_GET ['m'] == $i ? 'selected' : '') . '>' . FunctionDate::getMois ( $i ) . '</option>';\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t\t$aff .= '</select> ';\r\n\t\t\t$aff .= $_GET ['a'] . ' <a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($_GET ['m'] == '12') {\r\n\t\t\t\t$aff .= '01&a=' . ($_GET ['a'] + 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($_GET ['m'] + 1) . '&a=' . $_GET ['a'];\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=' . $_GET ['m'] . '&a=' . ($_GET ['a'] + 1);\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t} // Sinon on prend le moi et l'année actuels\r\n\t\telse {\r\n\t\t\t$aff .= '<a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=' . $mois_actuel . '&a=' . ($annee_actuelle - 1);\r\n\t\t\t$aff .= '\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($mois_actuel == '01') {\r\n\t\t\t\t$aff .= '12&a=' . ($annee_actuelle - 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($mois_actuel - 1) . '&a=' . $annee_actuelle;\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t\t$aff .= ' <select name=\"mois\" onChange=\"window.location=\\'/admin/modules/app-site-emploi/statistiques/index.php?action=rep&m=\\' + this.form.mois.value + \\'&a=' . $annee_actuelle . '\\'\">';\r\n\t\t\t$i = 1;\r\n\t\t\twhile ( $i <= 12 ) {\r\n\t\t\t\t$aff .= '<option value=\"' . $i . '\" ' . ($mois_actuel == $i ? 'selected' : '') . '>' . FunctionDate::getMois ( $i ) . '</option>';\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t\t$aff .= '</select> ';\r\n\t\t\t$aff .= $annee_actuelle . '<a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=offre_rep&m=';\r\n\t\t\tif ($mois_actuel == '12') {\r\n\t\t\t\t$aff .= '01&a=' . ($annee_actuelle + 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($mois_actuel + 1) . '&a=' . $annee_actuelle;\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=' . $mois_actuel . '&a=' . ($annee_actuelle + 1);\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t}\r\n\t\t$aff .= '</div></form><br />';\r\n\t\t// *************************************** Fin calendrier ******************************************\r\n\t\t// Création du tableau\r\n\r\n\t\t$aff .= '<table id=\"TableList\" width=\"100%\" class=\"liste\">';\r\n\t\t$aff .= '<tr class=\"title\"><td align=\"center\" ><b>Région</b></td>';\r\n\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t$aff .= '<td align=\"center\"><b>' . $aDA->getnomdomaine () . '</b></td>';\r\n\t\t}\r\n\t\t$aff .= '<td align=\"center\">Total</td></tr>';\r\n\t\t$row = 1;\r\n\t\tforeach ( $this->myListeregion->getList () as $aRegion ) {\r\n\t\t\tif ($aRegion->getlibelle () == 'Toute la France') {\r\n\t\t\t\t$aff .= '<tr>';\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $aRegion->getlibelle () . '</b></td>';\r\n\t\t\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t\t\t$total_ligne = 0;\r\n\t\t\t\t\t$aStatAll = new StatReponseRegion ();\r\n\t\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . $aStatAll->SQL_COUNT ( $aDA->getiddomaine () ) . '</td>';\r\n\t\t\t\t\tif (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat )) {\r\n\t\t\t\t\t\t$total_ligne += $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">' . $total_ligne . '</td></tr>';\r\n\t\t\t} else \r\n\t\t\t{ // total par ligne\r\n\t\t\t\t$total_ligne = 0;\r\n\t\t\t\t$aff .= '<tr>';\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $aRegion->getlibelle () . '</b></td>';\r\n\t\t\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat ) ? $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()] : 0) . '</td>';\r\n\t\t\t\t\tif (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat )) {\r\n\t\t\t\t\t\t$total_ligne += $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . $total_ligne . '</td>';\r\n\t\t\t}\r\n\t\t\t$row = ($row == 1 ? 2 : 1);\r\n\t\t}\r\n\r\n\t\t// Total par colonne et total général\r\n\t\t$aff .= '<tr><td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">Total</td>';\r\n\t\t$total = 0;\r\n\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t$aStatAll = new StatReponseRegion ();\r\n\t\t\t$data = $aStatAll->SQL_COUNT_TOT ( $aDA->getiddomaine (), isset ( $_GET ['m'] ) ? $_GET ['m'] : date ( 'm', $time ), isset ( $_GET ['a'] ) ? $_GET ['a'] : date ( 'Y', $time ) );\r\n\t\t\t$total += $data;\r\n\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $data . '</b></td>';\r\n\t\t}\r\n\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">' . $total . '</tr></table><br />';\r\n\t\techo $aff;\r\n\t}", "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}", "public function mensajeCorreo(string $titulo, string $texto) {\r\n $mensaje = '<div align=\"center\">\r\n <table style=\"max-width: 600px; height: 240px;\" border=\"0\" width=\"598\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tbody>\r\n <tr>\r\n <td>\r\n <table style=\"min-width: 332px; max-width: 600px; border: 1px solid #E0E0E0; border-bottom: 0; border-top-left-radius: 3px; border-top-right-radius: 3px;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#707478\">\r\n <tbody>\r\n <tr>\r\n <td colspan=\"3\" height=\"72px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td width=\"32px\">&nbsp;</td>\r\n <td style=\"font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 24px; color: #ffffff; line-height: 1.25;\">' . $titulo . '</td>\r\n <td width=\"32px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"3\" height=\"18px\">&nbsp;</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <table style=\"min-width: 332px; max-width: 600px; border: 1px solid #F0F0F0; border-top: 0;\" border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#FFFFFF\">\r\n <tbody>\r\n <tr>\r\n <td colspan=\"3\" height=\"18px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td width=\"32px\">&nbsp;</td>\r\n <td style=\"font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 13px; color: #202020; line-height: 1.5;\">' . $texto . '</td>\r\n <td width=\"10px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"3\" height=\"18px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td width=\"32px\">&nbsp;</td>\r\n <td style=\"font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 13px; color: #202020; line-height: 1.5;\">\r\n <p>&nbsp;<strong><em>Atentamente,</em></strong><br>\r\n <strong><em>Notificaciones AdIST</em></strong></p>\r\n </td>\r\n <td width=\"10px\">&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td>&nbsp;</td>\r\n <td>&nbsp;</td>\r\n <td>&nbsp;</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>&nbsp;</td>\r\n </tr>\r\n <tr>\r\n <td style=\"max-width: 600px; font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 10px; color: #bcbcbc; line-height: 1.5;\">&nbsp;\r\n <p style=\"text-align: center;\" align=\"center\"><em><span style=\"font-size: 10.5pt; color: #999999;\"><em>Gracias por no responder este correo.<br /> Es solo un robot para mandar e-mails.<br /> Dudas o aclaraciones dirigirse al &aacute;rea correspondiente de la empresa. </em></span></em></p>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>';\r\n return $mensaje;\r\n }", "function Geral() {\r\n \r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_sq_tipo_lancamento = $_REQUEST['w_sq_tipo_lancamento'];\r\n $w_readonly = '';\r\n $w_erro = '';\r\n\r\n // Carrega o segmento cliente\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente); \r\n $w_segmento = f($RS,'segmento');\r\n \r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'' && $O!='E') {\r\n // Se for recarga da página\r\n $w_codigo_interno = $_REQUEST['w_codigo_interno'];\r\n $w_sq_tipo_lancamento = $_REQUEST['w_sq_tipo_lancamento'];\r\n $w_sq_tipo_documento = $_REQUEST['w_sq_tipo_documento'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_fim = $_REQUEST['w_fim'];\r\n $w_conta_debito = $_REQUEST['w_conta_debito'];\r\n $w_sq_forma_pagamento = $_REQUEST['w_sq_forma_pagamento'];\r\n $w_cc_debito = $_REQUEST['w_cc_debito'];\r\n $w_cc_credito = $_REQUEST['w_cc_credito'];\r\n\r\n } elseif(strpos('AEV',$O)!==false || $w_copia>'') {\r\n // Recupera os dados do lançamento\r\n $sql = new db_getSolicData; \r\n $RS = $sql->getInstanceOf($dbms,nvl($w_copia,$w_chave),$SG);\r\n if (count($RS)>0) {\r\n $w_codigo_interno = f($RS,'codigo_interno');\r\n $w_sq_tipo_lancamento = f($RS,'sq_tipo_lancamento');\r\n $w_conta_debito = f($RS,'sq_pessoa_conta');\r\n $w_descricao = f($RS,'descricao');\r\n $w_fim = formataDataEdicao(f($RS,'fim'));\r\n $w_valor = formatNumber(f($RS,'valor'));\r\n $w_sq_forma_pagamento = f($RS,'sq_forma_pagamento');\r\n $w_cc_debito = f($RS,'cc_debito');\r\n $w_cc_credito = f($RS,'cc_credito');\r\n }\r\n }\r\n\r\n // Recupera dados do comprovante\r\n if (nvl($w_troca,'')=='' && (nvl($w_copia,'')!='' || nvl($w_chave,'')!='')) {\r\n $sql = new db_getLancamentoDoc; $RS = $sql->getInstanceOf($dbms,nvl($w_copia,$w_chave),null,null,null,null,null,null,'DOCS');\r\n $RS = SortArray($RS,'sq_tipo_documento','asc');\r\n foreach ($RS as $row) {$RS=$row; break;}\r\n if (nvl($w_copia,'')=='') $w_chave_doc = f($RS,'sq_lancamento_doc'); // Se cópia, não copia a chave do documento \r\n $w_sq_tipo_documento = f($RS,'sq_tipo_documento');\r\n $w_numero = f($RS,'numero');\r\n $w_data = FormataDataEdicao(f($RS,'data'));\r\n $w_serie = f($RS,'serie');\r\n $w_valor_doc = formatNumber(f($RS,'valor'));\r\n $w_patrimonio = f($RS,'patrimonio');\r\n $w_tributo = f($RS,'calcula_tributo');\r\n $w_retencao = f($RS,'calcula_retencao'); \r\n }\r\n\r\n // Default: pagamento para pessoa jurídica\r\n $w_tipo_pessoa = nvl($w_tipo_pessoa,2);\r\n \r\n // Recupera o trâmite de conclusão\r\n $sql = new db_getTramiteList; $RS = $sql->getInstanceOf($dbms, $w_menu,null,null,null);\r\n $RS = SortArray($RS,'ordem','asc');\r\n foreach ($RS as $row) {\r\n if (f($row,'sigla')=='AT') {\r\n $w_tramite_conc = f($row,'sq_siw_tramite');\r\n break;\r\n }\r\n }\r\n \r\n // Verifica as formas de pagamento possíveis. Se apenas uma, atribui direto\r\n $sql = new db_getFormaPagamento; $RS = $sql->getInstanceOf($dbms, $w_cliente, null, $SG, null,'S',null);\r\n $w_exibe_fp = true;\r\n if (count($RS)==1 || nvl($w_sq_forma_pagamento,'')!='') {\r\n foreach($RS as $row) { \r\n if (nvl($w_sq_forma_pagamento,f($row,'sq_forma_pagamento'))==f($row,'sq_forma_pagamento')) {\r\n $w_sq_forma_pagamento = f($row,'sq_forma_pagamento'); \r\n $w_forma_pagamento = f($row,'sigla'); \r\n $w_nm_forma_pagamento = f($row,'nome'); \r\n break; \r\n }\r\n }\r\n if (count($RS)==1) $w_exibe_fp = false;\r\n }\r\n \r\n // Verifica os tipos de documento possíveis. Se apenas um, atribui direto\r\n $sql = new db_getTipoDocumento; $RS = $sql->getInstanceOf($dbms,null,$w_cliente,$w_menu,null);\r\n $w_exibe_dc = true;\r\n if (count($RS)==1) {\r\n foreach($RS as $row) { \r\n $w_sq_tipo_documento = f($row,'chave'); \r\n $w_tipo_documento = f($row,'sigla'); \r\n $w_nm_tipo_documento = f($row,'nome'); \r\n break; \r\n }\r\n $w_exibe_dc = false;\r\n }\r\n\r\n // Se o tipo de lançamento já foi informado, recupera o código externo para definir a conta contábil de débito\r\n if ($w_sq_tipo_lancamento) {\r\n $sql = new db_getTipoLancamento; $RS = $sql->getInstanceOf($dbms,$w_sq_tipo_lancamento,null,$w_cliente,null);\r\n $w_cc_debito = f($RS[0],'codigo_externo');\r\n }\r\n \r\n // Retorna as contas contábeis do lançamento\r\n retornaContasContabeis($RS_Menu, $w_cliente, $w_sq_tipo_lancamento, $w_sq_forma_pagamento, $w_conta_debito, $w_cc_debito, $w_cc_credito);\r\n \r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataHora();\r\n FormataValor();\r\n ShowHTML('function botoes() {');\r\n ShowHTML(' document.Form.Botao[0].disabled = true;');\r\n ShowHTML(' document.Form.Botao[1].disabled = true;');\r\n ShowHTML('}');\r\n ValidateOpen('Validacao');\r\n if ($O=='I' || $O=='A') {\r\n Validate('w_sq_tipo_lancamento','Tipo do lançamento','SELECT',1,1,18,'','0123456789');\r\n if ($w_exibe_fp) Validate('w_sq_forma_pagamento','Forma de pagamento','SELECT',1,1,18,'','0123456789');\r\n Validate('w_conta_debito','Conta bancária', 'SELECT', 1, 1, 18, '', '0123456789');\r\n if ($w_exibe_dc) Validate('w_sq_tipo_documento','Tipo de documento','SELECT',1,1,18,'','0123456789');\r\n Validate('w_fim','Data da operação', 'DATA', '1', '10', '10', '', '0123456789/');\r\n Validate('w_valor','Valor total do documento','VALOR','1',4,18,'','0123456789.,-');\r\n CompValor('w_valor','Valor total do documento','>','0,00','zero');\r\n Validate('w_descricao','Observação','1','',5,2000,'1','1');\r\n \r\n Validate('w_cc_debito','Conta Débito','','','2','25','ABCDEFGHIJKLMNOPQRSTUVWXYZ','0123456789');\r\n Validate('w_cc_credito','Conta Crédito','','','2','25','ABCDEFGHIJKLMNOPQRSTUVWXYZ','0123456789');\r\n \r\n ShowHTML(' if ((theForm.w_cc_debito.value != \"\" && theForm.w_cc_credito.value == \"\") || (theForm.w_cc_debito.value == \"\" && theForm.w_cc_credito.value != \"\")) {');\r\n ShowHTML(' alert (\"Informe ambas as contas contábeis ou nenhuma delas!\");');\r\n ShowHTML(' theForm.w_cc_debito.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n \r\n } \r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'], '1', '1', '3', '30', '1', '1');\r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n ShowHTML('</HEAD>');\r\n if ($w_troca>'') BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n elseif (!(strpos('EV',$O)===false)) BodyOpen('onLoad=\\'this.focus()\\';');\r\n else BodyOpen('onLoad=\\'document.Form.w_sq_tipo_lancamento.focus()\\';');\r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if ($w_chave>'') ShowHTML(' <tr><td><font size=\"2\"><b>'.$w_codigo_interno.' ('.$w_chave.')</b></td>');\r\n if (strpos('IAEV',$O)!==false) {\r\n if (strpos('EV',$O)!==false) {\r\n $w_Disabled=' DISABLED ';\r\n if ($O=='V') $w_Erro = Validacao($w_sq_solicitacao,$SG);\r\n } \r\n if (Nvl($w_pais,'')=='') {\r\n // Carrega os valores padrão para país, estado e cidade\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente);\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = Nvl(f($RS_Menu,'sq_cidade'),f($RS,'sq_cidade_padrao'));\r\n } \r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_codigo_interno\" value=\"'.$w_codigo_interno.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.f($RS_Menu,'sq_menu').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_hora\" value=\"'.f($RS_Menu,'data_hora').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cidade\" value=\"'.$w_cidade.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tramite\" value=\"'.$w_tramite_conc.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tipo\" value=\"'.$w_tipo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave_doc\" value=\"'.$w_chave_doc.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tipo_pessoa\" value=\"'.$w_tipo_pessoa.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_aviso\" value=\"N\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_dias\" value=\"0\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" bgcolor=\"#D0D0D0\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=3>Os dados deste bloco serão utilizados para identificação do lançamento, bem como para o controle de sua execução.</td></tr>');\r\n ShowHTML(' <tr><td colspan=3 align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n\r\n ShowHTML(' <tr valign=\"top\">');\r\n selecaoTipoLancamento('Tipo de lançamento:',null,null,$w_sq_tipo_lancamento,$w_menu,$w_cliente,'w_sq_tipo_lancamento',$SG, 'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\''.(($w_exibe_fp) ? 'w_sq_forma_pagamento' : 'w_conta_debito').'\\'; document.Form.submit();\"',3);\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_exibe_fp) {\r\n SelecaoFormaPagamento('<u>F</u>orma de pagamento:','F','Selecione na lista a forma desejada para esta aplicação.',$w_sq_forma_pagamento,$SG,'w_sq_forma_pagamento',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_conta_debito\\'; document.Form.submit();\"');\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_forma_pagamento\" value=\"'.$w_sq_forma_pagamento.'\">');\r\n }\r\n SelecaoContaBanco('<u>C</u>onta bancária:','C','Selecione a conta bancária envolvida no lançamento.',$w_conta_debito,null,'w_conta_debito',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\''.(($w_exibe_dc) ? 'w_sq_tipo_documento' : 'w_fim').'\\'; document.Form.submit();\"');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_exibe_dc) {\r\n SelecaoTipoDocumento('<u>T</u>ipo do documento:','T', 'Selecione o tipo de documento.', $w_sq_tipo_documento,$w_cliente,$w_menu,'w_sq_tipo_documento',null,null);\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_tipo_documento\" value=\"'.$w_sq_tipo_documento.'\">');\r\n }\r\n ShowHTML(' <td><b><u>D</u>ata da operação:</b><br><input '.$w_Disabled.' accesskey=\"D\" type=\"text\" name=\"w_fim\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">'.ExibeCalendario('Form','w_fim').'</td>');\r\n ShowHTML(' <td><b><u>V</u>alor:</b><br><input '.$w_Disabled.' accesskey=\"V\" type=\"text\" name=\"w_valor\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor total do documento.\"></td>');\r\n ShowHTML(' <tr><td colspan=3><b><u>O</u>bservação:</b><br><textarea '.$w_Disabled.' accesskey=\"O\" name=\"w_descricao\" class=\"sti\" ROWS=3 cols=75 title=\"Observação sobre a aplicação.\">'.$w_descricao.'</TEXTAREA></td>');\r\n\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b><u>C</u>onta contábil de débito:</b></br><input type=\"text\" name=\"w_cc_debito\" class=\"sti\" SIZE=\"11\" MAXLENGTH=\"25\" VALUE=\"'.$w_cc_debito.'\"></td>');\r\n ShowHTML(' <td><b><u>C</u>onta contábil de crédito:</b></br><input type=\"text\" name=\"w_cc_credito\" class=\"sti\" SIZE=\"11\" MAXLENGTH=\"25\" VALUE=\"'.$w_cc_credito.'\"></td>');\r\n \r\n ShowHTML(' <tr><td align=\"LEFT\" colspan=4><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n if ($P1==0) {\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,'tesouraria.php?par=inicial&O=L&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Abandonar\">');\r\n } else {\r\n $sql = new db_getMenuData; $RS = $sql->getInstanceOf($dbms,$w_menu);\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&w_copia='.$w_copia.'&O=L&SG='.f($RS,'sigla').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n }\r\n ShowHTML(' </td>');\r\n \r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "public function gera_linhas_somatorios()\n\t{\n\t\tif(count($this->somatorios) > 0)\n\t\t{\n\t\t\techo \"<tr class=totalizadores>\";\n\t\t\tfor($i=0; $i < count($this->nome_colunas); $i++)\n\t\t\t{\n\t\t\t\t$alinhamento = $this->nome_colunas[$i][alinhamento];\n\n\t\t\t\tfor($b=0; $b < count($this->somatorios); $b++)\n\t\t\t\t{\n\t\t\t\t\tif($this->nome_colunas[$i][nome_coluna] == $this->somatorios[$b][nome_coluna])\n\t\t\t\t\t{\n\t\t\t\t\t\t$valor = $this->somatorios[$b][total];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// \tVERIFICO SE E PARA IMPRIMIR O VALOR\n\t\t\t\tif($this->nome_colunas[$i][somatorio] == 's')\n\t\t\t\t{\n\t\t\t\t\t//\t ESCOLHO O TIPO DE DADO\n\t\t\t\t\tswitch($this->nome_colunas[$i][tipo])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'moeda':\n\t\t\t\t\t\t\t$valor = Util::exibe_valor_moeda($valor);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'data':\n\t\t\t\t\t\t\t$valor = Util::data_certa($valor);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$valor = $valor;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"\n\t\t\t\t\t\t \t<td align=$alinhamento>\n\t\t\t\t\t\t\t\t\" . $valor . \"\n\t\t\t\t\t\t \t</td>\n\t\t\t\t\t\t \";\n\t\t\t\t\t$valor = '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"<td align=$alinhamento></td>\";\n\t\t\t\t}\n\n\n\n\t\t\t}\n\t\t\techo '</tr>';\n\t\t}\n\t}", "function escreveCabecalho($dados){\n fwrite($dados, \"nome,\");\n fwrite($dados, \"telefone,\");\n fwrite($dados, \"cpf,\");\n fwrite($dados, \"rg\");\n fwrite($dados, \"\\n\");\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}", "function paludisme($nb_susp,$nb_tdr_moins,$nb_tdr_plus,$nb_traite){\n $this->SetFont('Arial','',15);\n $this->Cell(0,6,\"Tableau de Paludisme\");\n $this->Ln();\n $this->SetFont('Times','',12);\n $this->Cell(140,5,\"Nombre de supect de paludisme \",1);\n $this->Cell(14,5,$nb_susp,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,utf8_decode(\"Nombre de cas de paludisme testés\"),1);\n $this->Cell(14,5,$nb_tdr_moins + $nb_tdr_plus,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,\"Nombre de cas de TDR+\",1);\n $this->Cell(14,5,$nb_tdr_plus,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,utf8_decode(\"Nombre de cas de paludisme traités (confirmé)\"),1);\n $this->Cell(14,5,$nb_traite,1,0,'R');\n $this->Ln();\n $this->Ln();\n }", "function show_lines2($list_lines,$list_numlines,$list_indent,$only_code,$max_lines,$indent_mccount = Array()) {\n\necho \"<table>\\n\";\necho \"<thead><tr><th>Line</th><th>MC count</th><th>Code</th></tr></thead>\\n\";\necho \"<tbody>\\n\";\nfor ($i=0;$i<min(count($list_lines),$max_lines);$i++)\n{\n\techo \"<tr><td>\\n\";\n\n\t$line = htmlentities($list_lines[$i]);\n\t$numline = $list_numlines[$i];\n\t$indent = $list_indent[$i];\n\t\n\t$num_spaces = $indent*8;\n\t$indent_str = str_repeat(':'.str_repeat('&nbsp;',8),$indent); // indentazione\n\t\n\tif (count('indent_mccount') > 0)\n\t{\n\t\t$mc_count = $indent_mccount[$i];\n\t\tif ($mc_count > 0)\n\t\t{\n\t\t\t$ks_mccount = sprintf('(->%1d) </td><td> ', $mc_count);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ks_mccount = ' </td><td> ';\n\t\t}\n\t}\n\telse\n\t{\n\t\t$ks_mccount = '';\n\t}\n\t\n\t// function line spacing\n\tif (substr($line,0,8) === 'function')\n\t{\n\t\techo \"&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>\\n<tr><td>\\n\";\n\t}\n\t\n\tif ($only_code)\n\t{\n\t\techo(sprintf('%s%s%s',$ks_mccount,$indent_str,$line));\n\t}\n\telse\n\t{\n\t\techo(sprintf('%3d </td><td> %s%s%s',$numline,$ks_mccount,$indent_str,$line));\n\t}\n\techo \"</td></tr>\\n\";\n} // end for $i\n\necho \"</tbody></table>\\n\";\n// stampa(' ');\n// stampa('------------------------------------------------------------------------------');\n\n}", "public function genHTMLCronograma(){\n \n //Usuario conectado ==========================================================================\n $_solicitudes = $this->cdaSolicitudesOpen(Yii::$app->user->identity->id_usuario);\n $_tramites = $this->cdaTramitesOpen();\n $_tecnicos = $this->cdaTecnicos();\n $j_user=0;\n \n $string=\"\";\n \n $string.=\"<table class='tablecronograma'>\";\n \n foreach($_solicitudes[1] as $valor){\n \n $_drhidricos = $valor[0];\n \n if($j_user>0){\n $string.=\"<tr>\";\n $string.=\"<td colspan='7' class='noborders'>&nbsp;</td>\";\n $string.=\"</tr>\";\n }\n \n $string.=\"<tr>\";\n $string.=\"<td rowspan='2'>\".$valor[1].\"</td>\";\n \n //Sacando la fila de solicitudes asociadas al usuario ===================================================\n foreach($_solicitudes[2][$valor[0]] as $numsolicitud){\n $string.=\"<td colspan='6'>\".$numsolicitud.\"</td>\";\n }\n \n $string.=\"</tr>\";\n \n $string.=\"<tr>\";\n \n //Armando cuadro de casillas por solicitud ===================================================\n foreach($_solicitudes[2][$valor[0]] as $idSol=>$numsolicitud){\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][0].\"'>1</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][1].\"'>2</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][2].\"'>3</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][3].\"'>4</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][4].\"'>5</td>\";\n $string.=\"<td bgcolor='\".$_solicitudes[3][$idSol][5].\"'>6</td>\";\n }\n $string.=\"</tr>\";\n \n //Organizando segunda parate la de TECNICOS ======================================================================\n \n foreach($_tecnicos as $tecnicosRH){\n \n $string.=\"<tr>\";\n $string.=\"<td>\".$tecnicosRH['nombres'].\"</td>\";\n foreach($_solicitudes[2][$valor[0]] as $idSol=>$numsolicitud){\n \n if (!empty($tecnicosRH['id_usuario']) ){\n $_idusuario = $tecnicosRH['id_usuario'];\n }else{\n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n continue;\n }\n \n if(!empty( $_tramites[$_idusuario] )){\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip1'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip2'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip3'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip4'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip5'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n if(!empty($_tramites[$_idusuario][$idSol]['tip6'])){\n $string.=\"<td bgcolor='blue'>&nbsp;</td>\";\n }else{\n $string.=\"<td></td>\"; \n }\n \n }else{\n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n $string.=\"<td></td>\"; \n \n }\n }\n $string.=\"</tr>\";\n }\n \n $j_user+=1;\n }\n \n \n \n $string.=\"</table>\";\n \n \n return $string;\n }", "function enviar_presupuesto(){\n $this->asignar_ingreso3();\n $nombre_sede = $this->sede;\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/logo_admin.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre: </strong>\".utf8_decode($this->nombre1).\"<br />\" ;\n $cuerpo .= \"<strong>Apellido: </strong>\".$this->apellido1.\"<br />\" ;\n $cuerpo .= \"<strong>RIF/Cédula: </strong>\".$this->cedula1.\"<br />\" ;\n $cuerpo .= \"<strong>Fecha de Nacimiento: </strong>\".$this->fecha1.\"<br />\";\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Teléfono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>Domicilio: </strong>\".$this->direccion1.\"<br />\" ;\n $cuerpo .= \"<strong>Empresa: </strong>\".$this->empresa.\"<br />\";\n $cuerpo .= \"<strong>Especialidad Médica: </strong>\".$this->especialidad.\"<br />\";\n $cuerpo .= \"<strong>Médico Elegido: </strong>\".$this->medico.\"<br />\";\n $cuerpo .= \"<strong>Diagnóstico: </strong>\".$this->diagnostico.\"<br />\";\n $cuerpo .= \"<strong>Procedimiento: </strong>\".$this->procedimiento.\"<br /><br />\";\n if ($this->seguro != null) {\n $cuerpo .= \"<strong>Presupuesto Con Póliza de Seguro </strong><br /><br />\";\n $cuerpo .= \"<strong>Titular de la Póliza: </strong>\".utf8_decode($this->nombre_pol).\"<br />\" ;\n $cuerpo .= \"<strong>Cédula del Titular de la Póliza: </strong>\".$this->cedula_pol.\"<br />\" ;\n $cuerpo .= \"<strong>Empresa Aseguradora: </strong>\".$this->seguro.\"<br />\" ;\n }else{\n $cuerpo .= \"<strong>Presupuesto Sin Póliza de Seguro </strong><br /><br />\";\n $cuerpo .= \"<strong>Datos de Facturación </strong><br /><br />\";\n $cuerpo .= \"<strong>Nombre: </strong>\".utf8_decode($this->nombre2).\"<br />\" ;\n $cuerpo .= \"<strong>Apellido: </strong>\".$this->apellido2.\"<br />\" ;\n $cuerpo .= \"<strong>RIF/Cédula: </strong>\".$this->cedula2.\"<br />\" ;\n $cuerpo .= \"<strong>Fecha de Nacimiento: </strong>\".$this->fecha2.\"<br />\";\n $cuerpo .= \"<strong>Dirección: </strong>\".$this->direccion2.\"<br />\" ;\n }\n\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Solicitud de Presupuesto Web Prevaler\";\n $subject2= \"Solicitud de Presupuesto Web Prevaler\";\n\n switch ($resultado['id_sede']) {\n case '1':\n $correo_envio=\"[email protected]\";\n break;\n case '2':\n $correo_envio=\"[email protected]\";\n break;\n case '3':\n $correo_envio=\"[email protected]\";\n break;\n case '4':\n $correo_envio=\"[email protected]\";\n break;\n case '8':\n $correo_envio=\"[email protected]\";\n break;\n\n default:\n $correo_envio=\"[email protected]\";\n break;\n }\n\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=$correo_envio;\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/logo_admin.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre1 $this->apellido1</strong><br /><br />\n\t\tNosotros hemos recibido su Solicitud de Presupuesto, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTel&eacute;fonos: <br/>\n\t\t\".$resultado['telefono_sede'].\"<br />\n\t\tTwitter: <a href='https://twitter.com/Prevaler_VE'>@Prevaler_VE</a><br />\n\t\tInstagram: <a href='https://www.instagram.com/prevaler_ve/'>@prevaler_ve</a><br />\n\t\t\".$resultado['email_sede'].\"\n\t\t<br /><br />\n\t\tAtentamente,<br />\n\t\tClínica Prevaler.\";\n $this->mensaje=\"<strong>&iexcl;Excelente!</strong> Su Solicitud de Presupuesto ha sido enviado exitosamente.\";\n\n $mail = new PHPMailer();\n $mail->From = $basemailfrom;\n $mail->FromName = utf8_decode($subject);\n $mail->AddAddress($basemailfor, $this->nombre.\" \".$this->apellido);\n $mail->Subject = utf8_decode($subject);\n $mail->Body = $cuerpo;\n $mail->AltBody = $cuerpo;\n $mail->isHTML(true);\n $exito = $mail->Send();\n\n $mail2 = new PHPMailer();\n $mail2->From = $basemailfor;\n $mail2->FromName = utf8_decode($subject2);\n $mail2->AddAddress($basemailfrom, $this->nombre.\" \".$this->apellido);\n $mail2->Subject = utf8_decode($subject2);\n $mail2->Body = $respuesta;\n $mail2->AltBody = $respuesta;\n $mail2->isHTML(true);\n $exito = $mail2->Send();\n }", "function gerar(){\r\n\t\tif(strlen($this->estabelecimento->getdircontabil()) == 0){\r\n\t\t\t$_SESSION[\"ERROR\"] = \"Informe o diret&oacute;rio de integra&ccedil;&atilde;o cont&aacute;bil para o estabelecimento.<br><a onclick=\\\"$.messageBox('close'); openProgram('Estabel','codestabelec=\".$this->estabelecimento->getcodestabelec().\"')\\\">Clique aqui</a> para abrir o cadastro de estabelecimento.\";\r\n\t\t\techo messagebox(\"error\", \"\", $_SESSION[\"ERROR\"]);\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\tif($this->gerar_financeiro){\r\n\t\t\t$query = \"SELECT codlancto, data, debito, credito, LPAD(valorliquido::text,17,'0') AS valorliquido, historicopadrao, complemento, ccdb, cccr, pagrec FROM \";\r\n\r\n\t\t\t$query .= \"( \";\r\n\t\t\t$query .= \"SELECT lancamento.codlancto, lpad(Extract('Day' From lancamento.dtliquid::date)::text,2,'0')|| '/' || lpad(Extract('Month' From lancamento.dtliquid::date)::TEXT, 2, '0') AS data, \";\r\n\t\t\t$query .= \"contaparceiro.contacontabil as debito, contabanco.contacontabil AS credito, \";\r\n\t\t\t$query .= \"lancamento.valorparcela AS valorliquido, historicopadrao.descricao AS historicopadrao, \";\r\n\t\t\t$query .= \"lancamento.numnotafis || v_parceiro.nome AS complemento, '' as CCDB, \";\r\n\t\t\t$query .= \"'' AS CCCR , lancamento.pagrec \";\r\n\t\t\t$query .= \"FROM lancamento \";\r\n\t\t\t$query .= \"INNER JOIN v_parceiro ON (lancamento.codparceiro = v_parceiro.codparceiro AND lancamento.tipoparceiro = v_parceiro.tipoparceiro) \";\r\n\t\t\t$query .= \"INNER join banco on (lancamento.codbanco = banco.codbanco) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS contaparceiro on (v_parceiro.codconta = contaparceiro.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS contabanco on (banco.codconta = contabanco.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN historicopadrao ON (contaparceiro.codhistorico = historicopadrao.codhistorico) \";\r\n\t\t\t$query .= \"WHERE EXTRACT(YEAR FROM lancamento.dtliquid) = '{$this->ano}' AND lancamento.codestabelec = {$this->estabelecimento->getcodestabelec()} \";\r\n\t\t\t$query .= \" AND EXTRACT(MONTH FROM lancamento.dtliquid) = '{$this->mes}' AND (SUBSTR(lancamento.serie,1,3) != 'TRF' OR lancamento.serie is null) \";\r\n\r\n\t\t\t$query .= \"union all \";\r\n\r\n\t\t\t$query .= \"SELECT codlancto AS codlancto, \tlpad(Extract('Day' From lancamento.dtliquid::date)::text,2,'0')|| '/' || lpad(Extract('Month' From lancamento.dtliquid::date)::TEXT, 2, '0') AS data, \";\r\n\t\t\t$query .= \"(SELECT contacontabil FROM planocontas WHERE codconta=(SELECT codconta FROM banco WHERE codbanco=(SELECT codbanco FROM lancamento AS lanc_aux WHERE lanc_aux.dtliquid=lancamento.dtliquid AND serie='TRF' AND lanc_aux.horalog=lancamento.horalog AND pagrec='R' limit 1))) AS debito, \";\r\n\t\t\t$query .= \"(CASE WHEN pagrec='P' THEN contabanco.contacontabil END) AS credito, \";\r\n\t\t\t$query .= \"lancamento.valorparcela AS valorliquido, \";\r\n\t\t\t$query .= \"historicopadrao.descricao AS historicopadrao, \";\r\n\t\t\t$query .= \"lancamento.numnotafis || v_parceiro.nome AS complemento, \";\r\n\t\t\t$query .= \"'' as CCDB, \";\r\n\t\t\t$query .= \"'' AS CCCR, \";\r\n\t\t\t$query .= \"'T' AS pagrec \";\r\n\t\t\t$query .= \"FROM lancamento INNER JOIN v_parceiro ON (lancamento.codparceiro = v_parceiro.codparceiro AND lancamento.tipoparceiro = v_parceiro.tipoparceiro) \";\r\n\t\t\t$query .= \"INNER join banco on (lancamento.codbanco = banco.codbanco) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS contabanco on (banco.codconta = contabanco.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS contaparceiro on (v_parceiro.codconta = contaparceiro.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN historicopadrao ON (contaparceiro.codhistorico = historicopadrao.codhistorico) \";\r\n\t\t\t$query .= \"WHERE SUBSTR(lancamento.serie,1,3)='TRF' AND lancamento.pagrec = 'P' \";\r\n\t\t\t$query .= \" AND EXTRACT(YEAR FROM lancamento.dtliquid) = '{$this->ano}' AND lancamento.codestabelec = {$this->estabelecimento->getcodestabelec()} \";\r\n\t\t\t$query .= \" AND EXTRACT(MONTH FROM lancamento.dtliquid) = '{$this->mes}' \";\r\n\t\t\t$query .= \"GROUP BY 1,2,3,4,5,6,7,8 \";\r\n\r\n\t\t\t$query .= \"union all \";\r\n\r\n\t\t\t$query .= \"SELECT lancamento.codlancto, lpad(Extract('Day' From lancamento.dtliquid::date)::text,2,'0')|| '/' || lpad(Extract('Month' From lancamento.dtliquid::date)::TEXT, 2, '0') AS data, \";\r\n\t\t\t$query .= \"CASE WHEN lancamento.pagrec = 'P' THEN conta_p.contacontabil ELSE conta_r.contacontabil END as debito, contabanco.contacontabil AS credito, \";\r\n\t\t\t$query .= \"lancamento.valorjuros AS valorliquido, CASE WHEN lancamento.pagrec = 'P' THEN h_p.descricao ELSE h_r.descricao END AS historicopadrao, \";\r\n\t\t\t$query .= \"lancamento.numnotafis || v_parceiro.nome AS complemento, '' as CCDB, \";\r\n\t\t\t$query .= \"'' AS CCCR , lancamento.pagrec \";\r\n\t\t\t$query .= \"FROM lancamento \";\r\n\t\t\t$query .= \"INNER JOIN v_parceiro ON (lancamento.codparceiro = v_parceiro.codparceiro AND lancamento.tipoparceiro = v_parceiro.tipoparceiro) \";\r\n\t\t\t$query .= \"INNER join banco on (lancamento.codbanco = banco.codbanco) \";\r\n\t\t\t$query .= \"LEFT JOIN paramplanodecontas ON (paramplanodecontas.codestabelec = lancamento.codestabelec) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS conta_p on (paramplanodecontas.codconta_valorjuros_pag = conta_p.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS conta_r on (paramplanodecontas.codconta_valorjuros_rec = conta_r.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS contabanco on (banco.codconta = contabanco.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN historicopadrao h_p ON (conta_p.codhistorico = h_p.codhistorico) \";\r\n\t\t\t$query .= \"LEFT JOIN historicopadrao h_r ON (conta_r.codhistorico = h_r.codhistorico) \";\r\n\t\t\t$query .= \"WHERE EXTRACT(YEAR FROM lancamento.dtliquid) = '{$this->ano}' AND lancamento.codestabelec = {$this->estabelecimento->getcodestabelec()} AND lancamento.valorjuros > 0 \";\r\n\t\t\t$query .= \" AND EXTRACT(MONTH FROM lancamento.dtliquid) = '{$this->mes}' \";\r\n\r\n\t\t\t$query .= \"union all \";\r\n\r\n\t\t\t$query .= \"SELECT lancamento.codlancto, lpad(Extract('Day' From lancamento.dtliquid::date)::text,2,'0')|| '/' || lpad(Extract('Month' From lancamento.dtliquid::date)::TEXT, 2, '0') AS data, \";\r\n\t\t\t$query .= \"CASE WHEN lancamento.pagrec = 'P' THEN conta_p.contacontabil ELSE conta_r.contacontabil END as debito, contabanco.contacontabil AS credito, \";\r\n\t\t\t$query .= \"lancamento.valordescto AS valorliquido, CASE WHEN lancamento.pagrec = 'P' THEN h_p.descricao ELSE h_r.descricao END AS historicopadrao, \";\r\n\t\t\t$query .= \"lancamento.numnotafis || v_parceiro.nome AS complemento, '' as CCDB, \";\r\n\t\t\t$query .= \"'' AS CCCR , lancamento.pagrec \";\r\n\t\t\t$query .= \"FROM lancamento \";\r\n\t\t\t$query .= \"INNER JOIN v_parceiro ON (lancamento.codparceiro = v_parceiro.codparceiro AND lancamento.tipoparceiro = v_parceiro.tipoparceiro) \";\r\n\t\t\t$query .= \"INNER join banco on (lancamento.codbanco = banco.codbanco) \";\r\n\t\t\t$query .= \"LEFT JOIN paramplanodecontas ON (paramplanodecontas.codestabelec = lancamento.codestabelec) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS conta_p on (paramplanodecontas.codconta_valordescto_pag = conta_p.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS conta_r on (paramplanodecontas.codconta_valordescto_rec = conta_r.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS contabanco on (banco.codconta = contabanco.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN historicopadrao h_p ON (conta_p.codhistorico = h_p.codhistorico) \";\r\n\t\t\t$query .= \"LEFT JOIN historicopadrao h_r ON (conta_r.codhistorico = h_r.codhistorico) \";\r\n\t\t\t$query .= \"WHERE EXTRACT(YEAR FROM lancamento.dtliquid) = '{$this->ano}' AND lancamento.codestabelec = {$this->estabelecimento->getcodestabelec()} AND lancamento.valordescto > 0 \";\r\n\t\t\t$query .= \" AND EXTRACT(MONTH FROM lancamento.dtliquid) = '{$this->mes}' \";\r\n\r\n\t\t\t$query .= \"union all \";\r\n\r\n\t\t\t$query .= \"SELECT lancamento.codlancto, lpad(Extract('Day' From lancamento.dtliquid::date)::text,2,'0')|| '/' || lpad(Extract('Month' From lancamento.dtliquid::date)::TEXT, 2, '0') AS data, \";\r\n\t\t\t$query .= \"CASE WHEN lancamento.pagrec = 'P' THEN conta_p.contacontabil ELSE conta_r.contacontabil END as debito, contabanco.contacontabil AS credito, \";\r\n\t\t\t$query .= \"lancamento.valoracresc AS valorliquido, CASE WHEN lancamento.pagrec = 'P' THEN h_p.descricao ELSE h_r.descricao END AS historicopadrao, \";\r\n\t\t\t$query .= \"lancamento.numnotafis || v_parceiro.nome AS complemento, '' as CCDB, \";\r\n\t\t\t$query .= \"'' AS CCCR , lancamento.pagrec \";\r\n\t\t\t$query .= \"FROM lancamento \";\r\n\t\t\t$query .= \"INNER JOIN v_parceiro ON (lancamento.codparceiro = v_parceiro.codparceiro AND lancamento.tipoparceiro = v_parceiro.tipoparceiro) \";\r\n\t\t\t$query .= \"INNER join banco on (lancamento.codbanco = banco.codbanco) \";\r\n\t\t\t$query .= \"LEFT JOIN paramplanodecontas ON (paramplanodecontas.codestabelec = lancamento.codestabelec) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS conta_p on (paramplanodecontas.codconta_valordescto_pag = conta_p.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS conta_r on (paramplanodecontas.codconta_valordescto_rec = conta_r.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN planocontas AS contabanco on (banco.codconta = contabanco.codconta) \";\r\n\t\t\t$query .= \"LEFT JOIN historicopadrao h_p ON (conta_p.codhistorico = h_p.codhistorico) \";\r\n\t\t\t$query .= \"LEFT JOIN historicopadrao h_r ON (conta_r.codhistorico = h_r.codhistorico) \";\r\n\t\t\t$query .= \"WHERE EXTRACT(YEAR FROM lancamento.dtliquid) = '{$this->ano}' AND lancamento.codestabelec = {$this->estabelecimento->getcodestabelec()} AND lancamento.valoracresc > 0 \";\r\n\t\t\t$query .= \" AND EXTRACT(MONTH FROM lancamento.dtliquid) = '{$this->mes}' \";\r\n\t\t\t$query .= \")AS tmp ORDER BY tmp.data, tmp.complemento, tmp.historicopadrao ASC \";\r\n\r\n\t\t\t$res = $this->con->query($query);\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\r\n\t\t\t$arr_linha_contimatic = array();\r\n\t\t\t$cont = 1;\r\n\t\t\tforeach($arr as $row){\r\n\r\n\t\t\t\t$linha = $this->valor_numerico($cont, 0, 7); //\r\n\t\t\t\t$linha .= $this->valor_texto($row[\"data\"], 5); //\r\n\r\n\t\t\t\tif($row[\"pagrec\"] == \"R\"){\r\n\t\t\t\t\t$linha .= $this->valor_numerico($row[\"credito\"], 0, 7);\r\n\t\t\t\t\t$linha .= $this->valor_numerico($row[\"debito\"], 0, 7);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$linha .= $this->valor_numerico($row[\"debito\"], 0, 7);\r\n\t\t\t\t\t$linha .= $this->valor_numerico($row[\"credito\"], 0, 7);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$linha .= $row[\"valorliquido\"]; //\r\n\t\t\t\t$linha .= $this->valor_numerico($row[\"historicopadrao\"],0,5);\r\n\t\t\t\t$linha .= $this->valor_texto(removespecial($row[\"complemento\"].\" Chave:\".$row[\"codlancto\"]), 200); //\r\n\t\t\t\tif($row[\"pagrec\"] == \"R\"){\r\n\t\t\t\t\t$linha .= $this->valor_texto($row[\"cccr\"], 42);\r\n\t\t\t\t\t$linha .= $this->valor_texto($row[\"ccdb\"], 42);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$linha .= $this->valor_texto($row[\"ccdb\"], 42);\r\n\t\t\t\t\t$linha .= $this->valor_texto($row[\"cccr\"], 42);\r\n\t\t\t\t}\r\n\t\t\t\t$cont++;\r\n\t\t\t\t$arr_linha_contimatic[] = $linha;\r\n\t\t\t}\r\n\r\n\t\t\tif(strlen($this->apelidocontimatic) > 0){\r\n\t\t\t\t$nomearq = $this->estabelecimento->getdircontabil().$this->apelidocontimatic.\".\".\"M\".substr($this->ano,-2);\r\n\t\t\t}else{\r\n\t\t\t\t$nomearq = $this->estabelecimento->getdircontabil().$this->estabelecimento->getnome().\"_financeiro_\".$this->mes.\".txt\";\r\n\t\t\t}\r\n\t\t\t$arquivo = fopen($nomearq, \"w\");\r\n\t\t\tforeach($arr_linha_contimatic as $linha){\r\n\t\t\t\tfwrite($arquivo, $linha.\"\\r\\n\");\r\n\t\t\t}\r\n\t\t\tfclose($arquivo);\r\n\t\t\techo messagebox(\"success\", \"\", \"Arquivo gerado com sucesso!\");\r\n\t\t\techo download($nomearq);\r\n\t\t}\r\n\r\n\t\t// Gera o planod e contas\r\n\t\tif($this->gerar_planodecontas){\r\n\t\t\t//******************************************************************\r\n\t\t\t//\t\t\t\t\t\tRegistro Plano de Contas\r\n\t\t\t//******************************************************************\r\n\t\t\t$where = array();\r\n\t\t\t$this->setprevreal(\"R\");\r\n\t\t\t$this->setstatus(\"L\");\r\n\r\n\t\t\t$query = \"SELECT lancamento.codlancto, lancamento.dtlancto, lancamento.valorliquido, \";\r\n\t\t\t$query .= \"(SELECT numconta FROM planocontas WHERE lancamento.codcontadeb = codconta AND tpconta IN ('D','A')) AS numcontadeb, \";\r\n\t\t\t$query .= \"(SELECT numconta FROM planocontas WHERE lancamento.codcontacred = codconta AND tpconta IN ('C','A')) AS numcontacred, \";\r\n\t\t\t$query .= \"lancamento.numnotafis, lancamento.serie, v_parceiro.nome as parceiro \";\r\n\t\t\t$query .= \"FROM lancamento \";\r\n\t\t\t$query .= \"INNER JOIN v_parceiro ON (lancamento.codparceiro = v_parceiro.codparceiro AND lancamento.tipoparceiro = v_parceiro.tipoparceiro) \";\r\n\t\t\tif(strlen($this->ano) > 0){\r\n\t\t\t\t$where[] = \"EXTRACT(YEAR FROM dtliquid) = '{$this->ano}'\";\r\n\t\t\t}\r\n\t\t\tif(strlen($this->mes) > 0){\r\n\t\t\t\t$where[] = \"EXTRACT(MONTH FROM dtliquid) ='\".$this->mes.\"'\";\r\n\t\t\t}\r\n\t\t\tif(strlen($this->codestabelec) > 0){\r\n\t\t\t\t$where[] = \"codestabelec = \".$this->codestabelec;\r\n\t\t\t}\r\n\t\t\tif(strlen($this->prevreal) > 0){\r\n\t\t\t\t$where[] = \"prevreal = '\".$this->prevreal.\"'\";\r\n\t\t\t}\r\n\t\t\tif(strlen($this->status) > 0){\r\n\t\t\t\t$where[] = \"status = '\".$this->status.\"'\";\r\n\t\t\t}\r\n\t\t\tif(sizeof($where) > 0){\r\n\t\t\t\t$query .= \"WHERE (lancamento.codcontacred > 0 OR lancamento.codcontadeb > 0) AND \".implode(\" AND \", $where).\" \";\r\n\t\t\t}\r\n\t\t\techo $query;\r\n\t\t\t$arr_linha_contimatic = array();\r\n\t\t\t$res = $this->con->query($query);\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\r\n\t\t\tif(count($arr) == 0){\r\n\t\t\t\tdie(messagebox(\"error\", \"\", \"Nenhum lancamento encontrado.\"));\r\n\t\t\t}\r\n\r\n\t\t\tforeach($arr as $row){\r\n\t\t\t\t$linha = $this->valor_numerico($row[\"codlancto\"], 0, 7); // Codigo do lancamento\r\n\t\t\t\t$linha .= $this->valor_data_planodecontas($row[\"dtlancto\"]); // Data do lancamento\r\n\t\t\t\t$linha .= $this->valor_numerico($row[\"numcontadeb\"], 0, 7); // Codigo reduzido da conta a ser debitada\r\n\t\t\t\t$linha .= $this->valor_numerico($row[\"numcontacred\"], 0, 7); // Codigo reduzido da conta a ser creditada\r\n\t\t\t\t$linha .= $this->valor_numerico($row[\"valorliquido\"], 2, 17); // Valor\r\n\t\t\t\t$linha .= $this->valor_numerico($row[\"codcontacred\"], 0, 5); // Historico padrao\r\n\t\t\t\t$linha .= $this->valor_texto(\"{$row[\"numnotafis\"]} {$row[\"serie\"]} - {$row[\"parceiro\"]}\", 200); // Complemento\r\n\t\t\t\t$arr_linha_contimatic[] = $linha;\r\n\t\t\t}\r\n\r\n\t\t\t$nomearq = $this->estabelecimento->getdircontabil().$this->estabelecimento->getnome().$this->mes.\".txt\";\r\n\t\t\t$arquivo = fopen($nomearq, \"w\");\r\n\t\t\tforeach($arr_linha_contimatic as $linha){\r\n\t\t\t\tfwrite($arquivo, $linha.\"\\r\\n\");\r\n\t\t\t}\r\n\t\t\tfclose($arquivo);\r\n\t\t\techo download($nomearq);\r\n\t\t\t//******************************************************************\r\n\t\t}\r\n\r\n\t\t// Busca os mapas resumo\r\n\t\t$this->arr_maparesumo = array();\r\n\t\tif($this->gerar_cupomfiscal){\r\n\t\t\tsetprogress(0, \"Carregando mapas resumo\", TRUE);\r\n\t\t\t$res = $this->con->query(\"SELECT codmaparesumo FROM maparesumo WHERE codestabelec = \".$this->estabelecimento->getcodestabelec().\" AND EXTRACT(YEAR FROM dtmovto) = \".$this->ano.\" AND EXTRACT(MONTH FROM dtmovto) = \".$this->mes.\" ORDER BY dtmovto, caixa\");\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\t\t\t$arr_codmaparesumo = array();\r\n\t\t\tforeach($arr as $i => $row){\r\n\t\t\t\t$arr_codmaparesumo[] = $row[\"codmaparesumo\"];\r\n\t\t\t}\r\n\t\t\t$this->arr_maparesumo = object_array_key(objectbytable(\"maparesumo\", NULL, $this->con), $arr_codmaparesumo);\r\n\t\t}\r\n\r\n\t\t// Busca os impostos dos mapas resumo\r\n\t\t$this->arr_maparesumoimposto = array();\r\n\t\t$i = 1;\r\n\t\t$n = sizeof($this->arr_maparesumo);\r\n\t\tforeach($this->arr_maparesumo as $maparesumo){\r\n\t\t\tsetprogress(($i / $n * 100), \"Carregando impostos dos mapas resumo: \".$i.\" de \".$n);\r\n\t\t\t$query = \"SELECT tptribicms, aliqicms, SUM(totalliquido) AS totalliquido, SUM(totalicms) AS totalicms \";\r\n\t\t\t$query .= \"FROM maparesumoimposto \";\r\n\t\t\t$query .= \"WHERE codmaparesumo = \".$maparesumo->getcodmaparesumo().\" \";\r\n\t\t\t$query .= \"\tAND totalliquido > 0 \";\r\n\t\t\t$query .= \"GROUP BY tptribicms, aliqicms \";\r\n\t\t\t$query .= \"ORDER BY tptribicms, aliqicms \";\r\n\t\t\t$res = $this->con->query($query);\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\t\t\tforeach($arr as $row){\r\n\t\t\t\t$maparesumoimposto = objectbytable(\"maparesumoimposto\", NULL, $this->con);\r\n\t\t\t\t$maparesumoimposto->setcodmaparesumo($maparesumo->getcodmaparesumo());\r\n\t\t\t\t$maparesumoimposto->settptribicms($row[\"tptribicms\"]);\r\n\t\t\t\t$maparesumoimposto->setaliqicms($row[\"aliqicms\"]);\r\n\t\t\t\t$maparesumoimposto->settotalliquido($row[\"totalliquido\"]);\r\n\t\t\t\t$maparesumoimposto->settotalicms($row[\"totalicms\"]);\r\n\t\t\t\t$this->arr_maparesumoimposto[$maparesumo->getcodmaparesumo()][] = $maparesumoimposto;\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\r\n\t\t// Busca operacoes de nota fiscal\r\n\t\t$this->arr_operacaonota = array();\r\n\t\tsetprogress(0, \"Buscando operacoes de nota fiscal\", TRUE);\r\n\t\t$operacaonota = objectbytable(\"operacaonota\", NULL, $this->con);\r\n\t\t$arr_operacaonota = object_array($operacaonota);\r\n\t\tforeach($arr_operacaonota as $operacaonota){\r\n\t\t\t$this->arr_operacaonota[$operacaonota->getoperacao()] = $operacaonota;\r\n\t\t}\r\n\r\n\t\t// Busca as notas fiscais\r\n\t\t$this->arr_notafiscal = array();\r\n\t\tif($this->gerar_notafiscal){\r\n\t\t\tsetprogress(0, \"Carregando notas fiscais\", TRUE);\r\n\t\t\t$res = $this->con->query(\"SELECT idnotafiscal FROM notafiscal WHERE codestabelec = \".$this->estabelecimento->getcodestabelec().\" AND EXTRACT(YEAR FROM dtentrega) = \".$this->ano.\" AND EXTRACT(MONTH FROM dtentrega) = \".$this->mes);\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\t\t\t$arr_idnotafiscal = array();\r\n\t\t\tforeach($arr as $i => $row){\r\n\t\t\t\t$arr_idnotafiscal[] = $row[\"idnotafiscal\"];\r\n\t\t\t}\r\n\t\t\t$this->arr_notafiscal = object_array_key(objectbytable(\"notafiscal\", NULL, $this->con), $arr_idnotafiscal);\r\n\t\t}\r\n\r\n\t\t// Busca os impostos das notas fiscais\r\n\t\t$this->arr_notafiscalimposto = array();\r\n\t\t$i = 1;\r\n\t\t$n = sizeof($this->arr_notafiscal);\r\n\t\tforeach($this->arr_notafiscal as $notafiscal){\r\n\t\t\tsetprogress(($i / $n * 100), \"Carregando impostos das notas fiscais: \".$i.\" de \".$n);\r\n\t\t\t$this->arr_notafiscalimposto[$notafiscal->getidnotafiscal()] = array();\r\n\t\t\t$query = \"SELECT idnotafiscal, aliquota, SUM(base) AS base, SUM(valorimposto) AS valorimposto, SUM(reducao) AS reducao, SUM(isento) AS isento \";\r\n\t\t\t$query .= \"FROM notafiscalimposto \";\r\n\t\t\t$query .= \"WHERE idnotafiscal = \".$notafiscal->getidnotafiscal().\" \";\r\n\t\t\t$query .= \"\tAND tipoimposto LIKE 'ICMS%' \";\r\n\t\t\t$query .= \"\tAND tipoimposto != 'ICMS_F' \";\r\n\t\t\t$query .= \"GROUP BY idnotafiscal, aliquota \";\r\n\t\t\t$query .= \"ORDER BY aliquota \";\r\n\t\t\t$res = $this->con->query($query);\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\t\t\tforeach($arr as $row){\r\n\t\t\t\t$notafiscalimposto = objectbytable(\"notafiscalimposto\", NULL, $this->con);\r\n\t\t\t\t$notafiscalimposto->setidnotafiscal($notafiscal->getidnotafiscal());\r\n\t\t\t\t$notafiscalimposto->settipoimposto(\"ICMS\");\r\n\t\t\t\t$notafiscalimposto->setaliquota($row[\"imposto\"]);\r\n\t\t\t\t$notafiscalimposto->setbase($row[\"base\"]);\r\n\t\t\t\t$notafiscalimposto->setvalorimposto($row[\"valorimposto\"]);\r\n\t\t\t\t$notafiscalimposto->setreducao($row[\"reducao\"]);\r\n\t\t\t\t$notafiscalimposto->setisento($row[\"isento\"]);\r\n\t\t\t\t$this->arr_notafiscalimposto[$notafiscal->getidnotafiscal()][] = $notafiscalimposto;\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\t// Busca os cliente\r\n\t\t$this->arr_cliente = array();\r\n\t\tsetprogress(0, \"Buscando clientes\", TRUE);\r\n\t\t$arr_codcliente = array();\r\n\t\tforeach($this->arr_notafiscal as $notafiscal){\r\n\t\t\t$operacaonota = $this->arr_operacaonota[$notafiscal->getoperacao()];\r\n\t\t\tif($operacaonota->getparceiro() == \"C\"){\r\n\t\t\t\t$arr_codcliente[] = $notafiscal->getcodparceiro();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$arr_codcliente = array_merge(array_unique($arr_codcliente));\r\n\t\tforeach($arr_codcliente as $i => $codcliente){\r\n\t\t\tsetprogress((($i + 1) / sizeof($arr_codcliente) * 100), \"Carregando clientes: \".($i + 1).\" de \".sizeof($arr_codcliente));\r\n\t\t\t$this->arr_cliente[$codcliente] = objectbytable(\"cliente\", $codcliente, $this->con);\r\n\t\t}\r\n\r\n\t\t// Busca os estabelecimentos\r\n\t\t$this->arr_estabelecimento = array();\r\n\t\tsetprogress(0, \"Buscando estabelecimentos\", TRUE);\r\n\t\t$arr_codestabelec = array();\r\n\t\tforeach($this->arr_notafiscal as $notafiscal){\r\n\t\t\t$operacaonota = $this->arr_operacaonota[$notafiscal->getoperacao()];\r\n\t\t\tif($operacaonota->getparceiro() == \"E\"){\r\n\t\t\t\t$arr_codestabelec[] = $notafiscal->getcodparceiro();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$arr_codestabelec = array_merge(array_unique($arr_codestabelec));\r\n\t\tforeach($arr_codestabelec as $i => $codestabelec){\r\n\t\t\tsetprogress((($i + 1) / sizeof($arr_codestabelec) * 100), \"Carregando estabelecimentos: \".($i + 1).\" de \".sizeof($arr_codestabelec));\r\n\t\t\t$this->arr_estabelecimento[$codestabelec] = objectbytable(\"estabelecimento\", $codestabelec, $this->con);\r\n\t\t}\r\n\r\n\t\t// Busca os fornecedores\r\n\t\t$this->arr_fornecedor = array();\r\n\t\tsetprogress(0, \"Buscando fornecedores\", TRUE);\r\n\t\t$arr_codfornec = array();\r\n\t\tforeach($this->arr_notafiscal as $notafiscal){\r\n\t\t\t$operacaonota = $this->arr_operacaonota[$notafiscal->getoperacao()];\r\n\t\t\tif($operacaonota->getparceiro() == \"F\"){\r\n\t\t\t\t$arr_codfornec[] = $notafiscal->getcodparceiro();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$arr_codfornec = array_merge(array_unique($arr_codfornec));\r\n\t\tforeach($arr_codfornec as $i => $codfornec){\r\n\t\t\tsetprogress((($i + 1) / sizeof($arr_codfornec) * 100), \"Carregando fornecedores: \".($i + 1).\" de \".sizeof($arr_codfornec));\r\n\t\t\t$this->arr_fornecedor[$codfornec] = objectbytable(\"fornecedor\", $codfornec, $this->con);\r\n\t\t}\r\n\r\n\t\t// Busca as cidades\r\n\t\t$this->arr_cidade = array();\r\n\t\tsetprogress(0, \"Buscando cidades\", TRUE);\r\n\t\t$arr_codcidade = array();\r\n\t\t$arr_codcidade[] = $this->estabelecimento->getcodcidade();\r\n\t\tforeach($this->arr_cliente as $cliente){\r\n\t\t\t$arr_codcidade[] = $cliente->getcodcidaderes();\r\n\t\t}\r\n\t\tforeach($this->arr_estabelecimento as $estabelecimento){\r\n\t\t\t$arr_codcidade[] = $estabelecimento->getcodcidade();\r\n\t\t}\r\n\t\tforeach($this->arr_fornecedor as $fornecedor){\r\n\t\t\t$arr_codcidade[] = $fornecedor->getcodcidade();\r\n\t\t}\r\n\t\t$arr_codcidade = array_merge(array_unique($arr_codcidade));\r\n\t\tforeach($arr_codcidade as $i => $codcidade){\r\n\t\t\tsetprogress((($i + 1) / sizeof($arr_codcidade) * 100), \"Carregando cidades: \".($i + 1).\" de \".sizeof($arr_codcidade));\r\n\t\t\t$this->arr_cidade[$codcidade] = objectbytable(\"cidade\", $codcidade, $this->con);\r\n\t\t}\r\n\r\n\t\tsetprogress(0, \"Gerando arquivo\", TRUE);\r\n\t\t$arr_registro = array();\r\n\t\tforeach($this->arr_maparesumo as $maparesumo){\r\n\t\t\t$arr_registro[] = $this->registro_r1($maparesumo, FALSE);\r\n\t\t\t$arr_registro[] = $this->registro_r1($maparesumo, TRUE);\r\n\t\t}\r\n\t\tforeach($this->arr_notafiscal as $notafiscal){\r\n\t\t\t$arr_registro[] = $this->registro_r1($notafiscal);\r\n\t\t}\r\n\r\n\t\t$arr_linha_e = array(); // Linhas para criar arquivo de entrada\r\n\t\t$arr_linha_s = array(); // Linhas para criar arquivo de saida\r\n\t\tforeach($arr_registro as $registro){\r\n\t\t\tif(!is_null($registro)){\r\n\t\t\t\t$linha = implode(\"|\", $registro);\r\n\t\t\t\tswitch($registro[\"02\"]){\r\n\t\t\t\t\tcase \"E\": $arr_linha_e[] = $linha;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"S\": $arr_linha_s[] = $linha;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->criar_arquivo($arr_linha_e, \"E\");\r\n\t\t$this->criar_arquivo($arr_linha_s, \"S\");\r\n\r\n\t\techo messagebox(\"success\", \"\", \"Arquivo gerado com sucesso!\");\r\n\t}", "function TablaVentasDiariasAdmin()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO DE VENTAS GENERAL DEL DIA '.date(\"d-m-Y\"),0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CAJA',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'SUBTOTAL IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarVentasDiarias();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$PagototalCompras=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago'];\n $PagototalCompras+=$reg[$i]['totalpago2']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"nrocaja\"]),1,0,'C');\n\t$this->CellFitSpace(60,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(15,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(15,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n\t$UtilidadBruto= $Pagototal-$PagototalCompras;\n\t$MargenBruto = ( $UtilidadBruto == '' ? \"0.00\" : number_format($UtilidadBruto/$PagototalCompras, 2, '.', ','));\n\t\n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n\t$this->Cell(35,5,'',0,0,'C');\n\t$this->Cell(15,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(30,5,'',0,0,'C');\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(22,5,'',0,0,'C');\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(37,5,\"TOTAL GANANCIAS\",1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(30,5,utf8_decode(number_format($MargenBruto*100, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "public function EncabezadoFBM1() {\t\r\n\t\t$fs = 10;\r\n\t\t$ancho = 256;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t\r\n\t\t$text = 'Página '.$this->PageNo().' de {nb}';\r\n\t\t$this->SetFont('Arial','',8);\r\n\t\t$this->Celda(100, 6, 'C.M.S.= U.B.M. - 07(09-08-2010)', 0, 0, '');\r\n\t\t\t\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->Celda(156, 6, $text, 0, 1, 'R', true);\r\n\t\t$y1 = $this->getY();\r\n\t\t$x1 = $this->getX();\r\n\t\t$this->Celda(80, 23, '', 1, 0, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$x2 = $this->getX();\r\n\t\t$this->Celda($ancho-80, 23, '', 1, 1, '', true);\r\n\t\t$this->setY($y1);\r\n\t\t$this->setX($x1);\r\n\t\t$this->Image( 'images/logo_medium.png', 21, 17, 68 );\r\n\t\t$this->setY($y2+5);\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Formato( 'Helvetica', 'B', 11 );\r\n\t\t$this->Celda($ancho-84, 6, 'FORMULARIO B.M.1', 0, 1, 'C', true);\r\n\t\t$this->Formato( 'Helvetica', '', 9 );\r\n\t\t$this->setX($x2+1);\r\n\t\t$this->Celda($ancho-84, 8, 'INVENTARIO DE BIENES MUEBLES', 0, 1, 'C', true);\r\n\t\t\r\n\t\t$fs = 8;\r\n\t\t$this->SetFont('Arial','',$fs);\r\n\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t$this->SetDrawColor(0, 0, 0);\r\n\t\t$this->Ln(6);\r\n\t\t\r\n\t\t$y = $this->getY();\r\n\t\t$x = $this->getX();\r\n\t\t$this->Celda(256, 28, '', 1, 1, '', true);\r\n\t\t$y2 = $this->getY();\r\n\t\t$this->setY($y+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(30, 5, '1. Entidad Propietaria: ', 0, 0, '', true);\r\n\t\t$this->Celda(215, 5, 'MUNICIPIO SUCRE', 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '2. Servicio: ', 0, 0, '', true);\r\n\t\t$this->Celda(225, 5, $this->capitalizar($this->header['servicio']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(50, 5, '3. Unidad de Trabajo o Dependencia: ', 0, 0, '', true);\r\n\t\t$this->Celda(195, 5, $this->capitalizar($this->header['dependencia']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(20, 5, '4. Estado: ', 0, 0, '', true);\r\n\t\t$this->Celda(120, 5, $this->capitalizar($this->header['estado']), 'B', 0, '', true);\r\n\t\t$this->Celda(20, 5, '5. Municipio: ', 0, 0, '', true);\r\n\t\t$this->Celda(85, 5, $this->capitalizar($this->header['municipio']), 'B', 1, '', true);\r\n\t\t$yt = $this->getY();\r\n\t\t$this->setX($yt+1);\r\n\t\t$this->setX($x+1);\r\n\t\t$this->Celda(30, 5, '6. Direccion o Lugar: ', 0, 0, '', true);\r\n\t\t$this->Celda(110, 5, $this->capitalizar($this->header['direccion']), 'B', 0, '', true);\r\n\t\t$this->Celda(20, 5, '7. Fecha: ', 0, 0, '', true);\r\n\t\t$this->Celda(85, 5, $this->capitalizar($this->header['fecha']), 'B', 0, '', true);\r\n\t\t$this->setY($y2);\r\n\t}", "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 }", "function crea_form_input2($arcampi,$arcampi2,$arcampi3,$script,$bottone_submit =\"salva\",$intestazione=\"Inserimento nuovo record\",$arcampi4=\"\")\n{\n?>\n <head>\n<?\n include(\"config.php\");\n echo \"<link rel=stylesheet type=text/css href=\\\"$fogliostile\\\">\";\n?>\n <script language=javascript>\n function cambia_sfondo(el,focus_o_blur)\n {\n if (focus_o_blur == 1)\n {\n el.style.fontfamily = \"Arial\";\n el.style.background=\"#99ccff\";\n \n }\n else\n {\n el.style.fontfamily = \"Arial\";\n el.style.background=\"#f0f0f0\";\n \n }\n }\n </script>\n </head>\n <?\n echo \"<h3 align=center>$intestazione</h3>\";\n form_crea(\"datainput\",1,$script);\n echo \"<table id=dataentry bgcolor=#daab59 align=center>\";\n $primavoceselect = true;\n while(list($key,$value) = each($arcampi))\n {\n if ($arcampi2[$key] == \"select\")\n {\n \t echo \"<tr><td><b>\" . (($arcampi4 == \"\") ? \"$key:\" : $arcampi4[$key]) . \"</b></td><td><select name=$key onfocus=\\\"cambia_sfondo(this,1)\\\" onblur=\\\"cambia_sfondo(this,2)\\\">\";\n\t for($i = 0;$i < count($arcampi[$key]);$i++)\n\t if ($primavoceselect == true)\n\t {\n\t echo \"<option selected>\" . $arcampi[$key][$i] . \"</option>\";\n\t\t $primavoceselect = false;\n\t\t}\n\t else echo \"<option>\" . $arcampi[$key][$i] . \"</option>\";\n\t echo \"</select></td></tr>\";\n }\n if ($arcampi2[$key] == \"textarea\")\n {\n\t\techo \"<tr><td><b>\" . (($arcampi4 == \"\") ? \"$key:\" : $arcampi4[$key]) . \"</b></td><td><textarea name=$key rows=4 cols=65 onfocus=\\\"cambia_sfondo(this,1)\\\" onblur=\\\"cambia_sfondo(this,2)\\\">$arcampi[$key]\";\n\t\techo \"</textarea></td></tr>\";\n\t}\n\tif (($arcampi2[$key] == \"hidden\"))\n\t echo \"<tr><td><b>&nbsp;</b></td><td><input type=$arcampi2[$key] name=$key size=$arcampi3[$key] maxlength=$arcampi3[$key] onfocus=\\\"cambia_sfondo(this,1)\\\" onblur=\\\"cambia_sfondo(this,2)\\\" value=\\\"$arcampi[$key]\\\"></td></tr>\";\n\tif (($arcampi2[$key] != \"textarea\") & ($arcampi2[$key] != \"select\") & ($arcampi2[$key] !=\"hidden\"))\n\t echo \"<tr><td><b>\" . (($arcampi4 == \"\") ? \"$key:\" : $arcampi4[$key]) . \"</b></td><td><input type=$arcampi2[$key] name=$key size=$arcampi3[$key] maxlength=$arcampi3[$key] onfocus=\\\"cambia_sfondo(this,1)\\\" onblur=\\\"cambia_sfondo(this,2)\\\" value=\\\"$arcampi[$key]\\\"></td></tr>\";\n\n }\n echo \"<tr><td colspan=2 align=center>\";\n form_invia($bottone_submit,$bottone_submit);\n echo \"</td></tr>\";\n echo \"</table>\";\n form_chiudi();\t\n}", "function TablaVentasCajas()\n {\n $ca = new Login(); \n\t$ca = $ca->CajerosPorId();\t\n\t\n\t//Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\");\n\t$this->SetXY(10, 15);\n\t$this->SetFont('courier','B',18);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(120,8,'',0,0,'');\n\t$this->Cell(180,8,'LISTADO DE VENTAS DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"],0,1,'C');\n \n\t$this->Cell(150,8,'',0,0,'');\n $this->Cell(120,8,'Y CAJA N°.'.$ca[0]['nrocaja'],0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO VENTA',1,0,'C', True);\n\t$this->CellFitSpace(70,8,'CLIENTES',1,0,'C', True);\n\t$this->CellFitSpace(17,8,'STATUS',1,0,'C', True);\n\t$this->CellFitSpace(35,8,'FECHA VENTA',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'ARTIC',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT CON IVA',1,0,'C', True);\n\t$this->CellFitSpace(28,8,'SUBTOT IVA 0%',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'TOTAL IVA',1,0,'C', True);\n\t$this->CellFitSpace(12,8,'DESC',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'TOT DESC',1,0,'C', True);\n\t$this->CellFitSpace(30,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->BuscarVentasCajas();\n\t$totalarticulos=0;\n\t$Subtotalconiva=0;\n\t$Subtotalsiniva=0;\n\t$Totaliva=0;\n\t$Totaldescuento=0;\n\t$pagoDescuento=0;\n\t$Pagototal=0;\n\t$a=1;\n\t\n for($i=0;$i<sizeof($reg);$i++){\n\t\n $totalarticulos+=$reg[$i]['articulos'];\n $Subtotalconiva+=$reg[$i]['subtotalivasive'];\n $Subtotalsiniva+=$reg[$i]['subtotalivanove'];\n\t$Totaliva+=$reg[$i]['totalivave']; \n\t$Totaldescuento+=$reg[$i]['totaldescuentove']; \n\t$Pagototal+=$reg[$i]['totalpago']; \n\t\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codventa\"],1,0,'C');\n\t$this->CellFitSpace(70,5,utf8_decode($reg[$i][\"nomcliente\"]),1,0,'C');\n\tif($reg[$i]['fechavencecredito']== '0000-00-00') { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] >= date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode($reg[$i]['statusventa']),1,0,'C');\n\t} elseif($reg[$i]['fechavencecredito'] < date(\"Y-m-d\")) { \n\t$this->CellFitSpace(17, 5,utf8_decode(\"VENCIDA\"),1,0,'C');\n\t}\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaventa']))),1,0,'C');\n\t$this->CellFitSpace(15,5,utf8_decode($reg[$i][\"articulos\"]),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivasive'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode(number_format($reg[$i]['subtotalivanove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['ivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totalivave'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(12,5,utf8_decode(number_format($reg[$i]['descuentove'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(20,5,utf8_decode(number_format($reg[$i]['totaldescuentove'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(30,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',0,0,'C');\n $this->Cell(32,5,'',0,0,'C');\t\t\n $this->Cell(70,5,'',0,0,'C');\t\t\n $this->Cell(17,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n\n $this->Cell(35,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n\t$this->Cell(15,5,utf8_decode($totalarticulos),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalconiva, 2, '.', ',')),1,0,'C');\n $this->Cell(28,5,utf8_decode(number_format($Subtotalsiniva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($Totaliva, 2, '.', ',')),1,0,'C');\n $this->Cell(12,5,\"\",1,0,'C');\n $this->Cell(20,5,utf8_decode(number_format($Totaldescuento, 2, '.', ',')),1,0,'C');\n $this->Cell(30,5,utf8_decode(number_format($Pagototal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "function Dibujar_Tabla_Comp_Cur($VectorIdioma,$row,$Mensajes,$esAdmin = 1, $esAnulado=0)\n{\n //lo que cambia es que los administradores podrán ver tanto archivos pdf como arb. Los Usuarios no, solo los pdf.\n\n echo '<table width=\"90%\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"'.Devolver_Color($row[4]).'\" ';\n if ($esAnulado)\t{\n\t echo ' border=\"1\" ';\n\t echo \" bordercolor='#33CCFF' \";\n\t}\n\telse\n\t\t{echo ' border=\"0\"> ';}\n echo ' <tr bgcolor=\"#ECECEC\"><td colspan=\"2\" align=\"center\" valign=\"middle\">\n\t<table width=\"97%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" >\n\t<tr valign=\"bottom\"> <!-- tipo y Id -->\n\t <td colspan=\"1\" align=left>\n\t <span class=\"style49\">\n\t\t <strong class=\"style29 style40\">'.$Mensajes[\"ec-5\"].\":\".'</strong> ';\n echo Devolver_Tipo_Solicitud($VectorIdioma,$row[0],0);\n echo ' </span></td> \n <td align=right colspan=\"3\"><span class=\"style52\">'.$Mensajes[\"et-2\"].'</span>';\n\n if ($esAdmin==1)\n {\n echo '<span class=\"style49\"> <a href=\"manpedadmc.php?Codigo='.$row[1].'\">'.$row[1].'</a></span>&nbsp;';\n }\n else\n {\n\t echo '<span class=\"style49\"> '.$row[1].'</span>&nbsp;';\n\t } \n if ($esAdmin==1)\n {\n \n $valor=devolverFormaDePago($row[50]);\n\n echo '</td>\n </tr>';\n // aca iria con una funcion que le devulva el valor de de la forma de pago\n switch ($valor)\n {\n case 0:\n {\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"3\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].' </strong>\n </span>\n '.$row[2].\", \".$row[3].'<br><br></td></tr>';\n break;\n }\t \n case 4: \n {\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"3\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].' </strong>\n </span>\n '.$row[2].\", \".$row[3].'<img src=\"../images/admin.gif\">'.$row[53].'<br><br></td>\n </tr>';\n break;\n}\n case 1:\n {\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"4\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].' </strong>\n </span>\n '.$row[2].\", \".$row[3].'&nbsp;&nbsp;<img src=\"../images/admin02.gif\">'.$row[53].'<br><br></td>\n </tr>';\nbreak;\n}\n case 2:\n {\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"3\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].' </strong>\n </span>\n '.$row[2].\", \".$row[3].'<img src=\"../images/admin03.gif\">'.$row[53].'<br><br></td>\n </tr>';\n break;\n }\n }// de switch\n}\nelse\n{\n echo '<tr valign=\"top\"> <!-- ahora el usuario -->\n <td colspan=\"3\" align=left><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-3\"].'</strong>\n </span>\n '.$row[2].\", \".$row[3].'&nbsp;&nbsp;&nbsp;'.$row[53].'<br><br></td>\n </tr>';\n\n}\n echo'<tr valign=\"bottom\"> <!-- datos-->\n <td colspan=\"4\" width=\"612\" align=left ><span class=\"style49\">\n <span class=\"style29\"><strong>'.$Mensajes[\"et-4\"].'</strong>\t</span>';\n echo Devolver_Descriptivo_Material($row[4],$row,0,0).'</span> \n </td>'; //Titulo revista, vol, anio,...\n echo '</tr>\n<tr valign=\"bottom\"> <!-- Fecha de solicitud-->\n <td align=left colspan=\"3\" width=\"612\"><span class=\"style49\"><span class=\"style52\">'.$Mensajes[\"et-5\"].'</span> '.$row[35].'</span></td>\n \n</tr> <tr valign=top>';\n\necho '<td align=left width=\"240\"><span class=\"style52\">'.$Mensajes[\"et-7\"].'</span> <span class=\"style49\">'.Devolver_Estado($VectorIdioma,$row[36],0).'</span></td>';\n\nif ($row[44]==1)\n { echo \"<td align=left width=39> <img border=0 alt='Observaciones' src='../images/obs.gif'> </td>\"; }\n else\n echo \"<td align=left width=39> &nbsp; </td>\"; \n\necho ' <td colspan=\"2\" width=\"446\"align=right> <span class=\"style49\"> <span class=\"style52\">'.$Mensajes[\"et-6\"].'</span> ';\n if (strlen($row[37])>0)\n { echo $row[37].\", \".$row[38].\"</span></td>\"; } //operador\n\n\n\n\n//$Mensajes[et-2] dice Id Pedido.\n//Por lo tanto, $row[1] contiene el id del pedido.\n//Con éste id puedo buscar los archivos que necesito\n//Buscar archivo(s) para el pedido\n\n$unArchivo = array();\n$list = array();\nglobal $Id_usuario;\nglobal $Rol;\n\n$list=devolverArchivosDePedido($row[1],$esAdmin);\n\nif ($list) {\n echo \"<td colspan='3' align=center><span align='center' class='style49 style50'>\";\n for ($i=0;$i<count($list);$i++) {\n $unArchivo = $list[$i];\n\n if ($esAdmin==1) //los administradores siempre pueden bajarse archivos\n //farchivos/download.php?Id_Usuario=\".$Id_Usuario.\"&Id_Archivo=\".$row[0].\n\n\t if ($Rol==2) //es bibliotecario. No puede bajarse los archivos, solo puede verlos\n \n\t\t echo \" <img alt='No tiene permisos para bajarse el archivo' border=0 src='../images/pdf.gif' width='20'> \";\n else\n echo \" <a href='farchivos/download.php?adm=1&Id_Pedido=\".$row[1].\"&Id_Usuario=\".$Id_usuario.\"&Id_Archivo=\".$unArchivo['Codigo'].\"'>\n <img alt='Archivo disponible para bajar' border=0 src='../images/pdf.gif' width='20'> </a> \";\n else //si es usuario comun, hay que ver bajo que condiciones puede bajarse el archivo\n {\n\t \n\t if ($esAdmin==2)\n\t {\n\t\t $autorizado = puedeBajarseElArchivo($unArchivo,$row[1]);\n switch ($autorizado)\n\t\t\t{\n\t\t\t\tcase 1: //puede bajarse sin problemas\n\t\t\t\t echo \" <a href='farchivos/download.php?Id_Pedido=\".$row[1].\"&Id_Usuario=\".$Id_usuario.\"&Id_Archivo=\".$unArchivo['Codigo'].\"'>\n <img src='../images/pdf.gif' alt='Archivo disponible para bajar' border=0 width='20' height='20'> </a> \";\n\t\t\t\t break;\n\t\t\t\tcase 0: //el archivo no está disponible\n\t\t\t\t echo \" <img alt='Archivo ya bajado' border=0 src='../images/pdf-cacelled.gif' width='20'> \";\n\t\t\t\t break;\n\t\t\t\tcase -1: //el archivo está disponible, pero el usuario posee problemas (ej. cta. cte. en rojo)\n\t\t\t\t echo \" <img alt='Archivo no disponible para bajar' border=0 src='../images/pdf.gif' width='20'> \";\n\t\t\t\t break;\n\t\t\t} //switch\n }//del id\n else\n {\t\t\t echo \" <img alt='Archivo no disponible para bajar' border=0 src='../images/pdf.gif' width='20'> \";}\n } //else\n } //for\n echo \"</span> </td> </tr> </table>\";\n } //if\n else\n { echo \"</tr> </table>\"; //no hago nada, no había archivos para ese pedido\n }\n//Fin buscar archivo(s) para el pedido\n\n}", "function TablaServiciosDiariasVendedor()\n {\t\n\t\n\t//Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\");\n\t$this->SetXY(10, 15);\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(75,6,'',0,0,'');\n\t$this->Cell(120,6,'LISTADO DE SERVICIOS DEL DIA '.date(\"Y-m-d\"),0,1,'C');\n \n\t$this->Cell(75,6,'',0,0,'');\n $this->Cell(120,6,'DE CAJA N°.'.base64_decode($_GET['caja']),0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(10,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'CÓDIGO SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(32,8,'FECHA SERVICIO',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'SERVICIOS',1,0,'C', True);\n\t$this->CellFitSpace(25,8,'SUBTOTAL',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'IVA',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'DESCUENTO',1,0,'C', True);\n\t$this->CellFitSpace(26,8,'TOTAL PAGO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarServiciosDiarias();\n\t$serviciosTotal=0;\n\t$pagoSubtotal=0;\n\t$pagoIva=0;\n\t$pagoDescuento=0;\n\t$pagoTotal=0;\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n $serviciosTotal+=$reg[$i]['cantidad'];\n\t$pagoSubtotal+=$reg[$i]['subtotal']; \n\t$pagoIva+=$reg[$i]['totaliva']; \n\t$pagoDescuento+=$reg[$i]['totaldescuento']; \n\t$pagoTotal+=$reg[$i]['totalpago'];\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(32,5,$reg[$i][\"codservicio\"],1,0,'C');\n\t$this->CellFitSpace(32,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fechaservicio']))),1,0,'C');\n\t$this->CellFitSpace(22,5,utf8_decode($reg[$i][\"cantidad\"]),1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['subtotal'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaliva'], 2, '.', ',')),1,0,'C');\n $this->CellFitSpace(22,5,utf8_decode(number_format($reg[$i]['totaldescuento'], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(26,5,utf8_decode(number_format($reg[$i]['totalpago'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(10,5,'',1,0,'C');\n $this->Cell(32,5,'',1,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(32,5,'TOTAL GENERAL',1,0,'C', True);\n $this->SetFont('courier','B',8);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(22,5,utf8_decode($serviciosTotal),1,0,'C');\n $this->Cell(25,5,utf8_decode(number_format($pagoSubtotal, 2, '.', ',')),1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($pagoIva, 2, '.', ',')),1,0,'C');\n $this->Cell(22,5,utf8_decode(number_format($pagoDescuento, 2, '.', ',')),1,0,'C'); \n $this->CellFitSpace(26,5,utf8_decode(number_format($pagoTotal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n \n $this->Ln(15); \n $this->SetFont('courier','B',9);\n $this->Cell(190,0,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]).' RECIBIDO POR:___________________________','',1,'C');\n $this->Ln(4);\n }", "function fechas_entregas($id_licitacion){\r\n global $bgcolor3,$html_root;\r\n\r\n $sql=\" select * from (\r\n select id_subir,nro_orden,vence_oc from\r\n subido_lic_oc where id_licitacion=$id_licitacion and tipo_muestras=0\r\n ) as sl\r\n left join\r\n (\r\n select sum(cantidad*precio) as total,id_subir from renglones_oc\r\n group by id_subir\r\n ) as total\r\n using (id_subir)\r\n order by vence_oc ASC\r\n \";\r\n $res=sql($sql) or fin_pagina();\r\n\r\n $sql=\"select simbolo from licitacion join moneda using(id_moneda)\r\n where id_licitacion=$id_licitacion\";\r\n $moneda=sql($sql) or fin_pagina();\r\n\r\n if ($res->recordcount()>0) {\r\n //es que hay ordenes\r\n\r\n ?>\r\n <table width=100% align=center border=1 cellpading=0 cellspacing=0 bordercolor='<?=$bgcolor3?>'>\r\n <tr>\r\n <td colspan=4 align=Center><b>Ordenes de Compra</b></td>\r\n </tr>\r\n <tr>\r\n <td width=40% align=center><b>Orden de Compra</b></td>\r\n <td align=center><b>Fecha de Entrega</b></td>\r\n <td>&nbsp;</td>\r\n <td align=center><b>Montos</b></td>\r\n </tr>\r\n <?\r\n for($i=1;$i<=$res->recordcount();$i++){\r\n $id_subir=$res->fields[\"id_subir\"];\r\n $link=encode_link(\"../../lib/archivo_orden_de_compra.php\",array(\"id_subir\"=>$id_subir,\"solo_lectura\"=>1));\r\n $fechas_entregas=fechas_entregas_oc($id_subir);\r\n ?>\r\n <tr>\r\n <a href=<?=$link?> target=\"_blank\">\r\n <td align=left >\r\n <font color='blue'>\r\n <?=$res->fields[\"nro_orden\"]?>\r\n </font>\r\n </td>\r\n <td align=center><?=fechas_entregas_oc($id_subir)?></td>\r\n <td align=center><?=$moneda->fields[\"simbolo\"]?></td>\r\n <td align=right><?=formato_money($res->fields[\"total\"])?></td>\r\n </a>\r\n\r\n </tr>\r\n <?\r\n $cont++;\r\n $res->movenext();\r\n\r\n } // del for\r\n ?>\r\n </table>\r\n <?\r\n}\r\n\r\n}", "public function transferencia($row){\n\n // Data de Saida\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Data Saída: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->data_saida), 'TBR', 0, '');\n // Origem\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Origem: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(40, 6, utf8_decode($row->origem_nome), 'TBR', 0, '');\n\n $this->Ln();\n\n // Data de Entrada\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Data Entrada: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->data_saida), 'TBR', 0, '');\n // Destino\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Destino: \"), 'LTB', 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(40, 6, utf8_decode($row->destino_nome), 'TBR', 0, '');\n\n $this->Ln(10);\n\n\n // Status\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Status: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->status_nome), 'TBR', 0, '');\n\n // Peso Total\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Peso Total: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_peso_total), 'TBR', 0, '');\n\n // Permanencia\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Perm. Média: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->permanencia_media), 'TBR', 0, '');\n\n // Machos\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Machos: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->machos), 'TBR', 0, '');\n\n // Peso Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Peso Médio: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_peso_medio), 'TBR', 0, '');\n\n // Ganho Dia Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho/Dia: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_medio_media), 'TBR', 0, '');\n\n // Femeas\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Femeas:\"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->femeas), 'TBR', 0, '');\n\n // Ganho Total\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho Total: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_total), 'TBR', 0, '');\n\n // Maior Peso \n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Maior Peso: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_maior_peso), 'TBR', 0, '');\n\n // Total\n $this->Ln();\n $this->SetFont('Times','B',10);\n $this->Cell(20, 6, utf8_decode(\"Total:\"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(30, 6, utf8_decode($row->quantidade), 'TBR', 0, '');\n\n // Ganho Total Medio\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Ganho Médio: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->ganho_total_media), 'TBR', 0, '');\n \n // Menor Peso\n $this->SetFont('Times','B',10);\n $this->Cell(25, 6, utf8_decode(\"Menor Peso: \"), 1, 0, '');\n $this->SetFont('Times','',10);\n $this->Cell(25, 6, utf8_decode($row->saida_menor_peso), 'TBR', 0, '');\n\n $this->Ln(6);\n }", "function encabezadoNoExito($reporte) {\n foreach ($reporte as $key => $value)\n {if($reporte[$key]['motivo']!='ok')\n {\n ?>\n <tr align=\"center\"><td colspan=\"7\" class='cuadro_plano centrar'><font color=\"#F90101\">Para los siguientes estudiantes <b>NO</b> se realiz&oacute; la inscripcion</font></td></tr>\n <tr class=\"cuadro_color\">\n <td align=\"center\">Nro</td>\n <td align=\"center\">C&oacute;digo</td>\n <td align=\"center\">Nombre</td>\n <td colspan=\"2\" align=\"center\">Descripci&oacute;n</td>\n </tr>\n <?\n break;\n }\n }\n }", "function draw_singolo_ordine($id_prodotto, $nome_prodotto, $prezzo, $foto, $quantita)\n {\n echo \"<div class='col-md-9 col-xs-12 text-center' style='background-color:#F9F9F9; padding:5px; margin-bottom:5px;'>\";\n echo \" <div class='col-md-3 col-xs-12'>\";\n echo \" <a href='product_img/$foto'><img class='img-thumbnail' src='product_img/$foto' height='150px' width='150px'></a>\";\n echo \" </div>\";\n echo \" <div class='col-md-6 col-xs-12'>\";\n echo \" <div class='col-xs-12'>\";\n echo \" <h3 class='text-primary'> $nome_prodotto </h3>\";\n echo \" </div>\";\n echo \" </div>\";\n echo \" <div class='col-md-3 col-xs-12'>\";\n echo \" <div class='col-xs-12'>\";\n echo \" <h4>Prezzo</h4>\";\n echo \" <h3 style='color:green;'>€$prezzo</h3>\";\n echo \" </div>\";\n echo \" <div class='col-md-12'>\";\n echo \" <h5>Quantità:$quantita</h5>\";\n echo \" </div>\";\n echo \" </div>\";\n echo \"</div>\";\n }", "function TablaListarProveedores()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 35 ,12, 80 , 25 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',18);\n //Movernos a la derecha\n $this->Cell(130);\n //Título\n $this->Cell(180,25,'LISTADO GENERAL DE PROVEEDORES',0,0,'C');\n //Salto de línea\n $this->Ln(30);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'CÉDULA GERENTE :',0,0,'');\n\t$this->CellFitSpace(95,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->CellFitSpace(42,5,'NOMBRE GERENTE :',0,0,'');\n\t$this->CellFitSpace(120,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(30,5,'',0,0,'');\n\t$this->CellFitSpace(42,5,'TELÉFONO GERENTE :',0,0,'');\n $this->CellFitSpace(95,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->CellFitSpace(42,5,'CORREO GERENTE :',0,0,'');\n $this->CellFitSpace(120,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln();\n\t\n\t$this->Ln();\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es BLANCO)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->Cell(10,8,'N°',1,0,'C', True);\n\t$this->Cell(28,8,'CÉDULA',1,0,'C', True);\n\t$this->Cell(70,8,'NOMBRES',1,0,'C', True);\n\t$this->Cell(65,8,'DIRECCIÓN DOMICILIARIA',1,0,'C', True);\n\t$this->Cell(32,8,'N° TELÉFONO',1,0,'C', True);\n\t$this->Cell(75,8,'CORREO',1,0,'C', True);\n\t$this->Cell(55,8,'CONTACTO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarProveedores();\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(28,5,utf8_decode($reg[$i][\"ritproveedor\"]),1,0,'C');\n $this->CellFitSpace(70,5,utf8_decode($reg[$i][\"nomproveedor\"]),1,0,'C');\n $this->CellFitSpace(65,5,utf8_decode($reg[$i][\"direcproveedor\"]),1,0,'C');\n\t$this->Cell(32,5,utf8_decode($reg[$i][\"tlfproveedor\"]),1,0,'C');\n\t$this->Cell(75,5,utf8_decode($reg[$i][\"emailproveedor\"]),1,0,'C');\n\t$this->Cell(55,5,utf8_decode($reg[$i][\"contactoproveedor\"]),1,0,'C');\n $this->Ln();\n\t\n }\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(80,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(40,6,'',0,0,'');\n $this->Cell(140,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(80,6,'',0,0,'');\n $this->Ln(4);\n }", "function TablaListarRetiro()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\"); \n //Arial bold 15\n $this->SetFont('Courier','B',11);\n //Movernos a la derecha\n $this->Cell(100);\n //Título\n $this->Cell(65,20,'LISTADO GENERAL DE RETIRO DE EFECTIVO EN CAJAS',0,0,'C');\n //Salto de línea\n $this->Ln(25);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',10);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es BLANCO)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->Cell(10,8,'N°',1,0,'C', True);\n\t$this->Cell(25,8,'N° CAJA',1,0,'C', True);\n\t$this->Cell(95,8,'MOTIVO DE RETIRO',1,0,'C', True);\n\t$this->Cell(25,8,'MONTO',1,0,'C', True);\n\t$this->Cell(35,8,'FECHA RETIRO',1,1,'C', True);\n\t\n $tra = new Login();\n $reg = $tra->ListarRetiro();\n\t$a=1;\n for($i=0;$i<sizeof($reg);$i++){\n\t$this->SetFont('courier','',8); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(10,5,$a++,1,0,'C');\n\t$this->CellFitSpace(25,5,utf8_decode($reg[$i]['nrocaja']),1,0,'C');\n $this->CellFitSpace(95,5,utf8_decode($reg[$i]['motivoretiro']),1,0,'C');\n $this->CellFitSpace(25,5,utf8_decode(number_format($reg[$i]['cantretiro'], 2, '.', '.')),1,0,'C');\n\t$this->CellFitSpace(35,5,utf8_decode(date(\"d-m-Y h:i:s\",strtotime($reg[$i]['fecharetiro']))),1,0,'C');\n $this->Ln();\n\t\n }\n \n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(60,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(60,6,'',0,0,'');\n $this->Ln(4);\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 spiplistes_texte_inventaire_abos ($id_abonne, $type_abo, $nom_site_spip) {\n\t\n\t// fait l'inventaire des abos\n\t$listes_abonnements = spiplistes_abonnements_listes_auteur ($id_abonne, true);\n\t$nb = count($listes_abonnements);\n\t$message_list = \n\t\t($nb)\n\t\t? \"\\n- \" . implode(\"\\n- \", $listes_abonnements) . \".\\n\"\n\t\t: ''\n\t\t;\n\n\t$m1 = ($nb > 1) ? 'inscription_reponses_s' : 'inscription_reponse_s';\n\tif($nb > 1) {\n\t\t$m2 = _T('spiplistes:inscription_listes_f', array('f' => $type_abo));\n\t} else if($nb == 1) {\n\t\t$m2 = _T('spiplistes:inscription_liste_f', array('f' => $type_abo));\n\t} else {\n\t\t$m2 = _T('spiplistes:vous_abonne_aucune_liste');\n\t}\n\t$texte = ''\n\t\t. \"\\n\"._T('spiplistes:'.$m1, array('s' => htmlentities($nom_site_spip)))\n\t\t. \".\\n\"\n\t\t. $m2.$message_list\n\t\t;\n\treturn($texte);\n}", "function convert_pedido_data_to_html()\n {\n $date = Carbon::now();\n $currentDate = $date->format('Y-m-d');\n $pedido_data = $this->get_pedido_data();\n $pedido_t= $this->get_pedido_total_ventas();\n $pedido_c= $this->get_pedido_cant_ventas();\n $output = '\n <h3 align=\"center\">Informe de ventas del día '.$currentDate.'</h3>\n <table width=\"50%\" align=\"center\" style=\"border-collapse: collapse; border: 0px;\">\n <tr>\n <th style=\"border: 1px solid; padding:12px;\" width=\"20%\">Id Venta</th>\n <th style=\"border: 1px solid; padding:12px;\" width=\"30%\">Total ($CLP)</th>\n </tr>'; \n foreach($pedido_data as $pedido)\n {\n $output .= '\n <tr>\n <td style=\"border: 1px solid; padding:12px;\">'.$pedido->id.'</td>\n <td style=\"border: 1px solid; padding:12px;\">'.$pedido->subtotal.'</td>\n </tr>\n ';\n }\n $output .= '</table>\n <h3 align=\"center\">Cantidad de ventas diarias: '.$pedido_c->ventas_cant.'</h3>\n <h3 align=\"center\">Total de ventas diarias: $'.$pedido_t->ventas_total.'</h3>';\n return $output;\n }", "function TablaProductosVendidos()\n {\n //Logo\n $this->Image(\"./assets/img/logo.png\" , 20 ,12, 60 , 20 , \"PNG\");\n\t$this->SetXY(10, 15);\n\t$this->SetFont('courier','B',10);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(75,6,'',0,0,'');\n\t$this->Cell(120,6,'LISTADO DE PRODUCTOS VENDIDOS POR FECHAS ',0,1,'C');\n \n\t$this->Cell(75,6,'',0,0,'');\n $this->Cell(120,6,' DESDE '.$_GET[\"desde\"].' HASTA '.$_GET[\"hasta\"],0,0,'C');\n //Salto de línea\n $this->Ln(15);\n\t\n\t$con = new Login();\n $con = $con->ConfiguracionPorId();\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetFillColor(2,157,116);\n\t$this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'CÉDULA GERENTE: ',0,0,'');\n\t$this->Cell(44,5,$con[0]['cedresponsable'],0,0,'');\n\t$this->Cell(30,5,'NOMBRE GERENTE:',0,0,'');\n\t$this->Cell(83,5,$con[0]['nomresponsable'],0,1,'');\n \n $this->Cell(10,5,'',0,0,'');\n\t$this->Cell(35,5,'TELÉFONO GERENTE: ',0,0,'');\n $this->Cell(44,5,utf8_decode($con[0]['tlfresponsable']),0,0,'');\n $this->Cell(30,5,'CORREO GERENTE:',0,0,'');\n $this->Cell(83,5,utf8_decode($con[0]['correoresponsable']),0,0,'');\n $this->Ln(8);\n\t\n\t$this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->SetFillColor(249, 187, 31); // establece el color del fondo de la celda (en este caso es NARANJA)\n\t$this->CellFitSpace(8,8,'N°',1,0,'C', True);\n\t$this->CellFitSpace(15,8,'CÓDIGO',1,0,'C', True);\n\t$this->CellFitSpace(60,8,'DESCRIPCIÓN DE PRODUCTO',1,0,'C', True);\n\t$this->CellFitSpace(20,8,'CATEGORIA',1,0,'C', True);\n\t$this->CellFitSpace(23,8,'PRECIO V.',1,0,'C', True);\n\t$this->CellFitSpace(22,8,'EXISTENCIA',1,0,'C', True);\n\t$this->CellFitSpace(18,8,'VENDIDOS',1,0,'C', True);\n\t$this->CellFitSpace(26,8,'MONTO TOTAL',1,1,'C', True);\n\t\n $ve = new Login();\n\t$reg = $ve->BuscarVentasProductos();\n\t$precioTotal=0;\n\t$existeTotal=0;\n\t$vendidosTotal=0;\n\t$pagoTotal=0;\n\t$a=1;\n\tfor($i=0;$i<sizeof($reg);$i++){\n\t$precioTotal+=$reg[$i]['precioventa'];\n\t$existeTotal+=$reg[$i]['existencia'];\n\t$vendidosTotal+=$reg[$i]['cantidad']; \n\t$pagoTotal+=$reg[$i]['precioventa']*$reg[$i]['cantidad'];\n\t$this->SetFont('courier','',7); \n\t$this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es negro)\n $this->Cell(8,5,$a++,1,0,'C');\n\t$this->CellFitSpace(15,5,$reg[$i][\"codproducto\"],1,0,'C');\n $this->CellFitSpace(60,5,utf8_decode($reg[$i][\"producto\"]),1,0,'C');\n\t$this->CellFitSpace(20,5,utf8_decode($reg[$i][\"nomcategoria\"]),1,0,'C');\n\t$this->CellFitSpace(23,5,utf8_decode(number_format($reg[$i][\"precioventa\"], 2, '.', ',')),1,0,'C');\n\t$this->CellFitSpace(22,5,utf8_decode($reg[$i]['existencia']),1,0,'C');\n\t$this->CellFitSpace(18,5,utf8_decode($reg[$i]['cantidad']),1,0,'C');\n\t$this->CellFitSpace(26,5,utf8_decode(number_format($reg[$i]['precioventa']*$reg[$i]['cantidad'], 2, '.', ',')),1,0,'C');\n $this->Ln();\n\t\n } \n \n\t$this->Cell(8,5,'',0,0,'C');\n $this->Cell(15,5,'',0,0,'C');\n $this->Cell(60,5,'',0,0,'C');\t\n $this->SetFont('courier','B',9);\n\t$this->SetTextColor(255,255,255); // Establece el color del texto (en este caso es blanco)\n $this->Cell(20,5,'TOTALES',1,0,'C', True);\n $this->SetFont('courier','B',7);\n $this->SetTextColor(3,3,3); // Establece el color del texto (en este caso es blanco)\n $this->Cell(23,5,utf8_decode(number_format($precioTotal, 2, '.', ',')),1,0,'C');\n $this->Cell(22,5,utf8_decode($existeTotal),1,0,'C');\n $this->Cell(18,5,utf8_decode($vendidosTotal),1,0,'C'); \n $this->CellFitSpace(26,5,utf8_decode(number_format($pagoTotal, 2, '.', ',')),1,0,'C');\n $this->Ln();\n\n $this->Ln(12); \n $this->SetFont('courier','B',9);\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'ELABORADO POR: '.utf8_decode($_SESSION[\"nombres\"]),0,0,'');\n $this->Cell(60,6,'RECIBIDO:__________________________________',0,0,'');\n $this->Ln();\n $this->Cell(5,6,'',0,0,'');\n $this->Cell(100,6,'FECHA/HORA ELABORACIÓN: '.date('d-m-Y h:i:s A'),0,0,'');\n $this->Cell(60,6,'',0,0,'');\n $this->Ln(4);\n }", "function clean_rtf_from_jade_tables() {\r\n\t\t//$this->code = preg_replace('/class=[^\\s<>]*/', '', $this->code, -1, $d);\r\n\t\t//$this->code = preg_replace('/colspan=[0-9]*/', '', $this->code, -1, $e);\r\n\t\t//$this->code = preg_replace('/width=[0-9]*/', '', $this->code, -1, $f);\r\n\t\t//$this->code = str_replace('<p >', '', $this->code, $g);\r\n\t\t//$this->code = str_replace('<span >', '', $this->code, $h);\r\n\t\t//$this->code = str_replace('</p>', '', $this->code, $i);\r\n\t\t//$this->code = str_replace('</span>', '', $this->code, $j);\r\n\t\t//$this->code = str_replace('<p >', '', $this->code, $k);\t\t\r\n\t\t// INAC1168\r\n\t\tif($this->language === \"english\") {\r\n\t\t$this->code = preg_replace('/<tr>\\s*<td([^<>]*)>\\s*<b>ACTIVITIES<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>RESPONSIBILITY<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>TIMING GUIDELINES<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*1\\./', '</table>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td$1 colspan=\"2\"><b>ACTIVITIES</b></td>\r\n<td$2><b>RESPONSIBILITY</b></td>\r\n<td$3><b>TIMING GUIDELINES</b></td>\r\n</tr>\r\n<tr>\r\n<td$10>1.', $this->code, -1, $l);\r\n\t\t$this->code = preg_replace('/<tr>\\s*<td([^<>]*)>\\s*<b>ACTIVITIES<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>RESPONSIBILITY<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>TIMING GUIDELINES<\\/b>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*1\\./', '</table>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td$1 colspan=\"2\"><b>ACTIVITIES</b></td>\r\n<td$2><b>RESPONSIBILITY</b></td>\r\n<td$3><b>TIMING GUIDELINES</b></td>\r\n</tr>\r\n<tr>\r\n<td$9>1.', $this->code, -1, $m);\r\n\t\t}\r\n\t\tif($this->language === \"french\") {\r\n\t\tprint(\"<h1>french</h1>\");\r\n\t\t$this->code = preg_replace('/<tr>\\s*<td([^<>]*)>\\s*<b>ACTIVITÉS<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>RESPONSABILITÉ<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>HORIZON<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>TEMPOREL<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*1\\./', '</table>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td$1 colspan=\"2\"><b>ACTIVITÉS</b></td>\r\n<td$2><b>RESPONSABILITÉ</b></td>\r\n<td$3><b>HORIZON TEMPOREL</b></td>\r\n</tr>\r\n<tr>\r\n<td$10>1.', $this->code, -1, $n);\r\n\t\t$this->code = preg_replace('/<tr>\\s*<td([^<>]*)>\\s*<b>ACTIVITÉS<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>RESPONSABILITÉ<\\/b>\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>HORIZON<\\/b>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*<b>TEMPOREL<\\/b>\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<td([^<>]*)>\\s*&nbsp;\\s*<\\/td>\\s*<\\/tr>\\s*<tr>\\s*<td([^<>]*)>\\s*1\\./', '</table>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td$1 colspan=\"2\"><b>ACTIVITÉS</b></td>\r\n<td$2><b>RESPONSABILITÉ</b></td>\r\n<td$3><b>HORIZON TEMPOREL</b></td>\r\n</tr>\r\n<tr>\r\n<td$9>1.', $this->code, -1, $o);\t\t\r\n\t\t}\r\n\t\t//$this->code = preg_replace('/<span\\s*>/', '', $this->code, -1, $p);\r\n\t\t$this->code = preg_replace('/<tr height=\"0\">.*?<\\/tr>/', '', $this->code, -1, $q);\r\n\t\t\r\n\t\t$this->logMsgIf(\"clean_rtf_from_jade_tables\", $c + $d + $e + $f + $g + $h + $i + $j + $k + $l + $m + $n + $o + $p + $q);\r\n\t}", "function Header() {\n //$this->Ln(2);\n date_default_timezone_set('America/Lima');\n $this->SetFont('Arial', 'B', 7.5);\n $this->Image(\"view/img/logo.png\", null, 5, 22, 17);\n $this->Image(\"view/img/logo.png\", 385, 5, 20, 20);\n $this->Cell(400,2, \"EL AGUILA SRL\", 0, 0, 'C');\n $this->Ln(4);\n $this->Cell(400,1, \"DIR1: Av. Bolivar # 395 Moshoqueque - Chiclayo - Peru\", 0, 0, 'C');\n $this->Ln(3);\n $this->Cell(400, 2, \"DIR1: Via Evitamiento km 2.5 Sector Chacupe - La Victoria\", 0, 0, 'C');\n $this->Ln(15);\n $this->SetFont('Arial','B',9);\n// $this->Cell(400, 2, utf8_decode(\"Cumplimiento de entrega de las ordenes de Pedido\"), 0, 0, 'C');\n $this->ln(4); \n $this->Line(45,25,380,25);\n \n }", "public function finishFlowingBlock() {\r\n\t\t$maxWidth \t=& $this->flowingBlockAttr[ 'width' ];\r\n\t\t\r\n\t\t$lineHeight =& $this->flowingBlockAttr[ 'height' ];\r\n\t\t\r\n\t\t$border \t=& $this->flowingBlockAttr[ 'border' ];\r\n\t\t$align \t\t=& $this->flowingBlockAttr[ 'align' ];\r\n\t\t$fill \t\t=& $this->flowingBlockAttr[ 'fill' ];\r\n\t\t\r\n\t\t$content \t=& $this->flowingBlockAttr[ 'content' ];\r\n\t\t$font \t\t=& $this->flowingBlockAttr[ 'font' ];\r\n\t\t\r\n\t\t// Seteamos el espacio Normal\r\n\t\t$this->_out( sprintf( '%.3F Tw', 0 ) );\r\n\t\t\r\n\t\t// La cantidad de espacio ocupado hasta ahora en las unidades de usuario\r\n\t\t$usedWidth = 0;\r\n\t\t\r\n\t\tforeach ( $content as $k => $chunk ) {\r\n\t\t\t$b = '';\r\n\t\t\t\r\n\t\t\tif ( is_int( strpos( $border, 'B' ) ) ) {\r\n\t\t\t\t$b .= 'B';\r\n\t\t\t}\r\n\t\t\tif ( $k == 0 && is_int( strpos( $border, 'L' ) ) ) {\r\n\t\t\t\t$b .= 'L';\r\n\t\t\t}\r\n\t\t\tif ( $k == count( $content ) - 1 && is_int( strpos( $border, 'R' ) ) ) {\r\n\t\t\t\t$b .= 'R';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->restoreFont( $font[ $k ] );\r\n\t\t\t\r\n\t\t\t// Si es la ultima parte de la Linea se mueve a la Siguiente\r\n\t\t\tif ( $k == count( $content ) - 1 ) {\r\n\t\t\t\t$this->Cell( ( $maxWidth / $this->k ) - $usedWidth + 2 * $this->cMargin, $lineHeight, $chunk, $b, 1, $align, $fill );\r\n\t\t\t} else {\r\n\t\t\t\t$this->Cell( $this->GetStringWidth( $chunk ), $lineHeight, $chunk, $b, 0, $align, $fill );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$usedWidth += $this->GetStringWidth( $chunk );\r\n\t\t}\r\n\t}", "function immobili_visionati($id_cli=\"\"){\n\t\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$str=\"\";\n\n\n\t$q=\"select * from immobile i JOIN immobile_visite v ON v.id_imm=i.id_imm where v.id_cli = $id_cli ORDER BY v.data asc\";\n\n\t$r=$db->query($q);\n\tif (!$r) {\n \t\n\t\t$str.=\"<tr><td colspan=\\\"4\\\">Nessun immobile proposto <a href=\\\"index.php\\\" >PROPONI</A></td></tr>\";\n\t}\t\n\n\tif ($r) {\n\t\t$str.=\"<div class=\\\"clienti\\\">\";\n\t\t$str.=\"\t<TABLE id=\\\"immobili_index\\\">\";\n\t $str.=\"<THEAD class=\\\"thead\\\">\";\n\t\t$str.=\"<TR class=\\\"clienti_header\\\">\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Rif.Imm\";\n\t\t$str.=\" </TD>\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Citt&agrave;\";\n\t\t$str.=\"</TD>\";\n\t\t$str.=\"<TD>\";\n\t\t$str.=\"Mq/Prezzo\";\n\t\t$str.=\"</TD>\";\n $str.=\"<TD>\";\n\t\t$str.=\"Data\";\n\t\t$str.=\"</TD>\";\n\t\t $str.=\"<TD>\";\n\t\t$str.=\"Opzioni\";\n\t\t$str.=\"</TD>\";\n\t\t\n\t\t\n\t\t$str.=\"<td>\";\n\t\t\t$str.=\"Proprietario\";\n\t\t\t$str.=\"</td>\";\n\t\t$str.=\"</TR>\";\n\t\n\t\t\n\t\t$str.=\"</THEAD>\";\n\t $str.=\"<TBODY>\";\n \t\twhile ($ro=mysql_fetch_array($r)) {\n \t\t\t$str.= \"<TR>\\n\";\n\t\t\t$str.= \"<TD class=\\\"clienti_rif\\\">\\n\";\n\t\t\t$str.= $ro['id_imm'].\"\\n</TD>\\n\";\n\t\t $str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t$str.= citta_stampa($ro['id_comune']).\"\\n</TD>\\n\";\n\t\t\t$str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t$str.= mq_stampa($ro['id_imm']);\n\t\t\t$str.=\" -- \";\n\t\t\t$str.= prezzo_stampa($ro['id_imm']);\n\t\t\t$str.=\"\\n</TD\\n>\";\n\t\t\t$str.='<td>';\n $str .=$ro['data'];\n $str.='</td>';\n\t\t\t$str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t\t\n\t\t\t$str.= opzioni_immobile($ro['id_tipo_locazione'],$ro['id_imm']).\"\\n</TD>\\n\";\n\t\t\t\n\t\t \n\t\t $str.= \"<TD class=\\\"clienti\\\">\\n\";\n\t\t $str.= nominativo_stampa(id_imm_to_id_cli($ro['id_imm']));\n\t\t $str.= \"</TD>\\n\";\n\t\t $str.= \"</TR>\\n\\n\\n\";\n\t\t}\n\t\t$str.=\"</TBODY>\";\n\t\t$str.=\"</TABLE>\";\n\t\t$str.=\"<script type=\\\"text/javascript\\\">\";\n\t\t$str.=\"addTableRolloverEffect('immobili_index','tableRollOverEffect1','tableRowClickEffect1');\";\n\t\t$str.=\"</script>\";\n\t\t$str.=\"<script type=\\\"text/javascript\\\">\";\n\t\t$str.=\"initSortTable('immobili_index',Array('S','S','S','N',\";\n\t\t\n\t\t$str.=\"));\";\n\t\t$str.=\"</script>\";\n\n\t}\t\n\t\n\treturn $str;\n\t\n}", "public function tablaCtr(){\n\n $respuesta = Modelo::tablaMdl(\"notas_2\");\n\n $caracteres = 0;\n $palabras = 0;\n\n foreach($respuesta as $registro => $dato){\n\n $caracteres += strlen( $dato[\"nota\"] );\n $palabras += str_word_count( $dato[\"nota\"] );\n\n\t\techo'<div id=\"'.$dato[\"id\"].'\" class=\"w3-card-4 w3-container w3-margin-bottom w3-white\">\n <hr>\n <div class=\"lectura\">\n <p>'.$dato[\"nota\"].'</p>\n </div>\n <div class=\"edicion w3-animate-bottom\" style=\"display:none;\">\n <form method=\"post\">\n <input type=\"hidden\" name=\"editarId\" value=\"'.$dato[\"id\"].'\">\n <textarea class=\"w3-input w3-white\" name=\"editarNota\" rows=\"8\" style=\"resize: none\">'.$dato[\"nota\"].'</textarea>\n <button class=\"w3-button w3-grey w3-margin-top w3-text-white\" type=\"submit\" name=\"submitEditarNota\">guardar</button>\n </form>\n </div>\n <hr>\n\n <!-- espacio para imprimir la confirmacion de borrar -->\n <div class=\"confirm_borrar w3-panel w3-pale-red w3-leftbar w3-border-red\" style=\"display:none;\">\n <p class=\"w3-left w3-large\">¿borrar la nota?</p>\n <div class=\"w3-right w3-margin\">\n <button class=\"btn_si_borrar w3-button w3-border\" data-id=\"'.$dato[\"id\"].'\">SI</button>\n <button class=\"btn_no_borrar w3-button w3-border\">NO</button>\n </div>\n </div>\n\n <p class=\"w3-small w3-left\">'.$dato['fecha'].'</p>\n <div class=\"w3-padding w3-right\">\n <i class=\"btn_editar_nota w3-button fa fa-edit w3-border w3-hover-opacity\" title=\"editar la nota\"></i>\n <i class=\"btn_borrar_nota w3-button fa fa-trash-o w3-border w3-hover-opacity\" title=\"borrar la nota\"></i>\n </div>\n\n </div>';\n\n }\n\n\n echo '</section>';\n /*============================\n BLOQUE DE ESTADISTICAS\n ============================*/\n echo '<div id=\"estadisticas\" class=\"w3-padding w3-light-blue\">\n <h3 class=\"w3-center w3-text-dark-grey\">ESTADISTICAS</h3>';\n echo '<p class=\"w3-center w3-text-dark-grey\">Caracteres: '.$caracteres.'.</p>';\n echo '<p class=\"w3-center w3-text-dark-grey\">Palabras: '.$palabras.'.</p>';\n echo '</div>';\n\n\n }", "function estalis(){\nif(($_SESSION['nivelautorizado']=='establecimiento')){\n $vid=$_SESSION['id_estab'];\n header(\"Location:index.php?page=indicadores&file=index&func=ingparam&id=\".$vid.\"\");\n } else {\n$query_rsb = \"SELECT *\n FROM establecimiento\n ORDER BY nombre\";\n$rsb = safe_query($query_rsb);\n$row_rsb = mysql_fetch_assoc($rsb);\n$totalRows_rsb = mysql_num_rows($rsb);\nprint <<<EOQ\n<table width=\"400\" border=\"0\" align=\"center\">\n <caption>\n <strong><font color=\"#000099\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n Lista de Establecimientos</font></strong> <img src=\"imagenes/urg4.jpg\" width=\"99\" height=\"71\" align=\"absmiddle\"> \n </caption>\n <tr> \n <td width=\"235\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>Nombre</strong></font></td>\n <td width=\"100\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>Tipo</strong></font></td>\n <td width=\"51\">\n <div align=\"center\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>Ver \n Estab.</strong></font></div></td>\n </tr>\nEOQ;\n $bgcolor1=\"#DDDDDD\";\n $bgcolor2=\"#FFFFFF\";\n $i=1;\n do { \n $bgcolor=(bcmod( $i++,2)) ? $bgcolor1 : $bgcolor2; \n echo \" <tr bgcolor='\". $bgcolor .\"'> <td >\";\nprint <<<EOQ\n <font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\nEOQ;\n echo $row_rsb['nombre']; \nprint <<<EOQ\n</font></td>\n <td><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\nEOQ;\n echo $row_rsb['tipo']; \nprint <<<EOQ\n</font></td>\n <td><div align=\"center\"> \nEOQ;\necho \"<a href=\\\"index.php?page=indicadores&file=index&func=ingparam&id=\".\n $row_rsb['id'].\"&nom=\".$row_rsb['nombre'].\"&tipo=\".$row_rsb['tipo'] .\"\\\" >\"; \nprint <<<EOQ\n <img src=\"button_select.png\" alt=\"Ver establecimientos\" width=\"14\" height=\"13\" border=\"0\"> \n </a> </div></td>\n </tr>\nEOQ;\n } while ($row_rsb = mysql_fetch_assoc($rsb));\nmysql_free_result($rsb);\n }\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}" ]
[ "0.622012", "0.61342084", "0.6127845", "0.60945827", "0.60945827", "0.60486", "0.603544", "0.60237837", "0.6003663", "0.598029", "0.59544665", "0.59143096", "0.5908731", "0.5908122", "0.58891016", "0.5863715", "0.58446085", "0.58433926", "0.5839545", "0.583594", "0.5815094", "0.58076394", "0.58039343", "0.5799736", "0.57785654", "0.5776859", "0.57695067", "0.5768988", "0.57642937", "0.5759917", "0.5737704", "0.5737381", "0.57332116", "0.57235146", "0.571948", "0.5717161", "0.57145995", "0.5714589", "0.5711845", "0.57057804", "0.570524", "0.56965846", "0.5694816", "0.5694778", "0.56848437", "0.56733173", "0.5668164", "0.5667335", "0.5661804", "0.5659032", "0.5653193", "0.56453604", "0.56444824", "0.56339157", "0.5632575", "0.56310004", "0.5625722", "0.56241643", "0.5622752", "0.5621169", "0.5617367", "0.56076175", "0.5601031", "0.55984294", "0.5596454", "0.5594319", "0.558476", "0.55835557", "0.55740774", "0.5571234", "0.5565684", "0.5556958", "0.55507785", "0.5549634", "0.55422026", "0.5541223", "0.5539857", "0.5536177", "0.55238426", "0.5520356", "0.55117095", "0.55101645", "0.55082667", "0.5499697", "0.5498748", "0.54962885", "0.5496088", "0.54928803", "0.5492469", "0.5491166", "0.5488107", "0.5481108", "0.54759663", "0.5459501", "0.5458537", "0.54582536", "0.54562587", "0.54533565", "0.545029", "0.54450494", "0.5444492" ]
0.0
-1
/ funcion que recupera el pais de una IP del visitante
function getPais($ip = false){ $ip = ($ip==false)?getUserIP():$ip; $key="7b471597a8e15e665536cef21de5b54ffc5a38a7"; $data= file_get_contents("http://api.db-ip.com/addrinfo?addr=$ip&api_key=$key"); $data = json_decode($data,true); return ($data['country']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iploc($ip){\n\t\t/* preg_match(\"/<li>Country : (.*?) <img/\",$html,$data); */\n\t\t$d['pais'] = \"nada\";\n\t\t/* preg_match(\"/<li>State\\/Province : (.*?)<\\/li>/\",$html,$data); */\n\t\t$d['estado'] = \"nada\";\n\t\t/* preg_match(\"/<li>City : (.*?)<\\/li>/\",$html,$data); */\n\t\t$d['ciudad'] = \"nada\";\n\t\treturn ($d);\n\t}", "public function ObtenerIp()\n { \n\n return str_replace(\".\",\"\",$this->getIP()); //Funcion que quita los puntos de la IP\n\n }", "function listNetworkIp($net,$broadcast,$sn) {\n\n $lista=[]; // lista da ritornare \n\n $no = explode('.', $net); // array con gli ottetti dell'indirizzo NET\n $bo = explode('.', $broadcast); // array con gli ottetti dell'indirizzo NET\n\n $nbit = 32-$sn; // numero di bit assegnati agli host\n \n $nhost = pow(2,$nbit); // numero totale degli host\n\n $start = (int) $no[3]+1;\n $end = (int) $bo[3]-1;\n $roots = $no[0].\".\".$no[1].\".\".$no[2].\".\";\n $roote = $bo[0].\".\".$bo[1].\".\".$bo[2].\".\";\n $primo = $roots.$start;\n $ultimo = $roote.$end;\n $hosts = [];\n\n //echo $start.\" - \".$end.\"<br>\";\n\n // verifica che gli IP disponibili non superino le 5000 unità -> stila la lista\n if($nhost > 35000) {\n $lista[0] = $primo;\n $lista[1] = $ultimo;\n }\n else {\n for($i=ip2long($primo); $i<=ip2long($ultimo); $i++) {\n\n $ip2conv = $i;\n $ip2write = long2ip($ip2conv);\n $lista[] = $ip2write;\n \n $host=gethostbyaddr($ip2write); // prelevo il nome del host (se disponibile)\n //echo $host.\" | \";\n\n // se il nome host NON è uguale all'IP -> salvo il nome Host in una lista\n if(!filter_var($host, FILTER_VALIDATE_IP)) {\n $hosts[] = \"IP: $ip2write ==> Nome Host:<b> $host </b><br>\";\n }\n\n }\n }\n\n $ret['hostnames'] = $hosts;\n $ret['primo'] = $primo;\n $ret['ultimo'] = $ultimo;\n $ret['lista'] = $lista;\n $ret['nhost'] = $nhost; \n\n return $ret;\n}", "public function beLoginLinkIPList() {}", "public function ip()\n {\n \n try {\n $ip_arr = Yaml::parseFile($this->config['ip_config_path']);\n } catch (\\Exception $e) {\n // Do something\n $ip_arr = [];\n }\n\n $out = [];\n\n // Compile SQL\n $cnt = 0;\n $sel_arr = array('COUNT(1) as count');\n foreach ($ip_arr as $key => $value) {\n if (is_scalar($value)) {\n $value = array($value);\n }\n $when_str = '';\n foreach ($value as $k => $v) {\n $when_str .= sprintf(\" WHEN remote_ip LIKE '%s%%' THEN 1\", $v);\n }\n $sel_arr[] = \"SUM(CASE $when_str ELSE 0 END) AS r{$cnt}\";\n $cnt++;\n }\n $sql = \"SELECT \" . implode(', ', $sel_arr) . \"\n\t\t\t\tFROM reportdata \"\n .get_machine_group_filter();\n\n $reportdata = Reportdata_model::selectRaw(implode(', ', $sel_arr))\n ->filter()\n ->first();\n // Create Out array\n if ($reportdata) {\n $cnt = $total = 0;\n foreach ($ip_arr as $key => $value) {\n $col = 'r' . $cnt++;\n\n $out[] = array('key' => $key, 'cnt' => intval($reportdata[$col]));\n\n $total += $reportdata[$col];\n }\n\n // Add Remaining IP's as other\n if ($reportdata['count'] - $total) {\n $out[] = array('key' => 'Other', 'cnt' => $reportdata['count'] - $total);\n }\n }\n\n $obj = new View();\n $obj->view('json', array('msg' => $out));\n }", "function getIPInfo($IPParagraph='0.0.0.0/32'){\n\tif (!$IPParagraph) {\n\t\treturn '请输入IP段';\n\t}\n\t$isTrue=isIPParagraph($IPParagraph);\n\tif (!$isTrue) {\n\t\treturn '无效IP段';\n\t}\n\t$IPParagraphArray = explode('/', $IPParagraph);\n\t$mark = $IPParagraphArray[1]; // 获取IP段的掩码位\n\t$dilatation = pow(2, 32-$mark); // 最多可以容纳的主机数\n\t$usable = $dilatation-2; // 可供使用的主机数\n\t$subnetMask = long2ip(ip2long('255.255.255.255')-($dilatation-1)); // 子网掩码\n\t$subnetMaskArray = explode('.', $subnetMask);\n\t$ipArray = explode('.', $IPParagraphArray[0]);\n\tif ($subnetMaskArray[2] === '255') { // ip所处子网掩码判断某一位是在哪个类别下\n\t\t$category = 'C类';\n\t\t$flag=array(3); // 标识ip哪位为0的数组\n\t}elseif ($subnetMaskArray[2] < '255' && $subnetMaskArray[1] === '255') {\n\t\t$category = 'B类';\n\t\t$flag=array(2,3);\n\t}elseif ($subnetMaskArray[1] < '255') {\n\t\t$category = 'A类';\n\t\t$flag=array(1,2,3);\n\t}\n\tfor ($i=0; $i < count($flag); $i++) {\n\t\t$subnet = pow(2, 8*($i+1)-(32-$mark)); // 子网个数\n\t\t$count = $subnet===1 ? pow(2, 8*($i+1)) : $subnet; // 当子网等于1,则说明是8,16,24,分别是a,b,c类\n\t\t$ipArray[$flag[$i]] = 0; // 将对等的类别下ipArray数组中的某个下标的值清零\n\t}\n\n\t$ipString = implode('.', $ipArray); // 将原ip转化成x.x.x.0的形式\n\t$iplong = ip2long($ipString); // ip转长整型\n\t$subnetInit = array();\n\tfor ($i=0; $i < $subnet; $i++) {\n\t\t$subnetInit[$i] = long2ip($iplong+($dilatation*$i)); // 循环算出每个子网的第一个ip\n\t}\n\n\t$dilatationIP = array();\n\tfor ($i=0; $i < $count; $i++) {\n\t\tif ($subnet === 1) { // 当子网只有一个时,循环当前类别的总个数\n\t\t\t$dilatationIP[$i] = long2ip(ip2long($subnetInit[0])+$i);\n\t\t}elseif(isset($subnetInit[$i+1])){\n\t\t\tif (ip2long($IPParagraphArray[0]) >= ip2long($subnetInit[$i]) && ip2long($IPParagraphArray[0]) < ip2long($subnetInit[$i+1])) {\n\t\t\t\tfor ($j=0; $j < $dilatation; $j++) {\n\t\t\t\t\t$dilatationIP[$j] = long2ip(ip2long($subnetInit[$i])+$j); // ip在子网里所有的ip数\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}else{\n\t\t\tif (ip2long($IPParagraphArray[0]) >= ip2long($subnetInit[$i])) {\n\t\t\t\tfor ($j=0; $j < $dilatation; $j++) {\n\t\t\t\t\t$dilatationIP[$j] = long2ip(ip2long($subnetInit[$i])+$j); // ip在子网里所有的ip数\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}\n\n\t$rs = array(\n\t\t'ip'\t\t\t=>\t$IPParagraphArray[0],\n\t\t'mark'\t\t\t=>\t$mark,\n\t\t'dilatation'\t=>\t$dilatation,\n\t\t'usable'\t\t=>\t$usable,\n\t\t'dilatationIP'\t=>\t$dilatationIP,\n\t\t'networkAddr'\t=>\t$dilatationIP[0],\n\t\t'roadcastAddr'\t=>\t$dilatationIP[$dilatation-1],\n\t\t'subnet'\t\t=>\t$subnet,\n\t\t'subnetInit'\t=>\t$subnetInit,\n\t\t'subnetMask'\t=>\t$subnetMask,\n\t\t'category'\t\t=>\t$category,\n\t);\n\t// return json_encode($rs, JSON_UNESCAPED_UNICODE);\n\treturn $rs;\n}", "public function Persona (){ \n\n $this->ip=$this->getIP();\n }", "public function allIpAction() {\n\n $url = \"156.17.231.34\";\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_exec($ch);\n $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n if ($retcode >= 100 && $retcode <= 505) {\n //echo \"work \" . $retcode . \"<br/>\";\n } else {\n // echo \"nie dziala \" . $retcode . \"<br/>\";\n }\n }", "public function ip()\n\t{\n\t\treturn $this->Players->ip($this->SqueezePlyrID);\n\t}", "function ipextract ($str, $remote_ip='')\r\n{\r\n global $ip_private_arr;\r\n\r\n if (empty($ip_private_arr) || !is_array($ip_private_arr)) {\r\n $ip_private_arr = array();\r\n $ip_private_arr[] = array('from' => '0.0.0.0', 'to' => '9.255.255.255');\r\n $ip_private_arr[] = array('from' => '10.0.0.0', 'to' => '10.255.255.255');\r\n $ip_private_arr[] = array('from' => '97.160.0.0', 'to' => '97.255.255.255');\r\n $ip_private_arr[] = array('from' => '100.0.0.0', 'to' => '111.255.255.255');\r\n $ip_private_arr[] = array('from' => '127.0.0.0', 'to' => '127.255.255.255');\r\n $ip_private_arr[] = array('from' => '145.0.0.0', 'to' => '145.0.255.255');\r\n $ip_private_arr[] = array('from' => '163.0.0.0', 'to' => '163.0.255.255');\r\n $ip_private_arr[] = array('from' => '169.254.0.0', 'to' => '169.254.255.255');\r\n $ip_private_arr[] = array('from' => '172.0.0.0', 'to' => '172.127.255.255');\r\n $ip_private_arr[] = array('from' => '175.0.0.0', 'to' => '185.255.255.255');\r\n $ip_private_arr[] = array('from' => '191.0.0.0', 'to' => '192.0.255.255');\r\n $ip_private_arr[] = array('from' => '192.88.0.0', 'to' => '192.88.255.255');\r\n $ip_private_arr[] = array('from' => '192.101.0.0', 'to' => '192.114.255.255');\r\n $ip_private_arr[] = array('from' => '192.140.0.0', 'to' => '192.145.255.255');\r\n $ip_private_arr[] = array('from' => '192.168.0.0', 'to' => '192.178.255.255');\r\n $ip_private_arr[] = array('from' => '194.55.0.0', 'to' => '194.55.255.255');\r\n $ip_private_arr[] = array('from' => '198.17.0.0', 'to' => '198.20.255.255');\r\n $ip_private_arr[] = array('from' => '224.0.0.0', 'to' => '239.255.255.255');\r\n }\r\n\r\n $iplong = ip2long(trim($remote_ip));\r\n $valarr = empty($str) ? array() : preg_split('/[,\\s]+/', trim($str));\r\n foreach ($valarr as $ipval) {\r\n if (preg_match('%(\\d{1,3}(?:[.]\\d{1,3}){3})%', $ipval, $matches)) {\r\n $iptest = ip2long($matches[1]);\r\n if ($iptest) {\r\n if (empty($iplong)) $iplong = $iptest;\r\n if (!empty($ip_private_arr)) {\r\n foreach ($ip_private_arr as $ip_range) {\r\n $ipfrom = ip2long(trim($ip_range['from']));\r\n $ipto = ip2long(trim($ip_range['to']));\r\n if ($ipfrom<=$iptest && $iptest<=$ipto) {\r\n $iptest = 0;\r\n break;\r\n }\r\n }\r\n if ($iptest) $iplong = $iptest;\r\n }\r\n }\r\n }\r\n }\r\n return (!$iplong || $iplong==-1) ? FALSE : long2ip($iplong);\r\n}", "private function getIPPublic ()\n {\n $dbs = new DB ( $this->config['database'] );\n $search = $dbs->query(\"SELECT * FROM tbl_client_connection_priv WHERE\n priv_client_id LIKE '\". $this->c .\"%' order by private_rec_date desc limit 1\");\n\t\t\tif ( count ( $search ) ) {\n\t\t\t\t$this->result['id'] = $this->c;\n\t\t\t\t$this->result['real_ip_address'] = $search[0]['real_client_ip'];\n\t\t\t} else\n\t\t\t\t$this->result['data']['result'] = $this->c . \":No usage history found\";\n\t\t\t\n\t\t\t$dbs->CloseConnection ();\n\t\t\treturn;\n\t\t}", "public static function ip_info()\r\n {\r\n\r\n $a = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.self::get_client_ip()));\r\n \r\n $a = Input::filter_text($a);\r\n \r\n return $a;\r\n \r\n }", "function ip_visiteur() {\n\tif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\telseif(isset($_SERVER['HTTP_CLIENT_IP']))\n\t{\n\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t}\n\telse\n\t{\n\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t}\n\treturn $ip;\n}", "public function getIp($ip)\n {\n return getTrack()->getTrackingPaginatedByIp($ip);\n }", "public function getIp()\r\n\t{\r\n\t\tif($this->getQuality() != FALSE OR $this->getSks() != FALSE)\r\n\t\t{\r\n\t\t\t$ipk = $this->getQuality() / $this->getSks();\r\n\r\n\t\t\t$pembulatan = round($ipk, ceil($ipk));\r\n\t\t} else {\r\n\t\t\t$pembulatan = 0.0000;\r\n\t\t}\r\n\r\n\t\treturn substr($pembulatan, 0, 5);\r\n\t}", "function ip_is_local($ip){\r\n\t\r\n\t $ipv4array = explode('.',$ip); $ipv6array = explode(':',$ip);\r\n\t $lenipv4 = count($ipv4array) ; $lenipv6 = count($ipv6array); \r\n\t $ipint = array(); \r\n\t if($lenipv4 > 0 ){//We have an ipv4 address\r\n\t\t for ($i = 0 ; $i<$lenipv4 ; $i++){\r\n\t\t\t $ipint[$i] = intval($ipv4array[$i]) ; //Generating integera values for the ips\r\n\t\t }\r\n\t\t \r\n\t\t\t//Let's see if our IP is riv ate\r\n\t\t\tif ($ipint[0] == 10) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else if ($ipint[0] == 172 && $ipint[1] > 15 && $ipint[1] < 32) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else if ($ipint[0] == 192 && $ipint[1] == 168) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else return false ;\r\n\t }else{\r\n\t //Either something went wrong, or we are in IPV6 format.\t \r\n\t\t \r\n\t\t if( $lenipv6 > 0){//We are having a big IPV6 address here !\r\n\t\t\t //We are in IPV4. Haven't implemented IPV6 yet\r\n\t\t\t \r\n\t\t }\r\n\t\t return false ;\r\n\t }\r\n\t \r\n\t \r\n\t return false;\r\n}", "function get_next($ip) {\n\t\t\tif (IPv6::validate_subnet($ip)) {\n\t\t\t\tlist($ip, $cidr) = explode(\"/\", $ip);\n\t\t\t\treturn IPv6::get_next(IPv6::maxip($ip .\"/\" .$cidr)) .\"/\" .$cidr;\n\t\t\t} else if (IPv6::validate_ip($ip)) {\n\t\t\t\t$binip = IPv6::iptobin($ip);\n\t\t\t\tif ($binip == sprintf(\"%'1\", 128))\n\t\t\t\t\treturn false;\n\t\t\t\telse {\n\t\t\t\t\t$bits = str_split($binip);\n\t\t\t\t\tfor ($index = count($bits)-1; $index >= 0; $index--) {\n\t\t\t\t\t\tif ($bits[$index] == 1)\n\t\t\t\t\t\t\t$bits[$index] = 0;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$bits[$index] = 1;\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\treturn IPv6::bintoip(implode(\"\", $bits));\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\treturn false;\n\t\t}", "function ipInfo($ip)\n {\n $geoplugin_url = 'http://www.geoplugin.net/php.gp?ip=' . $ip;\n $ip_details = unserialize(file_get_contents($geoplugin_url));\n return $ip_details;\n }", "function getIps() {\n\t\treturn $this->findParentsOfClass('Ip');\n\t}", "public function getDeviceIP();", "public function ip()\n {\n return $this->rule('ip');\n }", "function getIPs() {\r\n $ip = $_SERVER[\"REMOTE_ADDR\"];\r\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n \t$ip .= '_'.$_SERVER['HTTP_X_FORWARDED_FOR'];\r\n }\r\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\r\n \t$ip .= '_'.$_SERVER['HTTP_CLIENT_IP'];\r\n }\r\n return $ip;\r\n}", "public function calcularTodas() {\n $padres = InventarioIp::where('Netmask', '=', 18)->select('IpAddress', 'Netmask', 'RangeId')->get();\n foreach ($padres as $padre) {\n $this->calcularIpArriba($padre->IpAddress, $padre->Netmask, $padre->RangeId);\n echo $padre->IpAddress . \"/\" . $padre->Netmask . \"<br>\";\n }\n }", "private static function ip2addr($intIp) {\n $arrUnknown = array(\n \"region\" => \"(unknown)\",\n \"address\" => \"(unknown)\"\n );\n $fileIp = fopen(__DIR__ . self::IPFILE, \"rb\");\n if (!$fileIp) return 1;\n $strBuf = fread($fileIp, 4);\n $intFirstRecord = self::bin2dec($strBuf);\n $strBuf = fread($fileIp, 4);\n $intLastRecord = self::bin2dec($strBuf);\n $intCount = floor(($intLastRecord - $intFirstRecord) / 7);\n if ($intCount < 1) return 2;\n $intStart = 0;\n $intEnd = $intCount;\n while ($intStart < $intEnd - 1) {\n $intMid = floor(($intStart + $intEnd) / 2);\n $intOffset = $intFirstRecord + $intMid * 7;\n fseek($fileIp, $intOffset);\n $strBuf = fread($fileIp, 4);\n $intMidStartIp = self::bin2dec($strBuf);\n if ($intIp == $intMidStartIp) {\n $intStart = $intMid;\n break;\n }\n if ($intIp > $intMidStartIp) $intStart = $intMid;\n else $intEnd = $intMid;\n }\n $intOffset = $intFirstRecord + $intStart * 7;\n fseek($fileIp, $intOffset);\n $strBuf = fread($fileIp, 4);\n $intStartIp = self::bin2dec($strBuf);\n $strBuf = fread($fileIp, 3);\n $intOffset = self::bin2dec($strBuf);\n fseek($fileIp, $intOffset);\n $strBuf = fread($fileIp, 4);\n $intEndIp = self::bin2dec($strBuf);\n if ($intIp < $intStartIp || $intIp > $intEndIp) return $arrUnknown;\n $intOffset += 4;\n while (($intFlag = ord(fgetc($fileIp))) == 1) {\n $strBuf = fread($fileIp, 3);\n $intOffset = self::bin2dec($strBuf);\n if ($intOffset < 12) return $arrUnknown;\n fseek($fileIp, $intOffset);\n }\n switch ($intFlag) {\n case 0:\n return $arrUnknown;\n break;\n case 2:\n $intOffsetAddr = $intOffset + 4;\n $strBuf = fread($fileIp, 3);\n $intOffset = self::bin2dec($strBuf);\n if ($intOffset < 12) return $arrUnknown;\n fseek($fileIp, $intOffset);\n while (($intFlag = ord(fgetc($fileIp))) == 2 || $intFlag == 1) {\n $strBuf = fread($fileIp, 3);\n $intOffset = self::bin2dec($strBuf);\n if ($intOffset < 12) return $arrUnknown;\n fseek($fileIp, $intOffset);\n }\n if (!$intFlag) return $arrUnknown;\n $arrAddr = array(\n \"region\" => chr($intFlag)\n );\n while (ord($c = fgetc($fileIp))) $arrAddr[\"region\"] .= $c;\n fseek($fileIp, $intOffsetAddr);\n while (($intFlag = ord(fgetc($fileIp))) == 2 || $intFlag == 1) {\n $strBuf = fread($fileIp, 3);\n $intOffset = self::bin2dec($strBuf);\n if ($intOffset < 12) {\n $arrAddr[\"address\"] = \"(unknown)\";\n return $arrAddr;\n }\n fseek($fileIp, $intOffset);\n }\n if (!$intFlag) {\n $arrAddr[\"address\"] = \"(unknown)\";\n return $arrAddr;\n }\n $arrAddr[\"address\"] = chr($intFlag);\n while (ord($c = fgetc($fileIp))) $arrAddr[\"address\"] .= $c;\n return $arrAddr;\n break;\n default:\n $arrAddr = array(\"region\" => chr($intFlag));\n while (ord($c = fgetc($fileIp))) $arrAddr[\"region\"] .= $c;\n while (($intFlag = ord(fgetc($fileIp))) == 2 || $intFlag == 1) {\n $strBuf = fread($fileIp, 3);\n $intOffset = self::bin2dec($strBuf);\n if ($intOffset < 12) {\n $arrAddr[\"address\"] = \"(unknown)\";\n return $arrAddr;\n }\n fseek($fileIp, $intOffset);\n }\n if (!$intFlag) {\n $arrAddr[\"address\"] = \"(unknown)\";\n return $arrAddr;\n }\n $arrAddr[\"address\"] = chr($intFlag);\n while (ord($c = fgetc($fileIp))) $arrAddr[\"address\"] .= $c;\n return $arrAddr;\n }\n }", "function getVisitorIP()\r\n {\r\n $ip_regexp = \"/^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})/\"; \r\n\r\n //Retrieve IP address from which the user is viewing the current page \r\n if (isset ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"]) && !empty ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"]))\r\n { \r\n $visitorIP = (!empty ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"])) ? $HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"] : ((!empty ($HTTP_ENV_VARS['HTTP_X_FORWARDED_FOR'])) ? $HTTP_ENV_VARS['HTTP_X_FORWARDED_FOR'] : @ getenv ('HTTP_X_FORWARDED_FOR')); \r\n } \r\n else\r\n { \r\n $visitorIP = (!empty ($HTTP_SERVER_VARS['REMOTE_ADDR'])) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ((!empty ($HTTP_ENV_VARS['REMOTE_ADDR'])) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : @ getenv ('REMOTE_ADDR')); \r\n } \r\n\r\n return $visitorIP; \r\n }", "function get_all_ip()\r\n{ \r\n global $db,$strings;\r\n $count = 0;\r\n $result = $db->query('SELECT ip_id,ipaddr FROM ipmap ORDER BY ipaddr ASC');\r\n\r\n while (@extract($db->fetch_array($result), EXTR_PREFIX_ALL, 'db')) {\r\n \t$iplist[$db_ip_id] = $db_ipaddr;\r\n\t\t$count ++;\r\n }\r\n\r\n\t$iplist[-1] = $strings[IPMAP_NOTASSIGNED];\r\n \r\n return $iplist;\r\n}", "function getVisitorIP() {\n $ip = \"0.0.0.0\";\n if( ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) && ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) ) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif( ( isset( $_SERVER['HTTP_CLIENT_IP'])) && (!empty($_SERVER['HTTP_CLIENT_IP'] ) ) ) {\n $ip = explode(\".\",$_SERVER['HTTP_CLIENT_IP']);\n $ip = $ip[3].\".\".$ip[2].\".\".$ip[1].\".\".$ip[0];\n } elseif((!isset( $_SERVER['HTTP_X_FORWARDED_FOR'])) || (empty($_SERVER['HTTP_X_FORWARDED_FOR']))) {\n if ((!isset( $_SERVER['HTTP_CLIENT_IP'])) && (empty($_SERVER['HTTP_CLIENT_IP']))) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n }\n return $ip;\n}", "public function getPadres(){\n return $this->vectorUrlsPadres;\n }", "function findNet($ip,$sm) {\n\n $res = \"\";\n\n // divido gli ottetti\n $exip = explode('.',$ip);\n $exsm = explode('.',$sm);\n\n for($i=0; $i<4; $i++) {\n\n $subip=$exip[$i]; // ottetto del IP\n $subsm=$exsm[$i]; // ottetto della SM\n\n for($k=0; $k<8; $k++) {\n \n if($subip[$k] & $subsm[$k]) {\n $res.=\"1\";\n }\n else {\n $res.=\"0\";\n }\n }\n\n // rimetto i punti (tranne alla fine)\n if($i<3) {\n $res.=\".\";\n }\n \n }\n\n return $res;\n}", "public function getRemoteIp();", "function getCountry($ip_address){\n $url = \"http://ip-to-country.webhosting.info/node/view/36\";\n $inici = \"src=/flag/?type=2&cc2=\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST,\"POST\");\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"ip_address=$ip_address\"); \n \n ob_start();\n \n curl_exec($ch);\n curl_close($ch);\n $cache = ob_get_contents();\n ob_end_clean();\n \n $resto = strstr($cache,$inici);\n $pais = substr($resto,strlen($inici),2);\n \n return $pais;\n }", "function id_domaine($ip){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"SELECT id_relais FROM relais_mail WHERE ip = '$ip'\");\n\t\t//$req->execute(array(\"ip_domain\"=>'$ip'));\n\n\t\twhile($results = $req->fetch()){\n\t\t\t$result = $results[\"id_relais\"];\n\t\t}\n\n\t\treturn $result;\n\t}", "abstract public function getIpLocation($ip);", "function get_ip(){?\r\r\t$do_check = 1;\r\r\t$addrs = array();\r\r\r\r\tif( $do_check )\r\r\t{\r\r\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\r\t\t foreach( array_reverse(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])) as $x_f )\r\r \t\t{\r\r \t\t\t$x_f = trim($x_f);\r\r \t\t\tif( preg_match('/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/', $x_f) )\r\r \t\t\t{\r\r \t\t\t\t$addrs[] = $x_f;\r\r \t\t\t}\r\r \t\t}\r\r\t\t}\r\r \r\r\r\r\t\tif(isset($_SERVER['HTTP_CLIENT_IP'])) $addrs[] = $_SERVER['HTTP_CLIENT_IP'];\r\r\t\tif(isset($_SERVER['HTTP_PROXY_USER'])) $addrs[] = $_SERVER['HTTP_PROXY_USER'];\r\r\t}\r\r\r\r\t$addrs[] = $_SERVER['REMOTE_ADDR'];\r\r\r\r\tforeach( $addrs as $v )\r\r\t{\r\r\t\tif( $v )\r\r\t\t{\r\r\t\t\tpreg_match(\"/^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/\", $v, $match);\r\r\t\t\t$ip = $match[1].'.'.$match[2].'.'.$match[3].'.'.$match[4];\r\r\r\r\t\t\tif( $ip && $ip != '...' )\r\r\t\t\t{\r\r\t\t\t\tbreak;\r\r\t\t\t}\r\r\t\t}\r\r\t}\r\r\r\r\tif( ! $ip || $ip == '...' )\r\r\t{\r\r\t\techo \"Không thể xác định địa chỉ IP của bạn.\";\r\r\t}\r\r\r\r\treturn $ip;\r\r}", "function getVisitorsOnline(): int\n{\n return cache()->remember('i.visitorsOnline', getCacheILifetime('visitorsOnline'), function () {\n $onlinePeriod = 10; // minutes\n return \\App\\Models\\PageViews::select('user_ip')\n ->distinct()\n ->where('created_at', '>', now()->subMinutes($onlinePeriod))\n ->count(['user_ip']);\n });\n}", "public function getIps()\n {\n return $this->ips;\n }", "function get_ip_address()\n{\n $ip = $_SERVER['REMOTE_ADDR'];\n return $_SERVER['REMOTE_ADDR'];\n //return var_export(unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip)));\n}", "function ipRange($ip){\n\n $ipArray = [];\n\n $ipadd = explode(\".\", $ip);\n\n #For loop that traverses the closely matching objects in the db\n #to check if it is composed of a range (specified with a \"-\" or a \"~\")\n for ($i = 0; $i < sizeof($ipadd); $i++){\n \tif(strpos(($ipadd[$i]), \"-\") == true){\n \t$octet = $i;\n $iprange = explode(\"-\",$ipadd[$i]);\n $min = $iprange[0];\n $max = $iprange[1]; \n \t}\n \telse if(strpos(($ipadd[$i]), \"~\") == true){\n \t$octet = $i;\n $iprange = explode(\"~\",$ipadd[$i]);\n $min = $iprange[0];\n $max = $iprange[1]; \n \t}\n\n }\n\n\n for($i = $min; $i <= $max; $i++){\n $ipadd[$octet] = $i;\n \n for ($j = 0; $j < sizeof($ipadd); $j++){\n\n $address = implode(\".\", $ipadd);\n }\n \n $ipArray[] = $address;\n \n }\n\n #Return the list of all IP addresses in the range\n return $ipArray;\n\n }", "static function getIpLong()\n {\n return ip2long(self::getIp());\n }", "function ip()\n{\n return \\SumanIon\\CloudFlare::ip();\n}", "public static function pton($ip)\n {\n // Detect the IP version\n $ipv = self::detectIPVersion($ip);\n\n // Check for IPv4 first since that's most common\n if ($ipv === 4) {\n return current(unpack(\"A4\", inet_pton($ip)));\n }\n\n // Then attempt IPv6\n if ($ipv === 6) {\n return current(unpack(\"A16\", inet_pton($ip)));\n }\n\n // Throw an exception if an invalid IP was supplied\n throw new \\Exception(\"Invalid IP address supplied.\");\n }", "private function getIp()\n\t {\n\t \n\t if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&( $_SERVER['HTTP_X_FORWARDED_FOR'] != '' ))\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t \n\t // los proxys van añadiendo al final de esta cabecera\n\t // las direcciones ip que van \"ocultando\". Para localizar la ip real\n\t // del usuario se comienza a mirar por el principio hasta encontrar\n\t // una dirección ip que no sea del rango privado. En caso de no\n\t // encontrarse ninguna se toma como valor el REMOTE_ADDR\n\t \n\t $entries = split('[, ]', $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t \n\t reset($entries);\n\t while (list(, $entry) = each($entries))\n\t {\n\t $entry = trim($entry);\n\t if ( preg_match(\"/^([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)/\", $entry, $ip_list) )\n\t {\n\t // http://www.faqs.org/rfcs/rfc1918.html\n\t $private_ip = array(\n\t '/^0\\./',\n\t '/^127\\.0\\.0\\.1/',\n\t '/^192\\.168\\..*/',\n\t '/^172\\.((1[6-9])|(2[0-9])|(3[0-1]))\\..*/',\n\t '/^10\\..*/');\n\t \n\t $found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);\n\t \n\t if ($client_ip != $found_ip)\n\t {\n\t $client_ip = $found_ip;\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t else\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t }\n\t \n\t return $client_ip;\n\t \n\t}", "function getIp()\n{\n $ip = false;\n\n if(!empty($_SERVER['HTTP_CLIENT_IP']))\n {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n {\n $ips = explode(\",\", \n $_SERVER['HTTP_X_FORWARDED_FOR']);\n for ($i = 0; $i < count($ips); $i++)\n {\n $ips = trim($ips[$i]);\n if (!eregi(\"^(10|172\\.16|192\\.168)\\.\", \n $ips[$i]))\n {\n $ip = $ips[$i];\n break;\n }\n }\n }\n elseif (!empty($_SERVER['HTTP_VIA']))\n {\n $ips = explode(\",\", \n $_SERVER['HTTP_VIA']);\n for ($i = 0; $i < count($ips); $i++)\n {\n $ips = trim($ips[$i]);\n if (!eregi(\"^(10|172\\.16|192\\.168)\\.\", \n $ips[$i]))\n {\n $ip = $ips[$i];\n break;\n }\n }\n }\n elseif (!empty($_SERVER['REMOTE_ADDR']))\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n if (($longip = ip2long($ip)) !== false)\n {\n if ($ip == long2ip($longip))\n {\n return $ip;\n }\n }\n \n return false;\n}", "public function getVisitorIP(){\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t$proxy = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\n\t\tif(preg_match(\"/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/\",$proxy))\n\t\t $ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\n\t\t//return '127.0.0.1';\n\t\treturn $ip;\n\t}", "public function _before_index(){\n// $ip = get_client_ip();\n// $res = $ip_class->getlocation('113.102.162.102');\n// print_r($res);\n \n \n }", "public static function validIpDataProvider() {}", "public function getALLfromIP($addr) {\n $db = $this->db;\n $ipnum = sprintf(\"%u\", ip2long($addr));\n $query = \"SELECT cc, cn FROM ip NATURAL JOIN cc WHERE ${ipnum} BETWEEN start AND end\";\n $result = $db->fetchRow($query);\n \n return $result;\n }", "function phpTrafficA_ipbased($c,$pageid,$ip,$agent,$time,$conf,$table,$site,$visitCutoff,$tmpdir,$ip2c,$resolution) {\n\n$max_keep_ipbased = $visitCutoff*60; // 1800 = 30 minutes, 3600 = 1 hour\n$pageid = trim($pageid, \" \\n\\r\");\n$tmpfile = \"$tmpdir/ipbased.$table.dat\";\nif (!file_exists($tmpfile)) {\n\ttouch($tmpfile);\n}\n$stats = file(\"$tmpfile\");\n$found = FALSE;\n$newpath = TRUE;\n$newString = \"\";\nforeach($stats as $log) {\n\t$log_arr = explode(\"|>|\", $log);\n\t$host = $log_arr[0];\n\t$first = $log_arr[1];\n\t$last = $log_arr[2];\n\t$clicks = $log_arr[3];\n\t$thispath = $log_arr[4];\n\tif ($first>100) {\n\t\tif ($host==$ip) {\n\t\t\tif ($last+$max_keep_ipbased > $time) {\n\t\t\t\t$newpath = FALSE;\n\t\t\t\t$clicks += 1;\n\t\t\t\t$thispath .= \"|$pageid\";\n\t\t\t\t$newString .= \"$ip|>|$first|>|$time|>|$clicks|>|$thispath|>|\\n\";\n\t\t\t} else {\n\t\t\t\tphpTrafficA_insert_ipbased_entry($c, $table, $first, $last, $clicks, $thispath, $host,$tmpdir);\n\t\t\t\t$newString .= \"$ip|>|$time|>|$time|>|1|>|$pageid|>|\\n\";\n\t\t\t}\n\t\t\t$found = TRUE;\n\t\t} else {\n\t\t\tif ($last+$max_keep_ipbased > $time) {\n\t\t\t\t$newString .= \"$host|>|$first|>|$last|>|$clicks|>|$thispath|>|\\n\";\n\t\t\t} else {\n\t\t\t\tphpTrafficA_insert_ipbased_entry($c, $table, $first, $last, $clicks, $thispath, $host,$tmpdir);\n\t\t\t}\n\t\t}\n\t}\n}\nif (!$found) { $newString .= \"$ip|>|$time|>|$time|>|1|>|$pageid|>|\\n\";}\n$newstats =fopen(\"$tmpfile\", \"w\");\nflock ($newstats,2);\nfwrite($newstats,$newString);\n// @flock ($newstats,3); Removed. No need to free the lock since it is done automatically when closing.\nfclose($newstats);\n\nif ($newpath) {\n\t// Add country, OS, and browser\n\t$monthstring = date(\"Y-m\",$time).\"-01\";\n\tlist($wb,$os)=explode(\";\",phpTrafficA_ExtractAgent($agent,$conf['browser_id'],$conf['browser_label'],$conf['os_id'],$conf['os_label']));\n\t$test = phpTrafficA_addDB_LDC(\"${table}_os\",$c,$monthstring,$os);\n\t$test = phpTrafficA_addDB_LDC(\"${table}_browser\",$c,$monthstring,$wb);\n\tif (!(preg_match(\"/Crawler/i\", $wb))) {\n\t\tif (!(preg_match(\"/Google/i\", $wb))) {\n\t\t\t$country = ip2Country($ip,$ip2c);\n\t\t\t$test = phpTrafficA_addDB_LDC(\"${table}_country\",$c,$monthstring,$country);\n\t\t}\n\t}\n}\n\n// If screen resolution has been recorded, store it for this IP\nif (trim($resolution)!=\"\") {\n\t$tmpfile = \"$tmpdir/resolution.$table.dat\";\n\tif (!file_exists($tmpfile)) {\n\t\ttouch($tmpfile);\n\t}\n\t$stats = file(\"$tmpfile\");\n\t$found = FALSE;\n\t$newString = \"\";\n\tforeach($stats as $log) {\n\t\t$log_arr = explode(\"|>|\", $log);\n\t\t$host = $log_arr[0];\n\t\t$res = $log_arr[1];\n\t\tif ($host==$ip) {\n\t\t\t$newString .= \"$ip|>|$resolution\\n\";\n\t\t\t$found = true;\n\t\t} else if (trim($host) != '') $newString .= \"$host|>|$res\\n\";\n\t}\n\tif (!$found) $newString .= \"$ip|>|$resolution\\n\";\n\t$newstats =fopen(\"$tmpfile\", \"w\");\n\tflock ($newstats,2);\n\tfwrite($newstats,$newString);\n\t// @flock ($newstats,3);Removed. No need to free the lock since it is done automatically when closing.\n\tfclose($newstats);\n}\n\nreturn 1;\n}", "public static function fetch_alt_ip() {\n $alt_ip = $_SERVER['REMOTE_ADDR'];\n\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $alt_ip = $_SERVER['HTTP_CLIENT_IP'];\n } else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches)) {\n // try to avoid using an internal IP address, its probably a proxy\n $ranges = array(\n '10.0.0.0/8' => array(ip2long('10.0.0.0'), ip2long('10.255.255.255')),\n '127.0.0.0/8' => array(ip2long('127.0.0.0'), ip2long('127.255.255.255')),\n '169.254.0.0/16' => array(ip2long('169.254.0.0'), ip2long('169.254.255.255')),\n '172.16.0.0/12' => array(ip2long('172.16.0.0'), ip2long('172.31.255.255')),\n '192.168.0.0/16' => array(ip2long('192.168.0.0'), ip2long('192.168.255.255')),\n );\n foreach ($matches[0] AS $ip) {\n $ip_long = ip2long($ip);\n if ($ip_long === false) {\n continue;\n }\n\n $private_ip = false;\n foreach ($ranges AS $range) {\n if ($ip_long >= $range[0] AND $ip_long <= $range[1]) {\n $private_ip = true;\n break;\n }\n }\n\n if (!$private_ip) {\n $alt_ip = $ip;\n break;\n }\n }\n } else if (isset($_SERVER['HTTP_FROM'])) {\n $alt_ip = $_SERVER['HTTP_FROM'];\n }\n\n return $alt_ip;\n }", "function IsVPN($ip)\n{\n $iphub = json_decode(ReadURL(\"https://v2.api.iphub.info/guest/ip/\" . GetUserIP()));\n return $iphub->block;\n}", "function eventoni_get_visitor_ip()\n{\n\treturn $_SERVER['REMOTE_ADDR'];\n}", "function getMembersOnline(): int\n{\n return cache()->remember('i.membersOnline', getCacheILifetime('membersOnline'), function () {\n $onlinePeriod = 10; // minutes\n return \\App\\Models\\PageViews::select('user_ip')\n ->distinct()\n ->where('created_at', '>', now()->subMinutes($onlinePeriod))\n ->where('user_id', '!=', '')\n ->count(['user_ip']);\n });\n}", "public function getIPAddress(): string;", "function forwarded_ip() {\n\n $server=array(\n 'HTTP_X_FORWARDED_FOR'=>'123.123.123.123.',\n );\n\n\n $keys = array(\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'HTTP_CLIENT_IP',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n );\n\n foreach($keys as $key) {\n if(isset($server[$key])) {\n $ip_array = explode(',', $server[$key]);\n foreach($ip_array as $ip) {\n $ip = trim($ip);\n if(validateIp($ip)){\n return $ip;\n }\n\n }\n }\n }\n return '';\n }", "function getIP(){\r\n$ip = $_SERVER['REMOTE_ADDR'];\r\n\t//lay IP neu user truy cap qua Proxy\r\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n } else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n }\r\nreturn $ip;\r\n}", "function is_ip_banned($ip, $banned_ips)\n {\n foreach($banned_ips as $banned_ip) // go through every $banned_ip\n {\n if(strpos($banned_ip,'*')!==false) // $banned_ip contains \"*\" = > IP range\n {\n $ip_range = substr($banned_ip, 0, strpos($banned_ip, '*')); // fetch part before \"*\"\n if(strpos($ip, $ip_range)===0) // check if IP begins with part before \"*\"\n {\n return true;\n }\n }\n elseif(strpos($banned_ip,'/')!==false && preg_match(\"/(([0-9]{1,3}\\.){3}[0-9]{1,3})\\/([0-9]{1,2})/\", $banned_ip, $regs)) // $banned_ip contains \"/\" => CIDR notation (the regular expression is only used if $banned_ip contains \"/\")\n {\n // convert IP into bit pattern:\n $n_user_leiste = '00000000000000000000000000000000'; // 32 bits\n $n_user_ip = explode('.',trim($ip));\n for ($i = 0; $i <= 3; $i++) // go through every byte\n {\n for ($n_j = 0; $n_j < 8; $n_j++) // ... check every bit\n {\n if($n_user_ip[$i] >= pow(2, 7-$n_j)) // set to 1 if necessary\n {\n $n_user_ip[$i] = $n_user_ip[$i] - pow(2, 7-$n_j);\n $n_user_leiste[$n_j + $i*8] = '1';\n }\n }\n }\n // analyze prefix length:\n $n_byte_array = explode('.',trim($regs[1])); // IP -> 4 Byte\n $n_cidr_bereich = $regs[3]; // prefix length\n // bit pattern:\n $n_bitleiste = '00000000000000000000000000000000';\n for ($i = 0; $i <= 3; $i++) // go through every byte\n {\n if ($n_byte_array[$i] > 255) // invalid\n {\n $n_cidr_bereich = 0;\n }\n for ($n_j = 0; $n_j < 8; $n_j++) // ... check every bit\n {\n if($n_byte_array[$i] >= pow(2, 7-$n_j)) // set to 1 if necessary\n {\n $n_byte_array[$i] = $n_byte_array[$i] - pow(2, 7-$n_j);\n $n_bitleiste[$n_j + $i*8] = '1';\n }\n }\n }\n // check if bit patterns match on the first n chracters:\n if (strncmp($n_bitleiste, $n_user_leiste, $n_cidr_bereich) == 0 && $n_cidr_bereich > 0)\n {\n return true;\n }\n }\n else // neither \"*\" nor \"/\" => simple comparison:\n {\n if($ip == $banned_ip)\n {\n return true;\n }\n }\n }\n return false;\n }", "public function getUseIPAddress() \n \t{\n \t\treturn $this->use_ipaddr;\n \t}", "public function getIpAdress(){\n return $this->auth['ip_adress'];\n }", "public function probe_ip($ip)\n {\n return $this->connection->query_select('posts', array('DISTINCT uid AS id'), array('ipaddress' => $ip));\n }", "public static function getIPs(): array\n {\n return self::$ips;\n }", "function find($ip, $url, $limit);", "function getVisita($conexion,$ip,$fecha){\r\n $var = \"numeroTransacciones\";\r\n $consu = \"select count(*) as $var from visitas where ip_cliente ='$ip'\r\n and fecha ='$fecha'\";\r\n if(consulta($conexion,$consu,$var)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "function ip($ip){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT ip FROM relais_mail WHERE ip = :ip\");\n\t\t$req->execute(array(\"ip\"=>$ip));\n\n\t\t$exist = $req->rowCount();\n\t\t$req->closeCursor();\n\n\t\treturn $exist;\n\t}", "function getCamIP($name) {\n\t$query = sprintf(\"SELECT ipaddress FROM Nodes WHERE nodename ='%s'\",\n\t\tmysql_real_escape_string($name));\n\t$result = db_query($query);\n\t$row = mysql_fetch_row($result);\n\treturn $row[0];\n}", "public function getCallbackIp()\r\n {\r\n return $this->parseJSON('get', [self::API_CALLBACK_IP]);\r\n }", "public function getPublicIP() {\r\n // post content and post api url\r\n $data = array(\"type\" => \"ip\");\r\n $url = \"https://api.hooowl.com/getIP.php\";\r\n // post action and then decode json packet to object\r\n $response = $this->post($data, $url);\r\n $response = json_decode($response);\r\n // detect the response code\r\n // var_dump($response); \r\n if (isset($response->post_errno)) {\r\n return $this->post_response(false, $response->post_errno, $response->value);\r\n } elseif ($response->code != 1) {\r\n return $this->post_response(false, $response->code, $response->value);\r\n } else\r\n return $this->post_response(true, $response->code, $response->value);\r\n }", "function myip2long($a) {\r\n $inet = 0.0;\r\n $t = explode(\".\", $a);\r\n for ($i = 0; $i < 4; $i++) {\r\n $inet *= 256.0;\r\n $inet += $t[$i];\r\n };\r\n return $inet;\r\n}", "function VisitorIP() { \n\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t$TheIp=$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t} else { $TheIp=$_SERVER['REMOTE_ADDR']; }\t\t\n\t\treturn trim($TheIp);\n }", "function readPcpInfo()\n{\n $params = readConfigParams(array('pcp_port'));\n return $params;\n}", "function get_latlon_ip($ip){\n\t$url = 'http://www.geoplugin.net/php.gp?ip='.$ip;\n\tif($geo = unserialize(file_get_contents($url))){\n\t\t$lat = $geo['geoplugin_latitude'];\n\t\t$lon = $geo['geoplugin_longitude'];\n\t\treturn sprintf('%s,%s',$lat,$lon);\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "function vIP( $ip )\r\n\t\t{\r\n\t\t return filter_var( $ip, FILTER_VALIDATE_IP );\r\n\t\t \r\n\t\t}", "function getipInfoBydomain($domain){\r\n $ipaddress=gethostbyname($domain);\r\n return $ipaddress;\r\n}", "function get_location_ip($ip){\n\t$url = 'http://www.geoplugin.net/php.gp?ip='.$ip;\n\tif($geo = unserialize(file_get_contents($url))){\n\t\t$geo = array(\n\t\t\t'lat' => $geo['geoplugin_latitude'],\n\t\t\t'lon' => $geo['geoplugin_longitude'],\n\t\t\t'city' => $geo['geoplugin_city'],\n\t\t\t'ccode' => $geo['geoplugin_countryCode'],\n\t\t\t'county' => $geo['geoplugin_countryName']\n\t\t);\n\t\treturn $geo;\n\t}\n\telse {\n\t\treturn array();\n\t}\n}", "public static function ipDejaUtilise($ip)\n\t{\n\t\t//7 jours\n\t\treturn self::count(array('ip','last_connection'),array('ILIKE','>'),array($ip,date('Y-m-d H:i:s',time()-7*24*60*60))) > 0;\n\t}", "function ipValid($ip) {\n $matches = [];\n $pattern =\"/([1-9]\\.|[1-9]\\d\\.|1\\d\\d\\.|25[0-5]\\.|2[0-4][0-9]\\.)(\\.\\d|[1-9]\\d|1\\d\\d|25[0-5]|2[0-4][0-9]){3}/\";\n preg_match($pattern, $ip, $matches);\n return $matches[0];\n}", "static function getIP()\r\n {\r\n return self::getRemoteIP();\r\n }", "private function initAccessByIp( )\r\n {\r\n // No access by default\r\n $this->bool_accessByIP = false;\r\n\r\n // Get list with allowed IPs\r\n $csvIP = $this->ffConfigIp;\r\n $currentIP = t3lib_div :: getIndpEnv( 'REMOTE_ADDR' );\r\n\r\n // Current IP is an element in the list\r\n $pos = strpos( $csvIP, $currentIP );\r\n if( ! ( $pos === false ) )\r\n {\r\n $this->bool_accessByIP = true;\r\n }\r\n // Current IP is an element in the list\r\n \r\n // DRS\r\n if( ! $this->b_drs_flexform )\r\n {\r\n return;\r\n }\r\n switch( $this->bool_accessByIP )\r\n {\r\n case( true ):\r\n $prompt = 'Access: current IP matchs the list of allowed IP. Result will prompt to the frontend.';\r\n t3lib_div::devlog(' [OK/FLEXFORM] '. $prompt, $this->extKey, -1 );\r\n break;\r\n case( false ):\r\n default:\r\n $prompt = 'No access: current IP doesn\\'t match the list of allowed IP. Result won\\'t prompt to the frontend.';\r\n t3lib_div::devlog(' [WARN/FLEXFORM] '. $prompt, $this->extKey, 2 );\r\n break;\r\n }\r\n // DRS\r\n\r\n \r\n }", "function recentlyDownloaded($ip) {\n\t}", "function getLocationInfoByIp($ip){\r\n\r\n $ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\r\n if($ip_data && $ip_data->geoplugin_countryName != null){\r\n $result['country'] = $ip_data->geoplugin_countryCode;\r\n $result['city'] = $ip_data->geoplugin_city;\r\n }\r\n $country_short=$result['country'];\r\n $country_name=Locale::getDisplayRegion('sl-Latn-'.$country_short.'-nedis', 'en');\r\n return $country_name;\r\n}", "function forwarded_ip(){\n\n // for testing \n $server = array(\n // 'HTTP_X_FORWARDED_FOR'=> \"0.0.0.0,1sd.1.2.3\",\n // 'HTTP_X_FORWARDED' => \"jlaldjfl,99adf,123.123.123.123,1.2.4.4\",\n \n );\n\n $keys = array(\n 'HTTP_X_FORWARDED_FOR', \n 'HTTP_X_FORWARDED', \n 'HTTP_FORWARDED_FOR', \n 'HTTP_FORWARDED',\n 'HTTP_CLIENT_IP', \n 'HTTP_X_CLUSTER_CLIENT_IP',\n );\n\n foreach($keys as $key){\n if(isset($_SERVER[$key])){\n $ip_array = explode(\",\",$_SERVER[$key]);\n\n foreach($ip_array as $ip){\n $ip = trim($ip);\n if(validate_ip($ip)){\n return $ip;\n }\n }\n }\n }\n\n return \"\";\n\n}", "function get_task_ip_Array(){\n\n\t\t$taskIpArray = array();\n\n\t\tGlobal $mobileArray,$wifiArray;\n\n\t\tfor ($i=0; $i < count($mobileArray); $i++) {\n\n\t\t\t$tempArray = getRandIp($mobileArray[$i],50);\n\n\t\t\tfor ($j=0; $j < count($tempArray); $j++) {\n\t\t\t\t\n\t\t\t\t$taskIpArray[] = $tempArray[$j];\n\t\t\t}\n\n\t\t}\n\n\n\t\tfor ($i=0; $i < count($wifiArray); $i++) {\n\n\t\t\t$tempArray = getRandIp($wifiArray[$i],50);\n\n\t\t\tfor ($j=0; $j < count($tempArray); $j++) {\n\t\t\t\t\n\t\t\t\t$taskIpArray[] = $tempArray[$j];\n\t\t\t}\n\n\t\t}\n\n\t\t// var_dump($taskIpArray);\n\t\treturn $taskIpArray;\n\t}", "public function ipAddress(){\n return $this->getServerVar('REMOTE_ADDR');\n }", "function isValidIP($ip_addr){\n //first of all the format of the ip address is matched\n if(preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\",$ip_addr)) {\n //now all the intger values are separated\n $parts=explode(\".\",$ip_addr);\n //now we need to check each part can range from 0-255\n foreach($parts as $ip_parts) {\n if(intval($ip_parts)>255 || intval($ip_parts)<0)\n return false; //if number is not within range of 0-255\n }\n return true;\n }\n else\n return false; //if format of ip address doesn't matches\n}", "public function ip()\n {\n $serverAll = parent::server();\n\n // source: https://stackoverflow.com/a/41769505\n foreach (['HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'] as $key) {\n if (array_key_exists($key, $serverAll) === true) {\n foreach (explode(',', $serverAll[$key]) as $ip) {\n $ip = trim($ip); // just to be safe\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n\n return parent::ip();\n }", "function myip2long_r($a) {\r\n $inet = 0.0;\r\n $t = explode(\".\", $a);\r\n for ($i = 3; $i >= 0; $i --) {\r\n $inet *= 256.0;\r\n $inet += $t[$i];\r\n };\r\n return $inet;\r\n}", "function wp_privacy_anonymize_ip($ip_addr, $ipv6_fallback = \\false)\n {\n }", "function getEachIpInRange($cidr) {\n $ips = array();\n $range = array();\n\n $cidr = explode('/', $cidr);\n $range['firstIP'] = (ip2long($cidr[0])) & ((-1 << (32 - (int)$cidr[1])));\n $range['lastIP'] = (ip2long($cidr[0])) + pow(2, (32 - (int)$cidr[1])) - 1;\n\n for ($ip = $range['firstIP']; $ip <= $range['lastIP']; $ip++) {\n $ips[] = long2ip($ip);\n }\n return $ips;\n}", "public function detectIPChange()\n\t{\n\t\t$row = $this->handler->get_table_row();\n\t\t$current_ip = PlatformDetector::getClientIp();\n\n\t\t// detect IP changing\n\t\t// check that $row['ip_address'] isset so this logic won't be execute when session is just created (not yet in DB)\n\t\tif (isset($row['ip_address']) && $row['ip_address'] != $current_ip) {\n\t\t\t// this code will be executed only if last session's state had different IP address\n\t\t\tUserActivityLogger::log('SESSIP', Auth::check() ? Auth::user()->id : 0, 0, $current_ip);\n\t\t};\n\t}", "public static function ipLoginAttempts($ip = null)\r\n {\r\n if (!filter_var($ip, FILTER_VALIDATE_IP)) {\r\n $ip = Help::getIp();\r\n }\r\n $return = App::$db->\r\n create('SELECT count(user_id) as attempts FROM user_logs WHERE ip = :ip AND `timestamp` > :timenow AND `action` = :action AND `what` = :what')->\r\n bind($ip, 'ip')->\r\n bind(time() - 1200, 'timenow')->\r\n bind('FAILLOGIN', 'action')->\r\n bind('A', 'what')->\r\n execute();\r\n\r\n return $return[0]['attempts'];\r\n }", "function getIp() {\r\n $ip = $_SERVER['REMOTE_ADDR'];\r\n \r\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n }\r\n \r\n return $ip;\r\n\r\n\r\n\r\n\r\n//getting the cart\r\n}", "function geoCheckIP($ip)\n{\n\t if(!filter_var($ip, FILTER_VALIDATE_IP))\n\t {\n\t\t\t throw new InvalidArgumentException(\"IP is not valid\");\n\t }\n\n\t //contact ip-server\n\t \n\t //$response=@file_get_contents('http://www.netip.de/search?query='.$ip);\n\t $response=@file_get_contents('http://api.hostip.info/country.php?ip='.$ip);\n\t \n\t if (empty($response))\n\t {\n\t\t\t throw new InvalidArgumentException(\"Error contacting Geo-IP-Server\");\n\t }\n\n\t /*\n\t //Array containing all regex-patterns necessary to extract ip-geoinfo from page\n\t $patterns=array();\n\t $patterns[\"domain\"] = '#Domain: (.*?)&nbsp;#i';\n\t $patterns[\"country\"] = '#Country: (.*?)&nbsp;#i';\n\t $patterns[\"state\"] = '#State/Region: (.*?)<br#i';\n\t $patterns[\"town\"] = '#City: (.*?)<br#i';\n\n\t //Array where results will be stored\n\t $ipInfo=array();\n\n\t //check response from ipserver for above patterns\n\t foreach ($patterns as $key => $pattern)\n\t {\n\t\t\t //store the result in array\n\t\t\t $ipInfo[$key] = preg_match($pattern,$response,$value) && !empty($value[1]) ? $value[1] : 'not found';\n\t }\n\n\t return $ipInfo;\n\t */\n\t return $response;\n}", "function nSmFromIp($sm) {\n\n $count = 0;\n\n for($i=0;$i<32;$i++) {\n\n if($sm[$i]==\"1\") {\n $count++;\n }\n }\n \n return $count;\n}", "public function getIpAddress();", "function rest_is_ip_address($ip)\n {\n }", "public static function query($ip = NULL) {\r\n $ip = trim($ip);\r\n if (empty($ip)) {\r\n //$ip = \\Drupal::request()->getClientIp();\r\n\t $ip = self::getUserIP();\r\n }\r\n // Use a static cache if this function is called more often\r\n // for the same ip on the same page.\r\n $results = &drupal_static(__FUNCTION__);\r\n if (isset($results[$ip])) {\r\n return $results[$ip];\r\n }\r\n /** @var \\Drupal\\smart_ip\\GetLocationEvent $event */\r\n $event = \\Drupal::service('smart_ip.get_location_event');\r\n $location = $event->getLocation();\r\n $location->set('source', SmartIpLocationInterface::SMART_IP)\r\n ->set('ipAddress', $ip)\r\n ->set('ipVersion', self::ipAddressVersion($ip))\r\n ->set('timestamp', REQUEST_TIME);\r\n // Allow Smart IP source module populate the variable\r\n \\Drupal::service('event_dispatcher')->dispatch(SmartIpEvents::QUERY_IP, $event);\r\n $result = $location->getData();\r\n if (isset($result['latitude']) && isset($result['longitude'])) {\r\n // If coordinates are (0, 0) there was no match\r\n if ($result['latitude'] === 0 && $result['longitude'] === 0) {\r\n $result['latitude'] = NULL;\r\n $result['longitude'] = NULL;\r\n }\r\n }\r\n // Make sure external data in UTF-8.\r\n foreach ($result as &$item) {\r\n if (is_string($item) && !mb_detect_encoding($item, 'UTF-8', TRUE)) {\r\n $item = mb_convert_encoding($item, 'UTF-8', 'ISO-8859-1');\r\n }\r\n }\r\n $location->setData($result);\r\n // Allow other modules to modify the result via Symfony Event Dispatcher\r\n \\Drupal::service('event_dispatcher')->dispatch(SmartIpEvents::DATA_ACQUIRED, $event);\r\n $result = $location->getData();\r\n\t$result['ipAddress'] = $ip;\r\n $results[$ip] = $result;\r\n return $result;\r\n }", "public static function validate_ip($value){\n\t\treturn preg_match( \"/^(([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/\", $value);\n\t}", "public function getClientIps()\n {\n $clientIps = array();\n $ip = $this->server->get('REMOTE_ADDR');\n if (!$this->isFromTrustedProxy()) {\n return array($ip);\n }\n if (self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED])) {\n $forwardedHeader = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]);\n preg_match_all('{(for)=(\"?\\[?)([a-z0-9\\.:_\\-/]*)}', $forwardedHeader, $matches);\n $clientIps = $matches[3];\n } elseif (self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP])) {\n $clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP])));\n }\n $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from\n $ip = $clientIps[0]; // Fallback to this when the client IP falls into the range of trusted proxies\n foreach ($clientIps as $key => $clientIp) {\n // Remove port (unfortunately, it does happen)\n if (preg_match('{((?:\\d+\\.){3}\\d+)\\:\\d+}', $clientIp, $match)) {\n $clientIps[$key] = $clientIp = $match[1];\n }\n if (IpUtils::checkIp($clientIp, self::$trustedProxies)) {\n unset($clientIps[$key]);\n }\n }\n // Now the IP chain contains only untrusted proxies and the client IP\n return $clientIps ? array_reverse($clientIps) : array($ip);\n }", "private function getAllowedIPs()\n {\n $ips_config = $this->config->get('restrict_login.ips');\n\n return !is_array($ips_config) ? array() : array_keys($ips_config);\n }", "function return_ns_ip($domain) {\n\tglobal $dns_ip_list_c;\n\tif (!@file_exists(\"/usr/bin/dig\")) return;\n\t$msg=array();\n\t//echo $domain.\"\\n\";\n\tfor ($i=0;$i<sizeof($dns_ip_list_c);$i++) {\n\t\t//echo sizeof($dns_ip_list_c[$i]).\"\\n\";\n\t\tfor ($j=0;$j<sizeof($dns_ip_list_c[$i]);$j++) {\n\t\t\t$nip=$dns_ip_list_c[$i][$j][1];\n\t\t\t//echo $nip.\"\\n\";\n\t\t\texec(\"dig @$nip +short +time=1 +tries=1 +retry=1 $domain\",$str,$re);\n\t\t\t//$msg[$nip]=$str[0];\n\t\t\t$msg[]=$str[0];\n\t\t\t$str=\"\";\n\t\t\t//print_r($str);\n\t\t\t//$msg[]=$\n\t\t\t//echo $dns_ip_list_c[$i][$j][1].\"\\n\";\n\t\t}\n\t}\n\t//print_r($msg);\n\treturn $msg;\n}", "private function _ip()\n {\n if (PSI_USE_VHOST === true) {\n $this->sys->setIp(gethostbyname($this->sys->getHostname()));\n } else {\n if (!($result = getenv('SERVER_ADDR'))) {\n $this->sys->setIp(gethostbyname($this->sys->getHostname()));\n } else {\n $this->sys->setIp($result);\n }\n }\n }" ]
[ "0.64549655", "0.60389394", "0.5822331", "0.5804361", "0.57738405", "0.567063", "0.56298107", "0.5623736", "0.5584858", "0.5565743", "0.55511135", "0.5549495", "0.5544723", "0.5543816", "0.5520428", "0.551994", "0.54972196", "0.5468901", "0.5441195", "0.5437298", "0.5436699", "0.5433156", "0.5420641", "0.5411008", "0.5399828", "0.5367837", "0.53464156", "0.53406656", "0.53069067", "0.5300691", "0.5296684", "0.5291342", "0.5285211", "0.5280497", "0.5280205", "0.5272305", "0.5269243", "0.5242811", "0.524111", "0.52404404", "0.52326375", "0.52150476", "0.52119124", "0.5205654", "0.52021915", "0.51998466", "0.5174254", "0.5162418", "0.5160492", "0.5155555", "0.51516724", "0.5144367", "0.5129334", "0.51279294", "0.51275915", "0.5122488", "0.5109615", "0.51081514", "0.5103611", "0.5098461", "0.50898236", "0.5088815", "0.5078846", "0.5071256", "0.50703216", "0.50621784", "0.5061522", "0.5058505", "0.5057576", "0.50544107", "0.5043771", "0.5043023", "0.5034556", "0.50108945", "0.50095063", "0.5007562", "0.5003878", "0.49956748", "0.4994864", "0.49926445", "0.49916375", "0.4990161", "0.4986558", "0.49833745", "0.4976007", "0.49715436", "0.49677008", "0.49639452", "0.49596977", "0.4955203", "0.49548733", "0.49513552", "0.49440244", "0.4943485", "0.49376357", "0.49341244", "0.49313143", "0.49224296", "0.49195132", "0.4918258" ]
0.6262196
1
/ funcion para convertir caracteres especiales a codigos html
function to_html($cadena){ $busqueda = array("á","é","í","ó","ú","Á","É","Í","Ó","Ú","ñ","Ñ","¿"); $reemplazo= array("&aacute;","&eacute;","&iacute;","&oacute;","&uacute;","&Aacute;","&Eacute;","&Iacute;","&Oacute;","&Uacute;", "&ntilde;","&Ntilde;","&#191;"); $resultado = str_replace($busqueda, $reemplazo, $cadena); return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traducirHTML($cad){\n $cad=htmlspecialchars_decode($cad);\n $esp=array('&nbsp;','&Aacute;','&Auml;','&Ccaron;','&Dcaron;','&Eacute;','&Lacute;','&Lcaron;','&Ncaron;','&Oacute;','&Ocirc;','&Racute;','&Scaron;','&Tcaron;','&Uacute;','&Yacute;','&Zcaron;','&aacute;','&auml;','&ccaron;','&dcaron;','&eacute;','&lacute;','&lcaron;','&ncaron;','&oacute;','&ocirc;','&racute;','&scaron;','&tcaron;','&uacute;','&yacute;','&zcaron;','&Iacute;','&iacute;');\n $sust=array(' ','Á','Ä','Č','Ď','É','Ĺ','Ľ','Ň','Ó','Ô','Ŕ','Š','Ť','Ú','Ý','Ž','á','ä','č','ď','é','ĺ','ľ','ň','ó','ô','ŕ','š','ť','ú','ý','ž','Í','í');\n return str_replace($esp,$sust,$cad);\n}", "function traducirHTML($cad){\n $cad=htmlspecialchars_decode($cad);\n $esp=array('&nbsp;','&Aacute;','&Auml;','&Ccaron;','&Dcaron;','&Eacute;','&Lacute;','&Lcaron;','&Ncaron;','&Oacute;','&Ocirc;','&Racute;','&Scaron;','&Tcaron;','&Uacute;','&Yacute;','&Zcaron;','&aacute;','&auml;','&ccaron;','&dcaron;','&eacute;','&lacute;','&lcaron;','&ncaron;','&oacute;','&ocirc;','&racute;','&scaron;','&tcaron;','&uacute;','&yacute;','&zcaron;','&Iacute;','&iacute;');\n $sust=array(' ','Á','Ä','Č','Ď','É','Ĺ','Ľ','Ň','Ó','Ô','Ŕ','Š','Ť','Ú','Ý','Ž','á','ä','č','ď','é','ĺ','ľ','ň','ó','ô','ŕ','š','ť','ú','ý','ž','Í','í');\n return str_replace($esp,$sust,$cad);\n}", "function uc2html($str) {\r\n $ret = '';\r\n\r\n if (function_exists(\"iconv\")) {\r\n $ret = iconv(\"UCS-2LE\",\"CP949\",$str);\r\n\r\n }\r\n else\r\n {\r\n for( $i=0; $i<strlen($str)/2; $i++ ) {\r\n $charcode = ord($str[$i*2])+256*ord($str[$i*2+1]);\r\n $ret .= '&#'.$charcode;\r\n }\r\n }\r\n return $ret;\r\n }", "public function getAsciiReplace();", "function convert_chars($content, $deprecated = '')\n {\n }", "function pdfTextChars($string) {\n \n\t$string = trim($string);\n\t$string = stripslashes($string);\n\t$string = convertToHtml($string);\n\t\n\t// Eliminare i commenti HTML\n\t$string = preg_replace(\"#(\\n*)#\", \"\", $string);\n\t$string = preg_replace(\"#<!--(.*)-->#\", \"\", $string);\n\t\n\t//$string = preg_replace(\"#<br />#\", \"\\n\", $string);\n\n\t$string = str_replace ('&euro;', '€', $string);\n\t$string = str_replace ('&bull;', '•', $string);\n\t//$string = str_replace ('&', '&amp;', $string);\n\t//$string = str_replace ('\\'', '&#039;', $string);\n\t//$string = preg_replace(\"/:/\", \"&#58;\", $string);\n\t//$string = str_replace(':', \"&#58;\", $string);\n\t\n\t// conversione in entities\n\t$string = htmlentities($string, ENT_QUOTES, 'UTF-8');\n\t// riconversione di alcune entities\n\t$string = preg_replace('#&lt;([a-zA-Z]+)&gt;#', \"<$1>\", $string);\t// <p>\n\t$string = preg_replace('#&lt;/([a-zA-Z]+)&gt;#', \"</$1>\", $string);\t// </p>\n\t//$string = preg_replace('#/&gt;#', '/>', $string);\t\t\t\t\t// />\n\t$string = preg_replace(\"#&lt;([a-zA-Z]+)[\\s]+[\\w]*/&gt;#\", \"<$1 />\", $string);\t// <br />\n\t$string = preg_replace(\"#&lt;([a-zA-Z]+)[\\s]+(id|class|lang)=&quot;[\\w\\.\\-]*&quot;[\\s]*&gt;#\", \"<$1>\", $string);\t// <span id=\"...\">\n\t\n\t// per risolvere i problemi nel riconoscere la fine del tag 'b' quando è in prossimità di un 'br'\n\t$string = preg_replace(\"#><br />#\", \">\\n<br />\", $string);\n\t$string = preg_replace(\"#<br />\\n(<[a-zA-Z]+>)#\", \"$1\\n<br />\", $string);\n\t\n\t// problema quando non sono tag:\n\t//$string = str_replace('&lt;', \"<\", $string);\n\t//$string = str_replace('&gt;', \">\", $string);\n\t\n\t//$string = preg_replace(\"#><br />#\", \"> <br />\", $string);\n\t//$string = preg_replace(\"#<ul>#\", \"<ul style=\\\"margin:-20px;padding:0;\\\">\", $string);\n\t\n\treturn $string;\n}", "function encode_desc(&$data)\n{\n $to_entities = get_html_translation_table(HTML_ENTITIES);\n\n $from_entities = array_flip($to_entities);\n\n $data = strtr($data,$from_entities);\n $data = strtr($data,$to_entities);\n\n return $data;\n}", "static function Sustituto_Cadena($rb){\n $rb = str_replace(\"á\", \"&aacute;\", $rb);\n $rb = str_replace(\"é\", \"&eacute;\", $rb);\n $rb = str_replace(\"®\", \"&reg;\", $rb);\n $rb = str_replace(\"í\", \"&iacute;\", $rb);\n $rb = str_replace(\"�\", \"&iacute;\", $rb);\n $rb = str_replace(\"ó\", \"&oacute;\", $rb);\n $rb = str_replace(\"ú\", \"&uacute;\", $rb);\n $rb = str_replace(\"n~\", \"&ntilde;\", $rb);\n $rb = str_replace(\"º\", \"&ordm;\", $rb);\n $rb = str_replace(\"ª\", \"&ordf;\", $rb);\n $rb = str_replace(\"á\", \"&aacute;\", $rb);\n $rb = str_replace(\"ñ\", \"&ntilde;\", $rb);\n $rb = str_replace(\"Ñ\", \"&Ntilde;\", $rb);\n $rb = str_replace(\"ñ\", \"&ntilde;\", $rb);\n $rb = str_replace(\"n~\", \"&ntilde;\", $rb);\n $rb = str_replace(\"Ú\", \"&Uacute;\", $rb);\n return $rb;\n }", "function xml_special_char($t_data){\n\n if(preg_match(\"/\\\"/\", $t_data)) str_replace(\"\\\"\", \"&quot\", $t_data);\n elseif(preg_match(\"/'/\", $t_data)) str_replace(\"\\'\", \"&quot\", $t_data);\n elseif(preg_match(\"/&/\", $t_data)) str_replace(\"&\", \"&amp\", $t_data);\n elseif(preg_match(\"/</\", $t_data)) str_replace(\"<\", \"&lt\", $t_data);\n elseif(preg_match(\"/>/\", $t_data)) str_replace(\">\", \"&gt\", $t_data);\n\n return $t_data;\n }", "function html_to_utf8 ($data)\r\n {\r\n return preg_replace(\"/\\\\&\\\\#([0-9]{3,10})\\\\;/e\", '_html_to_utf8(\"\\\\1\")', $data);\r\n }", "function htmlRemoveSpecialCharacters($input){\n\t\tfor($i=0; $i<strlen($input); $i++){\n\n\t\t\t$value = ord($input[$i]);\n\t\t\tif($value >= 48 && $value <= 57);\n\t\t\telseif ($value >= 65 && $value <= 90) ;\n\t\t\telseif ($value >= 97 && $value <= 122) ;\n\t\t\telseif ($value == 32) ;\n\t\t\telse{\n\t\t\t\t$input = substr($input, 0, $i) . '\\\\' . substr($input, $i);\n\t\t\t}\n\t\t}\n\t\techo $input;\n\t\treturn $input;\n\t}", "function entify($string) { \n /* used by /samuel/cv/, should leave tags as is and only convert chars */\n # echo \"<!-- $string -->\\n\";\n $from = array('/&/',\n '/å/', '/ä/', '/ö/',\n '/Å/', '/Ä/', '/Ö/',\n );\n $to = array('&amp;',\n '&aring;', '&auml;', '&ouml;',\n '&Aring;', '&Auml;', '&Ouml',\n );\n # echo \"<!-- $string -->\\n\";\n return preg_replace($from, $to, $string);\n }", "function convertHTML($strInput) //Convert to html special code\n{\n\t//$strInput = htmlspecialchars($strInput, ENT_QUOTES);\n\t$strInput = str_replace('\"', '&quot;', $strInput);\n\t$strInput = str_replace(\"'\", \"&#039;\", $strInput);\n\treturn $strInput;\n}", "function RSC($txt){\n\t$txt = str_replace(\"'\",\"&#39;\",$txt);\n\t$txt = str_replace(\"!\",\"&#33;\",$txt);\n\t$txt = str_replace(\"’\",\"&rsquo;\",$txt);\n\t$txt = str_replace(\"‘\",\"&lsquo;\",$txt);\n\t$txt = str_replace('“',\"&ldquo;\",$txt);\n\t$txt = str_replace('”',\"&rdquo;\",$txt);\n\n\treturn $txt;\n}", "function TildesHtml($cadena)\n{\n return str_replace(array(\"á\", \"é\", \"í\", \"ó\", \"ú\", \"ñ\", \"Á\", \"É\", \"Í\", \"Ó\", \"Ú\", \"Ñ\"), array(\"&aacute;\", \"&eacute;\", \"&iacute;\", \"&oacute;\", \"&uacute;\", \"&ntilde;\",\n \"&Aacute;\", \"&Eacute;\", \"&Iacute;\", \"&Oacute;\", \"&Uacute;\", \"&Ntilde;\"), $cadena);\n}", "function tarkista($s) {\n\t\n\t$etsi = array('#', '´', '%', '|', '--', '\\t');\n\t$korv = array('&#35;', '&#39;', '&#37;', '&#124;', '&#150;', '&nbsp;');\n\n\t$s = htmlspecialchars($s);\n\t$s = trim(str_replace($etsi, $korv, $s));\n\t$s = stripslashes($s);\n\t$enc = mb_detect_encoding($s, 'UTF-8', true);\n\n\tif ($enc == 'UTF-8'){\n\t\treturn $s;\n\t} else {\n\t\treturn utf8_encode($s);\n\t}\n\t\n}", "function get_contenido_html ($input_texto)\r\n{\r\n\t// inicializacion de variables\r\n\t$var_contenido_html = $input_texto;\r\n\r\n\t$var_contenido_html = str_replace(\"&lt;\",\"<\",$var_contenido_html);\r\n\t$var_contenido_html = str_replace(\"&gt;\",\">\",$var_contenido_html);\r\n\t$var_contenido_html = str_replace(\"&quot;\",\"\\\"\",$var_contenido_html);\r\n\t$var_contenido_html = str_replace(\"&amp;\",\"&\",$var_contenido_html);\r\n\r\n\t// devuelve el texto en formato nombre propio\r\n\treturn $var_contenido_html;\r\n}", "function prepare_code($text) {\n $replace = array( '\\\"' => '&#34;','\"' => '&#34;', '<' => '&lt;', '>' => '&gt;', \"\\'\" => '&#39;', \"'\" => '&#39;' );\n return str_replace(array_keys($replace), array_values($replace),$text);\n}", "function unconvertHTML($strInput)//Convert html special code to standart form\n{\n\t//$strInput = html_entity_decode($strInput);\n\t$strInput = str_replace('&quot;', '\"', $strInput);\n\t$strInput = str_replace(\"&#039;\", \"'\", $strInput);\n\treturn $strInput;\n}", "public static function unescape($som) {}", "abstract public function convert_to_html();", "function txt_raw2form($t=\"\")\n\t{\n\t\t$t = str_replace( '$', \"&#036;\", $t);\n\t\t\t\n\t\tif ( $this->get_magic_quotes )\n\t\t{\n\t\t\t$t = stripslashes($t);\n\t\t}\n\t\t\n\t\t$t = preg_replace( \"/\\\\\\(?!&amp;#|\\?#)/\", \"&#092;\", $t );\n\t\t\n\t\t//---------------------------------------\n\t\t// Make sure macros aren't converted\n\t\t//---------------------------------------\n\t\t\n\t\t$t = preg_replace( \"/<{(.+?)}>/\", \"&lt;{\\\\1}&gt;\", $t );\n\t\t\n\t\treturn $t;\n\t}", "static function specialCharsToHTML( $str )\n {\n $search = array(\n 'á', 'é', 'í', 'ó', 'ú',\n 'Á', 'É', 'Í', 'Ó', 'Ú',\n 'ñ', 'Ñ', '¿', '¡'\n );\n $replace = array(\n '&aacute;', '&eacute;', '&iacute;', '&oacute;', '&uacute;',\n '&Aacute;', '&Eacute;', '&Iacute;', '&Oacute;', '&Uacute;',\n '&ntilde;', '&Ntilde;', '&iquest;', '&iexcl;'\n );\n\n $str = str_replace($search, $replace, $str);\n return $str;\n }", "function convert_umlaute($text) {\r\n $pattern1 = \"/ä/\";\r\n $replace1 = \"&#228;\";\r\n $text = preg_replace($pattern1, $replace1, $text);\r\n $pattern2 = \"/ö/\";\r\n $replace2 = \"&#246;\";\r\n $text = preg_replace($pattern2, $replace2, $text);\r\n $pattern3 = \"/ü/\";\r\n $replace3 = \"&#252;\";\r\n $text = preg_replace($pattern3, $replace3, $text);\r\n $pattern1a = \"/Ä/\";\r\n $replace1a = \"&#196;\";\r\n $text = preg_replace($pattern1a, $replace1a, $text);\r\n $pattern2a = \"/Ö/\";\r\n $replace2a = \"&#214;\";\r\n $text = preg_replace($pattern2a, $replace2a, $text);\r\n $pattern3a = \"/Ü/\";\r\n $replace3a = \"&#220;\";\r\n $text = preg_replace($pattern3a, $replace3a, $text);\r\n $pattern4 = \"/ß/\";\r\n $replace4 = \"&#xDF;\";\r\n $text = preg_replace($pattern4, $replace4, $text);\r\n $pattern5a = \"/\\\"/\";\r\n $replace5a = \"&quot;\";\r\n $text = preg_replace($pattern5a, $replace5a, $text);\r\n $pattern5b = \"/</\";\r\n $replace5b = \"&lt;\";\r\n $text = preg_replace($pattern5b, $replace5b, $text);\r\n $pattern5c = \"/>/\";\r\n $replace5c = \"&gt;\";\r\n $text = preg_replace($pattern5c, $replace5c, $text);\r\n//\t $pattern5d=\"/&/\";\r\n//\t $replace5d=\"&amp;\";\r\n//\t $text=preg_replace($pattern5d,$replace5d, $text);\r\n\r\n return $text;\r\n}", "function cs_safebalises($texte) {\r\n\t$texte = trim($texte);\r\n\t// ouvre/supprime la premiere balise trouvee fermee (attention aux modeles SPIP)\r\n\tif(preg_match(',^(.*)</([a-z]+)>,Ums', $texte, $m) && !preg_match(\",<$m[2][ >],\", $m[1])) \r\n\t\t$texte = strlen($m[1])?\"<$m[2]>$texte\":trim(substr($texte, strlen($m[2])+3));\r\n\t// referme/supprime la derniere balise laissee ouverte (attention aux modeles SPIP)\r\n\tif(preg_match(',^(.*)[ >]([a-z]+)<,Ums', $rev = strrev($texte), $m) && !preg_match(\",>$m[2]/<,\", $m[1])) \r\n\t\t$texte = strrev(strlen($m[1])?\">$m[2]/<$rev\":trim(substr($rev, strlen($m[2])+2)));\r\n\t// balises <p|span|div> a traiter\r\n\tforeach(array('span', 'div', 'p') as $b) {\r\n\t\t// ouvrante manquante\r\n\t\tif(($fin = strpos($texte, \"</$b>\")) !== false)\r\n\t\t\tif(!preg_match(\",<{$b}[ >],\", substr($texte, 0, $fin)))\r\n\t\t\t\t$texte = \"<$b>$texte\";\r\n\t\t// fermante manquante\r\n\t\t$texte = strrev($texte);\r\n\t\tif(preg_match(',[ >]'.strrev(\"<{$b}\").',', $texte, $reg)) {\r\n\t\t\t$fin = strpos(substr($texte, 0, $deb = strpos($texte, $reg[0])), strrev(\"</$b>\"));\r\n\t\t\tif($fin===false || $fin>$deb) $texte = strrev(\"</$b>\").$texte;\r\n\t\t}\r\n\t\t$texte = strrev($texte);\r\n\t}\r\n\treturn $texte;\r\n}", "function txt_bbcode($var) {\n\n $txt = utf8_encode(html_entity_decode($var));\n\n return $txt;\n}", "function HtmlEncode(&$str)\n{\n\t\t\t //$str = str_replace(\"&\", \"。。\",$str);\n $str = str_replace(\"<\", \"。。\",$str);\n $str = str_replace(\">\", \"。。\",$str);\n $str = str_replace(\"'\", \"\\'\",$str);\n $str = str_replace(\"*\", \"\",$str);\n $str = str_replace(\"\\n\", \"<br/>\",$str);\n $str = str_replace(\"\\r\\n\", \"<br/>\",$str);\n $str = str_replace(\"select\", \"\",$str);\n $str = str_replace(\"insert\", \"\",$str);\n $str = str_replace(\"update\", \"\",$str);\n $str = str_replace(\"delete\", \"\",$str);\n $str = str_replace(\"create\", \"\",$str);\n $str = str_replace(\"drop\", \"\",$str);\n $str = str_replace(\"delcare\", \"\",$str);\n\t\t\t return $str;\n}", "function uniencode($s)\n{\n $r = \"\";\n for ($i=0;$i<strlen($s);$i++) $r.= \"&#\".ord(substr($s,$i,1)).\";\";\n return $r;\n}", "function hsc($in){\rif(\r\tgettype(strpos($in,\"<\"))==\"integer\"\r\t|| gettype(strpos($in,\">\"))==\"integer\"\r\t|| gettype(strpos($in,\"\\\"\"))==\"integer\"\r\t|| gettype(strpos($in,\"&#38;\"))==\"integer\"\r\t|| gettype(strpos($in,\"&#39;\"))==\"integer\"\r\t|| gettype(strpos($in,\"&#34;\"))==\"integer\"\r\t\t) return htmlentities($in,ENT_QUOTES,\"UTF-8\");\relse return $in;\r}", "function AbbcH2T($text)\r\n{\r\n\t// This function is taken from WMS/common.lib/h2t()\r\n\r\n\t$text = str_replace('&lt;', '<', $text);\r\n\t$text = str_replace('&gt;', '>', $text);\r\n\t$text = str_replace('&quot;', '\"', $text);\r\n\t$text = str_replace('&nbsp;', ' ', $text);\r\n\t$text = str_replace('&amp;', '&', $text);\r\n\treturn $text;\r\n}", "function filterSpecials($data){\n\n if(!$this->isUTF8($data))\n $data = utf8_encode($data);\n $data = htmlspecialchars($data, ENT_QUOTES);\n\n return $data;\n }", "function pdfChars($string, $openclose=false) {\n \n\t$string = convertToHtml($string);\n\t\n\t$string = trim($string);\n\t$string = stripslashes($string);\n\n\t$string = str_replace ('&euro;', '€', $string);\n\t$string = str_replace ('&', '&amp;', $string);\n\t$string = str_replace ('\\'', '&#039;', $string);\n\t$string = preg_replace(\"/:/\", \"&#58;\", $string);\n\t\n\tif($openclose)\n\t{\n\t\t$string = str_replace(\"<\", \"&lt;\", $string);\n\t\t$string = str_replace(\">\", \"&gt;\", $string);\n\t}\n\t\n\treturn $string;\n}", "function convertheader($value){\r\n\t$aux = \"\";\r\n\tfor($i = 0; $i < strlen($value); $i++){\r\n\t\t$char = substr($value, $i, 1);\r\n\t\tswitch($char){\r\n\t\t\tcase \"&\": $aux .= \"%26\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%\": $aux .= \"%25\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"'\": $aux .= \"%27\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\"': $aux .= \"%22\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault : $aux .= $char;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn $aux;\r\n}", "function tep_decode_specialchars($string){\n $string=str_replace('&gt;', '>', $string);\n $string=str_replace('&lt;', '<', $string);\n $string=str_replace('&#039;', \"'\", $string);\n $string=str_replace('&quot;', \"\\\"\", $string);\n $string=str_replace('&amp;', '&', $string);\n\n return $string;\n }", "function doHtmlSpecChars() {\n $this->description = htmlspecialchars($this->description);\n $this->postsHeader = htmlspecialchars($this->postsHeader);\n $this->postBody = htmlspecialchars($this->postBody);\n $this->postsFooter = htmlspecialchars($this->postsFooter);\n $this->formLogged = htmlspecialchars($this->formLogged);\n $this->form = htmlspecialchars($this->form);\n $this->navigation = htmlspecialchars($this->navigation);\n $this->name = htmlspecialchars($this->name);\n $this->nameLin = htmlspecialchars($this->nameLin);\n $this->memberName = htmlspecialchars($this->memberName);\n $this->date = htmlspecialchars($this->date);\n $this->time = htmlspecialchars($this->time); \n $this->nextPage = htmlspecialchars($this->nextPage);\n $this->previousPage =htmlspecialchars($this->previousPage);\n $this->firstPage = htmlspecialchars($this->firstPage);\n $this->lastPage = htmlspecialchars($this->lastPage);\n\t$this->gravDefault = htmlspecialchars($this->gravDefault);\n }", "function convertText($b){\r\n\t\t$b = htmlspecialchars($b);\r\n\t\t$b = str_replace(\"\\011\", ' &nbsp;&nbsp;&nbsp;', str_replace(' ', ' &nbsp;', $b));\r\n\t\t$b = ereg_replace(\"((\\015\\012)|(\\015)|(\\012))\", '<br />', $b);\r\n\t\treturn $b;\r\n\t}", "function ChangeToSpecialChar($vTitle) {\r\n $rs_catname = $vTitle;\r\n $spstr = \"&iexcl;#&cent;#&pound;#&yen;#&sect;#&uml;#&copy;#&laquo;#&not;#&reg;#&deg;#&plusmn;#&acute;#&micro;#&para;##&middot;#&cedil;#&raquo;#&iquest;#&Agrave;#&Aacute;#&Acirc;#&Atilde;#&Auml;#&Aring;#&AElig;#&Ccedil;#&Egrave;#&Eacute;#&Ecirc;#&Euml;#&Igrave;#&Iacute;#&Icirc;#&Iuml;#&Ntilde;#&Ograve;#&Oacute;#&Ocirc;#&Ouml;#&Oslash;#&Ugrave;#&Uacute;#&Ucirc;#&Uuml;#&szlig;#&agrave;#&aacute;#&atilde;#&acirc;#&atilde;#&auml;#&aring;#&aelig;#&ccedil;#&egrave;#&eacute;#&ecirc;#&euml;#&igrave;#&iacute;#&icirc;#&iuml;#&ntilde;#&ograve;#&oacute;#&ocirc;#&otilde;#&ouml;#&divide;#&oslash;#&ugrave;#&uacute;#&ucirc;#&uuml;#&yuml;#&sbquo;#&fnof;#&bdquo;#&hellip;#&dagger;#&Dagger;#&circ;#&permil;#&lsaquo;#&OElig;#&lsquo;#&lsquo;#&rsquo;#&ldquo;#&rdquo;#&bull;#&ndash;#&mdash;#&tilde;#&trade;#&rsaquo;#&oelig;#&Yuml;\";\r\n $toReplaceStr = \"�#�#�#�#�#�#�#�#�#�#�#�#�#�#�##�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�\";\r\n $spArr = @explode(\"#\", $spstr);\r\n $tospArr = @explode(\"#\", $toReplaceStr);\r\n\r\n $i = 0;\r\n foreach ($spArr as $arr) {\r\n $rs_catname = str_replace($arr, $tospArr[$i], $rs_catname);\r\n $i++;\r\n }\r\n //print_r($rs_catname);exit;\r\n //$rs_catname = str_replace(\" \",\"-\",str_replace(\"&\",\"and\",$rs_catname));\r\n return $rs_catname;\r\n}", "function getCharacters();", "private static function _escapeTagChar($matches) {}", "function special_chars($text){\n if(strpos($text, '&') !== false){\n $text = str_replace(\"&\", \"&amp;\", $text);\n }\n if(strpos($text, '<') !== false){\n $text = str_replace(\"<\", \"&lt;\", $text);\n }\n if(strpos($text, '>') !== false){\n $text = str_replace(\">\", \"&gt;\", $text);\n }\n return $text;\n }", "public static function convert_chars($content, $flag = 'obsolete') {\n\t\t$htmltranswinuni = array(\n\t\t'&#128;' => '&#8364;', // the Euro sign\n\t\t'&#129;' => '',\n\t\t'&#130;' => '&#8218;', // these are Windows CP1252 specific characters\n\t\t'&#131;' => '&#402;', // they would look weird on non-Windows browsers\n\t\t'&#132;' => '&#8222;',\n\t\t'&#133;' => '&#8230;',\n\t\t'&#134;' => '&#8224;',\n\t\t'&#135;' => '&#8225;',\n\t\t'&#136;' => '&#710;',\n\t\t'&#137;' => '&#8240;',\n\t\t'&#138;' => '&#352;',\n\t\t'&#139;' => '&#8249;',\n\t\t'&#140;' => '&#338;',\n\t\t'&#141;' => '',\n\t\t'&#142;' => '&#382;',\n\t\t'&#143;' => '',\n\t\t'&#144;' => '',\n\t\t'&#145;' => '&#8216;',\n\t\t'&#146;' => '&#8217;',\n\t\t'&#147;' => '&#8220;',\n\t\t'&#148;' => '&#8221;',\n\t\t'&#149;' => '&#8226;',\n\t\t'&#150;' => '&#8211;',\n\t\t'&#151;' => '&#8212;',\n\t\t'&#152;' => '&#732;',\n\t\t'&#153;' => '&#8482;',\n\t\t'&#154;' => '&#353;',\n\t\t'&#155;' => '&#8250;',\n\t\t'&#156;' => '&#339;',\n\t\t'&#157;' => '',\n\t\t'&#158;' => '',\n\t\t'&#159;' => '&#376;'\n\t\t);\n\t\n\t\t// Remove metadata tags\n\t\t$content = preg_replace('/<title>(.+?)<\\/title>/','',$content);\n\t\t$content = preg_replace('/<category>(.+?)<\\/category>/','',$content);\n\t\n\t\t// Converts lone & characters into &#38; (a.k.a. &amp;)\n\t\t$content = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&#038;$1', $content);\n\t\n\t\t// Fix Word pasting\n\t\t$content = strtr($content, $htmltranswinuni);\n\t\n\t\t// Just a little XHTML help\n\t\t$content = str_replace('<br>', '<br />', $content);\n\t\t$content = str_replace('<hr>', '<hr />', $content);\n\t\n\t\treturn $content;\n\t}", "public static function ascii() {}", "function _wp_kses_decode_entities_chr($matches)\n {\n }", "function txt_form2raw($t=\"\")\n\t{\n\t\t$t = str_replace( \"&#036;\", '$' , $t);\n\t\t$t = str_replace( \"&#092;\", '\\\\', $t );\n\t\t\n\t\treturn $t;\n\t}", "function decodespecialchars($str){\n\t$str = ereg_replace(\"\\n\",\"\\\\n\",$str);\n\t$str = ereg_replace(\"\\r\",\"\\\\r\",$str);\n\t$str=ereg_replace(\"&#039;\",\"'\",$str);\n\t$str=ereg_replace(\"&amp;\",\"&\",$str);\n\t$str=ereg_replace(\"&#59;\",\"\\;\",$str);\n\t$str=ereg_replace(\"&#35;\",\"#\",$str);\n\t$str=ereg_replace(\"&#34;\",'\"',$str);\n\t$str=ereg_replace(\"&#39;\",\"'\",$str);\n\t$str=ereg_replace(\"&#58;\",\":\",$str);\n\t$str=ereg_replace(\"&#47;\",\"\\/\",$str);\n\t$str=ereg_replace(\"&#33;\",\"!\",$str);\n\t$str=ereg_replace(\"&#63;\",\"\\?\",$str);\n\t//special character\n\t$str=ereg_replace(\"&#8218;\",\"�\",$str);\n\t$str=ereg_replace(\"&#402;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8222;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8230;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8224;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8225;\",\"�\",$str);\n\t$str=ereg_replace(\"&#710;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8240;\",\"�\",$str);\n\t$str=ereg_replace(\"&#352;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8249;\",\"�\",$str);\n\t$str=ereg_replace(\"&#338;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8216;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8217;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8220;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8221;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8226;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8211;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8212;\",\"�\",$str);\n\t$str=ereg_replace(\"&#732;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8482;\",\"�\",$str);\n\t$str=ereg_replace(\"&#353;\",\"�\",$str);\n\t$str=ereg_replace(\"&#8250;\",\"�\",$str);\n\t$str=ereg_replace(\"&#339;\",\"�\",$str);\n\t$str=ereg_replace(\"&#376;\",\"�\",$str);\n\t$str=htmlspecialchars_decode($str);\n\treturn $str;\n}", "public static function texturize($text) {\n\t\t$next = true;\n\t\t$output = '';\n\t\t$curl = '';\n\t\t$textarr = preg_split('/(<.*>)/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);\n\t\t$stop = count($textarr);\n\t\n\t\t$static_characters = array_merge(array('---', ' -- ', '--', 'xn&#8211;', '...', '``', '\\'s', '\\'\\'', ' (tm)'), $cockney); \n\t\t$static_replacements = array_merge(array('&#8212;', ' &#8212; ', '&#8211;', 'xn--', '&#8230;', '&#8220;', '&#8217;s', '&#8221;', ' &#8482;'), $cockneyreplace);\n\t\n\t\t$dynamic_characters = array('/\\'(\\d\\d(?:&#8217;|\\')?s)/', '/(\\s|\\A|\")\\'/', '/(\\d+)\"/', '/(\\d+)\\'/', '/(\\S)\\'([^\\'\\s])/', '/(\\s|\\A)\"(?!\\s)/', '/\"(\\s|\\S|\\Z)/', '/\\'([\\s.]|\\Z)/', '/(\\d+)x(\\d+)/');\n\t\t$dynamic_replacements = array('&#8217;$1','$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1&#8220;$2', '&#8221;$1', '&#8217;$1', '$1&#215;$2');\n\t\n\t\tfor ( $i = 0; $i < $stop; $i++ ) {\n\t\t\t$curl = $textarr[$i];\n\t\n\t\t\tif (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag\n\t\t\t\t// static strings\n\t\t\t\t$curl = str_replace($static_characters, $static_replacements, $curl);\n\t\t\t\t// regular expressions\n\t\t\t\t$curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl);\n\t\t\t} elseif (strpos($curl, '<code') !== false || strpos($curl, '<pre') !== false || strpos($curl, '<kbd') !== false || strpos($curl, '<style') !== false || strpos($curl, '<script') !== false) {\n\t\t\t\t$next = false;\n\t\t\t} else {\n\t\t\t\t$next = true;\n\t\t\t}\n\t\n\t\t\t$curl = preg_replace('/&([^#])(?![a-zA-Z1-4]{1,8};)/', '&#038;$1', $curl);\n\t\t\t$output .= $curl;\n\t\t}\n\t\n\t\treturn $output;\n\t}", "function encoding_conv($var, $enc_out, $enc_in='utf-8')\r\n{\r\n$var = htmlentities($var, ENT_QUOTES, $enc_in);\r\nreturn html_entity_decode($var, ENT_QUOTES, $enc_out);\r\n}", "function escapeRtf($data) {\n\tif (empty($data)) return $data;\n if (is_array($data)) {\n\t\tforeach($data as $k => $v) $data[$k] = escapeRtf($v);\n } else {\n \t$data = mb_convert_encoding($data,\"UTF-16\",\"UTF-8\");\n\t\t$data = str_split($data,2);\n\t\t$tmp = \"\";\n\t\tforeach($data as $k => $v) $tmp .= '\\u'.(ord($v[0])*256 + ord($v[1])).'?';\n\t\t$data = $tmp;\n \t}\n \treturn $data;\n}", "function escreverTexto($sText) {\n\n /**\n * Aplicando negrito\n */\n $sText = str_replace(\"<b>\", chr(27) . chr(69), $sText);\n $sText = str_replace(\"</b>\", chr(27) . chr(70), $sText);\n /**\n * Aplicando italico\n */\n $sText = str_replace(\"<i>\", chr(27) . chr(52), $sText);\n $sText = str_replace(\"</i>\", chr(27) . chr(53), $sText);\n /**\n * Aplicando sublinhado\n */\n $sText = str_replace(\"<s>\", chr(27) . chr(45) . \"1\", $sText);\n $sText = str_replace(\"</s>\", chr(27) . chr(45) . \"0\", $sText);\n \n // $sText = $this->truncarLinhas($sText,48);\n $sText = $this->strToAsc($sText);\n \n $sComando = chr(27) . str_replace(\"\\n\", chr(10), $sText);\n parent::addComando($sComando);\n \n }", "function string_html_specialchars( $p_string ) {\r\n\t# achumakov: @ added to avoid warning output in unsupported codepages\r\n\t# e.g. 8859-2, windows-1257, Korean, which are treated as 8859-1.\r\n\t# This is VERY important for Eastern European, Baltic and Korean languages\r\n\treturn preg_replace(\"/&amp;(#[0-9]+|[a-z]+);/i\", \"&$1;\", @htmlspecialchars( $p_string, ENT_COMPAT, config_get('charset') ) );\r\n}", "function s2_htmlencode($str)\n{\n return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');\n}", "function change_hunchar($text)\n{\n\t\n\t$text = htmlentities($text);\n\t\n\t$mit = array(\"í\", \"é\", \"á\", \"ú\", \"ő\", \"ü\", \"ö\", \"ű\", \"ó\", \"Í\", \"É\", \"Á\", \"Ú\", \"Ó\", \"Ü\", \"Ö\", \"Ű\", \"Ő\", \" \", \",\");\n\t$mire = array(\"i\", \"e\", \"a\", \"u\", \"o\", \"u\", \"o\", \"u\", \"o\", \"i\", \"e\", \"a\", \"u\", \"o\", \"u\", \"o\", \"u\", \"o\", \"_\", \"\");\n\t$szoveg = str_replace($mit, $mire, strtolower($text));\n\t\n\n\treturn $szoveg;\n}", "function corriger_caracteres_windows($texte, $charset='AUTO') {\n\tstatic $trans;\n\n\tif ($charset=='AUTO') $charset = $GLOBALS['meta']['charset'];\n\tif ($charset == 'utf-8') {\n\t\t$p = chr(194);\n\t} else if ($charset == 'iso-8859-1') {\n\t\t$p = '';\n\t} else\n\t\treturn $texte;\n\n\tif (!isset($trans[$charset])) {\n\t\t$trans[$charset] = array(\n\t\t\t$p.chr(128) => \"&#8364;\",\n\t\t\t$p.chr(129) => ' ', # pas affecte\n\t\t\t$p.chr(130) => \"&#8218;\",\n\t\t\t$p.chr(131) => \"&#402;\",\n\t\t\t$p.chr(132) => \"&#8222;\",\n\t\t\t$p.chr(133) => \"&#8230;\",\n\t\t\t$p.chr(134) => \"&#8224;\",\n\t\t\t$p.chr(135) => \"&#8225;\",\n\t\t\t$p.chr(136) => \"&#710;\",\n\t\t\t$p.chr(137) => \"&#8240;\",\n\t\t\t$p.chr(138) => \"&#352;\",\n\t\t\t$p.chr(139) => \"&#8249;\",\n\t\t\t$p.chr(140) => \"&#338;\",\n\t\t\t$p.chr(141) => ' ', # pas affecte\n\t\t\t$p.chr(142) => \"&#381;\",\n\t\t\t$p.chr(143) => ' ', # pas affecte\n\t\t\t$p.chr(144) => ' ', # pas affecte\n\t\t\t$p.chr(145) => \"&#8216;\",\n\t\t\t$p.chr(146) => \"&#8217;\",\n\t\t\t$p.chr(147) => \"&#8220;\",\n\t\t\t$p.chr(148) => \"&#8221;\",\n\t\t\t$p.chr(149) => \"&#8226;\",\n\t\t\t$p.chr(150) => \"&#8211;\",\n\t\t\t$p.chr(151) => \"&#8212;\",\n\t\t\t$p.chr(152) => \"&#732;\",\n\t\t\t$p.chr(153) => \"&#8482;\", \n\t\t\t$p.chr(154) => \"&#353;\",\n\t\t\t$p.chr(155) => \"&#8250;\",\n\t\t\t$p.chr(156) => \"&#339;\",\n\t\t\t$p.chr(157) => ' ', # pas affecte\n\t\t\t$p.chr(158) => \"&#382;\",\n\t\t\t$p.chr(159) => \"&#376;\",\n\t\t);\n\t}\n\treturn strtr($texte, $trans[$charset]);\n}", "function italica($text){\r\n return \"<i>$text</i>\";\r\n }", "function caracteresImp($text){\n // purposes\n //echo $text;\n $search = array('á','é','í','ó','ú','Ñ','?','ñ','°','Á','É','Í','Ó','Ú');\n // $search = array('','','','','','','?');\n $replace = array('&#225;','&#233;','&#237;','&#243','&#250;','&#209;','&#63;','&#241;','&#176;','&#193;','&#201;','&#205;','&#211;','&#218;');\n //&#209;\n //$tempcaract=str_replace($search,$replace,$text);\n //echo $tempcaract;\n return str_replace($search,$replace,$text);\n\n \n}", "function subraya($text){\r\n return \"<u>$text</u>\";\r\n }", "function filter($output){\n\tif (is_array($output)) return $output;\n\t$search = array('/([\\xa1-\\xf9][\\xa1-\\xf9][\\x5c])/','/([\\xa1-\\xf9][\\x5c])[\\x5c]/');\n\t$replace = array('\\1\\\\','\\1');\n\treturn(htmlspecialchars(preg_replace($search,$replace,$output)));\n}", "function replace_chars($content)\n\t{\n\t\t//convert all characters to lower case\n\t\t$content = mb_strtolower($content);\n\t\t//$content = mb_strtolower($content, \"UTF-8\");\n\t\t$content = strip_tags($content);\n\n //updated in v0.3, 24 May 2009\n\t\t$punctuations = array(',', ')', '(', '.', \"'\", '\"',\n\t\t'<', '>', '!', '?', '/', '-',\n\t\t'_', '[', ']', ':', '+', '=', '#',\n\t\t'$', '&quot;', '&copy;', '&gt;', '&lt;', \n\t\t'&nbsp;', '&trade;', '&reg;', ';', \n\t\tchr(10), chr(13), chr(9));\n\n\t\t$content = str_replace($punctuations, \" \", $content);\n\t\t// replace multiple gaps\n\t\t$content = preg_replace('/ {2,}/si', \" \", $content);\n\n\t\treturn $content;\n\t}", "function twig_html_to_ical_text(string $string): string\n{\n $string = preg_replace('/<a[^>]*>/', '', $string);\n $string = str_replace('</a>', '', $string);\n $string = str_replace('<b>', '', $string);\n $string = str_replace('</b>', '', $string);\n $string = str_replace('<i>', '', $string);\n $string = str_replace('</i>', '', $string);\n $string = str_replace('<u>', '', $string);\n $string = str_replace('</u>', '', $string);\n $string = str_replace('<li>', '', $string);\n $string = str_replace('</li>', '', $string);\n $string = str_replace('<p>', '', $string);\n $string = str_replace('</p>', '', $string);\n\n // additional substitions\n $string = str_replace(\"\\\\\", \"\\\\\\\\\", $string);\n $string = str_replace(\"\\r\", '', $string);\n $string = str_replace(\"\\n\", '', $string);\n $string = str_replace('<br>', \"\\\\n\", $string);\n $string = str_replace('<br\\>', \"\\\\n\", $string);\n $string = str_replace('<hr>', \"---\\\\n\", $string);\n $string = str_replace('&nbsp;', ' ', $string);\n $string = str_replace(',', \"\\,\", $string);\n return $string;\n}", "function htmlchars($string = \"\")\n{\n return htmlspecialchars($string, ENT_QUOTES, \"UTF-8\");\n}", "function wp_specialchars_decode($text, $quote_style = \\ENT_NOQUOTES)\n {\n }", "function specialchars($text){\n\t\t$newtext = trim($text);\n\t\t$newtext = strip_tags($newtext);\n\t\t$newtext=htmlspecialchars(str_replace('\\\\', '', $newtext),ENT_QUOTES);\n\t\t$newtext=eregi_replace('&amp;','&',$newtext);\n\t\t//$newtext=nl2br($newtext);\n\t\treturn $newtext;\n\t}", "function guy2html($input) {\n\tglobal $guy_cq;\n\t$patterns = array(\"/&amp;(#?[A-Za-z0-9]+?;)/\", \n\t'/'.$guy_cq['lt'].'/', '/'.$guy_cq['gt'].'/', '/'.$guy_cq['quot'].'/');\n\t$replace = array(\"&\\\\1\", '<', '>', '\"');\n\t$input = preg_replace($patterns,$replace,$input);\n\treturn $input;\n}", "function a_mayusculas($cadena)\n{\n $cadena = strtr(strtoupper($cadena), 'àèìòùáéíóúçñäëïöü', 'ÀÈÌÒÙÁÉÍÓÚÇÑÄËÏÖÜ');\n\n return $cadena;\n}", "function parse_c_string($str, $classname = 'c', $extra_escape = '|x0[0-9a-fA-F]+|0[0-9]+')\n\n{\n\n return '<span class=\"'.$classname.'_string\">'.preg_replace('#\\\\\\\\([a-zA-Z\\\\\\\\0-9\\']|&quot;'.$extra_escape.')#', '<span class=\"'.$classname.'_string_escape\">$0</span>', htmlspecialchars(str_replace('\\\\\"', '\"', $str))).'</span>';\n\n}", "function ascii_to_text ($str)\n{\n\t# Empty string to build up.\n\t$new = '';\n\n\t# The pattern used in preg_match. Searches for &#<3 letters/numbers/mix of>;\n\t$pattern = '/&#([a-zA-Z0-9]+){1,3};/';\n\n\t# Match all occurences of pattern, and store in array $matches\n\tpreg_match_all($pattern, $str, $matches);\n\n\t# Traverse the $matches array, using chr() to convert them back.\n\tforeach ($matches[1] as $ascii)\n\t{\n\t\t$new .= chr($ascii);\n\t}\n\n\treturn $new;\n}", "function f($t){\n\t$specialChars = array(\t'(r)'\t=> '&reg;',\n\t\t\t\t\t\t\t'(R)'\t=> '&reg;',\n\t\t\t\t\t\t\t'(c)'\t=> '&copy;',\n\t\t\t\t\t\t\t'(C)'\t=> '&copy;',\n\t\t\t\t\t\t\t'(tm)'\t=> '&trade;',\n\t\t\t\t\t\t\t'(TM)'\t=> '&trade;',\n\t\t\t\t\t\t\t'(&gt;)'\t=> '&rsaquo;',\n\t\t\t\t\t\t\t'(&gt;&gt;)'\t=> '&raquo;');\n\tforeach($specialChars AS $key => $val) $t = str_replace($key,$val,stripslashes($t));\n\treturn $t;\n}", "function wp_encode_emoji($content)\n {\n }", "function javascript_to_unicode ($texte) {\n\twhile (ereg(\"%u([0-9A-F][0-9A-F][0-9A-F][0-9A-F])\", $texte, $regs))\n\t\t$texte = str_replace($regs[0],\"&#\".hexdec($regs[1]).\";\", $texte);\n\treturn $texte;\n}", "private static function entities($data)\n {\n return strtr($data, array(\n '<' => '&lt;',\n '>' => '&gt;',\n '\"' => '&quot;'\n ));\n }", "function removeHtmlAccentLigature($str) {\n $str = htmlentities($str, ENT_NOQUOTES, 'utf-8');\n $str = preg_replace('#&([A-Za-z])(?:acute|cedil|circ|grave|orn|ring|slash|th|tilde|uml|space);#', '\\1', $str); // Supréssion accent passe 1 \n $str = preg_replace('#&([A-Za-z]{2})(?:lig);#', '\\1', $str); // Transformations des ligatures \n //echo \"Supression des accents HTML : $str<br>\";\n return $str;\n }", "function wp_kses_normalize_entities3($matches)\n {\n }", "function htmlSpecialChars( $text )\n\t{\n\t\t//return preg_replace(\"/&amp;/i\", '&', htmlspecialchars($text, ENT_QUOTES));\n\t\treturn preg_replace(array(\"/&amp;/i\", \"/&nbsp;/i\"), array('&', '&amp;nbsp;'), htmlspecialchars($text, ENT_QUOTES));\n\t}", "function schoonmaakAssistent($value){\n $data = htmlentities($value, ENT_QUOTES); // \"A 'quote' is <b>bold</b>\" Outputs: A &#039;quote&#039; is &lt;b&gt;bold&lt;/b&gt;\n return $data;\n}", "function ids_sanitize($txt){\r\n\t\t$txt = html_entity_decode($txt);\r\n\t\t$txt = str_replace('-','',$txt);\r\n\t\t$txt = str_replace('\\'','',$txt);\r\n\t\t$txt = str_replace('|','',$txt);\r\n\t\t$txt = str_replace(':','',$txt);\r\n\t\t$txt = str_replace(',','',$txt);\r\n\t\treturn $txt;\r\n\t}", "function wp_kses_normalize_entities2($matches)\n {\n }", "function replace_specials_characters($s) {\r\n\t\t\t//$s = mb_convert_encoding($s, 'UTF-8','');\r\n\t\t\t$s = preg_replace(\"/á|à|â|ã|ª/\",\"a\",$s);\r\n\t\t\t$s = preg_replace(\"/Á|À|Â|Ã/\",\"A\",$s);\r\n\t\t\t$s = preg_replace(\"/é|è|ê/\",\"e\",$s);\r\n\t\t\t$s = preg_replace(\"/É|È|Ê/\",\"E\",$s);\r\n\t\t\t$s = preg_replace(\"/í|ì|î/\",\"i\",$s);\r\n\t\t\t$s = preg_replace(\"/Í|Ì|Î/\",\"I\",$s);\r\n\t\t\t$s = preg_replace(\"/ó|ò|ô|õ|º/\",\"o\",$s);\r\n\t\t\t$s = preg_replace(\"/Ó|Ò|Ô|Õ/\",\"O\",$s);\r\n\t\t\t$s = preg_replace(\"/ú|ù|û/\",\"u\",$s);\r\n\t\t\t$s = preg_replace(\"/Ú|Ù|Û/\",\"U\",$s);\r\n\t\t\t$s = str_replace(array(\"ñ\", \"Ñ\"), array(\"n\", \"N\"), $s);\r\n\t\t\t$s = str_replace(array('ç', 'Ç'), array('c', 'C'), $s);\r\n\r\n\t\t\t//$s = str_replace(\" \",\"_\",$s);\r\n\t\t\t//$s = preg_replace('/[^a-zA-Z0-9_\\.-]/', '', $s);\r\n\t\t\treturn $s;\r\n\t\t}", "function phpTrafficA_cleanTextBasic($text) {\n$text = str_replace(\"\\'\", \"&#39;\", $text);\n$text = str_replace(\"'\", \"&#39;\", $text);\n$text = str_replace(\"\\\"\", \"&#34;\", $text);\n$text = str_replace(\"\\\\\\\"\", \"&#34;\", $text);\n$text = str_replace(\"\\\\\", \"&#92;\", $text);\n$text = str_replace(\"\\\\\\\\\", \"&#92;\", $text);\n$text = str_replace(\"\\n\", \"\", $text);\n$text = str_replace(\"\\r\", \"\", $text);\n$text = str_replace(\"<\", \"&#060;\", $text);\n$text = str_replace(\">\", \"&#062;\", $text);\nreturn $text;\n}", "function remove_strange_chars($txt){\n\t\treturn(str_replace(array('<','>',\"'\",\";\",\"&\",\"\\\\\"),'',$txt));\n\t}", "function convert_smart_quotes($string) {\r\n \t$search = array(chr(212),chr(213),chr(210),chr(211),chr(209),chr(208),chr(201),chr(145),chr(146),chr(147),chr(148),chr(151),chr(150),chr(133));\r\n\t$replace = array('&#8216;','&#8217;','&#8220;','&#8221;','&#8211;','&#8212;','&#8230;','&#8216;','&#8217;','&#8220;','&#8221;','&#8211;','&#8212;','&#8230;');\r\n return str_replace($search, $replace, $string); \r\n}", "function code($texte)\r\n{\r\n//gras\r\n$texte = preg_replace('`\\[g\\](.+)\\[/g\\]`isU', '<strong>$1</strong>', $texte); \r\n//italique\r\n$texte = preg_replace('`\\[i\\](.+)\\[/i\\]`isU', '<em>$1</em>', $texte);\r\n//souligné\r\n$texte = preg_replace('`\\[s\\](.+)\\[/s\\]`isU', '<u>$1</u>', $texte);\r\n//lien\r\n$texte = preg_replace('#http://[a-z0-9._/-]+#i', '<a href=\"$0\">$0</a>', $texte);\r\n\r\n//On retourne la variable texte\r\nreturn $texte;\r\n}", "public function testSpecialChar()\n\t{\n\t\t$special = array(\n\t\t\t'symbol' => '! @ # $ % ^ & * ( ) _ + - = [ ] \\ { } | ; \\' : \" , . / < > ? &amp; &lt; &#039;',\n\t\t\t'html' => '<body><a href=\"http://example.com\">click</a></body>',\n\t\t\t'space' => \"white \\t\\n space\", // no cdata tag for this\n\t\t\t'raw' => '<span>comm]]>ent</span>', // premature end cdata tag will be escaped\n\t\t);\n\n\t\t$xml = $this->getDataElement();\n\t\tInterspire_Xml::addArrayToXML($xml, $special);\n\t\t$out = Interspire_Xml::prettyIndent($xml);\n\n\t\t$expected = Interspire_Xml::getDeclaration();\n\t\t$expected .= '\n<data>\n <symbol><![CDATA['.$special['symbol'].']]></symbol>\n <html><![CDATA['.$special['html'].']]></html>\n <space>'.$special['space'].'</space>\n <raw><![CDATA[<span>comm]]]]><![CDATA[>ent</span>]]></raw>\n</data>\n';\n\t\t$this->assertTrue(Interspire_Xml::validateXMLString($out));\n\t\t$this->assertEquals($expected, $out);\n\n\t\t// reverse\n\t\t$xml = simplexml_load_string($out);\n\t\t$result = Interspire_Xml::xml2array($xml);\n\t\t$this->assertEquals($special, $result);\n\n\t\t// test all html entities\n\t\t$entities = array();\n\t\tforeach (get_html_translation_table(HTML_ENTITIES) as $entity => $encode) {\n\t\t\t$key = str_replace(array('&', ';'), '', $encode);\n\t\t\t$entities[$key] = $encode;\n\t\t}\n\n\t\t$xml = $this->getDataElement();\n\t\tInterspire_Xml::addArrayToXML($xml, $entities);\n\t\t$out = Interspire_Xml::prettyIndent($xml);\n\n\t\t$this->assertTrue(Interspire_Xml::validateXMLString($out));\n\t\t$xml = simplexml_load_string($out);\n\t\t$result = Interspire_Xml::xml2array($xml);\n\t\t$this->assertEquals($entities, $result);\n\t}", "function tpl_modifier_unescape($str) { //·µ»Ø½á¹û±àÂëΪUTF-8\n $str = rawurldecode($str);\n preg_match_all(\"/%u.{4}|&#x.{4};|&#\\d+;|.+/U\",$str,$r);\n $ar = $r[0];\n foreach($ar as $k=>$v) {\n if(substr($v,0,2) == \"%u\")\n $ar[$k] = mb_convert_encoding(pack(\"H4\",substr($v,-4)), \"UTF-8\", \"UCS-2\");\n elseif(substr($v,0,3) == \"&#x\")\n $ar[$k] = mb_convert_encoding(pack(\"H4\",substr($v,3,-1)),\"UTF-8\", \"UCS-2\");\n elseif(substr($v,0,2) == \"&#\") {\n $ar[$k] = mb_convert_encoding(pack(\"n\",substr($v,2,-1)), \"UTF-8\", \"UCS-2\");\n }\n }\n return join(\"\",$ar);\n}", "function html($data) {\n $data = htmlspecialchars($data, ENT_QUOTES); // <>\n return $data;\n }", "function convertValues($var){\n\t\t//Change the script tages < and > to special characeters &lt; and &gt; \n\t\t$var = htmlspecialchars($var);\n\t\t$cleanvar = $var;\n\t\treturn $cleanvar;\n\t}", "function safehtml($in) {\n return htmlentities($in,ENT_COMPAT,'UTF-8');\n}", "function xml_entities($value) {\n\n return strtr(\n\n $value, \n\n array(\n\n \"<\" => \"&lt;\",\n\n \">\" => \"&gt;\",\n\n '\"' => \"&quot;\",\n\n \"'\" => \"&apos;\",\n\n \"&\" => \"&amp;\",\n\n )\n\n );\n\n}", "function Code39 ($Asc)\n{\n switch ($Asc)\n {\n case ' ':\n return \"011000100\"; \n case '$':\n return \"010101000\"; \n case '%':\n return \"000101010\"; \n case '*':\n return \"010010100\"; // * Start/Stop\n case '+':\n return \"010001010\"; \n case '|':\n return \"010000101\"; \n case '.':\n return \"110000100\"; \n case '/':\n return \"010100010\"; \n\t\t\t\tcase '-':\n\t\t\t\t\t\treturn \"010000101\";\n case '0':\n return \"000110100\"; \n case '1':\n return \"100100001\"; \n case '2':\n return \"001100001\"; \n case '3':\n return \"101100000\"; \n case '4':\n return \"000110001\"; \n case '5':\n return \"100110000\"; \n case '6':\n return \"001110000\"; \n case '7':\n return \"000100101\"; \n case '8':\n return \"100100100\"; \n case '9':\n return \"001100100\"; \n case 'A':\n return \"100001001\"; \n case 'B':\n return \"001001001\"; \n case 'C':\n return \"101001000\";\n case 'D':\n return \"000011001\";\n case 'E':\n return \"100011000\";\n case 'F':\n return \"001011000\";\n case 'G':\n return \"000001101\";\n case 'H':\n return \"100001100\";\n case 'I':\n return \"001001100\";\n case 'J':\n return \"000011100\";\n case 'K':\n return \"100000011\";\n case 'L':\n return \"001000011\";\n case 'M':\n return \"101000010\";\n case 'N':\n return \"000010011\";\n case 'O':\n return \"100010010\";\n case 'P':\n return \"001010010\";\n case 'Q':\n return \"000000111\";\n case 'R':\n return \"100000110\";\n case 'S':\n return \"001000110\";\n case 'T':\n return \"000010110\";\n case 'U':\n return \"110000001\";\n case 'V':\n return \"011000001\";\n case 'W':\n return \"111000000\";\n case 'X':\n return \"010010001\";\n case 'Y':\n return \"110010000\";\n case 'Z':\n return \"011010000\";\n default:\n return \"011000100\"; \n }\n}", "private static function buildControlCharacters()\n {\n for ($i = 0; $i <= 19; ++$i) {\n if ($i != 9 && $i != 10 && $i != 13) {\n $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';\n $replace = chr($i);\n self::$controlCharacters[$find] = $replace;\n }\n }\n }", "function UTF2ASCII($code) {\n $UTFchars = array ( //code point UTF8 character name\n '/À/' => 'A', // U+00C0 c3 80 Latin capital letter A with grave\n '/Á/' => 'A', // U+00C1 c3 81 Latin capital letter A with acute\n '/Â/' => 'A', // U+00C2 c3 82 Latin capital letter A with circumflex\n '/Ã/' => 'A', // U+00C3 c3 83 Latin capital letter A with tilde\n '/Ä/' => 'A', // U+00C4 c3 84 Latin capital letter A with diaeresis\n '/Å/' => 'A', // U+00C5 c3 85 Latin capital letter A with ring above\n '/Æ/' => 'AE', // U+00C6 c3 86 Latin capital letter AE\n '/Č/' => 'C', // U+010C c4 8c Latin capital letter C with caron\n '/Ç/' => 'C', // U+00C7 c3 87 Latin capital letter C with cedilla\n '/È/' => 'E', // U+00C8 c3 88 Latin capital letter E with grave\n '/É/' => 'E', // U+00C9 c3 89 Latin capital letter E with acute\n '/Ê/' => 'E', // U+00CA c3 8a Latin capital letter E with circumflex\n '/Ë/' => 'E', // U+00CB c3 8b Latin capital letter E with diaeresis\n '/Ì/' => 'I', // U+00CC c3 8c Latin capital letter I with grave\n '/Í/' => 'I', // U+00CD c3 8d Latin capital letter I with acute\n '/Î/' => 'I', // U+00CE c3 8e Latin capital letter I with circumflex\n '/Ï/' => 'I', // U+00CF c3 8f Latin capital letter I with diaeresis\n '/Ł/' => 'L', // U+0141 c5 81 Latin capital letter L with stroke\n '/Ñ/' => 'N', // U+00D1 c3 91 Latin capital letter N with tilde\n '/Ò/' => 'O', // U+00D2 c3 92 Latin capital letter O with grave\n '/Ó/' => 'O', // U+00D3 c3 93 Latin capital letter O with acute\n '/Ô/' => 'O', // U+00D4 c3 94 Latin capital letter O with circumflex\n '/Õ/' => 'O', // U+00D5 c3 95 Latin capital letter O with tilde\n '/Ö/' => 'O', // U+00D6 c3 96 Latin capital letter O with diaeresis\n '/Ø/' => 'O', // U+00D8 c3 98 Latin capital letter O with stroke\n '/Ù/' => 'U', // U+00D9 c3 99 Latin capital letter U with grave\n '/Ú/' => 'U', // U+00DA c3 9a Latin capital letter U with acute\n '/Û/' => 'U', // U+00DB c3 9b Latin capital letter U with circumflex\n '/Ü/' => 'U', // U+00DC c3 9c Latin capital letter U with diaeresis\n '/Ř/' => 'R', // U+0158 c5 98 Latin capital letter R with caron\n '/Š/' => 'S', // U+0160 c5 a0 Latin capital letter S with caron\n '/Ý/' => 'Y', // U+00DD c3 9d Latin capital letter Y with acute\n '/Ỳ/' => 'Y', // U+1EF2 e1 bb b2 Latin capital letter Y with grave\n '/Ž/' => 'Z', // U+017D c5 bd Latin capital letter Z with caron\n '/Ż/' => 'Z', // U+017B c5 bb Latin capital letter Z with dot above\n '/à/' => 'a', // U+00E0 c3 a0 Latin small letter a with grave\n '/á/' => 'a', // U+00E1 c3 a1 Latin small letter a with acute\n '/â/' => 'a', // U+00E2 c3 a2 Latin small letter a with circumflex\n '/ã/' => 'a', // U+00E3 c3 a3 Latin small letter a with tilde\n '/ä/' => 'a', // U+00E4 c3 a4 Latin small letter a with diaeresis\n '/å/' => 'a', // U+00E5 c3 a5 Latin small letter a with ring above\n '/æ/' => 'ae', // U+00E6 c3 a6 Latin small letter ae\n '/č/' => 'c', // U+010D c4 8d Latin small letter c with caron\n '/ç/' => 'c', // U+00E7 c3 a7 Latin small letter c with cedilla\n '/è/' => 'e', // U+00E8 c3 a8 Latin small letter e with grave\n '/é/' => 'e', // U+00E9 c3 a9 Latin small letter e with acute\n '/ê/' => 'e', // U+00EA c3 aa Latin small letter e with circumflex\n '/ë/' => 'e', // U+00EB c3 ab Latin small letter e with diaeresis\n '/ì/' => 'i', // U+00EC c3 ac Latin small letter i with grave\n '/í/' => 'i', // U+00ED c3 ad Latin small letter i with acute\n '/î/' => 'i', // U+00EE c3 ae Latin small letter i with circumflex\n '/ï/' => 'i', // U+00EF c3 af Latin small letter i with diaeresis\n '/ł/' => 'l', // U+0142 c5 82 Latin small letter l with stroke\n '/ñ/' => 'n', // U+00F1 c3 b1 Latin small letter n with tilde\n '/ò/' => 'o', // U+00F2 c3 b2 Latin small letter o with grave\n '/ó/' => 'o', // U+00F3 c3 b3 Latin small letter o with acute\n '/ô/' => 'o', // U+00F4 c3 b4 Latin small letter o with circumflex\n '/õ/' => 'o', // U+00F5 c3 b5 Latin small letter o with tilde\n '/ö/' => 'o', // U+00F6 c3 b6 Latin small letter o with diaeresis\n '/ø/' => 'o', // U+00F8 c3 b8 Latin small letter O with stroke\n '/ù/' => 'u', // U+00F9 c3 b9 Latin small letter u with grave\n '/ú/' => 'u', // U+00FA c3 ba Latin small letter u with acute\n '/û/' => 'u', // U+00FB c3 bb Latin small letter u with circumflex\n '/ü/' => 'u', // U+00FC c3 bc Latin small letter u with diaeresis\n '/ř/' => 'r', // U+0159 c5 99 Latin small letter r with caron\n '/š/' => 's', // U+0161 c5 a1 latin small letter s with caron\n '/ÿ/' => 'y', // U+00FF c3 bf Latin small letter y with diaeresis\n '/ý/' => 'y', // U+00FD c3 bd Latin small letter y with acute\n '/ỳ/' => 'y', // U+1EF3 e1 bb b3 Latin small letter y with acute\n '/ž/' => 'z', // U+017E c5 be Latin small letter z with caron\n '/ż/' => 'z' // U+017C c5 bc Latin small letter z with dot above\n );\n\n $code = preg_replace(array_keys($UTFchars), array_values($UTFchars), $code);\n return $code;\n }", "function convMajuscule($valeur){\r\n if($valeur>=\"a\" && $valeur<=\"z\"){\r\n $codeValeur = ord($valeur) - 32;\r\n }\r\n return chr($codeValeur);\r\n }", "static function getCharacters()\n {\n return '\\x{00E5}\\x{00E4}\\x{00F6}';\n }", "function convertToSeo($text)\n{\n $turkce = array(\"ç\",\"Ç\",\"ğ\",\"Ğ\",\"ü\",\"Ü\",\"ö\",\"Ö\",\"ı\",\"İ\",\"ş\",\"Ş\",\".\",\",\",\"!\",\"\\\"\",\" \",\"?\",\"*\",\"_\",\"|\",\"=\",\"(\",\")\",\"[\",\"]\",\"{\",\"}\");\n $convert = array(\"c\",\"c\",\"g\",\"g\",\"u\",\"u\",\"o\",\"o\",\"i\",\"i\",\"s\",\"s\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\");\n\n //$seo1 = str_replace($turkce,$convert,$title);\n return strtolower(str_replace($turkce,$convert,$text));\n}", "function htmlspecialcharsbx($string, $flags = ENT_COMPAT)\r\n\t{\r\n\t\treturn htmlspecialchars($string, $flags, \"ISO-8859-1\");\r\n\t}", "function _convert()\n {\r\n \t$badStr = $this->html;\n\t //remove PHP if it exists\r\n\t while( substr_count( $badStr, '<'.'?' ) && substr_count( $badStr, '?'.'>' ) && strpos( $badStr, '?'.'>', strpos( $badStr, '<'.'?' ) ) > strpos( $badStr, '<'.'?' ) ) {\r\n\t $badStr = substr( $badStr, 0, strpos( $badStr, '<'.'?' ) ) . substr( $badStr, strpos( $badStr, '?'.'>', strpos( $badStr, '<'.'?' ) ) + 2 ); }\r\n\t //remove comments\r\n\t while( substr_count( $badStr, '<!--' ) && substr_count( $badStr, '-->' ) && strpos( $badStr, '-->', strpos( $badStr, '<!--' ) ) > strpos( $badStr, '<!--' ) ) {\r\n\t $badStr = substr( $badStr, 0, strpos( $badStr, '<!--' ) ) . substr( $badStr, strpos( $badStr, '-->', strpos( $badStr, '<!--' ) ) + 3 ); }\r\n\t //now make sure all HTML tags are correctly written (> not in between quotes)\r\n\r\n\t \r\n\t //TODO: here is any problem, because in some cases happens loop and mail is never parsed\r\n\t //\t for( $x = 0, $goodStr = '', $is_open_tb = false, $is_open_sq = false, $is_open_dq = false; strlen( $chr = $badStr{$x} ); $x++ ) {\r\n//\t //take each letter in turn and check if that character is permitted there\r\n//\t switch( $chr ) {\r\n//\t case '<':\r\n//\t if( !$is_open_tb && strtolower( substr( $badStr, $x + 1, 5 ) ) == 'style' ) {\r\n//\t $badStr = substr( $badStr, 0, $x ) . substr( $badStr, strpos( strtolower( $badStr ), '</style>', $x ) + 7 ); $chr = '';\r\n//\t } elseif( !$is_open_tb && strtolower( substr( $badStr, $x + 1, 6 ) ) == 'script' ) {\r\n//\t $badStr = substr( $badStr, 0, $x ) . substr( $badStr, strpos( strtolower( $badStr ), '</script>', $x ) + 8 ); $chr = '';\r\n//\t } elseif( !$is_open_tb ) { $is_open_tb = true; } else { $chr = '&lt;'; }\r\n//\t break;\r\n//\t case '>':\r\n//\t if( !$is_open_tb || $is_open_dq || $is_open_sq ) { $chr = '&gt;'; } else { $is_open_tb = false; }\r\n//\t break;\r\n//\t case '\"':\r\n//\t if( $is_open_tb && !$is_open_dq && !$is_open_sq ) { $is_open_dq = true; }\r\n//\t elseif( $is_open_tb && $is_open_dq && !$is_open_sq ) { $is_open_dq = false; }\r\n//\t else { $chr = '&quot;'; }\r\n//\t break;\r\n//\t case \"'\":\r\n//\t if( $is_open_tb && !$is_open_dq && !$is_open_sq ) { $is_open_sq = true; }\r\n//\t elseif( $is_open_tb && !$is_open_dq && $is_open_sq ) { $is_open_sq = false; }\r\n//\t } $goodStr .= $chr;\r\n//\t }\r\n$goodStr = $badStr;\r\n\t \r\n\t //now that the page is valid (I hope) for strip_tags, strip all unwanted tags\r\n\t $goodStr = strip_tags( $goodStr, '<title><hr><h1><h2><h3><h4><h5><h6><div><p><br><pre><sup><ul><ol><dl><dt><table><caption><tr><li><dd><th><td><a><area><img><form><input><textarea><button><select><option>' );\r\n\t //strip extra whitespace except between <pre> and <textarea> tags\r\n\t $badStr = preg_split( \"/<\\/?pre[^>]*>/i\", $goodStr );\r\n\t for( $x = 0; is_string( $badStr[$x] ); $x++ ) {\r\n\t if( $x % 2 ) { $badStr[$x] = '<pre>'.$badStr[$x].'</pre>'; } else {\r\n\t $goodStr = preg_split( \"/<\\/?textarea[^>]*>/i\", $badStr[$x] );\r\n\t for( $z = 0; is_string( $goodStr[$z] ); $z++ ) {\r\n\t if( $z % 2 ) { $goodStr[$z] = '<textarea>'.$goodStr[$z].'</textarea>'; } else {\r\n\t $goodStr[$z] = preg_replace( \"/\\s+/\", ' ', $goodStr[$z] );\r\n\t } }\r\n\t $badStr[$x] = implode('',$goodStr);\r\n\t } }\r\n\t $goodStr = implode('',$badStr);\r\n\r\n\t\t$search = array(\r\n\t\t \"/\\r/\", // Non-legal carriage return\r\n\t\t \"/[\\n\\t]+/\", // Newlines and tabs\r\n\t\t '/<br[^>]*>/i', // <br>\r\n\t\t '/&nbsp;/i',\r\n\t\t '/&quot;/i',\r\n\t\t '/&gt;/i',\r\n\t\t '/&lt;/i',\r\n\t\t '/&amp;/i',\r\n\t\t '/&copy;/i',\r\n\t\t '/&trade;/i',\r\n\t\t '/&#8220;/',\r\n\t\t '/&#8221;/',\r\n\t\t '/&#8211;/',\r\n\t\t '/&#8217;/',\r\n\t\t '/&#38;/',\r\n\t\t '/&#169;/',\r\n\t\t '/&#8482;/',\r\n\t\t '/&#151;/',\r\n\t\t '/&#147;/',\r\n\t\t '/&#148;/',\r\n\t\t '/&#149;/',\r\n\t\t '/&reg;/i',\r\n\t\t '/&bull;/i',\r\n\t\t '/&[&;]+;/i'\r\n\t\t );\r\n\r\n\t\t\t$replace = array(\r\n\t\t '', // Non-legal carriage return\r\n\t\t ' ', // Newlines and tabs\r\n\t\t \"\\n\", // <br>\r\n\t\t ' ',\r\n\t\t '\"',\r\n\t\t '>',\r\n\t\t '<',\r\n\t\t '&',\r\n\t\t '(c)',\r\n\t\t '(tm)',\r\n\t\t '\"',\r\n\t\t '\"',\r\n\t\t '-',\r\n\t\t \"'\",\r\n\t\t '&',\r\n\t\t '(c)',\r\n\t\t '(tm)',\r\n\t\t '--',\r\n\t\t '\"',\r\n\t\t '\"',\r\n\t\t '*',\r\n\t\t '(R)',\r\n\t\t '*',\r\n\t\t ''\r\n\t\t );\r\n\t \r\n\t \r\n\t $goodStr = preg_replace( $search, $replace, $goodStr );\r\n\t \r\n\t //remove all options from select inputs\r\n\t $goodStr = preg_replace( \"/<option[^>]*>[^<]*/i\", '', $goodStr );\r\n\t //replace all tags with their text equivalents\r\n\t $goodStr = preg_replace( \"/<(\\/title|hr)[^>]*>/i\", \"\\n --------------------\\n\", $goodStr );\r\n\t $goodStr = preg_replace( \"/<(h|div|p)[^>]*>/i\", \"\\n\", $goodStr );\r\n\t $goodStr = preg_replace( \"/<sup[^>]*>/i\", '^', $goodStr );\r\n\t $goodStr = preg_replace( \"/<(ul|ol|dl|dt|table|caption|\\/textarea|tr[^>]*>\\s*<(td|th))[^>]*>/i\", \"\\n\", $goodStr );\r\n\t $goodStr = preg_replace( \"/<li[^>]*>/i\", \"\\n· \", $goodStr );\r\n\t $goodStr = preg_replace( \"/<dd[^>]*>/i\", \"\\n\\t\", $goodStr );\r\n\t $goodStr = preg_replace( \"/<(th|td)[^>]*>/i\", \"\\t\", $goodStr );\r\n\t $goodStr = preg_replace('/<br[^>]*>/i', \"\\n\", $goodStr);\r\n\t $goodStr = preg_replace( \"/<a[^>]* href=(\\\"((?!\\\"|#|javascript:)[^\\\"#]*)(\\\"|#)|'((?!'|#|javascript:)[^'#]*)('|#)|((?!'|\\\"|>|#|javascript:)[^#\\\"'> ]*))[^>]*>/i\", \"[LINK: $2$4$6] \", $goodStr );\r\n\t $goodStr = preg_replace( \"/<img[^>]* alt=(\\\"([^\\\"]+)\\\"|'([^']+)'|([^\\\"'> ]+))[^>]*>/i\", \"[IMAGE: $2$3$4] \", $goodStr );\r\n\t $goodStr = preg_replace( \"/<form[^>]* action=(\\\"([^\\\"]+)\\\"|'([^']+)'|([^\\\"'> ]+))[^>]*>/i\", \"\\n[FORM: $2$3$4] \", $goodStr );\r\n\t $goodStr = preg_replace( \"/<(input|textarea|button|select)[^>]*>/i\", \"[INPUT] \", $goodStr );\r\n\t //strip all remaining tags (mostly closing tags)\r\n\t $goodStr = strip_tags( $goodStr );\r\n\t //convert HTML entities\r\n\t $goodStr = strtr( $goodStr, array_flip( get_html_translation_table( HTML_ENTITIES ) ) );\r\n\t preg_replace( \"/&#(\\d+);/me\", \"chr('$1')\", $goodStr );\r\n\t //wordwrap\r\n\t //$goodStr = wordwrap( $goodStr );\r\n\t //make sure there are no more than 3 linebreaks in a row and trim whitespace\r\n\t $this->text = preg_replace( \"/^\\n*|\\n*$/\", '', preg_replace( \"/[ \\t]+(\\n|$)/\", \"$1\", preg_replace( \"/\\n(\\s*\\n){2}/\", \"\\n\\n\\n\", preg_replace( \"/\\r\\n?|\\f/\", \"\\n\", str_replace( chr(160), ' ', $goodStr ) ) ) ) );\r\n }", "function jse($val) {\n // this prevents some character re-spacing such as <java\\0script> \n // note that you have to handle splits with \\n, \\r, and \\t later since they *are* \n // allowed in some inputs \n $val = preg_replace('/([\\x00-\\x08][\\x0b-\\x0c][\\x0e-\\x20])/', '', $val); \n \n // straight replacements, the user should never need these since they're normal characters \n // this prevents like <IMG SRC=&#X40&#X61&#X76&#X61&#X73&#X63&#X72&#X69&#X70&#X74&\n // #X3A&#X61&#X6C&#X65&#X72&#X74&#X28&#X27&#X58&#X53&#X53&#X27&#X29> \n $search = 'abcdefghijklmnopqrstuvwxyz'; \n $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $search .= '1234567890!@#$%^&*()'; \n $search .= '~`\";:?+/={}[]-_|\\'\\\\'; \n for ($i = 0; $i < strlen($search); $i++) { \n // ;? matches the ;, which is optional \n // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars \n \n // &#x0040 @ search for the hex values \n $val = preg_replace('/(&#[x|X]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); \n // with a ; \n\n // @ @ 0{0,7} matches '0' zero to seven times \n $val = preg_replace('/(&#0{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ; \n } \n \n // now the only remaining whitespace attacks are \\t, \\n, and \\r \n $ra1 = Array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', \n'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base'); \n $ra2 = Array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload'); \n $ra = array_merge($ra1, $ra2); \n \n $found = true; // keep replacing as long as the previous round replaced something \n while ($found == true) { \n $val_before = $val; \n for ($i = 0; $i < sizeof($ra); $i++) { \n $pattern = '/'; \n for ($j = 0; $j < strlen($ra[$i]); $j++) { \n if ($j > 0) { \n $pattern .= '('; \n $pattern .= '(&#[x|X]0{0,8}([9][a][b]);?)?'; \n $pattern .= '|(&#0{0,8}([9][10][13]);?)?'; \n $pattern .= ')?'; \n } \n $pattern .= $ra[$i][$j]; \n } \n $pattern .= '/i'; \n $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag \n $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags \n if ($val_before == $val) { \n // no replacements were made, so exit the loop \n $found = false; \n } \n } \n } \n return $val; \n}", "function zuiver($tekst)\r\n{\r\n\t$voor = '\"' ;\r\n\t$na = \"&quot;\";\r\n\t$tekst = str_replace($voor, $na, $tekst);\r\n\t$voor = \"'\" ;\r\n\t$na = \"`\";\r\n\t$tekst = str_replace($voor, $na, $tekst);\r\n\t$tekst = strip_tags($tekst);\r\n\t$tekst = stripslashes($tekst);\r\n\t$tekst = htmlentities($tekst);\r\n\treturn $tekst;\r\n}", "public function htmlEntitiesToChars($str)\n {\n// if (mb_detect_encoding($str) == 'UTF-8'){\n// decode decimal HTML entities added by web browser\n $str = preg_replace('/&#\\d{2,5};/ue', \"\\$this->utf8_entity_decode('$0')\", $str);\n// decode hex HTML entities added by web browser\n $str = preg_replace('/&#x([a-fA-F0-7]{2,8});/ue', \"\\$this->utf8_entity_decode('&#'.hexdec('$1').';')\", $str ); \n// decode named characters\n $str = html_entity_decode($str, ENT_QUOTES, \"utf-8\");\n// echo $str.'<br />';\n// }\n return $str; \n }", "function replace_specialChar($vTitle) {\r\n $rs_catname = $vTitle;\r\n $spstr = \"�#�#�#�#�#�#�#�#�#�#�#�#�#�#�##�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�\";\r\n $spArr = @explode(\"#\", $spstr);\r\n $i = 0;\r\n foreach ($spArr as $arr) {\r\n $rs_catname = str_replace($arr, \"-\", $rs_catname);\r\n $i++;\r\n }\r\n //print_r($rs_catname);exit;\r\n $rs_catname = str_replace(\"#\", \"-\", $rs_catname);\r\n $rs_catname = str_replace(\" \", \"-\", str_replace(\"&\", \"and\", $rs_catname));\r\n return $rs_catname;\r\n}", "function txt_htmlspecialchars($t=\"\")\n\t{\n\t\t// Use forward look up to only convert & not &#123;\n\t\t$t = preg_replace(\"/&(?!#[0-9]+;)/s\", '&amp;', $t );\n\t\t$t = str_replace( \"<\", \"&lt;\" , $t );\n\t\t$t = str_replace( \">\", \"&gt;\" , $t );\n\t\t$t = str_replace( '\"', \"&quot;\", $t );\n\t\t$t = str_replace( \"'\", '&#039;', $t );\n\t\t\n\t\treturn $t; // A nice cup of?\n\t}" ]
[ "0.6673663", "0.6673663", "0.6527756", "0.6498215", "0.63972336", "0.6355365", "0.6302068", "0.630082", "0.6292011", "0.62564963", "0.6237709", "0.62167984", "0.61930776", "0.6155556", "0.6132251", "0.6110325", "0.6109017", "0.6101897", "0.6043615", "0.6041443", "0.6031668", "0.60203123", "0.6012526", "0.60103637", "0.59809613", "0.5978741", "0.5977986", "0.5966171", "0.59627664", "0.59549856", "0.5946347", "0.5936109", "0.5900192", "0.58946204", "0.589296", "0.58914703", "0.58908206", "0.5890699", "0.58838457", "0.5855409", "0.5851737", "0.5839219", "0.58204544", "0.580959", "0.58051926", "0.58015406", "0.5799638", "0.57927895", "0.57851535", "0.5781686", "0.57660687", "0.5764546", "0.57603055", "0.57519466", "0.5736558", "0.5735441", "0.57148945", "0.5711992", "0.5709973", "0.57054853", "0.570547", "0.57004446", "0.56982553", "0.5683884", "0.5680442", "0.56789494", "0.5677446", "0.5673423", "0.5654636", "0.565426", "0.56508553", "0.564857", "0.5646488", "0.56382865", "0.5628143", "0.5623959", "0.5617873", "0.5606503", "0.5600781", "0.55999726", "0.5599301", "0.5596641", "0.5595775", "0.55938196", "0.5591411", "0.55883217", "0.5586702", "0.5585277", "0.55826277", "0.55816936", "0.5577621", "0.55771303", "0.55752516", "0.5573605", "0.55683583", "0.55564874", "0.5550291", "0.55490756", "0.5543129", "0.5542898" ]
0.67559993
0
/ Inicia sesion a un usuario en el sistema
function login_user($user,$pass,$activo=false,$h=false){ $c = ($h)?$pass:md5($pass); $sql = sprintf("SELECT * FROM `login` WHERE `email` = %s AND `contrasena` = %s AND `cloud` = %s LIMIT 1", varSQL($user), varSQL($c), varSQL(__sistema)); $datos = consulta($sql,true); if($datos != false){ $_SESSION['usuario'] = $datos['resultado'][0]['id']; $_SESSION['session_key']= md5($pass); //obtener los datos adicionales del usuario en cuestion de acuerdo al perfil de usuario que pertenesca $sql = sprintf("SELECT * FROM `%s` WHERE `id_login` = %s",(obtener_campo(sprintf("SELECT `tabla` FROM `usuarios_perfiles_link` WHERE `id_perfil` = %s",varSQL($datos['resultado'][0]['perfil'])))),varSQL($datos['resultado'][0]['id'])); $datos1 = consulta($sql,true); if($datos1!=false){ unset($datos1['resultado'][0]['id']); $d = array_merge($datos['resultado'][0],$datos1['resultado'][0]); $_SESSION['data_login'] = $d; }else{ $_SESSION['data_login'] = $datos['resultado'][0]; } //obteniendo los detalles de los modulos disponibles para cada usuario $con = sprintf("SELECT * FROM `componentes_instalados` WHERE `id` IN(SELECT `id_componente` FROM `usuarios_perfiles_permisos` WHERE `id_perfil` = %s)",varSQL($datos['resultado'][0]['perfil'])); $r = consulta($con,true); //detalles del perfil $p = consulta(sprintf("SELECT `nombre`,`p` FROM `usuarios_perfiles` WHERE `id` = %s",varSQL($datos['resultado'][0]['perfil'])),true); $_SESSION['usuario_perfil'] = $p['resultado'][0]; $_SESSION['usuario_componentes'] = $r['resultado']; $detalles = array("estado"=>"ok","detalles"=>""); }else{ $_SESSION['usuario']=''; $_SESSION['session_key']=''; $detalles = array("estado"=>"error","detalles"=>"no_log_data","mensaje"=>"Nombre de usuario o contrase&ntilde;a incorrecta"); } return $detalles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1646);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $this->user->setOpRoles('cclavoisier01.in2p3.fr');\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1258);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "private function logInSimpleUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(41);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "public function autentificacion($username,$password){\n $userService = new UsuariosServiceImp();\n //objeto de tipo usuario\n $usuario = new Usuarios();\n //llamdo al metodo definido en la capa de servicio\n $usuario = $userService->buscarPorUsernamePassword($username,$password);\n if ( is_object($usuario)){\n /*\n variable de sesion mediante variables locales\n \n $_SESSION['nombre'] = $usuario->getNombre();\n $_SESSION['correo'] = $usuario->getEmail();\n $_SESSION['id'] = $usuario->getId();\n */\n /* variable de sesion mediante un arreglo asociado\n */\n $_SESSION['miSesion'] = array();\n $_SESSION['miSesion']['nombre'] = $usuario->getNombre();\n $_SESSION['miSesion']['correo'] = $usuario->getEmail();\n $_SESSION['miSesion']['id'] = $usuario->getId();\n \n //echo \"<br>El usuario es valido\";\n header(\"location:../view/productos.class.php\");\n }else{\n //echo \"<br>Este usuario no esta registrado en la base de datos\";\n header(\"location:../view/formLogin.html\");\n }\n }", "function iniciar_sesion($id_user, $pass){\n\t\t\t//if ( no lo encontro )\n\t\t\t\t//return false;\n\t\t\t$_SESSION['id_usuario'] = $id_usuario;\n\t\t\t$_SESSION['tipo'] = $type;\n\t\t\t$_SESSION['usuario'] = $usuario;\n\t\t\treturn true;\n\t\t}", "function registrarSesion () {\n\n if (!empty($this->id_usuario)) {\n $this->salvar(['ultima_session' => 'current_timestamp',\n 'activo' => 1\n ]);\n Helpers\\Sesion::sessionLogin();\n }\n else return false;\n\n }", "public function login(){\n\n if(isset($_POST)){\n \n /* identificar al usuario */\n /* consulta a la base de datos */\n $usuario = new Usuario();\n \n $usuario->setEmail($_POST[\"email\"]);\n $usuario->setPassword($_POST[\"password\"]);\n \n $identity = $usuario->login();\n \n\n if($identity && is_object($identity)){\n \n $_SESSION[\"identity\"]= $identity;\n\n if($identity->rol == \"admin\"){\n var_dump($identity->rol);\n\n $_SESSION[\"admin\"] = true;\n }\n }else{\n $_SESSION[\"error_login\"] = \"identificacion fallida\";\n }\n\n\n /* crear una sesion */\n \n }\n /* redireccion */\n header(\"Location:\".base_url);\n\n }", "private function logInVOUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(44);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $this->user->setOpRoles('cclavoisier01.in2p3.fr');\n\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "public function telaCadastroUsuario():void {\n $session =(Session::get('USER_AUTH'));\n if (!isset($session)) {\n $this->view('Home/login_viewer.php');\n }\n elseif ((int) Session::get('USER_ID')!==1) {\n Url::redirect(SELF::PAINEL_USUARIO);\n }\n else {\n $this->cabecalhoSistema();\n $this->view('Administrador/usuario/formulario_cadastro_usuario_viewer.php');\n $this->rodapeSistema();\n }\n }", "function loguear($usuario) {\n $_SESSION[\"idUser\"] = $usuario[\"id\"];\n }", "public function loginUsuario($login = '', $clave = '') {\n $password = md5($clave);\n $this->consulta = \"SELECT * \n FROM usuario \n WHERE login = '$login' \n AND password = '$password' \n AND estado = 'Activo' \n LIMIT 1\";\n\n if ($this->consultarBD() > 0) {\n $_SESSION['LOGIN_USUARIO'] = $this->registros[0]['login'];\n $_SESSION['ID_USUARIO'] = $this->registros[0]['idUsuario'];\n $_SESSION['PRIVILEGIO_USUARIO'] = $this->registros[0]['privilegio'];\n $_SESSION['ACTIVACION_D'] = 0;\n// $_SESSION['ACCESOMODULOS'] = $this->registros[0]['accesoModulos'];\n\n $tipoUsuario = $this->registros[0]['tipoUsuario'];\n\n switch ($tipoUsuario) {\n case 'Empleado':\n $idEmpleado = $this->registros[0]['idEmpleado'];\n $this->consulta = \"SELECT primerNombre, segundoNombre, primerApellido, segundoApellido, cargo, cedula, tipoContrato \n FROM empleado \n WHERE idEmpleado = $idEmpleado \n LIMIT 1\";\n $this->consultarBD();\n// $apellidos = explode(' ', $this->registros[0]['apellidos']);\n $_SESSION['ID_EMPLEADO'] = $idEmpleado;\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['primerNombre'] . ' ' . $this->registros[0]['primerApellido'];\n $_SESSION['CARGO_USUARIO'] = $this->registros[0]['cargo'];\n $_SESSION['TIPO_CONTRATO'] = $this->registros[0]['tipoContrato'];\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['primerNombre'] . ' ' . $this->registros[0]['segundoNombre'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['primerApellido'] . ' ' . $this->registros[0]['segundoApellido'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['cedula'];\n break;\n case 'Cliente Residencial':\n $idResidencial = $this->registros[0]['idResidencial'];\n $this->consulta = \"SELECT nombres, apellidos, cedula \n FROM residencial \n WHERE idResidencial = $idResidencial \n LIMIT 1\";\n $this->consultarBD();\n $apellidos = explode(' ', $this->registros[0]['apellidos']);\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['nombres'] . ' ' . $apellidos[0];\n $_SESSION['CARGO_USUARIO'] = 'Cliente Residencial';\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['nombres'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['apellidos'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['cedula'];\n break;\n case 'Cliente Corporativo':\n $idCorporativo = $this->registros[0]['idCorporativo'];\n $this->consulta = \"SELECT razonSocial, nit \n FROM corporativo \n WHERE idCorporativo = $idCorporativo \n LIMIT 1\";\n\n $this->consultarBD();\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['CARGO_USUARIO'] = 'Cliente Corporativo';\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['nit'];\n break;\n case 'Administrador':\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = 'Administrador';\n $_SESSION['CARGO_USUARIO'] = 'Administrador';\n $_SESSION['TIPO_CONTRATO'] = 'Laboral Administrativo';\n\n $_SESSION['NOMBRES_USUARIO'] = 'Administrador';\n $_SESSION['APELLIDOS_USUARIO'] = 'Administrador';\n $_SESSION['CEDULA_USUARIO'] = '10297849';\n $_SESSION['ID_EMPLEADO'] = '12';\n $_SESSION['ID_CAJA_MAYOR_FNZAS'] = 2;\n $idEmpleado = 12;\n break;\n default:\n break;\n }\n\n //******************************************************************\n // VARIABLES DE SESSION PARA EL ACCESO AL MODULO RECAUDOS Y FACTURACION DE swDobleclick\n\n $_SESSION['user_name'] = $_SESSION['NOMBRES_APELLIDO_USUARIO'];\n $_SESSION['user_charge'] = $_SESSION['CARGO_USUARIO'];\n\n $_SESSION['user_id'] = 0; //$this->getIdUsuarioOLD($idEmpleado);\n $_SESSION['user_privilege'] = 0; //$this->getPrivilegioUsuarioOLD($idEmpleado);\n\n //******************************************************************\n\n $fechaHora = date('Y-m-d H:i:s');\n $idUsuario = $_SESSION['ID_USUARIO'];\n $consultas = array();\n $consultas[] = \"UPDATE usuario \n SET fechaHoraUltIN = '$fechaHora' \n WHERE idUsuario = $idUsuario\";\n $this->ejecutarTransaccion($consultas);\n return true;\n } else {\n return false;\n }\n }", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public function login($usuario) {\n $_SESSION['usuario'] = $usuario;\n }", "public function agregarUsuario(){\n \n }", "public static function SetUpUserBySession ();", "private function sesja() {\r\n session_start();\r\n if (!isset($_SESSION['id'])) {\r\n $_SESSION['id'] = 0;\r\n }\r\n }", "function initSession($usuario, $tipo, $codigo_usuario) {\r\n //include 'credenciales.php';\r\n \r\n //Iniciando la sesión en el servidor\r\n session_start();\r\n \r\n if($_SESSION[\"logged\"] == null || $_SESSION[\"logged\"] == false) {\r\n //Seteando las variables que permitirán saber si ha sido logueado el usuario\r\n $_SESSION[\"logged\"] = true;\r\n $_SESSION[\"usuario\"] = $usuario;\r\n $_SESSION[\"tipo\"] = $tipo;\r\n $_SESSION[\"codigo\"] = $codigo_usuario;\r\n \r\n echo '<br> Sesión iniciada<br>';\r\n \r\n }\r\n else {\r\n echo '<br> Sesión existente<br>';\r\n }\r\n}", "private function accesoUsuario()\n {\n if ($this->adminSession) {\n $usuario = $this->session->userdata('admin');\n if ($usuario['id'] > 0) {\n redirect('admin/dashboard');\n } else {\n $this->adminSession = false;\n $this->session->sess_destroy();\n redirect('admin/index'); \n }\n }\n }", "public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}", "public static function manageSession( $usuario = null){ \n session_start();\n if(isset($_SESSION['user'])){\n return 1;\n }\n else if($usuario) {\n $_SESSION['user'] = $usuario; \n return 1;\n }\n else{\n header('Location: login.php');\n return 0;\n }\n }", "public function _atualiza_usuario_sessao($row) {\n $session_key = $this->config['prefixo_sessao'] . '.' . $this->config['hashkey'] . '.' . $this->config['model_usuario'];\n $ses = $this->Session->read($session_key);\n $row = $row[\"{$this->config['model_usuario']}\"];\n $ses = array_merge($ses, $row);\n $this->Session->write($this->config['prefixo_sessao'] . '.' . $this->config['hashkey'] . '.' . $this->config['model_usuario'], $ses);\n }", "public function signInAction()\n {\n $userData = $this->manager->findOneBy(['username' => $this->httpParameters['login']]);\n\n //If no user were found, redirects\n if(empty($userData))\n {\n $this->response->redirect('/auth',HttpResponse::WRONG_LOGIN);\n }\n\n //Instantiates the user\n $user = new User($userData);\n\n //Checks if typed password matches user's password\n if($this->passwordMatch($this->httpParameters['loginPassword'],$user,'/auth'))\n {\n //Sets the user instance as a the new $_SESSION['user']\n $_SESSION['user'] = $user;\n\n $this->response->redirect('/admin');\n }\n }", "private function iniciarSession($usuario, $password){\n\n\t\t$base = new Database();\n\t\t\n\t\t$where = \" usuario = '\".$usuario.\"' AND contrasena = '\".$password.\"'\";\n\t\t\n\t\t$base->querySelect('clientes','',\"*\",$where,'','');\n\n\t\t$datos = $base->getRecordSet();\n\n\t\t$_SESSION['id'] = $datos['id'];\n\t\t$_SESSION['nombre'] = $datos['nombre'];\n\t\t$_SESSION['email'] = $datos['email'];\n\t\t$_SESSION['skype'] = $datos['skype'];\n\t\t$_SESSION['logueado'] = true;\n\t\t$_SESSION['bienvenida'] = false;\n\t\t$_SESSION['test'] = '2';\n\n\t}", "public function autenticar($usr,$pwd) {\n $pwd=\"'\".$pwd.\"'\";\n $sql= 'SELECT * FROM empleados WHERE (\"idEmpleado\" = '.$usr.') AND (dni = '.$pwd.');';\n $empleado=\"\";\n $result = pg_query($sql);\n\n if ($result){\n $registro = pg_fetch_object($result);\n $empleado = $registro->nombres . \" \" . $registro->apellido;\n session_start(); //una vez que se que la persona que se quiere loguear es alguien autorizado inicio la sesion\n //cargo en la variable de sesion los datos de la persona que se loguea\n $_SESSION[\"idEmpleado\"]=$registro->idEmpleado;\n $_SESSION[\"dni\"]=$registro->dni;\n $_SESSION[\"fechaInicio\"]=$registro->fechaInicio;\n $_SESSION[\"nombres\"]=$registro->nombres;\n $_SESSION[\"apellido\"]=$registro->apellido;\n $_SESSION[\"i_lav\"]=$registro->i_lav;\n $_SESSION[\"f_lav\"]=$registro->f_lav;\n $_SESSION[\"i_s\"]=$registro->i_s;\n $_SESSION[\"f_s\"]=$registro->f_s;\n $_SESSION[\"i_d\"]=$registro->i_d;\n $_SESSION[\"f_d\"]=$registro->f_d;\n //$_SESSION[\"iex_lav\"]=$registro->iex_lav;\n //$_SESSION[\"fex_lav\"]=$registro->fex_lav;\n }\n return $empleado;\n }", "public function iniciarSistema( ) {\n $this->esperarInicioSistema();\n }", "private function _registerSession(Pessoa $user) {\r\n $this->session->set('auth', array(\r\n 'codpes' => $user->codpes,\r\n 'nompes' => $user->nompes\r\n ));\r\n }", "function conectar(){\n global $Usuario;\n global $Clave;\n global $_SESSION;\n $this->dataOrdenTrabajo->SetUserName($Usuario);\n $this->dataOrdenTrabajo->SetUserPassword($Clave);\n $this->dataOrdenTrabajo->SetDatabaseName($_SESSION['database']);\n $this->dataOrdenTrabajo->setConnected(true);\n }", "public function connexionSuperAdminLogin(){\n }", "function login($usuario) {\n // Una vez se cumpla la validacion del login contra la base de datos\n // seteamos como identificador de la misma, el email del usuario:\n $_SESSION[\"email\"] = $usuario[\"email\"];\n // dd($_SESSION);\n // Luego seteo la cookie. La mejor explicacion del uso de \n // setcookie() la tienen como siempre, en el manual de PHP\n // http://php.net/manual/es/function.setcookie.php\n setcookie(\"email\", $usuario[\"email\"], time()+3600);\n // A TENER EN CUENTA las observaciones de MDN sobre la seguridad\n // a la hora de manejar cookies, y de paso para comentarles por que\n // me hacia tanto ruido tener que manejar la session asi:\n // https://developer.mozilla.org/es/docs/Web/HTTP/Cookies#Security\n }", "public function addUsuario($usuario){\n $_SESSION[\"usuario\"]=$usuario;\n $this->usuario=$usuario;\n }", "private function __setSessionLoginUsuario($usuario) {\n $sessionUsuario = ['id' => $usuario->id, 'email' => $usuario->email];\n $usuario->last_login = date('Y-m-d H:i:s');\n $usuario->save();\n $this->session->set('Usuario', $sessionUsuario);\n return;\n }", "public function iniciarSesion() {\n require_once 'views/usuarios/login.php';\n }", "function iniciarSesion(){\n session_start();\n\n if(isset($_SESSION['username'])){\n $logged = true;\n $username = $_SESSION['username'];\n $admin = $_SESSION['privilegios'];\n }\n else{\n $logged = false;\n }\n\n if($logged==false){\n echo '<p align=\"right\"> <a href=\"crearUsuario.php\">Crear Usuario</a> <a href=\"Entrar.php\">Entrar</a></p>';return -1;}\n else{\n if($_SESSION[\"expire\"]<time()){ session_unset();\n\n// destroy the session\n session_destroy(); return -1; }\n else {\n echo '<p align=\"right\">Hola,<a href=\"datosSesion.php\">' . $username . '</a>. <a href=\"salirSesion.php\">Salir de sesión</a>';\n }\n }\n\n return $admin;\n}", "public function setUser()\n\t{\n\t\t$user = User::getInstance();\n\t\t\n\t\tif ( $this->session->get( 'user_id' ) ) {\n\t\t\t$user->set( 'id', $this->session->get( 'user_id' ) );\n\t\t\t$user->read();\n\t\t}\n\t}", "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function login2(){\n $row = $this->_usuarios->getUsuario1(\n $this->getAlphaNum('usuario2'),\n $this->getSql('pass2')\n );\n \n // si no existe la fila.\n if(!$row){\n echo \"Nombre y/o contraseña incorrectos\";\n exit;\n }\n \n //Inicia session y define las variables de session \n Session::set('autenticado', true);\n Session::set('usuario', $row['usuario']);\n Session::set('id_role', $row['role']);\n Session::set('nombre', $row['nombre']);\n Session::set('ape_pat', $row['ape_pat']);\n Session::set('ape_mat', $row['ape_mat']);\n Session::set('clave_cetpro', $row['cetpro']);\n Session::set('id_usuario', $row['id']);\n Session::set('admin', $this->_usuarios->checkAdmin());\n Session::set('tiempo', time());\n \n echo \"ok\";\n }", "function verificar_login()\n {\n if (!isset($_SESSION['usuario'])) {\n $this->sign_out();\n }\n }", "public function un_usuario_registrado_puede_iniciar_sesion()\n {\n //\\Artisan::call('db:seed', ['--class' => 'TestsDatabaseSeeder']);\n $user = \\App\\User::find(1);\n\n $this->browse(function (Browser $browser) use ($user) {\n $browser->visit('/')\n ->assertPathIs('/login')\n ->type('login-username', 'admin')\n ->type('login-password', '123')\n ->press('#btn-login')\n ->pause(1000)\n ->assertAuthenticated()\n ;\n });\n }", "public static function initUserSession(){\n\t\t//var_dump($_SESSION['user']);\n\t\tif(isset($_SESSION['user'])){\n\t\t\t//echo \"<h1>le user existe, je le recupere</h1>\";\n\t\t\tself::$_leuser=$_SESSION['user'];\n\t\t}\n\t}", "public function signin(){\r\n if(isset($_SESSION['user'])){\r\n if(isset($_POST['mail']) && isset($_POST['password'])){\r\n $mail = $_POST['mail']; \r\n $password = $_POST['password'];\r\n \r\n if($this->user->setMail($mail) && $this->user->setPassword($password)){\r\n $this->user->db_set_Users($this->user);\r\n die(\"REGISTRO EXITOSO\");\r\n }else{\r\n die(\"ERROR AL REALIZAR EL REGISTRO\");\r\n }\r\n }\r\n }else{\r\n die(\"ERROR AL REQUEST ERRONEO\");\r\n }\r\n }", "public function login() {\n parent::conectarBD();\n\n $queri = parent::query(sprintf(\"select usu_id as codigo, usu_password as senha, \"\n . \"usu_token_sessao as token_sessao, usu_login as login from \"\n . table_prefix . \"usuario where usu_login = '%s' and \"\n . \"usu_password = '%s'\", $this->usu_login, $this->usu_password));\n\n if ($queri) {\n $dados = $queri->fetch_assoc();\n if ($dados) {\n $new_session_id = hash('sha256', $dados['senha'] . time());\n $queri2 = parent::query(\"update \" . table_prefix . \"usuario set usu_token_sessao = '$new_session_id' where usu_id = \" . $dados['codigo']);\n\n if ($queri2) {\n $dados['token_sessao'] = $new_session_id;\n parent::commit();\n parent::desconectarBD();\n return $dados;\n } else {\n parent::rollback();\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n }", "public function loginUser() {\n self::$isLoggedIn = true;\n $this->session->setLoginSession(self::$storedUserId, self::$isLoggedIn);\n $this->session->setFlashMessage(1);\n }", "public function ConnectUsers(){\r\n $this->emailPost();\r\n $this->passwordPost();\r\n \r\n $_SESSION['email'] = $this->_emailPostSecure;\r\n $_SESSION['password'] = $this->_passwordPostSecure;\r\n header('location: Accueil');\r\n }", "function crearSesion($usuario){\r\n\t\tsession_id($usuario['DNI']);\r\n\t\t//Creo la sesión.\r\n\t\tsession_start();\r\n\t\t//Almacenamos todos los datos de la sesión.\r\n\t\t$_SESSION['idUsuario'] = $usuario['idUsuario'];\r\n\t\t$_SESSION['Usuario'] = $usuario['Usuario'];\r\n\t\t$_SESSION['Password'] = $usuario['Password'];\r\n\t\t$_SESSION['Nombre'] = $usuario['Nombre'];\r\n\t\t$_SESSION['Apellido1'] = $usuario['Apellido1'];\r\n\t\t$_SESSION['Apellido2'] = $usuario['Apellido2'];\r\n\t\t$_SESSION['Telefono'] = $usuario['Telefono'];\r\n\t\t$_SESSION['Email'] = $usuario['Email'];\r\n\t\t$_SESSION['CP'] = $usuario['CP'];\r\n\t\t$_SESSION['Provincia'] = $usuario['Provincia'];\r\n\t\t$_SESSION['ComunidadAutonoma'] = $usuario['ComunidadAutonoma'];\r\n\t\t$_SESSION['Rol'] = $usuario['Rol'];\r\n\t\t$_SESSION['DNI'] = $usuario['DNI'];\r\n\t}", "function post_conectar()\n\t{\n\t\t//En este metodo antiguamente se incluia codigo para asegurarse que el esquema de auditoria\n\t\t//guardara el usuario conectado.\n\t}", "public function solicitaUsuario()\n {\n // Lo emitimos por evento\n $this->emit('cambioUsuario', $this->usuario);\n }", "public function authUser()\n {\n //я не знаю почему, что эти функции возвращают пустые строки...\n //$login = mysql_real_escape_string($_POST['login']);\n //$password = mysql_real_escape_string($_POST['password']);\n $login = $_POST['login'];\n $password = $_POST['password'];\n if(DBunit::checkLoginPassword($login, $password)){\n DBunit::createUserSession(DBunit::getUser($login, $password));\n return true;\n }\n else {\n return false;\n }\n }", "public function setLoggedUser(){\n\t\tif(isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])){\n\t\t\t$id = $_SESSION['ccUser'];\n\n\t\t\t$sql = $this->db->prepare(\"SELECT * FROM users WHERE id = :id\");\n\t\t\t$sql->bindValue(':id', $id);\n\t\t\t$sql->execute();\n\n\t\t\tif($sql->rowCount() > 0){\n\t\t\t\t$this->userInfo = $sql->fetch();\n\t\t\t\t$this->permissions = new Permissions();\n\t\t\t\t$this->permissions->setGroup($this->userInfo['id_group']);\n\t\t\t}\n\t\t}\n\t}", "public function setLoggedUser(){\n\t\tif(isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])){\n\t\t\t$id = $_SESSION['ccUser'];\n\n\t\t\t$sql = $this->db->prepare(\"SELECT * FROM users WHERE id = :id\");\n\t\t\t$sql->bindValue(':id', $id);\n\t\t\t$sql->execute();\n\n\t\t\tif($sql->rowCount() > 0){\n\t\t\t\t$this->userInfo = $sql->fetch();\n\t\t\t\t$this->permissions = new Permissions();\n\t\t\t\t$this->permissions->setGroup($this->userInfo['id_group']);\n\t\t\t}\n\t\t}\n\t}", "private static function login() {\n if ( !self::validatePost() ) {\n return;\n }\n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $result = Database::getUser($_POST['email'],$password);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Unbekannter Benutzername oder Passwort!<br>');\n return;\n }\n \n $_SESSION['user']['id'] = $result[0]['id'];\n $_SESSION['user']['email'] = $result[0]['email'];\n $_SESSION['user']['nickname'] = $result[0]['nickname'];\n $_SESSION['user']['verified'] = $result[0]['verified'];\n $_SESSION['user']['moderator'] = $result[0]['moderator'];\n $_SESSION['user']['supermoderator'] = $result[0]['supermoderator'];\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n }", "private function setSesion($usuario)\n {\n if( !$this->session->userdata('logged_in') ){\n $sesion = array(\n 'id' => $usuario->id,\n 'logged_in' => TRUE,\n 'ciudad' => $usuario->ciudad,\n 'UsuarioTipo_id' => $usuario->UsuarioTipo_id\n );\n if($sesion['UsuarioTipo_id']==5){\n $profesor = $this->m_profesores->getsalon($usuario->login);\n $sesion['salon'] = $profesor->salon;\n }\n $this->session->set_userdata($sesion);\n }\n }", "static public function ctrIngresoUsuario(){\n\t\t\n\t\tif (isset($_POST['user']) && isset($_POST['pass'])) {\n\t\t\tif (preg_match('/^[a-zA-Z-0-9 ]+$/', $_POST['user'])) {\n\t\t\t\tswitch ($_POST['rol']) {\n\t\t\t\t\tcase 'Encargado':\n\t\t\t\t\t\t$answer = adminph\\Attendant::where('username',$_POST['user'])->first();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Propietario':\n\t\t\t\t\t\t$answer = adminph\\Propietary::where('username',$_POST['user'])->first();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Arrendatario':\n\t\t\t\t\t\t$answer = adminph\\Lessee::where('username',$_POST['user'])->first();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$answer = adminph\\User::where('username',$_POST['user'])->first();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$password = $_POST[\"pass\"];\n\t\t\t\tif (is_object($answer)) {\n\t\t\t\t\tif (password_verify($password,$answer->password) ) {\n\t\t\t\t\t\tif ($answer->state == 1) {\n\t\t\t\t\t\t\tif ($_POST['rol'] == 'Otro') {\n\t\t\t\t\t\t\t\tsession(['rank' => $answer->type]);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tsession(['rank' => $_POST['rol']]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsession(['user' => $answer->username]);\n\t\t\t\t\t\t\tsession(['name' => $answer->name]);\n\t\t\t\t\t\t\tsession(['id' => $answer->id]);\n\t\t\t\t\t\t\tsession(['photo' => $answer->photo]);\n\t\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\t\t= REGISTRAR LOGIN =\n\t\t\t\t\t\t\t=============================================*/\n\t\t\t\t\t\t\tdate_default_timezone_set('America/Bogota');\n\t\t\t\t\t\t\tsession(['log' => date(\"Y-m-d h:i:s\")]);\n\t\t\t\t\t\t\t$answer->last_log = session('log');\n\t\t\t\t\t\t\tif ($answer->save()) {\n\t\t\t\t\t\t\t\techo ' <script>\n\t\t\t\t\t\t\twindow.location = \"inicio\"; </script> ';\n\n\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\techo '<br><div class=\"alert alert-warning\" style=\"text-align: center;\" >Este usuario se encuentra desactivado, por favor contacte al administrador.</div>';\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<head><style type=\"text/css\" media=\"screen\">body{background:#4a6886;color:#fff;}</style></head><body><div class=\"alert alert-warning\" style=\"text-align: center; font-size: 30px;margin-top:15%\" >Las credenciales ingresadas no son correctas.</div><br><br><div style=\"text-align: center; margin-left: 35%;margin-top:5%; width:30%;background:#E75300; padding: 10px;\"><a href=\"/\"> <span style=\" font-size: 18px; color: #fff\"><b>Volver al inicio</b></span> </a></div></body>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }", "static function logIn($user) {\n if (isset($user)) {\n session_start();\n $_SESSION['userId'] = $user->id;\n }\n }", "function login($email, $senha){// primeiro precisamos aceder os dados dos usuarios \n\t\t$sql = new sql();\n\n\t\t$results = $sql->select(\"SELECT * FROM usuarios WHERE email = :email AND senha = :senha\", array(\n\t\t\t\":email\"=>$email,\n\t\t\t\":senha\"=>$senha\n\t\t));\n\t\tif(count($results) > 0){\n\t\t\t$this->setDados($results[0]);\t\t\t\n\t\t}else{\n\t\t\tthrow new Exception(\"login e/ou email invalidade!\");\t\t\t\n\t\t}\n\n\t}", "function __construct()\n\t{\t\t\n\t\tglobal $seccion, $sesion_name;\n\n\t\t$this->mysql= new Con_mysqli;\n\n\t\t\n\t\t$this->seccion=$seccion;\n\n\t\t$this->sesion_name=\"CONMERSA\";\n\n\t\t// echo \"<pre>\";\n\t\t// var_dump($GLOBALS['sesion_name']);\n\t\t// echo \"</pre>\";\n\n\n\t\t$this->user='';\n\t\t$this->correo=''; \n\t\t$this->pass_usr=''; //Vaciamos la info del usuario\n\n\t\t\n\t\t// $password=\"123\";\n\t\t// echo $hash = password_hash($password, PASSWORD_DEFAULT);\n\n\t\tif($_POST[email]=='' or $_POST[pass_usr]==''){\n\n\t\t\t// echo \"<pre> SESSION NO POST<br/>\";\n\t\t\t// \tvar_dump($_SESSION);\n\t\t\t// \techo \"</pre>\";\n\n\t\t\t$this->check_usuario($_SESSION[$this->sesion_name][email], $_SESSION[$this->sesion_name][pass_usr]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset($_SESSION[$this->sesion_name][email]);\n\t\t\tunset($_SESSION[$this->sesion_name][pass_usr]);\n\n\t\t\t$_SESSION[$this->sesion_name][email]=$_POST[email];\n\t\t\t$_SESSION[$this->sesion_name][pass_usr]=$_POST[pass_usr];\n\t\t\t\n\t\t\t$this->log_usuario($_SESSION[$this->sesion_name][email],$_SESSION[$this->sesion_name][pass_usr]);\n\t\t}\n\n\t}", "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "function logar(){\n //$duracao = time() + 60 * 60 * 24 * 30 * 6;\n //proteção sql\n $login = $_POST['login'];\n $senha = $_POST['senha'];\n \n\n //criptografa\n //$senha = hash(\"sha512\", $senha);\n\n /*faz o select\n $sql = \"SELECT * FROM usuario WHERE login = '$login' AND senha = '$senha'\";\n $resultado = $link->query($sql);\n\n //se der resultado pega os dados no banco\n if($link->affected_rows > 0 ){ \n $dados = $resultado->fetch_array();\n $id = $dados['id_user'];\n $nome = $dados['nome'];\n $email = $dados['email'];\n $foto = $dados['foto_usuario'];\n $login = $dados['login'];\n $senha = $dados['senha'];\n $admin = $dados['is_admin'];\n //cria as variaveis de sessão\n $_SESSION['email'] = $email;\n $_SESSION['id'] = $id;\n $_SESSION['nome'] = $nome;\n $_SESSION['foto'] = $foto;\n $_SESSION['login'] = $login;\n $_SESSION['senha'] = $senha;\n $_SESSION['isAdmin'] = $admin;\n\n # testar se o checkbox foi marcado\n if (isset($_POST['conectado'])) {\n # se foi marcado cria o cookie\n setcookie(\"conectado\", \"sim\", $duracao, \"/\");\n # neste ponto, tambem enviamos para o navegador os cookies de login e senha, com validade de 6 meses\n setcookie(\"login\" , $login, $duracao, \"/\");\n setcookie(\"senha\" , $senha, $duracao, \"/\");\n }*/\n if($login == 'admin' && $senha == 'admin'){\n ?>\n <script> location.href=\"home.php\" </script>\n <?php\n }\n else{\n $_SESSION['msg'] = \"Senha ou usuario Incorreto!\";\n }\n\n //$link->close();\n}", "static public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])){\n\n\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t// $encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$usesomesillystringforsalt$');\n\n\t\t\t\t$item = \"usu_descri\";\n\t\t\t\t$valor = $_POST[\"ingUsuario\"];\n\t\t\t\t$pass = $_POST[\"ingPassword\"];\n\n\t\t\t\t$respuesta = ModeloUsuarios::MdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t// var_dump($respuesta);\n\t\t\t\t// die();\n\n\t\t\t\tif($respuesta[\"usu_descri\"] == $_POST[\"ingUsuario\"] && $respuesta[\"clave\"] == $_POST[\"ingPassword\"])\n\t\t\t\t{\n\n\t\t\t\t\tif($respuesta['estado'] == 'A')\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$_SESSION[\"iniciarSesion\"] = \"ok\";\n\t\t\t\t\t\t$_SESSION[\"id\"] = $respuesta[\"id\"];\n\t\t\t\t\t\t// $_SESSION[\"nombre\"] = $respuesta[\"nombre\"];\n\t\t\t\t\t\t$_SESSION[\"usuario\"] = $respuesta[\"usu_descri\"];\n\t\t\t\t\t\t// $_SESSION[\"foto\"] = $respuesta[\"foto\"];\n\t\t\t\t\t\t// $_SESSION[\"perfil\"] = $respuesta[\"perfil\"];\n\n\t\t\t\t\t\techo '<script>\n\t\n\t\t\t\t\t\twindow.location = \"inicio\";\n\t\n\t\t\t\t\t\t</script>';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">El usuario no esta activo, porfavor, comuniquese con el administrador</div>';\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n\n\t\t\t\t}\n\n\t\t\t}\t\n\n\t\t}\n\n\t}", "public function cadastrar()\n\t{\n\t\t//conexao com o banco\n\t\t$connect = new Connect('user_login');\n\n\t\t$this->id = $connect->insert([\n\t\t\t\t'login'=> $this->login,\n\t\t\t\t'password'=> $this->password\n\t\t]);\n\n\t}", "public function IniciarSesion(Usuario $usu){\n $conn = new conexion();\n $rol = 0;\n try {\n if($conn->conectar()){\n $str_sql = \"Select usuarios.id_usu, usuarios.nom_usu,usuarios.usuario,usuarios.foto,tp_usuarios.nom_tp as rol,usuarios.idcliente from usuarios \"\n . \"INNER JOIN tp_usuarios WHERE usuarios.id_tp_usu = tp_usuarios.id_tp \"\n . \"and usuarios.usuario = '\".$usu->getUsuario().\"' and usuarios.pass = '\".$usu->getPass().\"' \"\n . \"and estado = 'Activo'\";\n $sql = $conn->getConn()->prepare($str_sql);\n $sql->execute();\n $resultado = $sql->fetchAll();\n foreach ($resultado as $row){\n $rol = 1;\n session_start();\n $_SESSION['id'] = $row['id_usu'];\n //$_SESSION['idcli'] = $row['idcliente'];\n $_SESSION['perfil'] = $row['usuario'];\n $_SESSION['rol'] = $row['rol'];\n $_SESSION['user'] = $row['nom_usu'];\n $_SESSION['img'] = $row['foto'];\n }\n }\n } catch (Exception $exc) {\n $rol = -1;\n echo $exc->getMessage();\n }\n $conn->desconectar();\n return $rol;\n }", "private function sesion_iniciada()\n\t{\n\t\t$this->load->library(\"session\");\n\t\tif($this->session->userdata(\"isess\")){\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function log_in($user) {\n session_regenerate_id();\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['username'] = $user['username'];\n $_SESSION['email'] = $user['email'];\n return true;\n }", "public function Login($dados){\n // //$conexao = $c->conexao();\n\n $email = $dados[0];\n $senha = md5($dados[1]);\n\n $sql = \"SELECT a.*, c.permissao FROM tbusuarios a, tbpermissao c WHERE email = '$email' and senha = '$senha' and a.idpermissao = c.idpermissao limit 1 \";\n $row = $this->ExecutaConsulta($this->conexao, $sql);\n\n // print_r($sql);\n\n // $sql=ExecutaConsulta($this->conecta,$sql);\n // $sql = $this->conexao->query($sql);\n // $sql = $this->conexao->query($sql);\n // $row = $sql->fetch_assoc();\n // print_r($row); \n\n if ($row) {\n $_SESSION['chave_acesso'] = md5('@wew67434$%#@@947@@#$@@!#54798#11a23@@dsa@!');\n $_SESSION['email'] = $email;\n $_SESSION['nome'] = $row['nome'];\n $_SESSION['permissao'] = $row['permissao'];\n $_SESSION['idpermissao'] = $row['idpermissao'];\n $_SESSION['last_time'] = time();\n $_SESSION['usuid'] = $row['idusuario'];\n $_SESSION['ip'] = $_SERVER[\"REMOTE_ADDR\"];\n $mensagem = \"O Usuário $email efetuou login no sistema!\";\n $this->salvaLog($mensagem);\n return 1;\n }else{\n return 0;\n }\n\n }", "public function IniciarSesion($data){\n \n if (!$this->SesionIniciada()){ //Verificamos que el usuario no este logueado ya.\n \n $data='<?xml version=\"1.0\" encoding=\"UTF-8\" ?>'.$data; \n $xml = simplexml_load_string($data);\n \n if (!is_object($xml)){\n throw new Exception('Error en la lectura del XML',1001);\n\n }\n \n (string) $nick =(string) $xml->Usuario->Nick;\n (string) $clave = (string)$xml->Usuario->Clave;\n \n $ConexionCassandra=new ManejadorCassandra(); //Conexion con la base de datos cassandra\n $BuscaUsuario=$ConexionCassandra->ConsultaPorParametro('usuario',array('nick'=>$nick)); // Busca en la table usuario el nick \n $VerificaEnBD=$BuscaUsuario->getAll();\n \n if (($VerificaEnBD[$nick]['clave']==$clave)&&($nick!=\"\") &&($clave!=\"\")){ // Verifica en la base de datos que la clave sea igual a la que esta almacenada\n $GuardarIp=$this->ObtenerIp();\n $ConexionCassandra->Insertar('sesion',$GuardarIp,array('ip'=> $GuardarIp,'nick'=>$nick)); //Almasena en la tabla sesion la ip y el nik del usuario\n $this->nick=$nick;\n return 'UsuarioLogeado';\n \n }\n \n else{\n \n return 'Usuario o Clave incorrecta'; // Si algunos de los campos (usuario o clave) son incorrectas, muestra mensaje de error\n \n }\n \n }\n \n else{\n return 'El usuario ya inicio sesion';\n \n }\n \n \n }", "public function login (){\n\n $dao = DAOFactory::getUsuarioDAO(); \n $GoogleID = $_POST['GoogleID']; \n $GoogleName = $_POST['GoogleName']; \n $GoogleImageURL = $_POST['GoogleImageURL']; \n $GoogleEmail = $_POST['GoogleEmail'];\n $usuario = $dao->queryByGoogle($GoogleID); \n if ($usuario == null){\n $usuario = new Usuario();\n $usuario->google = $GoogleID;\n $usuario->nombre = $GoogleName;\n $usuario->avatar = $GoogleImageURL;\n $usuario->correo = $GoogleEmail;\n print $dao->insert($usuario);\n $_SESSION[USUARIO] = serialize($usuario);\n //$usuario = unserialize($_SESSION[USUARIO]);\n } else {\n $_SESSION[USUARIO] = serialize($usuario);\n }\n }", "public static function saveUserSession(){\n\t\t$_SESSION['user']=self::$_leuser;\n\t}", "function setUser($usr) \n {\n\t\t\t$this->user = ((empty($usr)) ? \"root\" : $usr);\n\t\t}", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "private function loginWithSessionData()\n { \n $this->user_name = $_SESSION['user_name'];\n $this->user_email = $_SESSION['user_email'];\n\n // set logged in status to true, because we just checked for this:\n //if(!empty($_SESSION['user_name']) && ($_SESSION['user_logged_in'] == 1)\n // when we called this method (in the constructor)\n $this->user_is_logged_in = true;\n \n if($_SESSION['user_privileges'] == 1)\n $this->user_admin = true;\n }", "public function login()\n {\n\t\tif(isset($_POST['email']) && isset($_POST['senha'])){\n\t\t\t\n\t\t\t//verifica se os $_POST estão vazios\n\t\t\tif(empty($_POST['email']) && empty($_POST['senha'])){\n\t\t\t\theader('Location: /admin?inputvazio=true');\n\t\t\t\treturn true;\n }\n \n $login = Container::getModel('admin');\n $login->setEmail($_POST['email']);\n $login->setSenha($_POST['senha']);\n\n //se a senha e o e-mail é o mesmo do banco\n if($login->login()){\n //cria as sessões\n session_start();\n $_SESSION['logado'] = true;\n $_SESSION['id'] \t= $login->getId();\n $_SESSION['nome'] \t= $login->getNome();\n $_SESSION['nivelAcesso'] \t= $login->geNivelAcesso();\n header('Location: /dashboard');\n }else{\n header('Location: /admin?logado=false');\n }\n }\n }", "static function setupUser()\n {\n global $sugar_config;\n require_once 'modules/Users/User.php';\n $_SESSION['unique_key'] = $sugar_config['unique_key'];\n $user_id = $GLOBALS['db']->getOne(\"SELECT id FROM users WHERE user_name='{$GLOBALS['bob_config']['global']['admin_user_name']}' AND is_admin=1\");\n if(empty($user_id)) {\n throw new Exception(\"Can't find user \".$GLOBALS['bob_config']['global']['admin_user_name'], 1);\n }\n $_SESSION['authenticated_user_id'] = $user_id;\n $GLOBALS['current_user'] = new User();\n $GLOBALS['current_user'] = $GLOBALS['current_user']->retrieve($user_id); \n }", "function __construct()\n {\n session_start();\n if(isset($_SESSION[\"usuario\"])) $this->usuario=$_SESSION[\"usuario\"];\n }", "public function doLogin(){\n $redirect =\"\";\n if(isset($_POST['staticEmail']) && isset($_POST['inputPassword']) && $_POST['staticEmail'] != \"\" && $_POST['inputPassword'] !=\"\")//check if the form is well fill\n {\n $userTabFilter=array(\n '$and' =>array(\n ['email' =>$_POST['staticEmail']],\n ['password' => sha1($_POST['inputPassword'])])\n );//For the filter used on UserManager\n\n $result = $this->_userManager->getUserByPassAndEmail($userTabFilter);\n if($result != null)//return null if the user doesn't exist in DB\n {\n \n $user= array(\n 'id' => $result->_id,\n 'email' => $result->email,\n 'password' => $result->password,\n 'firstname' => $result->firstname,\n 'lastname' => $result->lastname,\n 'pseudo' => $result->pseudo\n );//Filter used on UserManager\n \n $this->_user = $this->_userManager->createUser($user);//Create user, not in DB but, for the session var, as an object\n if($this->_user == 'null'){//In case the creation didn't work\n\n $_SESSION['userStateLogIn'] = ['res'=>'Une erreur a lieu lors de la connexion, veuillez reessayer plus tard.','couleur' => 'red'];//Session var to explain where the error came from\n $redirect = \"form\";//redirect to the form connection\n\n }else{//In case the connexion worked\n \n $_SESSION['userStateLogIn'] = ['res'=>'Connexion réussie','couleur' => 'green'];\n $redirect = \"calendrier\";//redirect to the calendar\n $_SESSION['user'] =$this->_user;//Init the session var user with the user created before\n }\n \n }else{\n $_SESSION['userStateLogIn'] = ['res'=>'Aucun compte avec votre identifiant et mot de passe existe.','couleur' => 'red'];//Session var to explain where the error came from\n $redirect = \"form\";//redirect to the form connection\n }\n\n }else{\n $_SESSION['userStateLogIn'] = ['res'=>'Veuillez remplir le formulaire correctement.','couleur' => 'red'];//Session var to explain where the error came from\n $redirect = \"form\";//redirect to the form connection\n }\n header(\"Location : ../{$this->_redirectTab[$redirect]}\");//proceed to redirection\n \n\n \n }", "public function loginUser($user,$pwd){\n \n $pwdCr = mkpwd($pwd);\n \n \n \n $sql = new Sql();\n $userData = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario\n AND pwd_usuario = :pwd_usuario',array(':email_usuario'=>$user,':pwd_usuario'=>$pwdCr));\n \n if(!isSet($userData) || count($userData)==0){//CASO NADA RETORNADO\n return false;\n }elseif(count($userData)>0){//CASO DADOS RETORNADOS CONFERE O STATUS\n \n if($userData[0]['status_usuario']==0){\n \n return 0;//caso INATIVO entao retorna ZERO indicando cadastro NAO ATIVO\n \n }elseif($userData[0]['status_usuario']==1){//CASO USUARIO ATIVO GERA SESSION DO LOGIN\n \n \n //permissao do cliente\n $_SESSION['_uL'] = encode($userData[0]['permissao_usuario']);\n $_SESSION['logado'] = 'sim';\n \n //dados do usuario\n $_SESSION['_iU'] = encode($userData[0]['id_usuario']);\n $_SESSION['_iE'] = encode($userData[0]['id_empresa']);\n $_SESSION['_nU'] = encode($userData[0]['nome_usuario'] . ' ' . $userData[0]['sobrenome_usuario']);\n $_SESSION['_eU'] = encode($userData[0]['email_usuario']);\n \n return 1;\n }\n \n }\n \n \n }", "public function loginTraitement(){\n\n $identifiant = $this->verifierSaisie(\"identifiant\");\n $password = $this->verifierSaisie(\"password\");\n\n //securite\n if (($identifiant != \"\") && ($password != \"\")){\n\n //on crée un objet de la classe \\W\\Security\\AuthentificationModel\n //ce qui nous permet d'utiliser la methode isValidLoginInfo\n $objetAuthentificationModel = new \\W\\Security\\AuthentificationModel;\n\n $idUser = $objetAuthentificationModel->isValidLoginInfo($identifiant, $password);\n\n if($idUser > 0){\n\n // recuperer les infos de l'utilisateur\n //requete base de donnée pour les recuperer\n //je crée un objet de la classe \\W\\Model\\UsersModel\n $objetUsersModel = new \\W\\Model\\UsersModel;\n // je retrouve les infos de la ligne grace à la colonne ID\n // La classe UsersModel herite de la classe Model je peu donc faire un find pour recupeerr les infos\n $tabUser = $objetUsersModel->find($idUser);\n\n // Je vais ajouter des infos dans la session\n $objetAuthentificationModel->logUserIn($tabUser);\n\n // recuperer l'username\n $username = $tabUser[\"username\"];\n\n\n $GLOBALS[\"loginRetour\"] = \"Bienvenue $username\";\n\n $this->redirectToRoute(\"admin_accueil\");\n }\n else{\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }else{\n\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }", "public function iniciar() {\r\n session_regenerate_id();\r\n }", "public function authUserById($id)\n {\n $user = Users::findFirstByuser_id($id);\n if ($user == false) {\n\t\t\tthrow new Exception($this->t->_('user_not_exists', 'The user does not exist'));\n }\n $this->checkUserFlags($user);\n\t\t$roles = $this->roles2assoc($user->user_roles);\n $this->session->set('auth-i', array(\n 'user_id' => $user->user_id,\n 'user_username' => $user->user_username,\n 'user_email' => $user->user_email,\n 'user_roles' => $roles\n ));\n\n }", "private function _registerSession(Users $user)\n {\n $this->session->set('auth', array(\n 'id' => $user->id_usr,\n 'name' => $user->first_usr,\n 'level' => $user->level_usr_lvl,\n ));\n }", "function login($usuario, $password) {\r\n$integrator = ZendExt_IoC::getInstance();\r\nreturn $integrator->getInstance()->seguridad->AutenticarUsuarioApi($usuario,$password);\r\n}", "public function loginAction()\n {\n\t\t$_SESSION['authen'] = 1;\n\t\t\n\t\t\n\t\t// Si le visiteur est déjà identifié, on le redirige vers l'accueil\n\t\t\n\t\tif ($this->get('security.context')->isGranted('IS_AUTHENTICATED_REMEMBERED')) {\n\t\t\t\t\n\t\t\t// mise à jour de la session important pour les pages qui ne requiet pas d'authentification car impossible d'accéder aux informations d'authenltification\n\t\t\t/*if($this->getUser()->getUsername() != $this->getParameter('super_admin'))\n\t\t\treturn $this->redirect($this->generateUrl('cud_default_indexpage'));\n\t\t\telse*\n\t\t\treturn $this->redirect($this->generateUrl('cud_default_adminpage'));\n\t\t\t*/\n\t\t\treturn $this->redirect($this->generateUrl('alexandrie_frontend_homepage'));\n\t\t}\n\t\t\n\t\t$request = $this->getRequest();\n\t\t$session = $request->getSession();\n\t\t// On vérifie s'il y a des erreurs d'une précédente soumission du formulaire\n\t\tif ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) {\n\t\t $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR);\n\t\t} else {\n\t\t $error = $session->get(SecurityContext::AUTHENTICATION_ERROR);\n\t\t $session->remove(SecurityContext::AUTHENTICATION_ERROR);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$user = new User;\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t\n\t $form = $this->createForm(new RegisterType, $user);\n\t\t$setting = $this->config();\n\t\t\n\t\treturn $this->render('AlexandrieFrontendBundle:Default:login.html.twig',array(\n\t\t // Valeur du précédent nom d'utilisateur entré parl'internaute\n\t\t 'last_username' => $session->get(SecurityContext::LAST_USERNAME),\n\t\t 'error' => $error,\n\t\t 'form_user' => $form->createView(),\n\t\t 'setting'=>$setting));\n\t\t\n\t\t\n\t\t//return $this->render('LegiafricaFrontendBundle:Default:login.html.twig',array());\n }", "public function hacerLogin() {\n $user = json_decode(file_get_contents(\"php://input\"));\n\n if(!isset($user->email) || !isset($user->password)) {\n http_response_code(400);\n exit(json_encode([\"error\" => \"No se han enviado todos los parametros\"]));\n }\n \n //Primero busca si existe el usuario, si existe que obtener el id y la password.\n $peticion = $this->db->prepare(\"SELECT id,idRol,password FROM users WHERE email = ?\");\n $peticion->execute([$user->email]);\n $resultado = $peticion->fetchObject();\n \n if($resultado) {\n \n //Si existe un usuario con ese email comprobamos que la contraseña sea correcta.\n if(password_verify($user->password, $resultado->password)) {\n \n //Preparamos el token.\n $iat = time();\n $exp = $iat + 3600*24*2;\n $token = array(\n \"id\" => $resultado->id,\n \"iat\" => $iat,\n \"exp\" => $exp\n );\n \n //Calculamos el token JWT y lo devolvemos.\n $jwt = JWT::encode($token, CJWT);\n http_response_code(200);\n exit(json_encode($jwt . \"?\" . $resultado->idRol));\n \n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Password incorrecta\"]));\n }\n \n } else {\n http_response_code(404);\n exit(json_encode([\"error\" => \"No existe el usuario\"])); \n }\n }", "public function userLogin(){\n\t\t\tif (isset($_POST['user_name']) && isset($_POST['password'])){\n\t\t\t\t$response = $this->model->getUser(\"*\", \"user_name = \".\"'\".$_POST['user_name'].\"'\");\n\t\t\t\t$response = $response[0];\n\t\t\t\t$user_rol = null;\n\t\t\t\t//The user is valid\n\t\t\t\tif ($response['password']==$_POST['password']) {\n\t\t\t\t\t//Verify the roles\n\t\t\t\t\t$response_role = $this->model->getRoles(\"user_id = '\".$response['_id'].\"'\");\n\t\t\t\t\tif (count($response_role)>1) {\n\t\t\t\t\t\t//Multipage user\n\t\t\t\t\t\t$user_rol = array();\n\t\t\t\t\t\tforeach ($response_role as $value) {\n\t\t\t\t\t\t\tarray_push($user_rol, $value['role']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (in_array('ADMIN', $user_rol)) { \n\t\t\t\t\t\t\t$_SERVER['PHP_AUTH_USER'] = $_POST['user_name'];\n \t\t\t\t\t$_SERVER['PHP_AUTH_PW'] = $_POST['password'];\n \t\t\t\t\t$_SERVER['AUTH_TYPE'] = \"Basic Auth\"; \n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$user_rol = $response_role[0]['role'];\n\t\t\t\t\t\tif ($user_rol == 'ADMIN') {\n\t\t\t\t\t\t\t$_SERVER['PHP_AUTH_USER'] = $_POST['user_name'];\n \t\t\t\t\t$_SERVER['PHP_AUTH_PW'] = $_POST['password'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->createSession($response['user_name'], $user_rol);\n\t\t\t\t\techo 1;\n\t\t\t\t}\n\t\t\t \n\t\t\t}\n\t\t}", "public function createUsuario()\n {\n $hash = password_hash($this->contra, PASSWORD_DEFAULT);\n $sql = 'INSERT INTO administradores(nombre, apellido, correo, usuario, contra)\n VALUES(?, ?, ?, ?, ?)';\n $params = array($this->nombre, $this->apellido, $this->correo, $this->usuario, $hash);\n return Database::executeRow($sql, $params);\n }", "protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }", "public function getUsuariosLogin($datos)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from usuarios WHERE correo=:correo && password=:contrasena');\n $stmt->bindParam(\":correo\", $datos[\"correo\"] , PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"] , PDO::PARAM_STR);\n if($stmt->execute())\n {\n \n //Variables para iniciar una sesion \n \n $respuesta = $stmt->rowCount();\n $resultado =$stmt->fetch();\n session_start();\n $_SESSION[\"idUsuario\"]=$resultado[\"idUsuario\"];\n $_SESSION[\"nombre\"]=$resultado[\"nombre\"];\n $_SESSION[\"apellido\"]=$resultado[\"apellido\"];\n $_SESSION[\"nombre_usuario\"]=$resultado[\"nombre_usuario\"];\n $_SESSION[\"contrasena\"]=$resultado[\"password\"];\n $_SESSION[\"apellido\"]=$resultado[\"apellido\"];\n $_SESSION[\"correo\"]=$resultado[\"correo\"];\n $_SESSION[\"fecha_registro\"]=$resultado[\"fecha_registro\"];\n $_SESSION[\"ruta_img\"]=$resultado[\"ruta_img\"];\n $_SESSION[\"tipoUsuario\"]=$resultado[\"tipoUsuario\"];\n\n return $respuesta;\n }else\n {\n return \"error\";\n }\n }", "public function iniciarSesion(PersonaFisica $usuario){\n $this->setUsuarioDB($usuario);\n //$this->usuario_db = $usuario; \n \n //$anio_socio = $usuario->getFechaNacimiento('Y');\n //$anio_socio = date('Y')-$anio_socio;\n //$this->setAttribute('edad', $anio_socio);\n //seteo la credencial de usuario\n $this->addCredential($usuario->getTipoUsuarioId());//getTipoSocioId());\n //Seteo el atributo \"nombre\" del usuario\n $this->setAttribute(\"userNom\", $usuario->getNombre());\n $this->setAttribute(\"user\", $usuario->getUsuario());\n $this->setAttribute(\"pass\", $usuario->getPassword());\n //Seteo el atributo \"dni\" del usuario\n $this->setAttribute(\"id\", $usuario->getIdPersonaFisica());\n //autentico el usuario.\n $this->setAuthenticated(true);\n }", "public function login($datos)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from usuarios WHERE nombre_usuario=:correo && password=:contrasena');\n $stmt->bindParam(\":correo\", $datos[\"correo\"] , PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"] , PDO::PARAM_STR);\n if($stmt->execute())\n {\n $respuesta = $stmt->rowCount();\n $resultado =$stmt->fetch();\n //Si el resultado returna mayor que uno es que si existe el usuario asi que inicia la sesion\n if($resultado[\"count(*)\"]>0)\n {\n return \"Datos no validos\";\n }else\n {\n session_start();\n $_SESSION[\"correo\"]=$resultado[\"correo\"];\n $_SESSION[\"nombre\"]=$resultado[\"nombre\"];\n return \"Correcto\";\n }\n\n \n }else\n {\n return \"error\";\n }\n }", "public static function updateSession($usuario){\n $_SESSION['user'] = $usuario;\n }", "public function login() {\n\t\t//see if the user exists in the config.\r\n\t\tif (empty ( $_SESSION['uid'] ) && !isset($_POST['user'])) {\n\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Login required.</message></reply>';\n\t\t\tsession_destroy();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(isset($_POST['user'])){\n\t\t\t$xmlUser = $this->getUser ( $_POST ['user'] );\n\t\t}\n\t\t\n\t\t//Validate the user\n\t\tif ( isset ( $xmlUser ) && (empty($xmlUser ['password']) || (isset($_POST ['password']) && $xmlUser ['password'] == crypt($_POST ['password'],$xmlUser['password'])))) {\n\t\t\t//if a session exists, restrict login to only that user.\n\t\t\tif (! isset ( $this->session ) || ($this->session ['name'] == $xmlUser ['name'] && $this->session ['ip'] == $_SERVER ['REMOTE_ADDR'])) {\n\t\t\t\t//Login OK\r\n\t\t\t\t$this->isLoggedin = true;\n\t\t\t\t$this->name = $xmlUser ['name'];\n\t\t\t\t$this->group = $xmlUser ['group'];\n\t\t\t\t$this->session ['uid'] = session_id ();\n\t\t\t\t$this->session ['name'] = ( string ) $xmlUser ['name'];\n\t\t\t\t$this->session ['ip'] = $_SERVER ['REMOTE_ADDR'];\n\t\t\t\tsession_register('uid');\n\t\t\t\tsession_register('group');\n\t\t\t\t$_SESSION['uid'] = (string) $xmlUser['name'];\n\t\t\t\t$_SESSION['group'] = (string)$xmlUser['group'];\n\t\t\t\t$this->updateSession ();\n\t\t\t\t\n\t\t\t\tLogger::getRootLogger ()->info ( \"User {$xmlUser['name']} is logged in.\" );\n\t\t\t\techo '<reply action=\"login-ok\"><message>logged in.</message></reply>';\n\t\t\t} else {\n\t\t\t\t//Another user is logged in\r\n\t\t\t\tLogger::getRootLogger ()->info ( \"Could not login user {$_POST['user']}. Another user is already logged in.\" );\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Error logging in. Another user is already logged in.</message></reply>';\n\t\t\t}\n\t\t} else {\n\t\t\tif(isset($_POST['password'])){\n\t\t\t\t//Wrong user and/or pass\n\t\t\t\tsession_destroy();\r\n\t\t\t\tLogger::getRootLogger ()->info ( \"Could not login user {$_POST['user']}. Wrong username and/or password.\" );\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Error logging in. Username and or password is incorrect.</message></reply>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsession_destroy();\n\t\t\t\techo '<reply action=\"login-error\"><message type=\"error\">Your session has expired</message></reply>';\n\t\t\t}\n\t\t}\n\t}", "public function connect($user){\n $this->session->set('auth',$user);\n }", "public function user_session($data)\n {\n session_start();\n $_SESSION[\"id\"] = $data['id'];\n $_SESSION[\"username\"]\t= $data['username'];\n $_SESSION[\"isloggedin\"] = true;\n }", "function cafet_set_logged_user(User $user)\n {\n $_SESSION['user'] = serialize($user);\n }", "public function crearUsuario() {\n\n\n if ($this->seguridad->esAdmin()) {\n $id = $this->usuario->getLastId();\n $usuario = $_REQUEST[\"usuario\"];\n $contrasenya = $_REQUEST[\"contrasenya\"];\n $email = $_REQUEST[\"email\"];\n $nombre = $_REQUEST[\"nombre\"];\n $apellido1 = $_REQUEST[\"apellido1\"];\n $apellido2 = $_REQUEST[\"apellido2\"];\n $dni = $_REQUEST[\"dni\"];\n $imagen = $_FILES[\"imagen\"];\n $borrado = 'no';\n if (isset($_REQUEST[\"roles\"])) {\n $roles = $_REQUEST[\"roles\"];\n } else {\n $roles = array(\"2\");\n }\n\n if ($this->usuario->add($id,$usuario,$contrasenya,$email,$nombre,$apellido1,$apellido2,$dni,$imagen,$borrado,$roles) > 1) {\n $this->perfil($id);\n } else {\n echo \"<script>\n i=5;\n setInterval(function() {\n if (i==0) {\n location.href='index.php';\n }\n document.body.innerHTML = 'Ha ocurrido un error. Redireccionando en ' + i;\n i--;\n },1000);\n </script>\";\n } \n } else {\n $this->gestionReservas();\n }\n \n }", "function procesarIniciarSession()\n{\n //se pone global para acceder a las variables globales desde una funcion\n global $usuario;\n global $login;\n global $password;\n global $error;\n\n\n $login = filter_var(strtolower($_POST['txtLogin']), FILTER_SANITIZE_STRING);\n $password = $_POST[\"txtPassword\"];\n\n if ($usuario->loguear($login, $password) == true) {\n //guardar datos en la session \n // $_SESSION[\"login_usuario\"]=$login;\n // $_SESSION[\"id_usuario\"] = $cliente->get_id();\n // $_SESSION[\"nombre_usuario\"] = $cliente->get_nombre();\n Ctrl_Session::iniciar_session($login, $usuario->get_id(), $usuario->get_nombre());\n header(\"location:formularios/index.php?msg=logueado correctamente\");\n } else {\n $error = \"Error al iniciar revise sus datos de acceso\";\n }\n}", "public function salvar(){\n \n\t\t/*\n\t\t\tReceber dados vindos do formulario.\n\t\t*/\n\n\t\t$login = $this->post(\"login\");\n\t\t$senha = $this->post(\"senha\");\n\t\t$senha = md5($senha);\n\t\t$tipo = 2;\n\n\t\t/*\n\t\t\tInserindo dados na tabela usuário.\n\t\t*/\n\t\t$campos = \"(login,senha,tipo)\";\t\t\n\t\t$valores = \"('\".$login.\"','\".$senha.\"','\".$tipo.\"')\";\t\t\n\t\t$tabela = \"usuarios\";\n\t\t\n\t\t$this->insert( $tabela, $campos, $valores );\t\n\t\t\n\t}", "public function createSessionByUserData($user) : void {\n $_SESSION['userId'] = $user->getId();\n $_SESSION['userName'] = $user->getUsername();\n }", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }", "public function login(&$objUser)\n\t\t{\n\t\t\tsession_regenerate_id(true);\n\t\t\t$_SESSION['id_admin'] = $objUser->id_usuario;\n\t\t\t$_SESSION['email_admin'] = $objUser->email;\n\t\t\t$_SESSION['user_lastactive_admin'] = time();\n\t\t\t$_SESSION['err'] = \"\";\n\t\t\t\n\t\t\t$this->data[\"logged\"] = true;\n\t\t\t\n\t\t\t//header(\"Location: \"._MSFW_PATH_);\n\t\t\t//exit();\n\t\t}", "public function setupUser() {\n parent::setupGlobalVariables();\n $session = (new SessionService())->getNewSession();\n if (!$session->isStarted()) $session->start();\n if ($session->get('user')) {\n $variables = array(\n 'username' => $session->get('user')['username'],\n 'role' => $session->get('user')['role']\n );\n $this->mergeToTemplateVariables($variables);\n }\n }", "public function authenticate($usuario, $senha) {\r\n \r\n\t\t// Captura a sessao\r\n $sessao = new Zend_Session_Namespace('portoweb_soap');\r\n\t\t\r\n // Inicializa a classe de autenticacao\r\n\t\t$this->_autenticacao = Marca_Auth::getInstance();\r\n \r\n // Passa o login e a senha para logar no banco\r\n $resultado = $this->_autenticacao->authenticate(new Marca_Auth_Adapter_Autentica($usuario, $senha));\r\n \r\n $aut = false;\r\n \r\n // Retorna o codigo de validacao\r\n switch($resultado->getCode()) {\r\n\r\n case Marca_Auth_Result::FAILURE_CREDENTIAL_INVALID:\r\n case Marca_Auth_Result::FAILURE_ACCOUNT_USER_LOCKED:\r\n case Marca_Auth_Result::FAILURE_UNCATEGORIZED:\r\n \r\n // Remove o usuario da sessao\r\n $this->_autenticacao->clearIdentity();\r\n\t\t\t\t\t\t\t\t\r\n break;\t\t\t\t\t\t\r\n\r\n default: \r\n \r\n // Instancia o usuario\r\n $usuario = new UsuarioModel();\r\n $usuarioLinha = $usuario->find(strtoupper($this->_autenticacao->getIdentity()));\r\n $usuarioLogado = $usuarioLinha->current();\r\n \r\n // Captura o adaptador padrao\r\n $db = Zend_Registry::get('db');\r\n\r\n // Altera algumas sessoes do ORACLE\r\n $db->query(\"ALTER SESSION SET NLS_COMP = 'LINGUISTIC'\");\r\n $db->query(\"ALTER SESSION SET NLS_SORT = 'BINARY_AI'\");\r\n $db->query(\"ALTER SESSION SET NLS_DATE_FORMAT = 'DD/MM/YYYY HH24:MI:SS'\");\r\n \r\n $aut = true;\r\n \r\n break;\r\n }\r\n \r\n return $aut;\r\n }" ]
[ "0.6969137", "0.67961705", "0.6779878", "0.6691744", "0.65447706", "0.64971274", "0.6355214", "0.63495773", "0.63391834", "0.6337481", "0.6297443", "0.6263401", "0.6232567", "0.61990994", "0.61809903", "0.61727434", "0.6148751", "0.61391735", "0.61332494", "0.6087304", "0.6067974", "0.606267", "0.60590106", "0.6042459", "0.6040578", "0.6027986", "0.6027133", "0.6016408", "0.6012626", "0.60120416", "0.59974676", "0.5995948", "0.59892684", "0.5972765", "0.596541", "0.5961165", "0.5949172", "0.59402436", "0.5924623", "0.59171885", "0.59131694", "0.5909407", "0.59002775", "0.5897672", "0.589033", "0.58773565", "0.5873266", "0.5869884", "0.5869884", "0.58670837", "0.5850419", "0.5840992", "0.58357596", "0.5828497", "0.582334", "0.5818253", "0.58079004", "0.57911557", "0.5778839", "0.5766921", "0.5766778", "0.5759977", "0.57557535", "0.57540613", "0.57495844", "0.574403", "0.5741855", "0.5739071", "0.5737635", "0.57373667", "0.57349014", "0.57344335", "0.57334715", "0.5733031", "0.5730464", "0.57301325", "0.5726634", "0.5722703", "0.57203573", "0.5716326", "0.5711258", "0.5696401", "0.5694981", "0.5692175", "0.5689189", "0.56831586", "0.56805116", "0.56778276", "0.5676957", "0.567594", "0.5673791", "0.56675416", "0.5666657", "0.5664074", "0.56585574", "0.5652436", "0.5649833", "0.5648173", "0.56372434", "0.5636254", "0.56325084" ]
0.0
-1
/ Registrar un usuario en la tabla login
function registrar_usuario($datos = array()){ if(empty($datos)||!($datos['perfil']!=''&&$datos['email']!=''&&$datos['contrasena']!='')){return false;} $sql = sprintf("INSERT INTO `login` (`cloud`,`perfil`,`nombres`,`apellidos`,`email`,`telefono`,`contrasena`) SELECT * FROM (SELECT %s,%s,%s,%s,%s,%s,%s) AS `tmp` WHERE NOT EXISTS (SELECT `email` FROM `login` WHERE `email` = %s AND `cloud` = %s)",varSQL(__sistema),varSQL($datos['perfil']),varSQL((!isset($datos['nombres']))?'':$datos['nombres']),varSQL((!isset($datos['apellidos']))?'':$datos['apellidos']),varSQL($datos['email']),varSQL((!array_key_exists('telefono',$datos))?'':$datos['telefono']),varSQL(md5($datos['contrasena'])),varSQL($datos['email']),varSQL(__sistema)); return consulta($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cadastrar()\n\t{\n\t\t//conexao com o banco\n\t\t$connect = new Connect('user_login');\n\n\t\t$this->id = $connect->insert([\n\t\t\t\t'login'=> $this->login,\n\t\t\t\t'password'=> $this->password\n\t\t]);\n\n\t}", "public function registerUser()\n {\n $sql = \"INSERT INTO user (username, password, email, firstname, lastname, address, date_of_birth, id_role)\n VALUES (\\\"\" . $this->getUsername().\"\\\", \\\"\" . $this->getPassword().\"\\\", \\\"\" . $this->getEmail().\"\\\",\\\"\" . $this->getFirstname().\"\\\", \\\"\" . $this->getLastname().\"\\\", \\\"\" . $this->getAddress().\"\\\", \\\"\" . $this->getDateOfBirth().\"\\\", \\\"\" . $this->getIdRole().\"\\\")\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n print \"erfolg\";\n\n }\n }", "function registrarUsuario($nombre,$apellidos,$email,$edad,$puntos,$passW)\n {\n $consulta =\"INSERT INTO usuario (nombre,apellidos,email,edad,puntos,password) VALUES ('$nombre','$apellidos','$email',$edad,$puntos,'$passW')\";\n if($this->conexion->query($consulta))\n {\n \n }else{ \n echo \"Falló la creación de la tabla: (\" . $this->conexion->errno . \")// \" . $this->conexion->error.\"<br>\";\n }\n }", "function setUsuario($usuario, $contraseña, $nombre, $apellidos, $telefono, $movil){\n\t\t\n\t\t$resultado = conectar()->query( \"SELECT * FROM usuarios WHERE usuario LIKE '$usuario'\");\n\t\tif($resultado->num_rows == 0){\n\t\t\tconectar()->query(\"INSERT INTO usuarios (usuario, contrasenia, nombre, apellidos, telefono, movil) VALUES ('\" . $usuario . \"','\" . $contraseña . \"','\" . $nombre . \"','\" . $apellidos .\"','\" . $telefono . \"','\" . $movil .\"')\");\n\t\t\techo \"<script>alert('Te has registrado correctamente!');document.location.reload();\";\t\n\t\t}else{\n\t\t\techo \"<script>alert('Ya existe ese nombre de usuario!');</script>\";\n\t\t}\n\t}", "public function agregarUsuario(){\n \n }", "public function registrarUsuario()\n {\n $datos = array();\n\n //guardamos los datos del formulario en un array \n foreach ($_POST as $clave => $valor) {\n $datos[$clave] = $valor;\n }\n\n //añadimos una clave por defecto y generamos el ciu\n $datos['clave'] = hash('sha512', \"12345678\");\n $datos['ciu'] = self::generarCiu($datos['nombre'], $datos['apellidos'], $datos['fecha_nacimiento']);\n\n //insertamos los datos y mostramos un error en funcion de si ha habido error o no\n echo $this->Usuarios_model->registrarUsuario($datos) ? 1 : 0;\n }", "public function registrar_usuario($usuario, $clave, $email, $pintor) {\n /*Creamos la instancia del objeto. ya estamos conectados*/\n $bd = Db::getInstance();\n $sql = \"INSERT INTO login (usuario, clave, email, pintor) VALUES (:usuario, :clave, :email, :pintor)\";\n $stmt = $bd->prepare($sql);\n $stmt->execute([\":usuario\" => $usuario, \":clave\" => $clave, \":email\" => $email, \":pintor\" => $pintor]);\n }", "public function register_user()\n {\n if (isset($_POST['btnRegister'])) {\n $username = $_POST['username_reg'];\n $password = $_POST['password'];\n $role = 2;\n\n //check Username ton tai hay khong ton tai\n $checkUsername = $this->UserModel->checkUsername($username);\n if ($checkUsername == 'true') {\n header(\"Location:../Register\");\n } else {\n // 2.INSERT DATA EQUAL USERS\n $rs = $this->UserModel->InserNewUser($username,$password,$role);\n // 3.SHOW OK/FAILS ON SCREENS\n header(\"Location:../Login\");\n }\n }\n }", "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function inserir() {\n $this->load->model('Usuario_model', 'usuario');\n\n //Recebe os dados da view de usuario\n $data['login'] = $this->input->post('login');\n $data['senha'] = md5($this->input->post('senha'));\n $data['codAluno'] = $this->input->post('codAluno');\n $data['nivel'] = 1;\n\n if ($this->usuario->inserirUsuario($data)) {\n redirect('Painel_controller/login');\n }\n }", "public function salvar(){\n \n\t\t/*\n\t\t\tReceber dados vindos do formulario.\n\t\t*/\n\n\t\t$login = $this->post(\"login\");\n\t\t$senha = $this->post(\"senha\");\n\t\t$senha = md5($senha);\n\t\t$tipo = 2;\n\n\t\t/*\n\t\t\tInserindo dados na tabela usuário.\n\t\t*/\n\t\t$campos = \"(login,senha,tipo)\";\t\t\n\t\t$valores = \"('\".$login.\"','\".$senha.\"','\".$tipo.\"')\";\t\t\n\t\t$tabela = \"usuarios\";\n\t\t\n\t\t$this->insert( $tabela, $campos, $valores );\t\n\t\t\n\t}", "function registrar(){\n\n\t\t\t\n\t\t$sql = \"INSERT INTO USUARIOS (\n\t\t\tlogin,\n\t\t\tpassword,\n\t\t\tnombre,\n\t\t\tapellidos,\n\t\t\temail,\n\t\t\tDNI,\n\t\t\ttelefono,\n\t\t\tFechaNacimiento,\n\t\t\tfotopersonal,\n\t\t\tsexo\n\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'\".$this->login.\"',\n\t\t\t\t\t'\".$this->password.\"',\n\t\t\t\t\t'\".$this->nombre.\"',\n\t\t\t\t\t'\".$this->apellidos.\"',\n\t\t\t\t\t'\".$this->email.\"',\n\t\t\t\t\t'\".$this->DNI.\"',\n\t\t\t\t\t'\".$this->telefono.\"',\n\t\t\t\t\t'\".$this->FechaNacimiento.\"',\n\t\t\t\t\t'\".$this->fotopersonal.\"',\n\t\t\t\t\t'\".$this->sexo.\"'\n\n\t\t\t\t\t)\";\n\t\t\t\t\t\t\t\t\n\t\tif (!$this->mysqli->query($sql)) { //Si la sentencia sql no devuelve información\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //si es correcta\n\t\t}\t\t\n\t}", "function ajouter_user($nom, $prenom, $email, $password, $cle_d_activation, $actif, $newsletter){\n\n\t\t$bdd=connexion_BD('projetLion');\n\n\t\t //Ajout de l'utilisateur dans la table login_users\n\t\t$req = $bdd->prepare('INSERT INTO login_users(nom, prenom, email, password, cle_d_activation, actif, newsletter) VALUES(:nom, :prenom, :email, :password, :cle_d_activation, :actif, :newsletter)');\n\t\t$req->execute(array(\n\t\t\t'nom' => $nom,\n\t\t\t'prenom' => $prenom,\n\t\t\t'email' => $email,\n\t\t\t'password' => $password,\n\t\t\t'cle_d_activation' => $cle_d_activation,\n\t\t\t'actif' => $actif,\n\t\t\t'newsletter' => $newsletter\n\t\t\t));\n\n\t\t\n\t}", "function registrarSesion () {\n\n if (!empty($this->id_usuario)) {\n $this->salvar(['ultima_session' => 'current_timestamp',\n 'activo' => 1\n ]);\n Helpers\\Sesion::sessionLogin();\n }\n else return false;\n\n }", "public function login($user, $clave)\n {\n parent::conectar();\n\n \n\n // El metodo salvar sirve para escapar cualquier comillas doble o simple y otros caracteres que pueden vulnerar nuestra consulta SQL\n $user = parent::salvar($user);\n $clave = parent::salvar($clave);\n\n // Si necesitas filtrar las mayusculas y los acentos habilita las lineas 36 y 37 recuerda que en la base de datos debe estar filtrado tambien para una \n \n\t$consulta = 'select id, nombre, cargo from usuarios where email=\"'.$user.'\" and clave= MD5(\"'.$clave.'\")\n\t UNION SELECT codpaci, nombrep, cargo from customers where email =\"'.$user.'\" and clave= MD5(\"'.$clave.'\")';\n\t \n\t \n /*\n Verificamos si el usuario existe, la funcion verificarRegistros\n retorna el número de filas afectadas, en otras palabras si el\n usuario existe retornara 1 de lo contrario retornara 0\n */\n\n $verificar_usuario = parent::verificarRegistros($consulta);\n\n // si la consulta es mayor a 0 el usuario existe\n if($verificar_usuario > 0){\n\n \n\n /*\n Realizamos la misma consulta de la linea 55 pero esta ves transformaremos el resultado en un arreglo,\n ten mucho cuidado con usar el metodo consultaArreglo ya que devuelve un arreglo de la primera fila encontrada\n es decir, como nosotros solo validamos a un usuario no hay problema pero esta funcion no funciona si\n vas a listar a los usuarios, espero que me entiendan xd\n */\n\n $user = parent::consultaArreglo($consulta);\n\n /*\n Bien espero ser un poco claro en esta parte, la variable user\n en la linea 69 pasa a ser un arreglo con los campos consultados en la linea\n 48, entonces para acceder a los datos utilizamos $user[nombre_del_campo] Ok?\n bueno hagamos el ejercicio.\n */\n\n /*\n Inicializamos la sessión | Recuerda con las variables de sesión\n podemos acceder a la informacion desde cualquiera pagina siempre y cuando\n exista una sesión y ademas utilicemos el codigo de la linea 84\n */\n\n session_start();\n\n /*\n Las variables de sesion son muy faciles de usar, es como\n declarar una variable, lo unico diferente es que obligatoria mente\n debes usar $_SESSION[] y .... el nombre de la variable ya no sera asi\n $miVariable sino entre comillas dentro del arreglo de sesion, haber me\n dejo explicar, $_SESSION['miVariable'], recuerda que como declares la variable\n en este archivo asi mismo lo llamaras en los demas.\n */\n\n $_SESSION['id'] = $user['id'];\n $_SESSION['nombre'] = $user['nombre'];\n $_SESSION['cargo'] = $user['cargo'];\n\n /*\n Que porqué almacenamos cargo? es encillo en nuestros proyectos\n pueden existir archivos que solo puede ver un usuario con el cargo de\n administrador y no un usuario estandar, asi que la variable global de\n sesion nos ayudara a verificar el cargo del usuario que ha iniciado sesion\n Ok?\n */\n\n /*\n Recuerda:\n cargo con valor: 1 es: Administrador\n cargo con valor: 2 es: usuario estandar\n puedes agregar cuantos cargos desees, en este ejemplo solo uso 2\n */\n\n // Verificamos que cargo tiene l usuario y asi mismo dar la respuesta a ajax para que redireccione\n if($_SESSION['cargo'] == 1){\n echo 'view/admin/admin.php';\n }else if($_SESSION['cargo'] == 2){\n echo 'view/user/user.php';\n }\n\n\n // u.u finalizamos aqui :v\n\n }else{\n // El usuario y la clave son incorrectos\n echo 'error_3';\n }\n\n\n # Cerramos la conexion\n parent::cerrar();\n }", "public function register()\n\t{\n\t\t// validamos que existan los campos\n\t\t$errors = $this->validate( $_POST, [\n\t\t\t'name|nombre' => 'required',\n\t\t\t'username|usuario' => 'required|unique:users',\n\t\t] );\n\n\t\tif( $errors )\n\t\t{\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\t// validamos que sea una peticion por post\n\t\t$this->__post();\n\t\t// validamos si existe o le definimos un valor\n\t\t$_POST['password'] = isset( $_POST['password'] ) ? $_POST['password'] : '';\n\t\t$_POST['nameE'] = isset( $_POST['nameE'] ) ? $_POST['nameE'] : '';\n\t\t// realizamos la peticion al modelo de cerrar sesion\n\t\t$login = $this->auth->register( $_POST['name'], $_POST['username'], $_POST['password'], $_POST['nameE'], $_POST['role'] );\n\t\t// explotamos el resultado\n\t\t$login = explode(\"|\", $login);\n\t\t// validamos si se logueo o no\n\t\tif( $login[0] != 'logueado' )\n\t\t{\n\t\t\t// agregamos a las variables de error la respuesta del servidor\n\t\t\tarray_push($this->errors, $login[0]);\n\t\t\t// agregamos los errores obtenidos desde la peticion hecha al model\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\t// retornamos a la vista de acceso cuando se satisfatorio el logueo\n\t\t\techo \"true|\".$login[1];\n\t\t}\n\t}", "public function addNewUser(string $login, string $heslo, string $jmeno, string $email, int $idPravo = 4){\r\n // hlavicka pro vlozeni do tabulky uzivatelu\r\n //$insertStatement = \"login, heslo, jmeno, email, id_pravo\";\r\n // hodnoty pro vlozeni do tabulky uzivatelu\r\n\r\n $login = htmlspecialchars($login);\r\n $heslo = htmlspecialchars($heslo);\r\n $jmeno = htmlspecialchars($jmeno);\r\n $email = htmlspecialchars($email);\r\n\r\n //$insertValues = \"'$login', '$heslo', '$jmeno', '$email', $idPravo\";\r\n // provedu dotaz a vratim jeho vysledek\r\n //return $this->insertIntoTable(TABLE_USER, $insertStatement, $insertValues);\r\n\r\n $q = \"INSERT INTO \".TABLE_USER.\"(login, heslo, jmeno, email, id_pravo) \r\n VALUES (:login, :heslo, :jmeno, :email, :id_pravo)\";\r\n $vystup = $this->pdo->prepare($q);\r\n $vystup->bindValue(\":login\", $login);\r\n $vystup->bindValue(\":heslo\", $heslo);\r\n $vystup->bindValue(\":jmeno\", $jmeno);\r\n $vystup->bindValue(\":email\", $email);\r\n $vystup->bindValue(\":id_pravo\", $idPravo);\r\n return $vystup->execute();\r\n }", "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "public function loginTraitement(){\n\n $identifiant = $this->verifierSaisie(\"identifiant\");\n $password = $this->verifierSaisie(\"password\");\n\n //securite\n if (($identifiant != \"\") && ($password != \"\")){\n\n //on crée un objet de la classe \\W\\Security\\AuthentificationModel\n //ce qui nous permet d'utiliser la methode isValidLoginInfo\n $objetAuthentificationModel = new \\W\\Security\\AuthentificationModel;\n\n $idUser = $objetAuthentificationModel->isValidLoginInfo($identifiant, $password);\n\n if($idUser > 0){\n\n // recuperer les infos de l'utilisateur\n //requete base de donnée pour les recuperer\n //je crée un objet de la classe \\W\\Model\\UsersModel\n $objetUsersModel = new \\W\\Model\\UsersModel;\n // je retrouve les infos de la ligne grace à la colonne ID\n // La classe UsersModel herite de la classe Model je peu donc faire un find pour recupeerr les infos\n $tabUser = $objetUsersModel->find($idUser);\n\n // Je vais ajouter des infos dans la session\n $objetAuthentificationModel->logUserIn($tabUser);\n\n // recuperer l'username\n $username = $tabUser[\"username\"];\n\n\n $GLOBALS[\"loginRetour\"] = \"Bienvenue $username\";\n\n $this->redirectToRoute(\"admin_accueil\");\n }\n else{\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }else{\n\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }", "function agregar($nombre,$correo,$usuario,$rol,$zonah,$estado,$psw)\n {\n $Valores = \"'\".$usuario.\"','\".$psw.\"','\".$nombre.\"','\".$correo.\"',\".$estado.\",\".$zonah.\",\".$rol;\n $this->Insertar(\"usuarios\",\"usuario,password,nombre,correo,activo,zonashorarias_id,roles_id\",$Valores);\n }", "public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}", "public function un_usuario_registrado_puede_iniciar_sesion()\n {\n //\\Artisan::call('db:seed', ['--class' => 'TestsDatabaseSeeder']);\n $user = \\App\\User::find(1);\n\n $this->browse(function (Browser $browser) use ($user) {\n $browser->visit('/')\n ->assertPathIs('/login')\n ->type('login-username', 'admin')\n ->type('login-password', '123')\n ->press('#btn-login')\n ->pause(1000)\n ->assertAuthenticated()\n ;\n });\n }", "function registrarUsuario(){\n\n\t require(\"Conexion.php\");\t\n\t \n if(isset($_POST['insertar'])){\n\t\n\t $nombre=$_POST[\"nombre\"];\n $apellido=$_POST[\"apellido\"];\n\t $correo=$_POST[\"correo\"];\n\t $direccion=$_POST[\"direccion\"];\n\t $username=$_POST[\"nombre\"];\n\t $password=$_POST[\"password\"];\n\n\t $db=new Conexion();\n\t\n\t\t /* evitar duplicaciones*/\t\t\n $sql = \"select count(*) from datos_usuario where nombre ='$nombre'\";\n\t\t\n if ($resultado = $db->connect()-> query($sql)) {\n\n /* Comprobar el número de filas que coinciden con la sentencia SELECT */\n if ($resultado->fetchColumn() > 0) {\n\n /* Ejecutar la sentencia SELECT para mostrar el nombre duplicado*/\n $sql = \"select nombre from datos_usuario where nombre = '$nombre'\";\n foreach ($db->connect()->query($sql) as $fila) {\n \n\t\t $duplicado=$nombre;\n }\t\n\n\t echo '<script language=\"javascript\">alert(\"Usuario duplicado: '.$duplicado.' ya esta en uso.\");</script>';\n\n echo \"<script>\n setTimeout(function() {\n location.href = '../vista/registro_user.php';\n }, 0001);\n </script>\";\t\t\t \n }\n \n /* No coincide ningua fila inserta */\n else {\t\t\n\t\t\t/*no hay duplicaciones insertamos*/\n\t\n $query=$db->connect()->prepare(\"insert into datos_usuario (nombre, apellido, correo, direccion)\n\t values (:nombre, :apellido, :correo,:direccion)\");\t\t\t \n $query->execute(array(\":nombre\"=>$nombre, \":apellido\"=>$apellido,\":correo\"=>$correo,\"direccion\"=>$direccion));\n\t\n\t/*----------------segunda tabla-----------------------------*/\n\t $db=new Conexion();\n\t \n\t $sql2=\"insert into usuarios(username, password, rol_id) values (:username, :password, :rol_id)\";\n\t $query=$db->connect()->prepare($sql2);\n\t\t\t \n $query->execute(array(\":username\"=>$nombre, \":password\"=>$password, \":rol_id\"=>2));\n\t\n\t\t echo'<script type=\"text/javascript\">\n alert(\"Usuario registrado\");\n </script>';\n\t\n\t \n\t echo \"<script>\n setTimeout(function() {\n location.href = '../vista/login.php';\n }, 0001);\n </script>\";\t\n\t\t } \t\n }\n }\n }", "function Register(){\n\n\t\t$sql = \"select * from USUARIOS where login = '\".$this->login.\"'\";\n\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'El usuario ya existe';\n\t\t\t}\n\t\telse{\n\t \t\treturn true; //TEST : El usuario no existe\n\n\t}\n}", "public function logar()\n {\n if ($this->checkPost()) { \n $usuario = new \\App\\Model\\Usuario;\n $usuario->setLogin($this->post['usuario']);\n $usuario->setSenha($this->post['senha']);\n $usuario->authDb();\n redirect(DEFAULTCONTROLLER.'\\logado');\n } else {\n redirect(DEFAULTCONTROLLER);\n }\n }", "public function login() {\n parent::conectarBD();\n\n $queri = parent::query(sprintf(\"select usu_id as codigo, usu_password as senha, \"\n . \"usu_token_sessao as token_sessao, usu_login as login from \"\n . table_prefix . \"usuario where usu_login = '%s' and \"\n . \"usu_password = '%s'\", $this->usu_login, $this->usu_password));\n\n if ($queri) {\n $dados = $queri->fetch_assoc();\n if ($dados) {\n $new_session_id = hash('sha256', $dados['senha'] . time());\n $queri2 = parent::query(\"update \" . table_prefix . \"usuario set usu_token_sessao = '$new_session_id' where usu_id = \" . $dados['codigo']);\n\n if ($queri2) {\n $dados['token_sessao'] = $new_session_id;\n parent::commit();\n parent::desconectarBD();\n return $dados;\n } else {\n parent::rollback();\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n }", "function registrasi($data) {\n $conn = koneksi();\n $username = strtolower(stripcslashes($data[\"username\"]));\n $password = mysqli_real_escape_string($conn, $data[\"password\"]);\n\n // cek username sudah ada atau belum\n $result = mysqli_query($conn, \"SELECT username FROM user WHERE username = 'username' \");\n if (mysqli_fetch_assoc($result)) {\n echo \"<script>\n alert('username sudah digunakan');\n </script>\";\n return false;\n }\n// enkripsi password\n$password = password_hash($password, PASSWORD_DEFAULT);\n\n// tambah user baru\n$query_tambah = \"INSERT INTO user VALUES('', '$username', '$password')\";\nmysqli_query($conn, $query_tambah);\n\nreturn mysqli_affected_rows($conn);\n\n}", "public function RegistrarUsuarios()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"nombres\"]) or empty($_POST[\"usuario\"]) or empty($_POST[\"password\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\t$sql = \" select cedula from usuarios where cedula = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_POST[\"cedula\"]) );\n\t$num = $stmt->rowCount();\n\tif($num > 0)\n\t{\n\n\t\techo \"2\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\t$sql = \" select email from usuarios where email = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_POST[\"email\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 0)\n\t\t{\n\n\t\t\techo \"3\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \" select usuario from usuarios where usuario = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array($_POST[\"usuario\"]) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\t\t\t\t$query = \" insert into usuarios values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t\t$stmt->bindParam(1, $cedula);\n\t\t\t\t$stmt->bindParam(2, $nombres);\n\t\t\t\t$stmt->bindParam(3, $nrotelefono);\n\t\t\t\t$stmt->bindParam(4, $cargo);\n\t\t\t\t$stmt->bindParam(5, $email);\n\t\t\t\t$stmt->bindParam(6, $usuario);\n\t\t\t\t$stmt->bindParam(7, $password);\n\t\t\t\t$stmt->bindParam(8, $nivel);\n\t\t\t\t$stmt->bindParam(9, $status);\n\n\t\t\t\t$cedula = strip_tags($_POST[\"cedula\"]);\n\t\t\t\t$nombres = strip_tags($_POST[\"nombres\"]);\n\t\t\t\t$nrotelefono = strip_tags($_POST[\"nrotelefono\"]);\n\t\t\t\t$cargo = strip_tags($_POST[\"cargo\"]);\n\t\t\t\t$email = strip_tags($_POST[\"email\"]);\n\t\t\t\t$usuario = strip_tags($_POST[\"usuario\"]);\n\t\t\t\t$password = sha1(md5($_POST[\"password\"]));\n\t\t\t\t$nivel = strip_tags($_POST[\"nivel\"]);\n\t\t\t\t$status = strip_tags(strtoupper($_POST[\"status\"]));\n\t\t\t\t$stmt->execute();\n\n################## SUBIR FOTO DE USUARIOS ######################################\n//datos del arhivo \n\t\t\t\tif (isset($_FILES['imagen']['name'])) { $nombre_archivo = $_FILES['imagen']['name']; } else { $nombre_archivo =''; }\n\t\t\t\tif (isset($_FILES['imagen']['type'])) { $tipo_archivo = $_FILES['imagen']['type']; } else { $tipo_archivo =''; }\n\t\t\t\tif (isset($_FILES['imagen']['size'])) { $tamano_archivo = $_FILES['imagen']['size']; } else { $tamano_archivo =''; } \n//compruebo si las características del archivo son las que deseo \n\t\t\t\tif ((strpos($tipo_archivo,'image/jpeg')!==false)&&$tamano_archivo<50000) \n\t\t\t\t{ \n\t\t\t\t\tif (move_uploaded_file($_FILES['imagen']['tmp_name'], \"fotos/\".$nombre_archivo) && rename(\"fotos/\".$nombre_archivo,\"fotos/\".$_POST[\"cedula\"].\".jpg\"))\n\t\t\t\t\t{ \n## se puede dar un aviso\n\t\t\t\t\t} \n## se puede dar otro aviso \n\t\t\t\t}\n################## FINALIZA SUBIR FOTO DE USUARIOS ######################################\n\n\t\t\t\techo \"<div class='alert alert-success'>\";\n\t\t\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\t\t\techo \"<span class='fa fa-check-square-o'></span> EL USUARIO FUE REGISTRADO EXITOSAMENTE\";\n\t\t\t\techo \"</div>\";\t\t\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"4\";\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}\n}", "public function telaCadastroUsuario():void {\n $session =(Session::get('USER_AUTH'));\n if (!isset($session)) {\n $this->view('Home/login_viewer.php');\n }\n elseif ((int) Session::get('USER_ID')!==1) {\n Url::redirect(SELF::PAINEL_USUARIO);\n }\n else {\n $this->cabecalhoSistema();\n $this->view('Administrador/usuario/formulario_cadastro_usuario_viewer.php');\n $this->rodapeSistema();\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 }", "static public function mdlRegistroUsuario($tabla,$datos)\n {\n $stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(nombre, contrasena, email, foto, modo, verificacion, email_encrip) VALUES (:nombre, :contrasena, :email, :foto, :modo, :verificacion, :email_encrip)\");\n\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":contrasena\", $datos[\"password\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":foto\", $datos[\"foto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":modo\", $datos[\"modo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":verificacion\", $datos[\"verificacion\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":email_encrip\", $datos[\"email_encrip\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\n }", "public function registerUser(){\r\n\t\t$name = $_POST['register_name'];\r\n\t\t$email = $_POST['register_email'];\r\n\t\t$password = $_POST['register_password'];\r\n\r\n\t\t$sql = \"INSERT INTO users values (null,?,?,?)\";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$name,$email,$password]);\r\n\t\t//ako je registracija uspela pojavice se div u formu sa ispisom notifikacije!!!\r\n\t\tif ($query) {\r\n\t\t\t$this->register_result=true;\r\n\t\t}\r\n\t}", "function insertAdminUser() {\n // Insert Admin info;\n $userController = new UserController;\n $this->db->exec(\n \"INSERT INTO users (username, password) VALUES (?, ?)\",\n [\n 1 => $this->formValues['adminUsername'],\n 2 => $userController->cryptPassword($this->formValues['adminPassword_1']),\n ]\n );\n }", "public function registerUser(){\n $sql = \"INSERT INTO `tbl_register_user`(`u_id`, `fname`, `lname`, `e_mail`, `telephone`, `address`, `city`, `country`, `region`, `gender`, `password`, `confirm_password`) VALUES (NULL, '$this->fname', '$this->lname', '$this->e_mail', '$this->telephone', '$this->address', '$this->city', '$this->country' , '$this->region', '$this->gender', '$this->password' , '$this->confirm_password')\";\n return $this->connect->qry($sql);\n }", "function reg_user($name, $email, $username, $password)\n\t{\n\t\t$encrypt_password = sha1($password);\n\t\t\n\t\t//Creates an array which includes the field names and the values assigned\n\t\t$details = array(\n\t\t\t\t'u_name' => $name,\n\t\t\t\t'u_email' => $email,\n\t\t\t\t'u_username' => $username,\n\t\t\t\t'u_password' => $encrypt_password\n\t\t);\n\t\t\n\t\t//Executes the insert query\n\t\t$this->db->insert('tbl_user',$details);\n\t}", "function conectar(){\n global $Usuario;\n global $Clave;\n global $_SESSION;\n $this->dataOrdenTrabajo->SetUserName($Usuario);\n $this->dataOrdenTrabajo->SetUserPassword($Clave);\n $this->dataOrdenTrabajo->SetDatabaseName($_SESSION['database']);\n $this->dataOrdenTrabajo->setConnected(true);\n }", "function p_crear_usuario(\n\t\t\t\t$cod_usuario\t\t\t\t\t,\n\t\t\t\t$txt_login\t\t\t\t\t\t,\n\t\t\t\t$txt_password\n\t\t){\n\t\t\tglobal $db;\n\t\t\t$query =\"\n\t\t\tinsert into\tseg_usuario(\n\t\t\ttxt_login\t\t,\n\t\t\tcod_usuario\t\t,\n\t\t\tind_bloqueado\t,\n\t\t\ttxt_password\n\t\t\t)values(\n\t\t\t'$txt_login'\t,\n\t\t\t'$cod_usuario'\t,\n\t\t\t0\t\t\t\t,\n\t\t\t'$txt_password'\n\t\t\t)\";\n\t\t\t$db->consultar($query);\t\n\t\t\t$cod_pk\t= $GLOBALS['fn_ultimo_registro'];\n\t\t\treturn $cod_pk;\n\t\t}", "static public function ctrLoginUser(){ \n\t\t\tif(isset($_POST[\"ingUser\"])){\n\t\t\t\t//Intento de Logeo\n\t\t\t\tif((preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUser\"]))\n\t\t\t\t && (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"]))){\n\t\t\t\t\t\t$tabla = \"usuarios\";\t//Nombre de la Tabla\n\n\t\t\t\t\t\t$item = \"usuario\";\t\t//Columna a Verficar\n\t\t\t\t\t\t$valor = $_POST[\"ingUser\"];\n\n\t\t\t\t\t\t//Encriptar contraseña\n\t\t\t\t\t\t$crPassword = crypt($_POST[\"ingPassword\"], '$2a$08$abb55asfrga85df8g42g8fDDAS58olf973adfacmY28n05$');\n\n\t\t\t\t\t\t$respuesta = ModelUsers::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t\t\tif($respuesta[\"usuario\"] == $_POST[\"ingUser\"]\n\t\t\t\t\t\t\t&& $respuesta[\"password\"] == $crPassword){\n\t\t\t\t\t\t\t\tif($respuesta[\"estado\"] == '1'){\n\t\t\t\t\t\t\t\t\t//Coincide \n\t\t\t\t\t\t\t\t\t$_SESSION[\"login\"] = true;\n\t\t\t\t\t\t\t\t\t//Creamos variables de Sesion\n\t\t\t\t\t\t\t\t\t$_SESSION[\"user\"] = $respuesta;\n\t\t\t\t\t\t\t\t\t//Capturar Fecha y Hora de Login\n\t\t\t\t\t\t\t\t\tdate_default_timezone_set('America/Mexico_City');\n\t\t\t\t\t\t\t\t\t$fechaActual = date('Y-m-d H:i:s');\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$item1 = \"ultimo_login\";\n\t\t\t\t\t\t\t\t\t$valor1 = $fechaActual;\n\t\t\t\t\t\t\t\t\t$item2 = \"id_usuario\";\n\t\t\t\t\t\t\t\t\t$valor2 = $respuesta[\"id_usuario\"];\n\n\t\t\t\t\t\t\t\t\t$ultimoLogin = ModelUsers::mdlActualizarUsuario($tabla, $item1, $valor1, $item2, $valor2);\n\n\t\t\t\t\t\t\t\t\tif($ultimoLogin)\t//Redireccionando\n\t\t\t\t\t\t\t\t\t\techo '<script>location.reload(true);</script>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">El usuario no esta activado</div>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}", "static public function mdlRegistroUsuario($tabla, $datos){\n\n\t\t$stmt = Connect::connection()->prepare(\"INSERT INTO $tabla(nombre, email) VALUES (:nombre, :email)\");\n\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "public static function signUp()\n {\n global $cont;\n $name = $_POST['name'];\n $email = $_POST['email'];\n $password = SHA1($_POST['password']);\n\n $signup = $cont->prepare(\"INSERT INTO users(`name`, `email`, `password` , `role`) VALUES (? , ? , ? , ?) \");\n $signup->execute([$name , $email , $password , 0]);\n\n session_start();\n $_SESSION['message'] = \"Data entering correctly\";\n header(\"location:../login.php\");\n }", "public function ulogiraj_registiraj()\r\n\t{\r\n\t\tif(isset($_POST['ulogiraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Login';\r\n\t\t\t$this->registry->template->show( 'login' );\r\n\t\t}\r\n\t\tif(isset($_POST['registriraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Registriraj se';\r\n\t\t\t$this->registry->template->show( 'register' );\r\n\t\t}\r\n\r\n\t}", "function register()\n\t\t{\n\n\t\t if(!empty($_POST['email']) && !empty($_POST['password'])&& !empty($_POST['nombre'])){\n\n\t\t $email=filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n\t\t $password=filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\t\t $name=filter_input(INPUT_POST, 'nombre', FILTER_SANITIZE_STRING);\n\t\t $new_user=$this->model->register($email,$password,$name);\n\n\t\t if ($new_user == TRUE){ \n\t\t // cap a la pàgina principal\n\t\t header('Location:'.APP_W.'home');\n\t\t }\n\t\t else{\n\t\t // no hi és l'usuari, cal registrar\n\t\t header('Location:'.APP_W.'register');\n\t\t }\n\t\t \t\t}\n\t\t}", "public function insertNewUser($login,$password){\n $sql = \"INSERT INTO \". $this->tableName .\" VALUES (null, '\". $login .\"', '\".SHA1($password).\"');\";\n $requete = $this->connexion->prepare($sql);\n if($requete->execute()){\n return true;\n } else {\n return false;\n }\n }", "function login() {\n $sql = \"SELECT *\n FROM USUARIOS\n WHERE (\n\t\t\t\t (email = '$this->email')\n )\";\n\n $resultado = $this->mysqli->query( $sql );//hacemos la consulta en la base de datos\n if ( $resultado->num_rows == 0 ) {//miramos si el numero de filas es 0\n \t\t\t return 'El usuario no existe';\n\n \t\t} else {//si no es 0, el usuario existe\n \t\t\t$tupla = $resultado->fetch_array();//devolvemos la tupla\n\n \t\t\t if ( $tupla[ 'password' ] == $this->password ) {//si la contraseña es correcta entra en la página\n \t\t\t\t return true;\n\n \t\t\t } else {//en caso contrario no entra\n \t\t\t\t return 'La password para este usuario no es correcta';\n \t\t\t }\n \t }\n\t }", "public function createUsuario()\n {\n $hash = password_hash($this->contra, PASSWORD_DEFAULT);\n $sql = 'INSERT INTO administradores(nombre, apellido, correo, usuario, contra)\n VALUES(?, ?, ?, ?, ?)';\n $params = array($this->nombre, $this->apellido, $this->correo, $this->usuario, $hash);\n return Database::executeRow($sql, $params);\n }", "public function Login(){\n \t$usuarios=new UsuariosModel();\n \n \t//Conseguimos todos los usuarios\n \t$allusers=$usuarios->getLogin();\n \t \n \t//Cargamos la vista index y l e pasamos valores\n \t$this->view(\"Login\",array(\n \t\t\t\"allusers\"=>$allusers\n \t));\n }", "public function loginUsuario($login = '', $clave = '') {\n $password = md5($clave);\n $this->consulta = \"SELECT * \n FROM usuario \n WHERE login = '$login' \n AND password = '$password' \n AND estado = 'Activo' \n LIMIT 1\";\n\n if ($this->consultarBD() > 0) {\n $_SESSION['LOGIN_USUARIO'] = $this->registros[0]['login'];\n $_SESSION['ID_USUARIO'] = $this->registros[0]['idUsuario'];\n $_SESSION['PRIVILEGIO_USUARIO'] = $this->registros[0]['privilegio'];\n $_SESSION['ACTIVACION_D'] = 0;\n// $_SESSION['ACCESOMODULOS'] = $this->registros[0]['accesoModulos'];\n\n $tipoUsuario = $this->registros[0]['tipoUsuario'];\n\n switch ($tipoUsuario) {\n case 'Empleado':\n $idEmpleado = $this->registros[0]['idEmpleado'];\n $this->consulta = \"SELECT primerNombre, segundoNombre, primerApellido, segundoApellido, cargo, cedula, tipoContrato \n FROM empleado \n WHERE idEmpleado = $idEmpleado \n LIMIT 1\";\n $this->consultarBD();\n// $apellidos = explode(' ', $this->registros[0]['apellidos']);\n $_SESSION['ID_EMPLEADO'] = $idEmpleado;\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['primerNombre'] . ' ' . $this->registros[0]['primerApellido'];\n $_SESSION['CARGO_USUARIO'] = $this->registros[0]['cargo'];\n $_SESSION['TIPO_CONTRATO'] = $this->registros[0]['tipoContrato'];\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['primerNombre'] . ' ' . $this->registros[0]['segundoNombre'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['primerApellido'] . ' ' . $this->registros[0]['segundoApellido'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['cedula'];\n break;\n case 'Cliente Residencial':\n $idResidencial = $this->registros[0]['idResidencial'];\n $this->consulta = \"SELECT nombres, apellidos, cedula \n FROM residencial \n WHERE idResidencial = $idResidencial \n LIMIT 1\";\n $this->consultarBD();\n $apellidos = explode(' ', $this->registros[0]['apellidos']);\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['nombres'] . ' ' . $apellidos[0];\n $_SESSION['CARGO_USUARIO'] = 'Cliente Residencial';\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['nombres'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['apellidos'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['cedula'];\n break;\n case 'Cliente Corporativo':\n $idCorporativo = $this->registros[0]['idCorporativo'];\n $this->consulta = \"SELECT razonSocial, nit \n FROM corporativo \n WHERE idCorporativo = $idCorporativo \n LIMIT 1\";\n\n $this->consultarBD();\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['CARGO_USUARIO'] = 'Cliente Corporativo';\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['nit'];\n break;\n case 'Administrador':\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = 'Administrador';\n $_SESSION['CARGO_USUARIO'] = 'Administrador';\n $_SESSION['TIPO_CONTRATO'] = 'Laboral Administrativo';\n\n $_SESSION['NOMBRES_USUARIO'] = 'Administrador';\n $_SESSION['APELLIDOS_USUARIO'] = 'Administrador';\n $_SESSION['CEDULA_USUARIO'] = '10297849';\n $_SESSION['ID_EMPLEADO'] = '12';\n $_SESSION['ID_CAJA_MAYOR_FNZAS'] = 2;\n $idEmpleado = 12;\n break;\n default:\n break;\n }\n\n //******************************************************************\n // VARIABLES DE SESSION PARA EL ACCESO AL MODULO RECAUDOS Y FACTURACION DE swDobleclick\n\n $_SESSION['user_name'] = $_SESSION['NOMBRES_APELLIDO_USUARIO'];\n $_SESSION['user_charge'] = $_SESSION['CARGO_USUARIO'];\n\n $_SESSION['user_id'] = 0; //$this->getIdUsuarioOLD($idEmpleado);\n $_SESSION['user_privilege'] = 0; //$this->getPrivilegioUsuarioOLD($idEmpleado);\n\n //******************************************************************\n\n $fechaHora = date('Y-m-d H:i:s');\n $idUsuario = $_SESSION['ID_USUARIO'];\n $consultas = array();\n $consultas[] = \"UPDATE usuario \n SET fechaHoraUltIN = '$fechaHora' \n WHERE idUsuario = $idUsuario\";\n $this->ejecutarTransaccion($consultas);\n return true;\n } else {\n return false;\n }\n }", "function register_user($new) {\n \n $this->db->insert('users', $new);\n }", "public function register(){\n\n\t\t$this->Login_model->register();\t\n\n\t}", "private function processFormLogin(){\n\t\t$username = $_REQUEST[\"usuario\"];\n\t\t$password = $_REQUEST[\"password\"];\n\t\t$validar = $this->users->getProcessUser($username, $password);\n\t\tif($validar){\n\t\t\tif (Seguridad::getTipo() == \"0\")\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t\telse\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t} else {\n\t\t\t$data[\"informacion\"] = \"Nombre de usuario o contraseña incorrecta.\";\n\t\t\tView::show(\"user/login\", $data);\n\t\t}\n\t}", "function login(){\n\t\tif(isset($_POST['login'])){//if login button pressed\n\t\t\t$userTable= new Table('users');//new table created\n\t\t\t$user= $userTable->findInDatabase('user_username', $_POST['username']);//querying users table\n\t\t\tif($user->rowCount()>0){//if data available\n\t\t\t\t$data=$user->fetch();//fetch data\n\t\t\t\tif (password_verify($_POST['password'], $data['user_password'])){//if password matches\n\t\t\t\t\t$_SESSION['session_id']=$data['user_id'];//session variable is set\n\t\t\t\t\t$_SESSION['type']=$data['user_type'];//session variable is set\n\t\t\t\t\t$_SESSION['fullname']=$data['user_firstname'].\" \".$data['user_lastname'];//session variable is set\n\t\t\t\t\theader(\"Location:index.php\");//redirect to another page\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo '<script> alert(\"Password is incorrect\"); </script>';//js alert is shown\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo '<script> alert(\"Username is incorrect\"); </script>';//js alert for username incorrect\n\t\t\t}\n\t\t}\n\t}", "function p_update_row(\n\t\t\t\t$cod_usuario_pk\t,\n\t\t\t\t$cod_usuario\t,\n\t\t\t\t$txt_login\t\t,\n\t\t\t\t$txt_password\n\t\t){\n\t\t\tglobal $db;\n\t\t\t$query =\"\n\t\t\tupdate \tseg_usuario set\n\t\t\t\t\ttxt_login\t\t= '$txt_login'\t\t,\n\t\t\t\t\ttxt_password\t= password(SHA('$txt_password')),\n\t\t\t\t\tcod_usuario\t\t= '$cod_usuario'\n\t\t\twhere\tcod_usuario_pk\t= $cod_usuario_pk\";\n\t\t\t$db->consultar($query);\t\n\t\t}", "private function tbl_usuarios() {\r\n\t\t\t$this->usuarios = $this->esquema->createTable('USUARIOS');\r\n\t\t\t$this->usuarios->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('USUARIO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Usuario de Ingreso'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('PASSWORD', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Contraseña de Ingreso'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('NOMBRE', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Nombres del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('APELLIDO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Apellidos del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CEDULA', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'Cedula del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('USUARIO_RR', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Usuario de RR'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CORREO', 'string', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 255,\r\n\t\t\t\t'comment' => 'Correo electronico del Usuario'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('ESTADO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Estado del Usuario [ID de la tabla ESTADOS]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('EMPRESA', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la Empresa del Usuario [ID de la tabla USUARIOS_EMPRESA]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('CARGO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Cargo del Usuario [ID de la tabla USUARIOS_CARGO]'\r\n\t\t\t));\r\n\t\t\t$this->usuarios->addColumn('PERMISO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Permiso del Usuario [ID de la tabla PERMISOS]'\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\t$this->usuarios->setPrimaryKey(array('ID'));\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->estados, array('ESTADO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->usuarios_empresa, array('EMPRESA'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->usuarios_cargo, array('CARGO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->usuarios->addForeignKeyConstraint($this->permisos, array('PERMISO'), array('ID'), $this->opcForeign);\r\n\t\t}", "public function guardarUsuario()\r\n {\r\n $user = new \\App\\Models\\User;\r\n \r\n $user->Seq_Usuario = $_REQUEST['Seq_Usuario'];\r\n $user->Usuario = $_REQUEST['username'];\r\n $user->Password = $_REQUEST['password'];\r\n $user->sys_rol_id = $_REQUEST['rolID'];\r\n\r\n\r\n $userController = new App\\Controllers\\UserController;\r\n\r\n if($user->Seq_Usuario > 0) {\r\n $result = $userController->updateUser($user);\r\n } else {\r\n $result = $userController->createUser($user);\r\n }\r\n \r\n /**\r\n * Variable de sesión usada para mostrar la notificación del\r\n * resultado de la solicitud.\r\n */\r\n $_SESSION['result'] = $result;\r\n \r\n header('Location: ?c=Registro&a=usuarios');\r\n }", "function registrasi($data)\n{\n\n global $conn;\n\n $username = strtolower(stripslashes($data[\"username\"]));\n $password = mysqli_real_escape_string($conn, $data[\"password\"]);\n $password2 = mysqli_real_escape_string($conn, $data[\"password2\"]);\n\n $result = mysqli_query($conn, \"SELECT username FROM user WHERE username = '$username'\");\n\n if (mysqli_fetch_assoc($result)) {\n echo \"<script>\n alert('Username sudah pernah terdaftar, silahkan gunakan username lain'); \n </script>\";\n return false;\n }\n\n if (trim($username)) {\n echo \"<script>\n alert('username tidak dapat menggunakan spasi, contoh technobutonraya'); \n </script>\";\n return false;\n }\n\n if ($password !== $password2) {\n echo \"<script>\n alert('Konfirmasi Password tidak sesuai, Silahkan sama kan dengan password anda'); \n </script>\";\n return false;\n }\n\n $password = password_hash($password, PASSWORD_DEFAULT);\n\n\n\n mysqli_query($conn, \"INSERT INTO user VALUES(null, '$username', '$password')\");\n\n return mysqli_affected_rows($conn);\n}", "public function autualizar_dados_login()\n {\n \ttry {\n \t\t \n \t\t$con = FabricaDeConexao::conexao();\n \t\t \n \t\t$sqlquery = 'update usuario set usuario = :usuario,senha=md5(:senha),email = :email where id = :id; ';\n \t\t$stmt->$con-> prepare($sqlquery);\n \t\t$stmt->bindValue(':usuario',$dados->usuario);\n \t\t$stmt->bindValue(':senha',$dados->senha);\n \t\t$stmt->bindValue(':email',$dados->email);\n \t\t$stmt->bindValue(':id',$dados->id);\n \t\t\n \t\t$stmt->execute();\n \t\t$rowaf = $stmt->rowCount();\n \t\treturn $rowaf;\n \t}\n \tcatch (PDOException $ex)\n \t{\n \t\techo \"Erro: \".$ex->getMessage();\n \t}\n }", "public function ctrIngresoUsuario(){\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/',$_POST[\"ingUsuario\"]) && \n\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/',$_POST[\"ingPassword\"])){\n\n\t\t\t\t$tabla=\"usuarios\";\n\t\t\t$item=\"usuario\";\n\t\t\t$valor=$_POST[\"ingUsuario\"];\n\t\t\t$respuesta=ModeloUsuarios::MdlMostrarUsuarios($tabla,$item,$valor);\t\n\t\t\t //var_dump($respuesta[\"usuario\"]);\n\t\t\tif($respuesta[\"usuario\"]==$_POST[\"ingUsuario\"] && $respuesta[\"password\"]==$_POST[\"ingPassword\"]){\n\t\t\t\t$_SESSION[\"iniciarSesion\"]=\"ok\";\n\t\t\t\techo '<script>\n\t\t\t\twindow.location=\"inicio\";\n\t\t\t\t</script>';\n\t\t\t}else{\n\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelva a intentarlo</div>';\n\t\t\t}\n\t\t}\n\t}\n }", "public function action_register(){\n\t\t\n\t\t$user = CurUser::get();\n\t\t\n\t\tif($user->save($_POST, User_Model::SAVE_REGISTER)){\n\t\t\t$user->login($user->{CurUser::LOGIN_FIELD}, $_POST['password']);\n\t\t\tApp::redirect('user/profile/greeting');\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\tMessenger::get()->addError('При регистрации возникли ошибки:', $user->getError());\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function reg() {\n\t\t//~ screening input data\n\t\t$tmp_arr=mysql::screening_array($_POST);\n\t\t$login=$tmp_arr['login'];\n\t\t$passwd=$tmp_arr['passwd'];\n\t\t$passwd2=$tmp_arr['passwd2'];\n\t\t$mail=$tmp_arr['mail'];\n\n\t\t//~ Check valid user data\n\t\tif ($this->check_new_user($login, $passwd, $passwd2, $mail)) {\n\t\t\t//~ User data is correct. Register.\n\t\t\t$user_key = $this->generateCode(10);\n\t\t\t$passwd = md5($user_key.$passwd.SECRET_KEY); //~ password hash with the private key and user key\n\t\t\t$query=mysql::query(\"INSERT INTO `users` (`id_user`, `login_user`, `passwd_user`, `mail_user`, `key_user`,`img`) VALUES (NULL, '\".$login.\"', '\".$passwd.\"', '\".$mail.\"', '\".$user_key.\"','/feditor/attached/image/20150313/20150313102144_79301.jpg');\");\n\t\t\tif ($query) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tself::$error='Произошла ошибка при регистрации нового пользователя. Связаться с администрацией.';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function RegisterUser(){\n $user = $_POST[\"input_user\"];\n $pass = $_POST[\"input_pass\"];\n if (!(empty($user)) && !(empty($pass))) {\n $hash = password_hash($pass, PASSWORD_DEFAULT);\n\n $this->model->registerUser($user,$hash);\n $userFromDB = $this->model->GetUser($user);\n $this->authHelper->login($userFromDB);\n $this->viewVino->ShowHomeLocation();\n\n }else\n $this->view->ShowRegister(\"Faltan datos\");\n }", "static public function mdlIngresarUsuario($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(nombre, usuario, password, perfil, foto, email, telefono) VALUES (:nombre, :usuario, :password, :perfil, :foto, :email, :telefono)\");\n\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":password\", $datos[\"password\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":perfil\", $datos[\"perfil\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":foto\", $datos[\"foto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":telefono\", $datos[\"telefono\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\t\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t\n\t\t$stmt = null;\n\n\t}", "public function loginalumno_post() //INICIAR SESION = http://localhost/foxweb/Api/login\n {\n $matricula = $this->post('matricula');\n $password = $this->post('password');\n $type = $this->post('type');\n\n $datauser = $this->ApiModel->flogin($matricula, $password, $type);\n\n if ($datauser != false) {\n foreach ($datauser as $data) {\n $matricula = $data['matricula'];\n $nombre = $data['nombre'];\n $apellidos = $data['apellidos'];\n $num_grupo = $data['num_grupo'];\n }\n\n $response = ['error' => false, 'status' => parent::HTTP_OK, \"matricula\" => $matricula, \"nombre\" => $nombre, \"apellidos\" => $apellidos, \"num_grupo\" => $num_grupo];\n\n $this->response($response, parent::HTTP_OK);\n\n } else {\n\n $response = ['error' => true,'status' => parent::HTTP_NOT_FOUND, 'msg' => 'Usuario o Contraseña Invalidos!'];\n\n $this->response($response, parent::HTTP_NOT_FOUND);\n\n }\n }", "public static function mdl_regUsuario($nombre,$correo,$telefono){\n\n\t\t$con = conexion::getConexion();\n\t\t$fecha=date(\"Y-m-d\");//hora y fecha del sistema\n\t//lo siguiente se plantea el DML\n\t\t$encriptar=sha1($telefono);\n\t\t//sha1,md5 pero no son seguros\n\t\t//hash_password() investigar\n\t$query= \"INSERT INTO t_usarios\n\t(usu_nombre,usu_correo,usu_telefono,usu_password,usu_rol,usu_fch_rgt)\n\tVALUES \n\t('$nombre','$correo',$telefono,'$encriptar', 2 ,'$fecha')\";\n\n $consulta = $con -> prepare($query);\n //la sgt linea , ejecuta la consulta\n $r = $consulta -> execute();\n return $r;\n\t}", "public function usuario_post() {\n $respuesta = $this->Account_model->selectUsuario($this->post('usuario'), $this->post('contraseña'));\n if(!$respuesta) {\n $this->response('', 204);\n } else {\n $this->response($respuesta, 200);\n }\n }", "static public function loginUsuario($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla WHERE username = :username AND password=:password\");\n\n\t\t$stmt->bindParam(\":username\", $datos[\"username\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":password\", $datos[\"password\"], PDO::PARAM_STR);\n\n\t\t$stmt -> execute();\n\t\t//retornamos un fecht por ser solo un registro\n\t\treturn $stmt->fetch();\n\n\t\t$stmt-> close();\n\n\t\t$stmt = null;\n\n\t}", "function add_user ($User_name, $User_password, $User_email, $user_type)\n\t{\n\t\tglobal $conn;\n\n $sql_i = \"INSERT INTO login_db(user_name, user_password, user_email, user_type) VALUES \" .\n \"('$User_name', '$User_password', '$User_email', '$user_type')\";\n\n run_update($sql_i);\n\t}", "function login($email, $senha){// primeiro precisamos aceder os dados dos usuarios \n\t\t$sql = new sql();\n\n\t\t$results = $sql->select(\"SELECT * FROM usuarios WHERE email = :email AND senha = :senha\", array(\n\t\t\t\":email\"=>$email,\n\t\t\t\":senha\"=>$senha\n\t\t));\n\t\tif(count($results) > 0){\n\t\t\t$this->setDados($results[0]);\t\t\t\n\t\t}else{\n\t\t\tthrow new Exception(\"login e/ou email invalidade!\");\t\t\t\n\t\t}\n\n\t}", "public function registerAdminAction()\n {\n if($this->passwordFieldCheck($this->httpParameters['password'],$this->httpParameters['passwordCheck'],\n '/auth/first-time'))\n {\n try\n {\n //Instantiates a User\n $admin = new User([\n 'username' => $this->httpParameters['username'],\n 'email' => $this->httpParameters['email'],\n 'password' => $this->httpParameters['password'],\n 'role' => User::ROLE_ADMIN\n ]);\n\n //Inserts admin in database\n $this->manager->insertUser($admin);\n\n //Sets to the user the last id registered\n $admin->setId($this->manager->lastId());\n\n //Sets the $_SESSION user\n $_SESSION['user'] = $admin;\n\n $this->response->redirect('/admin',HttpResponse::ADMIN_REGISTERED);\n }\n catch(EntityAttributeException $e)\n {\n //Redirects to same page in case of typing error\n $this->response->redirect('/auth/first-time',$e->getMessage());\n }\n }\n }", "private function login(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t} //es una peticion POST\n\t\tif(isset($this->datosPeticion['email'], $this->datosPeticion['pwd'])){\n\t\t\t#el constructor padre se encarga de procesar los datos de entrada\n\t\t\t$email = $this->datosPeticion['email']; \n \t\t$pwd = $this->datosPeticion['pwd'];\n \t\t//si los datos de la solicitud no es tan vacios se procesa\n \t\tif (!empty($email) and !empty($pwd)){\n \t\t\t//se valida el email\n \t\t\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) { \n \t\t\t//consulta preparada mysqli_real_escape()\n \t\t\t\t$query = $this->_conn->prepare(\n \t\t\t\t\t\"SELECT id, nombre, email, fRegistro \n \t\t\t\t\t FROM usuario \n \t\t\t\t\t WHERE email=:email AND password=:pwd \");\n \t\t\t\t//se le prestan los valores a la query\n \t\t\t\t$query->bindValue(\":email\", $email); \n \t\t\t$query->bindValue(\":pwd\", sha1($pwd)); \n \t\t\t$query->execute(); //se ejecuta la consulta\n \t\t\t//Se devuelve un respuesta a partir del resultado\n \t\t\tif ($fila = $query->fetch(PDO::FETCH_ASSOC)){ \n\t\t\t $respuesta['estado'] = 'correcto'; \n\t\t\t $respuesta['msg'] = 'Los datos pertenecen a un usuario registrado';\n\t\t\t //Datos del usuario \n\t\t\t $respuesta['usuario']['id'] = $fila['id']; \n\t\t\t $respuesta['usuario']['nombre'] = $fila['nombre']; \n\t\t\t $respuesta['usuario']['email'] = $fila['email']; \n\t\t\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t\t\t } \n \t\t\t}\n \t\t} \n\t\t} // se envia un mensaje de error\n\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(3)), 400);\n\t}", "function regusuario(){\n\t\n\t\n\t$buscarUsuario = \"SELECT * FROM users WHERE email = '$_POST[email]' \";\n\t\n\t$result = mysql_query($buscarUsuario);\n\t\n\t \n\t\n\t$count = mysql_num_rows($result);\n\t\n\tif ($count == 1) {\n\t\techo \"<br />\". \"El email ya a sido tomado.\" . \"<br />\";\n\t\n\t\techo \"<a href='registro.php'>Por favor escoja otro Email</a>\";\n\t}\n\telse{\n\t\n\t\t$query = \"INSERT INTO users (`password`, `name`, `countryCode`, `email`)\n\t\tVALUES (md5('$_POST[password]'),'$_POST[username]','$_POST[pais]','$_POST[email]' )\";\n\t\n\t\tif ( mysql_query($query) === TRUE) {\n\t\n\t\t\techo \"<br />\" . \"<h2>\" . \"Usuario Creado Exitosamente!\" . \"</h2>\";\n\t\t\techo \"<h4>\" . \"Bienvenido: \" . $_POST['username'] . \"</h4>\" . \"\\n\\n\";\n\t\t\techo \"<h5>\" . \"Ingresar al sitio: \" . \"<a href='index.php'>Login</a>\" . \"</h5>\";\n\t\t}\n\t\n\t\n}\n}", "function insUser($username,$password,$perfil,$activo){\n\t\t\t\n\t\t\t$conn = conectar(); //funcion que conecta con bd\n\t\t\ttry{\t\t\n\t\t\t\t\t$stmt = $conn->prepare(\"INSERT INTO usuario (id, username,password, id_perfil, activo ) VALUES ('',?,?,?,?)\");\n\t\t\t\t\t$stmt->bindParam(1,$username);\n\t\t\t\t\t$stmt->bindParam(2,$password);\n\t\t\t\t\t$stmt->bindParam(3,$perfil);\n\t\t\t\t\t$stmt->bindParam(4,$activo);\n\t\t\t}\n\t\t\tcatch(PDOException $e){\n\t\t\t\techo \"ERROR: \" . $e->getMessage();\n\t\t\t}\t\t\n\t\t\t$stmt->execute();\n\t\t\t$result = true;\n\t\t\tdesconectar($conn);\n\t\t\treturn $result; \n\t\t}", "public function creer(){ /*** Cree un utilisateur par insertion d'un tuple dans la table UserTab ***/\r\n \r\n \r\n // $this -> setInscrit(1);\r\n $this -> insertDb();//Insertion en Bd d'un tuple user\r\n\t\t\t\r\n }", "public function addUserLogin($user, $password, $name, $email)\n {\n $sql = \"INSERT INTO login (\n username,\n password,\n name,\n email,\n admin\n )\n VALUES (?, ?, ?, ?, ?);\";\n $this->db->execute($sql, [$user, $password, $name, $email, \"N\"]);\n }", "public function reg_user($username, $password) {\n $conn = db();\n //$password = md5($password);\n $sql = \"SELECT * FROM user WHERE username='$username'\";\n//checking if the username is available in db\n $check = $conn->query($sql);\n $count_row = $check->num_rows;\n//if the username is not in db then insert to the table\n if ($count_row == 0) {\n $sql = \"INSERT INTO user SET username='$username', password='$password'\";\n // $sql= \"INSERT INTO user(username) VALUES('$username')\"; ALTERNATIVE\n $result = $conn->query($sql);\n return $result;\n } else {\n return false;\n }\n }", "function add_login($user, $password, $type)\n {\n\tglobal $connection;\n\t$query = \"INSERT INTO users3 VALUES('$user', '$password', '$type')\";\n\t$insert = $connection->query($query);\n\tif (!$insert) die($connection->error);\n }", "function guardaUsuario($usuario,$nombre,$clave,$tipo)\n\t{\n\t\t//mysql_connect(servidor,usuario,contraseña);\n\t\t$conexion = mysql_connect(\"localhost\",\"root\",\"\");\n\t\t//Seleccionamos la Base de Datos\n\t\tmysql_select_db(\"bd2163\");\n\t\t$consulta = \"insert into usuarios values('\".$usuario.\"','\".$nombre.\"','\".$clave.\"','\".$tipo.\"')\";\n\t\t//Ejecutamos la consulta\n\t\tmysql_query($consulta);\n\t\t//Preguntamos si hubo inserción\n\t\tif(mysql_affected_rows() > 0)\n\t\t{\t\t\n\t\t\tprint \"Registro guardado<br>\";\t\n\t\t\tprint \"<a href='ejemplo.php'>Regresar</a>\";\n\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprint \"No se pudo guardar el registro\";\n\t\t}\n\t}", "public function doregister() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $useremail=$_POST['useremail'];\n $username=$_POST['username'];\n $password=$_POST['password'];\n $rpassword=$_POST['rpassword'];\n if ($password==$rpassword && !empty($useremail) && !empty($username) && $this->model->putuser($useremail,$password,$username)) {\n $this->view->set('infomessage', \"Użytkownik zarejestrowany!<br>Możesz się teraz zalogować.\");\n $this->view->set('redirectto', \"?v=user&a=login\");\n $this->view->render('info_view');\n } else {\n $this->view->set('errormessage', \"Błędne dane do rejestracji!\");\n $this->view->set('redirectto', \"?v=user&a=register\");\n $this->view->render('error_view');\n }\n }\n }", "public function verificarLogin($nombre, $password)\n {\n //busca en la tabla usuarios los campos donde el nombre sea igual a admin si no encuentra nada devuelve null\n $usuario = R::findOne('usuarios', 'alias=?', [\n $nombre\n ]);\n $a=\"\";\n $b=\"\";\n echo $usuario->alias;\n echo $usuario->contrasena;\n //comprueba si la variable usuario es distinta al campo alias almacenado en la base de datos si es asi a octiene el valor=\"no\"\n if ($usuario->alias!=$nombre) {\n \n $a=\"no\";\n }\n //comprueba si la variable password es distinta al campo contraseña almacenado en la base de datos si es asi b octiene el valor=\"no\"\n if (! password_verify($password, $usuario->contrasena)) {\n \n $b=\"no\";\n }\n // si a y b de los if anteriores son no redirecciona al controlador a la carpeta usuarios dentro de esta carpeta al controlador usuarios.php linea 192\n \n if($a!=\"no\"&& $b!=\"no\"){\n //rdirege al controlador Usuarios/Bienvenidos_u\n \n redirect(base_url().\"usuario/Usuarios/Bienvenidos_u\");\n \n \n \n }\n else{\n session_destroy();\n // redirecciona al controlador usuario usuarios.php linea 190 dentro de la carpeta usuario\n redirect(base_url().\"usuario/Usuarios/errorsesion\");\n }\n \n }", "public function login(){\n\n if(isset($_POST)){\n \n /* identificar al usuario */\n /* consulta a la base de datos */\n $usuario = new Usuario();\n \n $usuario->setEmail($_POST[\"email\"]);\n $usuario->setPassword($_POST[\"password\"]);\n \n $identity = $usuario->login();\n \n\n if($identity && is_object($identity)){\n \n $_SESSION[\"identity\"]= $identity;\n\n if($identity->rol == \"admin\"){\n var_dump($identity->rol);\n\n $_SESSION[\"admin\"] = true;\n }\n }else{\n $_SESSION[\"error_login\"] = \"identificacion fallida\";\n }\n\n\n /* crear una sesion */\n \n }\n /* redireccion */\n header(\"Location:\".base_url);\n\n }", "public function hacerLogin() {\n $user = json_decode(file_get_contents(\"php://input\"));\n\n if(!isset($user->email) || !isset($user->password)) {\n http_response_code(400);\n exit(json_encode([\"error\" => \"No se han enviado todos los parametros\"]));\n }\n \n //Primero busca si existe el usuario, si existe que obtener el id y la password.\n $peticion = $this->db->prepare(\"SELECT id,idRol,password FROM users WHERE email = ?\");\n $peticion->execute([$user->email]);\n $resultado = $peticion->fetchObject();\n \n if($resultado) {\n \n //Si existe un usuario con ese email comprobamos que la contraseña sea correcta.\n if(password_verify($user->password, $resultado->password)) {\n \n //Preparamos el token.\n $iat = time();\n $exp = $iat + 3600*24*2;\n $token = array(\n \"id\" => $resultado->id,\n \"iat\" => $iat,\n \"exp\" => $exp\n );\n \n //Calculamos el token JWT y lo devolvemos.\n $jwt = JWT::encode($token, CJWT);\n http_response_code(200);\n exit(json_encode($jwt . \"?\" . $resultado->idRol));\n \n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Password incorrecta\"]));\n }\n \n } else {\n http_response_code(404);\n exit(json_encode([\"error\" => \"No existe el usuario\"])); \n }\n }", "public function _atualiza_usuario_sessao($row) {\n $session_key = $this->config['prefixo_sessao'] . '.' . $this->config['hashkey'] . '.' . $this->config['model_usuario'];\n $ses = $this->Session->read($session_key);\n $row = $row[\"{$this->config['model_usuario']}\"];\n $ses = array_merge($ses, $row);\n $this->Session->write($this->config['prefixo_sessao'] . '.' . $this->config['hashkey'] . '.' . $this->config['model_usuario'], $ses);\n }", "public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }", "public function authUser()\n {\n //я не знаю почему, что эти функции возвращают пустые строки...\n //$login = mysql_real_escape_string($_POST['login']);\n //$password = mysql_real_escape_string($_POST['password']);\n $login = $_POST['login'];\n $password = $_POST['password'];\n if(DBunit::checkLoginPassword($login, $password)){\n DBunit::createUserSession(DBunit::getUser($login, $password));\n return true;\n }\n else {\n return false;\n }\n }", "public function registrar_usuario($nombre,$apellido,$genero,$fecha_nacimiento,$correo,$imagen,$contraseña, $type){\n \n \n $nodo_usuario = new Usuario();\n $mysql = new Conexion();\n\n $nodo_usuario->nombre = $nombre;\n $nodo_usuario->apellido = $apellido; \n $nodo_usuario->genero = $genero;\n $nodo_usuario->fecha_nacimiento = $fecha_nacimiento;\n $nodo_usuario->correo = $correo; \n $nodo_usuario->imagen = $imagen; \n $nodo_usuario->contraseña = $contraseña;\n $nodo_usuario->type = $type;\n \n /* aun no esta funcionando esto\n\t $nodo_usuario->nick = $nik;\n\t $nodo_usuario->ciudad_origen = $orig;\n\t $nodo_usuario->lugar_recidencia = $reci; \n\t $nodo_usuario->sitio_web = $web; \n\t $nodo_usuario->facebook = $face;\n\t $nodo_usuario->twitter = $twit;\n\t $nodo_usuario->youtube = $you;\n */ \n \n ModelUsuarios::crearNodoUsuario($nodo_usuario); //crea el nodo del Usuario \n\n $idneo4j = $nodo_usuario->id; //obtengo el id del nodo creado\n \n\n /*\n * Registro de usuario en Mysql\n * \"la url de facebook es importante y no se esta capturando\"\n */\n \n $sql = \"INSERT INTO usuario (\n email,\n idfacebook,\n idneo4j,\n password\n )VALUES(\n '\".$correo.\"',\n '12345678',\n '\".$idneo4j.\"',\n '\".$contraseña.\"'\n );\";\n \n return $mysql->ejecutar_query($sql); \n \n \n \n \n }", "public function signin(){\r\n if(isset($_SESSION['user'])){\r\n if(isset($_POST['mail']) && isset($_POST['password'])){\r\n $mail = $_POST['mail']; \r\n $password = $_POST['password'];\r\n \r\n if($this->user->setMail($mail) && $this->user->setPassword($password)){\r\n $this->user->db_set_Users($this->user);\r\n die(\"REGISTRO EXITOSO\");\r\n }else{\r\n die(\"ERROR AL REALIZAR EL REGISTRO\");\r\n }\r\n }\r\n }else{\r\n die(\"ERROR AL REQUEST ERRONEO\");\r\n }\r\n }", "function ingresar_usuario($data){\n\t\t$this->db->insert('noticias_usuarios',$data);\n\t}", "public function ctrIngresoUsuario(){\n\n\t\t\tif(isset($_POST[\"ingresoUsuario\"])){\n\n\n\t\t\t\tif(preg_match('/^[a-zA-Z0-9 ]+$/', $_POST[\"ingresoUsuario\"]) && \n\t\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingresoPassword\"])){\n\n\t\t\t\t\t$tabla= \"administrador\";\n\t\t\t\t\t$item =\"usuario\";\n\n\t\t\t\t\t$valor = $_POST[\"ingresoUsuario\"];\n\t\t\t\t\t$respuesta = AdministradorModelo::mdlMostrarUsuario($tabla,$item,$valor);\n\n\t\t\t\t\tif($respuesta != null){\n\n\t\t\t\t\t\t if($respuesta[\"usuario\"]==$_POST[\"ingresoUsuario\"] && $respuesta[\"password\"]==$_POST[\"ingresoPassword\"]){\n\n\t\t\t\t\t\t\tif($respuesta[\"estado\"]==1){\n\n\t\t\t\t\t\t\t\t$_SESSION[\"verificarUsuarioB\"]=\"ok\";\n\t\t\t\t\t\t\t\t$_SESSION[\"idUsuarioB\"]=$respuesta[\"id_admin\"];\n\n\t\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\t\twindow.location = \"'.$_SERVER[\"REQUEST_URI\"].'\";\n\t\t\t\t\t\t\t </script>';\n\n\n\t\t\t\t\t\t\t}else {\n\n\t\t\t\t\t\t\techo '<div class=\"alert alert-danger\">\n\t\t\t\t\t\t\t\t\t<span>¡ERROR AL INGRESAR!</span> El usuario está desactivado.\n\t\t\t\t\t\t\t\t </div>';\n\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t} else {\n\n\n\t\t\t\t\t\t\techo '<div class=\"alert alert-danger\">\n\t\t\t\t\t\t\t<span>¡ERROR AL INGRESAR!</span> Su contraseña y/o usario no es correcta, Intentelo de nuevo.\n\t\t\t\t\t\t\t</div>';\n\n\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t}\n\t\t\t\t\n\n\n\t\t\t\t}else {\n\n\t\t\t\t\techo '<div class=\"alert alert-danger\">\n\t\t\t\t\t<span>¡ERROR!</span> no se permite caracteres especiales.\n\t\t\t\t\t</div>';\n\n\t\t\t\t}\n\n\n\n\n\t\t\t}\n\n\t}", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }", "public function autentificacion($username,$password){\n $userService = new UsuariosServiceImp();\n //objeto de tipo usuario\n $usuario = new Usuarios();\n //llamdo al metodo definido en la capa de servicio\n $usuario = $userService->buscarPorUsernamePassword($username,$password);\n if ( is_object($usuario)){\n /*\n variable de sesion mediante variables locales\n \n $_SESSION['nombre'] = $usuario->getNombre();\n $_SESSION['correo'] = $usuario->getEmail();\n $_SESSION['id'] = $usuario->getId();\n */\n /* variable de sesion mediante un arreglo asociado\n */\n $_SESSION['miSesion'] = array();\n $_SESSION['miSesion']['nombre'] = $usuario->getNombre();\n $_SESSION['miSesion']['correo'] = $usuario->getEmail();\n $_SESSION['miSesion']['id'] = $usuario->getId();\n \n //echo \"<br>El usuario es valido\";\n header(\"location:../view/productos.class.php\");\n }else{\n //echo \"<br>Este usuario no esta registrado en la base de datos\";\n header(\"location:../view/formLogin.html\");\n }\n }", "public function register(){\n\t\t$db = new Database();\n\t\t$conn= $db->getConn();\n\t\t$status = false;\n\t\t\n\t\t$stmt = $conn->prepare(\"insert into login (username,email,password,user_type) VALUES (?, ?, ?, ?)\");\n\t\t$v_password=sha1($this->password);\n\t\t$stmt->bind_param(\"sssd\", $this->username,$this->email,$v_password,$this->type);\t\t\t\n\t\t if($stmt->execute()){\n\t\t $status = true;\n\t\t }\n\t\t//release resources\n\t\t$stmt->free_result();\n\t\t$conn->close();\n\t\t\n\t\treturn $status;\t\n\t}", "public function connexionSuperAdminLogin(){\n }", "public function insertarUsuari($nombre, $apellidos,$usuario,$email,$password)\n {\n \n\t\t$user = Session::get('id_user');\t\n\t\t$this->_db->prepare(\"INSERT INTO usuarios VALUES\n\t\t\t\t\t\t\t(null,:Nombre, :Apellidos,:Email,:Usuario,:Password,'1','1')\")\n ->execute(\n array(\n ':Nombre' => $nombre,\n ':Apellidos' => $apellidos,\n\t\t\t\t\t\t ':Email'=>$email,\n\t\t\t\t\t\t ':Usuario'=>$usuario,\n\t\t\t\t\t\t ':Password'=>$password\n\t\t\t\t\t\t \n ));\n\t\t\t\t\t\t\t\t\t\n }", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n unset($DBA, $rs, $fields, $fieldvals);\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'id');\n $idfields = array(0 => 'username');\n $idvals = array(0 => $this->Username);\n $rs = $DBA->selectQuery(DBUSERTABLE, $fields, $idfields, $idvals);\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n $this->setUserVar('ID', $res['id']);\n }\n }\n unset($DBA, $rs, $fields, $idfields, $idvals);\n }", "public function login($usuario, $senha) {\n global $conexao;\n\n // Verifica se o email e senha são iguais aos que serão recebidos\n $sql = \"Select * FROM suafesta.cadastros WHERE usuario = :usuario AND senha = :senha\";\n\n // $sql é nada mais nada menos que a tabela usuario\n\n $sql = $conexao->prepare($sql);\n\n // Passa o valor recebido do parametro na variavel\n $sql->bindValue(\"usuario\", $usuario);\n $sql->bindValue(\"senha\", $senha);\n\n $sql->execute();\n\n // Se quantidade de registros > 0\n if($sql->rowCount() > 0) {\n // Fetch - cria um array e retorna apenas uma linha dele\n $dado = $sql->fetch();\n\n echo $sql->rowCount();\n\n // Mostre a linha que está na posição do codigo que bate o email e a senha\n //echo $dado['codigo'];\n\n // Salvar o codigo do usuario no navegador\n $_SESSION[\"codUser\"] = $dado['codigo'];\n \n return true;\n } else {\n return false;\n }\n\n }", "public function login()\n {\n\t\tif(isset($_POST['email']) && isset($_POST['senha'])){\n\t\t\t\n\t\t\t//verifica se os $_POST estão vazios\n\t\t\tif(empty($_POST['email']) && empty($_POST['senha'])){\n\t\t\t\theader('Location: /admin?inputvazio=true');\n\t\t\t\treturn true;\n }\n \n $login = Container::getModel('admin');\n $login->setEmail($_POST['email']);\n $login->setSenha($_POST['senha']);\n\n //se a senha e o e-mail é o mesmo do banco\n if($login->login()){\n //cria as sessões\n session_start();\n $_SESSION['logado'] = true;\n $_SESSION['id'] \t= $login->getId();\n $_SESSION['nome'] \t= $login->getNome();\n $_SESSION['nivelAcesso'] \t= $login->geNivelAcesso();\n header('Location: /dashboard');\n }else{\n header('Location: /admin?logado=false');\n }\n }\n }", "function Login(){\n\n\t\t$this->ConectarBD();\n\t\t$sql = \"select * from EMPLEADOS where EMP_USER = '\".$this->EMP_USER.\"'\";\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1 ){\n\t\t\t$tupla = $result->fetch_array();\n\t\t\tif ($tupla['EMP_PASSWORD'] == md5($this->EMP_PASSWORD)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 'La contraseña para este empleado es errónea';\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\treturn \"El empleado no existe\";\n\t\t}\n\n\t}", "function login($user, $pass) {\n require(\"..\\datos_conexion.php\");\n\n $conexion=mysqli_connect($db_host, $db_user, $db_pass);\n // Si habido un error en la conexion\n if (mysqli_connect_errno()) {\n echo \"Fallo al conectar con la base de datos\";\n exit();\n }\n\n mysqli_select_db($conexion, $db_name) or die (\"No se encuentra la base de datos\");\n mysqli_set_charset($conexion, \"utf8\");\n\n // Para evitar que usen la inyección SQL\n $user=mysqli_real_escape_string($conexion, $user);\n $pass=mysqli_real_escape_string($conexion, $pass);\n\n $consulta=\"SELECT * FROM usuarios WHERE user='$user' AND pass='$pass'\";\n $resultados=mysqli_query($conexion, $consulta);\n\n echo \"<p>$consulta</p>\";\n ?>\n <table>\n <thead>\n <tr>\n <th>Usuario</th>\n <th>Password</th>\n <th>Teléfono</th>\n <th>Direccion</th>\n </tr>\n </thead>\n <tbody>\n \n <?php\n while ($fila=mysqli_fetch_array($resultados, MYSQLI_ASSOC)) {\n echo \"<tr>\";\n echo \"<td>\".$fila[\"user\"].\"</td>\";\n echo \"<td>\".$fila[\"pass\"].\"</td>\";\n echo \"<td>\".$fila[\"tfno\"].\"</td>\";\n echo \"<td>\".$fila[\"direccion\"].\"</td>\";\n echo \"</tr>\";\n }\n\n mysqli_close($conexion);\n\n ?>\n </tbody>\n </table>\n<?php\n }", "function login(){\n if(isset($_POST['login'])){\n $username = $_POST['username'];\n $password = $_POST['password'];\n\n $query = query(\"SELECT * FROM utenti WHERE username = '{$username}' AND password = '{$password}' \");\n conferma($query);\n\n if(mysqli_num_rows($query) == 0){\n\n creaAvviso('Utente o password Errati');\n header('Location: login.php');\n }else{\n\n $_SESSION['username'] = $username ;\n header('Location: admin/index.php');\n }\n }\n }", "public function Insertar($login, $password,$rol) {\n\n \t$conexion = new Conexion();\n $consulta = $conexion->prepare('INSERT INTO ' . self::TABLA . ' VALUES(null, :login,:password,:rol)');\n $consulta->bindParam(':login', $login);\t\n $password= password_hash($password, PASSWORD_DEFAULT);\n $consulta->bindParam(':password', $password);\n $consulta->bindParam(':rol', $rol);\n $resultado = $consulta->execute();\n $conexion = null;//cierra la conexion\n\t return $resultado;\n }", "function login() {\n\n if(empty($this->data['btnSubmit']) == false)\n {\n // Here we validate the user by calling that method from the User model\n if(($user = $this->Usuario->validateLogin($this->data)) != false)\n {\n // Write some Session variables and redirect to our next page!\n $this->setMessage('success', \"Bienvenido a fletescr.com!\");\n\n $roles = $user['Rol'];\n $userRoles = array();\n\n foreach($roles as $rol){\n $userRoles[] = $rol['id'];\n }\n $this->Auth->login($user);\n $this->Session->write('roles', $userRoles);\n\n // Go to our first destination!\n $this->Redirect(array('controller' => 'transport', 'action' => 'index', 'success' => '1'));\n exit();\n }\n else\n {\n $this->setMessage('error', \"El usuario o clave ingresados son incorrectos.\");\n $this->Redirect(array('controller' => 'transport', 'action' => 'index'));\n exit();\n }\n }\n }" ]
[ "0.71785843", "0.688725", "0.6738213", "0.66912943", "0.66807795", "0.6643173", "0.66336715", "0.6628408", "0.66276956", "0.65206176", "0.6513554", "0.64967364", "0.648998", "0.6477704", "0.64532024", "0.6446673", "0.64392096", "0.6435796", "0.6409339", "0.64071745", "0.6388165", "0.63639426", "0.63570637", "0.6347074", "0.6334472", "0.6332423", "0.63102365", "0.6298083", "0.6289977", "0.6262155", "0.62600267", "0.6251017", "0.6249858", "0.6247943", "0.62310416", "0.62274367", "0.6223045", "0.6220733", "0.621665", "0.62163526", "0.62147164", "0.6209603", "0.6208908", "0.6206714", "0.62059706", "0.62048817", "0.6196589", "0.61899084", "0.61651856", "0.61574876", "0.6149457", "0.614918", "0.61486363", "0.6145871", "0.61451876", "0.6142659", "0.6142088", "0.61353153", "0.6120986", "0.61139685", "0.61101687", "0.6107176", "0.61067474", "0.6101056", "0.6084762", "0.607117", "0.60704625", "0.6069583", "0.6068779", "0.60644764", "0.60629725", "0.6059891", "0.6052748", "0.6052226", "0.6049664", "0.6045451", "0.6043739", "0.60397744", "0.60322094", "0.60321665", "0.602487", "0.6017476", "0.60174716", "0.6012705", "0.60090464", "0.60030067", "0.6002547", "0.59979564", "0.5994208", "0.59925723", "0.59919155", "0.5991873", "0.5990371", "0.598926", "0.5988322", "0.59871763", "0.59866256", "0.5985307", "0.5984428", "0.59743375" ]
0.6268589
29
/ verifica si inicie sesion en el sistema
function inicie_sesion(){ return (isset($_SESSION['usuario'])&&$_SESSION['usuario']!=''&&isset($_SESSION['session_key'])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function sesion_iniciada()\n\t{\n\t\t$this->load->library(\"session\");\n\t\tif($this->session->userdata(\"isess\")){\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }", "public function inactividad_logout()\n\t{\n\t\t// realizamos la peticion al modelo de cerrar sesion\n\t\t$this->auth->logout();\n\t\t// retornamos a la vista de inicio de sesion\n\t\techo \"true\";\n\t}", "public function checkUsersSession(){\n\t}", "function registrarSesion () {\n\n if (!empty($this->id_usuario)) {\n $this->salvar(['ultima_session' => 'current_timestamp',\n 'activo' => 1\n ]);\n Helpers\\Sesion::sessionLogin();\n }\n else return false;\n\n }", "function iniciar_sesion($id_user, $pass){\n\t\t\t//if ( no lo encontro )\n\t\t\t\t//return false;\n\t\t\t$_SESSION['id_usuario'] = $id_usuario;\n\t\t\t$_SESSION['tipo'] = $type;\n\t\t\t$_SESSION['usuario'] = $usuario;\n\t\t\treturn true;\n\t\t}", "public function SesionIniciada()\n{\n \n $ConexionCassandra=new ManejadorCassandra();//Conexion con la base de datos \n $ObtenerIp=$ConexionCassandra->ConsultaPorParametro('sesion',array('ip'=>$this->ObtenerIp())); //Busco en la tabla sesion si se encuentra la ip\n $VerificarIp=$ObtenerIp->getAll();\n \n if($VerificarIp!=NULL){\n \n return true; //Retorna true si se encontra el usuario\n }\n else{\n \n return false; //Retorna false si no se encuentra el usuario\n }\n \n }", "function EstoyLogueado()\n\t{\n\t\tif (!isset($_SESSION['clientecod']) || $_SESSION['clientecod']==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function verificar_login()\n {\n if (!isset($_SESSION['usuario'])) {\n $this->sign_out();\n }\n }", "function estaLogueado() {\n return isset($_SESSION[\"email\"]);\n }", "function authEstaAutenticado() {\n return isset($_SESSION['usuario_admin']);\n}", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "public function hasSession() {}", "function adminSessionExists() {\n\t\tif ((isset($_SESSION['valid_admin'])) && (($_SESSION['valid_admin']) != null)) {\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "private function sesja() {\r\n session_start();\r\n if (!isset($_SESSION['id'])) {\r\n $_SESSION['id'] = 0;\r\n }\r\n }", "function isConnected(){\n if(isset( $_SESSION['user_login'],$_SESSION['password'])){\n return true;\n }\n\t\t//sinon return false \n else{\n return false;\n }\n }", "function _read_user_session_ss()\n {\n\t\t$ret = false;\n\t\t\n\t\treturn $ret;\n\t}", "function invitado() {\n\tif(!isset($_SESSION['usuario'])) {\n\t\treturn false;\n\t} else {\n\t\treturn $_SESSION['usuario']==\"Invitado\";\n\t}\n\t\n}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "public function check() {\n return (isset($_SESSION['usuario']));\n }", "function estConnecte() {\n\n return isset($_SESSION['name']);\n}", "public function CheckTransactionUser() {\n\t\ttry{\n\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t}catch(ErrorException $ex){\n\t\techo \"Message\".$ex->getMessage();\n\t\t}\n\t}", "public function check_insta_user() {\n \n }", "public function iniciarSistema( ) {\n $this->esperarInicioSistema();\n }", "function checkLoggedIn(){\n if (session_status()!==PHP_SESSION_ACTIVE) {\n session_start();\n }\n if(!isset($_SESSION['EMAIL'])){\n return false;\n }else return true;\n }", "protected static function sessionExists() {\n return session_status() == 2;\n }", "private function isLoggedin()\n\t{\n\t\t$this->idletime = 18000;\n\n\t\tif ((time()-$_SESSION['timestamp'])>$this->idletime)\n\t\t{\n\t\t\t$message = \"You are signed out from the previous session ! Please try sign in again!\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telseif($this->logged_in() == false)\n\t\t{\n\t\t\t$message = \"Invalid session !! Please try sign in again.\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\t}", "static function existsReporticoSession()\n {\n if (isset($_SESSION[ReporticoApp::get(\"session_namespace_key\")])) {\n return true;\n } else {\n return false;\n }\n\n }", "function sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "public function checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza \n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n\n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }", "public function ssoTokenExists() {\n if ($this->httpSession != null && array_key_exists('maestrano', $this->httpSession)) {\n return true;\n }\n\n return false;\n }", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "private function checkValidUser() {\n return;\n if(!($this->getData('key') == $this->sessionId && isset($_SESSION['user']) && isset($_SESSION['valid']) && $_SESSION['valid'] === true)) {\n $this->output = array(\n 'success' => false,\n 'key' => 'kMIvl'\n );\n\n // Terminate the call now, user isn't allowed to perform this action\n $this->renderOutput(true);\n }\n }", "function IsSession($login) {\n $this->db->db_Query(\"SELECT * FROM `\" . TblSysSession . \"` where login='$login'\");\n if (!$this->db->db_GetNumRows())\n return false;\n return true;\n }", "function check_auth_user(){\n global $_SESSION;\n if (isset($_SESSION['usu'])) {\n return true;\n } else {\n return false;\n }\n}", "public function checkSession() {\n if ($this->session->userdata('ohadmin')) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "function logged_in() {\r\n\t\treturn isset($_SESSION[\"admin_id\"]);\r\n\t}", "static public function isInSession(){\n if (isset($_SESSION['in_session'])){\n return true;\n } else {\n return false;\n }\n }", "public function canStartSession();", "function revisar_usuario() {\n return isset($_SESSION['nombre']); //valida que exista un nombre en session\n}", "static public function isLoggedIn(){\n \treturn (self::getInstance()->getId()>1);\n }", "function getSessionExiste()\n{\n $sessionEstValide=false;\n \n setSessionOn();\n\n if (isset($_SESSION['AuthInformation']) && !empty($_SESSION['AuthInformation']))\n {\n $ValidSession = true;\n } \n return $ValidSession;\n}", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "private function isSingIn()\n\t{\n\t\tif ($this->session->isLoggon && $this->session->isAdmin) {\n\t\t\treturn true;\n\t\t}\n\t\tredirect('service/sign-out', 'refresh');\n\t}", "public function isLogged(){\n return isset($_SESSION[\"user\"]);\n }", "protected function _isAlreadyLoggedIn(){\n debug($_SESSION);\n die();\n if ($this->Session->read('Auth.User')) {\n $role = $this->Role->read(null, $this->Auth->user('role_id'));\n CakeSession::write('Auth.User.role', $role['Role']['alias']);\n\n $url = null;\n switch ($role['Role']['alias']) {\n case 'admin':\n case 'manager':\n $this->Session->setFlash(__('If you pretend to register an other person, user \"Add Register (Consolidate)\" at Administrative Panel.'), 'default', array('class' => 'notice'));\n $url = array('plugin' => false, 'controller' => 'systems', 'action' => 'dashboard', 'prefix' => 'admin', 'admin' => true);\n break;\n case 'registered':\n $this->Session->setFlash(__('You has already registered!'), 'default', array('class' => 'notice'));\n $url = array('plugin' => false, 'controller' => 'systems', 'action' => 'dashboard', 'prefix' => 'profile', 'profile' => true);\n break;\n default:\n $url = $this->Auth->redirect();\n break;\n }\n $this->redirect($url);\n }\n return array('success' => true);\n \n }", "public function checkLogin(): bool{\n\t\treturn isset($_SESSION['user']['role']);\n\t}", "function checkSession()\n {\n if(isset($_COOKIE['sessionId']))\n {\n $response = callApi('GET', 'session', ['sessionid' => $_COOKIE['sessionId']]);\n if($response['code'] == '200')\n return true;\n else\n return false;\n }\n }", "public function hasIdentity() {\n $objAuth = Zend_Auth::getInstance();\n \n // Verifica se já está autenticado\n if ($objAuth->hasIdentity()) {\n \treturn true;\n } else {\n \tif(Zf_Util_Cookie::cookieExists( Zend_Registry::get('admin_config')->resources->cookie->name )) {\n \t\t\n \t}\n }\n }", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "function inSession($name)\r\n {\r\n return(isset($_SESSION['insession.'.$this->readNamePath()]));\r\n }", "function check_users_online() {\n global $DOCUMENT_ROOT;\n global $config;\n global $shop;\n \n // odczytaj pliki z sesji i sprawdz ich ostatni czas dostepu\n $i=0;\n if ($shop->home!=1) {\n $dir_sess=\"$DOCUMENT_ROOT/../sessions/$config->salt/\";\n } else {\n $dir_sess=\"/base/sessions/$config->salt/\";\n }\n if ($handle = opendir($dir_sess)) {\n \n while (false != ($file = readdir($handle))) {\n if (ereg(\"^sess\",$file)) {\n $test=$this->check_file($file);\n if ($test>0) {\n $i++;\n }\n }\n } // end while\n closedir($handle);\n } // end if\n \n return $i;\n }", "function ifconnect(){\n\tif(isset($_SESSION['ID'])){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "function isUserLoggedin() \n {\n $stmt = self::$_db->prepare(\"SELECT count(id_user) AS c FROM user WHERE session=:sid\");\n $sid = session_id();\n $stmt->bindParam(\":sid\", $sid);\n $stmt->execute();\n $count = $stmt->fetch()[\"c\"];\n if($count == 1)\n {\n return \"true\";\n }\n else if($count < 1)\n {\n return \"false\";\n }\n else\n {\n return \"Error: More then one identical User could be logged in!\";\n }\n }", "public function isSystem()\n {\n return $this->getAttribute('id') == self::SYSTEM_USER_ID;\n }", "function mcomprobarUsuarioSesion() {\n\t\t$conexion = conexionbasedatos();\n\t\tif (isset($_SESSION[\"nickname\"]) ) {\n\t\t\t$nickname = $_SESSION[\"nickname\"];\n\n\t\t\t$consulta = \"select * \n\t\t\t\t\t\t from final_USUARIO\n\t\t\t\t\t\t where nickname = '$nickname';\";\n\n\t\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\t\tif ($datos = $resultado->fetch_assoc()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\treturn -2;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t} else {\n\t\t\treturn -2;\n\t\t}\n\t\t\n\t}", "function is_partner_login()\n{\n session_start();\n if (isset($_SESSION['partnerId']))\n return ($_SESSION['partnerId'] > 0);\n return false;\n}", "public static function isLoggedIn(){\r\n\t\treturn isset($_SESSION[\"id\"]);\r\n\t}", "public static function estConnecte() {\n return key_exists(self::UTILISATEUR_REF, $_SESSION);\n }", "function modificarCuentaServSoc()\n {\n // TODO: Implement modificarCuentaServSoc() method.\n }", "private function check_login(){\n if (isset($_SESSION['email'])){\n $this->email=$_SESSION['email'];\n\t\t\t$this->role=$_SESSION['role'];\n\t\t\t$this->id=$_SESSION['id'];\n $this->signed_in=true;\n }\n else{\n unset($this->email);\n $this->signed_in=false;\n }\n }", "private function check_session()\n\t{\n\t\tif(isset($_SESSION['admin_id']))\n\t\t{\n\t\t\t/* \n\t\t\tTODO: check double device login\n\t\t\t*/\n\t\t}\n\t\telse if(isset($_SESSION['login_id']))\n\t\t{\n\t\t\tredirect(base_url() . 'contestant');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "function isUserConnected() {\n return isset($_SESSION['login']);\n}", "static public function isUser(){\n if ( isset($_SESSION['id']) && $_SESSION['id'] != 0 ) {\n return true;\n } else {\n return false;\n }\n }", "function sessionExists() {\n\t\tif ((isset($_SESSION['valid_user'])) && (($_SESSION['valid_user']) != null)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function isLoggedIn(){\r\n APP::import('Component','Auth');\r\n $auth = new AuthComponent;\r\n $auth ->Session = $this->Session;\r\n $user = $auth->user();\r\n return !empty($user);\r\n \r\n }", "public static function isConnected() {\n return isset($_SESSION['userid']);\n }", "function isUserAdmin() {\n if (isUserConnected()) {\n return ($_SESSION['role']=='administrateur');\n }\n else {\n return false;\n }\n}", "public function is_opu()\n {\n $session = $this->session->userdata('user');\n if($session)\n {\n if($session['role'] == 'OPU')\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n $this->log_out();\n }\n }", "function logged_in() {\n\treturn isset($_SESSION['admin_id']);\n}", "function isSuperAdmin(){\n\t\tif(isset($_SESSION['type']) && $_SESSION['type']=='superadmin'){\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public static function HayAdministradores(){\n $usuario = new Usuario();\n $result = (new Usuario())->FindBy([\"tipo = '\".USUARIO::TIPO_ADMINISTRADOR.\"'\"]);\n return (count($result) > 0);\n }", "public function CheckTransactionUser() {\n\t\t\t\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t}", "protected function isAuthorizedFrontendSession() {}", "function is_logado()\r\n{\r\n\t$ci = get_instance();\r\n return $ci->session->has_userdata('credencial');\r\n}", "function isLoggedIn() {\n\n\tif (isset($_SESSION['role'])) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }", "private function check()\n\t{\n\t\tif (!session_id())\n\t\t{\n\t\t\tsession_start();\n\t\t}\n\t}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "private function isSingIn()\n {\n if ($this->session->isLoggon && $this->session->isAdmin) {\n return true;\n }\n redirect('logout', 'refresh');\n }", "function teacher_logged_in()\r\n{\r\n\r\n if (isset($_SESSION['SSN']) && !empty($_SESSION['SSN'])) {\r\n\r\n\r\n return true;\r\n } else {\r\n\r\n return false;\r\n }\r\n\r\n\r\n}", "public function hasLogin(){\r\n\r\n $auth = new AuthenticationService();\r\n\r\n if ($auth->hasIdentity()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "public function hasPersistentLogin();", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "function initSession($usuario, $tipo, $codigo_usuario) {\r\n //include 'credenciales.php';\r\n \r\n //Iniciando la sesión en el servidor\r\n session_start();\r\n \r\n if($_SESSION[\"logged\"] == null || $_SESSION[\"logged\"] == false) {\r\n //Seteando las variables que permitirán saber si ha sido logueado el usuario\r\n $_SESSION[\"logged\"] = true;\r\n $_SESSION[\"usuario\"] = $usuario;\r\n $_SESSION[\"tipo\"] = $tipo;\r\n $_SESSION[\"codigo\"] = $codigo_usuario;\r\n \r\n echo '<br> Sesión iniciada<br>';\r\n \r\n }\r\n else {\r\n echo '<br> Sesión existente<br>';\r\n }\r\n}", "function isUserLogged() {\r\n return isset($_SESSION['user']);\r\n }", "protected function isConnect()\n {\n if($_SESSION['statut'] !== 'user' AND $_SESSION['statut'] !=='admin')\n {\n header('Location: index.php?route=front.connectionRegister&access=userDenied');\n exit;\n }\n }", "public function xhrSessionExist(){\n echo Session::get(\"loggedin\")?\"postoji\":\"ne postoji\";\n }", "function userAdmin(){\r\n if(userConnect() && $_SESSION['user']['privilege']==1) return TRUE; else return FALSE;\r\n }", "function isLoggedIn(): bool\n{\n return isset($_SESSION['user']);\n}", "function logado(){\n\t\tif(!isset($_SESSION)) { \n\t\t\tsession_start(); \n\t\t}\n\t\t\n\t\tif (empty($_SESSION[\"id\"])){\n\t\t\t//echo \"usuario não logado\";\n\t\t\tsession_destroy();\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t}", "public function auth(){\n\t\tif( !isset($_SESSION) || !isset($_SESSION['userId']) ) {\n\t\t\treturn false;\n\t\t} elseif( !parent::fetchFromDB($_SESSION['userId']) ){\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn ( $this->checkIp() && $this->checkSessionId() );\n\t\t}\n\t}", "function check_login()\n // Make sure user is logged in. Redirect to login page if not.\n {\n if (!isset ($_SESSION['uid']) || !$_SESSION['uid'] || $_SESSION['ip']!=allIPs() || time()>=$_SESSION['expires_on'])\n {\n\t\t\theader(\"location: ../ressources/controleur/action/logout.php\");\n }\n $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT; // User accessed a page : Update his/her session expiration date.\n }", "private function verificar_cookie_sesion()\n\t{\n\t\t$session = \\Config\\Services::session();\n\t\t//verificar cookies\n\t\tif (isset($_COOKIE['ivafacil_admin_nick']) && isset($_COOKIE['ivafacil_admin_pa']) ) {\n\n\t\t\t$nick= $_COOKIE['ivafacil_admin_nick'];\n\t\t\t$pass=$_COOKIE['ivafacil_admin_pa'];\n\t\t\t//comparar passw hasheadas\n\t\t\t$usuarioCookie = new Admin_model();\n\t\t\t$result_pass_comparison =\n\t\t\t$usuarioCookie->where(\"nick\", $nick) \n\t\t\t->where(\"session_id\", $pass)->first();\n\n\t\t\tif (is_null($result_pass_comparison)) {\n\t\t\t\t//MOSTRAR FORM\n\n\t\t\t\treturn view(\"admin/login\");\n\t\t\t} else {\n\n\t\t\t\t//Se pidio recordar password?\n\t\t\t\tif ($result_pass_comparison->remember == \"S\") {\n\t\t\t\t\t//recuperar sesion si es valida\n\t\t\t\t\t$hoy = strtotime(date(\"Y-m-d H:i:s\"));\n\t\t\t\t\t$expir = strtotime($result_pass_comparison->session_expire);\n\t\t\t\t\tif ($hoy > $expir) return view(\"admin/login\");\n\n\t\t\t\t\t//crear sesion \n\t\t\t\t\t$newdata = [\n\t\t\t\t\t\t'nick' => $nick, \n\t\t\t\t\t\t'pass_alt' => $pass,\n\t\t\t\t\t\t'remember'=> \"S\"\n\t\t\t\t\t];\n\t\t\t\t\treturn view(\"admin/login\", $newdata);\n\t\t\t\t} else {\n\t\t\t\t\treturn view(\"admin/login\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//MOSTRAR FORM\n\t\treturn view(\"admin/login\");\n\t}", "function TienePermisos($seccion, $accion){\r\n$permitir=false;\r\n$permisos=$_SESSION[\"R0l3sp3rM1s0s\"];\r\n@$consulta=$permisos[$seccion][$accion];\r\nif ($consulta==\"SI\"){\r\n$permitir=true;\r\n}\r\nelse{\r\n$permitir=false;\r\n}\r\nreturn $permitir;\r\n\r\n}", "function CheckSession(){\n if(isset($_SESSION[\"userSession\"]->id)){\n // VALIDA SI TIENE CREDENCIALES PARA LA URL CONSULTADA\n $_SESSION['userSession']->status= userSessionStatus::nocredencial;\n $_SESSION['userSession']->url = $_POST[\"url\"];\n $urlarr = explode('/', $_SESSION['userSession']->url);\n $myUrl = end($urlarr)==''?'index.html':end($urlarr);\n foreach ($_SESSION['userSession']->eventos as $evento) {\n if(strtolower($myUrl) == strtolower($evento->url)){\n $_SESSION['userSession']->status= userSessionStatus::login;\n break;\n }\n }\n }\n else {\n $this->status= userSessionStatus::invalido;\n $this->url = $_POST[\"url\"];\n $_SESSION[\"userSession\"]= $this;\n }\n }" ]
[ "0.7696209", "0.6886382", "0.68207043", "0.680028", "0.6506509", "0.6445368", "0.6404683", "0.640142", "0.63806766", "0.6348124", "0.63030344", "0.61870414", "0.615614", "0.6149614", "0.6149545", "0.6143909", "0.61438", "0.6142401", "0.61385113", "0.61026776", "0.60959333", "0.60948604", "0.6093027", "0.6092652", "0.6029421", "0.6022903", "0.6018902", "0.6018801", "0.6016092", "0.6015925", "0.60038674", "0.5999788", "0.5997617", "0.59960836", "0.59908974", "0.5986359", "0.59708434", "0.59647083", "0.5957873", "0.5955621", "0.59552276", "0.59507924", "0.59440804", "0.59428", "0.592889", "0.59209114", "0.5914106", "0.5903187", "0.5901494", "0.5882069", "0.5878223", "0.5873546", "0.58708155", "0.5868227", "0.586091", "0.5860552", "0.58603317", "0.58543503", "0.58497566", "0.58410287", "0.5831768", "0.5830642", "0.58237517", "0.581111", "0.5811103", "0.5809629", "0.5806625", "0.58054125", "0.57968575", "0.5793943", "0.5792193", "0.5784067", "0.57840514", "0.57768244", "0.57691145", "0.5767082", "0.5766701", "0.5764163", "0.5763147", "0.576203", "0.576141", "0.5758727", "0.5758613", "0.5754614", "0.57348204", "0.5733909", "0.572563", "0.57236725", "0.57234854", "0.5720482", "0.5715642", "0.5713858", "0.57120794", "0.5711675", "0.5709869", "0.5709608", "0.5706767", "0.57062924", "0.5705393", "0.57013994" ]
0.65233624
4
/ errores del sistema
function errLog($text='Error'){ echo "<div class='text-center' style='color:red;background-color:white;'>".$text."</div>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function muestraErrores(){\n error_reporting(E_ALL);\n ini_set('display_errors', '1');\n}", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}", "function affichageErreur()\n\t{\n\t}", "public function errors();", "public function errors();", "public function errorOccured();", "public function error();", "function error(){}", "public function err_page()\n {\n $site = new SiteContainer($this->db);\n\n $site->printHeader();\n $site->printNav();\n echo \"An Error has occured and your request could not be completed. Return <a href=\\\"index.php\\\">Home</a>\";\n $site->printFooter();\n }", "function error() {\n $this->escribirHeader(\"Error de Permisos\");\n }", "public function errorAction() {\n\t\t\n\t\t$errors = $this->_getParam('error_handler');\n\t\t\n\t\tswitch ($errors->type) {\n\t\t\t \n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\t\t\t\t\n\t\t\t\t// stranka nebyla nalezena - HTTP chybova hlaska 404\n\t\t\t\t$this->getResponse()->setHttpResponseCode(404);\n\t\t\t\t$this->view->message = 'Stránka nenalezena';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t// chyba v aplikaci - HTTP chybova hlaska 500\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\t\t\t\t$this->view->message = 'Chyba v aplikaci';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n $this->view->env = APPLICATION_ENV;\n\t\t$this->view->exception = $errors->exception;\n\t\t$this->view->request = $errors->request;\n\t\t$this->view->title = 'Objevila se chyba';\r\n\t\t$this->view->showDetails = ini_get('display_errors');\r\n\t\t\n\t\t$this->_helper->layout->setLayout('error');\n\t\t\n\t}", "function errores($error) {\n switch ($error) {\n case 1: return \"Nombre de usuario no ingresado\"; break;\n case 2: return \"Password de usuario no ingresado\"; break;\n\tcase 3: return \"Email de usuario no ingresado\"; break;\n\tcase 4: return \"Es obligatorio poner el nombre del permiso\"; break;\n\tcase 5: return \"Es obligatorio seleccionar un tipo de permiso\"; break;\n\tcase 6: return \"Es obligatorio poner la ubicación del archivo\"; break;\n\tcase 7: return \"Usuario en uso\"; break;\n\tcase 8: return \"Es obligatorio completar el nombre real del usuario\"; break;\n\tcase 9: return \"Es obligatorio completar el tipo de usuario\"; break;\n\tcase 10: return \"Email en uso\"; break;\n\tcase 11: return \"La contrase&ntilde;a no coincide\"; break;\n\tcase 12: return \"Nombre de empresa en uso\"; break;\n\tcase 13: return \"Nombre de la empresa no ingresado\"; break;\n\tcase 14: return \"Abreviatura de la empresa no ingresada\"; break;\n\tcase 15: return \"Email de la empresa no ingresado\"; break;\n\tcase 16: return \"Rut de la empresa no ingresado\"; break;\n\tcase 17: return \"No ha ingresado la cantidad de niveles\"; break;\n\tcase 18: return \"No ha ingresado el nombre del nivel\"; break;\n\tcase 19: return \"No ha seleccionado una empresa\"; break;\n\tcase 20: return \"No ha ingresado el RUT de la persona\"; break;\n\tcase 21: return \"No ha ingresado el nombre de la comuna\"; break;\n\tcase 22: return \"No ha ingresado la direccion\"; break;\n\tcase 23: return \"No ha seleccionado el nivel\"; break;\n\tcase 24: return \"No ha ingresado una categoria\"; break;\n\tcase 25: return \"No ha ingresado una subcategoria\"; break;\n\tcase 26: return \"No ha seleccionado una categoria\"; break;\n\tcase 27: return \"No ha ingresado un nombre para el item\"; break;\n\tcase 28: return \"No ha ingresado una unidad de medida\"; break;\n\tcase 29: return \"No ha ingresado un valor para la unidad de medida\"; break;\n\tcase 30: return \"No ha ingresado un valor unitario\"; break;\n\tcase 31: return \"No ha ingresado un nombre del trabajador\"; break;\n\tcase 32: return \"No ha ingresado un telefono del trabajador\"; break;\n\tcase 33: return \"No ha ingresado una direccion del trabajador\"; break;\n\tcase 34: return \"No ha ingresado un cargo del trabajador\"; break;\n\tcase 35: return \"No ha seleccionado un trabajo a realizar\"; break;\n\tcase 36: return \"No ha ingresado una fecha de ejecucion\"; break;\n\tcase 37: return \"No ha ingresado un numero de documento\"; break;\n\tcase 38: return \"No ha seleccionado un trabajador\"; break;\n\tcase 39: return \"Es obligatorio completar el nombre del tipo de producto\"; break;\n\tcase 40: return \"Es obligatorio completar el tipo de embalaje usado\"; break;\n\tcase 41: return \"Es obligatorio completar el nombre del tipo de producto\"; break;\n\tcase 42: return \"Es obligatorio completar el nombre de la Unidad de Medida\"; break;\n\tcase 43: return \"Es obligatorio completar el nombre del Artículo\"; break;\n\tcase 44: return \"Es obligatorio seleccionar el tipo de Artículo\"; break;\n\tcase 45: return \"Es obligatorio seleccionar la categoría del Artículo\"; break;\n\tcase 46: return \"Es obligatorio seleccionar la unidad de medida del Artículo\"; break;\n\tcase 47: return \"Es obligatorio completar la capacidad del Artículo\"; break;\n\tcase 48: return \"Es obligatorio seleccionar el embalaje del Artículo\"; break;\n\tcase 49: return \"Es obligatorio completar la marca del Artículo\"; break;\n\tcase 50: return \"Es obligatorio seleccionar el Articulo\"; break;\n\tcase 51: return \"Es obligatorio poner la cantidad de Articulos\"; break;\n\tcase 52: return \"Es obligatorio ingresar el valor de cada articulo\"; break;\n\tcase 53: return \"Es obligatorio poner la procedencia de los Articulos\"; break;\n\tcase 54: return \"Es obligatorio poner el tipo de documento utilizado\"; break;\n\tcase 55: return \"Es obligatorio poner el numero del documento utilizado\"; break;\n\tcase 56: return \"Es obligatorio poner un comentario\"; break;\n\tcase 57: return \"Es obligatorio seleccionar el tipo de cliente\"; break;\n\tcase 58: return \"Es obligatorio seleccionar el cliente\"; break;\n\tcase 59: return \"Ingrese una fecha de inicio\"; break;\n\tcase 60: return \"Ingrese una fecha de termino\"; break;\n\tcase 61: return \"No ha seleccionado un permiso\"; break;\n\tcase 62: return \"No ha seleccionado un Trabajo\"; break;\n\tcase 63: return \"No ha ingresado un nombre\"; break;\n\tcase 64: return \"No ha seleccionado una frecuencia\"; break;\n\tcase 65: return \"No ha seleccionado una ubicacion\"; break;\n\tcase 66: return \"No ha seleccionado una tarea\"; break;\n\tcase 67: return \"No ha ingresado el tiempo utilizado\"; break;\n\tcase 68: return \"Es obligatorio completar la contraseña\"; break;\n\tcase 69: return \"Es obligatorio completar la contraseña nueva\"; break;\n\tcase 70: return \"La contraseña no coincide\"; break;\n\tcase 71: return \"No ha ingresado la fecha de inicio\"; break;\n\tcase 72: return \"No ha ingresado la fecha de termino\"; break;\n\tcase 73: return \"No ha ingresado un valor al costo no considerado\"; break;\n\tcase 74: return \"No ha ingresado un comentario al costo no considerado\"; break;\n\tcase 75: return \"No ha seleccionado una unidad de frecuencia\"; break;\n\tcase 76: return \"No ha ingresado un valor para la frecuencia\"; break;\n\tcase 77: return \"No ha ingresado un nombre a la categoria\"; break;\n\tcase 78: return \"No ha seleccionado una unidad de frecuencia\"; break;\n\tcase 79: return \"Debe ingresar un monto a la valorizacion\"; break;\n\tcase 80: return \"Debe ingresar un monto a los gastos generales\"; break;\n\tcase 81: return \"No ha seleccionado la cantidad de periodos\"; break;\n\t\n }\n}", "function msgsrv_last_error () {}", "function sysError( $err = NULL, $errHeader = NULL, $errTitle = NULL ){\n\t\n\tglobal $output, $sys;\n\t\n\t$err = ( $err === NULL ) ? \"We apologize for the trouble! Please try again later.\" : $err;\n\t\n\tif( defined( \"NO_STYLING\" ) && NO_STYLING == true )\n\t\t// Ajax generated error - do not return HTML\n\t\tdie( $err );\n\t\n\t$errHeader = ( $errHeader === NULL ) ? \"We've hit an error\" : $errHeader;\n\t$errTitle = ( $errTitle === NULL ) ? \"Oops!\" : $errTitle;\n\t\n\t$output['message']['title'] = $errHeader;\n\t$output['message']['text'] = $err;\n\t\n\t$screen = new Screen();\n\t$screen->show( 'master/error_message.tpl', $errTitle );\n\t\n\texit();\n\t\n}", "protected function error()\n\t{\t\t\n\t\tif(self::$arrDbConf[$this -> databaseName] !== 1)\n\t\tthrow new SystemException('Không tồn tại con trỏ database!');\n\t\telseif($this -> tableName ==='')\n\t\tthrow new SystemException('Không tồn tại tên bảng!');\n\t\telse\n\t\treturn true;\n\t}", "function gestionErreurs()\n{\n ini_set('display_errors', 1);\n ini_set('display_startup_errors', 1);\n error_reporting(E_ALL);\n}", "protected function errorAction() {}", "function muestraElputoError(){\n\t\terror_reporting(E_ALL);\n\t\tini_set('display_errors', '1');\n\t}", "public function limpiarError(){\n\t\t$this->mensaje_error = null;\n\t}", "public function error() \n\t{\n\t\trequire $this->view('error', 'error');\n\t\texit;\n\t}", "function getErrors() {\n \techo errorHandler();\n }", "public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }", "public function error(){\n\t}", "public function getLastError();", "abstract function bootErrorAction(array $errors = null);", "private function failure() : void\n {\n (new Repository())->disconnect();\n (new Session())->set('user','success', 'Une erreur est survenue nous vous prions de réessayer ultèrieurement');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }", "public function error()\n\t{\n\t}", "abstract public function error();", "abstract public function getLastError();", "abstract public function getLastError();", "function comprobarErroresSopa($datos)\n\t\t{\n\n\t\tif (empty($datos[\"filas\"])) {\n\t\t\treturn \"Nº de filas erróneo\";\n\t\t}\n\n\t\tif (empty($datos[\"columnas\"]))\n\t\t{\n\t\t\treturn \"Nº de columnas erróneo\";\n\t\t}\n\n\t\tif (empty($datos[\"palabras\"]))\n\t\t{\n\t\t\treturn \"Debes introducir alguna palabra\";\n\t\t}\n\n\t\treturn \"OK\";\n\t}", "public function actionError()\n {\n if(Core::getLoggedUserID() > 0)\n {\n\t \t $exception = Yii::$app->errorHandler->exception;\n\t \t $error = array('statusCode' => $exception->statusCode, 'message' => $exception->getMessage(), 'name' => $exception->getName());\n \t\t return $this->render('/error', ['error' => $error]);\n }\n else\n {\n\t \t\treturn Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl().'admin')->send();\n }\n }", "function died($error) {\r\n echo \"Sentimos muito mas o formulário enviado contém erros<br/>\";\r\n echo \"Os erros seguintes apareceram:<br /><br />\";\r\n echo $error.\"<br /><br />\";\r\n echo \"Por favor, volte e corrija-os.<br /><br />\";\r\n die();\r\n }", "function errorHandler($errno,$errstr){\n\t global $errors;\n\n\t raiseError(\"We are working to solve an internal issue in our service. Please, try later.\", Constants::HTTP_INTERNAL_SERVER_ERROR);\n\t}", "function ShowErr () \n\t{\t\n \t \tif ($this -> CodigoError == 0)\n \t\t{\n \t\t$Salida [\"exito\"] = 1;\n\t\t}else{\n\t\t$Salida [\"exito\"] = 0; \t\t\n\t\t$Salida [\"errorCode\"] = $this -> CodigoError;\n\t\t$Salida [\"errorText\"] = $this -> TextoError;\n \t\t}\n\n\treturn $Salida;\n\t}", "public function errorcode();", "function getErro(){\n\t\t$erro;\n\t\tswitch ($this->intBanco){\n\t\t\tcase INT_SQLSERVER:\n\t\t\t\t$erro = mssql_get_last_message();\n\t\t\t\tbreak;\n\t\t\tcase INT_ORACLE:\n\t\t\t\t$erro1 = oci_error($this->cursor);\n\t\t\t\t$erro = $erro1[\"message\"];\n\t\t\t\tbreak;\n\t\t\tcase INT_POSTGRE:\n\t\t\t\t$erro = pg_last_error($this->conexao);\n\t\t\t\tbreak;\n\t\t\tcase INT_MYSQL:\n\t\t\t\t$erro = mysql_error();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $erro;\n\t}", "public function get_error();", "public function get_error();", "function getError();", "function getError();", "public function actionError() {\n \n }", "function get_errors()\n {\n }", "public function errorAction()\n\t{\n\t}", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new ErrorsController();\n\t\t$this->_controller->index();\n\t\treturn false;\n\t}", "public static function error()\n {\n if ($error = static::$errorHandler) {\n admin_exit($error());\n }\n\n if (Helper::isAjaxRequest()) {\n abort(403, trans('admin.deny'));\n }\n\n admin_exit(\n Content::make()->withError(trans('admin.deny'))\n );\n }", "private function checkError() : void\n {\n $this->isNotPost();\n $this->notExist();\n $this->notAdmin();\n }", "public function showError();", "protected function insereErradas() {\n date_default_timezone_set('America/Sao_Paulo');\n $datahora = date(\"Y-m-d H:i:s\");\n $create = new Create;\n $Dados = array(\"datahora\" => $datahora, \"flag\" => $this->resposta, \"usuario_id\" => $this->userid,);\n $create->IniCreate(\"erradas\", $Dados);\n if ($create->getResult()):\n return 0; // Cadastrado errada e retorna flag Incorreta\n endif;\n }", "function sysError404(){\n\tsysError( \"Please check the address and try again.\", \"The page you requested was not found.\", \"Page Not Found\" );\t\n\texit();\n}", "public function errorAction()\r\n {\r\n $errors = $this->_getParam('error_handler');\r\n $messages = array();\r\n\r\n switch ((string)$errors->type) {\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\r\n // 404 error -- controller or action not found\r\n $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');\r\n\r\n $messages[] = Zoo::_(\"The page you requested was not found.\");\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $messages[] = $errors->exception->getMessage();\r\n }\r\n break;\r\n\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:\r\n case 0:\r\n // application error\r\n //$messages[] = Zoo::_(\"An unexpected error occurred with your request. Please try again later.\");\r\n $messages[] = $errors->exception->getMessage();\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $trace = $errors->exception->getTrace();\r\n foreach (array_keys($trace) as $i) {\r\n if ($trace[$i]['args']) {\r\n foreach ($trace[$i]['args'] as $index => $arg) {\r\n if (is_object($arg)) {\r\n $trace[$i]['args'][$index] = get_class($arg);\r\n }\r\n elseif (is_array($arg)) {\r\n $trace[$i]['args'][$index] = \"array\";\r\n }\r\n }\r\n }\r\n $trace[$i]['file_short'] = \"..\".substr($trace[$i]['file'], strrpos(str_replace(\"\\\\\", DIRECTORY_SEPARATOR, $trace[$i]['file']), DIRECTORY_SEPARATOR));\r\n }\r\n $this->view->assign('trace', $trace);\r\n }\r\n break;\r\n\r\n default:\r\n // application error\r\n $this->getResponse()->setRawHeader('HTTP/1.1 '.$errors->type);\r\n $messages[] = $errors->exception->getMessage();\r\n break;\r\n }\r\n\r\n // Clear previous content\r\n $this->getResponse()->clearBody();\r\n\r\n $this->view->assign('errormessages', $messages);\r\n }", "public function actionError()\n {\n if($error=Yii::app()->errorHandler->error)\n {\n if($error['code'] != 404 || !isset($aErrorMsg[$error['errorCode']])){\n Yii::log(' error : ' . $error['file'] .\":\". $error['line'] .\":\". $error['message'], 'error', 'system');\n }\n $ret = new ReturnInfo(FAIL_RET, Yii::t('exceptions', $error['message']), intval($error['errorCode']));\n if(Yii::app()->request->getIsAjaxRequest()){\n echo json_encode($ret);\n \n }else{\n if( empty($error['errorCode']) ){\n if(isset($this->aErrorMsg[$error['code']])){\n if(empty($this->aErrorMsg[$error['code']]['message'])) {\n $this->aErrorMsg[$error['code']]['message'] = $error['message'];\n }\n $this->render('error', $this->aErrorMsg[$error['code']]);\n }else{\n $this->render('error', $this->aErrorMsg['1000']);\n }\n }else{\n $this->render('error', $this->aErrorMsg[ $error['errorCode'] ]);\n \n }\n }\n \n } \n }", "function errore($messaggio) {\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);\n die($messaggio);\n}", "public function registrarErro(){\r\n if($this->dataHora != null){\r\n if($this->classe != null){\r\n if($this->metodo != null){\r\n if(count($this->descricao != null)){\r\n //Registra o erro em arquivos de log .TXT----------\r\n $linha = \"\\n========================================================\\n\";\r\n $linha .= \"Data: \".$this->dataHora.\"\\n\";\r\n $linha .= \"Erro: \".$this->descricao.\"\\n\";\r\n $linha .= \"Classe: {$this->classe}\\n\";\r\n $linha .= \"Metodo: {$this->metodo}\\n\";\r\n $linha .= \"========================================================\\n\";\r\n $nomeArquivo = \"C:\\\\xampp\\\\htdocs\\\\sui\\\\logs\\\\\".date(\"Y-m-d\");\r\n $arquivo = fopen(\"{$nomeArquivo}.txt\", \"a\");\r\n fwrite($arquivo, $linha);\r\n fclose($arquivo);\r\n Helpers::msg(\"Erro\", \"Houve um erro no processo verifique o log para mais informacoes\");\r\n //Registra o erro em arquivos de log .TXT----------\r\n\r\n\r\n //Envia email para todos os programadores---------------------------\r\n// $conn = Conexoes::conectarCentral();\r\n// $programadores = $conn->query(\"select programadores.email from programadores\")->fetchAll();\r\n// $enderecos = Array();\r\n// if(count($programadores) > 0){\r\n// foreach ($programadores as $programador){\r\n// array_push($enderecos, $programador['email']);\r\n// }\r\n// }else{\r\n// array_push($enderecos, \"[email protected]\");\r\n// }\r\n// $email = new Mail();\r\n// $email->de = \"[email protected]\";\r\n// $email->para = $enderecos;\r\n// $email->titulo = \"Erro no sistema de integrações\";\r\n// $email->corpo = $this->corpoEmail();\r\n// try{\r\n// $email->enviaEmail();\r\n// } catch (Exception $ex) {\r\n// echo $ex->getMensage();\r\n// }\r\n// return true;\r\n //Envia email para todos os programadores---------------------------\r\n }else{\r\n echo \"A descricao do erro nao foi informada\";\r\n }\r\n }else{\r\n echo \"Metodo do erro nao foi informado\";\r\n }\r\n }else{\r\n echo \"Classe do erro nao foi informada\";\r\n }\r\n }else{\r\n echo \"Date e hora do erro não informada\";\r\n }\r\n }", "function errorDatabase($sRequest)\n\t{\n\t\techo \"\\nERREUR : Veuillez contacter un administrateur\\n\";\n\t\techo \"\\nPDO::errorInfo():\\n\";\n \t\tprint_r($sRequest->errorInfo());\n\t}", "protected function check_errors()\n {\n if (true === $this->error_flag) {\n throw new \\Exception($this->get_error( true ));\n }\n }", "protected function getLastError() {}", "public function indexErrorLogin()\r\n {\r\n\t$vars['error'] = 1;\r\n\t\t\r\n $this->view->show(\"home.php\", $vars);\r\n }", "function getErrors();", "public function errorAction() {\n\t\tZend_Layout::getMvcInstance ()->setLayout ( \"light\" );\n\t\t$errors = $this->_getParam ( 'error_handler' );\n\t\tif ($errors->exception->getCode () == 404 || in_array ( $errors->type, array (\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION \n\t\t) )) {\n\t\t\t$this->getResponse ()->setHttpResponseCode ( 404 );\n\t\t\t$this->_helper->viewRenderer ( '404' );\n\t\t}\n\t\t\n\t\t\n\t\t$this->view->content = $errors->exception->getMessage ();\n\t}", "function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }", "function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }", "public function libxml_display_errors() { \r\n\t\r\n\t\t$errors = libxml_get_errors(); \r\n\t\t$retorno = \"\";\r\n\t\tforeach ($errors as $error) { \r\n\t\t\t$retorno .= $this->libxml_display_error($error); \r\n\t\t} \r\n\t\t\r\n\t\t// Limpa os erros da memoria\r\n\t\tlibxml_clear_errors();\r\n\t\t\r\n\t\t// Retorna os erros\r\n\t\treturn $retorno;\r\n\t}", "public function get_error_codes()\n {\n }", "public function errorAction()\r\n {\r\n $this->_helper->layout->setLayout('bzerror');\r\n $this->_helper->redirector('index','bzerror');\r\n //$this->_helper->layout->setLayout('bzerror');\r\n }", "function error($type, $msg, $file, $line)\n{\n // on lit les principales variables d'environnement\n // pour ecrire leur contenu dans le log\n global $HTTP_HOST, $HTTP_USER_AGENT, $REMOTE_ADDR, $REQUEST_URI;\n // on donne un nom au fichier d'erreur\n $errorLog = URL_BASE .\"erreur.log\"; \n // construction du contenu du fichier d'erreur\n $errorString = \"Date: \" . date(\"d-m-Y H:i:s\") . \"\\n\";\n $errorString .= \"Type d'erreur: $type\\n\";\n $errorString .= \"Message d'erreur: $msg\\n\";\n $errorString .= \"Fichier: $file($line)\\n\";\n $errorString .= \"Host: $HTTP_HOST\\n\";\n $errorString .= \"Client: $HTTP_USER_AGENT\\n\";\n $errorString .= \"Client IP: $REMOTE_ADDR\\n\";\n $errorString .= \"Request URI: $REQUEST_URI\\n\\n\";\n // ecriture du log dans le fichier erreur.log\n $fp = fopen($errorLog, \"a+\");\n fwrite($fp, $errorString);\n fclose($fp);\n \n // n'affiche que \n if ($type == E_ERROR || $type == E_WARNING ){\n // display error message\n echo \"<h4>Erreur (<small>$msg</small>)</h4>\";\n echo \"Nous sommes désolés, mais cette page ne peut être affichée à cause d'une erreur interne.\n <br />\n Cette erreur a été enregistrée et sera corrigée dès que possible.\n <br /><br/>\n <a href=# onClick='history.go(-1)'>Cliquer ici pour revenir au menu précédent.</a>\";\n }\n}", "function customError($errno, $errstr)\n {\n $_SESSION['err_msg'] = \"<b>Error:</b> [$errno] $errstr<br />\"; \n header(\"location: ../_php_fail.php\");\n die();\n }", "public function getLastError()\n {\n return 0;\n }", "public function errorAction() {\n $errors = $this->_getParam(\"error_handler\");\n \n // assegno i valori alla view\n $this->viewInit();\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n // 404 error -- controller or action not found \n $this->getResponse()->setRawHeader(\"HTTP/1.1 404 Not Found\");\n $this->view->title = \"HTTP/1.1 404 Not Found\";\n break;\n default:\n // application error; display error page, but don't change \n // status code\n $this->view->title = \"Application Error\";\n break;\n }\n $this->view->message = $errors->exception;\n }", "public function failed();", "protected function mostraErrore($pagina) {\r\n $operatore = $_SESSION[\"op\"];\r\n $pagina->setContentFile(\"./view/benvenuto.php\");\r\n $pagina->setTitle(\"Errore\");\r\n OperatoreController::setruolo($pagina);\r\n include \"./view/masterPage.php\";\r\n }", "public function actionError(){\n return $this->render('../system/error'.Yii::$app->response->getStatusCode());\n }", "function handle_error($errno, $error){\r\n $res = new Result('array');\r\n $res->error_number = $errno;\r\n $res->error_desc = $error;\r\n $res->print_result();\r\n Logger::close();\r\n die;\r\n}", "function errorCode($inc_errstr)\n{\n\techo \"<p><b>ERROR! \".$inc_errstr.\"</b></p>\";\n}", "public function actionErrorOperacion($cod)\r\n\t\t{\r\n\t\t\t$varSession = self::actionGetListaSessions();\r\n\t\t\tself::actionAnularSession($varSession);\r\n\t\t\treturn MensajeController::actionMensaje($cod);\r\n\t\t}", "function error_handler($errno, $errstr, $errfile, $errline, $errcontext){\r\n global $_M_MODULE_PATH;\r\n \r\n //\r\n chdir($_M_MODULE_PATH);\r\n \r\n //\r\n if( !file_exists($totemErrorFile = getcwd() . \"/logs/\".date('Y-m').\"_-_errors.md\") ){\r\n $md = \"| Date | System | Error Num. | Error Type | Error Line | Description | File | \\r\\n\";\r\n $md .= \"|:-------------------:|:-------:|:----------:|:--------------------------------------------------------------------:| ----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | \\r\\n\"; \r\n }else{\r\n $md = \"\";\r\n }\r\n\r\n //\r\n $md = trim($md);\r\n $date = date(\"d/m/Y H:i:s\"); \r\n $errno = str_pad( str_pad($errno , 4, \" \", STR_PAD_LEFT) , 10 , \" \", STR_PAD_BOTH);\r\n $errline = str_pad($errline, 10 , \" \", STR_PAD_LEFT);\r\n $errstr = utf8_encode(str_pad(utf8_decode($errstr) , 182, \" \")); // POG: str_pad não calcula direito sem isso\r\n $errfile = utf8_encode(str_pad(utf8_decode($errfile), 182, \" \")); // POG: str_pad não calcula direito sem isso\r\n\r\n //\r\n switch ($errno) {\r\n case E_ERROR:\r\n $md .= \"\\r\\n| $date | PHP | $errno | <span style='color:#FFFF00; background:#E13C26'> FATAL ERROR </span> | $errline | $errstr | $errfile |\";\r\n\r\n // Separando os traceback no log de erros fatais\r\n $fileFatalErrors = fopen( getcwd() . \"/logs/\".date('Y-m').\"_-_fatal-errors.txt\", \"a+\");\r\n fwrite($fileFatalErrors, \"\\r\\n--------------------------------------------------------------------------------\\r\\n\\r\\n\");\r\n fclose($fileFatalErrors);\r\n\r\n break;\r\n\r\n case E_USER_ERROR:\r\n $md .= \"\\r\\n| $date | TOTEM | $errno | <span style='color:#E13C26'> E_USER_ERROR </span> | $errline | $errstr | $errfile |\";\r\n break;\r\n\r\n case E_WARNING: \r\n $md .= \"\\r\\n| $date | PHP | $errno | <span style='color:#F88B1C'> E_WARNING </span> | $errline | $errstr | $errfile |\";\r\n break; \r\n\r\n case E_USER_WARNING: \r\n $md .= \"\\r\\n| $date | TOTEM | $errno | <span style='color:#F88B1C'> E_USER_WARNING </span> | $errline | $errstr | $errfile |\";\r\n break; \r\n\r\n case E_NOTICE: \r\n $md .= \"\\r\\n| $date | PHP | $errno | <span style='color:#6A9D27'> E_NOTICE </span> | $errline | $errstr | $errfile |\";\r\n\r\n case E_USER_NOTICE: \r\n $md .= \"\\r\\n| $date | TOTEM | $errno | <span style='color:#3171B2'> E_USER_NOTICE </span> | $errline | $errstr | $errfile |\";\r\n break; \r\n\r\n case E_RECOVERABLE_ERROR:\r\n $md .= \"\\r\\n| $date | PHP | $errno | <span style='color:#E13C26'> E_RECOVERABLE_ERROR </span> | $errline | $errstr | $errfile |\";\r\n break;\r\n\r\n default:\r\n $md .= \"\\r\\n| $date | ??? | $errno | <span style='color:#000000'> UNKNOWN </span> | $errline | $errstr | $errfile |\";\r\n break;\r\n }\r\n\r\n //\r\n $file = fopen($totemErrorFile,\"a+\");\r\n fwrite($file, $md);\r\n fclose($file);\r\n\r\n //\r\n return true;\r\n }", "function news_operationError( $message ) {\n \n // for now, just print error message\n echo( \"ERROR: $message\" );\n die();\n }", "public function errorInfo();", "public function errorInfo();", "public function actionError() {\n\t if($error=app()->errorHandler->error) {\t\t\n\t \tif(app()->request->isAjaxRequest)\n\t \t\techo $error['message'];\n\t \telse {\n\t\t\t\t$row = Pagecontent::model()->getPageContent('pagenotfound'); // get the page content for the page\n\t\t\t\tif ($row) { // row is found (page has contents) so we are rending the default view\n\t\t\t\t\t$row['html_title'] .= (!empty($row['html_title']) ? ' ' : '') . ' (' . $error['code'] . ')';\n\t\t\t\t\t$this->setPageAttributes($row);\t\t\n\t\t\t\t\t$this->render('default',array ('row'=>$row));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$this->render('error', $error); // execute the error view file \t \t\n\t\t\t}\n\t }\n\t}", "public function callbackFail()\n {\n if (isset($this->exception)) {\n if (strpos($this->exception, CFormAddUser::SQLSTATE) !== false && strpos($this->exception, CFormAddUser::ERROR_DUPLICATE_KEY) !== false) {\n $errorMessage = \"<p><i>Fel har uppstått i databasen. Akronym är redan upptaget, försök att välja ny akronym eller kontakta administratör!</i></p>\";\n } else {\n $errorMessage = \"<p><i>Fel har uppstått i databasen, försök igen eller kontakta administratör!</i></p>\";\n }\n } else {\n if (isset($this->errorMessage)) {\n $errorMessage = $this->errorMessage;\n } else {\n $errorMessage = \"<p><i>Fel har uppstått i databasen, kunde ej spara information i databasen. Försök igen eller kontakta administratör!</i></p>\";\n }\n }\n\n $this->AddOutput($errorMessage);\n $this->redirectTo();\n }", "public function error()\n {\n require_once('views/pages/error.php');\n }", "public function requirements_errors() {\n\t\t$errors = $this->errors;\n\t\trequire_once( ET_CORE_DIR . 'templates/admin/errors/requirements-error.php' );\n\t}", "function ErrorAcceso(){\n\t\tinclude('view/view_ErrorAcceso.php');\n\t}", "static function error_mysql($noError, $error, $archivo, $linea, $clase, $funcion, $metodo, $script, $sql)\n {\n if($noError == 1062)\n {\n exit('El registro que intentas agregar ya se encuentra registrado. Verifica la informaci&oacute;n e intenta nuevamente.');\n }\n \n switch($noError)\n {\n case 1045: #error al conectar con la base de datos\n print('<h3>Error al conectar con la base de datos &quot;'.MYSQL_NAME.'&quot;.</h3>\n <p>Verifica que las siguientes sugerencias se encuentren configuradas correctamente en el archivo <code>config.php</code>.</p>\n <ul>\n <li>Tu nombre de usuario y contrase&ntilde; est&aacute;n correctamente escritos?</li>\n <li>El nombre del host est&aacute; correctamente escrito?</li>\n <li>El servidor de base de datos, est&aacute; correindo y escuchando por su puerto?</li>\n </ul>');\n break;\n case 1049: # error al seleccionar la BD\n print '<h3>No es posible seleccionar la base de datos &quot;'.MYSQL_NAME.'&quot;.</h3>\n <p>Verifica que las siguientes sugerencias se encuentren configuradas correctamente en el archivo <code>config.php</code>.</p>\n <ul>\n <li>El nombre de la base de datos est&aacute; escrito correctamente?</li>\n <li>Existe la base de datos?</li>\n </ul>';\n break;\n case 1146://tabla no existe\n case 1064:\n print 'Error de sintaxis</h3><p><code>'.$sql.'</code>';\n break;\n case 0:\n default:\n print $error;\n break;\n }\n exit();\n }", "function errorFull() {\r\n $erro = $this->error();\r\n\t\t if ($erro == 1) $erroFull = \"erro 001\";\r\n\t\t return $erroFull;\r\n\t}", "function fatalErrorHandler() {\n global $cfg;\n $error = error_get_last();\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n header(\"HTTP/1.1 500 Server Error\");\n readfile($cfg['source_root'] . \"/500.html\");\n //error_log(print_r($error, true));\n //error_log(print_r(debug_backtrace(), true));\n exit();\n }\n/*\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n $_SESSION['error'] = $error;\n header(\"Location:\".$cfg['root'].\"exception/\");\n exit;\n }\n*/\n}", "public function error() {\n // The tests cover errors, so there will be plenty to sift through\n // $msg = func_get_arg(0);\n // $err = 'API ERROR: ' . $msg . PHP_EOL;\n\n // $objs = func_get_args();\n // array_splice($objs, 0, 1);\n\n // ob_start();\n // foreach($objs as $obj) {\n // var_dump($obj);\n // }\n // $strings = ob_get_clean();\n\n // file_put_contents('tests.log', [$err, $strings], FILE_APPEND);\n }", "public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n\t\t\t$this->sendRestResponse(500,array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $error['message'],\n\t\t\t\t'data' => $error,\n\t\t\t));\t\t\t\n }\n\t}", "function usageError($message)\n\t{\n\t\techo \"Error: $message\\n\\n\";\n\t\texit(1);\n\t}", "public function error() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '../PHPIncludes/pageLinkScriptsCSS.php');\n\n $pageRequirements = new pageLinkScriptsCSS();\n\n $pageRequirements->add(\"css\", ['error.css']);\n\n $pageRequirements->add(\"title\", 'The Sky Is falling');\n\n callStructural('header','std',$pageRequirements);\n\n require_once('views/pages/error.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'std', $pageRequirements); \n\n\n }", "function error($string_erro=\"\") {\r\n\t\t//----- caso ocorra erro, envia mensagem\r\n\t\tif (@mysql_errno($this->connect_id)!=0) {\r\n\t\t\t@mail(SIS_EMAIL_RESPONSAVEL,\"Erro \" . date(\"d-m-Y\"), mysql_errno($this->connect_id) . \" - \" . mysql_error($this->connect_id) . \" - \" . $string_erro);\r\n\t\t}\r\n\t\treturn @mysql_errno($this->connect_id);\r\n\t}", "function afficherErreurBdd ($errorCode=null, $message){\n if($errorCode && $errorCode == 1049){ // erreur de synthaxe sur la bdd //\n echo \n \"<div class='alert alert-danger text-center'> Ce site est en maintenance. Merci de revenir ultérieurement. </div>\";\n }\n}", "public function getLastError() {}", "public function index()\n {\n $this->mPageTitle = lang('reparation_errors');\n $this->render('reparation/errors');\n }", "public function error() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '../PHPIncludes/pageLinkScriptsCSS.php');\n\n $pageRequirements = new pageLinkScriptsCSS();\n\n $pageRequirements->add(\"css\", ['error.css']);\n\n $pageRequirements->add(\"title\", 'The Sky Is Falling');\n\n callStructural('header','std',$pageRequirements);\n\n require_once('views/pages/error.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'std', $pageRequirements); \n\n }", "abstract public function handleFatalError($e);", "public function actionError() {\n//\t\t$this->layout = false;\n\t\tif ($error = Yii::app()->errorHandler->error) {\n\n\t\t\t//handling default image for speakers, presentations, etc\n\t\t\tif ($error['code'] == 404 && strpos($error['message'], '.jpg\"') !== false) {\n\t\t\t\tpreg_match('/\".*\"/', $error['message'], $path);\n\t\t\t\t$path = substr($path[0], 1, -1);\n\t\t\t\t$asked_img = Yii::app()->getBasePath(true).'/../'.$path;\n\t\t\t\t$is_thumb = strpos($path, '.thumb.') !== false;\n\t\t\t\t$default_img = Yii::app()->getBasePath(true).'/../'.dirname($path).'/default'.($is_thumb? '.thumb':'').'.jpg';\n\t\t\t\tif (!file_exists($asked_img) && file_exists($default_img)) {\n\t\t\t\t\theader('Content-type: image/jpeg');\n\t\t\t\t\theader('HTTP/1.0 200 OK');\n\t\t\t\t\techo file_get_contents($default_img);\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Yii::app()->request->isAjaxRequest)\n\t\t\t\techo $error['message'];\n\t\t\telse\n\t\t\t\t$this->render('error', $error);\n\t\t}\n\t}", "public function get_error_code()\n {\n }", "function died($error) {\n echo \"Lo sentimos, pero hay algunos errores con el formulario enviado.\";\n echo \"Estos errores se muestran a continuación.<br /><br />\";\n echo $error.\"<br /><br />\";\n echo \"Por favor corrija estos errores.<br /><br />\";\n die();\n }", "function handle_errors($e) {\n $error = '<pre>ERROR: ' . $e->getMessage() . '</pre>';\n $t = 'base.html';\n $t = $this->twig->loadTemplate($t);\n $output = $t->render(array(\n\t\t\t 'modes' => $this->user_visible_modes,\n\t\t\t 'error' => $error\n\t\t\t ));\n return $output;\n }" ]
[ "0.69722664", "0.68555987", "0.6794135", "0.6780865", "0.6780865", "0.674656", "0.6733402", "0.67250794", "0.6686103", "0.66486144", "0.6608718", "0.6569574", "0.6514291", "0.64822483", "0.6459277", "0.6453669", "0.6436135", "0.6430882", "0.6428649", "0.6406779", "0.639872", "0.6394951", "0.63892263", "0.63875073", "0.6363721", "0.63521487", "0.6327771", "0.63202906", "0.6314163", "0.6314163", "0.62960947", "0.62737507", "0.6269494", "0.6265065", "0.62504065", "0.6230428", "0.6213084", "0.6199124", "0.6199124", "0.6185599", "0.6185599", "0.6185274", "0.61745435", "0.6173916", "0.61545825", "0.6153655", "0.61515045", "0.61340046", "0.6122441", "0.6116049", "0.610794", "0.6105271", "0.6102398", "0.60976744", "0.6096417", "0.60880977", "0.60868996", "0.60839444", "0.60822177", "0.60799026", "0.60785717", "0.60785717", "0.60767215", "0.6073789", "0.6065398", "0.6064824", "0.6062301", "0.6060902", "0.6060209", "0.6058289", "0.6056936", "0.6054586", "0.6054367", "0.6047556", "0.6045672", "0.602972", "0.6021099", "0.60199296", "0.60199296", "0.60157484", "0.6015127", "0.6011736", "0.60083055", "0.5996949", "0.598981", "0.5984366", "0.5980948", "0.5976454", "0.5975952", "0.5971959", "0.5967665", "0.59637463", "0.5962071", "0.5961094", "0.5942716", "0.5941386", "0.5939546", "0.59279686", "0.59239596", "0.59225327", "0.5920842" ]
0.0
-1
/ detectar dispositivos moviles
function isMobile(){ $detect = new Mobile_Detect(); return $detect->isMobile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function findLineMove()\n\t{\n\t\t$moves = array();\n\t\t\n\t\tfor($i = 3; $i >= -3; $i--)\n\t\t{\n\t\t\tfor($j = -3; $j <= 3; $j++)\n\t\t\t{\n\t\t\t\t$hole = & $this->board[$i][$j];\n\t\t\t\t\n\t\t\t\tif(\t$hole )\n\t\t\t\t{\n\t\t\t\t\tif($hole->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Top\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t$this->canMoveTo('up', $i, $j) &&\n\t\t\t\t\t\t\t!empty($this->board[$i + 3][$j]) &&\n\t\t\t\t\t\t\t$this->board[$i + 3][$j]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[0] = array();\n\t\t\t\t\t\t\t$moves[0][] = array('up', $i, $j);\n\t\t\t\t\t\t\t$moves[0][] = array('down', $i + 3, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Right\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t$this->canMoveTo('right', $i, $j) &&\n\t\t\t\t\t\t\t!empty($this->board[$i][$j + 3]) &&\n\t\t\t\t\t\t\t$this->board[$i][$j + 3]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[1] = array();\n\t\t\t\t\t\t\t$moves[1][] = array('right', $i, $j);\n\t\t\t\t\t\t\t$moves[1][] = array('left', $i, $j + 3);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Down\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t$this->canMoveTo('down', $i, $j) &&\n\t\t\t\t\t\t\t!empty($this->board[$i - 3][$j]) &&\n\t\t\t\t\t\t\t$this->board[$i - 3][$j]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[2] = array();\n\t\t\t\t\t\t\t$moves[2][] = array('down', $i, $j);\n\t\t\t\t\t\t\t$moves[2][] = array('top', $i - 3, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Left\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t$this->canMoveTo('left', $i, $j) &&\n\t\t\t\t\t\t\t!empty($this->board[$i][$j - 3]) &&\n\t\t\t\t\t\t\t$this->board[$i][$j - 3]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[3] = array();\n\t\t\t\t\t\t\t$moves[3][] = array('left', $i, $j);\n\t\t\t\t\t\t\t$moves[3][] = array('right', $i, $j - 3);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $moves;\n\t}", "private function findLMove()\n\t{\n\t\t$moves = array();\n\t\t\n\t\tfor($i = 3; $i >= -3; $i--)\n\t\t{\n\t\t\tfor($j = -3; $j <= 3; $j++)\n\t\t\t{\n\t\t\t\t$hole = & $this->board[$i][$j];\n\t\t\t\t\n\t\t\t\tif($hole && !$hole->hasMarble)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Right Down\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t@$this->board[$i][$j + 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i][$j + 2]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 1][$j + 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 2][$j + 1]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[0] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$moves[0][] = array('left', $i, $j + 2);\n\t\t\t\t\t\t\t$moves[0][] = array('up', $i - 2, $j + 1);\n\t\t\t\t\t\t\t$moves[0][] = array('right', $i, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e) {} // Not available\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Top Left\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t@$this->board[$i + 1][$j]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 2][$j]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 1][$j - 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 1][$j - 2]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[1] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$moves[1][] = array('down', $i + 2, $j);\n\t\t\t\t\t\t\t$moves[1][] = array('right', $i + 1, $j - 2);\n\t\t\t\t\t\t\t$moves[1][] = array('up', $i, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e) {} // Not available\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Down Right\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t@$this->board[$i - 1][$j]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 2][$j]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 1][$j + 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 1][$j + 2]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[2] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$moves[2][] = array('up', $i - 2, $j);\n\t\t\t\t\t\t\t$moves[2][] = array('left', $i - 1, $j + 2);\n\t\t\t\t\t\t\t$moves[2][] = array('down', $i, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e) {} // Not available\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Down Left\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t@$this->board[$i - 1][$j]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 2][$j]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 1][$j - 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 1][$j - 2]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[3] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$moves[3][] = array('up', $i - 2, $j);\n\t\t\t\t\t\t\t$moves[3][] = array('right', $i - 1, $j - 2);\n\t\t\t\t\t\t\t$moves[3][] = array('down', $i, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e) {} // Not available\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Top Right\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t@$this->board[$i + 1][$j]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 2][$j]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 1][$j + 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 1][$j + 2]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[4] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$moves[4][] = array('down', $i + 2, $j);\n\t\t\t\t\t\t\t$moves[4][] = array('left', $i + 1, $j + 2);\n\t\t\t\t\t\t\t$moves[4][] = array('up', $i, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e) {} // Not available\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Right Top\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t@$this->board[$i][$j + 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i][$j + 2]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 1][$j + 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 2][$j + 1]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[5] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$moves[5][] = array('left', $i, $j + 2);\n\t\t\t\t\t\t\t$moves[5][] = array('down', $i + 2, $j + 1);\n\t\t\t\t\t\t\t$moves[5][] = array('right', $i, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e) {}// Not available\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Left Top\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t@$this->board[$i][$j - 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i][$j - 2]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 1][$j - 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i + 2][$j - 1]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[6] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$moves[6][] = array('right', $i, $j - 2);\n\t\t\t\t\t\t\t$moves[6][] = array('down', $i + 2, $j - 1);\n\t\t\t\t\t\t\t$moves[6][] = array('left', $i, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e) {}// Not available\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// Left Down\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t@$this->board[$i][$j - 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i][$j - 2]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 1][$j - 1]->hasMarble &&\n\t\t\t\t\t\t\t@$this->board[$i - 2][$j - 1]->hasMarble\n\t\t\t\t\t\t)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$moves[7] = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$moves[7][] = array('right', $i, $j - 2);\n\t\t\t\t\t\t\t$moves[7][] = array('up', $i - 2, $j - 1);\n\t\t\t\t\t\t\t$moves[7][] = array('left', $i, $j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e) {}// Not available\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $moves;\n\t}", "protected function calculateSpritePositions() {}", "function getCoordinatesInfo($myPositionX, $myPositionY, $game, $map, $bombs, $opponents, $bonuses)\n{\n\t$oneUp = $myPositionY - 1;\n\t$oneDown = $myPositionY + 1;\n\t$oneLeft = $myPositionX - 1;\n\t$oneRight = $myPositionX + 1;\n\t\n\t$typeOfObstacle = [];\n\t$moveAvailable = [];\n\n\t//check four directions\n\t//up\n\t$moveAvailable[0] = 0;\n\tif(!empty($map[$myPositionX][$oneUp]))\n\t{\n\t\tfor($up = $oneUp; $up >= 0; $up--)\n\t\t{\n\t\t\t$elementInPositionToEvaluate = $map[$myPositionX][$up];\n\t\t\t\n\t\t\t$isABomb = $bombs[$myPositionX][$up] === 1;\n\t\t\t$isAnOpponent = !empty($opponents[$myPositionX][$up]);\n\t\t\t$isABonus = !empty($bonuses[$myPositionX][$up]);\n\t\t\t\n\t\t\t$typeOfObstacle[0] = getTypeOfObstacle($elementInPositionToEvaluate, $isABomb, $isAnOpponent);\n\t\t\t\n\t\t\tif(!empty($typeOfObstacle[0])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$moveAvailable[0]++;\n\t\t}\n\t\tif(empty($typeOfObstacle[0])){\n\t\t\t$typeOfObstacle[0] = 1; //end grid\n\t\t}\n\t}\n\t\n\t//right\n\t$moveAvailable[1] = 0;\n\tif(!empty( $map[$oneRight][$myPositionY]))\n\t{\n\t\tfor($right = $oneRight; $right < $game->state->width; $right++)\n\t\t{\n\t\t\t$elementInPositionToEvaluate = $map[$right][$myPositionY];\n\t\t\t\n\t\t\t$isABomb = !empty($bombs[$right][$myPositionY]);\n\t\t\t$isAnOpponent = !empty($opponents[$right][$myPositionY]);\n\t\t\t$isABonus = !empty($bonuses[$right][$myPositionY]);\n\t\t\t\n\t\t\t$typeOfObstacle[1] = getTypeOfObstacle($elementInPositionToEvaluate, $isABomb, $isAnOpponent);\n\t\t\t\n\t\t\tif(!empty($typeOfObstacle[1])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$moveAvailable[1]++;\n\t\t}\n\t\tif(empty($typeOfObstacle[1])){\n\t\t\t$typeOfObstacle[1] = 1; //end grid\n\t\t}\n\t}\n\n\t//down\n\t$moveAvailable[2] = 0;\n\tif(!empty($map[$myPositionX][$oneDown]))\n\t{\n\t\tfor($down = $oneDown; $down < $game->state->height; $down++)\n\t\t{\n\t\t\t$elementInPositionToEvaluate = $map[$myPositionX][$down];\n\t\t\t\n\t\t\t$isABomb = !empty($bombs[$myPositionX][$down]);\n\t\t\t$isAnOpponent = !empty($opponents[$myPositionX][$down]);\n\t\t\t$isABonus = !empty($bonuses[$myPositionX][$down]);\n\t\t\t\n\t\t\t$typeOfObstacle[2] = getTypeOfObstacle($elementInPositionToEvaluate, $isABomb, $isAnOpponent);\n\t\t\t\n\t\t\tif(!empty($typeOfObstacle[2])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$moveAvailable[2]++;\n\t\t}\n\t\tif(empty($typeOfObstacle[2])){\n\t\t\t$typeOfObstacle[2] = 1; //end grid\n\t\t}\n\t}\n\t\n\t//left\n\t$moveAvailable[3] = 0;\n\tif(!empty($map[$oneLeft][$myPositionY]))\n\t{\n\t\tfor($left = $oneLeft; $left >= 0; $left--)\n\t\t{\n\t\t\t$elementInPositionToEvaluate = $map[$left][$myPositionY];\n\t\t\t\n\t\t\t$isABomb = !empty($bombs[$left][$myPositionY]);\n\t\t\t$isAnOpponent = !empty($opponents[$left][$myPositionY]);\n\t\t\t$isABonus = !empty($bonuses[$left][$myPositionY]);\n\t\t\t\n\t\t\t$typeOfObstacle[3] = getTypeOfObstacle($elementInPositionToEvaluate, $isABomb, $isAnOpponent);\n\t\t\t\n\t\t\tif(!empty($typeOfObstacle[3])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$moveAvailable[3]++;\n\t\t}\n\t\tif(empty($typeOfObstacle[3])){\n\t\t\t$typeOfObstacle[3] = 1; //end grid\n\t\t}\n\t}\n\n\treturn [\n\t\t\"moveAvailable\" => $moveAvailable,\n\t\t\"typeOfObstacle\" => $typeOfObstacle\n\t];\n}", "private function findSimpleMove()\n\t{\n\t\t$moves = array();\n\t\t\n\t\tfor($i = 3; $i >= -3; $i--)\n\t\t{\n\t\t\tfor($j = -3; $j <= 3; $j++)\n\t\t\t{\n\t\t\t\t$hole = & $this->board[$i][$j];\n\t\t\t\t\n\t\t\t\tif(\t$hole )\n\t\t\t\t{\n\t\t\t\t\tif($hole->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($this->moveDestinations as $direction)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($this->canMoveTo($direction, $i, $j))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$moves[] = array(array($direction, $i, $j));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $moves;\n\t}", "private function findRectangleMove()\n\t{\n\t\t$moves = array();\n\t\t\n\t\t// Top Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[3][-1]->hasMarble &&\n\t\t\t\t$this->board[3][0]->hasMarble &&\n\t\t\t\t$this->board[3][1]->hasMarble &&\n\t\t\t\t$this->board[2][-1]->hasMarble &&\n\t\t\t\t$this->board[2][0]->hasMarble &&\n\t\t\t\t$this->board[2][1]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[1][1]->hasMarble && !$this->board[0][1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][1]->hasMarble && $this->board[0][1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[0] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[0][] = array('down', 3, -1);\n\t\t\t\t\t$moves[0][] = array('down', 3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[0][] = array('down', 3, 1);\n\t\t\t\t\t\t$moves[0][] = array('up', 0, 1);\n\t\t\t\t\t\t$moves[0][] = array('right', 1, -1);\n\t\t\t\t\t\t$moves[0][] = array('down', 2, 1);\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$moves[0][] = array('down', 2, 1);\n\t\t\t\t\t\t$moves[0][] = array('right', 1, -1);\n\t\t\t\t\t\t$moves[0][] = array('up', 0, 1);\n\t\t\t\t\t\t$moves[0][] = array('down', 3, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[1][-1]->hasMarble && !$this->board[0][-1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][-1]->hasMarble && $this->board[0][-1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[1] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[1][] = array('down', 3, 1);\n\t\t\t\t\t$moves[1][] = array('down', 3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[1][] = array('down', 3, -1);\n\t\t\t\t\t\t$moves[1][] = array('up', 0, -1);\n\t\t\t\t\t\t$moves[1][] = array('left', 1, 1);\n\t\t\t\t\t\t$moves[1][] = array('down', 2, -1);\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$moves[1][] = array('down', 2, -1);\n\t\t\t\t\t\t$moves[1][] = array('left', 1, 1);\n\t\t\t\t\t\t$moves[1][] = array('up', 0, -1);\n\t\t\t\t\t\t$moves[1][] = array('down', 3, -1);\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\tif($this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble && !$this->board[1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[2] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[2][] = array('down', 3, -1);\n\t\t\t\t\t$moves[2][] = array('left', 1, 0);\n\t\t\t\t\t$moves[2][] = array('left', 3, 1);\n\t\t\t\t\t$moves[2][] = array('left', 2, 1);\n\t\t\t\t\t$moves[2][] = array('down', 3, -1);\n\t\t\t\t\t$moves[2][] = array('right', 1, -2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble && $this->board[1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[3] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[3][] = array('down', 3, -1);\n\t\t\t\t\t$moves[3][] = array('right', 1, -2);\n\t\t\t\t\t$moves[3][] = array('left', 3, 1);\n\t\t\t\t\t$moves[3][] = array('left', 2, 1);\n\t\t\t\t\t$moves[3][] = array('down', 3, -1);\n\t\t\t\t\t$moves[3][] = array('left', 1, 0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble && !$this->board[1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[4] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[4][] = array('down', 3, 1);\n\t\t\t\t\t$moves[4][] = array('right', 1, 0);\n\t\t\t\t\t$moves[4][] = array('right', 3, -1);\n\t\t\t\t\t$moves[4][] = array('right', 2, -1);\n\t\t\t\t\t$moves[4][] = array('down', 3, 1);\n\t\t\t\t\t$moves[4][] = array('left', 1, 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble && $this->board[1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[5] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[5][] = array('down', 3, 1);\n\t\t\t\t\t$moves[5][] = array('left', 1, 2);\n\t\t\t\t\t$moves[5][] = array('right', 3, -1);\n\t\t\t\t\t$moves[5][] = array('right', 2, -1);\n\t\t\t\t\t$moves[5][] = array('down', 3, 1);\n\t\t\t\t\t$moves[5][] = array('right', 1, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Down Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[-3][-1]->hasMarble &&\n\t\t\t\t$this->board[-3][0]->hasMarble &&\n\t\t\t\t$this->board[-3][1]->hasMarble &&\n\t\t\t\t$this->board[-2][-1]->hasMarble &&\n\t\t\t\t$this->board[-2][0]->hasMarble &&\n\t\t\t\t$this->board[-2][1]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[-1][0]->hasMarble && !$this->board[-1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][1]->hasMarble && !$this->board[0][1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][1]->hasMarble && $this->board[0][1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[6] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[6][] = array('up', -3, -1);\n\t\t\t\t\t$moves[6][] = array('up', -3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[6][] = array('up', -3, 1);\n\t\t\t\t\t\t$moves[6][] = array('down', 0, 1);\n\t\t\t\t\t\t$moves[6][] = array('right', -1, -1);\n\t\t\t\t\t\t$moves[6][] = array('up', -2, 1);\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$moves[6][] = array('up', -2, 1);\n\t\t\t\t\t\t$moves[6][] = array('right', -1, -1);\n\t\t\t\t\t\t$moves[6][] = array('down', 0, 1);\n\t\t\t\t\t\t$moves[6][] = array('up', -3, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][-1]->hasMarble && !$this->board[0][-1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][-1]->hasMarble && $this->board[0][-1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[7] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[7][] = array('up', -3, 1);\n\t\t\t\t\t$moves[7][] = array('up', -3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[7][] = array('up', -3, -1);\n\t\t\t\t\t\t$moves[7][] = array('down', 0, -1);\n\t\t\t\t\t\t$moves[7][] = array('left', -1, 1);\n\t\t\t\t\t\t$moves[7][] = array('up', -2, -1);\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$moves[7][] = array('up', -2, -1);\n\t\t\t\t\t\t$moves[7][] = array('left', -1, 1);\n\t\t\t\t\t\t$moves[7][] = array('down', 0, -1);\n\t\t\t\t\t\t$moves[7][] = array('up', -3, -1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[8] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[8][] = array('up', -3, -1);\n\t\t\t\t\t$moves[8][] = array('left', -1, 0);\n\t\t\t\t\t$moves[8][] = array('left', -3, 1);\n\t\t\t\t\t$moves[8][] = array('left', -2, 1);\n\t\t\t\t\t$moves[8][] = array('up', -3, -1);\n\t\t\t\t\t$moves[8][] = array('right', -1, -2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[9] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[9][] = array('up', -3, -1);\n\t\t\t\t\t$moves[9][] = array('right', -1, -2);\n\t\t\t\t\t$moves[9][] = array('left', -3, 1);\n\t\t\t\t\t$moves[9][] = array('left', -2, 1);\n\t\t\t\t\t$moves[9][] = array('up', -3, -1);\n\t\t\t\t\t$moves[9][] = array('left', -1, 0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[10] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[10][] = array('up', -3, 1);\n\t\t\t\t\t$moves[10][] = array('right', -1, 0);\n\t\t\t\t\t$moves[10][] = array('right', -3, -1);\n\t\t\t\t\t$moves[10][] = array('right', -2, -1);\n\t\t\t\t\t$moves[10][] = array('up', -3, 1);\n\t\t\t\t\t$moves[10][] = array('left', -1, 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[11] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[11][] = array('up', -3, 1);\n\t\t\t\t\t$moves[11][] = array('left', -1, 2);\n\t\t\t\t\t$moves[11][] = array('right', -3, -1);\n\t\t\t\t\t$moves[11][] = array('right', -2, -1);\n\t\t\t\t\t$moves[11][] = array('up', -3, 1);\n\t\t\t\t\t$moves[11][] = array('right', -1, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Left Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[1][-3]->hasMarble &&\n\t\t\t\t$this->board[1][-2]->hasMarble &&\n\t\t\t\t$this->board[0][-3]->hasMarble &&\n\t\t\t\t$this->board[0][-2]->hasMarble &&\n\t\t\t\t$this->board[-1][-3]->hasMarble &&\n\t\t\t\t$this->board[-1][-2]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[1][-1]->hasMarble && !$this->board[1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][-1]->hasMarble && $this->board[1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[12] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[12][] = array('right', 0, -3);\n\t\t\t\t\t$moves[12][] = array('right', -1, -3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -3);\n\t\t\t\t\t\t$moves[12][] = array('left', 1, 0);\n\t\t\t\t\t\t$moves[12][] = array('up', -1, -1);\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -2);\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$moves[12][] = array('right', 1, -2);\n\t\t\t\t\t\t$moves[12][] = array('up', -1, -1);\n\t\t\t\t\t\t$moves[12][] = array('left', 1, 0);\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][-1]->hasMarble && !$this->board[-1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][-1]->hasMarble && $this->board[-1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[13] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[13][] = array('right', 0, -3);\n\t\t\t\t\t$moves[13][] = array('right', 1, -3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -3);\n\t\t\t\t\t\t$moves[13][] = array('left', -1, 0);\n\t\t\t\t\t\t$moves[13][] = array('down', 1, -1);\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -2);\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$moves[13][] = array('right', -1, -2);\n\t\t\t\t\t\t$moves[13][] = array('down', 1, -1);\n\t\t\t\t\t\t$moves[13][] = array('left', -1, 0);\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble && !$this->board[2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[14] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[14][] = array('right', 1, -3);\n\t\t\t\t\t$moves[14][] = array('up', 0, -1);\n\t\t\t\t\t$moves[14][] = array('up', -1, -3);\n\t\t\t\t\t$moves[14][] = array('up', -1, -2);\n\t\t\t\t\t$moves[14][] = array('right', 1, -3);\n\t\t\t\t\t$moves[14][] = array('down', 2, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble && $this->board[2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[15] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[15][] = array('right', 1, -3);\n\t\t\t\t\t$moves[15][] = array('down', 2, -1);\n\t\t\t\t\t$moves[15][] = array('up', -1, -3);\n\t\t\t\t\t$moves[15][] = array('up', -1, -2);\n\t\t\t\t\t$moves[15][] = array('right', 1, -3);\n\t\t\t\t\t$moves[15][] = array('up', 0, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble && !$this->board[-2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[16] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[16][] = array('right', -1, -3);\n\t\t\t\t\t$moves[16][] = array('down', 0, -1);\n\t\t\t\t\t$moves[16][] = array('down', 1, -3);\n\t\t\t\t\t$moves[16][] = array('down', 1, -2);\n\t\t\t\t\t$moves[16][] = array('right', -1, -3);\n\t\t\t\t\t$moves[16][] = array('up', -2, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble && $this->board[-2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[17] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[17][] = array('right', -1, -3);\n\t\t\t\t\t$moves[17][] = array('up', -2, -1);\n\t\t\t\t\t$moves[17][] = array('down', 1, -3);\n\t\t\t\t\t$moves[17][] = array('down', 1, -2);\n\t\t\t\t\t$moves[17][] = array('right', -1, -3);\n\t\t\t\t\t$moves[17][] = array('down', 0, -1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Right Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[1][3]->hasMarble &&\n\t\t\t\t$this->board[1][2]->hasMarble &&\n\t\t\t\t$this->board[0][3]->hasMarble &&\n\t\t\t\t$this->board[0][2]->hasMarble &&\n\t\t\t\t$this->board[-1][3]->hasMarble &&\n\t\t\t\t$this->board[-1][2]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble &&\n\t\t\t\t\t($this->board[1][1]->hasMarble && !$this->board[1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][1]->hasMarble && $this->board[1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[18] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[18][] = array('left', 0, 3);\n\t\t\t\t\t$moves[18][] = array('left', -1, 3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 3);\n\t\t\t\t\t\t$moves[18][] = array('right', 1, 0);\n\t\t\t\t\t\t$moves[18][] = array('up', -1, 1);\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 2);\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$moves[18][] = array('left', 1, 2);\n\t\t\t\t\t\t$moves[18][] = array('up', -1, 1);\n\t\t\t\t\t\t$moves[18][] = array('right', 1, 0);\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 3);\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\tif(\n\t\t\t\t\t!$this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][1]->hasMarble && !$this->board[-1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][1]->hasMarble && $this->board[-1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[19] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[19][] = array('left', 0, 3);\n\t\t\t\t\t$moves[19][] = array('left', 1, 3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 3);\n\t\t\t\t\t\t$moves[19][] = array('right', -1, 0);\n\t\t\t\t\t\t$moves[19][] = array('down', 1, 1);\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 2);\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$moves[19][] = array('left', -1, 2);\n\t\t\t\t\t\t$moves[19][] = array('down', 1, 1);\n\t\t\t\t\t\t$moves[19][] = array('right', -1, 0);\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 3);\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\tif($this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble && !$this->board[2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[20] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[20][] = array('left', 1, 3);\n\t\t\t\t\t$moves[20][] = array('up', 0, 1);\n\t\t\t\t\t$moves[20][] = array('up', -1, 3);\n\t\t\t\t\t$moves[20][] = array('up', -1, 2);\n\t\t\t\t\t$moves[20][] = array('left', 1, 3);\n\t\t\t\t\t$moves[20][] = array('down', 2, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble && $this->board[2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[21] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[21][] = array('left', 1, 3);\n\t\t\t\t\t$moves[21][] = array('down', 2, 1);\n\t\t\t\t\t$moves[21][] = array('up', -1, 3);\n\t\t\t\t\t$moves[21][] = array('up', -1, 2);\n\t\t\t\t\t$moves[21][] = array('left', 1, 3);\n\t\t\t\t\t$moves[21][] = array('up', 0, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[22] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[22][] = array('left', -1, 3);\n\t\t\t\t\t$moves[22][] = array('down', 0, 1);\n\t\t\t\t\t$moves[22][] = array('down', 1, 3);\n\t\t\t\t\t$moves[22][] = array('down', 1, 2);\n\t\t\t\t\t$moves[22][] = array('left', -1, 3);\n\t\t\t\t\t$moves[22][] = array('up', -2, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[23] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[23][] = array('left', -1, 3);\n\t\t\t\t\t$moves[23][] = array('up', -2, 1);\n\t\t\t\t\t$moves[23][] = array('down', 1, 3);\n\t\t\t\t\t$moves[23][] = array('down', 1, 2);\n\t\t\t\t\t$moves[23][] = array('left', -1, 3);\n\t\t\t\t\t$moves[23][] = array('down', 0, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\treturn $moves;\n\t}", "public static function FindUnusedImages()\n {\n }", "private function findBigLMove()\n\t{\n\t\t$moves = array();\n\t\t\n\t\t// Top\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[3][-1]->hasMarble &&\n\t\t\t\t$this->board[3][0]->hasMarble &&\n\t\t\t\t$this->board[3][1]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\t// Left\n\t\t\t\tif(\t$this->board[2][-1]->hasMarble &&\n\t\t\t\t\t$this->board[1][-1]->hasMarble &&\n\t\t\t\t\t$this->board[0][-1]->hasMarble &&\n\t\t\t\t\t(\n\t\t\t\t\t\t($this->board[1][-2]->hasMarble && !$this->board[1][0]->hasMarble) ||\n\t\t\t\t\t\t(!$this->board[1][-2]->hasMarble && $this->board[1][0]->hasMarble)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[0] = array();\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[1][-2]->hasMarble && !$this->board[1][0]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[0][] = array('right', 1, -2);\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$moves[0][] = array('left', 1, 0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$moves[0][] = array('down', 3, -1);\n\t\t\t\t\t$moves[0][] = array('left', 3, 1);\n\t\t\t\t\t$moves[0][] = array('up', 0, -1);\n\t\t\t\t\t$moves[0][] = array('down', 3, -1);\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[1][-2]->hasMarble && !$this->board[1][0]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[0][] = array('right', 1, -2);\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$moves[0][] = array('left', 1, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Right\n\t\t\t\tif(\t$this->board[2][1]->hasMarble &&\n\t\t\t\t\t$this->board[1][1]->hasMarble &&\n\t\t\t\t\t$this->board[0][1]->hasMarble &&\n\t\t\t\t\t(\n\t\t\t\t\t\t($this->board[1][2]->hasMarble && !$this->board[1][0]->hasMarble) ||\n\t\t\t\t\t\t(!$this->board[1][2]->hasMarble && $this->board[1][0]->hasMarble)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[1] = array();\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[1][2]->hasMarble && !$this->board[1][0]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[1][] = array('left', 1, 2);\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$moves[1][] = array('right', 1, 0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$moves[1][] = array('down', 3, 1);\n\t\t\t\t\t$moves[1][] = array('right', 3, -1);\n\t\t\t\t\t$moves[1][] = array('up', 0, 1);\n\t\t\t\t\t$moves[1][] = array('down', 3, 1);\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[1][2]->hasMarble && !$this->board[1][0]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[1][] = array('left', 1, 2);\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$moves[1][] = array('right', 1, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Down\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[-3][-1]->hasMarble &&\n\t\t\t\t$this->board[-3][0]->hasMarble &&\n\t\t\t\t$this->board[-3][1]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\t// Left\n\t\t\t\tif(\t$this->board[-2][-1]->hasMarble &&\n\t\t\t\t\t$this->board[-1][-1]->hasMarble &&\n\t\t\t\t\t$this->board[0][-1]->hasMarble &&\n\t\t\t\t\t(\n\t\t\t\t\t\t($this->board[-1][-2]->hasMarble && !$this->board[-1][0]->hasMarble) ||\n\t\t\t\t\t\t(!$this->board[-1][-2]->hasMarble && $this->board[-1][0]->hasMarble)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[2] = array();\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[-1][-2]->hasMarble && !$this->board[-1][0]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[2][] = array('right', -1, -2);\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$moves[2][] = array('left', -1, 0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$moves[2][] = array('up', -3, -1);\n\t\t\t\t\t$moves[2][] = array('left', -3, 1);\n\t\t\t\t\t$moves[2][] = array('down', 0, -1);\n\t\t\t\t\t$moves[2][] = array('up', -3, -1);\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[-1][-2]->hasMarble && !$this->board[-1][0]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[2][] = array('right', -1, -2);\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$moves[2][] = array('left', -1, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Right\n\t\t\t\tif(\t$this->board[-2][1]->hasMarble &&\n\t\t\t\t\t$this->board[-1][1]->hasMarble &&\n\t\t\t\t\t$this->board[0][1]->hasMarble &&\n\t\t\t\t\t(\n\t\t\t\t\t\t($this->board[-1][2]->hasMarble && !$this->board[-1][0]->hasMarble) ||\n\t\t\t\t\t\t(!$this->board[-1][2]->hasMarble && $this->board[-1][0]->hasMarble)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[3] = array();\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[-1][2]->hasMarble && !$this->board[-1][0]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[3][] = array('left', -1, 2);\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$moves[3][] = array('right', -1, 0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$moves[3][] = array('up', -3, 1);\n\t\t\t\t\t$moves[3][] = array('right', -3, -1);\n\t\t\t\t\t$moves[3][] = array('down', 0, 1);\n\t\t\t\t\t$moves[3][] = array('up', -3, 1);\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[-1][2]->hasMarble && !$this->board[-1][0]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[3][] = array('left', -1, 2);\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$moves[3][] = array('right', -1, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Left\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[1][-3]->hasMarble &&\n\t\t\t\t$this->board[0][-3]->hasMarble &&\n\t\t\t\t$this->board[-1][-3]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\t// Up\n\t\t\t\tif(\t$this->board[1][-2]->hasMarble &&\n\t\t\t\t\t$this->board[1][-1]->hasMarble &&\n\t\t\t\t\t$this->board[1][0]->hasMarble &&\n\t\t\t\t\t(\n\t\t\t\t\t\t($this->board[2][-1]->hasMarble && !$this->board[0][-1]->hasMarble) ||\n\t\t\t\t\t\t(!$this->board[2][-1]->hasMarble && $this->board[0][-1]->hasMarble)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[4] = array();\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[2][-1]->hasMarble && !$this->board[0][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[4][] = array('down', 2, -1);\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$moves[4][] = array('up', 0, -1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$moves[4][] = array('right', 1, -3);\n\t\t\t\t\t$moves[4][] = array('up', -1, -3);\n\t\t\t\t\t$moves[4][] = array('left', 1, 0);\n\t\t\t\t\t$moves[4][] = array('right', 1, -3);\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[2][-1]->hasMarble && !$this->board[0][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[4][] = array('down', 2, -1);\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$moves[4][] = array('up', 0, -1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Down\n\t\t\t\tif(\t$this->board[-1][-2]->hasMarble &&\n\t\t\t\t\t$this->board[-1][-1]->hasMarble &&\n\t\t\t\t\t$this->board[-1][0]->hasMarble &&\n\t\t\t\t\t(\n\t\t\t\t\t\t($this->board[-2][-1]->hasMarble && !$this->board[0][-1]->hasMarble) ||\n\t\t\t\t\t\t(!$this->board[-2][-1]->hasMarble && $this->board[0][-1]->hasMarble)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[5] = array();\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[-2][-1]->hasMarble && !$this->board[0][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[5][] = array('up', -2, -1);\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$moves[5][] = array('down', 0, -1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$moves[5][] = array('right', -1, -3);\n\t\t\t\t\t$moves[5][] = array('down', 1, -3);\n\t\t\t\t\t$moves[5][] = array('left', 1, 0);\n\t\t\t\t\t$moves[5][] = array('right', -1, -3);\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[-2][-1]->hasMarble && !$this->board[0][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[5][] = array('up', 2, -1);\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$moves[5][] = array('down', 0, -1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Right\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[1][3]->hasMarble &&\n\t\t\t\t$this->board[0][3]->hasMarble &&\n\t\t\t\t$this->board[-1][3]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\t// Up\n\t\t\t\tif(\t$this->board[1][2]->hasMarble &&\n\t\t\t\t\t$this->board[1][1]->hasMarble &&\n\t\t\t\t\t$this->board[1][0]->hasMarble &&\n\t\t\t\t\t(\n\t\t\t\t\t\t($this->board[2][1]->hasMarble && !$this->board[0][1]->hasMarble) ||\n\t\t\t\t\t\t(!$this->board[2][1]->hasMarble && $this->board[0][1]->hasMarble)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[6] = array();\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[2][1]->hasMarble && !$this->board[0][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[6][] = array('down', 2, 1);\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$moves[6][] = array('up', 0, 1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$moves[6][] = array('left', 1, 3);\n\t\t\t\t\t$moves[6][] = array('up', -1, 3);\n\t\t\t\t\t$moves[6][] = array('right', 1, 0);\n\t\t\t\t\t$moves[6][] = array('left', 1, 3);\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[2][1]->hasMarble && !$this->board[0][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[6][] = array('down', 2, 1);\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$moves[6][] = array('up', 0, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Down\n\t\t\t\tif(\t$this->board[-1][2]->hasMarble &&\n\t\t\t\t\t$this->board[-1][1]->hasMarble &&\n\t\t\t\t\t$this->board[-1][0]->hasMarble &&\n\t\t\t\t\t(\n\t\t\t\t\t\t($this->board[-2][1]->hasMarble && !$this->board[0][1]->hasMarble) ||\n\t\t\t\t\t\t(!$this->board[-2][1]->hasMarble && $this->board[0][1]->hasMarble)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[7] = array();\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[-2][1]->hasMarble && !$this->board[0][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[7][] = array('up', -2, 1);\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$moves[7][] = array('down', 0, 1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$moves[7][] = array('left', -1, 3);\n\t\t\t\t\t$moves[7][] = array('down', 1, 3);\n\t\t\t\t\t$moves[7][] = array('right', -1, 0);\n\t\t\t\t\t$moves[7][] = array('left', -1, 3);\n\t\t\t\t\t\n\t\t\t\t\tif($this->board[-2][1]->hasMarble && !$this->board[0][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[7][] = array('up', -2, 1);\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$moves[7][] = array('down', 0, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\treturn $moves;\n\t}", "public function getMaxContours() {}", "abstract public function hasAvailableMoves(): bool;", "private function get_next_move() {\n\t\t$move = $this->can_put_a_card_up();\n\t\tif($move !== false) return $move;\n\t\t\n\t\t// Test si une carte peut être déplacée\n\t\t$move = $this->can_move_cards();\n\t\t//if($move !== false) return $move;\n\t\t\n\t\t// Test si la carte du deck peut descendre\n\t\t$move2 = $this->can_put_deck_card_down();\n\t\tif($move !== false && $move2 !== false) {\n\t\t\tarray_push($move, $move2);\n\t\t\treturn $move;\n\t\t} \n\t\tif($move !== false) return $move;\n\t\tif($move2 !== false) return $move2;\n\t\t\n\t\t// Test si une carte peut être montée suite à un déplacement spécial\n\t\t//$move = $this->can_put_a_card_up_after_move();\n\t\t//if($move !== false) return $move;\n\t\t\n\t\t// Pioche\n\t\t$move = $this->can_turn_from_deck();\n\t\tif($this->infinite_move($move)) return false;\n\t\tif($move !== false) return $move;\n\t\t\n\t\treturn false;\n\t}", "public function findPath()\n\t{\n\t\t$pegs = array();\n\t\t$moves = array();\n\t\t\n\t\t$aux = $this->findRectangleMove();\n\t\tforeach($aux as $move)\n\t\t{\n\t\t\t$moves[] = $move;\n\t\t}\n\t\t\n\t\t$aux = $this->findBigLMove();\n\t\tforeach($aux as $move)\n\t\t{\n\t\t\t$moves[] = $move;\n\t\t}\n\t\t\n\t\t$aux = $this->findLMove();\n\t\tforeach($aux as $move)\n\t\t{\n\t\t\t$moves[] = $move;\n\t\t}\n\t\t\n\t\tif(empty($moves))\n\t\t{\n\t\t\tif(count($this->moves) > 28)\n\t\t\t{\n\t\t\t\t$moves = $this->findSimpleMove();\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($moves as $move)\n\t\t{\n\t\t\t$newPeg = clone $this;\n\t\t\t\n\t\t\tforeach($move as $m)\n\t\t\t{\n\t\t\t\t$newPeg->moveTo($m[0], $m[1], $m[2]);\n\t\t\t}\n\t\t\t\n\t\t\t$pegs[] = clone $newPeg;\n\t\t}\n\t\t\n\t\treturn $pegs;\n\t}", "private function _checkFloors()\n\t {\n\t\tif (isset($this->floors) === true)\n\t\t {\n\t\t\t$from = $this->floors - 1;\n\t\t\t$to = $this->floors + 1;\n\n\t\t\tif ($this->_gis->floors !== null && isset($this->floors) === true)\n\t\t\t {\n\t\t\t\tif ($this->_gis->floors >= $from && $this->_gis->floors <= $to)\n\t\t\t\t {\n\t\t\t\t\treturn true;\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t {\n\t\t\t\t\treturn false;\n\t\t\t\t } //end if\n\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\treturn null;\n\t\t\t } //end if\n\n\t\t }\n\t\telse\n\t\t {\n\t\t\treturn null;\n\t\t } //end if\n\n\t }", "private function set_card_visibility(&$move, $mode) {\n\t\t$iLastFrom = count($move['from']) - 1;\n\t\tif($iLastFrom >= 0) {\n\t\t\t$move['from'][$iLastFrom]->display = true;\n\t\t\t$this->currentScore += 20;\n\t\t}\n\t\t\n\t\t// La carte parente de l'emplacement de destination n'est plus visible si mouvement inversé\n\t\t$iLastTo = count($move['to']) - 2;\n\t\tif($iLastTo >= 0 && $mode == 'reverse') {\n\t\t\t$move['to'][$iLastTo]->display = false;\n\t\t\t$this->currentScore -= 20;\n\t\t}\n\t}", "protected function get_visibility( ) {\n// if visibility is limited to an integer mile plus a fraction part.\n// Format is mmSM for mm = statute miles, or m n/dSM for m = mile and n/d = fraction of a mile,\n// or just a 4-digit number nnnn (with leading zeros) for nnnn = meters.\n\n static $integerMile = '';\n $this->wxInfo['ITEMS'][$this->tend]['CODE_HVISIBILITY'] = $this->current_group_text;\n if (strlen($this->current_group_text) == 1) { // visibility is limited to a whole mile plus a fraction part\n $integerMile = $this->current_group_text . ' ';\n $visibility_code = $this->current_group_text;\n $this->current_ptr++;\n }\n elseif (substr($this->current_group_text,-2) == 'SM') { // visibility is in miles\n $this->current_group_text = substr($this->current_group_text,0,strlen($this->current_group_text)-2);\n if (substr($this->current_group_text,0,1) == 'M') {\n//$prefix = 'less than ';\n $this->current_group_text = substr($this->current_group_text, 1);\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = -1;\n } else if (substr($this->current_group_text,0,1) == 'P') {\n//$prefix = 'plus than ';\n $this->current_group_text = substr($this->current_group_text, 1);\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 1;\n } else {\n//$prefix = '';\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 0;\n }\n if (($integerMile == '' && preg_match('#[/]#',$this->current_group_text,$pieces)) || $this->current_group_text == '1') $unit = ' mile';\n else $unit = ' miles';\n\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] = convertLength($this->current_group_text, 'Mile');\n $this->current_ptr++;\n $this->current_group++;\n }\n elseif (substr($this->current_group_text,-2) == 'KM') { // unknown (Reported by NFFN in Fiji)\n $this->current_ptr++;\n $this->current_group++;\n }\n elseif (preg_match('#^([0-9]{4})(NDV)?$#',$this->current_group_text,$pieces)) { // visibility is in meters\n if ($this->current_group_text == '9999') {\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] = convertLength(10000, 'Meter');\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 1;\n } else if ($this->current_group_text == '0000') {\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] = convertLength(50, 'Meter');\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = -1;\n } else {\n $distance = convertLength($this->current_group_text, 'Meter');\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] =$distance;\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 0;\n }\n $this->current_ptr++;\n $this->current_group++;\n }\n elseif ($this->current_group_text == 'CAVOK') { // good weather\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] = convertLength(10000, 'Meter');\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 1;\n//$this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = '';\n $this->wxInfo['ITEMS'][$this->tend]['CLOUDS'] = $this->get_i18nClouds('CLR');\n $this->wxInfo['ITEMS'][$this->tend]['CODE_HVISIBILITY'] = $this->current_group_text;\n $this->current_ptr++;\n $this->current_group++;\n if ($this->mode=='METAR') {\n $this->current_group += 3; // can skip the next 3 groups\n }\n }\n else {\n $this->wxInfo['ITEMS'][$this->tend]['CODE_HVISIBILITY'] = NULL;\n $this->current_group++;\n }\n }", "public static function find_move ()\n {\n // Initialize the default value functions. These apply starting values\n // to each position on the board. The starting values are then used\n // in calculating the overall value of moving in each direction.\n $my_color = Map::current('color');\n static::$_value_functions = [\n '^c.$' => config::SCORE_OTHER_BOTS,\n \"^.$my_color\\$\" => config::SCORE_OWN_COLOR,\n '^.*$' => config::SCORE_OTHER_COLOR,\n ];\n // Initialize a default value matrix.\n static::$_value_matrix = static::_generate_value_matrix();\n // Load the default available commands.\n $commands = config::VALID_MOVES;\n // Retrieve coordinates for available moves from the current map.\n // Any invalid moves will get set to null.\n $available_moves = [];\n foreach ($commands as $command) {\n $available_moves[$command] = Map::get(Map::translate($command, Map::current('x'), Map::current('y')));\n }\n // Remove invalid directions -- edges of map and any adjacent tiles\n // containing another bot (and, for now, the \"idle\" command too).\n unset($available_moves['idle']);\n $available_moves = array_filter($available_moves, function($move){\n if ( is_null($move) || substr($move, 0, 1) == 'c' ) {\n return false;\n }\n return true;\n });\n // For now, let's continue this helpful debugging output. TODO.\n print_r($available_moves);\n // Select a strategy.\n // If there is only one move (or no moves), fall back to the \"stuck\"\n // strategy. In the future this strategy might do something cool.\n if ( count($available_moves) < 2 ) {\n return static::stuck($available_moves);\n }\n // If the bot is surrounded by its own color and all moves have negative\n // values, try escaping.\n if ( count(preg_grep(\"/^.$my_color\\$/\", $available_moves)) == count($available_moves) ) {\n echo \"Yipes! Surrounded by own color...\\n\";\n $positive_scores = array_filter(static::evaluate_moves($available_moves), function($score){\n return $score > 0;\n });\n if ( count($positive_scores) == 0 ) {\n return static::escape($available_moves);\n }\n }\n // Now that urgent situations are resolved, look at nearby bots and\n // consider their behavior.\n $bots = Map::get_bots();\n $my_bot = $bots[Map::current('x') . '/' . Map::current('y')];\n foreach ($bots as $location => $bot) {\n if ( $bot->color != $my_color && Map::distance($bot->x, $bot->y, Map::current('x'), Map::current('y')) < 10 && $bot->status() != 'inactive' ) {\n echo \"Nearby active opponent: \" . $bot->name . \"\\n\";\n // Check their move history against this bot's move history;\n // if they share more than 5 moves out of the last 20...\n $my_moves = array_filter($my_bot->get_recent_moves(20));\n $their_moves = array_filter($bot->get_recent_moves(20));\n $my_overlap = array_intersect($my_moves, $their_moves);\n $their_overlap = array_intersect($their_moves, $my_moves);\n // ...then try to figure out who's following who, and if the\n // other bot is following this bot, then switch to the \"punish\"\n // strategy.\n if ( count($their_overlap) > 5 && array_sum(array_keys($my_overlap)) > array_sum(array_keys($their_overlap)) ) {\n // If this bot's matching movement indices are generally\n // higher than the other bot's, then that means they've made\n // matching moves more recently, so the other bot can be\n // assumed to be following this one.\n return static::punish($available_moves, $bot);\n }\n }\n }\n // If more than 20% of the tiles on the map are unclaimed, then select\n // a friendlier, less aggressive movement pattern.\n if ( Map::count('ux') > array_product(Map::size()) * .2 ) {\n return static::cruise($available_moves);\n }\n // Default strategy: best local move.\n return static::aggressive($available_moves);\n }", "function match_check_image($path, $count, $pics, $maps)\r\n{\r\n\tglobal $root_path;\r\n\t\r\n\t$check = '';\r\n\t\r\n\tfor ( $i = 0; $i < $count; $i++ )\r\n\t{\r\n\t\tforeach ( $pics as $key => $pic )\r\n\t\t{\r\n\t\t\tif ( $pic == $maps[$i]['map_picture'] )\r\n\t\t\t{\r\n\t\t\t\t$check['in']['picture'][] = ( file_exists($path . '/' . $maps[$i]['map_picture']) ) ? $maps[$i]['map_picture'] : 'nicht vorhanden';\r\n\t\t\t\tunset($pics[$key]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( $pic == $maps[$i]['map_preview'] )\r\n\t\t\t{\r\n\t\t\t\t$check['in']['preview'][] = ( file_exists($path . '/' . $maps[$i]['map_preview']) ) ? $maps[$i]['map_preview'] : 'nicht vorhanden';\r\n\t\t\t\tunset($pics[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tif ( $pics )\r\n\t{\r\n\t\tforeach ( $pics as $pic )\r\n\t\t{\r\n\t\t\t$check['out'][] = $pic;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $check;\r\n}", "function getMovesForMatch ()\r\n{\r\n\t//array of chess moves assuming a few things:\r\n\t/* \t- light/dark take turns \r\n\t\t- the moves are set up to take a piece and move it to another,\r\n\t\t\tso moving pawn e2 -> e4 would be stored as the first 2 elements in a multidimensional array.\r\n\t\t- there are many things that would need to be done to support algebraic chess notation, \r\n\t\t\tI didn't go into that here.\t\t\r\n\t\t\r\n\t*/\r\n\t$matchMoves = array();\r\n\t\r\n\t/*\r\n\t$matchMoves [0]['from'] = \"e2\";\r\n\t$matchMoves [0]['to'] \t= \"e4\";\r\n\t$matchMoves [1]['from'] = \"c7\";\r\n\t$matchMoves [1]['to']\t= \"c5\";\r\n\t\r\n\t$matchMoves [2]['from'] = \"g1\";\r\n\t$matchMoves\t[2]['to']\t= \"f3\";\r\n\t$matchMoves [3]['from'] = \"b8\";\r\n\t$matchMoves [3]['to']\t= \"c6\";\r\n\t\r\n\t//begin invalid off board examples\r\n\t$matchMoves [4]['from'] = \"c6\";\r\n\t$matchMoves [4]['to'] \t= \"c9\";\r\n\t\r\n\t$matchMoves [5]['from'] = \"c6\";\r\n\t$matchMoves [5]['to'] \t= \"c0\";\r\n\t\r\n\t$matchMoves [6]['from'] = \"c6\";\r\n\t$matchMoves [6]['to'] \t= \"z9\";\r\n\t*/\r\n\t//begin invalid examples for particular pieces\r\n\t\r\n\t//king =======================\r\n\t//bad move\r\n\t$matchMoves [7]['from'] = \"e8\";\r\n\t$matchMoves [7]['to'] \t= \"g7\";\r\n\t\r\n\t//bad move because pieces are in the way\r\n\t$matchMoves [8]['from'] = \"e8\";\r\n\t$matchMoves [8]['to'] \t= \"f7\";\r\n\t\r\n\t//rook =========================\r\n\t//bad move\r\n\t$matchMoves [9]['from'] = \"h8\";\r\n\t$matchMoves [9]['to'] \t= \"h5\";\r\n\t\r\n\t//move pawn first\r\n\t$matchMoves [10]['from'] = \"h7\";\r\n\t$matchMoves [10]['to'] \t = \"h6\";\t\r\n\t$matchMoves [11]['from'] = \"h6\";\r\n\t$matchMoves [11]['to'] \t = \"h5\";\r\n\t$matchMoves [12]['from'] = \"h5\";\r\n\t$matchMoves [12]['to'] \t = \"h4\";\r\n\t$matchMoves [13]['from'] = \"h8\";\r\n\t$matchMoves [13]['to'] \t = \"h5\";\r\n\t\r\n\t//bishop ========================\r\n\t//bad move\r\n\t$matchMoves [14]['from'] \t= \"c8\";\r\n\t$matchMoves [14]['to'] \t\t= \"b8\";\r\n\t\r\n\t//bad move because pieces are in the way\r\n\t$matchMoves [15]['from'] \t= \"c8\";\r\n\t$matchMoves [15]['to'] \t\t= \"c7\";\r\n\t\r\n\t//move pawn first\r\n\t$matchMoves [16]['from'] \t= \"b7\";\r\n\t$matchMoves [16]['to'] \t\t= \"b6\";\r\n\t$matchMoves [17]['from'] \t= \"c8\";\r\n\t$matchMoves [17]['to'] \t\t= \"a6\";\r\n\t\r\n\t//queen ==========================\r\n\t$matchMoves [18]['from'] \t= \"d8\";\r\n\t$matchMoves [18]['to'] \t\t= \"c8\";\r\n\t\r\n\t\t\r\n\t//setting up a check for between functions - rook\r\n\t$matchMoves [19]['from'] \t= \"f2\";\r\n\t$matchMoves [19]['to'] \t\t= \"f3\";\r\n\t$matchMoves [20]['from'] \t= \"f3\";\r\n\t$matchMoves [20]['to'] \t\t= \"f4\";\r\n\t$matchMoves [21]['from'] \t= \"f4\";\r\n\t$matchMoves [21]['to'] \t\t= \"f5\";\r\n\t\r\n\t$matchMoves [22]['from'] \t= \"h5\";\r\n\t$matchMoves [22]['to'] \t\t= \"e5\";\r\n\t\r\n\t//demonstrating capture move a pawn to capture\r\n\t$matchMoves [23]['from'] \t= \"f7\";\r\n\t$matchMoves [23]['to'] \t\t= \"f6\";\r\n\t$matchMoves [24]['from'] \t= \"g7\";\r\n\t$matchMoves [24]['to'] \t\t= \"g6\";\r\n\t$matchMoves [25]['from'] \t= \"f5\";\r\n\t$matchMoves [25]['to'] \t\t= \"g6\";\r\n\t\r\n\r\n\treturn ($matchMoves);\r\n}", "public function calculaMovimientos($insumos){\n\n\t\t$movimientos = [];\n\t\t$groups = [];\n\n\t\t//Calcula los lotes de los insumos a realizar movimientos utilizando el metodo fefo,\n\t\t//Si este posee lotes en los registros y su lote no ha sido especificado.\n\t\tforeach ($insumos as $insumo) {\n\n\t\t\tif( array_search($insumo['id'], array_column($movimientos, 'id')) !== false )\n\t\t\t\tcontinue;\n\n\t\t\tif( $this->hasLote($insumo) ){\n\n\t\t\t\t$insumoMovimientos = array_filter($insumos, function($element) use ($insumo){\n\t\t\t\t\treturn $element['id'] == $insumo['id'];\n\t\t\t\t});\n\n\t\t\t\tif( !empty($this->filterInsumosLote($insumoMovimientos, false)) ){\n\t\t\t\t\t$insumoMovimientos = $this->fefo($insumo['id'], $insumoMovimientos);\n\t\t\t\t}\n\n\t\t\t\t$movimientos = array_merge($movimientos, $insumoMovimientos);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarray_push($movimientos, $insumo);\n\t\t\t}\n\t\t}\n\n\t\t//Agrupa los lotes de los movimientos de insumos.\n\t\tforeach ($movimientos as $movimiento){\n\n\t\t\tif(isset($movimiento['lote']) && !empty($movimiento['lote'])){\n\n\t\t\t\t$calculado = array_filter($groups, function($element) use ($movimiento){\n\t \t\t\t\treturn $element['id'] == $movimiento['id'] && $element['lote'] == $movimiento['lote'];\n\t\t\t\t});\n\n\t\t\t\tif( !empty($calculado) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$lotes = array_filter($movimientos, function($element) use ($movimiento){\n\t \t\t\t\treturn $element['id'] == $movimiento['id'] && $element['lote'] == $movimiento['lote'];\n\t\t\t\t});\n\n\t\t\t\t$despachado = 0;\n\t\t\t\t$solicitado = 0;\n\n\t\t\t\tforeach ($lotes as $lote) {\n\t\t\t\t\t$despachado += $lote['despachado'];\n\t\t\t\t\t$solicitado += $lote['solicitado'];\n\t\t\t\t}\n\n\t\t\t\t$movimiento['despachado'] = $despachado;\n\t\t\t\t$movimiento['solicitado'] = $solicitado;\n\t\t\t}\n\n\t\t\tarray_push($groups, $movimiento);\n\t\t}\n\n\t\t//Devuelve un arreglo con todos los movimientos de insumos a realizar\n\t\t//con lotes espeficicados y cantidades. Nota: Si no pose lote un movimiento de insumo en el arreglo\n\t\t//sera debido a que no posee lotes en los registros de lotes.\n\t\treturn $groups;\n\t}", "protected function determineGalleryPosition() {}", "public function setOnBoardImgs(){\n $onBoardImgs=\"\";\n $onBoardImgs.=$this->getMarkerTag($this->filePathFocus,$this->markerImage,$this->markerAt);\n if(!empty($this->sOnBoard)){\n $komas=explode(\",\",$this->sOnBoard);\n foreach($komas as $koma){$onBoardImgs.=$this->getImageTag($koma,\"S\",$this->filePathKoma);}\n }\n\n if(!empty($this->gOnBoard)){\n $komas=explode(\",\",$this->gOnBoard);\n foreach($komas as $koma){$onBoardImgs.=$this->getImageTag($koma,\"G\",$this->filePathKoma);}\n }\n return $onBoardImgs;\n }", "protected function AIMove() {\n $botMove = $this->botMove();\n echo \"Computer's move is '\" . $this->_botMark . \"' at box \" . $botMove . PHP_EOL;\n $this->_markers[$this->_botMark][] = $botMove;\n $this->drawBoard($this->_markers);\n if ($this->isWon($this->_botMark) || $this->isBoardFull())\n return true;\n return false;\n }", "public function getNumberOfContours() {}", "private function getMovePosition(Board $board)\r\n {\r\n $position = null;\r\n\r\n// todo\r\n for($i=0;$i<Board::ROWS;$i++)\r\n {\r\n if(!($board->hasPieceAtPosition($i, 0)) && $board->getPieceAtPosition($i, 1)==self::PIECE && $board->getPieceAtPosition($i, 2)== self::PIECE)\r\n {\r\n $position=[$i,0];\r\n }\r\n else if(!($board->hasPieceAtPosition($i, 1)) && $board->getPieceAtPosition($i, 0)==self::PIECE && $board->getPieceAtPosition($i, 2)== self::PIECE)\r\n {\r\n $position=[$i,1];\r\n }\r\n else if(!($board->hasPieceAtPosition($i, 2)) && $board->getPieceAtPosition($i, 0)==self::PIECE && $board->getPieceAtPosition($i, 1)== self::PIECE)\r\n {\r\n $position=[$i,2];\r\n }\r\n }\r\n for($j=0;$j<Board::COLUMNS;$j++)\r\n {\r\n if(!($board->hasPieceAtPosition(0, $j)) && $board->getPieceAtPosition(1, $j)==self::PIECE && $board->getPieceAtPosition(2, $j)== self::PIECE)\r\n {\r\n $position=[0,$j];\r\n }\r\n else if(!($board->hasPieceAtPosition(1, $j)) && $board->getPieceAtPosition(0, $j)==self::PIECE && $board->getPieceAtPosition(2, $j)== self::PIECE)\r\n {\r\n $position=[1,$j];\r\n }\r\n else if(!($board->hasPieceAtPosition(2, $j)) && $board->getPieceAtPosition(0, $j)==self::PIECE && $board->getPieceAtPosition(1, $j)== self::PIECE)\r\n {\r\n $position=[2,$j];\r\n }\r\n }\r\n if($board->getPieceAtPosition(1, 1)==self::PIECE)\r\n {\r\n if(!($board->hasPieceAtPosition(0, 0)) && $board->getPieceAtPosition(2, 2)==self::PIECE)\r\n {\r\n $position = [0,0];\r\n }\r\n else if(!($board->hasPieceAtPosition(2, 2)) && $board->getPieceAtPosition(0, 0)==self::PIECE)\r\n {\r\n $position = [2,2];\r\n }\r\n else if(!($board->hasPieceAtPosition(0, 2)) && $board->getPieceAtPosition(2, 0)==self::PIECE)\r\n {\r\n $position = [0,2];\r\n }\r\n else if(!($board->hasPieceAtPosition(2, 0)) && $board->getPieceAtPosition(0, 2)==self::PIECE)\r\n {\r\n $position = [2,0];\r\n }\r\n }\r\n\r\n# 2. Or place a piece that prevents the player from winning. \r\n if(is_null($position))\r\n {\r\n for($i=0;$i<Board::ROWS;$i++)\r\n {\r\n if(!($board->hasPieceAtPosition($i, 0)) && ($board->getPieceAtPosition($i, 1)==self::BADPIECE) && ($board->getPieceAtPosition($i, 2)== self::BADPIECE))\r\n {\r\n $position=[$i,0];\r\n }\r\n else if(!($board->hasPieceAtPosition($i, 1)) && ($board->getPieceAtPosition($i, 0)==self::BADPIECE) && ($board->getPieceAtPosition($i, 2)== self::BADPIECE))\r\n {\r\n $position=[$i,1];\r\n }\r\n else if(!($board->hasPieceAtPosition($i, 2)) && ($board->getPieceAtPosition($i, 0)==self::BADPIECE) && ($board->getPieceAtPosition($i, 1)== self::BADPIECE))\r\n {\r\n $position=[$i,2];\r\n }\r\n }\r\n for($j=0;$j<Board::COLUMNS;$j++)\r\n {\r\n if(!($board->hasPieceAtPosition(0, $j)) && ($board->getPieceAtPosition(1, $j)==self::BADPIECE) && ($board->getPieceAtPosition(2, $j)== self::BADPIECE))\r\n {\r\n $position=[0,$j];\r\n }\r\n else if(!($board->hasPieceAtPosition(1, $j)) && ($board->getPieceAtPosition(0, $j)==self::BADPIECE) && ($board->getPieceAtPosition(2, $j)== self::BADPIECE))\r\n {\r\n $position=[1,$j];\r\n }\r\n else if(!($board->hasPieceAtPosition(2, $j)) && ($board->getPieceAtPosition(0, $j)==self::BADPIECE) && ($board->getPieceAtPosition(1, $j))== self::BADPIECE)\r\n {\r\n $position=[2,$j];\r\n }\r\n }\r\n\r\n if($board->getPieceAtPosition(1, 1)==self::BADPIECE)\r\n {\r\n if(!($board->hasPieceAtPosition(0, 0)) && $board->getPieceAtPosition(2, 2)==self::BADPIECE)\r\n {\r\n $position = [0,0];\r\n }\r\n else if(!($board->hasPieceAtPosition(2, 2)) && $board->getPieceAtPosition(0, 0)==self::BADPIECE)\r\n {\r\n $position = [2,2];\r\n }\r\n else if(!($board->hasPieceAtPosition(0, 2)) && $board->getPieceAtPosition(2, 0)==self::BADPIECE)\r\n {\r\n $position = [0,2];\r\n }\r\n else if(!($board->hasPieceAtPosition(2, 0)) && $board->getPieceAtPosition(0, 2)==self::BADPIECE)\r\n {\r\n $position = [2,0];\r\n }\r\n }\r\n }\r\n\r\n if(is_null($position))\r\n {\r\n $blankpositions=$board->getBlankPositions();\r\n $numberpositions = count($board->getBlankPositions());\r\n $chooseposition = rand(1,$numberpositions);\r\n $position = $blankpositions[$chooseposition - 1];\r\n }\r\n\r\n return $position;\r\n }", "public function testFindDestination() {\n\t\t$this->assertEquals(TEMP_DIR . '/scott-pilgrim.jpg', $this->object->findDestination('scott-pilgrim.jpg', true));\n\t\t$this->assertEquals(TEMP_DIR . '/scott-pilgrim-1.jpg', $this->object->findDestination(new File($this->baseFile), false));\n\t}", "private function _getResult(){\r\n\r\n $position = $this->_startPoint;\r\n $tile = $this->_getTile($position);\r\n $path[] = $position;\r\n\r\n while(!$this->_checkEnd($position)){\r\n $direction= $tile->getLastMove();\r\n $position = $this->_getNewPosition($position,$direction);\r\n $tile = $this->_getTile($position);\r\n $path[] = $position;\r\n }\r\n\r\n return $path;\r\n }", "function getNextAction($myPositionX, $myPositionY, $game, $map, $bombs, $opponents, $bonuses, $allObstacles, $allActions, $logger, $directionToAvoid = null)\n{\n\t$thereIsABomb = false;\n\t$coordinatesInfo = getCoordinatesInfo($myPositionX, $myPositionY, $game, $map, $bombs, $opponents, $bonuses);\n\t$typeOfObstacle = $coordinatesInfo[\"typeOfObstacle\"];\n\t$moveAvailable = $coordinatesInfo[\"moveAvailable\"];\n\n\tif(in_array($allObstacles[\"bomb\"], $typeOfObstacle) || $game->state->findActiveBombAt($myPositionX, $myPositionY)) //bomb discovered\n\t{\n\t\t$action = runFromBomb($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $game, $logger);\n\t\t$thereIsABomb = true;\n\t}\n\telseif(in_array($allObstacles[\"opponent\"], $typeOfObstacle)) //opponent discovered \n\t{\n\t\t$action = huntOpponent($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger);\n\t}\n\telseif(in_array($allObstacles[\"destroyable_block\"], $typeOfObstacle)) //destroyable block discovered\n\t{\n\t\t$action = destroyBlock($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger, $directionToAvoid);\n\t}\n\telse{ //just free path\n\t\t$action = runRandom($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger);\n\t}\n\n\treturn [\n\t\t'action' => $action,\n\t\t'thereIsABomb' => $thereIsABomb,\n\t\t'typeOfObstacle' => $typeOfObstacle,\n\t\t'moveAvailable' => $moveAvailable\n\t];\n}", "function checkFileExists( $getSize, $getFilename ){\r\n global $imgPath,$newDir,$filesMoved,$filesMovedTotal,$table;\r\n\r\n switch($getSize){\r\n\t\tcase \"highres\":\r\n\t\t\t$imgPathLive = 'https://www.classicandsportscar.ltd.uk/images_catalogue/large/'.$getFilename;\r\n\t\t\t$imgPathFrom = $imgPath.'highres/'.$getFilename;\r\n\t\t\t$imgPathTo = $newDir.'/hi/'.$getFilename;\r\n\t\t\tbreak;\r\n\t\tcase \"large\":\r\n\t\t\t$imgPathLive = 'https://www.classicandsportscar.ltd.uk/images_catalogue/large/'.$getFilename;\r\n\t\t\t$imgPathFrom = $imgPath.'large/'.$getFilename;\r\n\t\t\t$imgPathTo = $newDir.'/lg/'.$getFilename;\r\n\t\t\tbreak;\r\n case \"thumb\":\r\n $imgPathLive = 'https://www.classicandsportscar.ltd.uk/images_catalogue/thumbs/'.$getFilename;\r\n $imgPathFrom = $imgPath.'thumbs/'.$getFilename;\r\n $imgPathTo = $newDir.'/th/'.$getFilename;\r\n break;\t\t\r\n default:\r\n $imgPathLive = 'https://www.classicandsportscar.ltd.uk/images_catalogue/'.$getFilename;\r\n $imgPathFrom = $imgPath.$getFilename;\r\n $imgPathTo = $newDir.'/pr/'.$getFilename;\r\n }\r\n\r\n if(file_exists( $imgPathFrom )){\r\n $table .= '<span class=\"info\">moving...'.$imgPathTo.'</span>';\r\n if(rename($imgPathFrom, $imgPathTo)) $filesMoved ++;$filesMovedTotal ++;\r\n }else{\r\n if(file_exists( $imgPathTo )){\r\n $filesMoved ++;\r\n $filesMovedTotal ++;\r\n $table .= '<span class=\"good\">['.$getSize.'] file already moved</span>';\r\n }else{\r\n $table .= '<img src=\"'.$imgPathLive.'\" class=\"'.$getSize.'\">';\r\n $table .= '<span class=\"error\">['.$getSize.'] cannot find file</span>';\r\n }\r\n }\r\n}", "protected function collectTcaSpriteIcons() {}", "public function getCampeonatosInProgress()\n {\n $stmt = $this->db->query(\"SELECT * FROM campeonato where fechaInicioCampeonato < curdate()\");\n $toret_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n $championships = array();\n \n foreach ($toret_db as $championship) {\n array_push($championships, new Championship($championship[\"idCampeonato\"], $championship[\"fechaInicioInscripcion\"], $championship[\"fechaFinInscripcion\"], $championship[\"fechaInicioCampeonato\"], $championship[\"fechaFinCampeonato\"], $championship[\"nombreCampeonato\"]));\n }\n return $championships;\n }", "function genere_list_smileys($repert) {\n\t$listimag=array();\n\t$listfich=opendir($repert);\n\twhile ($fich=@readdir($listfich)) {\n\t\tif(($fich !='..') and ($fich !='.') and ($fich !='.test') and ($fich !='.svn')) {\n\t\t\t$nomfich=substr($fich,0,strrpos($fich, \".\"));\n\t\t\t$listimag[$nomfich]=$repert.$fich;\n\t\t}\n\t}\n\tksort($listimag);\n\treset($listimag);\n\treturn $listimag;\n}", "public function getMaxCompositeContours() {}", "function ultimos_cliparts($limit,$registrado) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\t$query = \"SELECT \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,imagenes.ultima_modificacion,\n\t\tpalabra_imagen.*, palabras.*, tipos_imagen.*\n\t\tFROM imagenes, palabra_imagen, palabras, tipos_imagen\n\t\tWHERE imagenes.estado=1 \n\t\tAND imagenes.id_imagen=palabra_imagen.id_imagen\n\t\tAND palabra_imagen.id_palabra=palabras.id_palabra \n\t\tAND imagenes.id_tipo_imagen=tipos_imagen.id_tipo\n\t\tAND imagenes.id_tipo_imagen=9\n\t\t$mostrar_registradas\n\t\tORDER BY imagenes.ultima_modificacion desc LIMIT 0,$limit\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function frameImage($inside = 0, $imagesPath = array(), $imgHeight = 600, $imagesWidth = array(), $imagesAngles = array(), $poleColor = null, $poleWidth = 1, $poleHeight = 1)\n{ \n $rowImagick = new Imagick();\n \n foreach($imagesPath as $imgIndex => $imgPath) {\n $imagick = new Imagick(realpath($imgPath));\n\n $imagick->getImageGeometry();\n $imgGeo = $imagick->getImageGeometry();\n $imgOrgWidth = $imgGeo['width'];\n $imgOrgHeight = $imgGeo['height'];\n $imgWidth = $imagesWidth[$imgIndex];\n\n if(isset($imagesAngles[$imgIndex])) {\n $angleX = ($imagesAngles[$imgIndex]) == 90 ? - ($imagesAngles[$imgIndex] - 10) : - $imagesAngles[$imgIndex];\n } else {\n $angleX = -100;\n }\n $angleY = 0;\n $thetX = deg2rad ($angleX);\n $thetY = deg2rad ($angleY);\n\n $s_x1y1 = array(0, 0); // LEFT BOTTOM\n $s_x2y1 = array($imgWidth, 0); // RIGHT BOTTOM\n $s_x1y2 = array(0, $imgHeight); // LEFT TOP\n $s_x2y2 = array($imgWidth, $imgHeight); // RIGHT TOP\n\n $d_x1y1 = array(\n $s_x1y1[0] * cos($thetX) - $s_x1y1[1] * sin($thetY),\n $s_x1y1[0] * sin($thetX) + $s_x1y1[1] * cos($thetY)\n );\n $d_x2y1 = array(\n $s_x2y1[0] * cos($thetX) - $s_x2y1[1] * sin($thetY),\n $s_x2y1[0] * sin($thetX) + $s_x2y1[1] * cos($thetY)\n );\n $d_x1y2 = array(\n $s_x1y2[0] * cos($thetX) - $s_x1y2[1] * sin($thetY),\n $s_x1y2[0] * sin($thetX) + $s_x1y2[1] * cos($thetY)\n );\n $d_x2y2 = array(\n $s_x2y2[0] * cos($thetX) - $s_x2y2[1] * sin($thetY),\n $s_x2y2[0] * sin($thetX) + $s_x2y2[1] * cos($thetY)\n );\n\n $imageprops = $imagick->getImageGeometry();\n $imagick->setImageBackgroundColor(new ImagickPixel('transparent'));\n $imagick->resizeimage($imgWidth, $imgHeight, \\Imagick::FILTER_LANCZOS, 0, true); \n if($poleColor) {\n $imagick->borderImage($poleColor, $poleWidth, $poleHeight);\n }\n\n $points = array(\n $s_x1y2[0], $s_x1y2[1], # Source Top Left\n $d_x1y2[0], $d_x1y2[1], # Destination Top Left\n $s_x1y1[0], $s_x1y1[1], # Source Bottom Left \n $d_x1y1[0], $d_x1y1[1], # Destination Bottom Left \n $s_x2y1[0], $s_x2y1[1], # Source Bottom Right \n $d_x2y1[0], $d_x2y1[1], # Destination Bottom Right \n $s_x2y2[0], $s_x2y2[1], # Source Top Right \n $d_x2y2[0], $d_x2y2[1] # Destination Top Right \n );\n //echo '<pre>'; print_r($points); die;\n\n $imagick->setImageVirtualPixelMethod(\\Imagick::VIRTUALPIXELMETHOD_BACKGROUND);\n $imagick->distortImage(\\Imagick::DISTORTION_PERSPECTIVE, $points, true);\n //$imagick->scaleImage($imgWidth, $imgHeight, false);\n $rowImagick->addImage($imagick); \n }\n\n $rowImagick->resetIterator();\n $combinedRow = $rowImagick->appendImages(false);\n\n $canvas = generateFinalImage($combinedRow);\n header(\"Content-Type: image/png\");\n echo $canvas->getImageBlob();\n}", "public function generatePossibleMoves(){\r\n\t\t\t$this->possibleMoves = array();\r\n\t\t\t// Iterates through all the possible moves\r\n\t\t\tfor ($currCol = 0; $currCol < 10; $currCol++){\r\n\t\t\t\tfor ($currRow = 0; $currRow < 10; $currRow++){\r\n\t\t\t\t\t$this->possibleMoves[($currRow * 10) + $currCol] = new Shot($currRow+1, $currCol+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function listar_originales_limit_para_generador($inicial,$cantidad,$id_tipo_simbolo) {\n\t\t\t\n\t\tif ($id_tipo_simbolo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND imagenes.id_tipo_imagen='.$id_tipo_simbolo.''; }\n\t\t\t\n\t\t$query = \"SELECT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.*\n\t\tFROM palabra_imagen, imagenes, palabras\n\t\tWHERE imagenes.estado=1\n\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n\t\t$sql_tipo\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\tORDER BY palabra_imagen.id_imagen asc\n\t\tLIMIT $inicial,$cantidad\";\n\t\t\n\t\t//$query = \"SELECT palabra_imagen.*, imagenes.*, palabras.*\n//\t\tFROM palabra_imagen, imagenes, palabras\n//\t\tWHERE imagenes.estado=1\n//\t\tAND palabra_imagen.id_palabra=8762\n//\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n//\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "private function findImagePositions($columns) {\n $normalizedColumns = [];\n foreach ($columns as $columnKey => $column) {\n $y = 0;\n foreach ($column as $imageKey => $image) {\n $x = $columnKey > 0 ? $this->getColumnWidthAt($normalizedColumns[$columnKey - 1], $y) : 0;\n $normalizedColumns[$columnKey][$imageKey] = [\n 'top' => new Point($x, $y),\n 'bottom' => new Point($x + $image->getSize()->getWidth(), $y + $image->getSize()->getHeight()),\n 'image' => $image\n ];\n $y += $image->getSize()->getHeight();\n }\n }\n\n return $normalizedColumns;\n }", "public function getSmiles() {\n\t\treturn $this->smiles;\n\t}", "function filets_sep_installe_dist() {\n//cs_log('filets_sep_installe_dist()');\n\tinclude_spip('inc/texte');\n\t// Tester si on echappe en span ou en div\n\t$mode = preg_match(',<('._BALISES_BLOCS.'|p)(\\W|$),iS', _FILETS_SEP_BALISE_DEBUT)?'div':'span';\n\t$bt = defined('_DIR_PLUGIN_PORTE_PLUME');\n\t$filets = array();\n\t// filets numeriques\n\tfor($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++) {\n\t\t$filets[6][] = $i;\n\t\t$filets[1][\"$i\"] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT.\" class='filet_sep filet_sep_$i'\"._FILETS_SEP_BALISE_FIN, '', $mode);\n\t}\n\t// filets image\t\n\t$path = find_in_path('img/filets');\n\t$dossier = opendir($path);\n\tif($path) while ($image = readdir($dossier)) {\n\t\tif (preg_match(',^(([a-z0-9_-]+)'._FILETS_REG_EXT.'),', $image, $reg)) {\n\t\t\t$filets[0][] = '__'.$reg[1].'__';\n\t\t\t$filets[6][] = preg_quote($reg[1]);\n\t\t\t$filets[2][] = $reg[2];\n\t\t\tlist(,$haut) = @getimagesize($path.'/'.$reg[1]);\n\t\t\tif ($haut) $haut=\"height:{$haut}px;\";\n\t\t\t$f = url_absolue($path).'/'.$reg[1];\n\t\t\t$filets[1][$reg[1]] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT.\" class=\\\"filet_sep filet_sep_image\\\" style=\\\"$haut background-image: url($f);\\\"\"._FILETS_SEP_BALISE_FIN, '', $mode);\n\t\t\tif($bt)\n\t\t\t\t$filets[4]['filet_'.str_replace('.','_',$reg[1])] = $reg[1];\n\t\t}\n\t}\n\t// RegExpr finale\n\t$filets[6] = _FILETS_REG_DEBUT . join('|', $filets[6]) . _FILETS_REG_FIN;\n\tif($bt) for($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++)\n\t\t$filets[5]['filet_'.$i] = $i;\n\treturn array($filets);\n}", "function remote_file_exists($source, $extra_mile = 0) {# # EXTRA MILE = 1////////////////////////////////// Is it an image?\n if ($extra_mile === 1) {\n $img = @getimagesize($source);\n if (!$img)\n return 0;\n else {\n switch ($img[2]) {\n case 0: return 0;\n break;\n case 1:return $source;\n break;\n case 2:return $source;\n break;\n case 3:return $source;\n break;\n case 6:return $source;\n break;\n default:return 0;\n break;\n }\n }\n } else {\n if (@FClose(@FOpen($source, 'r')))\n return 1;\n else\n return 0;\n }\n }", "static public function enumerate_plugins() {\n $dir = dirname(__FILE__).'/dimension';\n\n $listoffiles = scandir($dir);\n foreach ($listoffiles as $index => $entry) {\n if ($entry == '.' || $entry == '..' || substr($entry, -4) != '.php' || $entry == 'dimension_interface.php') {\n unset($listoffiles[$index]);\n }\n }\n\n return $listoffiles;\n }", "public function findPath(){\r\n\r\n $position = $this->_startPoint;\r\n $tile = $this->_getTile($position);\r\n\r\n while(!$this->_checkEnd($position)){\r\n $direction = $tile->move();\r\n $position = $this->_getNewPosition($position,$direction);\r\n $newTile = $this->_getTile($position);\r\n $newTile->enter($direction);\r\n $tile = $newTile;\r\n }\r\n\r\n return $this->_getResult();\r\n }", "public function get_potential_movies_to_update($source)\n {\n $potential_movies = array();\n\n // Utilisation des noms de dossiers comme titre de films ?\n if ($source->settings->user_folder_name)\n {\n echo 'par dossier';\n }\n else\n {\n // Chargement des modèles de la base de données 'xbmc_video'\n $this->_CI->load->model('video/files_model');\n\n // Liste des fichiers correspondants au dossier\n $files_in_db = $this->_CI->files_model->get_all_by_path_id($source->idPath);\n\n // Tri des fichiers nécessaires pour gérer les films en plusieurs parties\n $handle = opendir($source->server_path);\n while (false !== ($file = readdir($handle)))\n {\n $extension = pathinfo($file, PATHINFO_EXTENSION);\n\n // On ne conserve que les fichiers correspondants à des vidéos\n if (in_array($extension, $this->video_extensions))\n {\n $files[] = $file;\n }\n }\n closedir($handle);\n sort($files);\n\n // Par défaut, on n'est pas en train d'empiler les parties d'un film\n $stacking = FALSE;\n $stack = array();\n\n // Tant que le tableau de fichiers n'est pas vide.\n while(!empty($files))\n {\n // On prend un fichier que l'on va traiter\n $file = array_shift($files);\n\n foreach($files_in_db as $file_in_db)\n {\n // Le fichier fait-il partie d'un empilement ou est déjà dans la base ?\n if (strpos($file_in_db, $file) !== false)\n {\n // Oui donc on repart dans le while et on prend un autre fichier\n continue 2;\n }\n }\n\n // Si le fichier n'est pas présent dans la base alors on le traite\n $potential_movie = new stdClass();\n\n // Valeur par défaut\n $potential_movie->nfo = '';\n $potential_movie->poster = '';\n $potential_movie->backdrop = '';\n\n $potential_movie->source = $source;\n\n // Titre basé sur le nom du fichier\n $potential_title = pathinfo($file, PATHINFO_FILENAME);\n\n // Si on n'est pas en train d'empiler les parties d'un film\n if (!$stacking)\n {\n // Masque pour identifier des films en plusieurs fichiers\n foreach($this->movie_stacking as $movie_stacking)\n {\n // Film en plusieurs parties ?\n if (preg_match('#'.$movie_stacking.'#i', $file, $matches))\n {\n // On cherche les autres parties\n $others = $matches[1].'*'.$matches[4];\n $parts = glob($source->server_path.$others);\n\n // Plusieurs parties de film ? Ce n'est donc pas une erreur\n if (count($parts) > 1)\n {\n/*\n$matches\nArray\n(\n[0] => Avatar-cd1.avi\n[1] => Avatar\n[2] => -cd1\n[3] =>\n[4] => .avi\n)\n*/\n // On empile les parties d'un film\n $stacking = TRUE;\n\n // Titre basé sur le nom du fichier de la première partie\n $potential_title = $matches[1];\n\n // Présence d'un fichier 'Avatar-cd1.nfo' ?\n if (file_exists($source->server_path.$matches[1].$matches[2].'.nfo'))\n {\n $potential_movie->nfo = $matches[1].$matches[2].'.nfo';\n }\n\n // Présence d'un fichier 'Avatar.nfo' ?\n if (file_exists($source->server_path.$matches[1].'.nfo'))\n {\n $potential_movie->nfo = $matches[1].'.nfo';\n }\n\n // Présence d'un fichier 'Avatar-cd1.tbn' ?\n if (file_exists($source->server_path.$matches[1].$matches[2].'.tbn'))\n {\n $potential_movie->poster = $matches[1].$matches[2].'.tbn';\n }\n\n // Présence d'un fichier 'Avatar.tbn' ?\n if (file_exists($source->server_path.$matches[1].'.tbn'))\n {\n $potential_movie->poster = $matches[1].'.tbn';\n }\n\n // Suppression du chemin dans les fichiers de parties\n foreach($parts as $key => $value)\n {\n $parts[$key] = str_replace($source->server_path, '', $value);\n }\n }\n else\n {\n // C'est une erreur, on n'empile pas les parties d'un film\n $stacking = FALSE;\n }\n\n break;\n }\n }\n\n // Pas de parties de film\n if (!$stacking)\n {\n // Présence d'un fichier '$potential_title.nfo' ?\n if (file_exists($source->server_path.$potential_title.'.nfo'))\n {\n $potential_movie->nfo = $potential_title.'.nfo';\n }\n\n // Présence d'un fichier '$potential_title.tbn' ?\n if (file_exists($source->server_path.$potential_title.'.tbn'))\n {\n $potential_movie->poster = $potential_title.'.tbn';\n }\n }\n }\n\n // On nettoie le nom du fichier\n foreach($this->clean_strings as $clean_string)\n {\n $potential_title = preg_replace('/'.$clean_string.'/i', '', $potential_title);\n }\n\n // On cherche une date éventuelle\n preg_match('#'.$this->clean_date_time.'#', $potential_title, $matches);\n\n $potential_movie->year = '';\n if (isset($matches[2]))\n {\n $potential_movie->year = $matches[2];\n\n // On nettoie le nom du fichier pour en retirer la date\n $potential_title = $matches[1];\n\n // Cas de 1984 ou 2012\n if ($potential_title == '') $potential_movie->title = $matches[2];\n }\n\n // Dernière modification sur le nom de fichier et on a un titre\n $potential_movie->title = trim(str_replace('.', ' ', $potential_title));\n\n // On vérifie si une année est entre paranthèses\n if (preg_match(\"#(.*)\\((19[0-9][0-9]|20[0-1][0-9])\\)#\", $potential_movie->title, $matches))\n {\n $potential_movie->title = $matches[1];\n $potential_movie->year = $matches[2];\n }\n\n $potential_movie->filename = pathinfo($file, PATHINFO_BASENAME);\n\n if (!$stacking)\n {\n // On ajoute cette entrée à la liste des films potentiels\n $potential_movies[] = $potential_movie;\n }\n else\n {\n // On ajoute cette entrée à la liste des parties empilées\n $stacks[] = $potential_movie;\n\n // Si ce fichier est une partie de film\n if (in_array($file, $parts))\n {\n // On retire cette partie\n $part = array_shift($parts);\n }\n\n // Plus de partie à traiter ?\n if (empty($parts))\n {\n $stacking = FALSE;\n\n $potential_movie = $stacks[0];\n\n $stack_filenames = array();\n foreach($stacks as $stack)\n {\n $stack_filenames[] = $stack->source->client_path.$stack->filename;\n }\n\n $potential_movie->filename = 'stack://'.implode(' , ', $stack_filenames);\n\n // Pour le prochain empilement de parties\n unset($stacks);\n\n // On ajoute cette entrée à la liste des films potentiels\n $potential_movies[] = $potential_movie;\n }\n }\n }\n }\n\n return $potential_movies;\n }", "private function recortarImagen()\n\t{\n\t\t$ImgTemporal=\"temporal_clase_Imagen.\".strtolower($this->extencion);\n\n\t\t$CoefAncho\t\t= $this->propiedadesImagen[0]/$this->anchoDestino;\n\t\t$CoefAlto\t\t= $this->propiedadesImagen[1]/$this->altoDestino;\n\t\t$Coeficiente=0;\n\t\tif ($CoefAncho>1 && $CoefAlto>1)\n\t\t{ if($CoefAncho>$CoefAlto){ $Coeficiente=$CoefAlto; } else {$Coeficiente=$CoefAncho;} }\n\n\t\tif ($Coeficiente!=0)\n\t\t{\n\t\t\t$anchoTmp\t= ceil($this->propiedadesImagen[0]/$Coeficiente);\n\t\t\t$altoTmp\t= ceil($this->propiedadesImagen[1]/$Coeficiente);\n\n\t\t\t$ImgMediana = imagecreatetruecolor($anchoTmp,$altoTmp);\n\t\t\timagecopyresampled($ImgMediana,$this->punteroImagen,0,0,0,0,$anchoTmp,$altoTmp,$this->propiedadesImagen[0],$this->propiedadesImagen[1]);\n\t\t\t\n\t\t\t// Tengo que desagregar la funcion de image para crear para reUtilizarla\n\t\t\t//imagejpeg($ImgMediana,$ImgTemporal,97);\n\t\t\t$this->crearArchivoDeImagen($ImgMediana,$ImgTemporal);\n\t\t}\n\n\t\t$fila\t\t\t= floor($this->recorte['centrado']/$this->recorte['columnas']);\n\t\t$columna\t\t= $this->recorte['centrado'] - ($fila*$this->recorte[\"columnas\"]);\n\t\t\n\t\t$centroX \t= floor(($anchoTmp / $this->recorte[\"columnas\"])/2)+$columna*floor($anchoTmp / $this->recorte[\"columnas\"]);\n\t\t$centroY \t= floor(($altoTmp / $this->recorte[\"filas\"])/2)+$fila*floor($altoTmp / $this->recorte[\"filas\"]);\n\n\t\t$centroX\t-= floor($this->anchoDestino/2);\n\t\t$centroY \t-= floor($this->altoDestino/2);\n\n\t\tif ($centroX<0) {$centroX = 0;}\n\t\tif ($centroY<0) {$centroY = 0;}\n\n\t\tif (($centroX+$this->anchoDestino)>$anchoTmp) {$centroX = $anchoTmp-$this->anchoDestino;}\n\t\tif (($centroY+$this->altoDestino)>$altoTmp) {$centroY = $altoTmp-$this->altoDestino;}\n\n\t\t$ImgRecortada = imagecreatetruecolor($this->anchoDestino,$this->altoDestino);\n\t\timagecopymerge ( $ImgRecortada,$ImgMediana,0,0,$centroX, $centroY, $this->anchoDestino, $this->altoDestino,100);\n\n\t\t//imagejpeg($ImgRecortada,$this->imagenDestino,97);\n\t\t$this->crearArchivoDeImagen($ImgRecortada,$this->imagenDestino);\n\t\timagedestroy($ImgRecortada);\n\t\tunlink($ImgTemporal);\n\t}", "function visites_mensuelles_chiffres($global_jour) {\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t$periode = date('m/y'); // mois /annee en cours (format de $date)\r\n\t$dday = date('j'); // numero du jour\r\n\t$nb_mois = $GLOBALS['actijour']['nbl_mensuel']; // nombre mois affiche\r\n\r\n\t$requete = \"FROM_UNIXTIME(UNIX_TIMESTAMP(date),'%m') AS d_mois, \r\n\t\t\tFROM_UNIXTIME(UNIX_TIMESTAMP(date),'%y') AS d_annee, \r\n\t\t\tFROM_UNIXTIME(UNIX_TIMESTAMP(date),'%m/%y') AS date_unix, \r\n\t\t\tSUM(visites) AS visit_mois \r\n\t\t\tFROM spip_visites WHERE date > DATE_SUB(NOW(),INTERVAL 2700 DAY) \r\n\t\t\tGROUP BY date_unix ORDER BY date DESC LIMIT 0,$nb_mois\";\r\n\r\n\t// calcul du $divis : MAX de visites_mois\r\n\t$r = sql_select($requete);\r\n\t$tblmax = array();\r\n\twhile ($rmx = @sql_fetch($r)) {\r\n\t\t$tblmax[count($tblmax) + 1] = $rmx['visit_mois'];\r\n\t}\r\n\treset($tblmax);\r\n\r\n\tif (count($tblmax) == 0) {\r\n\t\t$tblmax[] = 1;\r\n\t}\r\n\t$divis = max($tblmax) / 100;\r\n\r\n\t//le tableau a jauges horizontales\r\n\t$aff .= debut_cadre_relief(\"\", true)\r\n\t\t. \"<span class='arial2'>\" . _T('actijour:entete_tableau_mois', array('nb_mois' => $nb_mois)) . \"\\n</span>\"\r\n\t\t. \"<table width='100%' cellpadding='2' cellspacing='0' border='0' class='arial2'>\\n\"\r\n\t\t. \"<tr><td align='left'>\" . _T('actijour:mois_pipe')\r\n\t\t. \"</td><td width='50%'>\" . _T('actijour:moyenne_mois') . \"</td>\\n\"\r\n\t\t. \"<td><b>\" . _T('actijour:visites') . \"</b></td></tr>\";\r\n\r\n\t$ra = sql_select($requete);\r\n\twhile ($row = sql_fetch($ra)) {\r\n\t\t$val_m = $row['d_mois'];\r\n\t\t$val_a = $row['d_annee'];\r\n\t\t$date = $row['date_unix'];\r\n\t\t$visit_mois = $row['visit_mois'];\r\n\t\t$idefix = '';\r\n\r\n\t\t//nombre de jours du mois $mois\r\n\t\t$mois = mktime(0, 0, 0, $val_m, 1, $val_a);\r\n\t\t$nbr_jours = intval(date(\"t\", $mois));\r\n\r\n\t\t// nombre de jours, moyenne, si mois en cours\r\n\t\tif ($date != $periode) {\r\n\t\t\t$nbj = $nbr_jours;\r\n\t\t\t$moy_mois = floor($visit_mois / $nbj);\r\n\t\t\t$totvisit = $visit_mois;\r\n\t\t} else {\r\n\t\t\t$nbj = ($dday == 1) ? $dday : $dday - 1;\r\n\t\t\t$moy_mois = floor(($visit_mois - $global_jour) / $nbj);\r\n\t\t\t$totvisit = $visit_mois - $global_jour;\r\n\t\t\t$idefix = \"*\";\r\n\t\t}\r\n\t\t$totvisit = number_format($totvisit, 0, ',', '.');\r\n\r\n\t\t//longeur jauge (ne tiens pas compte du jour en cour)\r\n\t\t$long = floor($visit_mois / $divis);\r\n\r\n\t\t// couleur de jauge pour mois le plus fort\r\n\t\t$color_texte = '';\r\n\t\tif ($long == 100) {\r\n\t\t\t$coul_jauge = $couleur_foncee;\r\n\t\t\t$color_texte = \"style='color:#ffffff;'\";\r\n\t\t} else {\r\n\t\t\t$coul_jauge = $couleur_claire;\r\n\t\t}\r\n\r\n\t\t$aff .= \"<tr><td class='arial2' colspan='3'>\"\r\n\t\t\t. \"<div style='position:relative; z-index:1; width:100%;'>\"\r\n\t\t\t. \"<div class='cell_info_mois'>$date</div>\"\r\n\t\t\t. \"<div class='cell_moymens'>$moy_mois</div>\"\r\n\t\t\t. \"<div class='cell_info_tot' $color_texte><b>$totvisit</b>$idefix</div>\"\r\n\t\t\t. \"</div>\";\r\n\t\t# barre horiz \r\n\t\t$aff .= \"<div class='fond_barre'>\\n\"\r\n\t\t\t. \"<div style='width:\" . $long . \"%; height:11px; background-color:\" . $coul_jauge . \";'></div>\\n\"\r\n\t\t\t. \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"<tr><td colspan='3'><span class='verdana1'>\"\r\n\t\t. _T('actijour:pied_tableau_mois') . \"</span></td></tr>\\n\"\r\n\t\t. \"</table></span>\\n\";\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n\r\n}", "function paginaValida($numeroPagina){\n global $totalImagenes;\n //si el numero de pagina es mayor que cero y menor que el total de imagenes($totalImagenes) entre(/)\n // la cantidad de imagenes por pagina(MAXIMO)\n if (MAXIMO<=0){die (\"el mmo de p&aacute;gina debe ser mayor que cero\"); exit(); }\n return (($numeroPagina>0) && ($numeroPagina<=ceil(($totalImagenes/MAXIMO)))); \n }", "function makeIcons_MergeCenter($src, $dst, $dstx, $dsty) {\n // $dst = destination image location\n // $dstx = user defined width of image\n // $dsty = user defined height of image\n $allowedExtensions = 'jpg jpeg gif png';\n\n $name = explode(\".\", $src);\n $currentExtensions = $name[count($name) - 1];\n $extensions = explode(\" \", $allowedExtensions);\n\n for ($i = 0; count($extensions) > $i; $i = $i + 1) {\n if ($extensions[$i] == $currentExtensions) {\n $extensionOK = 1;\n $fileExtension = $extensions[$i];\n break;\n }\n }\n\n if ($extensionOK) {\n $size = getImageSize($src);\n $width = $size[0];\n $height = $size[1];\n\n if ($width >= $dstx AND $height >= $dsty) {\n $proportion_X = $width / $dstx;\n $proportion_Y = $height / $dsty;\n\n if ($proportion_X > $proportion_Y) {\n $proportion = $proportion_Y;\n } else {\n $proportion = $proportion_X;\n }\n $target['width'] = $dstx * $proportion;\n $target['height'] = $dsty * $proportion;\n\n $original['diagonal_center'] =\n round(sqrt(($width * $width) + ($height * $height)) / 2);\n $target['diagonal_center'] =\n round(sqrt(($target['width'] * $target['width']) +\n ($target['height'] * $target['height'])) / 2);\n\n $crop = round($original['diagonal_center'] - $target['diagonal_center']);\n\n if ($proportion_X < $proportion_Y) {\n $target['x'] = 0;\n $target['y'] = round((($height / 2) * $crop) / $target['diagonal_center']);\n } else {\n $target['x'] = round((($width / 2) * $crop) / $target['diagonal_center']);\n $target['y'] = 0;\n }\n\n if ($fileExtension == \"jpg\" OR $fileExtension == 'jpeg') {\n $from = ImageCreateFromJpeg($src);\n } elseif ($fileExtension == \"gif\") {\n $from = ImageCreateFromGIF($src);\n } elseif ($fileExtension == 'png') {\n $from = imageCreateFromPNG($src);\n }\n\n $new = ImageCreateTrueColor($dstx, $dsty);\n\n imagecopyresampled($new, $from, 0, 0, $target['x'], $target['y'], $dstx, $dsty, $target['width'], $target['height']);\n\n if ($fileExtension == \"jpg\" OR $fileExtension == 'jpeg') {\n imagejpeg($new, $dst, 70);\n } elseif ($fileExtension == \"gif\") {\n imagegif($new, $dst);\n } elseif ($fileExtension == 'png') {\n imagepng($new, $dst);\n }\n }\n }\n}", "function makeIcons_MergeCenter($src, $dst, $dstx, $dsty){\n//$dst = destination image location\n//$dstx = user defined width of image\n//$dsty = user defined height of image\n\n$allowedExtensions = 'jpg jpeg gif png';\n\n$name = explode(\".\", $src);\n$currentExtensions = $name[count($name)-1];\n$extensions = explode(\" \", $allowedExtensions);\n\nfor($i=0; count($extensions)>$i; $i=$i+1){\nif($extensions[$i]==$currentExtensions)\n{ $extensionOK=1;\n$fileExtension=$extensions[$i];\nbreak; }\n}\n\nif($extensionOK){\n\n$size = getImageSize($src);\n$width = $size[0];\n$height = $size[1];\n\nif($width >= $dstx AND $height >= $dsty){\n\n$proportion_X = $width / $dstx;\n$proportion_Y = $height / $dsty;\n\nif($proportion_X > $proportion_Y ){\n$proportion = $proportion_Y;\n}else{\n$proportion = $proportion_X ;\n}\n$target['width'] = $dstx * $proportion;\n$target['height'] = $dsty * $proportion;\n\n$original['diagonal_center'] =\nround(sqrt(($width*$width)+($height*$height))/2);\n$target['diagonal_center'] =\nround(sqrt(($target['width']*$target['width'])+\n($target['height']*$target['height']))/2);\n\n$crop = round($original['diagonal_center'] - $target['diagonal_center']);\n\nif($proportion_X < $proportion_Y ){\n$target['x'] = 0;\n$target['y'] = round((($height/2)*$crop)/$target['diagonal_center']);\n}else{\n$target['x'] = round((($width/2)*$crop)/$target['diagonal_center']);\n$target['y'] = 0;\n}\n\nif($fileExtension == \"jpg\" OR $fileExtension=='jpeg'){\n$from = ImageCreateFromJpeg($src);\n}elseif ($fileExtension == \"gif\"){\n$from = ImageCreateFromGIF($src);\n}elseif ($fileExtension == 'png'){\n $from = imageCreateFromPNG($src);\n}\n\n$new = ImageCreateTrueColor ($dstx,$dsty);\n\nimagecopyresampled ($new, $from, 0, 0, $target['x'],\n$target['y'], $dstx, $dsty, $target['width'], $target['height']);\n\n if($fileExtension == \"jpg\" OR $fileExtension == 'jpeg'){\nimagejpeg($new, $dst, 70);\n}elseif ($fileExtension == \"gif\"){\nimagegif($new, $dst);\n}elseif ($fileExtension == 'png'){\nimagepng($new, $dst);\n}\n}\n}\n}", "function analisaCaminho($lab, $qtdL, $qtdC, $pLI, $pCI, $pLF, $pCF, $pLA, $pCA){ \n if ($pLA == $pLF && $pCA == $pCF){\n exibelab($lab, $qtdL, $qtdC);\n }else{\n $lab[$pLA][$pCA] = 5;\n\n //define vizinhança\n for($c = -1; $c <= +1; $c++){\n for($l = -1; $l <= +1; $l++){\n $liA = $pLA+ $c; // linha atual\n $coA = $pCA+ $l; // coluna atual\n \n //verifica se está dentro dos limites\n if ( ($liA > 0 && $liA <=$qtdL-1) && ($coA > 0 && $coA <= $qtdC-1) ){ \n // verifica se EXISTE, e se é caminho ou saida\n if (isset($lab[$liA][$coA]) && ( $lab[$liA][$coA] == 0 || $lab[$liA][$coA] == 3 )){ \n // exclui diagonais\n if ($c * $l == 0){\n //exclui limites\n if ($lab[$liA][$coA] != 4){ \n analisaCaminho($lab, $qtdL, $qtdC, $pLI, $pCI, $pLF, $pCF, $liA,$coA);\n }\n }\n }\n } // fim limites\n \n }\n }\n // e se eu resetar o caminho aqui? \n }\n }", "public function snap(AnvilWorld $world): int\n {\n $world->copyOtherFiles();\n $removedChunks = 0;\n\n foreach ($world->getRegionDirectories() as $regionDirectory) {\n $forcedChunks = $this->getForceLoadedChunks($regionDirectory);\n foreach ($regionDirectory as $chunk) {\n if(in_array([$chunk->getGlobalXPos(), $chunk->getGlobalYPos()], $forcedChunks, true)) {\n $chunk->save();\n continue;\n }\n $time = $chunk->getInhabitedTime();\n if ($time > $this->minInhabitedTime || ($time === -1 && !$this->removeUnknownChunks)) {\n $chunk->save();\n } else {\n $removedChunks++;\n }\n }\n }\n\n return $removedChunks;\n }", "function listDir($user,$dir,$from,$to){\r\n\t$thumbDir=\"thumb/$user/\".$dir;\r\n\t$viewDir=\"view/$user/\".$dir;\r\n\t$imgDir=\"DATASET/$user/\".$dir;\r\n\tif(!file_exists($thumbDir))\r\n\t\t@mkdir($thumbDir);\r\n\tif(!file_exists($viewDir))\r\n\t\t@mkdir($viewDir);\r\n\t$items=array();\r\n\tif ($handle = opendir($imgDir)) {\r\n\t\t/* This is the correct way to loop over the directory. */\r\n\t\t$i=0;\r\n\t\t$prev=\"\";$next=\"\";\r\n\t\t$types=array(\"jpg\",\"jpeg\",\"png\",\"gif\");\r\n\t\twhile (false !== ($entry = readdir($handle))) {\r\n\t\t\t$filename=$imgDir.\"/\".$entry;\r\n\t\t\tif(is_dir($filename)) continue;\r\n\r\n\t\t\t$info = getimagesize($filename);\r\n\r\n\t\t\tdebug($filename);\r\n\t\t\t$pi=pathinfo($filename);\r\n\t\t\tif(!in_array(strtolower($pi['extension']),$types)) continue;\r\n\t\t\tif(isPic($info['2'])){\r\n\t\t\t\t$i++;\r\n\t\t\t\tif($i==$from) $prev=$entry;\r\n\t\t\t\tif($i<=$from) continue;\r\n\t\t\t\tif($i==$to+1) $next=$entry;\r\n\t\t\t\tif($i>$to) break;\r\n\r\n\t\t\t\t$width=$info['0'];\r\n\t\t\t\t$height=$info['1'];\r\n\t\t\t\t$size=$width*$height;\r\n\t\t\t\t$thumb=$filename;\r\n\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$m=1;\r\n\t\t\t\tif($size>4000*4000) {$n=8;$m=3;}\r\n\t\t\t\telse if($size>3000*3000) {$n=7;$m=3;}\r\n\t\t\t\telse if($size>2000*2000) {$n=6;$m=2;}\r\n\t\t\t\telse if($size>1200*1200) {$n=5;$m=2;}\r\n\t\t\t\telse if($size>600*600) $n=2;\r\n\t\t\t\tif($height>=2.5*$width||$width>=2.5*$height) $n=$n/3>1?$n/3:1;\r\n\r\n\t\t\t\tif($n>1) {\r\n\t\t\t\t\t$thumb=$thumbDir.\"/\".$entry;\r\n\t\t\t\t\tdebug($thumb);\r\n\t\t\t\t\tif(!file_exists($thumb)) {\r\n\t\t\t\t\t\tinclude_once \"thumb.php\";\r\n\t\t\t\t\t\timg2thumb($filename,$thumb,$width/$n,$height/$n,0,0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$view=$viewDir.\"/\".$entry;\r\n\t\t\t\tdebug($view);\r\n\t\t\t\tif(!file_exists($view)){\r\n\t\t\t\t\tif($m>1){\r\n\t\t\t\t\t\tinclude_once \"thumb.php\";\r\n\t\t\t\t\t\timg2thumb($filename,$view,$width/$m,$height/$m,0,0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse copy($filename,$view);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$item['id']=$i-1;//count its id in the folder\r\n\t\t\t\t$item['href']=$entry;\r\n\t\t\t\t$item['src']=$thumb; $item['width']=$info['0'];$item['height']=$info['1'];\r\n\t\t\t\t$items[]=$item;\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($handle);\r\n\r\n\t\tif(count($items)>0){\r\n\t\t\t//resolve the links\r\n\t\t\t$items[0]['prev']=$prev;\r\n\t\t\t$items[count($items)-1]['next']=$next;\r\n\t\t\tforeach($items as $i=> $item){\r\n\t\t\t\tif($i>0) {\r\n\t\t\t\t\t$items[$i-1]['next']=$items[$i]['href'];\r\n\t\t\t\t\t$items[$i]['prev']=$items[$i-1]['href'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tdebug(\"desp:...\\n\");\r\n\t\t\tinclude_once \"desp.php\";\r\n\t\t\tgetDesp($user,$dir,$items);\r\n\t\t\tdebug($items);\r\n\t\t}\r\n\t}\r\n\treturn $items;\r\n}", "function startProcessing(){\n\t\t$aPuntos = array();\n\t\t//lower left\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmin\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymax\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//lower right\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmax\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymax\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//upper right\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmax\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymin\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//upper left\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmin\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymin\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t\n\t\t//cargar laimagen\n\t\t$imagePath = SATELITE_RESOURCES.$this->resources[\"folder\"].\"/\".$this->resources[\"imagename\"].\".jpg\";\n\t\t$image_original = imagecreatefromjpeg($imagePath) or die(\"no image defined\");\n\t\t//definir los niveles en los cuales se va a generar esta imagen de satelite\n\t\t$nivelInicial = ($this->resources[\"hd\"] == 1) ? 7 : 1;\n\t\t$nivelFinal = ($this->resources[\"hd\"] == 1) ? 14 : 9;\n\t\t//loop sobre los niveles\n\t\tfor($nivel=$nivelInicial; $nivel<=$nivelFinal; $nivel++){\n\t\t\t//actualizar datos globales por nivel\n\t\t\t$this->actualizarEscalaPorNivel($nivel);\n\t\t\t//\n\t\t\t$upperLeft = $this->getCuadroFromPoint($aPuntos[0][0], $aPuntos[0][1]);\n\t\t\t$lowerRight = $this->getCuadroFromPoint($aPuntos[2][0], $aPuntos[2][1]);\n\t\t\t//\n\t\t\t//info imagen sat\n\t\t\t$info = getimagesize($imagePath);\n\t\t\t//width en latitud y longitud de la imagen de satelite\n\t\t\t$satWidth = $aPuntos[1][0] - $aPuntos[0][0];\n\t\t\t$satHeight = $aPuntos[2][1] - $aPuntos[1][1];\n\t\t\t//width y height que debe tener la imagen de satelite en pixeles\n\t\t\t$pixelWidthSat = $satWidth / $this->escala;\n\t\t\t$pixelHeightSat = $satHeight / $this->escala;\n\t\t\t//escala correspondiente entre el pixelaje que debe tener y el real de la imagen de satelite\n\t\t\t$escalaImagenSatelite = $info[0] / $pixelWidthSat;\n\t\t\t//copio la imagen al tamaño que le corresponde en este nivel para evitar desfaces\n\t\t\t$image = imagecreatetruecolor(round($info[0]/$escalaImagenSatelite), round($info[1]/$escalaImagenSatelite)) or die(\"no se pudo crear la imagen para empezar\");\n\t\t\timagecopyresampled($image, $image_original, 0, 0, 0, 0, round($info[0]/$escalaImagenSatelite), round($info[1]/$escalaImagenSatelite), $info[0], $info[1]) or die(\"no se pudo generar copia a nivel\");\n\t\t\t//\n\t\t\techo \"************************Nivel\".$nivel.\"<br />\";\n\t\t\t//Si la imagen es de hd entonces se crea un padding (bufferSize) alrededor con imagen de satelite de bajar resolucion\n\t\t\t$bufferSize = ($this->resources[\"hd\"] == 1 && $nivel >= 10) ? 4 : 0;\n\t\t\t//creamos y guardamos las imagenes en la base de datos\n\t\t\t$this->crearGuardarImagenes($upperLeft, $lowerRight, $nivel, $this->resources[\"clave\"], \"satelite_originales\", $bufferSize, \"satelite\");\n\t\t\t//para todos los cuadros que toca la imagen de satelite\n\t\t\tfor($i=$upperLeft[0] - $bufferSize; $i<=$lowerRight[0] + $bufferSize; $i++){\n\t\t\t\tfor($j=$upperLeft[1] - $bufferSize; $j<=$lowerRight[1] + $bufferSize; $j++){\n\t\t\t\t\t//cuadro\n\t\t\t\t\t$square = array($i, $j);\n\t\t\t\t\t//ver si ya existe una imagen en estas coordenadas\n\t\t\t\t\t$query = \"select * from imagenes\n\t\t\t\t\twhere satelite_exists != '0' and i = '$i' and j = '$j' and nivel = '$nivel'\";\n\t\t\t\t\t$exists = mysql_query($query) or die($query);\n\t\t\t\t\t//crear nueva imagen\n\t\t\t\t\tif( mysql_num_rows($exists) != 0 ){\n\t\t\t\t\t\t//en caso de que ya existiera antes una imagen de satelite asociada\n\t\t\t\t\t\t$newImage = imagecreatefromjpeg(IMAGE_MAPWARE_URL.\"?clave=\".$i.\"_\".$j.\"_\".$nivel);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newImage = imagecreatetruecolor(200, 200);\n\t\t\t\t\t\t//de ser hd copiar sobre una imagen de lowDef ampliada\n\t\t\t\t\t\tif($this->resources[\"hd\"] == 1){\n\t\t\t\t\t\t\t// copiamos la imagen de sat de baja resolucion en esta imagen para que forme parte del buffer\n\t\t\t\t\t\t\t// puede que sea cubierta por la imagen de hd en donde esta se encuentre\n\t\t\t\t\t\t\t$lowDef_i = ceil( ($i+1)/pow(2, $nivel-8) ) - 1;\n\t\t\t\t\t\t\t$lowDef_j = ceil( ($j+1)/pow(2, $nivel-8) ) - 1;\n\t\t\t\t\t\t\t$query = \"select \n\t\t\t\t\t\t\tX(POINTN( EXTERIORRING( ENVELOPE( mysql_puntos ) ) , 1 ) ) as xmin, \n\t\t\t\t\t\t\tY(POINTN( EXTERIORRING( ENVELOPE( mysql_puntos ) ) , 1 ) ) as ymin \n\t\t\t\t\t\t\tfrom imagenes where i = $lowDef_i and j = $lowDef_j and nivel = 8\";\n\t\t\t\t\t\t\t$lowDef = mysql_fetch_array(mysql_query($query)) or die($query);\n\t\t\t\t\t\t\t//que tantas veces es mas grande la newImage que la de baja resolucion que se va a sacar\n\t\t\t\t\t\t\t$escala_ld = pow(2, $nivel-8);\t\n\t\t\t\t\t\t\t//sacar la imagen que se va a usar\n\t\t\t\t\t\t\t$image_ld = imagecreatefromjpeg(IMAGE_MAPWARE_URL.\"?clave=\".$lowDef_i.\"_\".$lowDef_j.\"_8\");\n\t\t\t\t\t\t\tif($image_ld != false){\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$destX_ld = ($lowDef[\"xmin\"] - $this->xmin - $square[0]*$this->squareSize*$this->escala) / $this->escala;\n\t\t\t\t\t\t\t\t$destY_ld = ($lowDef[\"ymin\"] - $this->ymin - $square[1]*$this->squareSize*$this->escala) / $this->escala;\n\t\t\t\t\t\t\t\t//\t\t\t\n\t\t\t\t\t\t\t\t$sourceX_ld = -1*$destX_ld;\n\t\t\t\t\t\t\t\t$sourceY_ld = -1*$destY_ld;\n\t\t\t\t\t\t\t\timagecopyresampled($newImage, $image_ld, 0, 0, round($sourceX_ld/$escala_ld), round($sourceY_ld/$escala_ld), 200, 200, round(200/$escala_ld), round(200/$escala_ld)) or die(\"no copy resampled\");\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//lugar que representa la esquina superior izqierda de la imagen de satelite dentro del cuadro, igual que en generar imagenes simplemente referenciamos una coordenada de latitud, longitud a la imagen de 200 px a dibujar\n\t\t\t\t\t$destX = $aPuntos[0][0] - ($this->xmin + $square[0]*$this->squareSize*$this->escala);\n\t\t\t\t\t$destX = round($destX/$this->escala);\n\t\t\t\t\t$destY = $aPuntos[0][1] - ($this->ymin + $square[1]*$this->squareSize*$this->escala);\n\t\t\t\t\t$destY = round($destY/$this->escala);\n\t\t\t\t\t//\n\t\t\t\t\t//sourceX y sourceY representan la esquina superior izquierda correspondiente a la imagen a \n\t\t\t\t\t//dibujar dentro de la imagen de satelite completa\n\t\t\t\t\t$sourceX = round(-1*$destX);\n\t\t\t\t\t$sourceY = round(-1*$destY);\n\t\t\t\t\tif($destX > 0){\n\t\t\t\t\t\t//ver cuanto hay que copiar, solo lo suficiente para llenar la imagen newImage\n\t\t\t\t\t\t//como sourceX es negativo ya que destX positivo\n\t\t\t\t\t\t$Width = min(round(210 + $sourceX), round($info[0]/$escalaImagenSatelite));\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif($destY > 0){\n\t\t\t\t\t\t\t$Height = min(round(210 + $sourceY), round($info[1]/$escalaImagenSatelite));\n\t\t\t\t\t\t\t//copiar el pedazo de imagen correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, $destX, $destY, 0, 0, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$Height= min(210, round($info[1]/$escalaImagenSatelite- $sourceY));\n\t\t\t\t\t\t\t//copiar el pedazo de imagen correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, $destX, 0, 0, $sourceY, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//ver cuanto hay que coipar, solo lo suficiente para llenar la imagen newImage no mas\n\t\t\t\t\t\t$Width = min(210, round($info[0]/$escalaImagenSatelite - $sourceX));\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif($destY > 0){\n\t\t\t\t\t\t\t$Height = min(round(210 + $sourceY), round($info[1]/$escalaImagenSatelite));\n\t\t\t\t\t\t\t//copiar el pedazo correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, 0, $destY, $sourceX, 0, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$Height= min(210, round($info[1]/$escalaImagenSatelite- $sourceY));\n\t\t\t\t\t\t\t//copiar el pedazo correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, 0, 0, $sourceX, $sourceY, $Width, $Height) or die(\"no image copy\");\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//set compression level = 3\n\t\t\t\t\t$archivo = \"temporales/satelite_temporal.jpg\";\n\t\t\t\t\timagejpeg($newImage, $archivo, 90);\n\t\t\t\t\tchmod($archivo, 0777);\n\t\t\t\t\t//tomar la informacion del archivo e ingresarla a la base de datos\n\t\t\t\t\t$file = mysql_real_escape_string(file_get_contents($archivo));\n\t\t\t\t\t//guardar en base de datos que la imagen ya fue dibujada\n\t\t\t\t\t$query = \"UPDATE `imagenes`\n\t\t\t\t\tSET `satelite` = '$file', `satelite_exists` = '1'\n\t\t\t\t\tWHERE `i` = '\".$i.\"' and `j` = '\".$j.\"' \n\t\t\t\t\tand `nivel` = '\".$nivel.\"'\";\n\t\t\t\t\tmysql_query($query) or die($query);\n\t\t\t\t}\n\t\t\t}\n\t\t}//cierre del for de niveles\n\t\t//\n\t\t//actualizar el campo de generado para no volver a usar esta imagen\n\t\t$query = \"update satelite_originales set generada = 1 where clave = '\".$this->resources[\"clave\"].\"'\";\n\t\tmysql_query($query) or die($query);\n\t}", "public function Movil() {\n\t\t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t\t\t$plantilla->Parametro('Titulo', 'Comunicación');\n\t\t\t$plantilla->Parametro('avisos', $this->Modelo->avisos());\n\t\t\techo $plantilla->MostrarPlantilla(implode(DIRECTORY_SEPARATOR, array('Dispositivos', 'Movil.html')));\n\t\t}", "public function hasScenery(){\n return $this->_has(25);\n }", "function is_imagen($arch)\r\n{$i=strlen($arch)-1;\r\n $extensiones_aceptadas=array(\"gif\",\"jpg\",\"jpeg\",\"bmp\");\r\n $extension=\"\";\r\n while(($i>=0)&&($arch[$i]!='.'))\r\n {$extension=$arch[$i].$extension;\r\n $i--;\r\n }\r\n if ($i<0) return false;\r\n else {if(in_array($extension,$extensiones_aceptadas)){return true;}\r\n else {return false;};\r\n }\r\n}", "function part2() {\n foreach ($this->areas as $a) {\n extract($a); // creates in scope: $id, $x, $y, $w, $h\n $area = $this->charCounter($id, $this->fabric);\n echo \"$id: $area\\n\";\n if ($area == $w * $h) {\n die(\"$id fills $area cells and is not overlapped.\\n\");\n }\n }\n echo \"No region found.\\n\";\n }", "function ultimos_pictogramas_limit($limit,$id_tipo_imagen,$registrado) {\n\t\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\t\n\t\t$query = \"SELECT \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,imagenes.ultima_modificacion,\n\t\tpalabra_imagen.*, palabras.*, tipos_imagen.*\n\t\tFROM imagenes, palabra_imagen, palabras, tipos_imagen\n\t\tWHERE imagenes.estado=1 \n\t\tAND imagenes.id_imagen=palabra_imagen.id_imagen\n\t\tAND palabra_imagen.id_palabra=palabras.id_palabra \n\t\tAND imagenes.id_tipo_imagen=tipos_imagen.id_tipo\n\t\tAND imagenes.id_tipo_imagen='$id_tipo_imagen'\n\t\t$mostrar_registradas\n\t\tORDER BY imagenes.ultima_modificacion desc LIMIT 0,$limit\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function movies_crew() {\n if (empty($this->crewsfilms)) $this->filmograf($this->crewsfilms,\"miscellaneousX20crew\");\n return $this->crewsfilms;\n }", "protected function isBoardFull() {\n if ((count($this->_markers[self::X_MARK]) + count($this->_markers[self::O_MARK])) == 9) {\n echo $this->promptMessage('board_full') . PHP_EOL;\n return TRUE;\n }\n return FALSE;\n }", "public function isMileDistanceUnit()\n {\n return ($this->getDistanceUnit() == 'mi') ? true : false;\n }", "function move_list ( )\t\t\t\t\t\t\t\t\t\t\t\t// We're going to generate our move list (for generation I).\n\t{\n\t\tglobal $config;\n\t\t$moves1\t= \tarray(\n\t\t\t\"Pound\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Move name,\n\t\t\t\t\"type\"\t=>\t\"Normal\",\t\t\t\t\t\t\t\t\t// Move type, which will be used for type effectiveness,\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\t\t\t\t\t\t\t\t\t// Type of attack, which attack stat is used (Attack or Sp. Attack) and defense stat (Defense, Sp. Defense).\n\t\t\t\t\"pp\"\t=>\t35,\t\t\t\t\t\t\t\t\t\t\t// Power points, pp, how many times it can be used,\n\t\t\t\t\"pwr\"\t=>\t40,\t\t\t\t\t\t\t\t\t\t\t// Power, it's base damage,\n\t\t\t\t\"acc\"\t=>\t100,\t\t\t\t\t\t\t\t\t\t// Accuracy, the move's base accuracy.\n\t\t\t\t\"pri\"\t=>\t0,\t\t\t\t\t\t\t\t\t\t\t// Priority. Priority ignores the speed calcs.\n\t\t\t\t\"multi\"\t=>\t\"no\",\t\t\t\t\t\t\t\t\t\t// Will it multihit? \n\t\t\t\t\"recoil\"=>\t\"no\",\t\t\t\t\t\t\t\t\t\t// Will it cause Recoil?\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\t\t\t\t\t\t\t\t\t\t// Is there any effects the move has?\n\t\t\t),\n\t\t\t\"Karate Chop\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\t\t\t\t\t\t\t\t\t\t// Does it have a higher Critical hit ratio?\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Double Slap\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\" =>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Comet Punch\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t18,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mega Punch\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Pay Day\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Note: Drops money for the winner. Will add something for that later. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fire Punch\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t75,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t=>\t10,\t\t\t\t\t\t\t\t\t\t// 10% chance of burning.\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Ice Punch\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t75,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"freeze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Thunder Punch\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t75,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Scratch\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Vice Grip\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t55,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Guillotine\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t0,\t\t\t\t\t\t\t\t\t\t\t// This move will kill in one hit if it lands.\n\t\t\t\t\"acc\"\t=>\t$lvl - $olvl + 30,\t\t\t\t\t\t\t// This move depends on the level of the user and opponent for its chance of hitting.\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Razor Wind\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes two turns to execute.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Swords Dance\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move affects the user.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Cut\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Gust\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\t\t\t\t\t\t\t\t\t// This move will affect users in stage one of Fly.\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Wing Attack\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t60,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Whirlwind\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\t\t\t\t\t\t\t\t\t// Will end the battle when used against wild pokemon. Otherwise, switch pokemon.\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"pri\"\t=>\t-6,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fly\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Takes two turns, one is invulnerable to *most* attacks.\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bind\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Trapping move. Goes for 4-5 turns doing 1/16th HP after original damage.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Slam\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Vine Whip\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t45,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Stomp\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% flinch chance, and will never miss on minimized opponents.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Double Kick\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// Move always hits twice. (damage calculated independantly).\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t30,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mega Kick\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Jump Kick\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Will cause recoil of 1/2 the user's MAX HP if it misses.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Rolling Kick\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has 30% Flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t60,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Sand Attack\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// Lowers the accuracy of target. Works on all pokemon.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Headbutt\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t70,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Horn Attack\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fury Attack\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits 2-5 times.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Horn Drill\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will take all current HP of target on connect.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Tackle\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Body Slam\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% chance of causing paralysis.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t85,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Wrap\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t\t// Trapping move, affects 4-5 turns, doing 1/16 max HP damage.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Take Down\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move's recoil damage is 1/4th the damage they did.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Thrash\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move goes for 2 - 3 turns, confuses the user upon conclusion.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Double Edge\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move causes recoil of 1/3rd the damage done.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Tail Whip\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Reduces target's defense by one level. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Poison Sting\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% Poison chance.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\"\t=> 30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Twineedle\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits twice, with two chances to poison.\n\t\t\t\t\"type\"\t=>\t\"Bug\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\" => 20,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Pin Missile\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits two to five times.\n\t\t\t\t\"type\"\t=>\t\"Bug\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t25,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Leer\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers the target defense by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bite\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Dark\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t60,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Growl\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers the target attack by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Roar\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will make your pokemon (or the wild opponent, run.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"pri\"\t=>\t-6,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Sing\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// If it lands, will always put the target to sleep.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t55,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=> 100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Supersonic\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move causes confusion, if the target isn't already so.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t55,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Sonic Boom\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move always causes 20 HP of damage, bypassing damage calcs, but misses ghost types.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Disable\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move disables a move that may currently be used. ( has PP left ).\n\t\t\t\t\"type\"\t=>\t\"Normal\",\t\t\t\t\t\t\t\t\t// This move lasts four to seven turns.\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Acid\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of lowering target's Special Defense by 1 stage.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Ember\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of burning the target.\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Flamethrower\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of burning the target.\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Mist\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move prevents stat altering moves from affecting, for five turns.\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Water Gun\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Hydro Pump\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t110,\n\t\t\t\t\"acc\"\t=>\t80,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Surf\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Ice Beam\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of freezing the target.\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"freeze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Blizzard\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of freezing the target.\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t110,\n\t\t\t\t\"acc\"\t=>\t70,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"freeze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Psybeam\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of confusing the target.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Bubble Beam\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of dropping target's speed by one level.\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Aurora Beam\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of dropping target's attack by one level.\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Hyper Beam\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move requires two turns in most situations, with the second being recharge.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t150,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Peck\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t35,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Drill Peck\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Submission\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits the user with 25% of the damage done in recoil.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t80,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Low Kick\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move's damage varies by the weight of the target (20 - 120).\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\t\t\t\t\t\t\t\t\t\t\t// Weight calculations to be added later.\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Counter\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns double the damage of a physical attack done to the user.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"pri\"\t=>\t-5,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Seismic Toss\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move's power is equal to the level of the user, and receives no STAB.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Strength\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Absorb\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% of the damage dealt in HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mega Drain\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% of the damage dealt in HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Leech Seed\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes 1/8th the HP of the target and gives them to the user's current active pokemon.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\t\t\t\t\t\t\t\t\t// All grass type pokemon are immune to this move.\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Growth\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will increase both the attack and sp. attack of the user one stage.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Razor Leaf\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a high critical hit ratio.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t55,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Solar Beam\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move requires a waiting turn before the attack.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Poison Powder\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// Grass types are immune to this move.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\" => 100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Stun Spore\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// Grass types are immune to this move.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\" => 100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Sleep Powder\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Petal Dance\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will go for two to three turns, and confuse the user afterwards.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Stringshot\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers the speed of the target by two stages.\n\t\t\t\t\"type\"\t=>\t\"Bug\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Dragon Rage\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move always does 40HP of damage, regardless of stats.\n\t\t\t\t\"type\"\t=>\t\"Dragon\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Firespin\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move traps the target, lasts for four to five turns taking 1/16th of the target's HP.\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t35,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Thunder Shock\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Thunderbolt\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Thunder Wave\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will paralyze the target. Electric types are immune.\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Thunder\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t110,\n\t\t\t\t\"acc\"\t=>\t70,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Rock Throw\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Rock\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Earthquake\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move affects users of dig by double.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fissure\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will have a one-hit kill.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Dig\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move requires two turns to execute.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Toxic\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move badly poisons the target. It also never misses when a poison-type uses it.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison2\"\t=>\t100,\t\t\t\t\t\t\t\t// Poison2 will be badly poisoned, for the increasing damage algorithm holder.\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Confusion\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t50, \n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Psychic\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of lowering Sp. Defense by one level.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Hypnosis\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t60,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Meditate\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's attack by one level.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Agility\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move sharply raises the user's speed two levels.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Quick Attack\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"pri\"\t=>\t1,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Rage\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move gains attack bonus when the user is hit, as long as the move is used.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Teleport\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move only works on wild pokemon.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Night Shade\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will always do equal to the user's level in damage.\n\t\t\t\t\"type\"\t=>\t\"Ghost\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mimic\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will copy the last used move by the target, unless the user already knows it.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\t\t\t\t\t\t\t\t\t// The move will revert back to mimic following a switch or battle ending.\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Screech\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will sharply lower the target's defense two levels.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Double Team\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the evasion of the user by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Recover\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move recovers 50% of the user's HP. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Harden\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move increases the user's defense by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Minimize\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's evasiveness one level. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Smokescreen\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move reduces the target's accuracy one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Confuse Ray\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move confuses the victim for two to five turns. \n\t\t\t\t\"type\"\t=>\t\"Ghost\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Withdraw\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's defense one level. \n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Defense Curl\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's defense one level. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Barrier\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's defense two levels. \n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Light Screen\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move cuts special move damage in half for five turns. \n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Haze\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move removes all stat changes to the pokemon on the field. \n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Reflect\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move cuts physical move damage in half for five turns. \n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Focus Energy\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move increases the user's critical hit ratio two levels. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bide\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move makes the user endure two rounds of damage, then returns double the damage.\t\t\t\t\t \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"pri\"\t=>\t1,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Metronome\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will call up any move at random, with all regular effects. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mirror Move\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will copy the last move the opponent used. \n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Self-Destruct\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move causes the user to faint. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t200,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Egg Bomb\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Lick\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% chance of paralyzing targets.\n\t\t\t\t\"type\"\t=>\t\"Ghost\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=>\t30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Smog\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 40% chance of poisoning the target.\t\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t30,\n\t\t\t\t\"acc\"\t=>\t70,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\"\t=>\t40,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Sludge\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% chance of poisoning the target.\t\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\"\t=>\t30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Bone Club\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fire Blast\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% burn chance, down from 30.\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t110,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Waterfall\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 20% Flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Clamp\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lasts four to five turns, and is trapping.\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t35,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Swift\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move never misses.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t60,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Skull Bash\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move requires two turns to complete.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t130,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Spike Cannon\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lands two to five times.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Constrict\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of reducing speed.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t10,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Amnesia\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's Sp. Defense by two levels.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Kinesis\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers the target's accuracy one level.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t80,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Soft-Boiled\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"High Jump Kick\"=>\tarray(\t\t\t\t\t\t\t\t\t// This move will take 50% HP in recoil if it misses.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t130,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Glare\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will paralyze the target.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Soft-Boiled\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Dream Eater\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% damage in HP to the user, target must be sleeping.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Poison Gas\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move poisons the target.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Barrage\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits the target two to five times.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Leech Life\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% of the damage in HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Bug\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Lovely Kiss\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move puts the target to sleep.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Sky Attack\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes two turns to execute, and has a 30% flinch opportunity.\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t140,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Transform\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move changes the user into the target pokemon entirely.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bubble\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance to lower the speed by one level.\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Dizzy Punch\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 20% chance of confusing the target.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t70,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t20,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Spore\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will put the opponent to sleep, sans grass types.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Flash\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers to accuracy of the target by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Psywave\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Splash\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move does absolutely nothing.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Acid Armor\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's defense by two levels. \n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Crabhammer\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Explosion\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will cause the user to faint.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t250,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fury Swipes\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits two to five times.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t18,\n\t\t\t\t\"acc\"\t=>\t80,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bonemerang\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will hit twice.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Rest\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move causes the user to sleep two turns, wipes all status ailments, and restores HP.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Rockslide\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Rock\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t75,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Hyperfang\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% flinch chance. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Sharpen\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's attack by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Conversion\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move changes the user's types into the target's. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Tri Attack\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move may burn, freeze, or paralyze the target. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t\t=>\t10,\n\t\t\t\t\t\"freeze\"\t=>\t10,\n\t\t\t\t\t\"paralyze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Super Fang\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes half the target's HP.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Slash\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t70,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Substitute\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes 25% of the user's HP and creates a decoy that absorbs damage.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Struggle\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will be triggered automatically upon all moves having 0 PP.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t0,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t);\n\t\tforeach( $moves1 as $name => $stats )\n\t\t{\n\t\t\tif( !isset( $stats['pri'] ) )\n\t\t\t{\n\t\t\t\t$stats['pri'] = 0;\n\t\t\t}\n\t\t\t$sname = array(\n\t\t\t\t\"name\"\t=> $name,\n\t\t\t);\n\t\t\t$moves2[strtolower( $name )] = array_merge( $sname, $stats );\n\t\t}\n\t\t$config->df['pokemoves']['gen1'] = $moves2;\n\t\t$config->save_config( \"./config/pokemoves.df\", $config->df['pokemoves'] );\n\t}", "function movilCheck01(){\n $_SERVER['ALL_HTTP'] = isset($_SERVER['ALL_HTTP']) ? $_SERVER['ALL_HTTP'] : '';\n\n $mobile_browser = '0';\n\n if(preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|ipad|ipod|android|xoom)/i', strtolower($_SERVER['HTTP_USER_AGENT'])))\n $mobile_browser++;\n\n if((isset($_SERVER['HTTP_ACCEPT'])) and (strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') !== false))\n $mobile_browser++;\n\n if(isset($_SERVER['HTTP_X_WAP_PROFILE']))\n $mobile_browser++;\n\n if(isset($_SERVER['HTTP_PROFILE']))\n $mobile_browser++;\n\n $mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4));\n $mobile_agents = array(\n 'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac',\n 'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno',\n 'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-',\n 'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-',\n 'newt','noki','oper','palm','pana','pant','phil','play','port','prox',\n 'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar',\n 'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-',\n 'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp',\n 'wapr','webc','winw','winw','xda','xda-'\n );\n\n if(in_array($mobile_ua, $mobile_agents))\n $mobile_browser++;\n\n if(strpos(strtolower($_SERVER['ALL_HTTP']), 'operamini') !== false)\n $mobile_browser++;\n\n // Pre-final check to reset everything if the user is on Windows\n if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows') !== false)\n $mobile_browser=0;\n\n // But WP7 is also Windows, with a slightly different characteristic\n if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows phone') !== false)\n $mobile_browser++;\n\n if($mobile_browser>0)\n return true;\n else\n return false;\n/*\nComo usarlo\n$mobile = movilCheck01();\nif($mobile == 'TRUE'){\n\techo\" template movil\";\n} else{\n\techo\" template PC\";\n}\n*/\n}", "public function mobilevideobyLocationsAction() {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('video')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('video_main', array(), 'sitetagcheckin_main_videolocation');\n $this->_helper->content->setEnabled();\n } /* elseif ( Engine_Api::_()->getDbtable( 'modules' , 'core' )->isModuleEnabled( 'advgroup' )) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('advgroup_main', array(), 'sitetagcheckin_main_groupbylocation');\n $this->_helper->content->setEnabled();\n } */ else {\n return $this->_forward('notfound', 'error', 'core');\n }\n }", "public function reescalarPerfil(){\n// $directorio = '/files/fotos_perfil';\n $path = public_path().'/files/actividades/';\n $ficheros = scandir($path);\n// foreach ($ficheros as $file){\n//// $rutaComp = $path.$file;\n// echo $file.'<br>';\n//// $image = new ImageResize($rutaComp);\n//// $image->resizeToWidth(1200);\n//// $image->save($rutaComp);\n// }\n for($i=2;$i<count($ficheros);$i++){\n echo $ficheros[$i].'<br>';\n $rutaComp = $path.$ficheros[$i];\n $image = new ImageResize($rutaComp);\n $image->resizeToWidth(1200);\n $image->save($rutaComp);\n }\n\n }", "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}", "public function getStat() {\n\t\treturn $this->moves;\n\t}", "public function listadoHijosNietosImagenes($content){\n $contador = 0;\n $vectorImagenes = array();\n $dom = new DOMDocument();\n $dom->loadHTML(\"$content\");\n $xpath = new DOMXPath($dom);\n $tag = \"div\";\n $class = \"widget em-widget-new-products-grid\";\n $consulta = \"//\".$tag.\"[@class='\".$class.\"']\";\n $widget = $xpath->query($consulta);\n //var_dump($widget);\n if ($widget->length > 0){\n foreach($widget as $res){\n if ($contador == 0){\n $resultados = $res->getElementsByTagName(\"img\");\n if ($resultados->length > 0){\n foreach($resultados as $img){\n $urlImagen = $img->getAttribute(\"src\");\n array_push($vectorImagenes,$urlImagen);\n }\n }\n }\n $contador++;\n }\n }\n return $vectorImagenes;\n }", "public \tfunction addcavemaps()\r\n {\r\n $cave = new varcavecave();\r\n $sketchAccessArr = $cave->getCaveFileList($this->cavedata['guidv4'],'cave_maps');\r\n \r\n\t\tif (!empty($sketchAccessArr['cave_maps']) )\r\n\t\t{\r\n\t\t\tforeach($sketchAccessArr['cave_maps'] as $index => $imgFile)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t//adapt rotate im to fit into page\r\n\t\t\t\t$imgInfo = getimagesize($imgFile['file_path']);\r\n\t\t\t\r\n\t\t\t\t//w to h ratio : \r\n\t\t\t\t$imgRatio = $imgInfo[0]/$imgInfo[1];\r\n\t\t\t\t\r\n\t\t\t\t//if img width > img heigth we use a landscape format for the page\r\n\t\t\t\tif($imgInfo[0] > $imgInfo[1] )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->addpage('L');\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->addpage('P');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//img left over space\r\n\t\t\t\t$imgLeftOverMm = array(\r\n\t\t\t\t\t\t\t\t$this->getPageHeight() - $this->margintop - $this->marginbottom - 2 ,// 2mm for space over img\r\n\t\t\t\t\t\t\t\t$imgLeftOver = $this->getPageWidth() - $this->marginleft - $this->marginright - 2 // 2mm for space over img\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t//convert to px\r\n\t\t\t\t$imgLeftOverPx = array(\r\n\t\t\t\t\t\t\t\t\t$this->convMmToPx($imgLeftOverMm[0]),\r\n\t\t\t\t\t\t\t\t\t$this->convMmToPx($imgLeftOverMm[1])\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t//compute resize\r\n\t\t\t\tif ($imgInfo[0] > $imgLeftOverPx[0] || $imgInfo[1] > $imgLeftOverPx[1] )\r\n\t\t\t\t{\r\n\t\t\t\t\t//echo 'img to big: '.$imgInfo[0].'x'.$imgInfo[1]. '(max='.$imgLeftOverPx[0].'x'.$imgLeftOverPx[1].')<hr>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t//try to resize img on width\r\n\t\t\t\t\t$resizeRatio = $imgLeftOverPx[0] / $imgInfo[0] ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//check if computed resized img is to big in this case we resize from height\r\n\t\t\t\t\tif($imgInfo[1] * $resizeRatio < $imgLeftOverPx[1] )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//resize on width is ok\r\n\t\t\t\t\t\t$x = $imgLeftOverPx[0];\r\n\t\t\t\t\t\t$y = $imgInfo[1] * $resizeRatio;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//resize by heigth\r\n\t\t\t\t\t\t$resizeRatio = $imgLeftOverPx[1] / $imgInfo[1] ;\r\n\t\t\t\t\t\t$x = $imgInfo[0] * $resizeRatio;\r\n\t\t\t\t\t\t$y = $imgLeftOverPx[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//echo 'img ok';\r\n\t\t\t\t\t$x = $imgInfo[0];\t\t\t\t\r\n\t\t\t\t\t$y = $imgInfo[1];\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//#######echo 'max size :' .$imgLeftOverPx[0].'x'.$imgLeftOverPx[1].'<br>';\r\n\t\t\t\t//#######echo 'new size ;' .$x.'x'.$y.'<br><br>';\r\n\t\t\t\t\r\n\t\t\t\t//$this->Image($imgFile,$this->marginleft,$this->margintop, $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = array());\r\n\t\t\t\t$this->Image($imgFile['file_path'],$this->marginleft,$this->margintop, $x, $y, '', '', '', '', '', '', false, false, 0, false, false, /*fit on page*/ true, false, array());\r\n\t\t\t}\r\n\t\t}\r\n }", "function remote_file_exists( $source, $extra_mile = 0 ) {\r\n ////////////////////////////////// Does it exist? \r\n # EXTRA MILE = 1 \r\n ////////////////////////////////// Is it an image? \r\n \r\n if ( $extra_mile === 1 ) { \r\n $img = @getimagesize($source); \r\n \r\n if ( !$img ) return 0; \r\n else \r\n { \r\n switch ($img[2]) \r\n { \r\n case 0: \r\n return 0; \r\n break; \r\n case 1: \r\n return $source; \r\n break; \r\n case 2: \r\n return $source; \r\n break; \r\n case 3: \r\n return $source; \r\n break; \r\n case 6: \r\n return $source; \r\n break; \r\n default: \r\n return 0; \r\n break; \r\n } \r\n } \r\n } \r\n else \r\n { \r\n if (@FClose(@FOpen($source, 'r'))) \r\n return 1; \r\n else \r\n return 0; \r\n } \r\n }", "function getminimap($worldx, $worldy, $newplayerspot=0) {\r\n // Grabs the content of the minimap for the given world coordinates, or if it doesn't exist, generates some\r\n // worldx, worldy = coordinates on the world map that this player is at\r\n // newplayerspot = set to 1 if this is a new player location, which then requires an existing campfire\r\n \r\n // This function will need to be modified later to account for actual new players being added; we will probably\r\n \r\n // I realize that in most game setups, minimap refers to a pixel-based map in the corner for tracking things, but I didn't know what else to call the sub-map layer\r\n // when I started coding them. \r\n \r\n $mapspotquery = danquery(\"SELECT * FROM map WHERE x = 0 AND y = 0;\",\r\n 'include/mapmanager.php->getminimap()->get map location');\r\n $mapspot = mysqli_fetch_assoc($mapspotquery);\r\n if($mapspot) {\r\n $minimapquery = danquery(\"SELECT * FROM minimap WHERE mapid=\". $mapspot['id'] .\" ORDER BY y,x\",\r\n 'include/mapmanager.php->getminimap()->load existing minimap');\r\n return $minimapquery;\r\n }else{\r\n $source = imagecreatefrompng(\"img/2layermap.png\");\r\n if(!$source) die(\"fail - source image not found\");\r\n $width = imagesx($source); \r\n $height = imagesy($source);\r\n $startx = -floor($width/2); // These values may end up smaller than the actual image, but we're not concerned with\r\n $endx = floor($width/2); // including the edges, only that the zero line is included correctly.\r\n $starty = -floor($height/2);\r\n $endy = floor($height/2);\r\n $translatex = $startx;\r\n $translatey = $starty;\r\n \r\n $color = imagecolorat($source, $translatex, $translatey);\r\n $r = ($color >> 16) & 0xFF;\r\n $g = ($color >> 8) & 0xFF;\r\n $b = $color & 0xFF;\r\n \r\n // structures list\r\n // 0 - nothing built here\r\n // 1 - campfire. Usually a plains block is selected for this\r\n \r\n $newid = 0;\r\n $b = array();\r\n if(aboutEqual($r,255,5)) {\r\n // this block is red. Mark it as forest\r\n danquery(\"INSERT INTO map (x,y,owner,biome,ugresource,ugamount) VALUES (0,0,0,1, FLOOR(RAND()*4), (RAND()*1.5)+0.5);\",\r\n 'index.php->no block found->add forest block');\r\n $newid = mysqli_insert_id($db);\r\n \r\n // Now, we need to generate a 8x8 grid with a specific number of block types. Later, we'll add ranges to what is added\r\n $b = array(3,3,3,2,2,2,4,4,4); // 3 stone blocks, 3 dirt blocks, 3 water blocks\r\n for($i=0;$i<10;$i++) { array_push($b, 0); } // 10 plains\r\n for($i=0;$i<45;$i++) { array_push($b, 1); } // The rest is forest blocks\r\n }else{\r\n // This block is not red. Mark it as plains\r\n danquery(\"INSERT INTO map (x,y,owner,biome,ugresource,ugamount) VALUES (0,0,0,0, FLOOR(RAND()*4), (RAND()*1.5)+0.5);\",\r\n 'index.php->no block found->add plains block');\r\n $newid = mysqli_insert_id($db);\r\n \r\n // Like before, generate an 8x8 grid with specific number of block types, scattered about\r\n $b = array(3,3,3,2,2,2,4,4,4); // 3 stone blocks, 3 dirt blocks, 3 water blocks\r\n for($i=0;$i<10;$i++) { array_push($b, 1); } // 10 forest blocks\r\n for($i=0;$i<45;$i++) { array_push($b, 0); } // The rest is plains blocks\r\n }\r\n shuffle($b); // Randomize the ordering of the array\r\n // Now, generate a series of MySQL insertion instances for this\r\n $a = '';\r\n for($i=0;$i<64;$i++) {\r\n $a .= '('. $newid .','. ($i%8) .','. floor($i/8.0) .','. $b[$i] .'),';\r\n }\r\n $a = substr($a, 0, strlen($a)-1); // Trims off the last comma, to not break the sql statement\r\n \r\n danquery(\"INSERT INTO minimap (mapid, x, y, landtype) VALUES \". $a .\";\",\r\n 'index.php->fill new minimap');\r\n // With this built now, we still need to select a spot for the campfire. Let's update a record within this set at random.\r\n danquery(\"UPDATE minimap SET structure=1 WHERE mapid=\". $newid .\" AND landtype=0 ORDER BY RAND() LIMIT 1;\",\r\n 'index.php->add campfire to new minimap');\r\n \r\n // Now that we know the minimap portion has been built, let's load it in... in order.\r\n $minimapquery = danquery(\"SELECT * FROM minimap WHERE mapid=\". $newid .\" ORDER BY y,x;\",\r\n 'index.php->read minimap when building');\r\n return $minimapquery;\r\n }\r\n }", "function xstats_displayMovieGif( $gameId ) {\n//the movie could be generated by calling http://<host>/extend/moviegif/movie.php?fu=1&spiel=<gameId>\n $filename = '../moviegif/files/moviegif_'.$gameId.'.gif';\n if( file_exists( $filename )) {\n echo '<img src=\"'.$filename.'\" class=\"beveled\">';\n }\n}", "function large_images_find_images($dir, $min_size) {\n $full_dir = realpath(drush_cwd() . '/' . $dir);\n\n if (empty($full_dir)) {\n drush_set_error(dt('Invalid directory: !dir', array('!dir' => $dir)));\n drush_die();\n }\n\n $depth = drush_get_option('maxdepth', 999999);\n\n drush_shell_exec('find ' . $full_dir . ' -maxdepth ' . $depth . ' \\( -iname \"*.jpg\" -o -iname \"*.jpeg\" -o -iname \"*.png\" \\) -type f -size +' . $min_size . ' -exec du -ah {} \\; | sort -rh | cut -f 2');\n\n return drush_shell_exec_output();\n}", "function live_neighbors($key, $type, $cells, $cols)\r\n\t{\r\n\t\t$live_neighbors = 0;\r\n\t\tif ($type !== 'ur' && $type !== 'rs' && $type !== 'br' && $cells[$key+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'bl' && $cells[$key-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'bl' && $type !== 'bs' && $type !== 'br' && $cells[$key+$cols] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ur' && $type !== 'rs' && $type !== 'br' && $type !== 'bl' && $type !== 'bs' && $cells[$key+$cols+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'br' && $type !== 'bl' && $type !== 'bs' && $cells[$key+$cols-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\r\n\t\tif ($type !== 'ul' && $type !== 'us' && $type !== 'ur' && $cells[$key-$cols] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\t\r\n\t\tif ($type !== 'ul' && $type !== 'ls' && $type !== 'us' && $type !== 'bl' && $type !== 'ur' && $cells[$key-$cols-1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\t\r\n\t\tif ($type !== 'ul' && $type !== 'us' && $type !== 'br' && $type !== 'ur' && $type !== 'rs' && $cells[$key-$cols+1] == 'alive') {\r\n\t\t\t$live_neighbors++;\r\n\t\t}\r\n\t\treturn $live_neighbors;\r\n\t}", "function getPos($sourcefile_width,$sourcefile_height,$pos,$met_image=\"\"){\n if ($met_image){\n $insertfile_width = ImageSx($met_image);\n $insertfile_height = ImageSy($met_image);\n }else {\n $lineCount = explode(\"\\r\\n\",$this->met_text);\n $fontSize = imagettfbbox($this->met_text_size,$this->met_text_angle,$this->met_text_font,$this->met_text);\n $insertfile_width = $fontSize[2] - $fontSize[0];\n $insertfile_height = count($lineCount)*($fontSize[1] - $fontSize[5]);\n\t\t\t $fontSizeone =imagettfbbox($this->met_text_size,$this->met_text_angle,$this->met_text_font,'e');\n\t\t\t $fontSizeone = ($fontSizeone[2] - $fontSizeone[0])/2;\n }\n\t\tswitch ($pos){\n\t\t\tcase 0:\n\t\t\t $dest_x = ( $sourcefile_width / 2 ) - ( $insertfile_width / 2 );\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tcase 1:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\t\t\tcase 2:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width-$fontSizeone;\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\n\t\t\tcase 3:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width-$fontSizeone;\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 4:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 5:\n\t\t\t $dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );\n\t\t\t $dest_y = $insertfile_height;\n\t\t\t break;\n\n\t\t\tcase 6:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width -$fontSizeone;\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tcase 7:\n\t\t\t $dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );\n\t\t\t $dest_y = $sourcefile_height - ($insertfile_height/4);\n\t\t\t break;\n\n\t\t\tcase 8:\n\t\t\t $dest_x = 0;\n\t\t\t $dest_y = ( $sourcefile_height / 2 ) + ( $insertfile_height / 2 );\n\t\t\t break;\n\n\t\t\tdefault:\n\t\t\t $dest_x = $sourcefile_width - $insertfile_width;\n\t\t\t $dest_y = $sourcefile_height - $insertfile_height;\n\t\t\t break;\n\t\t}\t\n\t\tif($met_image){\n\t\t\t$dest_y=$dest_y-$insertfile_height;\n\t\t}\n return array(\"dest_x\"=>$dest_x,\"dest_y\"=>$dest_y);\n}", "function fundMapPar($caminhos){\n\t$k = 1;\n\t$pathAux = '';\n\t$i = count($caminhos)-1;\n\t$pathAux.=$caminhos[$i].'#';\n\t$path[] = $caminhos[$i];\n\t$i--;\n\t$pathAux.=$caminhos[$i].'#';\n\t$path[] = $caminhos[$i];\n\t$i--;\n\twhile ($i >= 0) {\n\n\t\tif (fullUpper($caminhos[$i]) == fullUpper($path[$k])) {\n\t\t\t$pathAux.=$caminhos[$i-1].'#';\n\t\t\t$path[] = $caminhos[$i-1];\n\t\t\t$k++;\n\t\t};\n\t\t$i = $i - 2;\n\t} \n\treturn $pathAux;\n}", "public function videobyLocationsAction() {\n\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('video')) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('video_main', array(), 'sitetagcheckin_main_videolocation');\n $this->_helper->content->setEnabled();\n } /* elseif ( Engine_Api::_()->getDbtable( 'modules' , 'core' )->isModuleEnabled( 'advgroup' )) {\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('advgroup_main', array(), 'sitetagcheckin_main_groupbylocation');\n $this->_helper->content->setEnabled();\n } */ else {\n return $this->_forward('notfound', 'error', 'core');\n }\n }", "public function setMaxContours($value) {}", "function finPartida($nFilas, $nColumnas){\n for ($x=1; $x <= $nFilas ; $x++) { \n for ($y=1; $y <= $nColumnas ; $y++) { \n $posicion= $x.$y;\n echo $posicion;\n if (!in_array($posicion, $_SESSION[\"visible\"])) {\n array_push($_SESSION[\"visible\"], $posicion);\n } \n }\n }\n echo \"HAS PERDIDO\";\n}", "function drush_large_images_list($dir, $min_size) {\n $images = large_images_find_images($dir, $min_size);\n if (!empty($images)) {\n foreach ($images as $image) {\n $img_size = getimagesize($image);\n drush_log(dt('!size !wx!h !path', array(\n '!path' => $image,\n '!w' => str_pad($img_size[0], 5, ' ', STR_PAD_LEFT),\n '!h' => str_pad($img_size[1], 5, ' ', STR_PAD_RIGHT),\n '!size' => str_pad(large_images_human_filesize(filesize($image)), 9, ' '),\n )), 'ok');\n }\n }\n else {\n drush_log(dt('No image files found.'), 'ok');\n }\n}", "function verificaJogoVelha($jogo){\n\t//valor 1 => jogador 1\n\t//valor 2 => jogador 2\n\t\n\tif($jogo[0] != 0){\n\t\t//primeira horizontal\n\t\tif($jogo[0] == $jogo[1] && $jogo[0] == $jogo[2]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t\t//primeira vertical\n\t\telse if($jogo[0] == $jogo[3] && $jogo[0] == $jogo[6]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t\t//primeira diagonal\n\t\telse if($jogo[0] == $jogo[4] && $jogo[0] == $jogo[8]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t}\n\tif($jogo[2] != 0){\n\t\t//terceira vertical\n\t\tif($jogo[2] == $jogo[5] && $jogo[2] == $jogo[8]){\n\t\t\treturn $jogo[2];\n\t\t}\n\t\t//segunda diagonal\n\t\telse if($jogo[2] == $jogo[4] && $jogo[2] == $jogo[6]){\n\t\t\treturn $jogo[2];\n\t\t}\n\t}\n\tif($jogo[7] != 0){\n\t\t//terceira horizontal\n\t\tif($jogo[6] == $jogo[7] && $jogo[7] == $jogo[8]){\n\t\t\treturn $jogo[7];\n\t\t}\n\t\t//segunda vertical\n\t\telse if($jogo[1] == $jogo[7] && $jogo[4] == $jogo[7]){\n\t\t\treturn $jogo[7];\n\t\t}\n\t}\n\t//segunda horizontal\n\tif($jogo[3] != 0 && $jogo[3] == $jogo[4] && $jogo[3] == $jogo[5]){\n\t\treturn $jogo[3];\n\t}\n\t\n\tfor($i = 0; $i < 9; $i++){\n\t\tif($jogo[$i] == 0) break;\n\t}\n\t\n\tif($i == 9) return 'empate';\n\t\n\treturn false;\n}", "function extractIMGmisencache($text, $id, $link, $taille = 200){\n\t$valretour = \"\";\n\t$letexte = \"\";\n\t$doc = new DOMDocument();\n\t$doc->loadHTML($text);\n\t$list = $doc->getElementsByTagName('img');\n\tforeach ($list as $node) {\n\t\tif ($node->hasAttribute('src')) {\n\t\t\t$img_loc = $node->getAttribute('src');\n\t\t\t$filename = basename($img_loc);\n\t\t\t$extension = explode(\".\",$filename);\n\t\t\t// Si c'est un jpg on traite sinon suivant\n\t\t\tif (strtoupper(end($extension)) == \"JPG\"){ \n\t\t\t\t// loading image into constructor\n\t\t\t\t$image = new FastImage($img_loc);\n\t\t\t\tlist($width, $height) = $image->getSize();\n\t\t\t\t// echo \"dimensions: \" . $width . \"x\" . $height;\t\t\t\t\t\n\t\t\t\t// Si superieur au mini requis on sort c'est ok\n\t\t\t\tif ($width > $taille || $height > $taille){\n\t\t\t\t\t$valretour = miseenformeIMG($img_loc,$width,$height,$text);\n\t\t\t\t\t$query=\"INSERT INTO `\".MYSQL_PREFIX.\"MagFonctions_cache` (`id`, `urlimage`, `imgwidth`, `imgheight`) VALUES ('\".$id.\"', '\".$img_loc.\"', '\".$width.\"', '\".$height.\"');\";\n\t\t\t\t\tmysql_query($query);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Si pas d'image il faut que l'on force le texte\n\tif ( $valretour == \"\") { \n\t\t//$valretour = FunctionsMag::txtCHAP($text);\n\t\t// On memorise noimage dans la bdd pour ne plus faire de recherche\n\t\t// <div class=\"blog-content\">\n\t\tonchercheInPage($text, $id, $link, $taille = 200);\n\t\t//$query=\"INSERT INTO `\".MYSQL_PREFIX.\"MagFonctions_cache` (`id`, `urlimage`, `imgwidth`, `imgheight`) VALUES ('\".$id.\"', 'noimage', '0', '0');\";\n\t\t//echo $query;\n\t\t//mysql_query($query);\n\t\t$valretour = stripTAG(TruncateHTML::truncateChars($text, '200', '...'));\n\t}\n\treturn $valretour;\n}", "private function checkDir() {\n if(!file_exists($this->pub_path)) {\n mkdir($this->pub_path);\n } elseif(!file_exists($this->src_path . $this->img)) {\n \t$this->removeImage();\n }\n // Create tiles folder if not exist\n if(!file_exists($this->pub_path . '.tiles')) {\n mkdir($this->pub_path . '.tiles');\n }\n echo $this->tiles_path . \"\\n\";\n // Overwrite img tiles folder if incomplete (if includes some of the zoom level images)\n if(file_exists($this->tiles_path)) {\n \t$res = glob($this->tiles_path . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);\n \tif(!empty($res)) {\n \t\t$this->removeImage();\n \t\tmkdir($this->tiles_path);\n \t} elseif(count(scandir($this->tiles_path)) > 2) {\n \t\treturn false;\n \t}\n } else {\n \tmkdir($this->tiles_path);\n }\n return true;\n\t}", "public function compute(array $lines) {\n list($k, $d) = array_map(function($val) {\n return (int) $val;\n }, explode(' ',$lines[0]));\n\n $strings = [];\n $l = count($lines);\n for ($i = 1; $i < $l; $i++) {\n if (!empty($lines[$i])) array_push($strings, $lines[$i]);\n }\n\n\n $motifs = [];\n for ($i = 0; $i < strlen($strings[0]) - $k + 1; $i++) {\n $patt = substr($strings[0], $i, $k);\n\n $neighbors = BioUtil::neighbors($patt, $d);\n\n foreach($neighbors as $nb) {\n\n if (Arrays::matches($strings, function($str) use ($nb,$d) {\n return BioUtil::approximate_frequency($str, $nb, $d, true) > 0;\n }) &&\n !Arrays::contains($motifs, $nb)) {\n array_push($motifs, $nb);\n }\n }\n }\n\n return $motifs;\n }", "function count_black(\n array $black_tiles\n): int\n{\n return count($black_tiles);\n}", "function allot()\n{\n\t$dist = rand(5,10);\n\t$dir = rand(0,7);\n\t\n\t$conn = connect();\n\t$query=\"SELECT row_tail,col_tail FROM map_res WHERE faction=\".$_SESSION[\"faction\"].\";\";\n\t$op = mysqli_query($conn,$query);\n\tif (mysqli_num_rows($op) != 1)\n\t{\n\t\t$x = \"\";\n\t\t$y = \"\";\n\t\t\n\t\tif ($_SESSION[\"faction\"] === \"1\")\n\t\t{\n\t\t\t$x = 25;\n\t\t\t$y = 50;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$x = 75;\n\t\t\t$y = 50;\n\t\t}\n\t\t\n\t\t$query=\"INSERT INTO map_res (faction,row_tail,col_tail) VALUES (\".$_SESSION[\"faction\"].\",\".$x.\",\".$y.\");\";\n\t\t$op=mysqli_query($conn,$query);\n\t\t//alert($query);\n\t\t$res[\"row\"] = $x;\n\t\t$res[\"col\"] = $y;\n\t\t//alert(var_dump($res));\n\t\treturn($res);\n\t}\n\t$op = mysqli_fetch_assoc($op);\n\t\n\tswitch($dir)\n\t{\n\t\tcase 0: //up\n\t\t\t$res_row = $op[\"row_tail\"] - $dist;\n\t\t\t$res_col = $op[\"col_tail\"];\n\t\tbreak;\n\t\t\n\t\tcase 1: //up-right\n\t\t\t$res_row = $op[\"row_tail\"] - floor($dist/1.4142);\n\t\t\t$res_col = $op[\"col_tail\"] + floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 2: //right\n\t\t\t$res_row = $op[\"row_tail\"];\n\t\t\t$res_col = $op[\"col_tail\"] + floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 3: //down-right\n\t\t\t$res_row = $op[\"row_tail\"] + floor($dist/1.4142);\n\t\t\t$res_col = $op[\"col_tail\"] + floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 4: //down\n\t\t\t$res_row = $op[\"row_tail\"] + $dist;\n\t\t\t$res_col = $op[\"col_tail\"];\n\t\tbreak;\n\t\t\n\t\tcase 5: //down-left\n\t\t\t$res_row = $op[\"row_tail\"] + floor($dist/1.4142);\n\t\t\t$res_col = $op[\"col_tail\"] - floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 6: //left\n\t\t\t$res_row = $op[\"row_tail\"];\n\t\t\t$res_col = $op[\"col_tail\"] - floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 7: //up-left\n\t\t\t\n\t\t\t$res_row = $op[\"row_tail\"] + floor($dist/1.4142);\n\t\t\t$res_col = $op[\"col_tail\"] - floor($dist/1.4142);\n\t\tbreak;\n\t}\n\t\n\t$res=array();\n\t\n\tif ($res_row > 99 || $res_row < 0 || $res_col > 99 || $res_col < 0 || getSlot($res_row,$res_col)[\"occupied\"] !== \"0\" || getSlot($res_row,$res_col)[\"special\"] === \"3\" || getSlot($res_row,$res_col)[\"special\"] === \"4\")\n\t{\n\t\t//alert(\"$res_row , $res_col\");\n\t\treturn(false);\n\t}\n\telse\n\t{\n\t\t$res[\"row\"] = $res_row;\n\t\t$res[\"col\"] = $res_col;\n\t\t//alert(var_dump($res));\n\t\treturn($res);\n\t}\n\t\n\t//return($res);\n}", "public function videoconferenciaGraficos( ) {\n $this->setComando(\"GRAFICOS\");\n }", "public function get_near_images(Request $request) {\n $before = VideoImage::where('id', '<', $request->id)->latest('id')->limit(3)->get();\n // get 5 records after from current image\n $after = VideoImage::where('id', '>', $request->id)->oldest('id')->limit(2)->get();\n // get current record cause we lazy\n $current = VideoImage::findOrFail($request->id);\n // put into array\n $results = [$before, $current, $after];\n // return that shit\n return response()->json($results);\n }", "function excluir_imagem_publicacao(){\n\t\t\n\t\t// tabela\n\t\t$tabela = TABELA_IMAGENS_ALBUM;\n\t\t\n\t\t// id\n\t\t$id = remove_html($_REQUEST['id']);\n\t\t\n\t\t// valida id e usuario administrador\n\t\tif($id == null or retorne_usuario_administrador() == false){\n\t\t\t\n\t\t\t// retorno nulo\n\t\t\treturn null;\n\t\t\t\n\t\t};\n\t\t\n\t\t// query\n\t\t$query[0] = \"select *from $tabela where id='$id';\";\n\t\t$query[1] = \"delete from $tabela where id='$id';\";\n\t\t\n\t\t// dados\n\t\t$dados = retorne_dados_query($query[0]);\n\t\t\n\t// pasta de usuario\n\t$pasta_usuario = retorne_pasta_usuario($dados['idusuario'], 2, true);\n\t\n\t// separa os dados\n\t$url_imagem = $pasta_usuario.basename($dados['url_imagem']);\n\t$url_imagem_miniatura = $pasta_usuario.basename($dados['url_imagem_miniatura']);\n\t\n\t// excluindo arquivo\n\texclui_arquivo_unico($url_imagem);\n\texclui_arquivo_unico($url_imagem_miniatura);\n\t\n\t// comando executa\n\tcomando_executa($query[1]);\n\t\n\t}", "function listar_videos_acepciones_lse_limit($registrado,$inicial,$cantidad,$id_tipo,$letra,$filtrado,$orden,$id_subtema) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND palabras.id_tipo_palabra='.$id_tipo.''; }\n\t\t\n\t\tif ($id_subtema==99999) { \n\t\t\t$sql_subtema=''; \n\t\t\t$subtema_tabla='';\n\t\t\t$subtema_tabla_from='';\n\t\t} else { \n\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\tAND palabra_subtema.id_subtema='.$id_subtema.''; \n\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t\n\t\t}\n\t\t\n\t\tif ($letra==\"\") { $sql_letra=''; } \n\t\telse { $sql_letra=\"AND palabras.palabra LIKE '$letra%%'\"; }\n\t\t\n\t\tif ($filtrado==1) { $sql_filtrado='imagenes.ultima_modificacion'; } \n\t\telseif ($filtrado==2) { $sql_filtrado='palabras.palabra'; }\n\t\t\n\t\t$query = \"SELECT DISTINCT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.* $subtema_tabla\n\t\tFROM palabra_imagen, imagenes, palabras $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n\t\t$sql_letra\n\t\t$sql_tipo\n\t\t$sql_subtema\n\t\tAND imagenes.id_tipo_imagen=11\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\t$mostrar_registradas\n\t\tORDER BY $sql_filtrado $orden LIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function win_check($token) {\r\n if ($this->debug && debug_backtrace()[1]['function'] == 'game_check') {\r\n echo '<br />> Check function called from Game for token ' . $token . '...<br />';\r\n }\r\n\r\n $this->winning_line = []; \r\n foreach ($this->win_lines as $line_type => $lines) {\r\n foreach ($lines as $line_name => $line) {\r\n $this->winning_line[0] = $line; \r\n $check_value = 0; \r\n $win_move = 0; \r\n foreach ($line as $pos) {\r\n if ($this->debug && debug_backtrace()[1]['function'] == 'game_check') {\r\n echo 'Checking for token ' . $token . ' in ' . $line_type . ' ' . $line_name . ' [' . implode(',', $line) . ']';\r\n }\r\n if ($this->position[$pos] != $token) {\r\n if (debug_backtrace()[1]['function'] == 'game_check') {\r\n\r\n if ($this->debug) {\r\n echo ' - Position ' . $pos . '. Result: Not Found. Skipping rest of ' . $line_name . '<br />';\r\n }\r\n break;\r\n } else if (debug_backtrace()[1]['function'] == 'pick_move') {\r\n $win_move = $pos;\r\n }\r\n } else {\r\n if ($this->debug && debug_backtrace()[1]['function'] == 'game_check') {\r\n echo ' - Position ' . $pos . '. Result: Found.<br />';\r\n }\r\n $check_value++;\r\n }\r\n }\r\n\r\n if (debug_backtrace()[1]['function'] == 'pick_move') {\r\n if ($check_value == ($this->grid_size - 1)) {\r\n if ($this->position[$win_move] == '-') {\r\n return $win_move;\r\n }\r\n }\r\n } else if (debug_backtrace()[1]['function'] == 'game_check') {\r\n if ($check_value == $this->grid_size) {\r\n if ($this->debug) {\r\n echo 'We have a winner!<br />';\r\n }\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n $this->winning_line = []; \r\n if (debug_backtrace()[1]['function'] == 'game_check') {\r\n return false;\r\n } else if (debug_backtrace()[1]['function'] == 'pick_move') {\r\n return -1;\r\n } else {\r\n return null;\r\n }\r\n }", "function adjacent_black(\n array $black_tile_signatures,\n Tile $tile\n): int\n{\n $count = 0;\n foreach (Tile::CHANGE_VECTORS as $change_vector) {\n $new_x = $tile->x + $change_vector[0];\n $new_y = $tile->y + $change_vector[1];\n $new_z = $tile->z + $change_vector[2];\n\n $key = strval(new Tile($new_x, $new_y, $new_z));\n if (in_array($key, $black_tile_signatures)) {\n // It's black\n $count += 1;\n }\n }\n\n return $count;\n}", "function compare_carre(array $carre, array $rectangle): ?array\r\n{\r\n\r\n $offset_col = null;\r\n $offset_col_precedent = null;\r\n $offset_line = 0;\r\n $comparaison_valide = 0;\r\n $longeur_carre = count($carre);\r\n\r\n while ($offset_line < count($rectangle)) {\r\n\r\n $offset_col = (compare_ligne($carre[$comparaison_valide], $rectangle[$offset_line + $comparaison_valide]));\r\n\r\n if ($offset_col !== -1) {\r\n\r\n if ($comparaison_valide === 0) {\r\n // echo \"Debug: Ligne $offset_line + $comparaison_valide est ok\\n\";\r\n $comparaison_valide++;\r\n }\r\n\r\n if ($comparaison_valide > 0 && $offset_col === $offset_col_precedent) {\r\n // echo \"Debug : Ligne $offset_line + $comparaison_valide est ok \";\r\n // echo \"&& \\$offset_col === \\$offset_col_precedent\\n\";\r\n $comparaison_valide++;\r\n }\r\n\r\n\r\n if ($comparaison_valide === $longeur_carre) return [\"offset_line\" => $offset_line, \"offset_col\" => $offset_col];\r\n } else {\r\n $comparaison_valide = 0;\r\n $offset_line++;\r\n }\r\n\r\n $offset_col_precedent = $offset_col;\r\n }\r\n\r\n return null;\r\n}", "private function decideVictory()\n {\n echo 'Jugador ';\n if (!$this->human->isOver() &&\n (\n ($this->human->getPoints() == $this->machine->getPoints() && $this->human->getPoints() != PLAYER_WIN_POINTS)\n || $this->human->getPoints() > $this->machine->getPoints()\n || $this->machine->isOver()\n )\n ) echo 'Humano';\n else echo 'Máquina';\n echo ' gana la partida. ';\n }", "public function get_thumbnail_positions() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_thumbnail_positions();\n\n }", "public function getCampeonatosToGenerateGroups()\n {\n $stmt = $this->db->query(\"SELECT * FROM campeonato where fechaFinInscripcion <= curdate() and (Select count(idCampeonato) from grupo where campeonato.idCampeonato = grupo.idCampeonato ) = 0\");\n $toret_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n $championships = array();\n \n foreach ($toret_db as $championship) {\n array_push($championships, new Championship($championship[\"idCampeonato\"], $championship[\"fechaInicioInscripcion\"], $championship[\"fechaFinInscripcion\"], $championship[\"fechaInicioCampeonato\"], $championship[\"fechaFinCampeonato\"], $championship[\"nombreCampeonato\"]));\n }\n \n return $championships;\n }", "public function scrapePadresHijosNietos($contenidoVector){\n $inicio = '<div class=\"grid_18 push_6 grid_content\">';\n $final = '<div class=\"grid_6 pull_18\">';\n $cadena = \"\";\n $vector = array();\n foreach ($contenidoVector as $contenido){\n $cadenaContenido = ltrim(rtrim($contenido));\n $pos1 = stripos($cadenaContenido, $inicio);\n $pos2 = stripos($cadenaContenido, $final);\n if ($pos1 !== false) {\n //echo \"Se encontró en la posición $pos1<br>\";\n }\n if ($pos2 !== false) {\n //echo \"Se encontró en la posición $pos2<br>\";\n }\n $cadena = substr($cadenaContenido,$pos1,$pos2);\n array_push($vector,$cadena);\n }\n return $vector;\n }", "private function filtrandoImagens($divNoti) {\n \n $img = [];\n \n foreach ($divNoti as $divInterna) {\n foreach ($divInterna as $imagem) {\n $classeInterna = $imagem->getAttribute('class');\n\n if ($classeInterna == 'td-module-thumb') {\n $img[] = $imagem->getElementsByTagName('img');\n }\n }\n }\n return $img;\n }", "function redimensionne_image_petit($photo)\n{\n\tglobal $photo_redim_taille_max_largeur, $photo_redim_taille_max_hauteur;\n\n\tif((!preg_match(\"/^[0-9]{1,}$/\", $photo_redim_taille_max_largeur))||($photo_redim_taille_max_largeur<=0)) {\n\t\t$photo_redim_taille_max_largeur=35;\n\t}\n\n\tif((!preg_match(\"/^[0-9]{1,}$/\", $photo_redim_taille_max_hauteur))||($photo_redim_taille_max_hauteur<=0)) {\n\t\t$photo_redim_taille_max_hauteur=35;\n\t}\n\n\t// prendre les informations sur l'image\n\t$info_image = getimagesize($photo);\n\t// largeur et hauteur de l'image d'origine\n\t$largeur = $info_image[0];\n\t$hauteur = $info_image[1];\n\t// largeur et/ou hauteur maximum à afficher\n\t//$taille_max_largeur = 35;\n\t//$taille_max_hauteur = 35;\n\n\t// calcule le ratio de redimensionnement\n\t$ratio_l = $largeur / $photo_redim_taille_max_largeur;\n\t$ratio_h = $hauteur / $photo_redim_taille_max_hauteur;\n\t$ratio = ($ratio_l > $ratio_h)?$ratio_l:$ratio_h;\n\n\t// définit largeur et hauteur pour la nouvelle image\n\t$nouvelle_largeur = $largeur / $ratio;\n\t$nouvelle_hauteur = $hauteur / $ratio;\n\n\t// on renvoit la largeur et la hauteur\n\treturn array($nouvelle_largeur, $nouvelle_hauteur);\n}", "public function makeMapSheetAction() {\n\t\t$sourceSize = 16;\n\t\t$destinationSize = 32;\n\t\t\n\t\t$images = array();\n\t\t\n\t\t$dir = $_SERVER['DOCUMENT_ROOT'] . '/modules/wes/img/sprites/maps/jidoor-tiles';\n\t\t$writeDir = $_SERVER['DOCUMENT_ROOT'] . '/modules/wes/img/sprites/maps';\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\t$images[] = $dir . '/' . $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\t\n\t\t$numTiles = count($images);\n\t\t$tileSheet = imagecreatetruecolor($numTiles * $destinationSize, $destinationSize);\n\t\t\n\t\tfor ($i = 0; $i < $numTiles; $i++) {\n\t\t\t$tile = imagecreatefrompng($images[$i]);\n\t\t\t$x = $i * $destinationSize;\n\t\t\t$y = 0;\n\t\t\timagecopyresized($tileSheet, $tile, $x, $y, 0, 0, $destinationSize, $destinationSize, $sourceSize, $sourceSize);\n\t\t\timagedestroy($tile);\n\t\t}\n\t\t\n\t\timagepng($tileSheet, $writeDir . '/sheet.png');\n\t\timagedestroy($tileSheet);\n\t\t\n\t\tshow_array($images);\n\t\tdie();\n\t}", "function is_animated_gif($img) {\n if(empty($img)) return false;\n\n $contents = file_get_contents($img);\n $location = 0;\n $count = 0;\n\n if((substr($contents, 0, 6) != 'GIF89a') AND (substr($contents, 0, 6) != 'GIF87a')) {\n return false;\n }\n\n while ($count < 2) {\n $first_occurance = strpos($contents,\"\\x00\\x21\\xF9\\x04\",$location);\n if ($first_occurance === FALSE) {\n break;\n } else {\n $location = $first_occurance+1;\n $second_occurance = strpos($contents,\"\\x00\\x2C\",$location);\n if ($second_occurance === FALSE) {\n break;\n } else {\n if ($first_occurance+8 == $second_occurance) {\n $count++;\n }\n $location = $second_occurance+1;\n }\n }\n }\n return ($count > 1) ? true : false;\n}", "function guardar_imagenes($idc=null,$seccion){ \r\r\n if (!is_null($idc))\r\r\n $ims = zen_deserializar($this->padre->bd->seleccion_unica(\"imagenes from contenidos where idc=\".$idc)); \r\r\n else \r\r\n $ims = array();\r\r\n //Guardar imagenes:\r\r\n $errores = \"\";\r\r\n zen___carga_funciones(\"zen_ficheros\");\r\r\n $guardar_imgs= zen_guardarFicheros(\"imagenes\",ZF_DIR_MEDIA.\"img/$seccion/\",$errores,rand(10,100).\"_\",true,104);\r\r\n $n = count($ims); \r\r\n for ($i=0; $i<$n; $i++){ \r\r\n \tif (!isset($_POST['borrar_'.str_replace(\".\",\"_\",$ims[$i])])) {\r\r\n \t array_push($guardar_imgs,$ims[$i]); \r\r\n \t} else echo $_POST['borrar_'.$ims[$i]];\r\r\n }\r\r\n return zen_serializar($guardar_imgs);\r\r\n }" ]
[ "0.5247034", "0.518427", "0.50850207", "0.5053846", "0.5052573", "0.50488615", "0.5033761", "0.49807224", "0.49682704", "0.495854", "0.48415375", "0.48214668", "0.47541276", "0.47476426", "0.47457343", "0.47129738", "0.467588", "0.46752053", "0.46734437", "0.4641412", "0.46367788", "0.46310222", "0.46242392", "0.46080458", "0.45874527", "0.4549202", "0.45287126", "0.4516346", "0.4505636", "0.44976473", "0.4496803", "0.4487416", "0.4469918", "0.4460987", "0.44458792", "0.4438367", "0.44318733", "0.44313163", "0.4431122", "0.4429946", "0.44163287", "0.44143847", "0.44110388", "0.44051787", "0.44032976", "0.4399602", "0.439331", "0.43903702", "0.43903583", "0.43859977", "0.43782172", "0.43715122", "0.43617642", "0.43615305", "0.4341388", "0.43388692", "0.43364805", "0.43308684", "0.43278188", "0.4327506", "0.43263417", "0.43253878", "0.4325245", "0.43168604", "0.43165264", "0.4314951", "0.4304318", "0.43031055", "0.43017662", "0.43010494", "0.42985985", "0.42980355", "0.4291166", "0.4289461", "0.42881113", "0.42831814", "0.42822233", "0.42815584", "0.42749602", "0.42715806", "0.42669278", "0.42657343", "0.42565233", "0.42475817", "0.42428863", "0.42314455", "0.4230614", "0.42270845", "0.4221873", "0.42202654", "0.4219626", "0.4215162", "0.42138457", "0.42111045", "0.42108116", "0.4204469", "0.4204452", "0.42018864", "0.41994762", "0.41981998", "0.4197215" ]
0.0
-1
/ Convertir un string a un formato compatible con urls
function urlTitulo($str, $replace=array(), $delimiter='-') { setlocale(LC_ALL, 'en_US.UTF8'); if( !empty($replace) ) { $str = str_replace((array)$replace, ' ', $str); } $str = (is_utf8($str))? $str : utf8_encode($str); $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str); $clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean); $clean = strtolower(trim($clean, '-')); $clean = preg_replace("/[\/_|+ -]+/", $delimiter, $clean); return $clean; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function massimport_convertspip_uri($str) {\n\t return eregi_replace('[^(->)\\'\\\"]http://([^[:space:]<]*)', ' [http://\\\\1->http://\\\\1]', $str); \n}", "function convertStringUrl($string){\n\n $wasteValue = [3];\n $url = parse_url($string);\n\n $scheme = $url['scheme'];\n $host = $url['host'];\n $path = $url['path'];\n\n $query = explode('&', $url['query']);\n\n $params = getFilteredArrayFromString($query, $wasteValue);\n\n //sort params by value\n asort($params);\n\n //add path parameter from input link to array\n $params['url'] = $path;\n\n //form get params as a string\n $paramsString = http_build_query($params);\n\n //form a valid url as a string\n $result = $scheme . '://' . $host . '/?' . $paramsString;\n\n return $result;\n\n}", "function modificar_url($url) {\n $find = array(' ');\n $repl = array('-');\n $url = str_replace ($find, $repl, $url);\n\n $find = array('á', 'é', 'í', 'ó', 'ú', 'ñ');\n $repl = array('a', 'e', 'i', 'o', 'u', 'n');\n $url = str_replace ($find, $repl, utf8_encode($url));\n\n $find = array('0', '1', '2', '3', '4', '5','6', '7', '8', '9');\n $repl = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine');\n $url = str_replace ($find, $repl, utf8_encode($url));\n //utf8_decode();\n // Añaadimos los guiones\n $find = array(' ', '&', '\\r\\n', '\\n', '+');\n $url = str_replace ($find, '-', $url);\n\n // Eliminamos y Reemplazamos demás caracteres especiales\n $find = array('/[^A-Za-z0-9\\-<>\\_]/', '/[\\-]+/', '/<[^>]*>/');\n $repl = array('', '_', '');\n $url = preg_replace ($find, $repl, $url);\n $url= strtolower($url);\n //ucwords($url);\n\n return $url;\n }", "function urlFormat($str) {\n // strip all the evil white spaces\n $str = preg_replace('/\\s*/', '', $str);\n // lowercase the string\n $str = strtolower($str);\n // encode the url to help fight the bad guys.. and maybe you..\n $str = urlencode($str);\n return $str;\n}", "function modificar_url($url) {\n\t\t$find = array(' ');\n\t\t$repl = array('-');\n\t\t$url = str_replace ($find, $repl, $url);\n\t\t$find = array('á', 'é', 'í', 'ó', 'ú', 'ñ');\n\t\t$repl = array('a', 'e', 'i', 'o', 'u', 'n');\n\t\t$url = str_replace ($find, $repl, utf8_encode($url));\n\t\t//utf8_decode();\n\t\t// Añaadimos los guiones\n\t\t$find = array(' ', '&', '\\r\\n', '\\n', '+');\n\t\t$url = str_replace ($find, '-', $url);\n\t\t\n\t\t// Eliminamos y Reemplazamos demás caracteres especiales\n\t\t$find = array('/[^A-Za-z0-9\\-<>\\_]/', '/[\\-]+/', '/<[^>]*>/');\n\t\t$repl = array('', '_', '');\n\t\t$url = preg_replace ($find, $repl, $url);\n\t\tucwords($url);\n\t\n\treturn $url;\n\t}", "function convertURL($url)\n{\n\tif((substr_count($url, 'https://') > 0) or (substr_count($url, 'http://') > 0))\t{ $url = $url; }\n\telse { $url = 'http://'.$url; }\n\treturn($url);\n}", "function normalise_idn_url($url)\n{\n require_code('urls_simplifier');\n $coder_ob = new HarmlessURLCoder();\n return $coder_ob->encode($url);\n}", "function textToUrl($string) {\n //first replace % to %25\n $char = \"%\";\n $replace = \"$25\";\n $string = str_replace($char, $replace, $string);\n\n\n $entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%23', '%5B', '%5D', '%20');\n $replacements = array('!', '*', \"'\", \"(\", \")\", \";\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\", \"/\", \"?\", \"#\", \"[\", \"]\", \" \");\n return str_replace($replacements, $entities, urlencode($string));\n }", "public function formatAsUrl() {\r\n $url_save_chars = array_merge(range('a','z'),range(0,9),['_','-']);\r\n \r\n $specials = array('ä','ü','ö','ß',' ','ç','é','â','ê','î','ô','û','à','è','ì','ò','ù','ë','ï','ü','&');\r\n $specials_replacements = array('ae','ue','oe','ss','_','c','e','a','e','i','o','u','a','e','i','o','u','e','i','u','');\r\n // make everything lowercase and replace umlaute and spaces\r\n $url_save_text = trim(str_replace($specials, $specials_replacements, mb_strtolower($this->text,'UTF-8')));\r\n // remove every invalid character thats left from text (replace with \"-\") \r\n for($i = 0; $i < strlen($url_save_text); $i++){\r\n if(!in_array($url_save_text[$i], $url_save_chars)){\r\n $url_save_text[$i] = \"-\";\r\n }\r\n } \r\n return $url_save_text;\r\n }", "public static function formatValueForUrl($string)\r\n {\r\n (string) $format = strtolower($string);\r\n $format = strip_tags($format);\r\n $format = html_entity_decode($format, null, 'UTF-8');\r\n $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ', 'Ά', 'ά', 'Έ', 'έ', 'Ό', 'ό', 'Ώ', 'ώ', 'Ί', 'ί', 'ϊ', 'ΐ', 'Ύ', 'ύ', 'ϋ', 'ΰ', 'Ή', 'ή');\r\n $b = array('A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o', 'Α', 'α', 'Ε', 'ε', 'Ο', 'ο', 'Ω', 'ω', 'Ι', 'ι', 'ι', 'ι', 'Υ', 'υ', 'υ', 'υ', 'Η', 'η');\r\n $format = str_replace($a, $b, $format);\r\n $format = preg_replace('/[&]/', \"et\", $format);\r\n $format = preg_replace('/[\\']/', \"-\", $format);\r\n $format = preg_replace('/[\\/]/', \"-\", $format);\r\n $format = preg_replace('/[,]/', \"-\", $format);\r\n $format = preg_replace('/[\"]/', \"\", $format);\r\n $format = preg_replace('/[%]/', \"\", $format);\r\n $format = preg_replace('/ /', \"-\", $format);\r\n $format = preg_replace('/[^A-Za-z0-9_-]/', \"\", $format);\r\n $format = preg_replace('/[-]{2,50}/', \"-\", $format);\r\n $format = preg_replace('/[-]$/', \"\", $format);\r\n $format = preg_replace('/^[-]/', \"\", $format);\r\n\r\n\r\n return $format;\r\n }", "function url_decode($str)\n{\n parse_str($str, $output);\n return $output;\n}", "function mr_url($string) { \n\t$find = Array(\"Á\",\"Č\",\"Ď\",\"É\",\"Ě\",\"Í\",\"Ň\",\"Ó\",\"Ř\",\"Š\",\"Ť\",\"Ú\",\"Ů\",\"Ý\",\"Ž\", \"á\", \"č\", \"ď\", \"é\", \"ě\", \"í\", \"ľ\", \"ň\", \"ó\", \"ř\", \"š\", \"ť\", \"ú\", \"ů\", \"ý\", \"ž\", \"_\", \" - \", \" \", \".\", \"ü\", \"ä\", \"ö\"); \n\t$replace = Array(\"a\",\"c\",\"d\",\"e\",\"e\",\"i\",\"n\",\"o\",\"r\",\"s\",\"t\",\"u\",\"u\",\"y\",\"z\", \"a\", \"c\", \"d\", \"e\", \"e\", \"i\", \"l\", \"n\", \"o\", \"r\", \"s\", \"t\", \"u\", \"u\", \"y\", \"z\", \"\", \"-\", \"-\", \"-\", \"u\", \"a\", \"o\"); \n\t$string = preg_replace(\"~%[0-9ABCDEF]{2}~\", \"\", urlencode(str_replace($find, $replace, mb_strtolower($string)))); \n\treturn $string; \n}", "function mgl_instagram_format_link($str)\n{\n // Remove http:// and https:// from url\n $str = preg_replace('#^https?://#', '', $str);\n return $str;\n}", "function format_string_for_url($string) {\n\t\t$string = str_replace(\n\t\t\tarray('&', \"'\", ' ', '/'),\n\t\t\tarray('and', '', '_', '_'),\n\t\t\t$string\n\t\t);\n\t\t$string = strtolower(iconv(\"UTF-8\", \"ASCII//TRANSLIT\", $string));\n\t\treturn $string;\n\t}", "function urls_amigables($url) {\n\n$url = strtolower($url);\n\n//Rememplazamos caracteres especiales latinos\n\n$find = array('á', 'é', 'í', 'ó', 'ú', 'ñ');\n\n$repl = array('a', 'e', 'i', 'o', 'u', 'n');\n\n$url = str_replace ($find, $repl, $url);\n\n// Añaadimos los guiones\n\n$find = array(' ', '&', '\\r\\n', '\\n', '+'); \n$url = str_replace ($find, '-', $url);\n\n// Eliminamos y Reemplazamos demás caracteres especiales\n\n$find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n\n$repl = array('', '-', '');\n\n$url = preg_replace ($find, $repl, $url);\n\nreturn $url;\n\n}", "function __urls_amigables($url) {\n $url = strtolower($url);\n \n //Rememplazamos caracteres especiales latinos\n $find = array('�', '�', '�', '�', '�', '�');\n $repl = array('a', 'e', 'i', 'o', 'u', 'n');\n $url = str_replace ($find, $repl, $url);\n \n // A�aadimos los guiones\n $find = array(' ', '&', '\\r\\n', '\\n', '+');\n $url = str_replace ($find, '-', $url);\n \n // Eliminamos y Reemplazamos dem�s caracteres especiales\n $find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n $repl = array('', '-', '');\n $url = preg_replace ($find, $repl, $url);\n return $url;\n }", "function tourl($strValue)\n{\n return urlencode($strValue);\n}", "function fixUrl($str){\n return urlencode($str);\n}", "function old_convert_urls_into_links(&$text) {\n $text = eregi_replace(\"([[:space:]]|^|\\(|\\[)([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])\",\n \"\\\\1<a href=\\\"\\\\2://\\\\3\\\\4\\\" target=\\\"_blank\\\">\\\\2://\\\\3\\\\4</a>\", $text);\n\n /// eg www.moodle.com\n $text = eregi_replace(\"([[:space:]]|^|\\(|\\[)www\\.([^[:space:]]*)([[:alnum:]#?/&=])\",\n \"\\\\1<a href=\\\"http://www.\\\\2\\\\3\\\" target=\\\"_blank\\\">www.\\\\2\\\\3</a>\", $text);\n }", "function url_amigable($url)\n {\n $url = strtolower($url);\n //Rememplazamos caracteres especiales latinos\n $find = array('á', 'é', 'í', 'ó', 'ú', 'ñ');\n $repl = array('a', 'e', 'i', 'o', 'u', 'n');\n $url = str_replace($find, $repl, $url);\n // Añaadimos los guiones\n $find = array(' ', '&', '\\r\\n', '\\n', '+');\n $url = str_replace($find, '-', $url);\n // Eliminamos y Reemplazamos demás caracteres especiales\n $find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n $repl = array('', '-', '');\n $url = preg_replace($find, $repl, $url);\n\n return $url;\n }", "public function staticStr2Url($str){\n\t\t$str = $this->rus2translit($str);\n\t\t$str = strtolower($str);\n\t\t$str = preg_replace('~[^-a-z0-9_\\.]+~u', '_', $str);\n\t\t$str = trim($str, \"_\");\n\t\treturn $str;\n\t}", "public static function stringToUrl($string) {\n\t\treturn preg_replace('/^-+|-+$/', '', strtolower(preg_replace('/[^a-zA-Z0-9]+/', '-', static::removeAccentsFromString($string))));\n\t}", "function formatUrl($str, $sep='-'){ #convert white space to dashes for urls\n\t$res = strtolower($str);\n\t$res = preg_replace('/[^[:alnum:]]/', ' ', $res);\n\t$res = preg_replace('/[[:space:]]+/', $sep, $res);\n\treturn trim($res, $sep);\n}", "function format_URL($urlStr){\n $parsed = parse_url($urlStr);\n if (empty($parsed['scheme'])) {\n $urlStr = 'http://' . ltrim($urlStr, '/');\n }\n return $urlStr;\n}", "public function makeURL($string) {\n\t\t\tif ($string != '') {\n\t\t\t\t$string = strtolower($string); // make lowercase\n\t\t\t\t$string = str_replace(' ','_',$string); // convert spaces to underscores\n\t\t\t\t$string = preg_replace('/[^\\w\\d_]/si', '', $string); // strip whitespace and numbers\n\t\t\t\treturn $string;\n\t\t\t}\n\t\t}", "function str_to_site($string){\n\t$string = str_replace(\"http://\", \"\", $string);\n\t$string = str_replace(\"https://\", \"\", $string);\n\t$string = str_replace(\"www.\", \"\", $string);\n\treturn \"http://www.\".$string;\n}", "function format_url($file_path)\n{\n $path_component = explode('/', $file_path);\n $path_component = array_map('rawurlencode', $path_component);\n\n return implode('/', $path_component);\n}", "function seo_url($string)\n{\n //Lower case everything\n $string = strtolower($string);\n //Make alphanumeric (removes all other characters)\n $string = preg_replace(\"/[^a-z0-9_\\s-]/\", \"\", $string);\n //Clean up multiple dashes or whitespaces\n $string = preg_replace(\"/[\\s-]+/\", \" \", $string);\n //Convert whitespaces and underscore to dash\n $string = preg_replace(\"/[\\s_]/\", \"-\", $string);\n return strtolower($string);\n}", "function clean_url($str)\n{\n // *shh* convert the arabic and persian numbers in strings, to english integers\n $str = FunctionsHelper::convert_to_english($str);\n\n return str_replace(['٫', '+', '٪', 'ـ', ' ', ':', '\\'', '\"', ',', ';', '<', '>', '`', '&', '?', '(', ')', '$', '-', '_', '*', '/', '\\\\', '.', '@', '=', '[', ']', '|', '~', '^', ';', '#', '%', '!', '{', '}', '٬', 'ِ', 'ْ', 'ّ', 'ُ', 'ً', 'َ', '»', '«', '،', '؛', '؟', 'هٔ', 'ي', 'أ', 'ؤ', 'ئ', 'ء', '،', '‌', '-',':'], ' ', $str);\n}", "function string_url( $p_string ) \r\n{\r\n\t$p_string = rawurlencode( $p_string );\r\n\r\n\treturn $p_string;\r\n}", "function normalize($url) {\n\t\t//$result = preg_replace('%(?<!:/|[^/])/|(?<=&)&|&$|%', '', $url);\n\t\t$result=str_replace(array('://','//',':::'),array(':::','/','://'),$url);\n\t\treturn $result;\n\t}", "public static function url($string) {\n return rawurlencode($string);\n }", "function standardize_url($url) {\n if(empty($url)) return $url;\n return (strstr($url,'http://') OR strstr($url,'https://')) ? $url : 'http://'.$url;\n}", "function url($string) {\n global $links;\n $output = $string;\n if(isset($links) && count($links)) {\n foreach($links as $link) { //cari override\n if($link['url'] == $string)\n $output = $link['override'];\n }\n }\n \n return $output;\n }", "function format_url($url)\n{\n return '/' . trim($url, '/');\n}", "public static function Url($Mixed) {\n if (!is_string($Mixed)) {\n return self::To($Mixed, 'Url');\n } elseif (preg_replace('`([^\\PP])`u', '', 'Test') == '') {\n // No Unicode PCRE support\n $Mixed = strip_tags(html_entity_decode($Mixed, ENT_COMPAT, 'UTF-8'));\n $Mixed = strtr($Mixed, self::$_UrlTranslations);\n $Mixed = preg_replace('/([^\\w\\d_:.])/', ' ', $Mixed); // get rid of punctuation and symbols\n $Mixed = str_replace(' ', '-', trim($Mixed)); // get rid of spaces\n $Mixed = preg_replace('/-+/', '-', $Mixed); // limit to 1 hyphen at a time\n $Mixed = urlencode(strtolower($Mixed));\n return $Mixed;\n } else {\n // Better Unicode support\n $Mixed = strip_tags(html_entity_decode($Mixed, ENT_COMPAT, 'UTF-8'));\n $Mixed = strtr($Mixed, self::$_UrlTranslations);\n $Mixed = preg_replace('`([^\\PP.\\-_])`u', '', $Mixed); // get rid of punctuation\n $Mixed = preg_replace('`([^\\PS+])`u', '', $Mixed); // get rid of symbols\n $Mixed = preg_replace('`[\\s\\-/+]+`u', '-', $Mixed); // replace certain characters with dashes\n $Mixed = urlencode(strtolower($Mixed));\n\t\t\treturn $Mixed;\n }\n }", "function raw_urls_to_links($text){\n\t\t$text = \" $text \";\n\t\t$text = preg_replace('#(https?://[^\\s<>{}()]+[^\\s.,<>{}()])#i', '<a href=\"$1\" rel=\"nofollow\">$1</a>', $text);\n\t\t$text = preg_replace('#(\\s)([a-z0-9\\-]+(?:\\.[a-z0-9\\-\\~]+){2,}(?:/[^ <>{}()\\n\\r]*[^., <>{}()\\n\\r])?)#i', \n\t\t\t'$1<a href=\"http://$2\" rel=\"nofollow\">$2</a>', $text);\n\n\t\t$text = trim($text);\n\t\treturn $text;\n\t}", "function convert_url_to_path($url)\n{\n require_code('urls2');\n return _convert_url_to_path($url);\n}", "function make_url_string($value) {\n\n\t\t// Lower\n\t\t$result = strtolower($value); \n\n\t\t// Replace special chars\n\t\t$char_search = array('�', '�', '�', '�', '�', '�', '�');\n\t\t$char_replace = array('oe', 'ae', 'ue', 'oe', 'ae', 'ue','ss');\n\t\t$result = trim(str_replace($char_search, $char_replace, $result));\n\t\t$result = str_replace(array('!', '\"', '#', '$', '%', '&', '\\'', '(', ')', '*', '+', ',', '.', '/', ':', ';', '_', '@', '\\\\', '<', '=', '>', '?', '[', ']', '^', '`', '{', '|', '}', '~'), ' ', $result);\n\n\n\t\t// Verify characters\n\t\t$result = preg_replace('/([^a-z0-9]+)/', '-', $result);\n\n\n\t\t// Reduce hyphen to one\n\t\t$result = preg_replace(\"#([\\-])+#\", \"\\\\1\", $result);\n\n\n\t\t// No invalid characters at the begin and the end\n\t\twhile(strlen($result) > 0 && substr($result, 0, 1) == '-') {\n\t\t\t$result = substr($result, 1);\n\t\t}\n\n\t\twhile(strlen($result) > 0 && (substr($result, -1) == '-' || in_array(substr($result, -1), $char_search))) {\n\t\t\t$result = substr($result, 0, strlen($result) - 1);\n\t\t}\n\n\t\treturn $result;\t\n\t}", "function wikiurl( $s ) {\n\treturn str_replace( '%2F', '/', rawurlencode( $s ) );\n}", "function url_to(...$arguments):string\n{\n if (count(locales()) < 2) {\n return call_user_func_array('url', $arguments);\n }\n\n return url_add_locale(call_user_func_array('url', $arguments), locale());\n}", "private function convertUrl($url)\n {\n if (0 === strpos($url, 'git+http')) {\n return substr($url, 4);\n }\n\n return $url;\n }", "public static function strToUri(string $str): string\n {\n $str = StringHelper::removeAccents($str);\n $str = strtolower($str);\n $str = preg_replace('/[^0-9a-z\\-]+/', '-', $str);\n $str = preg_replace('/-{2,}/', '-', $str);\n $str = trim($str, '-');\n\n return $str;\n }", "public static function urlify($str) {\n $str = trim($str);\n if (empty($str))\n return '';\n $str = self::stripAccents($str);\n $str = strtolower($str);\n $str = preg_replace('/&.+?;/', '', $str);\n $str = preg_replace(array('/(\\s|[^\\w-]|-|,)+/u'), array('-'), $str);\n $str = trim($str, '-');\n $str = urlencode($str);\n return $str;\n }", "public function parseURL()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/'); //menghapus tanda / di akhir url\n $url = filter_var($url, FILTER_SANITIZE_URL);//memfilter url dari karakter aneh (hack)\n $url = explode('/', $url); //memecah url yang diinput dengan delimiter / dan menjadikannya array\n return $url;\n }\n }", "public function testUrl() {\n $this->assertEquals('http://domain.com?key=ber', Sanitize::url('http://domain.com?key=Über'));\n $this->assertEquals('http%3A%2F%2Fdomain.com%3Fkey%3D%C3%9Cber', Sanitize::url(urlencode('http://domain.com?key=Über')));\n }", "function netejaURL($string,$separador=\"-\")\n {\n $currentMaximumURLLength = 245;\n \n\n\n\t$siaccents = \" .·'ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ\";\n\t$noaccents = \"{$separador}_-_AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn\";\n $string = utf8_decode($string);\n $string = strtr($string, utf8_decode($siaccents), $noaccents);\n $string = strtolower($string);\n\n // Any non valid characters will be treated as _, also remove duplicate _\n \n $string = preg_replace('/[^a-z0-9_]/i', '-', $string);\n $string = preg_replace('/[_]+/i', '_', $string);\n $string = preg_replace('/[-]+/i', '-', $string);\n \n // Cut at a specified length\n \n if (strlen($string) > $currentMaximumURLLength)\n {\n $string = substr($string, 0, $currentMaximumURLLength);\n }\n \n // Remove beggining and ending signs\n \n $string = preg_replace('/[_-]$/i', '', $string);\n $string = preg_replace('/^[_-]/i', '', $string);\n \n return $string;\n}", "function _filterurl($url) {\n return str_replace(\n array('<','>','(',')','#'),\n array('&lt;','&gt;','&#40;','&#41;','&#35;'),\n $url\n );\n }", "function decoupe_url($t) {\n//\treturn($t);\n\t$z = strrpos($t, '/');\n\tif ($z != '') {\n\t\t$t = substr($t, $z+1, strlen($t));\n\t\t// RECHERCHE DU DERNIER ?\n\t\t$z = strrpos($t, '?');\n\t\tif ($z != '') {\n\t\t\treturn(substr($t, 0,$z));\n\t\t} else {\n\t\t\treturn($t);\n\t\t}\n\t} else {\n\t\treturn($t);\n\t}\n}", "static function transURL($s)\n {\n $L['from'] = array(\n 'Ж', 'Ц', 'Ч', 'Ш', 'Щ', 'Ы', 'Ю', 'Я', 'Ї',\n 'ж', 'ц', 'ч', 'ш', 'щ', 'и', 'ю', 'я', 'ї',\n 'А', 'Б', 'В', 'Г', 'Д', 'Е', 'Є', 'З', 'І', 'И', 'Й', 'К',\n 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ф', 'Х', 'Ь',\n 'а', 'б', 'в', 'г', 'д', 'е', 'є', 'з', 'і', 'и', 'й', 'к',\n 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ь',\n '\\'',\n 'Ä', 'Ö', 'Ü', '�', 'ä', 'ö', 'ü', 'ß'\n );\n\n $L['to'] = array(\n \"ZH\", \"TS\", \"CH\", \"SH\", \"SCH\", \"Y\", \"YU\", \"YA\", \"YI\",\n \"zh\", \"ts\", \"ch\", \"sh\", \"sch\", \"y\", \"yu\", \"ya\", \"yi\",\n \"A\", \"B\" , \"V\" , \"G\", \"D\", \"E\", \"E\", \"Z\", \"I\", \"Y\", \"J\", \"K\",\n \"L\", \"M\", \"N\", \"O\", \"P\", \"R\", \"S\", \"T\", \"U\", \"F\", \"H\", \"\",\n \"a\", \"b\", \"v\", \"g\", \"d\", \"e\", \"e\", \"z\", \"i\", \"y\", \"j\", \"k\",\n \"l\", \"m\", \"n\", \"o\", \"p\", \"r\", \"s\", \"t\", \"u\", \"f\", \"h\", \"\",\n \"y\",\n 'A', 'O' ,'U', 'SS', 'a', 'o', 'u', 'ss'\n );\n\n $r = str_replace($L['uk'], $L['en'], $s);\n\n $r = mb_strtolower($r);\n $r = preg_replace(array('/\\s/', '/[\\W]/', ), array('-', '-'), $r);\n $r = preg_replace('/[_\\-]{2,}/', '-', $r);\n $r = preg_replace(array('/^\\W/', '/\\W$/', ), array('', ''), $r);\n $r = preg_replace('/^(\\d){1}/', '-$1', $r); // leading digit\n\n return $r;\n }", "function fixup_protocolless_urls($in)\n{\n require_code('urls2');\n return _fixup_protocolless_urls($in);\n}", "function cleanStringUrl($cadena){\n\t\t$cadena = strtolower($cadena);\n\t\t$cadena = trim($cadena);\n\t\t$cadena = strtr($cadena,\n\t\t\t\t\t\t\t\t\"ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ\",\n\t\t\t\t\t\t\t\t\"aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn\");\n\t\t$cadena = strtr($cadena,\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"abcdefghijklmnopqrstuvwxyz\");\n\t\t$cadena = preg_replace('#([^.a-z0-9]+)#i', '-', $cadena);\n\t\t$cadena = preg_replace('#-{2,}#','-',$cadena);\n \t$cadena = preg_replace('#-$#','',$cadena);\n \t\t$cadena = preg_replace('#^-#','',$cadena);\n\t\treturn $cadena;\n\t}", "function clean_urls($text) {\r\n\t$text = strip_tags(lowercase($text));\r\n\t$code_entities_match = array(' ?',' ','--','&quot;','!','@','#','$','%',\r\n '^','&','*','(',')','+','{','}','|',':','\"',\r\n '<','>','?','[',']','\\\\',';',\"'\",',','/',\r\n '*','+','~','`','=','.');\r\n\t$code_entities_replace = array('','-','-','','','','','','','','','','','',\r\n '','','','','','','','','','','','','');\r\n\t$text = str_replace($code_entities_match, $code_entities_replace, $text);\r\n\t$text = urlencode($text);\r\n\t$text = str_replace('--','-',$text);\r\n\t$text = rtrim($text, \"-\");\r\n\treturn $text;\r\n}", "public function formatUrlKey($str)\n {\n return $this->filter->translitUrl($str);\n }", "public function parseUrl()\n { #Explode para transformar em array, seprando por /, rtrim para retirar os espaços vazios, filter_ sanitize_url fucao do php para retirar caractres ilegais \n return explode(\"/\",rtrim($_GET['url']),FILTER_SANITIZE_URL);\n }", "function convertString($str)\n{\n\tif (!is_utf8($str))\n\t{\n\t\t$str = utf8_encode($str);\n\t}\n\n\t// clean up the html\n\t$str = cleanHTML($str);\n\n\t// return the url encoded string\n\treturn urlencode($str);\n}", "public static function seoUrl($string) {\n //Lower case everything\n $string = strtolower($string);\n //Make alphanumeric (removes all other characters)\n $string = preg_replace(\"/[^a-z0-9_\\s-]/\", \"\", $string);\n //Clean up multiple dashes or whitespaces\n $string = preg_replace(\"/[\\s-]+/\", \" \", $string);\n //Convert whitespaces and underscore to dash\n $string = preg_replace(\"/[\\s_]/\", \"-\", $string);\n return $string;\n }", "function Url($id,$title,$foroid = null){\n\n if (null == $foroid) {\n $title = $id . '-'. $title;\n } else {\n $title = $id .'-'. $foroid .'-'. $title;\n }\n\n $title = trim($title);\n\n $title = str_replace(\n array('á', 'à', 'ä', 'â', 'ª', 'Á', 'À', 'Â', 'Ä'),\n 'a',\n $title\n );\n\n $title = str_replace(\n array('é', 'è', 'ë', 'ê', 'É', 'È', 'Ê', 'Ë'),\n 'e',\n $title\n );\n\n $title = str_replace(\n array('í', 'ì', 'ï', 'î', 'Í', 'Ì', 'Ï', 'Î'),\n 'i',\n $title\n );\n\n $title = str_replace(\n array('ó', 'ò', 'ö', 'ô', 'Ó', 'Ò', 'Ö', 'Ô'),\n 'o',\n $title\n );\n\n $title = str_replace(\n array('ú', 'ù', 'ü', 'û', 'Ú', 'Ù', 'Û', 'Ü'),\n 'u',\n $title\n );\n\n $title = str_replace(\n array('ñ', 'Ñ', 'ç', 'Ç'),\n array('n', 'N', 'c', 'C',),\n $title\n );\n\n //Esta parte se encarga de eliminar cualquier caracter extraño\n $title = str_replace(\n array(\"\\\\\", \"¨\", \"º\", \"-\", \"~\",\n \"#\", \"@\", \"|\", \"!\", \"\\\"\",\n \"·\", \"$\", \"%\", \"&\", \"/\",\n \"(\", \")\", \"?\", \"'\", \"¡\",\n \"¿\", \"[\", \"^\", \"<code>\", \"]\",\n \"+\", \"}\", \"{\", \"¨\", \"´\",\n \">\", \"<\", \";\", \",\", \":\",\n \".\", \" \"),\n '-',\n $title\n );\n\n return $title;\n }", "function esc_url_raw($url, $protocols = \\null)\n {\n }", "public function autoLinkify($str)\n {\n return preg_replace_callback('/(?i)\\b((?:((?:ht|f)tps?:(?:\\/{1,3}|[a-z0-9%]))|[a-z0-9.\\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|Ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)\\/)(?:[^\\s()<>{}\\[\\]]+|\\([^\\s()]*?\\([^\\s()]+\\)[^\\s()]*?\\)|\\([^\\s]+?\\))+(?:\\([^\\s()]*?\\([^\\s()]+\\)[^\\s()]*?\\)|\\([^\\s]+?\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?«»“”‘’])|(?:(?<!@)[a-z0-9]+(?:[.\\-][a-z0-9]+)*[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|Ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)\\b\\/?(?!@)))/i', \"self::processLinkify\", $str);\n }", "public function formatUrlKey(string $str): string\n {\n return $this->filter->translitUrl($str);\n }", "public function seoUrl($string_main) \n {\n $string = substr($string_main,0,50);\n //Lower case everything\n $string = strtolower($string);\n //Make alphanumeric (removes all other characters)\n $string = str_slug($string,'-');\n return $string;\n }", "public function fromString($url)\n {\n return $this->urlizeRecursive($url);\n }", "function wac_create_link($string) {\n\t$url = '@(http)?(s)?(://)?(([a-zA-Z])([-\\w]+\\.)+([^\\s\\.]+[^\\s]*)+[^,.\\s])@';\n\treturn preg_replace($url, 'http$2://$4', $string);\n}", "private function httpsToHttp($url)\n {\n return str_replace('https://', 'http://', $url);\n }", "private function checkFormat($url){\n if(stripos($url, 'http://') !== false){\n return $url;\n } else {\n return 'http://'.$url;\n }\n }", "private function format_url($url) {\n\t\treturn (strpos($url, 'http') !== 0) ? 'https://' . $url : $url;\n\t}", "public static function formatUrl($Value) {\n $format = array();\n $format['a'] = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜüÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿRr\"!@#$%&*()_-+={[}]/?;:.,\\\\\\'<>°ºª';\n $format['b'] = 'aaaaaaaceeeeiiiidnoooooouuuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr ';\n $data = strtr(utf8_decode($Value), utf8_decode($format['a']), $format['b']);\n $data = strip_tags(trim($data));\n $data = str_replace(' ', '-', $data);\n $data = preg_replace('/[\\-]{2,}/ui', '-', $data);\n return strtolower(utf8_encode($data));\n }", "function MakeURI($url, $uri = null)\r\n{\r\n\t$ret = str_replace(' ', '%20', $url);\r\n\r\n\tif (is_array($uri))\r\n\t{\r\n\t\t$start = (strpos($ret, \"?\") > 0);\r\n\t\tforeach ($uri as $key => $val)\r\n\t\t{\r\n\t\t\tif (isset($val))\r\n\t\t\t{\r\n\t\t\t\t$ret .= ($start ? '&amp;' : '?').\"{$key}={$val}\";\r\n\t\t\t\t$start = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $ret;\r\n}", "function url_slug($string = \"\")\n{\n if (!is_string($string)) {\n $string = \"\";\n }\n\n $s = trim(mb_strtolower($string));\n \n // Replace azeri characters\n $s = str_replace(\n array(\"ü\", \"ö\", \"ğ\", \"ı\", \"ə\", \"ç\", \"ş\"), \n array(\"u\", \"o\", \"g\", \"i\", \"e\", \"c\", \"s\"), \n $s);\n \n // Replace cyrilic characters\n $cyr = array('а','б','в','г','д','е','ё','ж','з','и','й','к','л','м',\n 'н','о','п','р','с','т','у', 'ф','х','ц','ч','ш','щ','ъ', \n 'ы','ь', 'э', 'ю','я');\n $lat = array('a','b','v','g','d','e','io','zh','z','i','y','k','l',\n 'm','n','o','p','r','s','t','u', 'f', 'h', 'ts', 'ch',\n 'sh', 'sht', 'a', 'i', 'y', 'e','yu', 'ya');\n $s = str_replace($cyr, $lat, $s);\n\n // Replace all other characters\n $s = preg_replace(\"/[^a-z0-9]/\", \"-\", $s);\n\n // Replace consistent dashes\n $s = preg_replace(\"/-{2,}/\", \"-\", $s);\n\n return trim($s, \"-\");\n}", "function sUrl( $url )\r\n\t\t{\r\n\t\t return filter_var( $url, FILTER_SANITIZE_URL );\r\n\t\t \r\n\t\t}", "function url_to_link($str)\n{\n $pattern = \"#(\\bhttps?://\\S+\\b)#\";\n return preg_replace_callback($pattern, 'url_to_link_callback', $str);\n}", "private function make_clickable_url($string){\n\t //The Regular Expression filter\n\t $reg_exUrl = \"/(?i)\\b((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\\\".,<>?«»“”‘’]))/\";\n\t \n\t // Check if there is a url in the text\n\t if(preg_match($reg_exUrl, $string, $url)) {\n\t \n\t if(strpos( $url[0], \":\" ) === false){\n\t $link = 'http://'.$url[0];\n\t }else{\n\t $link = $url[0];\n\t }\n\t \n\t // make the urls hyper links\n\t $string = preg_replace($reg_exUrl, '<a href=\"'.$link.'\" title=\"'.$url[0].'\" target=\"_blank\">'.$url[0].'</a>', $string);\n\t \n\t }\n\t \n\t return $string;\n\t}", "public function to_uri($string)\n {\n }", "static function url(string $s, string $separator = '-', bool $toAscii = true): string {\n return self::slug($s, $separator, $toAscii);\n }", "function cms_url_decode_post_process($url_part)\n{\n if ((strpos($url_part, ':') !== false) && (can_try_url_schemes())) {\n $url_part = str_replace(array(':uhash:', ':amp:', ':slash:'), array('#', '&', '/'), $url_part);\n //$url_part = str_replace('(colon)', ':', $url_part);\n }\n return $url_part;\n}", "public function decodeUriSafe( string $value ): string;", "public function perfect_url($u,$b){\n $bp=parse_url($b);\n if (isset($bp['path'])){\n if(($bp['path']!=\"/\" && $bp['path']!=\"\") || $bp['path']=='' ){\n if($bp['scheme']==\"\"){\n $scheme=\"http\";\n }else{\n $scheme=$bp['scheme'];\n }\n $b=$scheme.\"://\".$bp['host'].\"/\";\n }\n }\n if(substr($u,0,2)==\"//\"){\n $u=\"http:\".$u;\n }\n if(substr($u,0,4)!=\"http\"){\n $u=$this->rel2abs($u,$b);\n }\n return $u;\n }", "function urlencode_url($string) {\n if(valid_url($string)) {\n return urlencode(base64_encode($string));\n } else {\n return $string;\n }\n}", "private function parseUrl($url): string {\n $splittedUrl = explode('/', $url);\n $newUrl = '';\n foreach ($splittedUrl as $partUrl) {\n if($partUrl !== '') {\n if($partUrl[0] === '{' && $partUrl[strlen($partUrl) - 1] === '}') {\n $newUrl.= '/VALUE';\n continue;\n }\n $newUrl .= '/' . $partUrl;\n }\n }\n return $newUrl;\n }", "function normalize_url($url) {\n\n $url = trim($url);\n if (!$url) return $url;\n\n if (preg_match('~^([a-z0-9_-]+)://~i', $url)) {\n return $url;\n }\n\n return 'http://' . $url;\n }", "function url_slug($string = \"\", $dashes = \"-\")\n{\n if (!is_string($string)) {\n $string = \"\";\n }\n\n $s = trim(mb_strtolower($string));\n\n // Replace azeri characters\n $s = str_replace(\n array(\"ü\", \"ö\", \"ğ\", \"ı\", \"ə\", \"ç\", \"ş\"),\n array(\"u\", \"o\", \"g\", \"i\", \"e\", \"c\", \"s\"),\n $s);\n\n // Replace cyrilic characters\n $cyr = array('а', 'б', 'в', 'г', 'д', 'е', 'ё', 'ж', 'з', 'и', 'й', 'к', 'л', 'м',\n 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', 'ъ',\n 'ы', 'ь', 'э', 'ю', 'я');\n $lat = array('a', 'b', 'v', 'g', 'd', 'e', 'io', 'zh', 'z', 'i', 'y', 'k', 'l',\n 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'h', 'ts', 'ch',\n 'sh', 'sht', 'a', 'i', 'y', 'e', 'yu', 'ya');\n $s = str_replace($cyr, $lat, $s);\n\n // Replace all other characters\n $s = preg_replace(\"/[^a-z0-9]/\", \"$dashes\", $s);\n\n // Replace consistent dashes\n $s = preg_replace(\"/-{2,}/\", \"$dashes\", $s);\n\n return trim($s, \"$dashes\");\n}", "function clean_url($text)\n\t\t{\n\t\t\t$text=strtolower($text);\n\t\t\t$code_entities_match = array(' ','--','&quot;','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','\"','<','>','?','[',']','\\\\',';',\"'\",',','.','/','*','+','~','`','=');\n\t\t\t$code_entities_replace = array('-','-','','','','','','','','','','','','','','','','','','','','','','','','');\n\t\t\t$text = str_replace($code_entities_match, $code_entities_replace, $text);\n\t\t\treturn $text;\n\t\t}", "function prepareURL($_sUrl) {\n $sUrl = trim($_sUrl);\n if(strlen($sUrl) > 0) {\n //add protocol if necessary\n if(strpos($sUrl, '://') === FALSE) {\n $sUrl = 'http://'.$sUrl;\n }\n //remove ancors if necessary\n if(strpos($sUrl, '#') !== FALSE) {\n list($sUrl) = explode('#', $sUrl, 2);\n }\n //remove after-? marks\n if(strpos($sUrl, '?') !== FALSE) {\n list($sUrl) = explode('?', $sUrl, 2);\n }\n }\n return $sUrl;\n}", "function url_decode($text)\n {\n return base64_decode(str_pad(strtr($text, '-_', '+/'), strlen($text) % 4, '=', STR_PAD_RIGHT));\n }", "public function url()\n\t{\n\t\treturn $this->filter(FILTER_SANITIZE_URL);\n\t}", "public function formatUrlKey($string)\n {\n return $this->filter->translitUrl($string);\n }", "static public function parseURL($text)\n\t{\n\t $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n\t // trim\n\t $text = trim($text, '-');\n\n\t // transliterate\n\t $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n\t // lowercase\n\t $text = strtolower($text);\n\n\t // remove unwanted characters\n\t $text = preg_replace('~[^-\\w]+~', '', $text);\n\n\t if (empty($text))\n\t {\n\t\treturn 'n-a';\n\t }\n\n\t return $text;\n\t}", "public static function str_url(string $url): string {\n\t\t\treturn preg_replace('#/+#', \"/\", trim(str_replace(\"\\\\\", \"/\", str_replace(\"..\", \"\", $url)), \"/ \"));\n\t\t}", "function constructURL($object);", "private function wrapURL($value){\n if( $value ){\n \t\t\treturn url($value);\n \t\t}\n\n \t\treturn \"\";\n }", "function convert_to_links($msg){\r\n\t\t$final_message = preg_replace(array('/(?i)\\b((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?«»“”‘’]))/', '/(^|[^a-z0-9_])@([a-z0-9_]+)/i', '/(^|[^a-z0-9_])#([a-z0-9_]+)/i'), array('<a href=\"$1\" target=\"_blank\">$1</a>', '$1<a href=\"\">@$2</a>', '$1<a href=\"index.php?hashtag=$2\">#$2</a>'), $msg);\r\n\t\treturn $final_message;\r\n\t}", "function make_link($string)\n {\n $string = ' ' . $string;\n $string = preg_replace_callback(\"#(^|[\\n ])([\\w]+?://.*?[^ \\\"\\n\\r\\t<]*)#is\", \"shorten_link\", $string);\n $string = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[\\w\\-]+\\.[\\w\\-.\\~]+(?:/[^ \\\"\\t\\n\\r<]*)?)#is\", \"$1<a href=\\\"http://$2\\\">$2</a>\", $string);\n #$string = preg_replace(\"#(^|[\\n ])([a-z0-9&\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)*[\\w]+)#i\", \"\\\\1<a href=\\\"mailto:\\\\2@\\\\3\\\">\\\\2@\\\\3</a>\", $string);\n $string = mb_substr($string, 1, mb_strlen($string, CHARSET), CHARSET);\n return $string;\n }", "function url($url){\n $url=ereg_replace(\"[&?]+$\", \"\", $url);\n \n $url .= ( strpos($url, \"?\") != false ? \"&\" : \"?\" ).urlencode($this->name).\"=\".$this->id;\n \n return $url;\n }", "function parse_urls($str, $maxurl_len = 35, $target = \"_blank\")\r\n\t{\r\n\t\tif(preg_match_all('/((ht|f)tps?:\\/\\/([\\w\\.]+\\.)?[\\w-]+(\\.[a-zA-Z]{2,4})?[^\\s\\r\\n\\(\\)\"\\'<>\\,\\!]+)/si', $str, $urls))\r\n\t\t{\r\n\t\t\t$offset1 = ceil(0.65 * $maxurl_len) - 2;\r\n\t\t\t$offset2 = ceil(0.30 * $maxurl_len) - 1;\r\n\r\n\t\t\tforeach(array_unique($urls[1]) AS $url)\r\n\t\t\t{\r\n\t\t\t\tif ($maxurl_len AND strlen($url) > $maxurl_len)\r\n\t\t\t\t{\r\n\t\t\t\t\t$urltext = substr($url, 0, $offset1) . '...' . substr($url, -$offset2);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$urltext = $url;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$str = str_replace($url, '<a href=\"'. $url .'\" target=\"'. $target .'\" title=\"'. $url .'\">'. $urltext .'</a>', $str);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $str;\r\n\t}", "public static function normalizarUrl($url){\n\t\t$originales = 'ÀÁÈÉÌÍÑÒÓÙÚÜàáèéìíñòóùúü&.,¿?!¡-';\n\t $modificadas = 'aaeeiinoouuuaaeeiinoouuuy_______';\n\t $cadena = utf8_decode($url);\n\t $cadena = strtr($cadena, utf8_decode($originales), $modificadas);\n\t $cadena = strtolower($cadena);\n\t $cadena = str_replace(' ', '_', $cadena);\n\t $cadena = str_replace('__', '_', $cadena);\n\t $cadena = str_replace('___', '_', $cadena);\n\t return utf8_encode(Yii::app()->Herramientas->clearSpecial($cadena));\n\t}", "public function social_link_decode ($sURL) {\n\t $specialis_karekterek = array('HRNCT001'=>'&', 'HRNCT002'=>'@', 'HRNCT003'=>';', 'HRNCT004'=>' ', 'HRNCT005'=>'%', 'HRNCT006'=>'?', 'HRNCT007'=>'=','HRNCT008'=>'+', 'HRNCT009'=>'$');\n $data = strtr($sURL, $specialis_karekterek);\n\t return $data;\n }", "function prepare_url($uri = ''): string\n {\n if ($uri === 'http://' or $uri === 'https://' or $uri === '') {\n return '';\n }\n\n /**\n * Converts double slashes in a string to a single slash,\n * except those found in http://\n *\n * http://www.some-site.com//index.php\n *\n * becomes:\n *\n * http://www.some-site.com/index.php\n */\n $uri = preg_replace('#(^|[^:])//+#', '\\\\1/', $uri);\n\n $url = parse_url($uri);\n\n if ( ! $url or ! isset($url[ 'scheme' ])) {\n return (is_https() ? 'https://' : 'http://') . $uri;\n }\n\n return $uri;\n }", "public function url();", "public function url();", "public function url();" ]
[ "0.7457937", "0.73514843", "0.701122", "0.68946594", "0.67897123", "0.6719183", "0.6685257", "0.66183525", "0.6611778", "0.66002846", "0.6581184", "0.6573557", "0.6547947", "0.6532781", "0.6514709", "0.6494908", "0.6485179", "0.64815795", "0.6431849", "0.64270574", "0.64109236", "0.64047295", "0.6393651", "0.63835377", "0.6372753", "0.634996", "0.6348356", "0.63455695", "0.633516", "0.6323935", "0.631314", "0.6284327", "0.6255278", "0.6217211", "0.62003624", "0.61815125", "0.61703676", "0.61404645", "0.6138849", "0.61074054", "0.6081312", "0.6078758", "0.60623544", "0.60302377", "0.59995556", "0.5988553", "0.5983788", "0.5980026", "0.5976458", "0.5974504", "0.5965718", "0.5944099", "0.5935155", "0.593333", "0.5925286", "0.59237933", "0.592246", "0.59203386", "0.59179837", "0.59134567", "0.59131116", "0.5908305", "0.58997846", "0.58960485", "0.5895962", "0.5895586", "0.58916587", "0.5889493", "0.58851403", "0.5879576", "0.58787775", "0.58780473", "0.58697957", "0.586777", "0.58471763", "0.58355", "0.5831424", "0.5829747", "0.582891", "0.5828241", "0.5816993", "0.58159417", "0.5812394", "0.58090866", "0.57913333", "0.57836884", "0.5783139", "0.5775174", "0.57710975", "0.57615083", "0.5758944", "0.57576483", "0.5757285", "0.57509166", "0.5750051", "0.57458293", "0.5732615", "0.57324356", "0.57295096", "0.57295096", "0.57295096" ]
0.0
-1
/ Limpia el html de una cadena y permite recortarla
function limpiarHTML($cadena,$largo=0){ $cadena = preg_replace(array('@<style[^>]*?>.*?</style>@si','@<[\/\!]*?[^<>]*?>@si'),array("",""),$cadena); if($largo!=0){ $cadena = substr ($cadena, 0,$largo); } return $cadena; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadHTML();", "public function getHTML();", "abstract function get_html();", "public abstract function get_html();", "function _getContentHTML()\n\t{\n\t\tinclude_once ($_SERVER['DOCUMENT_ROOT'] . \"/webEdition/we/include/we_classes/html/we_multibox.inc.php\");\n\t\tinclude_once ($_SERVER['DOCUMENT_ROOT'] . \"/webEdition/we/include/we_classes/html/we_htmlSelect.inc.php\");\n\t\tinclude_once ($_SERVER[\"DOCUMENT_ROOT\"] . \"/webEdition/we/include/we_classes/html/we_button.inc.php\");\n\t\t\n\t\t$we_button = new we_button();\n\t\t\n\t\t// Suorce Directory\n\t\t$_from_button = we_hasPerm(\"CAN_SELECT_EXTERNAL_FILES\") ? $we_button->create_button(\n\t\t\t\t\"select\", \n\t\t\t\t\"javascript:we_cmd('browse_server', 'document.we_form.elements[\\\\'from\\\\'].value', 'folder', document.we_form.elements['from'].value)\") : \"\";\n\t\t\n\t\t$_input = htmlTextInput(\"from\", 30, $this->from, \"\", \"readonly\", \"text\", 300);\n\t\t\n\t\t$_importFrom = htmlFormElementTable(\n\t\t\t\t$_input, \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importFrom\"], \n\t\t\t\t\"left\", \n\t\t\t\t\"defaultfont\", \n\t\t\t\tgetPixel(10, 1), \n\t\t\t\t$_from_button, \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\t0);\n\t\t\n\t\t// Destination Directory\n\t\t$_to_button = $we_button->create_button(\n\t\t\t\t\"select\", \n\t\t\t\t\"javascript:we_cmd('openDirselector',document.we_form.elements['to'].value,'\" . FILE_TABLE . \"','document.we_form.elements[\\\\'to\\\\'].value','document.we_form.elements[\\\\'toPath\\\\'].value','','','0')\");\n\t\t\n\t\t//$_hidden = hidden(\"to\",$this->to);\n\t\t//$_input = htmlTextInput(\"toPath\",30,id_to_path($this->to),\"\",'readonly=\"readonly\"',\"text\",300);\n\t\t\n\n\t\t//$_importTo = htmlFormElementTable($_input, $GLOBALS[\"l_siteimport\"][\"importTo\"], \"left\", \"defaultfont\", getPixel(10, 1), $_to_button, $_hidden, \"\", \"\", 0);\n\t\t\n\n\t\t$yuiSuggest = & weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId(\"DirPath\");\n\t\t$yuiSuggest->setContentType(\"folder\");\n\t\t$yuiSuggest->setInput(\"toPath\", id_to_path($this->to));\n\t\t$yuiSuggest->setLabel($GLOBALS[\"l_siteimport\"][\"importTo\"]);\n\t\t$yuiSuggest->setMaxResults(10);\n\t\t$yuiSuggest->setMayBeEmpty(0);\n\t\t$yuiSuggest->setResult(\"to\", $this->to);\n\t\t$yuiSuggest->setSelector(\"Dirselector\");\n\t\t$yuiSuggest->setWidth(300);\n\t\t$yuiSuggest->setSelectButton($_to_button, 10);\n\t\t\n\t\t$_importTo = $yuiSuggest->getYuiFiles() . $yuiSuggest->getHTML() . $yuiSuggest->getYuiCode();\n\t\t\n\t\t// Checkboxes\n\t\t\n\n\t\t$weoncklick = \"if(this.checked && (!this.form.elements['htmlPages'].checked)){this.form.elements['htmlPages'].checked = true;}\";\n\t\t$weoncklick .= ((!we_hasPerm(\"NEW_HTML\")) && we_hasPerm(\"NEW_WEBEDITIONSITE\")) ? \"if((!this.checked) && this.form.elements['htmlPages'].checked){this.form.elements['htmlPages'].checked = false;}\" : \"\";\n\t\t\n\t\t$_images = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_GRAFIK\") ? $this->images : false, \n\t\t\t\t\"images\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importImages\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_GRAFIK\"));\n\t\t\n\t\t$_htmlPages = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_HTML\") ? $this->htmlPages : ((we_hasPerm(\"NEW_WEBEDITIONSITE\") && $this->createWePages) ? true : false), \n\t\t\t\t\"htmlPages\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importHtmlPages\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"if(this.checked){this.form.elements['_createWePages'].disabled=false;document.getElementById('label__createWePages').style.color='black';}else{this.form.elements['_createWePages'].disabled=true;document.getElementById('label__createWePages').style.color='gray';}\", \n\t\t\t\t!we_hasPerm(\"NEW_HTML\"));\n\t\t$_createWePages = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_WEBEDITIONSITE\") ? $this->createWePages : false, \n\t\t\t\t\"createWePages\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"createWePages\"] . \"&nbsp;&nbsp;\", \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t$weoncklick, \n\t\t\t\t!we_hasPerm(\"NEW_WEBEDITIONSITE\"));\n\t\t$_flashmovies = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_FLASH\") ? $this->flashmovies : false, \n\t\t\t\t\"flashmovies\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importFlashmovies\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_FLASH\"));\n\t\t$_quicktime = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_QUICKTIME\") ? $this->quicktime : false, \n\t\t\t\t\"quicktime\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importQuicktime\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_QUICKTIME\"));\n\t\t$_jss = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_JS\") ? $this->js : false, \n\t\t\t\t\"j\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importJS\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_JS\"));\n\t\t$_css = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_CSS\") ? $this->css : false, \n\t\t\t\t\"css\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importCSS\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_CSS\"));\n\t\t$_text = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_TEXT\") ? $this->text : false, \n\t\t\t\t\"text\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importText\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_TEXT\"));\n\t\t$_others = we_forms::checkboxWithHidden(\n\t\t\t\twe_hasPerm(\"NEW_SONSTIGE\") ? $this->other : false, \n\t\t\t\t\"other\", \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"importOther\"], \n\t\t\t\tfalse, \n\t\t\t\t\"defaultfont\", \n\t\t\t\t\"\", \n\t\t\t\t!we_hasPerm(\"NEW_SONSTIGE\"));\n\t\t\n\t\t$_wePagesOptionButton = $we_button->create_button(\n\t\t\t\t\"preferences\", \n\t\t\t\t\"javascript:we_cmd('siteImportCreateWePageSettings')\", \n\t\t\t\ttrue, \n\t\t\t\t150, \n\t\t\t\t22, \n\t\t\t\t\"\", \n\t\t\t\t\"\", \n\t\t\t\tfalse, \n\t\t\t\ttrue, \n\t\t\t\t\"\", \n\t\t\t\ttrue);\n\t\t// Depth\n\t\t$_select = htmlSelect(\n\t\t\t\t\"depth\", \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"-1\" => $GLOBALS[\"l_siteimport\"][\"nolimit\"], \n\t\t\t\t\t\t0, \n\t\t\t\t\t\t1, \n\t\t\t\t\t\t2, \n\t\t\t\t\t\t3, \n\t\t\t\t\t\t4, \n\t\t\t\t\t\t5, \n\t\t\t\t\t\t6, \n\t\t\t\t\t\t7, \n\t\t\t\t\t\t8, \n\t\t\t\t\t\t9, \n\t\t\t\t\t\t10, \n\t\t\t\t\t\t11, \n\t\t\t\t\t\t12, \n\t\t\t\t\t\t13, \n\t\t\t\t\t\t14, \n\t\t\t\t\t\t15, \n\t\t\t\t\t\t16, \n\t\t\t\t\t\t17, \n\t\t\t\t\t\t18, \n\t\t\t\t\t\t19, \n\t\t\t\t\t\t20, \n\t\t\t\t\t\t21, \n\t\t\t\t\t\t22, \n\t\t\t\t\t\t23, \n\t\t\t\t\t\t24, \n\t\t\t\t\t\t25, \n\t\t\t\t\t\t26, \n\t\t\t\t\t\t27, \n\t\t\t\t\t\t28, \n\t\t\t\t\t\t29, \n\t\t\t\t\t\t30\n\t\t\t\t), \n\t\t\t\t1, \n\t\t\t\t$this->depth, \n\t\t\t\tfalse, \n\t\t\t\t\"\", \n\t\t\t\t\"value\", \n\t\t\t\t150);\n\t\t\n\t\t$_depth = htmlFormElementTable($_select, $GLOBALS[\"l_siteimport\"][\"depth\"]);\n\t\t$maxallowed = round(getMaxAllowedPacket($GLOBALS['DB_WE']) / (1024 * 1024));\n\t\t$maxallowed = $maxallowed ? $maxallowed : 20;\n\t\t$maxarray = array(\n\t\t\t\"0\" => $GLOBALS[\"l_siteimport\"][\"nolimit\"], \"0.5\" => \"0.5\"\n\t\t);\n\t\tfor ($i = 1; $i <= $maxallowed; $i++) {\n\t\t\t$maxarray[\"\" . $i] = $i;\n\t\t}\n\t\t\n\t\t// maxSize\n\t\t$_select = htmlSelect(\"maxSize\", $maxarray, 1, $this->maxSize, false, \"\", \"value\", 150);\n\t\t$_maxSize = htmlFormElementTable($_select, $GLOBALS[\"l_siteimport\"][\"maxSize\"]);\n\t\t\n\t\t$thumbsarray = array();\n\t\t$GLOBALS[\"DB_WE\"]->query(\"SELECT ID,Name FROM \" . THUMBNAILS_TABLE . \" ORDER BY Name\");\n\t\twhile ($GLOBALS[\"DB_WE\"]->next_record()) {\n\t\t\t$thumbsarray[$GLOBALS[\"DB_WE\"]->f(\"ID\")] = $GLOBALS[\"DB_WE\"]->f(\"Name\");\n\t\t}\n\t\t$_select = htmlSelect(\"thumbs[]\", $thumbsarray, 5, $this->thumbs, true, \"\", \"value\", 150);\n\t\t$_thumbs = htmlFormElementTable($_select, $GLOBALS[\"l_import_files\"][\"thumbnails\"]);\n\t\t\n\t\t$parts = array();\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"dirs_headline\"], \n\t\t\t\t\t\t\"html\" => $_importFrom . getPixel(20, 5) . $_importTo, \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t/* Create Main Table */\n\t\t$_attr = array(\n\t\t\t\"border\" => \"0\", \"cellpadding\" => \"0\", \"cellspacing\" => \"0\"\n\t\t);\n\t\t$_tableObj = new we_htmlTable($_attr, 6, 3);\n\t\t\n\t\t$_tableObj->setCol(0, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_images);\n\t\t$_tableObj->setCol(1, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_flashmovies);\n\t\t$_tableObj->setCol(2, 0, array(\n\t\t\t\"colspan\" => \"2\"\n\t\t), $_htmlPages);\n\t\t$_tableObj->setCol(3, 0, null, \"\");\n\t\t$_tableObj->setCol(3, 1, null, $_createWePages);\n\t\t$_tableObj->setCol(4, 1, null, $_wePagesOptionButton);\n\t\t$_tableObj->setCol(5, 0, null, getPixel(20, 1));\n\t\t$_tableObj->setCol(5, 1, null, getPixel(200, 1));\n\t\t$_tableObj->setCol(5, 2, null, getPixel(180, 1));\n\t\t$_tableObj->setCol(0, 2, null, $_jss);\n\t\t$_tableObj->setCol(1, 2, null, $_css);\n\t\t$_tableObj->setCol(2, 2, null, $_text);\n\t\t$_tableObj->setCol(3, 2, null, $_others);\n\t\t$_tableObj->setCol(4, 2, array(\n\t\t\t\"valign\" => \"top\"\n\t\t), $_quicktime);\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"import\"], \n\t\t\t\t\t\t\"html\" => $_tableObj->getHtmlCode(), \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t$_tableObj = new we_htmlTable($_attr, 2, 2);\n\t\t$_tableObj->setCol(0, 0, null, $_depth);\n\t\t$_tableObj->setCol(0, 1, null, $_maxSize);\n\t\t$_tableObj->setCol(1, 0, null, getPixel(220, 1));\n\t\t$_tableObj->setCol(1, 1, null, getPixel(180, 1));\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_siteimport\"][\"limits\"], \n\t\t\t\t\t\t\"html\" => $_tableObj->getHtmlCode(), \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\t$content = htmlAlertAttentionBox($GLOBALS[\"l_import_files\"][\"sameName_expl\"], 2, \"410\");\n\t\t$content .= getPixel(200, 10);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"overwrite\", \n\t\t\t\t($this->sameName == \"overwrite\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_overwrite\"]);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"rename\", \n\t\t\t\t($this->sameName == \"rename\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_rename\"]);\n\t\t$content .= we_forms::radiobutton(\n\t\t\t\t\"nothing\", \n\t\t\t\t($this->sameName == \"nothing\"), \n\t\t\t\t\"sameName\", \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"sameName_nothing\"]);\n\t\t\n\t\tarray_push(\n\t\t\t\t$parts, \n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_import_files\"][\"sameName_headline\"], \n\t\t\t\t\t\t\"html\" => $content, \n\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t));\n\t\t\n\t\tif (we_hasPerm(\"NEW_GRAFIK\")) {\n\t\t\tarray_push(\n\t\t\t\t\t$parts, \n\t\t\t\t\tarray(\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'headline' => $GLOBALS[\"l_import_files\"][\"metadata\"] . '', \n\t\t\t\t\t\t\t'html' => we_forms::checkboxWithHidden(\n\t\t\t\t\t\t\t\t\t$this->importMetadata == true, \n\t\t\t\t\t\t\t\t\t'importMetadata', \n\t\t\t\t\t\t\t\t\t$GLOBALS[\"l_import_files\"][\"import_metadata\"]), \n\t\t\t\t\t\t\t'space' => 120\n\t\t\t\t\t));\n\t\t\t\n\t\t\tif (we_image_edit::gd_version() > 0) {\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_import_files\"][\"make_thumbs\"], \n\t\t\t\t\t\t\t\t\"html\" => $_thumbs, \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$widthInput = htmlTextInput(\"width\", \"10\", $this->width, \"\", '', \"text\", 60);\n\t\t\t\t$heightInput = htmlTextInput(\"height\", \"10\", $this->height, \"\", '', \"text\", 60);\n\t\t\t\t\n\t\t\t\t$widthSelect = '<select size=\"1\" class=\"weSelect\" name=\"widthSelect\"><option value=\"pixel\"' . (($this->widthSelect == \"pixel\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"pixel\"] . '</option><option value=\"percent\"' . (($this->widthSelect == \"percent\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"percent\"] . '</option></select>';\n\t\t\t\t$heightSelect = '<select size=\"1\" class=\"weSelect\" name=\"heightSelect\"><option value=\"pixel\"' . (($this->heightSelect == \"pixel\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"pixel\"] . '</option><option value=\"percent\"' . (($this->heightSelect == \"percent\") ? ' selected=\"selected\"' : '') . '>' . $GLOBALS[\"l_we_class\"][\"percent\"] . '</option></select>';\n\t\t\t\t\n\t\t\t\t$ratio_checkbox = we_forms::checkbox(\n\t\t\t\t\t\t\"1\", \n\t\t\t\t\t\t$this->keepRatio, \n\t\t\t\t\t\t\"keepRatio\", \n\t\t\t\t\t\t$GLOBALS[\"l_thumbnails\"][\"ratio\"]);\n\t\t\t\t\n\t\t\t\t$_resize = '<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"defaultfont\">' . $GLOBALS[\"l_we_class\"][\"width\"] . ':</td>\n\t\t\t\t\t<td>' . $widthInput . '</td>\n\t\t\t\t\t<td>' . $widthSelect . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"defaultfont\">' . $GLOBALS[\"l_we_class\"][\"height\"] . ':</td>\n\t\t\t\t\t<td>' . $heightInput . '</td>\n\t\t\t\t\t<td>' . $heightSelect . '</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"3\">' . $ratio_checkbox . '</td>\n\t\t\t\t</tr>\n\t\t\t</table>';\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"resize\"], \"html\" => $_resize, \"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$_radio0 = we_forms::radiobutton(\n\t\t\t\t\t\t\"0\", \n\t\t\t\t\t\t$this->degrees == 0, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate0\"]);\n\t\t\t\t$_radio180 = we_forms::radiobutton(\n\t\t\t\t\t\t\"180\", \n\t\t\t\t\t\t$this->degrees == 180, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate180\"]);\n\t\t\t\t$_radio90l = we_forms::radiobutton(\n\t\t\t\t\t\t\"90\", \n\t\t\t\t\t\t$this->degrees == 90, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate90l\"]);\n\t\t\t\t$_radio90r = we_forms::radiobutton(\n\t\t\t\t\t\t\"270\", \n\t\t\t\t\t\t$this->degrees == 270, \n\t\t\t\t\t\t\"degrees\", \n\t\t\t\t\t\t$GLOBALS[\"l_we_class\"][\"rotate90r\"]);\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"rotate\"], \n\t\t\t\t\t\t\t\t\"html\" => $_radio0 . $_radio180 . $_radio90l . $_radio90r, \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => $GLOBALS[\"l_we_class\"][\"quality\"], \n\t\t\t\t\t\t\t\t\"html\" => we_qualitySelect(\"quality\", $this->quality), \n\t\t\t\t\t\t\t\t\"space\" => 120\n\t\t\t\t\t\t));\n\t\t\t} else {\n\t\t\t\tarray_push(\n\t\t\t\t\t\t$parts, \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"headline\" => \"\", \n\t\t\t\t\t\t\t\t\"html\" => htmlAlertAttentionBox(\n\t\t\t\t\t\t\t\t\t\t$GLOBALS[\"l_import_files\"][\"add_description_nogdlib\"], \n\t\t\t\t\t\t\t\t\t\t2, \n\t\t\t\t\t\t\t\t\t\t\"\"), \n\t\t\t\t\t\t\t\t\"space\" => 0\n\t\t\t\t\t\t));\n\t\t\t}\n\t\t\t$foldAT = 4;\n\t\t} else {\n\t\t\t$foldAT = -1;\n\t\t}\n\t\t\n\t\t$wepos = weGetCookieVariable(\"but_wesiteimport\");\n\t\t$content = we_multiIconBox::getJS();\n\t\t$content .= we_multiIconBox::getHTML(\n\t\t\t\t\"wesiteimport\", \n\t\t\t\t\"100%\", \n\t\t\t\t$parts, \n\t\t\t\t30, \n\t\t\t\t\"\", \n\t\t\t\t$foldAT, \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"image_options_open\"], \n\t\t\t\t$GLOBALS[\"l_import_files\"][\"image_options_close\"], \n\t\t\t\t($wepos == \"down\"), \n\t\t\t\t$GLOBALS[\"l_siteimport\"][\"siteimport\"]) . $this->_getHiddensHTML();\n\t\t\n\t\t$content = we_htmlElement::htmlForm(\n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t\t\"action\" => WEBEDITION_DIR . \"we_cmd.php\", \n\t\t\t\t\t\t\"name\" => \"we_form\", \n\t\t\t\t\t\t\"method\" => \"post\", \n\t\t\t\t\t\t\"target\" => \"siteimportcmd\"\n\t\t\t\t), \n\t\t\t\t$content);\n\t\t\n\t\t$body = we_htmlElement::htmlBody(array(\n\t\t\t\"class\" => \"weDialogBody\", \"onunload\" => \"doUnload();\"\n\t\t), $content);\n\t\t\n\t\t$js = $this->_getJS();\n\t\t\n\t\treturn $this->_getHtmlPage($body, $js);\n\t}", "function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n // $html .= $this->tablaDatos();\n $html .= $this->Pata();\n echo $html;\n }", "function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n // $html .= $this->tablaDatos();\n $html .= $this->Pata();\n echo $html;\n }", "public function html();", "abstract public function convert_to_html();", "abstract public function getHtml();", "function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n $html .= $this->Pata();\n echo $html;\n }", "public function getHtml();", "public function html() {}", "public function getHTML($data);", "function get_contenido_html ($input_texto)\r\n{\r\n\t// inicializacion de variables\r\n\t$var_contenido_html = $input_texto;\r\n\r\n\t$var_contenido_html = str_replace(\"&lt;\",\"<\",$var_contenido_html);\r\n\t$var_contenido_html = str_replace(\"&gt;\",\">\",$var_contenido_html);\r\n\t$var_contenido_html = str_replace(\"&quot;\",\"\\\"\",$var_contenido_html);\r\n\t$var_contenido_html = str_replace(\"&amp;\",\"&\",$var_contenido_html);\r\n\r\n\t// devuelve el texto en formato nombre propio\r\n\treturn $var_contenido_html;\r\n}", "public function mostrarConteudo() {\r\n echo \" \r\n <section class='margin-left12'>\r\n <p class='font33px'> Carrinho <img src='img/carrinho2.png'/></p>\r\n <figure>\r\n <figcaption class='margin-left'>\r\n <table style='width:50%'>\r\n <tr>\r\n <td><p class='font25px'><b>Seu carrinho está VAZIO!</b></td>\r\n <td></td> \r\n <td></td>\r\n </tr>\r\n <tr>\r\n <td></td>\r\n <td>\r\n <div>\r\n\r\n </div>\r\n </td>\r\n <td>\r\n\r\n <div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td><a href='catalogo.html'> Venha Conhecer nossas camisetas!</a></td>\r\n </tr>\r\n <tr>\r\n </tr>\r\n </table>\r\n </figcaption>\r\n </figure>\t\t\r\n </section>\";\r\n }", "public abstract function asHTML();", "function getCmsHtml($rubrique_id=0, $element_id=0, $element_langue='') {\r\n\r\n\tglobal $WWW, $wwwRoot, $selfDir, $rep, $langues;\r\n\tif (empty($element_langue)) $element_langue = $langues[0];\r\n\r\n\tif ($element_id > 0) $E =& new Q(\"SELECT * FROM cms_pages_elements WHERE id='$element_id' AND langue='$element_langue' LIMIT 1\");\r\n\telse if ($rubrique_id > 0) $E =& new Q(\"SELECT * FROM cms_pages_elements WHERE pid='$rubrique_id' AND langue='$element_langue' ORDER BY ordre ASC\");\r\n\telse return '';\r\n\t\r\n\t$elements_type = getElementsType();\r\n\t### db($elements_type);\r\n\r\n\t$elements_html = '';\r\n\t$fileDir = $rep.'bibliotheque/';\r\n\t\r\n\t// Valeurs à protéger car fonction SANITIZE() sur tous les INPUTS mais valeur permise dans les templates\r\n\t$arr_replace = array(\r\n\t\t'#script#'=> '<script type=\"text/javascript\">',\r\n\t\t'#/script#'=> '</script>',\r\n\t\t'#iframe#'=> '<iframe',\r\n\t\t'#/iframe#'=> '</iframe>',\r\n\t\t'#object#'=> '<object',\r\n\t\t'#/object#'=> '</object>',\r\n\t\t'#embed#'=> '<embed',\r\n\t\t'#/embed#'=> '</embed>',\r\n\t);\r\n\t\t\t\t\t\r\n\t$errors = array();\r\n\t$eval_errors_type_id = false;\r\n $orig_hndl = set_error_handler('error_hndl');\r\n\t\r\n\tforeach((array)$E->V as $V) { // Pour chaque Element\r\n\t\t\r\n\t\tif ($element_id < 1 && $rubrique_id > 0 && $V['actif'] == 0) continue; // N'affiche pas les element inactif en mode page\r\n\t\t\r\n\t\t$array_ensembles = parseAbstractString($elements_type[$V['type_id']]['valeurs']);\r\n\t\t### db($array_ensembles ,'$array_ensembles');\r\n\t\t\r\n\t\t$array_valeurs = cleanUnserial($V['valeurs']);\r\n\t\t### db($array_valeurs ,'$array_valeurs');\r\n\t\t\r\n\t\t$arr_template = $elements_type[$V['type_id']]['template'];\r\n\t\t### db('$arr_template :', $arr_template);\r\n\t\t\r\n\t\t\r\n\t\t$empty = false; // Si fichier ou images absente n'affiche pas l'element\r\n\t\t$elements_empty = '';\r\n\t\t\r\n\t\tforeach((array)$array_ensembles as $i=>$array_ensemble) { // Ensembles de valeurs d'element\r\n\t\t\r\n\t\t\tif ($array_ensemble['ensemble'] == 'item') {\r\n\t\t\t\t\r\n\t\t\t\t### db($array_ensemble['valeurs']);\r\n\t\t\t\t\r\n\t\t\t\tforeach((array)$array_ensemble['valeurs'] as $i=>$element_item) { // Valeur d'un ensemble\r\n\t\t\t\t\t\r\n\t\t\t\t\t$unique_id = generateId('element');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$required = substr($element_item['titre'], -1);\r\n\t\t\t\t\tif ($empty != true) $empty = (empty($array_valeurs[$element_item['nom']]) && $required == '*' ? true : false ); // Si 1 seul element requis est vide, empty = true\r\n\r\n\t\t\t\t\tif (empty($array_valeurs[$element_item['nom']]) && $required == '*' && strpos($selfDir,'/admin/') !== false) {\r\n\t\t\t\t\t\t$elements_empty .= '<br /><h2 align=\"center\">ATTENTION &eacute;l&eacute;ment manquant : '.htmlentities($element_item['titre']).'</h2><br />';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch($element_item['type']) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'image' :\r\n\r\n\t\t\t\t\t\t\t// Attention : $array_valeurs[$element_item['nom']] stock l'ID de l'image\r\n\t\t\t\t\t\t\t$array_valeurs[$element_item['nom']] = fetchValues('image', 'dat_bibliotheque_images', 'id', $array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementName = $element_item['nom'];\r\n\t\t\t\t\t\t\t$$elementName = $array_valeurs[$element_item['nom']];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameSrc = $element_item['nom'].'_src';\r\n\t\t\t\t\t\t\t$$elementNameSrc = $WWW.$fileDir.$array_valeurs[$element_item['nom'].'_taille'].'/'.$array_valeurs[$element_item['nom']];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameGde = $element_item['nom'].'_grande';\r\n\t\t\t\t\t\t\t$$elementNameGde = $WWW.$fileDir.'pop/'.$array_valeurs[$element_item['nom']];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameTitre = $element_item['nom'].'_titre';\r\n\t\t\t\t\t\t\t$$elementNameTitre = affCleanName($array_valeurs[$element_item['nom']], 1);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameLegende = $element_item['nom'].'_legende';\r\n\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_legende'] == 1)\r\n\t\t\t\t\t\t\t\t$$elementNameLegende = fetchValues('legende_'.$element_langue, 'dat_bibliotheque_images', 'image', $array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\telse $$elementNameLegende = '';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNamePopup = $element_item['nom'].'_popup';\r\n\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_popup'] == 1) $$elementNamePopup = 1;\r\n\t\t\t\t\t\t\telse $$elementNamePopup = '';\r\n\r\n\t\t\t\t\t\t\t$elementNameCredits = $element_item['nom'].'_credits';\r\n\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_credits'] == 1)\r\n\t\t\t\t\t\t\t\t$$elementNameCredits = fetchValues('credits_'.$element_langue, 'dat_bibliotheque_images', 'image', $array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\telse $$elementNameCredits = '';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameAuteur = $element_item['nom'].'_auteur';\r\n\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_auteur'] == 1)\r\n\t\t\t\t\t\t\t\t$$elementNameAuteur = fetchValues('auteur', 'dat_bibliotheque_images', 'image', $array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\telse $$elementNameAuteur = '';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameDate = $element_item['nom'].'_date';\r\n\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_date'] == 1)\r\n\t\t\t\t\t\t\t\t$$elementNameDate = fetchValues('date', 'dat_bibliotheque_images', 'image', $array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\telse $$elementNameDate = '';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'fichier' :\r\n\r\n\t\t\t\t\t\t\t// Attention : $array_valeurs[$element_item['nom']] stock l'ID du fichier\r\n\t\t\t\t\t\t\t$array_valeurs[$element_item['nom']] = fetchValues('fichier', 'dat_bibliotheque_fichiers', 'id', $array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementName = $element_item['nom'];\r\n\t\t\t\t\t\t\t$$elementName = $array_valeurs[$element_item['nom']];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameSrc = $element_item['nom'].'_src';\r\n\t\t\t\t\t\t\t$$elementNameSrc = $WWW.$fileDir.$array_valeurs[$element_item['nom']];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameTitre = $element_item['nom'].'_titre';\r\n\t\t\t\t\t\t\t$$elementNameTitre = fetchValues('titre_'.$element_langue, 'dat_bibliotheque_fichiers', 'fichier', $array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\tif (empty($$elementNameTitre)) $$elementNameTitre = affCleanName($array_valeurs[$element_item['nom']], 1);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameExt = $element_item['nom'].'_ext';\r\n\t\t\t\t\t\t\t$$elementNameExt = getExt($array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$elementNameSize = $element_item['nom'].'_size';\r\n\t\t\t\t\t\t\t$$elementNameSize = cleanKo(filesize($wwwRoot.$fileDir.$array_valeurs[$element_item['nom']]));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'textarea' :\r\n\t\t\t\t\t\t\t$$element_item['nom'] = ($element_item['titre'] == 'Code' ? $array_valeurs[$element_item['nom']] : nl2br($array_valeurs[$element_item['nom']]));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\tif ($element_item['type'] == 'text') $$element_item['nom'] = htmlentities($array_valeurs[$element_item['nom']]);\r\n\t\t\t\t\t\t\telse $$element_item['nom'] = $array_valeurs[$element_item['nom']];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!$empty && !empty($elements_type[$V['type_id']]['valeurs'])) {\t\r\n\t\t\t\t\t$arr_template = stripslashes($arr_template);\r\n\t\t\t\t\t$arr_template = str_replace(array_keys($arr_replace), array_values($arr_replace), $arr_template);\r\n\t\t\t\t\tif (@eval('$html = \\''.$arr_template.'\\';') === false) $eval_errors_type_id = $V['type_id'];\r\n\t\t\t\t\telse $elements_html .= \"\\n\".$html; ### db($html);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t### db($array_ensemble['valeurs']);\r\n\t\t\t\tforeach((array)$array_ensemble['valeurs'] as $i=>$element_item) { // Valeur d'un ensemble\r\n\t\t\t\t\t\r\n\t\t\t\t\t$unique_id = generateId('element');\r\n\t\t\t\t\t$required = substr($element_item['titre'], -1);\r\n\r\n\t\t\t\t\tswitch($element_item['type']) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'image' :\r\n\t\t\t\t\t\t\t$arr_tmp = array();\r\n\t\t\t\t\t\t\tforeach((array)$array_valeurs[$element_item['nom']] as $key=>$val) {\r\n\t\t\t\t\t\t\t\tif ($empty != true) $empty = (empty($val) && $required == '*' ? true : false ); // Si 1 seul element requis est vide, empty = true\r\n\t\t\t\t\t\t\t\tif (empty($val) && $required == '*' && strpos($selfDir,'/admin/') !== false) {\r\n\t\t\t\t\t\t\t\t\t$elements_empty .= '<br /><h2 align=\"center\">ATTENTION &eacute;l&eacute;ment manquant : '.htmlentities($element_item['titre']).'</h2><br />';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// Attention : $array_valeurs[$element_item['nom']] stock l'ID du fichier\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom']] = fetchValues('image', 'dat_bibliotheque_images', 'id', $val);\r\n\t\t\t\t\t\t\t\tif (!@is_file($wwwRoot.$fileDir.$arr_tmp[$key][$element_item['nom']])) continue;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_src'] = $WWW.$fileDir.$array_valeurs[$element_item['nom'].'_taille'][$key].'/'.$arr_tmp[$key][$element_item['nom']];\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_grande'] = $WWW.$fileDir.'pop/'.$arr_tmp[$key][$element_item['nom']];\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_titre'] = affCleanName($arr_tmp[$key][$element_item['nom']], 1);\r\n\r\n\t\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_legende'][$key] == 1)\r\n\t\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_legende'] = htmlentities(fetchValues('legende_'.$element_langue, 'dat_bibliotheque_images', 'id', $val));\r\n\t\t\t\t\t\t\t\telse $arr_tmp[$key][$element_item['nom'].'_legende'] = '';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_popup'][$key] == 1) $popup = 1;\r\n\t\t\t\t\t\t\t\telse $popup = '';\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_credits'][$key] == 1)\r\n\t\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_credits'] = htmlentities(fetchValues('credits_'.$element_langue, 'dat_bibliotheque_images', 'id', $val));\r\n\t\t\t\t\t\t\t\telse $arr_tmp[$key][$element_item['nom'].'_credits'] = '';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_auteur'][$key] == 1)\r\n\t\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_auteur'] = htmlentities(fetchValues('auteur', 'dat_bibliotheque_images', 'id', $val));\r\n\t\t\t\t\t\t\t\telse $arr_tmp[$key][$element_item['nom'].'_auteur'] = '';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($array_valeurs[$element_item['nom'].'_date'][$key] == 1)\r\n\t\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_date'] = rDate(fetchValues('date', 'dat_bibliotheque_images', 'id', $val));\r\n\t\t\t\t\t\t\t\telse $arr_tmp[$key][$element_item['nom'].'_date'] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$valeur_name = $element_item['nom'].'s';\r\n\t\t\t\t\t\t\t$$valeur_name = $arr_tmp;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\tcase 'fichier' :\r\n\t\t\t\t\t\t\t$arr_tmp = array();\r\n\t\t\t\t\t\t\tforeach((array)$array_valeurs[$element_item['nom']] as $key=>$val) {\r\n\t\t\t\t\t\t\t\tif ($empty != true) $empty = (empty($val) && $required == '*' ? true : false ); // Si 1 seul element requis est vide, empty = true\r\n\t\t\t\t\t\t\t\tif (empty($val) && $required == '*' && strpos($selfDir,'/admin/') !== false) {\r\n\t\t\t\t\t\t\t\t\t$elements_empty .= '<br /><h2 align=\"center\">ATTENTION &eacute;l&eacute;ment manquant : '.htmlentities($element_item['titre']).'</h2><br />';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// Attention : $array_valeurs[$element_item['nom']] stock l'ID du fichier\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom']] = fetchValues('fichier', 'dat_bibliotheque_fichiers', 'id', $val);\r\n\t\t\t\t\t\t\t\tif (!@is_file($wwwRoot.$fileDir.$arr_tmp[$key][$element_item['nom']])) continue;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_src'] = $WWW.$fileDir.$arr_tmp[$key][$element_item['nom']];\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_titre'] = htmlentities(fetchValues('titre_'.$element_langue, 'dat_bibliotheque_fichiers', 'id', $val));\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_ext'] = getExt($arr_tmp[$key][$element_item['nom']]);\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom'].'_size'] = cleanKo(filesize($wwwRoot.$fileDir.$arr_tmp[$key][$element_item['nom']]));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$valeur_name = $element_item['nom'].'s';\r\n\t\t\t\t\t\t\t$$valeur_name = $arr_tmp;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'textarea' :\r\n\t\t\t\t\t\t\t$arr_tmp = array();\r\n\t\t\t\t\t\t\tforeach((array)$array_valeurs[$element_item['nom']] as $key=>$val) {\r\n\t\t\t\t\t\t\t\tif ($empty != true) $empty = (empty($val) && $required == '*' ? true : false ); // Si 1 seul element requis est vide, empty = true\r\n\t\t\t\t\t\t\t\tif (empty($val) && strpos($selfDir,'/admin/') !== false) {\r\n\t\t\t\t\t\t\t\t\t$elements_empty .= '<br /><h2 align=\"center\">ATTENTION &eacute;l&eacute;ment manquant : '.htmlentities($element_item['titre']).'</h2><br />';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom']] = ($element_item['titre'] == 'Code' ? $val : nl2br($val));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$valeur_name = $element_item['nom'].'s';\r\n\t\t\t\t\t\t\t$$valeur_name = $arr_tmp;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\t$arr_tmp = array();\r\n\t\t\t\t\t\t\tforeach((array)$array_valeurs[$element_item['nom']] as $key=>$val) {\r\n\t\t\t\t\t\t\t\tif ($empty != true) $empty = (empty($val) && $required == '*' ? true : false ); // Si 1 seul element requis est vide, empty = true\r\n\t\t\t\t\t\t\t\tif (empty($val) && $required == '*' && strpos($selfDir,'/admin/') !== false) {\r\n\t\t\t\t\t\t\t\t\t$elements_empty .= '<br /><h2 align=\"center\">ATTENTION &eacute;l&eacute;ment manquant : '.htmlentities($element_item['titre']).'</h2><br />';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$arr_tmp[$key][$element_item['nom']] = $val;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t$valeur_name = $element_item['nom'].'s';\r\n\r\n\t\t\t\t\t\t\tif ($element_item['type'] == 'text') $$valeur_name = html_array($arr_tmp);\r\n\t\t\t\t\t\t\telse $$valeur_name = $arr_tmp;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!$empty || empty($elements_type[$V['type_id']]['valeurs'])) {\r\n\t\t\t\t\t$arr_template = stripslashes($arr_template);\r\n\t\t\t\t\t$arr_template = str_replace(array_keys($arr_replace), array_values($arr_replace), $arr_template);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (@eval('$html = \\''.$arr_template.'\\';') === false) $eval_errors_type_id = $V['type_id'];\r\n\t\t\t\t\telse $elements_html .= \"\\n\".$html; ### db($html);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\trestore_error_handler();\r\n\t\r\n\t$html = '';\r\n\t\r\n\tif (!empty($elements_empty)) $html .= $elements_empty;\r\n\r\n\tif ($eval_errors_type_id) {\r\n\t\tglobal $errors;\r\n\t\t$html .= '<p align=\"center\"><br /><strong>Error while evaluating check your &eacute;l&eacute;ment type (ID '.$eval_errors_type_id.')</strong><br />&nbsp;</p>';\r\n\t\t$html .= getDb($errors, 'Php error');\r\n\t\t$html .= getDb(stripslashes($arr_template), 'Template code');\r\n\t\t$html .= getDb(getVars(get_defined_vars()));\r\n\t}\r\n\telse if (!empty($elements_html)) {\r\n\t\t\r\n\t\t//if (strpos($selfDir,'/admin/') !== false)\r\n\t\t//$elements_html = str_replace('class=\"lightwindow\"','class=\"lightwindow_iframe_link\"', $elements_html);\r\n\t\t//db($elements_html);\r\n\t\t\r\n\t\t$html .= '<div id=\"cms\">';\r\n\t\t$html .= $elements_html;\r\n\t\t$html .= '</div>';\r\n\t}\r\n\r\n\treturn $html;\r\n}", "public function getPage()\n\t{\n //@return : $stri_html => l'affichage html du textbox\n \t \n $obj_table=new table();\n $obj_table_tr=new tr();\n $obj_table_tr->addTd($this->obj_form->getStartBalise());\n $obj_table_tr->addTd($this->obj_lb_page->htmlValue());\n $obj_table_tr->addTd($this->obj_tb_page->htmlValue());\n $obj_table_tr->addTd($this->obj_bt_page->htmlValue());\n $obj_table_tr->addTd($this->obj_form->getEndBalise());\n $obj_table->insertTr($obj_table_tr);\n $obj_table->setBorder(0);\n \n \n $stri_html=$this->javascripter();\n $stri_html.=$obj_table->htmlValue();\n return $stri_html;\n\t}", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "function render_data($vista, $data) {\n\t$html = '';\n\tif(($vista) && ($data)) {\n\t\t$diccionario = armar_diccionario($vista, $data);//vista es un get\n\t\tif($diccionario) {\n\t\t\t$html = file_get_contents('plantilla_' . $vista . '.html');\n\t\t\tforeach ($diccionario as $clave => $valor) {\n\t\t\t\t$html = str_replace('{' . $clave . '}', $valor, $html);\n\t\t\t}\n\t\t}\n\t}\n\tprint $html;//print $html es lo que hace imprime todo \n}", "public function get_content() {\n echo '<div id=\"main\">';\n\n if(!$_GET['id']) {\n echo 'Не правильные данные для вывода статьи';\n }\n else {\n $id_text = (int) $_GET['id'];\n if(!$id_text) {\n echo 'Не правильные данные для вывода статьи';\n }\n else {\n\n $query = \"SELECT title, text, date, img_src FROM statti WHERE id='$id_text'\";\n $result = $this->db->query($query);\n if(!$result) {\n exit(\"Не удалось обрабботать запрос - \" . $this->db->error);\n }\n else {\n $row = $result->fetch_assoc();\n printf(\"\n <div style='margin: 10px 0 0 10px; border-bottom: 2px; solid-color: #c2c2c2'>\n <p style='font-size: 18px;'>%s</p>\n <p>%s</p>\n <p><img src='%s' width='150px' align='left' style='margin-right: 5px;'>%s</p>\n </div>\", $row['title'], $row['date'], $row['img_src'], $row['text']);\n }\n }\n }\n\n echo '</div>\n </div>';\n\n }", "protected function setHtmlContent() {}", "function analiza_archivo_presupuesto_rf_lib($file)\n{\n $cliente=new cliente();\n if (!file_exists($file)){\n exit(\"File not found\");\n }\n $htmlContent=file_get_contents($file);\n $DOM=new DOMDocument();\n //echo $htmlContent;\n @$DOM->loadHTML($htmlContent);\n $Header = $DOM->getElementsByTagName('td');\n $Detail = $DOM->getElementsByTagName('td');\n foreach($Header as $NodeHeader)\n {\n $aDataTableHeaderHTML[]=trim($NodeHeader->textContent);\n //echo $aDataTableHeaderHTML;\n }\n print_r($aDataTableHeaderHTML);\n \n \n $fecha_presupuesto=substr($aDataTableHeaderHTML[5],23,10);\n $nombre_cliente=$aDataTableHeaderHTML[8];\n $dirección_cliente=$aDataTableHeaderHTML[10];\n $rpu=$aDataTableHeaderHTML[12];\n $telefono=$aDataTableHeaderHTML[14];\n $presupuesto=$aDataTableHeaderHTML[16];\n $marca_instalar=$aDataTableHeaderHTML[26];\n $modelo_instalar=$aDataTableHeaderHTML[27];\n $capacidad_instalar=$aDataTableHeaderHTML[28];\n $monto_financiar=$aDataTableHeaderHTML[29];\n $marca_retirar=$aDataTableHeaderHTML[37];\n $capacidad_retirar=$aDataTableHeaderHTML[38];\n $modelo_retirar=$aDataTableHeaderHTML[39];\n $antiguedad=$aDataTableHeaderHTML[40];\n $solicitud=$aDataTableHeaderHTML[42];\n $precio_sin_iva=$aDataTableHeaderHTML[46];\n $iva=ltrim($aDataTableHeaderHTML[49]);\n $bonificacion=$aDataTableHeaderHTML[61];\n $monto_financiar2=$aDataTableHeaderHTML[64];\n $excedente=$aDataTableHeaderHTML[58];\n $interes=$aDataTableHeaderHTML[67];\n $iva_interes=$aDataTableHeaderHTML[70];\n $financiado=$aDataTableHeaderHTML[73];\n $amortizacion=$aDataTableHeaderHTML[76];\n $num_pagos=substr($aDataTableHeaderHTML[74],0,2);\n $fecha_presupuesto=obtiene_fecha($fecha_presupuesto);\n $precio_sin_iva=substr($precio_sin_iva,1,9);\n $iva=substr($iva,17,8);\n $monto_financiar=substr($monto_financiar2,16,10);\n $excedente=substr($excedente,16,7);\n $interes=substr($interes,17,8);\n $iva_interes=substr($iva_interes,16,7);\n $financiado=substr($financiado,17,9);\n $amortizacion=substr($amortizacion,17,6);\n //echo $fecha_presupuesto.\"\\n\";\n //echo $nombre_cliente.\"\\n\";\n //echo $rpu.\"\\n\";\n //echo $presupuesto.\"\\n\";\n //echo $telefono.\"\\n\";\n //echo $marca_instalar.\"\\n\";\n //echo $modelo_instalar.\"\\n\";\n //echo $capacidad_instalar.\"\\n\";\n //echo $marca_retirar.\"\\n\";\n //echo $modelo_retirar.\"\\n\";\n //echo $capacidad_retirar.\"\\n\";\n //echo $solicitud.\"\\n\";\n //echo $precio_sin_iva.\"\\n\";\n //echo $iva.\"\\n\";\n //echo $monto_financiar.\"\\n\";\n //echo $excedente.\"\\n\";\n //echo $interes.\"\\n\";\n //echo $iva_interes.\"\\n\"; //23\n //echo $financiado.\"\\n\"; //26\n //echo $amortizacion.\"\\n\"; //23\n //echo $num_pagos.\"\\n\";\n $sp=\"RF\";\n $activo=1;\n $sql=\"INSERT INTO\n presupuestos (fecha,nombre,rpu,num_presupuesto,telefono,marca_ins,modelo_ins,capacidad_ins,\n marca_ret,modelo_ret,capacidad_ret,solicitud,instalacion,precio_sin_iva,iva_equipo,monto_financiar,\n excedente,interes,iva_interes,total_financiamiento,amortizacion,pagos,subprograma,activo)\n VALUES (\n '$fecha_presupuesto', '$nombre_cliente','$rpu','$presupuesto','$telefono','$marca_instalar',\n '$modelo_instalar','$capacidad_instalar','$marca_retirar','$modelo_retirar','$capacidad_retirar',\n '$solicitud','0','$precio_sin_iva','$iva','$monto_financiar','$excedente','$interes',\n '$iva_interes','$financiado','$amortizacion','$num_pagos','$sp','$activo'\n )\";\n $resp=$cliente->insertar($sql);\n if($resp)\n {\n echo \"Se guardo correctamente\";\n }\n else{\n echo \"No se pudo guardar\";\n }\necho $sql;\n\n\n\n\n}", "function html()\n\t{\n /**\n * @global string $_REQUEST['opcion'] variable que contiene la opcion para ser dirijido a una funcion especifica\n */\n\t\tif(!isset($_REQUEST['opcion']))\n\t\t{\n\t\t\t$_REQUEST['opcion']=\"consultar\";\n\t\t}\n\n\t\tswitch($_REQUEST['opcion'])\n\t\t{\n \n default:\n $this->funcion->verificarTipoPago();\n break;\n\n\t\t}\n\t}", "private function buildHTML($res) {\n \t$html = null;\n if (isset($res[0])) {\n foreach ($res as $c) {\n $html .= <<<EOD\n\t\t<h2 id=\"{$c->id}\">{$c->title}</h2>\n <div class='article_text'>\n {$c->data}\n </div>\n <div style=\"text-align:center;\">\n <p><a href=\"#\">Upp</a></p>\n </div><hr>\nEOD;\n }\n } else {\n $html = '<p>Det finns inga rapporter.</p>';\n }\n return $html;\n }", "public /*String*/ function getContent() { ?>\n\t\t<div data-role=\"content\" id=\"content\" style=\"padding: 10px;\" data-theme=\"c\">\n\t\t\t<form action=\"#ResultView\" method=\"post\" name=\"<?= APPLICATION_NAME ?>FindForm\" id=\"<?= APPLICATION_NAME ?>FindForm\" enctype=\"multipart/form-data\">\n\t\t\t\t<!-- Define the method to call -->\n\t\t\t\t<input type=\"hidden\" name=\"application\" value=\"<?= APPLICATION_NAME ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"method\" value=\"find\" />\n<<<<<<< HEAD\n\t\t\t\t<input type=\"hidden\" name=\"numberOfOntology\" value=\"3\" />\n\t\t\t\t<br />\n\t\t\t\t<br />\n\t\t\t\t<ul data-role=\"listview\" data-theme=\"c\" data-divider-theme=\"b\" >\n\t\t\t\t<!-- Area -->\n\t\t\t\t<li data-role=\"list-divider\" data-theme='b'><?= $_SESSION['dictionary'][LG][\"ontology1\"] ?></li>\n\t\t\t\t<br />\n\t\t\t\t<select name=\"Area\">\n\t\t\t\t\t<option value=></option>\n=======\n\t\t\t\t<input type=\"hidden\" name=\"numberOfOntology\" value=\"4\" />\n\t\t\t\t\n\t\t\t\t<!-- Area -->\n\t\t\t\t<select name=\"Area\">\n\t\t\t\t\t<option value=\"\"><?= $_SESSION['dictionary'][LG][\"ontology1\"] ?></option>\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t\t\t\t<option value=\"Aerospaziale\"><?= $_SESSION['dictionary'][LG][\"Area\"][0] ?></option>\n\t\t\t\t\t<option value=\"Ambientale\"><?= $_SESSION['dictionary'][LG][\"Area\"][1] ?></option>\n\t\t\t\t\t<option value=\"Autoveicolo\"><?= $_SESSION['dictionary'][LG][\"Area\"][2] ?></option>\n\t\t\t\t\t<option value=\"Biomeccania\"><?= $_SESSION['dictionary'][LG][\"Area\"][3] ?></option>\n\t\t\t\t\t<option value=\"Cinema\"><?= $_SESSION['dictionary'][LG][\"Area\"][4] ?></option>\n\t\t\t\t\t<option value=\"Civile\"><?= $_SESSION['dictionary'][LG][\"Area\"][5] ?></option>\n\t\t\t\t\t<option value=\"Elettrica\"><?= $_SESSION['dictionary'][LG][\"Area\"][6] ?></option>\n\t\t\t\t\t<option value=\"Elettronica\"><?= $_SESSION['dictionary'][LG][\"Area\"][7] ?></option>\n\t\t\t\t\t<option value=\"Energetica\"><?= $_SESSION['dictionary'][LG][\"Area\"][8] ?></option>\n\t\t\t\t\t<option value=\"Fisica\"><?= $_SESSION['dictionary'][LG][\"Area\"][9] ?></option>\n\t\t\t\t\t<option value=\"Gestionale\"><?= $_SESSION['dictionary'][LG][\"Area\"][10] ?></option>\n\t\t\t\t\t<option value=\"Informatica\"><?= $_SESSION['dictionary'][LG][\"Area\"][11] ?></option>\n\t\t\t\t\t<option value=\"Matematica\"><?= $_SESSION['dictionary'][LG][\"Area\"][12] ?></option>\n\t\t\t\t\t<option value=\"Materiali\"><?= $_SESSION['dictionary'][LG][\"Area\"][13] ?></option>\n\t\t\t\t\t<option value=\"Meccanica\"><?= $_SESSION['dictionary'][LG][\"Area\"][14] ?></option>\n\t\t\t\t\t<option value=\"Telecomunicazioni\"><?= $_SESSION['dictionary'][LG][\"Area\"][15] ?></option>\n\t\t\t\t</select>\n\t\t\t\t<?php $dataBean = new MDataBean(\"Area\", null, KEYWORD); ?>\n\t\t\t\t<input type=\"hidden\" name=\"ontology1\" value=\"<?= urlencode(json_encode($dataBean)); ?>\">\n<<<<<<< HEAD\n\t\t\t\t<br />\n\t\t\t\t<li data-role=\"list-divider\" data-theme='b'><?= $_SESSION['dictionary'][LG][\"ontology2\"] ?></li>\n\t\t\t\t<br />\n\t\t\t\t<!-- Categoria -->\n\t\t\t\t<select name=\"Categoria\">\n\t\t\t\t\t<option value=></option>\n=======\n\t\t\t\t\n\t\t\t\t<!-- Categoria -->\n\t\t\t\t<select name=\"Categoria\">\n\t\t\t\t\t<option value=\"\"><?= $_SESSION['dictionary'][LG][\"ontology2\"] ?></option>\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t\t\t\t<option value=\"Stage\"><?= $_SESSION['dictionary'][LG][\"Categoria\"][0] ?></option>\n\t\t\t\t\t<option value=\"Job\"><?= $_SESSION['dictionary'][LG][\"Categoria\"][1] ?></option>\n\t\t\t\t\t<option value=\"Tesi\"><?= $_SESSION['dictionary'][LG][\"Categoria\"][2] ?></option>\n\t\t\t\t\t<option value=\"Appunti\"><?= $_SESSION['dictionary'][LG][\"Categoria\"][3] ?></option>\n\t\t\t\t</select>\n\t\t\t\t<?php $dataBean = new MDataBean(\"Categoria\", null, KEYWORD); ?>\n\t\t\t\t<input type=\"hidden\" name=\"ontology2\" value=\"<?= urlencode(json_encode($dataBean)); ?>\">\n<<<<<<< HEAD\n\t\t\t\t<br />\n\t\t\t\t</ul>\n\t\t\t\t<br />\n\t\t\n\t\t\t\t<div data-role=\"collapsible\" data-theme='a'>\n\t\t\t\t\t <h3><?= $_SESSION['dictionary'][LG][\"ontology0\"] ?></h3>\n\t\t\t\t\t<!-- Titolo -->\n\t\t\t\t\t<input type=\"hidden\" name=\"ontology0\" value=\"\">\n=======\n\t\t\t\t\n\t\t\t\t<div data-role=\"collapsible\">\n\t\t\t\t\t <h3><?= $_SESSION['dictionary'][LG][\"ontology0\"] ?></h3>\n\t\t\t\t\t<!-- Titolo -->\n>>>>>>> 47afa5c5725a71eb2e2fbaac0726ec72919c747c\n\t\t\t\t\t<input type=\"search\" name=\"data\" value=\"\" />\n\t\t\t\t\t<?php $dataBean = new MDataBean(\"data\", null, KEYWORD); ?>\n\t\t\t\t\t<input type=\"hidden\" name=\"ontology0\" value=\"<?= urlencode(json_encode($dataBean)); ?>\">\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<center><a href=\"#\" data-role=\"button\" onclick=\"document.<?= APPLICATION_NAME ?>FindForm.submit()\" data-inline=\"true\" data-icon=\"search\"><?= $_SESSION['dictionary'][LG][\"view2\"] ?></a></center>\n\t\t\t</form>\n\t\t</div>\n\t<?php }", "function formumfeld($t)\n{\n global $sqli;\n $suchmuster = \"/<.link:(.\\d+)>/\";\n $tref = preg_match_all($suchmuster, $t, $treffer);\n //print_r($treffer);\n //$suchmuster = \"llink:\";\n\n for ($i = 0; $i < count($treffer[0]); $i++) {\n $id = $treffer[1][$i];\n //$nid=$treffer[0][$i];\n\n if (substr($id, 0, 1) == 'n') {\n $id = substr($id, 1);\n $n = 1;\n\n $result = mysqli_query($sqli, \"SELECT * FROM (fotografen INNER JOIN namen ON fotografen.id=namen.fotografen_id) WHERE namen.id=$id ORDER BY namen.id Asc\");\n //echo(\"SELECT * FROM (fotografen INNER JOIN namen ON fotografen.id=namen.fotografen_id) WHERE namen.id=$id ORDER BY namen.id Asc\");\n\n } else {\n $result = mysqli_query($sqli, \"SELECT * FROM (fotografen INNER JOIN namen ON fotografen.id=namen.fotografen_id) WHERE fotografen_id=$id ORDER BY namen.id Asc\");\n }\n $fetch = mysqli_fetch_array($result);\n $name = $fetch['vorname'] . ' ' . $fetch['namenszusatz'] . ' ' . $fetch['nachname'];\n // echo $name;\n if ($n == 1) $id = $fetch['fotografen_id'];\n if ($fetch['unpubliziert'] == 1) {\n if (auth_level(USER_GUEST_READER)) {\n $t = str_replace($treffer[0][$i], '<span class=\"text2g\"><a href=\"?a=fotograph&amp;id=' . $id . '&amp;lang=' . $_GET['lang'] . '\">' . $name . '</a></span>', $t);\n } else {\n $t = str_replace($treffer[0][$i], $name, $t);\n }\n } else {\n /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! fotograph */\n $t = str_replace($treffer[0][$i], '<a href=\"?a=fotograph&amp;id=' . $id . '&amp;lang=' . $_GET['lang'] . '\">' . $name . '</a>', $t);\n }\n }\n return (str_replace('<br>', '<br />', $t));\n}", "protected function loadHtml()\n {\n $this->html = $this->fsio->get($this->page->getTarget());\n }", "function getRenderedContent($pObj){\n\n\t\t$fRecs = $this->getRecs($pObj['records'],$pObj['orderBy'],$pObj['L'],$pObj['wrap']);\n\t\t$records = array();\n\t\tforeach($fRecs as $k=>$row){\n\t\t\t/*\n\t\t\tFAILED OR SEMIFAILED EFFORTS HERE\n\t\t\t*/\n\t\t\t//$cObj = t3lib_div::makeInstance('tslib_cObj');*/\n\t\t\t//$content = $cObj->TEXT(array('field' => 'bodytext','required' => 1,'parseFunc' => '< lib.parseFunc_RTE' ));//works but does nothing interesting!!!!!!!! But doesnt transform links\n\t\t\t//$content = $cObj->TEXT(array('field' => 'bodytext','stripHtml' => true)); //useful!!!\n\t\t\t//$content = $cObj->TEXT(array('field' => 'bodytext','makelinks'=>true,'parseFunc' => '< lib.parseFunc_RTE'));\n\t\t\t//$content = $cObj->http_makelinks($content,array());//this makes a search and replace\n\t\t\t\t\t\n\t\t\t//convert typolinks to real links\n\t\t\t//$row['bodytext'] = $this->TS_links_rte($row['bodytext'], $pObj['wrap']);\n\t\t\t//prepend relative paths with url\n\t\t\t//$row['bodytext'] = $this->makeAbsolutePaths($row['bodytext']);\n\t\t\t//$row['bodytext'] = $this->cleanHTML($row['bodytext']);\n\t\t\t\n\t\t\t//Moving these two into get recs so all bodytrext etc is extracted by default****************\n\t\t\t//$row['bodytext'] = $this->parseText($row['bodytext'],$pObj['wrap']);\n\n\n\t\t\t//if($row['header_link']){\n\t\t\t//\t$row['header_link'] = $this->TS_links_rte($row['header_link'], $pObj['wrap']);\n\t\t\t//}\n\n\t\t\t//****************************************\n\n\n\n\n\t\t\t//$content = t3lib_BEfunc::getRecord('pages', $pObj['id']);\n\t\t\t//$content = $htmlParser->TS_AtagToAbs($content);\n\t\t\t$records[] = $row;\n\t\t}\t\n\n\t\t$err = mysql_error(); \n\t\tif($err==''){\n\t\t\treturn array('result'=>$records,'callback'=>$pObj['callback']);\n\t\t}else {\n\t\t\t$error = array('errortype'=>1,'errormsg'=>$err);\n\t\t\treturn $error;\n\t\t}\n\n\t\t//$ceoConf = array('table' =>'tt_content','select.' => array('where' =>'uid='. $this->conf['reservation_email_record']));\n\n\t\t//output actual content\n\t\t//$htmlmessage = $this->cObj->CONTENT($ceoConf) .\n\t}", "function parse()\n {\n $params=$this->layoutManager->getPluginParams(\"L\");\n $tLang=$params[\"lang\"];\n $el=$this->getSubElements();\n $id=$el[\"ID\"][\"text\"];\n $textNode=$el[\"C\"][\"node\"];\n $layoutContents=$textNode->contents;\n $nContents=count($layoutContents);\n if($nContents==0)\n return;\n\n $curVar=1;\n $phpCode=array();\n $newContents=array();\n $currentNode=array(\"TYPE\"=>\"HTML\",\"TEXT\"=>\"\");\n $newContents[]=$currentNode;\n /* Supongamos una lista de layoutContents del tipo HTML - PHP - HTML : ej: a <?php echo \"p\";?> b\n * Para buscar la traduccion, hay que actuar como si fuera 1 solo layoutContent de tipo a %1 b\n * Por eso, el resultado debe ser 1 solo layoutcontent de tipo HTML, aunque dentro, contenga codigo php.\n * \n */\n $html=\"\";\n for($k=0;$k<$nContents;$k++)\n { \n if($layoutContents[$k][\"TYPE\"]==\"HTML\")\n {\n $html.=$layoutContents[$k][\"TEXT\"];\n }\n else\n {\n if($layoutContents[$k][\"TYPE\"]==\"PHP\")\n {\n $html.=\"{%\".$curVar.\"}\";\n $phpCode[$curVar]=$layoutContents[$k][\"TEXT\"];\n $curVar++;\n }\n else\n {\n // Se traduce el nodo HTML actual\n $currentNode[\"TEXT\"]=$this->parseTranslation($tLang,$id,$phpCode,$html);\n // Se copia el nodo que hemos encontrado, tal cual (no es ni PHP ni HTML)\n $newContents[]=$layoutContents[$k];\n // Se crea el siguiente nodo HTML.\n $currentNode=array(\"TYPE\"=>\"HTML\",\"TEXT\"=>\"\");\n $newContents[]=$currentNode;\n $html=\"\";\n $phpCode=array();\n $curVar=1;\n }\n \n }\n } \n // Al llegar aqui, nos queda el ultimo nodo HTML creado.Hay que parsearlo.\n $currentNode[\"TEXT\"]=$this->parseTranslation($tLang,$id,$phpCode,$html);\n return $newContents;\n }", "function getContent() ;", "public function recuperarhtmlAction() {\n\n //$this->_helper->layout->disableLayout();\n $idDocumento = Zend_Filter::FilterStatic($this->_getParam('id'), 'Alnum');\n $numeroDocumento = Zend_Filter::FilterStatic($this->_getParam('dcmto'), 'Alnum');\n $tipoDoc = Zend_Filter::FilterStatic($this->_getParam('tipo', 1), 'Alnum');\n $versao = Zend_Filter::FilterStatic($this->_getParam('versao'), 'Alnum');\n $userNs = new Zend_Session_Namespace('userNs');\n $matricula = $userNs->matricula;\n $response = new stdClass();\n try {\n $arquivo = $this->recuperar($idDocumento, $numeroDocumento, $matricula);\n $response->success = true;\n $response->arquivo = $arquivo;\n $this->_helper->json->sendJson($response);\n } catch (Exception $exc) {\n $response->success = false;\n $response->erro = $exc->getMessage();\n $this->_helper->json->sendJson($response);\n }\n }", "abstract protected function loadHtml($text= null);", "private function parseHTML($ruta, $data = array())\n {\n $obtpl = new \\Core\\Template();\n $obtpl->setTemplate(__DIR__.$ruta);\n $obtpl->llena($data);\n $obtpl->llena($this->lang); \n return $obtpl->getCode();\n }", "public function criarHtml()\n {\n ;\n $form = \"\n <div class='row'>\n <div class='col-md-12 col-sm-12 col-xs-12'>\n <div class='x_panel'>\n <div class='x_content'>\n<form id='form' class='form-horizontal form-label-left' data-parsley-validate enctype='multipart/form-data' method='POST' >\n \" . $this->conteudo . \"\n <div class='ln_solid'></div>\n <div class='form-group'>\n <div class='col-md-3 col-sm-3 col-xs-12 col-md-offset-9'>\n <button class='btn btn-primary' type='submit'>Cancel</button>\n <a class='btn btn-success' onclick='$this->action'>Salvar</a>\n </div>\n </div>\n</form>\n</div>\n</div>\n</div>\n</div>\n\";\n return $form;\n }", "function bacaHTML($url) {\r\n $ip = $url;\r\n $data = curl_init();\r\n // setting CURL\r\n curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($data, CURLOPT_URL, $ip);\r\n\r\n // menjalankan CURL untuk membaca isi file\r\n $hasil = curl_exec($data);\r\n curl_close($data);\r\n return $hasil;\r\n}", "public function get_content()\n {\n $query = \"SELECT id, title FROM statti\";\n $result = $this->db->query($query);\n\n echo \"<div id='main'>\";\n echo \"<h3><a href='?option=add_statti' style='color: #510000;'>Добавить новую статью</a></h3><hr />\";\n\n //если перенаправленны с другой страницы и сессия содержит информацию\n if($_SESSION['res']) {\n echo $_SESSION['res'];\n //удаляем переменную 'res' из сессии\n unset($_SESSION['res']);\n }\n\n if(!$result) {\n exit(\"Не удалось обрабботать запрос - \" . $this->db->error);\n }\n else {\n $row = array();\n for ($i = 0; $i < $result->num_rows; $i++) {\n $row = $result->fetch_assoc();\n printf(\"<p style='font-size: 14px;'>\n <a href='?option=update_statti&id_text=%s' style='color: #585858;'>%s</a> |\n <a href='?option=delete_statti&del=%s' style='color: red;'>Удалить</a>\n </p>\", $row['id'], $row['title'], $row['id']);\n }\n }\n\n echo \"</div>\n </div>\";\n }", "public function toHTML();", "function markdown_raccourcis($texte){\n\n\t$md = $texte;\n\n\t// enlever les \\n\\n apres <div class=\"base64....\"></div>\n\t// et surtout le passer en <p> car ca perturbe moins Markdown\n\tif (strpos($md,'<div class=\"base64')!==false){\n\t\t$md = preg_replace(\",(<div (class=\\\"base64[^>]*>)</div>)\\n\\n,Uims\",\"<p \\\\2</p>\",$md);\n\t}\n\n\t// marquer les ul/ol explicites qu'on ne veut pas modifier\n\tif (stripos($md,\"<ul\")!==false OR stripos($md,\"<ol\")!==false OR stripos($md,\"<li\")!==false)\n\t\t$md = preg_replace(\",<(ul|ol|li)(\\s),Uims\",\"<$1 html$2\",$md);\n\n\t// parser le markdown\n\t$md = Parsedown::instance()->parse($md);\n\n\t// class spip sur ul et ol et retablir les ul/ol explicites d'origine\n\t$md = str_replace(array(\"<ul>\",\"<ol>\",\"<li>\"),array('<ul'.$GLOBALS['class_spip_plus'].'>','<ol'.$GLOBALS['class_spip_plus'].'>','<li'.$GLOBALS['class_spip'].'>'),$md);\n\t$md = str_replace(array(\"<ul html\",\"<ol html\",\"<li html\"),array('<ul','<ol','<li'),$md);\n\n\t// Si on avait des <p class=\"base64\"></p> les repasser en div\n\t// et reparagrapher car MD n'est pas tres fort et fait de la soupe <p><div></div></p>\n\tif (strpos($md,'<p class=\"base64')!==false){\n\t\t$md = preg_replace(\",(<p (class=\\\"base64[^>]*>)</p>),Uims\",\"<div \\\\2</div>\",$md);\n\t\t$md = paragrapher($md);\n\t\t// pas d'autobr introduit par paragrapher\n\t\tif (_AUTO_BR AND strpos($md,_AUTOBR)!==false){\n\t\t\t$md = str_replace(_AUTOBR,'',$md);\n\t\t}\n\t\t// eviter les >\\n\\n<p : un seul \\n\n\t\tif (strpos($md,\">\\n\\n<p\")!==false){\n\t\t\t$md = str_replace(\">\\n\\n<p\",\">\\n<p\",$md);\n\t\t}\n\t}\n\n\t// echapper le markdown pour que SPIP n'y touche plus\n\treturn code_echappement($md,\"md\");\n}", "public function renderHTML() {\r\n\t\t// Mois et année du jour\r\n\t\t$time = time ();\r\n\t\t$mois_actuel = date ( 'm', $time );\r\n\t\t$annee_actuelle = date ( 'Y', $time );\r\n\r\n\t\t$aff = $this->renderstyle ();\r\n\t\t$aff .= '<div id=\"FilAriane\"><a href=\"../../../index.php?menu=4\">Site Emploi</a>&nbsp;>&nbsp;';\r\n\t\t$aff .= '<a href=\"?\">Statistiques Site Emploi</a>&nbsp;>&nbsp;Réponses par région et domaine d\\'activité</div><br />';\r\n\r\n\t\t$aff .= '<table><tr>';\r\n\t\t$aff .= '<td><img width=\"15px\" height=\"15px\" src=\"../../../include/images/export.jpg\" /></td>';\r\n\t\t$aff .= '<td> <a target=\"blank\" href=\"../statistiques/metier/getReponseRegion.php?export=1&m=' . (isset ( $_GET ['m'] ) ? $_GET ['m'] : $mois_actuel) . '&a=' . (isset ( $_GET ['a'] ) ? $_GET ['a'] : $annee_actuelle) . '\"> Exporter les données affichées</a></td>';\r\n\t\t$aff .= '</tr>';\r\n\t\t$aff .= '<tr></table>';\r\n\r\n\t\t// *************************************** Début calendrier ******************************************\r\n\r\n\t\t$aff .= '<div align=\"center\" ><form>';\r\n\t\t// Si on a demandé une date\r\n\t\tif (isset ( $_GET ['m'] ) && isset ( $_GET ['a'] )) {\r\n\t\t\t$aff .= '<a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=' . $_GET ['m'] . '&a=' . ($_GET ['a'] - 1);\r\n\t\t\t$aff .= '\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($_GET ['m'] == '01') {\r\n\t\t\t\t$aff .= '12&a=' . ($_GET ['a'] - 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($_GET ['m'] - 1) . '&a=' . $_GET ['a'];\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t\t$aff .= '<select name=\"mois\" onChange=\"window.location=\\'/admin/modules/app-site-emploi/statistiques/index.php?action=rep&m=\\' + this.form.mois.value + \\'&a=' . $_GET ['a'] . '\\'\">';\r\n\t\t\t$i = 1;\r\n\t\t\twhile ( $i <= 12 ) {\r\n\t\t\t\t$aff .= '<option value=\"' . $i . '\" ' . ($_GET ['m'] == $i ? 'selected' : '') . '>' . FunctionDate::getMois ( $i ) . '</option>';\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t\t$aff .= '</select> ';\r\n\t\t\t$aff .= $_GET ['a'] . ' <a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($_GET ['m'] == '12') {\r\n\t\t\t\t$aff .= '01&a=' . ($_GET ['a'] + 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($_GET ['m'] + 1) . '&a=' . $_GET ['a'];\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=' . $_GET ['m'] . '&a=' . ($_GET ['a'] + 1);\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t} // Sinon on prend le moi et l'année actuels\r\n\t\telse {\r\n\t\t\t$aff .= '<a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=' . $mois_actuel . '&a=' . ($annee_actuelle - 1);\r\n\t\t\t$aff .= '\">\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/3.png\\');\" href=\"?action=rep&m=';\r\n\t\t\tif ($mois_actuel == '01') {\r\n\t\t\t\t$aff .= '12&a=' . ($annee_actuelle - 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($mois_actuel - 1) . '&a=' . $annee_actuelle;\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t\t$aff .= ' <select name=\"mois\" onChange=\"window.location=\\'/admin/modules/app-site-emploi/statistiques/index.php?action=rep&m=\\' + this.form.mois.value + \\'&a=' . $annee_actuelle . '\\'\">';\r\n\t\t\t$i = 1;\r\n\t\t\twhile ( $i <= 12 ) {\r\n\t\t\t\t$aff .= '<option value=\"' . $i . '\" ' . ($mois_actuel == $i ? 'selected' : '') . '>' . FunctionDate::getMois ( $i ) . '</option>';\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t\t$aff .= '</select> ';\r\n\t\t\t$aff .= $annee_actuelle . '<a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=offre_rep&m=';\r\n\t\t\tif ($mois_actuel == '12') {\r\n\t\t\t\t$aff .= '01&a=' . ($annee_actuelle + 1);\r\n\t\t\t} else {\r\n\t\t\t\t$aff .= ($mois_actuel + 1) . '&a=' . $annee_actuelle;\r\n\t\t\t}\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><a style=\"background-image:url(\\'../../../include/images/1.png\\');\" href=\"?action=rep&m=' . $mois_actuel . '&a=' . ($annee_actuelle + 1);\r\n\t\t\t$aff .= '\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>';\r\n\t\t}\r\n\t\t$aff .= '</div></form><br />';\r\n\t\t// *************************************** Fin calendrier ******************************************\r\n\t\t// Création du tableau\r\n\r\n\t\t$aff .= '<table id=\"TableList\" width=\"100%\" class=\"liste\">';\r\n\t\t$aff .= '<tr class=\"title\"><td align=\"center\" ><b>Région</b></td>';\r\n\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t$aff .= '<td align=\"center\"><b>' . $aDA->getnomdomaine () . '</b></td>';\r\n\t\t}\r\n\t\t$aff .= '<td align=\"center\">Total</td></tr>';\r\n\t\t$row = 1;\r\n\t\tforeach ( $this->myListeregion->getList () as $aRegion ) {\r\n\t\t\tif ($aRegion->getlibelle () == 'Toute la France') {\r\n\t\t\t\t$aff .= '<tr>';\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $aRegion->getlibelle () . '</b></td>';\r\n\t\t\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t\t\t$total_ligne = 0;\r\n\t\t\t\t\t$aStatAll = new StatReponseRegion ();\r\n\t\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . $aStatAll->SQL_COUNT ( $aDA->getiddomaine () ) . '</td>';\r\n\t\t\t\t\tif (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat )) {\r\n\t\t\t\t\t\t$total_ligne += $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">' . $total_ligne . '</td></tr>';\r\n\t\t\t} else \r\n\t\t\t{ // total par ligne\r\n\t\t\t\t$total_ligne = 0;\r\n\t\t\t\t$aff .= '<tr>';\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $aRegion->getlibelle () . '</b></td>';\r\n\t\t\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat ) ? $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()] : 0) . '</td>';\r\n\t\t\t\t\tif (array_key_exists ( $aRegion->getidregion () . '-' . $aDA->getiddomaine (), $this->myaStat )) {\r\n\t\t\t\t\t\t$total_ligne += $this->myaStat [$aRegion->getidregion () . '-' . $aDA->getiddomaine ()];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\" >' . $total_ligne . '</td>';\r\n\t\t\t}\r\n\t\t\t$row = ($row == 1 ? 2 : 1);\r\n\t\t}\r\n\r\n\t\t// Total par colonne et total général\r\n\t\t$aff .= '<tr><td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">Total</td>';\r\n\t\t$total = 0;\r\n\t\tforeach ( $this->myListedomaine->getList () as $aDA ) {\r\n\t\t\t$aStatAll = new StatReponseRegion ();\r\n\t\t\t$data = $aStatAll->SQL_COUNT_TOT ( $aDA->getiddomaine (), isset ( $_GET ['m'] ) ? $_GET ['m'] : date ( 'm', $time ), isset ( $_GET ['a'] ) ? $_GET ['a'] : date ( 'Y', $time ) );\r\n\t\t\t$total += $data;\r\n\t\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\"><b>' . $data . '</b></td>';\r\n\t\t}\r\n\t\t$aff .= '<td class=\"' . ($row == 1 ? 'row1' : 'row2') . '\" align=\"center\">' . $total . '</tr></table><br />';\r\n\t\techo $aff;\r\n\t}", "function noticias_cabe(){\n \n $html=site('http://www.jornalnoticias.co.mz/');\n\t\n\tforeach($html->find('.items-row')as $elms){\n\t\t\n\t\tforeach($elms->find ('.jn-postheader') as $elms2){\n\t\t\n\t $j[]=mb_convert_encoding( $elms2->plaintext, \"HTML-ENTITIES\", \"UTF-8\");\n\t\n\t\n\t\t\n\t\t}\n\t}\n\t\n\treturn $j;\n\t\n\t}", "function displayMain(){\n $data='<div class=\"about\"><h2>About this tool</h2>\n<p>Graber Transcriptdb is an attempt to create an integrated transcript database of all the organisms and annotations found in UCSC,MGI,ENSEMBL,UNIPROT,and EBI databases. \n The database generates unique transcript_id and exon_id for all redundant transcripts and exons from various annotations for a given organism version.We store the start cordinates using the zero-base standard and the end cordinates using the one-base standard.\nBut we display all the cordinates using the one-base. \n</p>\n<h2>You can use the tool as followed</h2>\n <ul><list>You have genomic regions of interest or a gene and you would like to extract overlaping functional features</li>\n <list>You have a file containing genomic regions of interest or a list of genes or transcripts and you would like to extract overlaping functional features</li>\n </ul>\n <p> Database updates are ran monthly to synchronize both our data and external data sources.\n</p><hr/><h2>Good Practices:</h2>';\n$data.=getXmlUrl(\"Good Practices\");\n$data.='</div>';\n return $data;\n}", "public function getHTML(): string;", "public function getReturn()\n\t{\n\t\t\t$this->_addLog('Chargement fichier HTML', 4);\n\t\t\t$f = DIR_APP . '/common/resources/html/accueil.html';\n\t\t\treturn file_get_contents($f);\n\t\t/*\tFIN DU TEST */\n\t}", "function renderda_ülesande_link($sql_rida){\n\t\t\t\n\tglobal $vajalikud;\t\n\t$hakkliha = explode(\"\\n\", $sql_rida['sisu']);\n\t$suvaline_v2rv = sprintf( \"#%06X\\n\", mt_rand( 0, 0x222222 ));\n\t$tulem = \"<div class=\\\"kast_avaleht\\\" style=\\\"background-color:\" .$suvaline_v2rv. \"\\\">\";\n\t\n\t$tulem = $tulem . \"<div class=\\\"maatriksi_konteiner_avaleht\\\">\";\n\tif(isset($_GET['lk'])){\n\t\t$tulem = $tulem . '<a href=\"lahenda.php?lk='.$_GET['lk'].'&ülesanne=' . $sql_rida['id'] . '\">ülesanne ' . $sql_rida['id'] . '</a> ';\n\t}else{\n\t\t$tulem = $tulem . '<a href=\"lahenda.php?ülesanne=' . $sql_rida['id'] . '\">ülesanne ' . $sql_rida['id'] . '</a> ';\n\t}\n\tif ($sql_rida['allikas'] != null){\n\t\t$tulem = $tulem . '<sup><a href=\"#' . $sql_rida['allikas'] . '\">['.$sql_rida['allikas'].']</a></sup>';\n\t\tarray_push ($vajalikud, $sql_rida['allikas']);\n\t}\n\t$tulem = $tulem . \"<table><tbody>\";\n\tforeach($hakkliha as $result) {\n\t\t$tulem = $tulem . \"<tr>\";\n\t\t$hakkliha2 = explode(\" \", $result);\n\t\t\n\t\tforeach($hakkliha2 as $result2) {\n\t\t\t$tulem = $tulem . \"<td><div>\";\n\t\t\t\n\t\t\tif ( strpos($result2, '/') !== false ) {\n\t\t\t\t//$hakkliha3 = explode(\"/\", $result2);\n\t\t\t\t\n\t\t\t\t$tulem = $tulem . '<script>document.write(printMurd(\"'.str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \"\", $result2).'\"))</script>' ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$tulem = $tulem . $result2 ;\n\t\t\t}\n\t\t\t$tulem = $tulem . \"</div></td>\";\n\t\t}\n\n\t\t$tulem = $tulem . \"</tr>\";\n\t}\n\t$tulem = $tulem . \"</tbody></table></div></div>\";\t\t\t\n\t\n\techo $tulem;\n}", "protected static function limpiar_cadena($cadena)\n {\n $cadena = str_ireplace(\"<script>\", \"\", $cadena);\n $cadena = str_ireplace(\"</script>\", \"\", $cadena);\n $cadena = str_ireplace(\"<script src>\", \"\", $cadena);\n $cadena = str_ireplace(\"<script type>\", \"\", $cadena);\n $cadena = str_ireplace(\"SELECT * FROM\", \"\", $cadena);\n $cadena = str_ireplace(\"DELETE FROM\", \"\", $cadena);\n $cadena = str_ireplace(\"INSERT INTO\", \"\", $cadena);\n $cadena = str_ireplace(\"DROP TABLE\", \"\", $cadena);\n $cadena = str_ireplace(\"DROP DATABASE\", \"\", $cadena);\n $cadena = str_ireplace(\"TRUNCATE TABLE\", \"\", $cadena);\n $cadena = str_ireplace(\"SHOW TABLE\", \"\", $cadena);\n $cadena = str_ireplace(\"SHOW DATABASES\", \"\", $cadena);\n $cadena = str_ireplace(\"<?php\", \"\", $cadena);\n $cadena = str_ireplace(\"?>\", \"\", $cadena);\n $cadena = str_ireplace(\"<\", \"\", $cadena);\n $cadena = str_ireplace(\">\", \"\", $cadena);\n $cadena = str_ireplace(\"[\", \"\", $cadena);\n $cadena = str_ireplace(\"]\", \"\", $cadena);\n $cadena = str_ireplace(\"==\", \"\", $cadena);\n $cadena = str_ireplace(\";\", \"\", $cadena);\n $cadena = str_ireplace(\"::>\", \"\", $cadena);\n $cadena = str_ireplace(\"||\", \"\", $cadena);\n $cadena = str_ireplace(\"&\", \"\", $cadena);\n $cadena = str_ireplace(\"|\", \"\", $cadena);\n /*elimina barras invertidas*/\n $cadena = stripslashes($cadena);\n $cadena = trim($cadena);\n return $cadena;\n }", "function detail_2(){\n$trans= new web_transfer();\n$url=$_REQUEST['link'];\n$indexpage='/';\n$base='/';\n$trans->initiate_news ($url,$indexpage); \n$trans->converturl($url,$base);\n$content = '';\n$trans->start_transfer(\"www.w3schools.com\");\n$trans->getcontent($content);\n$content=$this->filter($content);\npreg_match_all('/<div>(.*?)<div style=\"clear:both;\">/s',$content,$matches,PREG_SET_ORDER);\nforeach($matches as $key_left);\n$data['left_col']=$key_left[0];\n$data['csrf_test_name'] = $this->security->get_csrf_hash(); \n$this->load->view('lap_trinh/web_detail_2',$data);\n}", "public abstract function html(): string;", "private function getHtmlReservation(){\n $refReserver = $this->container->router->pathFor('reservation', ['token' => $this->data['token'], 'id' => $this->data['item']->id]);\n if(!isset($_SESSION['iduser'])){\n if(isset($_COOKIE['nom']))\n $p = $_COOKIE['nom'];\n else\n $p = '';\n $name = \"<input type='text' name='nom' value='{$p}' placeholder='nom' required/>\";\n }else{\n $name = \"\";\n }\n\n $html = <<<FIN\n<h1>Reservation d'objet :</h1>\n<form method=\"POST\" action=\"$refReserver\">\n<div class=\"form\">\n $name\n <input type=\"text\" name=\"commentaire\" placeholder=\"commentaire\"/>\n <button class=\"button\" type=\"submit\">Réserver</button>\n</div>\n</form>\nFIN;\n return $html;\n }", "function inihtml()\n{\n\n?>\n <!DOCTYPE html>\n <html lang=\"es\">\n\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" href=\"estilos/css/jav.css\">\n <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" integrity=\"sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh\" crossorigin=\"anonymous\">\n <link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\" integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n <link rel=\"stylesheet\" href=\"//cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css\" integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n <!-- data tables -->\n <!-- Bootstrap CSS -->\n <link rel=\"stylesheet\" href=\"bootstrap/css/bootstrap.min.css\">->\n <link rel=\"stylesheet\" href=\"main.css\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"datatables/datatables.min.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"datatables/DataTables-1.10.18/css/dataTables.bootstrap4.min.css\">\n\n\n\n <title>web</title>\n </head>\n\n <body>\n\n <?php }", "public function process($html);", "function parse($data = \"\") {\n // bold, italic, h2 (Название)\n $data = preg_replace(\"/<span class=rvts78>(.+?)\\s?<\\/span>/i\",\"##**_$1_**\",$data);\n // bold. h3 (коротко)\n $data = preg_replace(\"/<span class=rvts23>(.+?)\\s?<\\/span>/i\",\"###**$1**\",$data);\n // bold (Статья)\n $data = preg_replace(\"/<span class=rvts(?:9|44)>(.+?)\\s?<\\/span>/i\",\"**$1**\",$data);\n // bold h4 (Раздел)\n $data = preg_replace(\"/<span class=rvts15>(.+?)\\s?<\\/span>/i\",\"####**$1**\",$data);\n\n $container = $data;\n\n $container = strip_tags($container);\n $container = preg_replace(\"/&nbsp;/s\",\" \",$container);\n $container = preg_replace(\"/(\\r\\n|\\n|\\r)+/s\",\"\\n\\n\",$container);\n return trim($container);\n}", "function content($kat) {\n if ($kat[2] == 'single') {\n # abfrage content einzelansicht\n $link = $docs.$kat[0].'.pdf';\n $cont = select(\"adhs_cont\", \"*\", \"link\", $link, \"\");\n\n } else {\n # abfrage content liste\n $cont = select_desc(\"adhs_cont\", \"*\", \"kat\", $kat[0][\"id\"], \"lastmod\");\n }\n //-------------\n # META-TAGS-ABFRAGEN\n $meta_tags = meta_tags($kat, $cont, $seitensprache);\n # titel\n $h1 = ($seitensprache == 1) ? 'ADHD research' : 'ADHS Studien';\n $h2 = ($seitensprache == 1) ? $meta_tags['titel_en'] : $meta_tags['titel'];\n\n #----------\n if ($cont[0][\"id\"] != \"104\") { # content ausgeben, außer die sufu wird aufgerufen\n if ($kat[2] == 'single') {\n # einzelansicht\n content_single($cont[0], $seitensprache, $img);\n } else {\n # listenansicht, falls keine sonder-seite aufgerufefn wurde\n if ($cont[0][\"id\"] != \"46\" && $cont[0][\"id\"] != \"74\" && $cont[0][\"id\"] != \"125\") content_liste($kat, $cont, $seitensprache, $img);\n else {\n #echo '</h3>';\n if ($cont[0][\"id\"] == \"46\") include(ROOT_REL.'adhs_test.php'); # adhs-sb (php-inhalt)\n elseif ($cont[0][\"id\"] == \"74\") include(ROOT_REL.'bdi_test.php'); # bdi (php-inhalt)\n elseif ($cont[0][\"id\"] == \"125\") include(ROOT_REL.'error404.php'); # Error-404-Seite (php-inhalt)\n }\n }\n } else include(ROOT_REL.'suche.php');\n }", "public function getCompiledHtml();", "function html() {\n\t\t$ret = \"<p>\\n\";\n\t\tforeach ($this->data as $entry) {\n\t\t\t$line = $this->htmlstring;\n\t\t\t$title = '';\n\t\t\t$journal = '';\n\t\t\t$year = '';\n\t\t\t$authors = '';\n\t\t\tif (array_key_exists('title', $entry)) {\n\t\t\t\t$title = $this->_unwrap($entry['title']);\n\t\t\t}\n\t\t\tif (array_key_exists('journal', $entry)) {\n\t\t\t\t$journal = $this->_unwrap($entry['journal']);\n\t\t\t}\n\t\t\tif (array_key_exists('year', $entry)) {\n\t\t\t\t$year = $this->_unwrap($entry['year']);\n\t\t\t}\n\t\t\tif (array_key_exists('author', $entry)) {\n\t\t\t\tif ($this->_options['extractAuthors']) {\n\t\t\t\t\t$tmparray = array(); //In this array the authors are saved and the joind with an and\n\t\t\t\t\tforeach ($entry['author'] as $authorentry) {\n\t\t\t\t\t\t$tmparray[] = $this->_formatAuthor($authorentry);\n\t\t\t\t\t}\n\t\t\t\t\t$authors = join(', ', $tmparray);\n\t\t\t\t} else {\n\t\t\t\t\t$authors = $entry['author'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (('' != $title) || ('' != $journal) || ('' != $year) || ('' != $authors)) {\n\t\t\t\t$line = str_replace(\"TITLE\", $title, $line);\n\t\t\t\t$line = str_replace(\"JOURNAL\", $journal, $line);\n\t\t\t\t$line = str_replace(\"YEAR\", $year, $line);\n\t\t\t\t$line = str_replace(\"AUTHORS\", $authors, $line);\n\t\t\t\t$line .= \"\\n\";\n\t\t\t\t$ret .= $line;\n\t\t\t} else {\n\t\t\t\t$this->_generateWarning('WARNING_LINE_WAS_NOT_CONVERTED', '', print_r($entry, 1));\n\t\t\t}\n\t\t}\n\t\t$ret .= \"</p>\\n\";\n\t\treturn $ret;\n\t}", "public function urlGetContent($aURL){\n\t\t$tmp=file_get_contents($aURL);\n\t\t$this->regHtml=$tmp;\n\t}", "public function load($html);", "function IniciarHTML(){\r\n echo \"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\";\r\n\t echo \"<html xmlns='http://www.w3.org/1999/xhtml'>\";\r\n\t echo \"<head>\";\r\n\t echo \"<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\";\r\n echo \"<link rel='stylesheet' href='../css/cPgComprarProduto.css' type='text/css' />\";\r\n echo \"<script type='text/javascript' src='../js/jPgComprarProduto.js'></script>\";\r\n \r\n echo \"<script type='text/javascript' src='../jQuery/js/jquery-1.4.4.min.js'></script>\";\r\n echo \"<script type='text/javascript' src='../jQuery/plugin/lightbox.js'></script>\";\r\n echo \"<link rel='stylesheet' href='../css/jQuery/lightbox.css' type='text/css' />\";\r\n echo \"</head>\";\r\n }", "function parseHTML(){\n\t\t$code = preg_replace_callback('~(href|src|codebase|url|action)\\s*=\\s*([\\'\\\"])?(?(2) (.*?)\\\\2 | ([^\\s\\>]+))~isx',array('self','parseExtURL'),$this->source);\n\t\t$code = preg_replace_callback('~(<\\s*style.*>)(.*)<\\s*/\\s*style\\s*>~iUs',Array('self','parseCSS'),$code);\n\t\t$code = preg_replace_callback('~(style\\s*=\\s*)([\\'\\\"])(.*)\\2~iUs',Array('self','parseStyle'),$code);\n\t\t$code = preg_replace_callback('~<script(\\s*.*)>(.*)<\\s*/\\s*script>~iUs',Array('self','parseScriptTag'),$code);\n\t\t$this->output = $code;\n\t}", "private function DownloadParsePage() {\n $this->Log(\"Debridage du lien : \".$this->url);\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($curl, CURLOPT_USERAGENT, DOWNLOAD_STATION_USER_AGENT);\n\t\tcurl_setopt($curl, CURLOPT_COOKIEFILE, $this->TOUTDEBRID_COOKIE);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_URL, $this->TOUTDEBRID_DEBRID_URL);\n curl_setopt($curl, CURLOPT_POST, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, 'urllist='.urlencode($this->url).'&captcha=none&');\n\t\t$ret = curl_exec($curl);\n\t\t$this->Log(\"Reponse tout-debrid : \".$ret);\n\t\tcurl_close($curl);\n\t\treturn $ret;\n\t}", "public function html(): string;", "public static function recupereTudo() {\n include_once 'conexao.php';\n $sql = \"SELECT * FROM INSTITUICAO\";\n $query = mysql_query($sql);\n while ($sql = mysql_fetch_array($query)) {\n $id = $sql[\"id\"];\n $nome = $sql[\"nome\"];\n echo \"<a href=nome.php?id=$id>$nome</a>\";\n }\n }", "public function passaAtributo(){\n\t\t$this->seletor = 0; // Por algum motivo que não quero investigar, a condicional for nñao está se comportando como eu esperava. Por isso estou usando while\n\t\t$this->alvo = file_get_contents($this->alvo);\n\t\t\twhile ($this->seletor < $this->atributos) { \n\n\t\t\t\t\t\t\t\t$dom = new DOMDocument();\n\t\t\t\t\t\t\t\t$dom->loadHTMLFile($this->modelo);\n\t\t\t\t\t\t\t\t$controle = 0; // Variável de controle\n\t\t\t\t\t\t\t\t// Consultando os links\n\t\t\t\t\t\t\t\t$links = $dom->getElementsByTagName($this->valores[$this->seletor]); // Seleione a tag de pesquisa atual\n\t\t\t\t\t\t\t\tforeach ($links as $link) {\n\t\t\t\t\t\t\t\t\t\t\t\tif ($controle == 0) { // Pega primeiro valor da class e assume como padrão (uma por tag)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->tag = $this->valores[$this->seletor];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->class = $link->getAttribute('class'); // Retorna tag do HTML com a nova class\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->alvo = str_replace(\"<$this->tag\", \"<$this->tag class='$this->class' \", $this->alvo);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$controle++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t/*echo \"<p>Executando...\".$this->valores[$this->seletor].\"\"; */\n\t\t\t\t$this->seletor++;\n\t\t\t}\n\t\t\techo \"<p>\".$this->alvo;\n\n\n\t}", "abstract protected function getInputHtml();", "public function GetHTML(){\n\t/*unset($this->url[0]);\n\t\t\t$cnt=1;\n\t\t\tforeach($this->url as $v){\n\t\t\t\tif(count($this->url)==$cnt && $v>0 && is_numeric($v)){\n\t\t\t\t//$this->out_url.=$v.'/';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t$this->out_url.=$v.'/';\n\t\t\t$cnt++;\n\t\t\t}*/\n\t\n\t\t\n\t\n\t$next=$this->list['current']+1;\n\t$prev=$this->list['current']-1;\n\t$limit=($this->page-1)*$this->take+1;\n\t$limit2=$limit+$this->take-1;\n\t\n\tif ($this->page==$this->total_pages)\n\t$limit2=$this->total;\n\t$str='';\n\t$str .=\"\";\n\t\n\n\t$str .=<<<OUT\n\t\t\t<div class=\"pager\">\n\t\t \t<div class=\"hr\"><i></i></div>\n\t\t <ul>\nOUT;\n\tif($prev>0){\n\t$str .=<<<OUT\n\t\t\t<li class=\"prev\"><a href=\"{$this->out_url}{$prev}/\"><i class=\"i\"></i></a></li>\nOUT;\n\t}\n \n\tfor ($i=1; $i < $this->page ; $i++)\n\t\t{\n\t\t\tif ($i>((int)$this->page-(int)$this->half_block)){\n\t\t\t\tif($i==1){\n\t\t\t\t$str .=<<<OUT\n\t\t\t\t<li><a href=\"{$this->out_url}{$this->list[$i]}/\">{$this->list[$i]}</a></li>\nOUT;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t$str .=<<<OUT\n\t\t\t\t<li><a href=\"{$this->out_url}{$this->list[$i]}/\">{$this->list[$i]}</a></li>\nOUT;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tif($this->total_pages==$this->list['current'])\n\t$str .=\"<li class='last'>\".$this->list['current'].\"</li>\";\n\telse\n\t$str .=\"<li>\".$this->list['current'].\"</li>\";\n\t\n\t$cnt=1;\n\tfor ($i=$this->page+1; $i <= $this->total_pages ; $i++)\n\t\t{\n\t\t\tif($this->total_pages==$i || ($this->half_block-1)==$cnt)\n\t\t\t$classlast=' class=\"last\"';\n\t\t\telse\n\t\t\t$classlast='';\n\t\t\t\n\t\t\tif ($this->half_block==$cnt)\n\t\t\tbreak;\n\t\t\t$str .=<<<OUT\n\t\t\t<li{$classlast}><a href=\"{$this->out_url}{$this->list[$i]}/\">{$this->list[$i]}</a></li>\nOUT;\n\t\t\t$cnt++;\n\t\t}\n\n\tif($this->list['current']<$this->total_pages){\n\t$str .=<<<OUT\n\t\t\t<li class=\"next\"><a href=\"{$this->out_url}{$next}/\"><i class=\"i\"></i></a></li>\nOUT;\n\t}\n\t\n\t$str .=<<<OUT\n \t\t </div>\nOUT;\n\tif ($this->total_pages>1)\n\treturn $str;\n\t\n\t}", "function idrws_load_content(){\n?>\n\t<div id=\"idrws-wrapper\">\n\t\t<div class='wrap'>\n\t\t\t<h1>PDF to HTML5</h1>\n\t\t\t<h3>Powered by <a href=\"http://www.idrsolutions.com/html_products\">JPDF2HTML5</a></h3>\n\t\t\t<div id=\"idrws-left\">\n\t\t\t\t<div id=\"idrws-files-container\">\n\t\t\t\t<!-- <div id=\"idrws-files-wrapper\"> -->\n\t\t\t\t\t<h2 class=\"idrws-option-header\">Step 1: Upload a File</h2>\n\t\t\t\t\t<div id=\"idrws-file-list\">\n\t\t\t\t\t\t<?php idrws_get_files(); ?>\n\t\t\t\t\t\t<div id=\"idrws-upload\">\n\t\t\t\t\t\t\t<h3 style=\"margin: 0;\">Upload a new File</h3>\n\t\t\t\t\t\t\t<form action='' method='post' enctype=\"multipart/form-data\">\n\t\t\t\t\t\t\t\t<input type='file' id='idrws_upload_pdf' name='idrws_upload_pdf' style=\"width:100%;\"></input>\n\t\t\t\t\t\t\t\t<?php submit_button('Upload') ?>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<!-- </div> -->\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<br/>\n\t\t\t<div id=\"idrws-converion\">\n\t\t\t\t<form action='' method='post' autocomplete='on'>\n\t\t\t\t\t<div id=\"idrws-options-menu\">\n\t\t\t\t\t\t<div id=\"idrws-conversion-container\">\n\t\t\t\t\t\t\t<a name=\"convert\"></a>\n\t\t\t\t\t\t\t<h2 class=\"idrws-option-header\">Step 2: Convert</h2>\n\n\t\t\t\t\t\t\t<div><input type=\"text\" name=\"idrws_selected_pdf_name\" id=\"idrws_selected_pdf_name\" readonly><input type=\"text\" id=\"idrws_selected_pdf\" name=\"idrws_selected_pdf\" readonly></div>\n\t\t\t\t\t\t\t<div id=\"idrws-view-mode\">\n\t\t\t\t\t\t\t\t<h3>View Mode</h3>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"viewMode\" value=\"multifile\" checked>Individual Pages\t\t\t</label><br/>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"viewMode\" value=\"pageturning\">Page Turning \t\t\t\t\t</label><br/>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"viewMode\" value=\"singlefile\">Single Document\t\t\t\t\t</label><br/>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"viewMode\" value=\"multifile_splitspreads\">Magazine Layout\t\t</label><br/>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"viewMode\" value=\"singlefile_splitspreads\">Continuous Magazine \t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php submit_button('Convert') ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"idrws-account-container\">\n\t\t\t\t\t\t<h2 class=\"idrws-option-header\">Account details</h2>\n\t\t\t\t\t\t<h3>Trial account available only</h3>\n\n\t\t\t\t\t\t<!-- <label><input type=\"checkbox\" id=\"idrws-istrial\" name=\"istrial\" checked>Trial?</label> -->\n\n\t\t\t\t\t\t<!-- <h2>Account Options</h2>\n\t\t\t\t\t\tEmail:<br/>\n\t\t\t\t\t\t\t<input id=\"username\" type=\"text\" name=\"idrws-email\"></br>\n\t\t\t\t\t\tPassword:<br/>\n\t\t\t\t\t\t\t<input id=\"password\" type=\"password\" name=\"idrws-password\"></br> -->\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"idrws-right\">\n\t\t\t\t<div id=\"idrws-preview-window\">\n\t\t\t\t\t<h2 class=\"idrws-option-header\">Step 3: Preview</h2>\n\t\t\t\t\t<div id='idrws_selected_shortcode'></div>\n\t\t\t\t\t<iframe id=\"idrws-preview\" allowfullscreen>Your browser does not support IFrames - Preview unavailable</iframe>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"idrws-about-us\">\n\t\t\t\t\t<h2 class=\"idrws-option-header\">About PDF to HTML5</h2>\n\t\t\t\t\t<br/>\n\t\t\t\t\t<a href=\"http://www.idrsolutions.com/\"><img src=\"<?php echo IDRWS_PLUGIN_URL?>images/idr_transparent.png\" style=\"width:150px;float:left\"/></a>\n\t\t\t\t\t<div>Created by <a href=\"http://www.idrsolutions.com/\">IDR Solutions</a><br/>\n\t\t\t\t\t\tClick here to see our <a href=\"http://www.idrsolutions.com/products/\">other products</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n<?php\n\t}", "function HTMLheaders($body) {\n$title = GetLangVar('title');\necho \"\n<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>\n<html lang='pt'>\n<head>\n <title>$title</title>\n <meta name='title' content='\".$metatitle.\"' >\n <meta http-equiv='Content-Type' content=\\\"text/html; charset='UTF-8'\\\">\n <meta name='google-site-verification' content='sBY5TPzoJ09tOWC6GGacC8LouyYCSS8ObhOybnFn84k' >\n <meta name='url' content='\".$metaurl.\"' >\n <meta name='robots' content='all' />\n <meta name='language' content='pt-br' />\n <meta name='description' content='\".$metadesc.\"'>\n <meta name='keywords' content='\".$metakeyw.\"' >\n <meta name='autor' content='Alberto Vicentini - INPA' >\n <meta name='company' content='\".$metacompany.\"' >\n <meta name='revisit-after' content='30' >\n <meta http-equiv='imagetoolbar' content='no' >\n <link href='css/geral.css' rel='stylesheet' type='text/css' >\n <link rel='stylesheet' type='text/css' media='screen' href='css/Stickman.MultiUpload.css' >\n <link rel='stylesheet' type='text/css' href='css/cssmenu.css' >\n <link rel='stylesheet' type='text/css' media='screen' href='css/autosuggest.css' >\n <link rel='stylesheet' type='text/css' media='screen' href='javascript/tabber/tabber.css' >\n <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"dhtmlxconnector/dhtmlxTabbar/dhtmlxtabbar.css\\\">\n <link rel='stylesheet' type='text/css' href='dhtmlxconnector/dhtmlxGrid/codebase/dhtmlxgrid.css' >\n <link rel='stylesheet' type='text/css' href='dhtmlxconnector/dhtmlxGrid/codebase/dhtmlxgrid_pgn_bricks.css' >\n <link rel='stylesheet' type='text/css' href='dhtmlxconnector/dhtmlxGrid/codebase/ext/dhtmlxgrid_hmenu.css' >\n <link rel='stylesheet' type='text/css' href='javascript/fileuploader.css' >\n <link rel='stylesheet' href='magiczoomplus/magiczoomplus/magiczoomplus.css' type='text/css' media='screen' >\n <script type='text/javascript' src='javascript/ajax_framework.js'></script>\n <script type='text/javascript' src='javascript/jquery-latest.js'></script>\n <script type='text/javascript'>\n $(document).ready(function(){\n $('.toggle_container').hide();\n $('h2.trigger').click(function(){\n $(this).toggleClass('active').next().slideToggle('slow');\n });\n });\n </script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/dhtmlxcommon.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxTabbar/dhtmlxtabbar.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxTabbar/dhtmlxcontainer.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/dhtmlxgrid.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/dhtmlxgridcell.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/dhtmlxgrid_pgn.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxConnector_php/codebase/connector.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/dhtmlxgrid_export.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_link.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_clist.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/ext/dhtmlxgrid_hmenu.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/ext/dhtmlxgrid_ssc.js'></script>\n <script type='text/javascript' src='dhtmlxconnector/dhtmlxGrid/codebase/ext/dhtmlxgrid_mcol.js'></script>\n\n <script type='text/javascript' src='javascript/sorttable/common.js'></script>\n <script type='text/javascript' src='javascript/sorttable/css.js'></script>\n <script type='text/javascript' src='javascript/sorttable/standardista-table-sorting.js'></script>\n <script type='text/javascript' src='javascript/mootools.js'></script>\n <script type='text/javascript' src='javascript/teste.js'></script>\n <script type='text/javascript' src='javascript/Stickman.MultiUpload.js'></script>\n <script type='text/javascript' src='css/cssmenuCore.js'></script>\n <script type='text/javascript' src='css/cssmenuAddOns.js'></script>\n <script type='text/javascript' src='css/cssmenuAddOnsItemBullet.js'></script>\n <script src='magiczoomplus/magiczoomplus/magiczoomplus.js' type='text/javascript'></script>\n</head>\";\nif (!empty($body)) {\n\techo \"\n<body \".$body.\">\n<div>\";\n} else {\n\techo \"\n<body >\n<div>\";\n}\nif (!isset($_SESSION['userid'])) {\n\techo \"\n<h1>$title</h1>\";\n} else {\n\techo \"\n<h3>\".GetLangVar('title').\"</h3>\";\n}\nMenu($title);\necho \"\n<!--////////////////-->\n<!--FIM DO CABECALHO-->\n<!--////////////////-->\n</div>\n<div id='container'>\n<br>\";\n}", "function &getHTML()\n\t{\n\t\tinclude_once(\"./Services/PersonalDesktop/classes/class.ilBookmarkBlockGUI.php\");\n\t\t$bookmark_block_gui = new ilBookmarkBlockGUI(\"ilpersonaldesktopgui\", \"show\");\n\t\t\n\t\treturn $bookmark_block_gui->getHTML();\n\t}", "function skin_sets_overview($content) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='tableborder'>\n <div class='tableheaderalt'>\n <table cellpadding='0' cellspacing='0' border='0' width='100%'>\n <tr>\n <td align='left' width='95%' style='font-size:12px; vertical-align:middle;font-weight:bold; color:#FFF;'>Стили</td>\n <td align='right' width='5%' nowrap='nowrap'>\n <img id=\"menumainone\" src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' alt='Опции' class='ipd' /> &nbsp;\n </td>\n </tr>\n</table>\n </div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n $content\n </table>\n <div align='center' class='tablefooter'>&nbsp;</div>\n</div>\n<br />\n<div><strong>Информация:</strong><br />\n<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Изменен от начального варианта шаблона' /> Изменен от начального варианта шаблона.\n<br /><img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Не изменен от начального варианта шаблона' /> Не изменен от начального варианта шаблона.\n<br /><img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Унаследованный от начального варианта шаблона' /> Унаследованный от начального варианта шаблона.\n</div>\n<div id='menumainone_menu' style='display:none' class='popupmenu'>\n\t<form action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=addset&id=-1' method='POST'>\n\t<div align='center'><strong>Создать новый стиль</strong></div>\n\t<div align='center'><input type='text' name='set_name' size='20' value='Введите название стиля' onfocus='this.value=\"\"'></center></div>\n\t<div align='center'><input type='submit' value='Создать' class='realdarkbutton' /></div>\n\t</form>\n</div>\n<script type=\"text/javascript\">\n\tipsmenu.register( \"menumainone\" );\n</script>\nEOF;\nif ( IN_DEV == 1 )\n{\n$IPBHTML .= <<<EOF\n<br />\n<div align='center'>\n Экспорт данных: <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportmaster'>Все HTML шаблоны главного стиля</a>\n &middot; <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportbitschoose'>Выбрать HTML шаблоны</a>\n &middot; <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=exportmacro'>Макросы главного стиля</a>\n</div>\n<br />\nEOF;\n}\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function landContent($arr)\n\t{ \n\t\t$output='';\n\t\tif($arr[0]['html_content']!='')\n\t\t\t$output='<div id=\"product_tbbg\" style=\"padding:2px;border: 1px solid rgb(201, 73, 51); margin-top: 14px;\">'.$arr[0]['html_content'].'</div>';\n\t\treturn $output;\n\t}", "function massage_data()\n {\n /* References the CI superobject to have access to the webpage. */\n $this->CI =& get_instance();\n $page = $this->CI->output->get_output();\n /* Creates a new DOMDocument and loads the HTML of the webpage. */\n $dom = new DOMDocument();\n $dom->loadHTML($page);\n /* Gets a list of all the <p> HTML elements and loops through them. */\n foreach($dom->getElementsByTagName('p') as $element)\n {\n /* If the class of the element is lead, it is modified. */\n if($element->getAttribute('class') == 'lead')\n { \n $temp = $element->textContent;\n $sentence = $this->parse_content(explode(' ', $temp), $dom);\n $this->edit_elements($element, $sentence);\n }\n }\n echo $dom->saveHTML();\n }", "function getData($link = \"\"){\n $mainURL = \"http://zakon4.rada.gov.ua\";\n $curl = curl_init();\n\n curl_setopt($curl,CURLOPT_URL,$mainURL . $link);\n curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);\n\n $data = curl_exec($curl);\n $data = iconv('cp1251','utf-8',$data);\n // If error with access denied - retry in 1 sec\n if(strpos($data,\"Доступ тимчасово обмежено!\") > 0){\n sleep(1);\n $data = getData($link);\n }\n // If error with JS redirect - get data from link\n if( strpos($data,\"conv?test=\") > 0 ){\n preg_match('/location\\.href=\\\"(.+?)\\\"/',$data,$redirect);\n $data = getData($redirect[1]);\n }\n // If error with permalink\n if( strpos($data,\"Натисніть, будь-ласка, на це\") ){\n preg_match('/<a href=\"(.+?)\" target=_top><b>посилання<\\/b><\\/a>/',$data,$redirect);\n $data = getData($redirect[1]);\n }\n\n $result = cropMainText($data);\n\n // Check we have paginator.\n if( strpos($data,'наступна сторінка') > 0 ){\n preg_match('/<a href=\"(.*?)\\s?\" title=\"наступна сторінка\">наступна сторінка<\\/a>/',$data,$page);\n print_r(\"Get next page ...\");\n $result .= getData($page[1]);\n }\n\n return $result;\n}", "function constroe_elemento_bloco($titulo, $conteudo, $imagens){\n\n// global\nglobal $idioma;\n\n// codigo html\n$codigo_html = \"\n<div class='classe_div_bloco_pagina_bloco_div'>\n\n<div class='classe_titulo_bloco'>\n$titulo\n</div>\n\n<div class='classe_conteudo_bloco'>\n$conteudo\n</div>\n\n<div class='classe_imagens_bloco'>\n$imagens\n</div>\n\n</div>\n\";\n\n// retorno\nreturn $codigo_html;\n\n}", "public function silo_contents()\n\t{\n\t}", "protected function mainContent()\n {\n ob_start();\n\n $personne = $this->personne;\n\n $mort = $personne->getMort();\n if ($mort == -1) {\n $mort = \"AUJOURD'HUI\";\n }\n ?>\n <article class=\"show\" id=\"<?php echo $personne->getId(); ?>\">\n <header>\n <?php echo $personne->getNom() . ' ' . $personne->getPrenom() . '<br />' . utf8_encode($personne->getNaissance()) . ' - ' . $mort; ?>\n </header>\n <aside>\n <?php\n if ($personne->portrait) {\n foreach($personne->portrait as $photo) {\n echo '<img src=\"' . $photo->getSrc() . '\"/>';\n }\n } else {\n echo '<div class=\"noimage\">PAS DE PHOTO</div>';\n }\n ?>\n </aside>\n <section>\n <h2>Filmographie</h2>\n <h3>Rôles</h3>\n <p>\n <?php\n $roles = $this->roles;\n $films_roles = $this->films_roles;\n if(!$roles) { ?>\n Cette personne n'a joué dans aucun film.<br/><br/>\n <?php } else {\n foreach($roles as $role) {\n echo '<u>'.$role->getTitreFilm().'</u> en tant que <b>'.$role->getRole()->nom.'</b><br />';\n } ?>\n <?php } ?>\n </p>\n <h3>Productions</h3>\n <p>\n <?php\n $productions = $this->productions;\n if(!$productions) { ?>\n Cette personne n'a réalisé aucun film.<br/><br/>\n <?php } else {\n echo 'Voir la liste ci-après';\n } ?>\n </p>\n </section>\n <section class=\"right\">\n <p>Nationalité :\n <?php echo $personne->getNationalite(); ?>\n </p>\n\n <p>Sexe :\n <?php\n if ($personne->isSexeFeminin()) {\n echo 'Femme';\n } else {\n echo 'Homme';\n }\n ?>\n </p>\n </section>\n <footer>\n <?php\n if (isset($_SESSION['id'])) {\n echo '<a id=\"iframe\" href=\"./index.php?controller=ActeurRea&action=edit&id='. $personne->getId() .'\">Editer</a> ';\n echo '<a id=\"iframe\" href=\"./index.php?controller=ActeurRea&action=delete&id=' . $personne->getId() . '\">Supprimer</a>';\n }\n ?>\n </footer>\n </article>\n <articles id=\"liste\">\n <?php if($productions) {\n $params['films'] = $productions;\n (new Print_Films_View($params))->display();\n } elseif($films_roles) {\n $params['films'] = $films_roles;\n (new Print_Films_View($params))->display();\n } ?>\n </articles>\n<?php\n $content = ob_get_contents();\n ob_end_clean();\n\n return $content;\n }", "public function criarHtml()\n {\n $action = 'excluir(\"'.$this->no_arquivo.'\",\"'.$this->cd_rotina.'\",\"'.$this->cd_modulo.'\",\"'.$this->value.'\")';\n return \"<a onclick='$action' class='mdl-button mdl-js-button mdl-button--icon'>\n <i class='glyphicon glyphicon-minus'></i></a>\";\n }", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}", "function html_head_from_all_pagest()\r\n{\r\n $ht_head = '\r\n <!DOCTYPE html>\r\n <html lang=\"en\">\r\n <head>\r\n <meta charset=\"UTF-8\">\r\n <title>Кредитный калькулятор</title>\r\n <link rel=\"stylesheet\" href=\"css/style.css\">\r\n <script src=\"http://code.jquery.com/jquery-1.7.1.min.js\"></script>\r\n <script src=\"js/script.js\"></script> \r\n <style>\r\n body{\r\n font-family: \"Segoe UI Light\";\r\n }\r\n #tr{\r\n \r\n font-size: x-large;\r\n }\r\n \r\n span {\r\n font-weight: 700;\r\n font-size: large;\r\n }\r\n </style> \r\n </head>';\r\n echo $ht_head;\r\n}", "abstract protected function getHtmlBody();", "private function getHtmlAjoutItem(){\n $refAjout = $this->container->router->pathFor('ajoutItem', ['tokenModif' => Liste::all()->where('no', '=', $this->data->no)->first()->tokenModif, 'id' => $this->data->no] );\n $html = \"<h1>Ajout d'un item à la liste {$this->data->titre}</h1>\";\n $html .= <<<END\n<h1>Ajout d'objet : </h1>\n<form method=\"POST\" action=\"$refAjout\" enctype=\"multipart/form-data\">\n<div class=\"form\">\n <input type=\"text\" name=\"nom\" placeholder=\"nom\" required/>\n <input type=\"text\" name=\"descr\" placeholder=\"description\"/>\n <input type=\"text\" name=\"url\" placeholder=\"url\"/>\n <input type=\"text\" name=\"prix\" placeholder=\"prix\" required/>\n <div>\n \t<label>Image :</label>\n \t<input type=\"file\" name=\"fileToUpload\" id=\"fileToUpload\"/>\n </div>\n <button class=\"button\" type=\"submit\">Ajouter</button>\n</div>\n\n\t\n</form>\nEND;\n return $html;\n }", "private function Llenar()\n {\n \ttry{\n\t \t$resultado = $this->novedades->GetParaWidget(5);\n\t\t\tif($resultado->num_rows > 0){\n\t\t\t\twhile($row = $resultado->fetch_array())\n\t\t {\n\t\t \t//titulo, vinculo //$t = $row[0]; //$v = $row[1];\n\t\t \t$this->Contenido .= \"<li>\" . (strlen($row[0])>35? substr($row[0],0,38) . \"...\": $row[0]) . \"</li>\";\n\t\t }\n\t\t\t\t$resultado->close();\n\t\t\t}\n\t \telse\n\t\t\t\t$this->Contenido -= \"No hay novedades.\";\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\t$this->Contenido .= \"Oooops! al parecer ocurrio algun error interno. Lo sentimos mucho :'( Vuelve a intentarlo en unos minutos!\";\n\t\t}\n $this->Contenido .= \"</ul></div>\";\n }", "public function echoHTML($body){\n $time = $this->getDateAndTime();\n echo '<!DOCTYPE html>\n <html>\n <head>\n <title>Svenskt Väder | Prognoser från YR och SMHI</title>\n <meta charset = \"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <!-- Bootstrap -->\n <link href=\"./Style/Bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">\n <!-- My style -->\n <link rel=\"stylesheet\" type=\"text/css\" href=\"./Style/Style.css\">\n </head>\n <body>\n <div class=\"container\">\n <header>\n <div class=\"row\">\n <div class=\"col-md-8\"> \n <a href=\"./\">\n <img src=\"/Style/sol.png\" alt=\"logo för svenskt väder föreställande sol\" />\n </a>\n </div>\n <div class=\"col-md-4\"> \n <form class=\"form-inline top\" method=\"get\" role=\"form\" action=\"?'.NavigationView::$actionSearch.'\">\n <div class=\"form-group\">\n <input type=\"text\" class=\"form-control\" maxlength=\"255\" name=\"search\" id=\"search\" placeholder=\"Sök väder via ort\" autofocus=\"\">\n </div>\n <div class=\"form-group\">\n <input type=\"submit\" value=\"Sök\" class=\"btn btn-default\">\n </div>\n </form>\n </div>\n </div> \n </header>\n <div id=\"content\">\n <div class=\"row\">\n <div class=\"col-xs-12 col-sm-12\">\n '.$body.'\n </div>\n </div>\n </div>\n <footer>\n <p class=\"tight\">Denna sida är skapad av Marike Grinde</br>\n i kursen 1DV42E, Självständigt arbete, Fakulteten för teknik, Linnéuniversitetet</p>\n </footer>\n </div>\n <script src=\"//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js\"></script> \n </body>\n </html>';\n }", "private function _getContent()\n {\n return '{*Sailthru zephyr code is used for full functionality*}\n <div id=\"main\">\n <table width=\"700\">\n <tr>\n <td>\n <h2><p>Hello {profile.vars.name}</p></h2>\n <p>Did you forget the following items in your cart?</p>\n <table>\n <thead>\n <tr>\n <td colspan=\"2\">\n <div><span style=\"display:block;text-align:center;color:white;font-size:13px;font-weight:bold;padding:15px;text-shadow:0 -1px 1px #af301f;white-space:nowrap;text-transform:uppercase;letter-spacing:1;background-color:#d14836;min-height:29px;line-height:29px;margin:0 0 0 0;border:1px solid #af301f;margin-top:5px\"><a href=\"{profile.purchase_incomplete.items[0].vars.checkout_url}\">Re-Order Now!</a></span></div>\n </td>\n </tr>\n </thead>\n <tbody>\n {sum = 0}\n {foreach profile.purchase_incomplete.items as i}\n <table width=\"650\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"margin:0 0 20px 0;background:#fff;border:1px solid #e5e5e5\">\n <tbody>\n <tr>\n <td style=\"padding:20px\"><a href=\"{i.url}\"><img width=\"180\" height=\"135\" border=\"0\" alt=\"{i.title}\" src=\"{i.vars.image_url}\"></a></td>\n <td width=\"420\" valign=\"top\" style=\"padding:20px 10px 20px 0\">\n <div style=\"padding:5px 0;color:#333;font-size:18px;font-weight:bold;line-height:21px\">{i.title}</div>\n <div style=\"padding:0 0 5px 0;color:#999;line-height:21px;margin:0px\">{i.vars.currency}{i.price/100}</div>\n <div style=\"color:#999;font-weight:bold;line-height:21px;margin:0px\">{i.description}</div>\n <div><span style=\"display:block;text-align:center;width:120px;border-left:1px solid #b43e2e;border-right:1px solid #b43e2e;color:white;font-size:13px;font-weight:bold;padding:0 15px;text-shadow:0 -1px 1px #af301f;white-space:nowrap;text-transform:uppercase;letter-spacing:1;background-color:#d14836;min-height:29px;line-height:29px;margin:0 0 0 0;border:1px solid #af301f;margin-top:5px\"><a href=\"{i.url}\">Buy Now</a></span></div>\n </td>\n </tr>\n </tbody>\n </table>\n {/foreach}\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:3px 9px\" colspan=\"2\"></td>\n <td align=\"right\" valign=\"top\" style=\"padding:3px 9px\"></td>\n </tr>\n </tbody>\n <tfoot>\n </tfoot>\n </table>\n <p><small>If you believe this has been sent to you in error, please safely <a href=\"{optout_confirm_url}\">unsubscribe</a>.</small></p>\n {beacon}\n </td>\n </tr>\n </table>\n </div>';\n }", "function load_page_content($page) {\n //get text as html\n $pretext1 = html_entity_decode($page->text);\n\n //replace non-html tags with proper html tags\n // fix image tags\n $pretext2 = str_replace(array(\"<_image>\", \"</_image>\"), array(\"<img src=\\\"\", \"\\\"/>\"), $pretext1);\n // fix bullet point tags\n $pretext3 = str_replace(array(\"<_bullet>\", \"</_bullet>\"), array(\"<div>• \", \"</div>\"), $pretext2);\n // fix subtitle tags\n $text = str_replace(array(\"<subtitle>\", \"</subtitle>\"), array(\"<br/><br/><b>\", \"</b>\"), $pretext3);\n\n return $text;\n}", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();" ]
[ "0.6741055", "0.64413214", "0.6356386", "0.63376796", "0.62458897", "0.6217688", "0.6217688", "0.6204738", "0.6191451", "0.61839145", "0.6172932", "0.61624", "0.60967356", "0.6091406", "0.6029172", "0.6018081", "0.60135317", "0.5975807", "0.5918726", "0.5903938", "0.5878765", "0.58586013", "0.58288425", "0.58199245", "0.5814891", "0.5814095", "0.57809186", "0.57516575", "0.5744574", "0.57438195", "0.5743138", "0.5736374", "0.57321787", "0.5729673", "0.5716376", "0.56931263", "0.56872785", "0.5677264", "0.5673062", "0.56706923", "0.56538075", "0.563948", "0.56390333", "0.5638901", "0.56339425", "0.56231546", "0.56104684", "0.5596181", "0.5594404", "0.55804384", "0.5580034", "0.5578848", "0.5571631", "0.55709755", "0.5560711", "0.5550624", "0.5547787", "0.55380994", "0.5537279", "0.5533684", "0.5528513", "0.552785", "0.55160105", "0.55120707", "0.55073637", "0.54997605", "0.54865104", "0.5483723", "0.54637533", "0.5463103", "0.5460833", "0.5456127", "0.5450751", "0.5444575", "0.5437177", "0.54366827", "0.54272366", "0.5420682", "0.5409251", "0.5407374", "0.5404419", "0.5388833", "0.5387242", "0.5384272", "0.5381606", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576", "0.53804576" ]
0.5837408
22
/ convierte un timestamp de mysql a un formato legible
function time2string($timestamp=''){ $meses = array('01' => 'enero','02'=>'febrero','03'=>'marzo','04'=>'abril','05'=>'mayo','06'=>'junio','07'=>'julio','08'=>'agosto','09'=>'septiembre','10'=>'octubre','11'=>'noviembre','12'=>'diciembre'); $partes = preg_split('/[\s,-]+/',$timestamp); $fecha = $partes[2].' de '.$meses[$partes[1]].' de '.$partes[0].' a las '.$partes[3]; return $fecha; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mysql_timestamp(): string {\n\treturn date('Y-m-d H:i:s');\n}", "function datetime_unix2mysql($timestamp) {\n\treturn date('Y-m-d H:i:s', $timestamp);\n}", "function mysqldate($timestamp) {\n return \"'\" . date('Y-m-d H:i:s', $timestamp) . \"'\";\n}", "function to_mysqlDate($time)\r\n{\r\n // format 2012-05-21 18:54:49\r\n $mysqldate =strftime(\"%Y-%m-%d %H:%M:%S\",$time);\r\n \r\n return $mysqldate;\r\n \r\n}", "function time_php2sql($unixtime){\n return gmdate(\"Y-m-d H:i:s\", $unixtime);\n}", "public static function dbDateFormat($timestamp)\n\t{\n\t\treturn strftime(\"%Y-%m-%d %H:%M:%S\",$timestamp);\n\t}", "function UnixToMysql($timestamp)\n\t{\n\t\t// and returns the mySQL timestamp - format YYYYMMDDHHMMSS\n\t\t$time = date('YmdHis', $timestamp);\n\t\treturn $time;\n\t}", "function format_mysql_datetime($format, $mysql_datetime)\n{\n\t$unix=timestamp_from_mysql($mysql_datetime);\n\n\t$date=\"&nbsp;\";\n\tif($unix>0)\n\t{\n\t\t$date=date($format, $unix);\n\t}\n\treturn $date;\n}", "private function ConvertPayPalTimestampToDBDateTime($timestamp)\n {\n\tif(strlen($timestamp) == 0) {\n return \"\";\n\t}\n\t\t\n\treturn gmdate('Y-m-d H:i:s', strtotime($timestamp));\n }", "function erp_mysqldate_to_phptimestamp( $time, $timestamp = true ) {\n\n if ( ! preg_match( '/\\d{2}:\\d{2}:\\d{2}$/', $time ) ) {\n $time = $time . ' 00:00:00';\n }\n\n $timezone = erp_wp_timezone();\n $datetime = DateTimeImmutable::createFromFormat( 'Y-m-d H:i:s', $time, $timezone );\n\n if ( false === $datetime ) {\n return false;\n }\n\n if ( $timestamp ) {\n return $datetime->getTimestamp();\n }\n\n return $datetime;\n}", "function datetime_sql2timestamp($datetime)\r\n\t{\r\n\t\t$datetime = explode(\" \", $datetime);\r\n\t\t$datetime[\"date\"] = explode(\"-\", $datetime[0]);\r\n\t\t$datetime[\"time\"] = explode(\":\", $datetime[1]);\r\n\t\t\r\n\t\t$timestamp = mktime($datetime[\"time\"][0], $datetime[\"time\"][1], $datetime[\"time\"][2], $datetime[\"date\"][1], $datetime[\"date\"][2], $datetime[\"date\"][0]);\r\n\t\treturn $timestamp;\r\n\t}", "function time_sql2php($sqltime){\n return strtotime($sqltime . \" GMT\");\n}", "function timestamp_from_mysql($timestamp)\n{\n\tereg (\"([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\tereg (\"([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\n\tif (sizeof($regs)>1)\n\t{\n\t\tif (sizeof($regs)>4)\n\t\t{\n\t\t\t$date=mktime($regs[4],$regs[5],$regs[6],$regs[2],$regs[3],$regs[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$date=mktime(0,0,0,$regs[2],$regs[3],$regs[1]);\n\t\t}\n\t}\n\telse\n\t{\n\t\t$date=0;\n\t}\n\treturn $date;\n}", "function convertTimestamp($ugly){\n $date = new DateTime($ugly);\n return $date->format('l, F jS, Y');\n}", "public function timeToSQL($ts)\r\n\t\t{\r\n\t\t\treturn date('Y-m-d H:i:s', $ts);\r\n\t\t}", "public function unixTimeToDBTime($time) {\n return date(\"Y-m-d\", $time);\n }", "function tstotime($timestamp){\n return date(\"Y-m-d H:i:s\", $timestamp);\n}", "public function convertMysqlToJSTimestamp($mysqlTimestamp){\n return strtotime($mysqlTimestamp)*1000;\n }", "function mysql_datetime($tiempo = 'now'){\r\n return date( 'Y-m-d H:i:s',strtotime($tiempo) );\r\n}", "function mysql_date($time){\n\treturn date(\"Y-m-d H:i:s\",$time);\n}", "function utime2timestamp($string2format) {\n \t\treturn date(\"YmdHis\",$string2format);\n \t}", "function MysqlToUnix($timestamp)\n\t{\n\t\t// and returns the unix timestamp in seconds since 1970\n\t\t$timestamp = (string)$timestamp;\n\t\t$yyyy = substr($timestamp, 0, 4);\n\t\t$month = substr($timestamp, 4, 2);\n\t\t$dd = substr($timestamp, 6, 2);\n\t\t$hh = substr($timestamp, 8, 2);\n\t\t$mm = substr($timestamp, 10, 2);\n\t\t$ss = substr($timestamp, 12, 2);\n\t\t$time = mktime($hh, $mm, $ss, $month, $dd, $yyyy);\n\t\treturn $time;\n\t}", "public function GetAsMySQLDateTime(){\r\n\t\t\tif( $this->day > 0 ){\r\n\t\t\t\treturn $this->Format( 'Y-m-d H:i:s' );\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}", "function sql2stamp($ymd) { #trace();\r\n if ( $ymd=='0000-00-00' )\r\n $t= 0;\r\n else {\r\n $y= 0+substr($ymd,0,4);\r\n $m= 0+substr($ymd,5,2);\r\n $d= 0+substr($ymd,8,2);\r\n $t= mktime(0,0,0,$m,$d,$y)+1;\r\n }\r\n return $t;\r\n}", "public static function convertTimeToMySQLDateTime($time = null) {\r\n if ($time === null) {\r\n $time = time();\r\n }\r\n\r\n return date(self::MYSQL_DATETIME, $time);\r\n }", "function dbdatetime2unix ($tanggal = '') {\r\n list($year,$month,$day,$hour,$minute,$second) = sscanf($tanggal,'%4d-%2d-%2d %2d:%2d:%2d');\r\n return mktime($hour,$minute,$second,$month,$day,$year);\r\n}", "function crystal_sqlite_from_unixtime($timestamp)\n {\n $timestamp = trim($timestamp);\n if (!preg_match(\"/^[0-9]+$/is\", $timestamp))\n $ret = strtotime($timestamp);\n else\n $ret = $timestamp;\n \n $ret = date(\"Y-m-d H:i:s\", $ret);\n crystal_sqlite_debug(\"FROM_UNIXTIME ($timestamp) = $ret\");\n return $ret;\n }", "protected function formatTimestamp($timestamp)\n {\n if ($this->timestampType === 'date')\n {\n $timestamp = new MongoDate(round($timestamp));\n }\n else\n {\n if ($this->timestampType === 'string')\n {\n $timestamp = date('Y-m-d H:i:s', $timestamp);\n }\n else\n {\n $timestamp = $timestamp;\n }\n }\n\n return $timestamp;\n }", "public function format_timestamp($time)\n {\n }", "function mysql_to_unix($time = '')\n\t{\n\t\t// since the formatting changed with MySQL 4.1\n\t\t// YYYY-MM-DD HH:MM:SS\n\n\t\t$time = str_replace('-', '', $time);\n\t\t$time = str_replace(':', '', $time);\n\t\t$time = str_replace(' ', '', $time);\n\n\t\t// YYYYMMDDHHMMSS\n\t\treturn mktime(\n\t\t\t\t\t\tsubstr($time, 8, 2),\n\t\t\t\t\t\tsubstr($time, 10, 2),\n\t\t\t\t\t\tsubstr($time, 12, 2),\n\t\t\t\t\t\tsubstr($time, 4, 2),\n\t\t\t\t\t\tsubstr($time, 6, 2),\n\t\t\t\t\t\tsubstr($time, 0, 4)\n\t\t\t\t\t\t);\n\t}", "function TimeToDatabaseDate($unixtime = null)\n{\n $unixtime == null ? $unixtime = time() : $unixtime;\n return date(\"Y-m-d\", $unixtime);\n}", "function date_sql2timestamp($date)\r\n\t{\r\n\t\t$date = explode(\"-\", $date);\r\n\r\n\t\t$timestamp = mktime(0, 0, 0, $date[1], $date[2], $date[0]);\r\n\t\treturn $timestamp;\r\n\t}", "public static function database_datetime($unix_timestamp = NULL)\n\t{\n\t\tif (is_null($unix_timestamp)) {\n\t\t\t$unix_timestamp = time();\n\t\t}\n\n\t\treturn date('Y-m-d H:i:s', $unix_timestamp);\n\t}", "function EpochToMySQLTime($Epoch)\n{\n\treturn(gmdate(\"Y-m-d H:i:s\", $Epoch));\n}", "public function getMySQLFormat()\r\n\t{\r\n\t\treturn $this->format('Y-m-d');\r\n\t}", "function mysqlTime()\r\n {\r\n $hour = $this->addZero( $this->hour() );\r\n $minute = $this->addZero( $this->minute() );\r\n $second = $this->addZero( $this->second() );\r\n\r\n return $hour . \":\" . $minute . \":\" . $second;\r\n }", "function mysqldatetime_to_date($datetime = '', $format = 'd.m.Y, H:i:s')\r\n {\r\n return date($format, mysqldatetime_to_unix($datetime));\r\n }", "protected function formatTimestamp($time) {\n return date('Y-m-d H:i:s', !empty($time) ? $time : time());\n }", "function timestampToString($time) {\n\treturn date('Y-m-d H:i:s', $time);\n}", "function mysql_time($tiempo = 'now'){\r\n return date( 'H:i:s',strtotime($tiempo) );\r\n}", "function formatToTimestamp($data){\n\t\tif( (isset($data['data']) && $data['data'] =='') || (!isset($data['data'] )) ){\n\t\t\t$datahora = 'now';\t\t\t\t\t\n\t\t}\n\t\telse{\n\t\t\tif( (isset($data['horas']) && $data['horas'] =='') || (!isset($data['horas'])) )\n\t\t\t\t$data['horas'] \t = '00';\n\t\t\tif( (isset($data['minutos']) && $data['minutos'] =='') || (!isset($data['minutos'])) )\n\t\t\t\t$data['minutos'] = '00';\n\t\t\t\t\t\n\t\t\t$datahora = substr($data['data'],6,4) . \"-\" . substr($data['data'],3,2) . \"-\" . substr($data['data'],0,2) . \" \". $data['horas'] . \":\" . $data['minutos'] . \":00\";\n\t\t}\t\n\t\treturn $datahora;\n\t}", "function php2MySqlTime($phpDate) {\n\t\treturn date(\"Y-m-d\", $phpDate);\n\t}", "public static function timestamp($time=false) {\n\t\tglobal $db; //TODO: REMOVE GLOBAL REFERENCE\n\t\treturn pudl::convert_tz(\n\t\t\tself::from_unixtime($time !== false ? $time : $db->time()),\n\t\t\tnew pudlGlobal('time_zone'),\n\t\t\t'UTC'\n\t\t);\n\t}", "public static function dateNowMysql()\r\n {\r\n return gmdate('Y-m-d H:i:s',time());\r\n }", "protected function getTimeStamp() {\n return time().' ('.strftime( '%Y.%m.%d %H:%I:%S', time() ).')';\n }", "public function __toString()\r\n {\r\n return $this->format(DATE_MYSQL_TIMESTAMP);\r\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 }", "function uk_datetime_from_mysql($timestamp, $date_seperator=\"/\", $time_seperator=\":\", $seperator=\" \")\n{\n\tereg (\"([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\tereg (\"([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\n\tif (sizeof($regs)>1)\n\t{\n\t\tif (sizeof($regs)>4)\n\t\t{\n\t\t\t$date=$regs[3].$date_seperator.$regs[2].$date_seperator.$regs[1].$seperator.$regs[4].$time_seperator.$regs[5].$time_seperator.$regs[6];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$date=$regs[3].$date_seperator.$regs[2].$date_seperator.$regs[1];\n\t\t}\n\t}\n\telse\n\t{\n\t\t$date=\"unavailable\";\n\t}\n\treturn $date;\n}", "function getDateTime() {\n $datetime = getdate();\n $datetime_in_mysql_format = $datetime['year'] . '-' . $datetime['mon'] . '-' . $datetime['mday'] . ' ' .\n $datetime['hours'] . ':' . $datetime['minutes'] . ':' . $datetime['seconds'];\n\n return $datetime_in_mysql_format;\n}", "public static function timestampToDateTime($timestamp) {\n\t\treturn date(self::MYSQL_DATETIME_FORMAT, $timestamp);\n\t}", "public function getTimestampForMySQL($timestamp, $timeZone = 'America/Argentina/Cordoba'){\n date_default_timezone_set($timeZone);\n return date(\"Y-m-d H:i:s\", $timestamp);\n }", "static function convertToDBFormat($timeStr){\n\t\t$date = new DateTime();\n\t\t$time = Vtiger_Time_UIType::getTimeValueWithSeconds($timeStr);\n\t\t$dbInsertDateTime = DateTimeField::convertToDBTimeZone($date->format('Y-m-d').' '.$time);\n\t\treturn $dbInsertDateTime->format('H:i:s');\n\t}", "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 }", "function convertTimestamp($timestamp, $timezone = \"-0000\"){\r\n \treturn \"/Date($timestamp$timezone)/\";\r\n }", "public function getTimestampFormatter();", "function timestampToDate($t) {\n return date(\"d-m-Y\",$t);\n}", "function _getFormattedTimestamp()\n {\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\n }", "function acadp_mysql_date_format( $date ) {\n\n\t$defaults = array(\n\t\t'year' => 0,\n\t\t'month' => 0,\n\t\t'day' => 0,\n\t\t'hour' => 0,\n\t\t'min' => 0,\n\t\t'sec' => 0\n\t);\n\t$date = array_merge( $defaults, $date );\n\n\t$year = (int) $date['year'];\n\t$year = str_pad( $year, 4, '0', STR_PAD_RIGHT );\n\n\t$month = (int) $date['month'];\n\t$month = max( 1, min( 12, $month ) );\n\n\t$day = (int) $date['day'];\n\t$day = max( 1, min( 31, $day ) );\n\n\t$hour = (int) $date['hour'];\n\t$hour = max( 1, min( 24, $hour ) );\n\n\t$min = (int) $date['min'];\n\t$min = max( 0, min( 59, $min ) );\n\n\t$sec = (int) $date['sec'];\n\t$sec = max( 0, min( 59, $sec ) );\n\n\treturn sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $year, $month, $day, $hour, $min, $sec );\n\n}", "function datetime_mysql2unix($str) {\n\tlist($date, $time) = explode(' ', $str);\n\tlist($year, $month, $day) = explode('-', $date);\n\tlist($hour, $minute, $second) = explode(':', $time);\n\n\t$timestamp = mktime((int)$hour, (int)$minute, (int)$second, (int)$month, (int)$day, (int)$year);\n\n\treturn $timestamp;\n}", "function formatTimestamp($time, $format=\"l\", $timeoffset=\"\")\r\n\t{\r\n\t global $xoopsConfig, $xoopsUser;\r\n\t if(strtolower($format) == \"rss\" ||strtolower($format) == \"r\"){\r\n \t$TIME_ZONE = \"\";\r\n \tif(!empty($GLOBALS['xoopsConfig']['server_TZ'])){\r\n\t\t\t\t$server_TZ = abs(intval($GLOBALS['xoopsConfig']['server_TZ']*3600.0));\r\n\t\t\t\t$prefix = ($GLOBALS['xoopsConfig']['server_TZ']<0)?\" -\":\" +\";\r\n\t\t\t\t$TIME_ZONE = $prefix.date(\"Hi\",$server_TZ);\r\n\t\t\t}\r\n\t\t\t$date = gmdate(\"D, d M Y H:i:s\", intval($time)).$TIME_ZONE;\r\n\t\t\treturn $date;\r\n \t}\r\n \t\r\n\t $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);\r\n\t switch (strtolower($format)) {\r\n\t case 's':\r\n\t $datestring = _SHORTDATESTRING;\r\n\t break;\r\n\t case 'm':\r\n\t $datestring = _MEDIUMDATESTRING;\r\n\t break;\r\n\t case 'mysql':\r\n\t $datestring = \"Y-m-d H:i:s\";\r\n\t break;\r\n\t case 'rss':\r\n\t \t$datestring = \"r\";\r\n\t break;\r\n\t case 'l':\r\n\t $datestring = _DATESTRING;\r\n\t break;\r\n\t case 'c':\r\n\t case 'custom':\t \r\n\t $current_timestamp = xoops_getUserTimestamp(time(), $timeoffset);\r\n\t if(date(\"Ymd\", $usertimestamp) == date(\"Ymd\", $current_timestamp)){\r\n\t\t\t\t$datestring = _TODAY;\r\n\t\t\t}elseif(date(\"Ymd\", $usertimestamp+24*60*60) == date(\"Ymd\", $current_timestamp)){\r\n\t\t\t\t$datestring = _YESTERDAY;\r\n\t\t\t}elseif(date(\"Y\", $usertimestamp) == date(\"Y\", $current_timestamp)){\r\n\t\t\t\t$datestring = _MONTHDAY;\r\n\t\t\t}else{\r\n\t\t\t\t$datestring = _YEARMONTHDAY;\r\n\t\t\t}\r\n\t break;\r\n\t default:\r\n\t if ($format != '') {\r\n\t $datestring = $format;\r\n\t } else {\r\n\t $datestring = _DATESTRING;\r\n\t }\r\n\t break;\r\n\t }\r\n\t return ucfirst(date($datestring, $usertimestamp));\r\n\t}", "public static function _mysqlNow() {\n \treturn date('Y-m-d H:i:s');\n }", "function db2gmtime($var){\n global $cfg;\n if(!$var) return;\n \n $dbtime=is_int($var)?$var:strtotime($var);\n return $dbtime-($cfg->getMysqlTZoffset()*3600);\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();", "public function getTimestamp();", "public function getTimestamp();", "function sql_datetime($time)\n{\n if ( ! is_array($time)) {\n return $time;\n }\n if ( ! isset($time['date'])) {\n return '';\n }\n $time = trim($time['date'] . ' ' . (isset($time['time']) ? $time['time'] : ''));\n return $time;\n}", "public static function timeStampToString($time = 0, $format = 'Y-m-d H:i:s')\r\n {\r\n if ($format == 'mysql') {\r\n $format = 'Y-m-d H:i:s';\r\n }\r\n \r\n if ($time == 0) {\r\n $time = time();\r\n }\r\n \r\n return date($format, $time);\r\n }", "public function return_queryDateTimeStamp(){\n\n //$ts = date(\"Y-m-d H:i:s\", time());\n\n return date(\"Y-m-d H:i:s\", time());\n\n }", "protected function convert_time_stamp($timestamp) {\n return $timestamp ? gmdate('Y-m-d h:i:s a', $timestamp) : null;\n }", "public static function getTimestamp($time){\n return date('Y-m-d H:i:s',$time);\n }", "function changeMysqlTime ($mysql_time) {\n\n\t$mysql_year = substr($mysql_time, 0, 4);\n\t$mysql_month = substr($mysql_time, 5, 2);\n\t$mysql_day = substr($mysql_time, 8, 2);\n\n\t$mysql_hours = substr($mysql_time, 11, 2);\n\t$mysql_minutes = substr($mysql_time, 14, 2);\n\t$mysql_seconds = substr($mysql_time, 17, 2);\n\n\t$return = $mysql_day . \"/\" . $mysql_month . \" \" . $mysql_hours . ':' . $mysql_minutes;\n\n\treturn $return;\n}", "protected function getTimeStamp()\n {\n return time() . ' (' . strftime('%Y.%m.%d %H:%I:%S', time()) . ')';\n }", "public function toDatabase()\n {\n return $this->format(Config::get('settings.database_datetime_format'));\n }", "function mysql_datetime_from_uk($timestamp, $date_seperator=\"-\", $time_seperator=\":\", $seperator=\" \")\n{\n\t// dd/mm/yyyy\n\tereg (\"([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{2,4})\", $timestamp, $regs);\n\t// dd/mm/yyyy HH:MM\n\tereg (\"([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\t// dd/mm/yyyy HH:MM:SS\n\tereg (\"([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})[^0-9]([0-9]{2,4})[^0-9]([0-9]{1,2})[^0-9]([0-9]{1,2})\", $timestamp, $regs);\n\n\tif (sizeof($regs)>1)\n\t{\n\t\tif (sizeof($regs)>4)\n\t\t{\n\t\t\t$date=$regs[3].$date_seperator.$regs[2].$date_seperator.$regs[1].$seperator.$regs[4].$time_seperator.$regs[5].$time_seperator;\n\t\t\tif(empty($regs[6]))\n\t\t\t{\n\t\t\t\t$date.=\"00\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$date.=$regs[6];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$date=$regs[3].$date_seperator.$regs[2].$date_seperator.$regs[1];\n\t\t}\n\t}\n\telse\n\t{\n\t\t$date=\"0\";\n\t}\n\treturn $date;\n}", "private function formatTime($timestamp)\n {\n return date('Y-m-d', $timestamp);\n }", "public function timestamp();", "function solrTimestamp($epoch=0) {\n if($utc = intval($epoch)) {\n return date('Y-m-d\\TH:i:s\\Z',$utc);\n }\n else {\n return date('Y-m-d\\TH:i:s\\Z',time());\n }\n return;\n}", "function mysql_date($date){\n\t return date(\"Y-m-d H:i:s\", $date);\n\t}", "function str2DBDT($str)\n{\n $intTime = strtotime($str);\n if ($intTime === false)\n return NULL;\n return date(\"Y-m-d H:i:s\", $intTime);\n}", "function mysqldate()\n{\n $mysqldate = date(\"m/d/y g:i A\", now());\n $phpdate = strtotime( $mysqldate );\n return date( 'Y-m-d H:i:s', $phpdate );\n}", "function modify_lora_date($time)\n\t{\n\t\t$cdate = strtotime($time);\n\t\t# miliseconds unix time\n\t\tif( $cdate == false ) {\n\t\t\t$militime = DateTime::createFromFormat('U.u', $time/1000);\n\t\t\t$militime->setTimezone(new DateTimeZone(date_default_timezone_get())); \n\t\t\treturn $militime->format(\"Y.m.d H:i:s.u\");\n\t\t}\n\t\treturn Date(\"Y.m.d H:i:s\", $cdate);\n\t}", "function convertDate($sql_date) \r\n{\r\n\t$date = strtotime($sql_date);\r\n\t$final_date = date(\"Y-m-d H:i:s\", $date);\r\n\treturn $final_date;\r\n}", "function getTimestamp(){\n return date('m/d/Y G:h');\n}", "public function sanitizeTimestamp($timestamp){\n //http://stackoverflow.com/questions/11510338/regular-expression-to-match-mysql-timestamp-format-y-m-d-hms#12025632\n $regex=\"/^(((\\d{4})(-)(0[13578]|10|12)(-)(0[1-9]|[12][0-9]|3[01]))|((\\d{4})(-)(0[469]|11)(-)([0][1-9]|[12][0-9]|30))|((\\d{4})(-)(02)(-)(0[1-9]|1[0-9]|2[0-8]))|(([02468][048]00)(-)(02)(-)(29))|(([13579][26]00)(-)(02)(-)(29))|(([0-9][0-9][0][48])(-)(02)(-)(29))|(([0-9][0-9][2468][048])(-)(02)(-)(29))|(([0-9][0-9][13579][26])(-)(02)(-)(29)))(\\s([0-1][0-9]|2[0-4]):([0-5][0-9]):([0-5][0-9]))$/\";\n\n try{\n if(preg_match($regex,$timestamp)){\n //if timestamp matches mysql\n return $timestamp;\n }else{\n throw new Exception (\"timestamp not 'now' or MySQL valid (timestamp=$timestamp)\");\n }\n }catch(Exception $e){\n $this->processException($e);\n }\n\n return null;\n }", "function str2DBDT($str=null)\n{\n $intTime = (!empty($str))?strtotime($str):time();\n if ($intTime === false)\n return NULL;\n return date(\"Y-m-d H:i:s\", $intTime);\n}", "public static function datetime_db($time) {\n\t\treturn $time == \"0000-00-00 00:00:00\" ? \"\" : date(env('DATETIME_DB',\"Y-m-d H:i:s\"),strtotime($time));\n\t}", "function timeStampToDateFR($timestamp) {\n return date('Y-m-d H:i:s', $timestamp);\n}", "function format_timestamp_for_display($timestamp)\n{\n return (new Carbon($timestamp))->format('Y-m-d');\n}", "private function format_time( $timestamp ) {\n\t if ( empty( $timestamp) ) {\n\t\t return __( 'never' , 'slp-premier' );\n\t }\n\t return date(\"d F Y H:i:s\",$timestamp);\n }", "function Post_Time($timestamp)\n{\n\t$hrformat = \"%A, %d.%m.%Y. u %H:%M\"; \n\t$res = strftime($hrformat,strtotime($timestamp)); \n\t$vrijeme = iconv('ISO-8859-2', 'UTF-8', $res);\n\t\n\techo($vrijeme);\t\n}", "function showDate($timestamp) {\r\n if ($timestamp > 10000000000)\r\n $rtn = date(\"M d Y H:i:s (J)\", $timestamp/1000);\r\n else\r\n $rtn = date(\"M d Y H:i:s \", $timestamp);\r\n\r\n return $rtn;\r\n}", "protected function dateFormatDatabase()\n {\n return $this->dateFormat('mysql');\n }", "static public function formatDateFromTimestamp($string) {\n if (self::$_static_handler == null) {\n self::$_static_handler = slDatabaseManager::getConnection();\n }\n $format = self::$_static_handler->getDateTimeFormat();\n return date($format, $string);\n }", "static function sql_date_format($dateStr){\n $date=new DateTime($dateStr);\n $result = $date->format('d.m.Y H:i') . PHP_EOL;\n \n return $result;\n }", "function dbToUItime() {\r\n\r\n\t\t$hour = substr($this->event_date_time, -8, 2);\r\n\t\t$min = substr($this->event_date_time, -5, 2);\r\n\r\n\t\t$am_pm = \"AM\";\r\n\r\n\t\t//change hour based on certain conditions\r\n\t\t$hour = changeTo12hour($hour, $am_pm);\r\n\r\n\t\t$this->time = $hour . \":\" . $min . \" \" . $am_pm;\r\n\t}", "function formatTimestamp($time, $format = \"l\", $timeoffset = null)\n {\n global $xoopsConfig, $xoopsUser;\n\n $format_copy = $format;\n $format = strtolower($format);\n\n if ($format == 'rss' || $format == 'r') {\n return parent::formatTimestamp($time, \"rss\", $timeoffset);\n }\n\n if (($format == 'elapse' || $format == 'e') && $time < time()) {\n return XoopsLocaleJalali::Convertnumber2farsi(parent::formatTimestamp($time, \"elapse\", $timeoffset));\n }\n // disable user timezone calculation and use default timezone,\n // for cache consideration\n if ($timeoffset === null) {\n $timeoffset = ($xoopsConfig['default_TZ'] == '') ? '0.0' : $xoopsConfig['default_TZ'];\n }\n $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);\n switch ($format) {\n case 's':\n $datestring = _SHORTDATESTRING;\n break;\n\n case 'm':\n $datestring = _MEDIUMDATESTRING;\n break;\n\n case 'mysql':\n $datestring = 'Y-m-d H:i:s';\n break;\n\n case 'l':\n $datestring = _DATESTRING;\n break;\n\n case 'c':\n case 'custom':\n static $current_timestamp, $today_timestamp, $monthy_timestamp;\n if (!isset($current_timestamp)) {\n $current_timestamp = xoops_getUserTimestamp(time(), $timeoffset);\n }\n if (!isset($today_timestamp)) {\n $today_timestamp = mktime(0, 0, 0, date('m', $current_timestamp), date('d', $current_timestamp), date('Y', $current_timestamp));\n }\n\n if (abs($elapse_today = $usertimestamp - $today_timestamp) < 24 * 60 * 60) {\n $datestring = ($elapse_today > 0) ? _TODAY : _YESTERDAY;\n } else {\n if (!isset($monthy_timestamp)) {\n $monthy_timestamp[0] = mktime(0, 0, 0, 0, 0, date('Y', $current_timestamp));\n $monthy_timestamp[1] = mktime(0, 0, 0, 0, 0, date('Y', $current_timestamp) + 1);\n }\n if ($usertimestamp >= $monthy_timestamp[0] && $usertimestamp < $monthy_timestamp[1]) {\n $datestring = _MONTHDAY;\n } else {\n $datestring = _YEARMONTHDAY;\n }\n }\n break;\n\n default:\n if ($format != '') {\n $datestring = $format_copy;\n } else {\n $datestring = _DATESTRING;\n }\n break;\n }\n\n\t// Start hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org\n\tif (_JDF_USE_HEGIRADATE && $format != 'mysql' ){\n\t return XoopsLocaleJalali::jdate($datestring,$usertimestamp);\n\t} else {\n\t\treturn ucfirst(date($datestring,$usertimestamp));\n }\n\t// End hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org\n\t}", "private function current_mysql_datetime() {\n\t\t\t// Return the current time in MySQL datetime formate \n\t\t\treturn date('Y-m-d H:i:s', time());\n\t\t}", "function tstamptotime($tstamp) {\n // 1984-09-01T14:21:31Z\n sscanf($tstamp,\"%u-%u-%uT%u:%u:%uZ\",$year,$month,$day,\n $hour,$min,$sec);\n $newtstamp=mktime($hour,$min,$sec,$month,$day,$year);\n return $newtstamp;\n }", "function convertMysqlDateTime($datetime) {\n $datetime = str_replace('/', '-', $datetime);\n $result = $datetime;\n if(!empty($datetime)) {\n $arrDt = explode(' ', trim($datetime));\n $arr = explode('-', $arrDt[0]);\n $year = substr($arr[2], 0, 4);\n $time = substr($arr[2], -5);\n if(checkdate($arr[1], $arr[0], $year)) {\n $result = \"$year-$arr[1]-$arr[0] $arrDt[1]\";\n }\n }\n return $result;\n }", "function mysql2date($format, $date, $translate = \\true)\n {\n }" ]
[ "0.7706972", "0.7485957", "0.7376256", "0.7153472", "0.70794123", "0.70647407", "0.68878055", "0.68853295", "0.6881415", "0.6874447", "0.67726636", "0.6772412", "0.6765006", "0.67498624", "0.6724285", "0.656349", "0.6528642", "0.65284693", "0.65117186", "0.64848363", "0.6480449", "0.6463036", "0.6445825", "0.6423139", "0.6417976", "0.64062417", "0.63947344", "0.6393403", "0.63929814", "0.6386179", "0.6376954", "0.6371788", "0.6371131", "0.6361894", "0.63587415", "0.6350903", "0.633608", "0.63348955", "0.6332895", "0.63290083", "0.63251984", "0.6313224", "0.63075143", "0.63027674", "0.6271169", "0.62677497", "0.6265709", "0.62560236", "0.62526387", "0.6238446", "0.6222813", "0.6217232", "0.62113774", "0.62076163", "0.61920285", "0.6186003", "0.6174241", "0.6173119", "0.6170552", "0.6147295", "0.6145695", "0.61455745", "0.6137831", "0.61211824", "0.61211824", "0.61211824", "0.6094161", "0.6086488", "0.6065667", "0.6035864", "0.60328966", "0.6032509", "0.6022193", "0.6017393", "0.60080534", "0.6006341", "0.60062844", "0.6002176", "0.5998733", "0.599527", "0.59833014", "0.59730726", "0.59547806", "0.5942528", "0.59404105", "0.5936441", "0.5936346", "0.59314746", "0.5929593", "0.5925249", "0.59251606", "0.5913107", "0.5909228", "0.5907819", "0.59003156", "0.58979154", "0.5895782", "0.5885848", "0.58839065", "0.5873186", "0.5872637" ]
0.0
-1
/ Establece el titulo del documento html resultante
function tituloHTML($titulo){ $_SESSION['configuracion']['titulo'] = $titulo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTitle() {\n return $this->document->getTitle();\n }", "private function getTitle() {\n\t\tif ($_GET['doc'] == 'index') {\n\t\t\treturn $this->config['title'];\n\t\t}\n\t\treturn $this->texy->headingModule->title . ' - ' . $this->config['title'];\n\t}", "function RellenarTitulo()\r\n {\r\n $this->Imprimir('ANÁLSIS DE FALLAS DE DISTRIBUCIÓN');\r\n\r\n $this->Imprimir($this->convocatoria->getLugar(), 93, 10);\r\n\r\n $this->Imprimir(strftime(\"%A %d de %B de %Y\", strtotime($this->convocatoria->getFecha())) .\r\n ' - Hora: ' . $this->convocatoria->getHoraIni() . ' a ' .\r\n $this->convocatoria->getHoraFin(), 95, 10, 16);\r\n }", "public function get_document_title_template()\n {\n }", "private static final function getPageTitle () {\r\n // Execute the <title tag> .tp file;\r\n $webHeaderString = new FileContent (FORM_TP_DIR . _S . 'frm_web_header_title.tp');\r\n return $webHeaderString->doToken ('[%TITLE_REPLACE_STRING%]',\r\n implode (_DCSP, ((self::$objPageTitleBackward->toInt () == 1) ? (self::$objPageTitle->arrayReverse ()->toArray ()) :\r\n self::$objPageTitle->toArray ())));\r\n }", "public function getDocTitle()\n {\n return $this->doc_title;\n }", "function titre_page_wiki($id_objet,$objet){\n\t$titre_page = FALSE;\n\t$id_table_objet = id_table_objet($objet); //date_naissance\n\t$table = table_objet_sql($objet); //spip_contacts\n\t$prenom = sql_getfetsel('prenom', $table, \"$id_table_objet = \".sql_quote($id_objet));\n\t$nom = sql_getfetsel('nom', $table, \"$id_table_objet = \".sql_quote($id_objet));\n\tif($prenom AND $nom){\n\t\t$titre_page = trim($prenom).'_'.trim($nom); //essayer aussi sans accents ?\n\t} else if(!$prenom AND $nom){\n\t\t\t$titre_page = trim($nom);\n\t} else {\n\t\t$titre = sql_getfetsel('titre', $table, \"$id_table_objet = \".sql_quote($id_objet));\n\t\t$titre_page = $titre;\n\t}\n\treturn $titre_page;\n}", "function showHTMLHeaderWithTitle($title = '') {\r\n\techo '<!DOCTYPE html>'; // započinje ispravan HTML blok koda\r\n\r\n\techo '<html lang=\"hr\">'; // postavlja jezik stranice na hrvatski\r\n\r\n\techo '<head>'; // započinje HEAD dio HTML stranice\r\n\r\n\techo '<meta charset=\"utf-8\">'; // postavlja kodiranje stranice na UTF-8\r\n\r\n\techo '<title>'; // započinje postavljanje naslova stranice koji se prikazuje u pregledniku kod bookmarka i u nazivu prozora ili taba\r\n\techo (isset($title) && !empty($title) ? $title.' :: ' : ''); // prikazuje naslov putem inline if-a, ako je postavljen\r\n\techo 'Bankomati'; // na kraju naslova uvijek doda naziv aplikacije Bankomati\r\n\techo '</title>';// završava postavljanje naslova stranice\r\n\r\n\techo '</head>'; // završava HEAD dio HTML stranice\r\n\r\n\techo '<body>'; // započinje BODY dio HTML stranice\r\n\t// prikazuje naslov kao heading (poglavlje stranice) putem običnog if-a, ako je postavljen\r\n\tif (\r\n\t\tisset($title) \r\n\t\t&& \r\n\t\t!empty($title)\r\n\t) {\r\n\t\techo '<h1>'; // započinje postavljanje headinga (poglavlja) stranice nivoa 1\r\n\t\techo $title;\r\n\t\techo '</h1>'; // završava postavljanje headinga (poglavlja) stranice nivoa 1\r\n\t}\r\n\techo '<hr/>'; // ispisuje horizontalku\r\n}", "protected function getTitle() {\n\t\t$result = $this->getFile()->getProperty('title');\n\t\tif (empty($result)) {\n\t\t\t$result = $this->getFile()->getName();\n\t\t}\n\t\treturn htmlspecialchars($result);\n\t}", "public function getTitulo()\n {\n return $this->titulo;\n }", "public function getTitulo()\n {\n return $this->titulo;\n }", "function edan_search_set_doc_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n if(edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n $sitename = get_bloginfo('name');\n return $title . \" - $sitename\";\n }", "function getTitle() ;", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "private function _generateTitle()\n {\n $title = '';\n foreach ($this->_contents as $content)\n {\n $title = ('' == $title) ? $content->myGetSeoTitleTag() : $content->myGetSeoTitleTag().' | '.$title;\n }\n return $title;\n }", "public function getTitlu()\n {\n return $this->titlu;\n }", "private function getTitular()\n {\n return $this->titular;\n }", "public function docHeaderContent() {}", "public function getTitle($html)\n {\n if ( preg_match( \"/<h[1-6]{1}[^<>]*>(.+)<\\/h[1-6]{1}>/\", $html, $matches ) ) {\n\n return strip_tags( $matches[1] );\n\n } else {\n\n return \"Untitled Markdown Document\";\n\n }\n }", "public function get_title();", "public function getDocumentTitle() {\n return $this->document['title'];\n }", "public function getPageTitle(): string;", "public function render()\n {\n if ('FE' === TYPO3_MODE) {\n $content = $this->renderChildren();\n if (!empty($content)) {\n $content = trim($content);\n if ($this->getTypoScriptFrontendController() !== null) {\n $this->getTypoScriptFrontendController()->indexedDocTitle = $content;\n $this->getTypoScriptFrontendController()->page['title'] = $content;\n $this->getTypoScriptFrontendController()->altPageTitle = $content;\n }\n }\n }\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 }", "function get_title_lectura($lectura)\n{\n $cadena = $lectura->libro_nombre . ' ' . $lectura->capitulo . ': ' . $lectura->inicio\n . '-' . $lectura->final;\n\n return $cadena;\n}", "public function title();", "public function title();", "function getTitulo() {\n\t\treturn $this->id;\n\t}", "function getTitulo() {\n\t\treturn $this->id;\n\t}", "function getTitulo() {\n\t\treturn $this->id;\n\t}", "public function get_titulo()\n {\n return $this->_titulo;\n }", "public function sobre() {\n $this->template->set_title( 'Work for all - Sobre' );\n\n // renderiza a pagina\n\t\t$this->template->render( 'sobre' );\n }", "public function getTitle()\n\t{\n\t\t$content = $this->getContent();\n\t\treturn $content->title;\n\t}", "function getTitle();", "function getTitle();", "public function getTituloEleitoral() {\n return $this->sTituloEleitoral;\n }", "public function getTitleText()\n {\n return $this->title->nodeValue;\n }", "public function getTitre(): string\n {\n return $this->titre;\n }", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "function do_html_header($title)\r\n{\r\n?>\r\n <html>\r\n <head>\r\n <title><?=$title?></title>\r\n <style>\r\n body { font-family: Arial, Helvetica, sans-serif; font-size: 13px }\r\n li, td { font-family: Arial, Helvetica, sans-serif; font-size: 13px }\r\n hr { color: #3333cc; width=300; text-align=left}\r\n a { color: #000000 }\r\n </style>\r\n </head>\r\n <body>\r\n <img src=\"marcador.gif\" alt=\"PHPbookmark logo\" border=0\r\n align=left valign=bottom height = 50 width = 150>\r\n <h1>&nbsp;CompartElinks</h1>\r\n <hr>\r\n<?\r\n if($title)\r\n do_html_heading($title);\r\n}", "public function getTitle() {}", "public function getTitle() {}", "public function title() { \n $title = $this->content()->get('title');\n if($title != '') {\n return $title;\n } else {\n $title->value = $this->uid();\n return $title;\n }\n }", "function wp_get_document_title()\n {\n }", "public function Doc()\n {\n $this->header();\n $html = \"<html>\";\n $html .= \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">\";\n $html .= \"<body style='font-family:Arial, sans-serif;'>\";\n $html .= \"<p><small><a href='\" . $this->url . \"'>\" . $this->url . \"</a></small></p>\";\n $html .= \"<h1>\" . $this->title . \"</h1>\";\n $html .= $this->intro;\n $html .= $this->content;\n $html .= \"</body>\";\n $html .= \"</html>\";\n\n return $html;\n }", "protected function getTitle() {\n\t\t$result = $this->overlayFile->getProperty('title');\n\t\tif (empty($result)) {\n\t\t\t$result = $this->overlayFile->getName();\n\t\t}\n\t\treturn htmlspecialchars($result);\n\t}", "abstract protected function getTitle();", "function extract_title_from_wiki_text($text)\n{\n if (preg_match(\"/--- DIVISION TITLE ---\\s*(.*)\\s*--- MOTION EFFECT/s\", $text, $matches)) {\n $title = $matches[1];\n }\n $title = trim(strip_tags($title));\n $title = str_replace(\" - \", \" &#8212; \", $title);\n return $title;\n}", "public function getContentTitle(){ return $this->content_title; }", "abstract public function getTitle();", "abstract public function getTitle();", "abstract public function getTitle();", "function htit($text,$importancia){\r\n return \"<h$importancia>$text</$importancia>\";\r\n }", "function getUrlTitle($parser) {\n $titleArray = $parser->getTitleTags();\n \n // return if there is no title tag in the page\n if (sizeof($titleArray) == 0 || $titleArray->item(0) == NULL) return;\n \n $title = $titleArray->item(0)->nodeValue; // $title contains the title of the webpage\n $title = str_replace(\"\\n\", \"\", $title); // remove \\n from $title\n\n // don't wanna insert empty strings in database\n if ($title == \"\") return;\n\n return $title;\n}", "public abstract function getTitle();", "private function get_title( $html ) {\n\t\t$pattern = '#<title[^>]*>(.*?)<\\s*/\\s*title>#is';\n\t\tpreg_match( $pattern, $html, $match_title );\n\n\t\tif ( empty( $match_title[1] ) || ! is_string( $match_title[1] ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$title = trim( $match_title[1] );\n\n\t\treturn $this->prepare_metadata_for_output( $title );\n\t}", "function getTitleArgos($link) {\r\n $html = file_get_contents($link);\r\n if(!empty($html))\r\n {\r\n $matchCount = preg_match('/<h1 class=\"fn\">(.*?)<\\/h1>/s', $html, $matches);\r\n\r\n if($matchCount != 0)\r\n {\r\n return $matches[1];\r\n }\r\n }\r\n }", "abstract protected function getPageTitle(): string;", "public static function title();", "public function getTitre()\n {\n return $this->titre;\n }", "public function getTitre()\n {\n return $this->titre;\n }", "public function getTitre()\n {\n return $this->titre;\n }", "public function getTitre()\n {\n return $this->titre;\n }", "public function getTitre()\n {\n return $this->titre;\n }", "public function getTitre()\n {\n return $this->titre;\n }", "public function getTitre()\n {\n return $this->titre;\n }", "function getTitre() { return $this->titre; }", "private function getTitleText() {\n\t\t$titleText = $this->getOutput()->getProperty( 'wikibase-titletext' );\n\n\t\tif ( $titleText === null ) {\n\t\t\t$titleText = $this->getTitle()->getPrefixedText();\n\t\t}\n\n\t\treturn $titleText;\n\t}", "public function generateContent()\n {\n parent::generateContent();\n $pathArray = $this->currentPageStrategy->getCurrentPagePath();\n $titleString = '';\n foreach ($pathArray as $page) {\n /** @var $page Page */\n\n $titleString .= ' - ' . (($t = $page->getTitle()) == '_404' ? 'Siden blev ikke fundet' : $t);\n }\n\n return $titleString;\n }", "public function getTiposDoc(){\n $params->Auth->Token = $this->TA->credentials->token;\n $params->Auth->Sign = $this->TA->credentials->sign;\n $params->Auth->Cuit = self::CUIT;\n $results = $this->client->FEParamGetTiposDoc($params);\n \n $e = $this->_checkErrors($results, 'FEParamGetTiposDoc');\n echo $e;\n $X=$results->FEParamGetTiposDocResult;\n $Texto=\" comprobantes\";\n //$fh=fopen(\"TiposDoc.txt\",\"w\");\n foreach ($X->ResultGet->DocTipo AS $Y) {\n //fwrite($fh,sprintf(\"%5s %-30s\\n\",$Y->Id, $Y->Desc));\n $Texto .= $Y->Id .' '.$Y->Desc;\n }\n //fclose($fh);\n return $Texto;\n }", "private function getDocTitle(DOMElement $column) {\n\t\t$anchors = $column->getElementsByTagName('a');\t\n\t\t$anchor = $anchors->item(0);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\treturn $anchor->nodeValue; \n\t}", "public function getTitle(){\n\n $title = $this->getField('title', '');\n if(empty($title)){ return $title; }//if\n\n if($title_prefix = $this->getTitlePrefix()){\n $title = $title_prefix.$this->getTitleSep().$title;\n }//if\n\n if($title_postfix = $this->getTitlePostfix()){\n $title .= $this->getTitleSep().$title_postfix;\n }//if\n\n return $title;\n\n }", "public function getMetaTitle();", "function getTitle($url) {\n $str = file_get_contents($url);\n /* RegEx erzeugt ein Array in dem Der Seitentitel auf Index 1 liegt */\n preg_match('/\\<title\\>(.*)\\<\\/title\\>/', $str, $title);\n /* Seitentitel aus Index 1 zurückgeben */\n return $title[1];\n }", "function & getTitle() {\r\n\r\n\t\tif(empty($this->_id)) {\r\n\t\t\t$this->_title = \"\";\r\n\t\t\treturn $this->_title;\r\n\t\t}\r\n\r\n\t\t// Load the data\r\n\t\tif (empty ($this->_title)) {\r\n\t\t\t$database = $this->_db;\r\n\t\t\t$ce = $this->_content_element;\r\n\r\n\t\t\t/* retrieve values */\r\n\t\t\t$query = \"SELECT \" .$ce->title.\" FROM #__\". $ce->table .\" WHERE \" . $ce->id. \" = '\" . $this->_id .\"'\";\r\n\r\n\t\t\t$database->setQuery($query);\r\n\t\t\t$this->_title = $database->loadResult();\r\n\t\t}\r\n\t\treturn $this->_title;\r\n\t}" ]
[ "0.6553824", "0.6322908", "0.6309456", "0.63085574", "0.6266009", "0.6205865", "0.62001216", "0.6198791", "0.6187458", "0.6164674", "0.6164674", "0.61582404", "0.61543113", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61411536", "0.61389816", "0.6121604", "0.60953844", "0.6086316", "0.6060316", "0.6047736", "0.59697235", "0.59559906", "0.5936503", "0.5931403", "0.59285766", "0.5927533", "0.5927533", "0.59269136", "0.59269136", "0.59269136", "0.591149", "0.59093857", "0.5902425", "0.58957434", "0.58957434", "0.58828443", "0.5859389", "0.583529", "0.58302754", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.5829304", "0.58285105", "0.58275867", "0.58275867", "0.5811995", "0.5806175", "0.5793202", "0.5790937", "0.5790406", "0.5785606", "0.57847965", "0.57809126", "0.57809126", "0.57809126", "0.5780308", "0.5778363", "0.57744807", "0.57473356", "0.57465523", "0.57370806", "0.5727231", "0.5723217", "0.5723217", "0.5723217", "0.5723217", "0.5723217", "0.5723217", "0.5723217", "0.5722711", "0.5721746", "0.57132167", "0.57113504", "0.5710549", "0.57093036", "0.5707523", "0.5705875", "0.569949" ]
0.0
-1
/ obtiene el contenido de una pagina en especial
function pagina($id){ $pg = consulta(sprintf("SELECT `contenido` FROM `contenidos` WHERE `id` = %s LIMIT 1",varSQL($id)),true); return $pg['resultado'][0]['contenido']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function content($page = 1)\n {\n return file_get_contents($this->endpoint() . '&Pagina=' . $page);\n }", "function page_content()\n {\n //This needs to deliver page data that is requested by the ROUTE.\n }", "public function getPageContent(): string {\n\t\treturn $this->m_pageContent;\n\t}", "public function getContent(){\n return $this->getPage();\n }", "public function pagina_principal() {\n\t\t$customData['barrios'] = $this->Data_model->list_barrios();\n\t\t$customData['generos'] = $this->Data_model->list_generos();\n\t\treturn $this->parser->parse('content.html', $customData, true);\n\t}", "public function get_page();", "public function getPage();", "public static function getPage() {\n $page = self::$_folder . DS . self::cPage() . \".php\";\n //bien page tra ve duong dan den mot trang nao do trong folder pages\n //dem vao trong phan core de require\n //vd nhu vao trang chu ecommerce/index.php thi se ham nay se require trang pages/index.php\n $error = self::$_folder . DS . \"error.php\";\n //bien error tra ve trang error, la trang 404 trang nay khong ton tai\n return is_file($page) ? $page : $error;\n //kiem tra xem co ton tai file nhu vay o duong dan trong bien page khong, neu co thi tra ve duong dan do\n //neu khong ton tai thi tra ve file error\n //sau do ham core se require error php, dem noi dung cua trang php ra cho ng xem\n \n }", "public function getPageContent() {\n\t\tif ($this->url) {\n\t\t\t// Get content\n\t\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM VContent\n\t\t\tWHERE\n\t\t\t type = 'page' AND\n\t\t\t url = ? AND\n\t\t\t published <= NOW(); AND\n\t\t\t deleted IS NULL;\n\t\t\t\";\n\t\t\t$res = $this->getContent($sql, array($this->url));\n\n\t\t\tif ($res[0]) {\n\t\t\t\t$c = $res[0];\n\t\t\t\t// Filter content before using it.\n\t\t\t\t$c->data = $this->textfilter->doFilter($c->data, \"{$c->filter},purify,typography\");\n\t\t\t\t\n\t\t\t\treturn array('id' => $c->id,\n\t\t\t\t\t\t'title' => $c->title,\n\t\t\t\t\t\t'data' => $c->data,\n\t\t\t\t\t\t'link' => $c->link,\n\t\t\t\t\t\t'name' => $c->UserName,\n\t\t\t\t\t'acronym' => $this->acronym);\n\t\t\t} else {\n\t\t\t\treturn $this->emptypage;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->emptypage;\n\t\t}\n\t}", "public function getPageInfo(){\n\n $content = array();\n\n return $content;\n }", "function getPageContent($pageName){\n\t\t\t$pageContent = $this->manage_content->getValue_where('otherpage','*','page',$pageName);\n\t\t\techo $pageContent[0]['content'];\n\t\t}", "private function pagProbleem()\n\t{\n\t\t$pageOutput = $this->menu();\n\t\t$pageOutput.= $this->div('open', 'id=\"inhoud\"');\n\t\t$pageOutput.= $this->h1('full', '', 'Er is iets misgelopen!');\n\t\t$pageOutput.= $this->div('close');\n\t\treturn $pageOutput;\n\t}", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent()\n {\n $page = 832;\n\n $hrefs = $this->parsing();\n\n $a = 1 + 1;\n\n return json_encode([$a]);\n }", "public function getMainContentOfPage()\n {\n return $this->mainContentOfPage;\n }", "private static function getControle() {\n\n\t\t$classe = \"Index\";\n\t\t\n\t\tif( !empty( self::$rota[1] ) && self::$rota[1] != \"index.php\" ){\n\t\t\t$classe = ucfirst( self::$rota[1] );\n\t\t\tif( !class_exists( $classe ))\n\t\t\t\t$classe = \"QuatroZeroQuatro\";\n\t\t}\n\n\t\ttry {\n\t\t\n\t\t\tself::$pagina = new $classe( self::$rota );\n\t\t\tself::$pagina->init();\n\t\t\tself::$pagina->render();\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\tvar_dump( $e );\n\t\t}\n\t}", "function getContent() ;", "public function currentPageContent()\n {\n return $this->pageGuide->getParsedContent($this->currentPage);\n }", "public function getContent() {}", "public function getContent() {}", "public function getPage() {}", "public function getPage() {}", "protected function contenidoLayout(){\n ob_start();\n include_once Application::$ROOT_DIR . \"/views/layouts/principal.php\";\n return ob_get_clean();\n }", "protected function getPage() {}", "protected function getPage() {}", "abstract protected function view_generatePageContent();", "function getResponseBody(){\n $page = \"\";\n if ($this->fpopened===FALSE) return $page;\n while (!feof ($this->fpopened)) {\n $page .= fread ($this->fpopened, 1024);\n }\n return $page;\n }", "function getContents() ;", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "public final function get_content()\n {\n }", "public final function get_content()\n {\n }", "public final function get_content()\n {\n }", "function getSubMenuPageContent() {\n \tif(isSet($_GET['page'])) {\n \t\tswitch($_GET['page']) {\n \t\t\tcase 'lepress-my-subscriptions':\n \t\t\tcase 'lepress':\n \t\t\t\trequire_once('student_include/subscriptions.php');\n \t\t\t\tbreak;\n \t\t\tcase 'lepress-assignments':\n \t\t\t\trequire_once('student_include/assignments.php');\n \t\t\t\tbreak;\n \t\t\tcase 'lepress-groups':\n \t\t\t\trequire_once('student_include/my-groups.php');\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\techo \"tere\";\n \t\t\t\tbreak;\n \t\t}\n \t}\n }", "public function content();", "function get(){\n\t$temp = $this->page;\n\t$this->addFooter();\n\t//restore the page for next call for\n\t$page= $this->page;\n\t$this->page = $temp;\n\n return $this->page;\n}", "public function allpagesActionGet() : object\n {\n $page = $this->app->page;\n $title = \"Alla pages i databasen\";\n $db = $this->app->db;\n\n $db->connect();\n $sql = <<<EOD\nSELECT\n *,\n CASE \n WHEN (deleted <= NOW()) THEN \"isDeleted\"\n WHEN (published <= NOW()) THEN \"isPublished\"\n ELSE \"notPublished\"\n END AS status\nFROM content\nWHERE type=?\n;\nEOD;\n $resultset = $db->executeFetchAll($sql, [\"page\"]);\n\n $page->add(\"cms/header\");\n $page->add(\"cms/allpages\", [\n \"resultset\" => $resultset\n ]);\n return $page->render([\n \"title\" => $title\n ]);\n }", "protected function getPage(){\n // print_r($_GET);\n // sprawdzanie czy jest sie na podstronie\n if($page_action = ClassTools::getValue('page_action')){\n switch($page_action){\n case 'dodaj':\n // ladowanie strony z formularzem\n return $this->getPageAdd();\n break;\n case 'edytuj':\n // ladowanie strony z formularzem\n return $this->getPageEdit();\n break;\n case 'podglad':\n // ladowanie strony z podgladem\n return $this->getPageView();\n break;\n }\n }\n \n return $this->getPageList();\n }", "function loadContent(){\n\n\t\t/* Initialize output var */\n\t\t$output = '';\n\n\t\t/* Set Initial Tags */\n\t\t$this->setTags();\n\n\t\tif(isset($_GET['photo_id']) && isset($_GET['secret'])){ // Single Photo Pages\n\n\t\t\t/* Single Photos */\n\t\t\t$photo_id = $_GET['photo_id'];\n\t\t\t$secret = $_GET['secret'];\n\t\t\t$output .= $this->printPhoto($photo_id,$secret);\n\n\t\t} elseif(isset($_GET['search'])){ // Search Page\n\n\t\t\t/* For Search & Tags */\n\t\t\t$search = $_GET['search'];\n\t\t\t$page = isset($_GET['page']) ? $_GET['page'] : 1;\n\t\t\t$tags = isset($_GET['tags']) ? $_GET['tags'] : false;\n\n\t\t\t/* Print Search */\n\t\t\t$output .= $this->printSearch($search, $page, 'search', $tags);\n\n\t\t} elseif(isset($_GET['recent'])){ // Recent Photos\n\n\t\t\t/* Basically the Same as the Search Function but without a Query */\n\t\t\t$page = isset($_GET['page']) ? $_GET['page'] : 1;\n\t\t\t$output .= $this->printSearch(false, $page, 'recent');\n\n\t\t} elseif( isset($_GET['set']) && isset($_GET['id'])) { // Load Set if Called\n\n\t\t\t/* For Sets */\n\t\t\t$set = $_GET['set'];\n\t\t\t$id = $_GET['id'];\n\n\t\t\t/* Print Set */\n\t\t\t$output .= $this->printSet($id);\n\n\t\t} elseif( isset($_GET['about']) ){ // About Page\n\n\t\t\t/* About Page */\n\t\t\t$output .= $this->printUserInfo();\n\n\t\t} elseif( isset($_GET['collections'])){\n\n\t\t\t/* Collections Page, Maybe Home Page Soon */\n\t\t\t$output .= $this->printCollections();\n\n\t\t} else { // Same as elseif( isset($_GET['home']\n\n\t\t\t/* Default to Home Page */\n\t\t\t$output .= $this->printSets();\n\t\t}\n\t\treturn $output;\n\t}", "public function contents();", "public function getData(): ContuctUsPage;", "public function GetPages(){\n\t\t$this->MediaType = 'application/xhtml+xml';\n\t\t$this->SetFileName();\n\t\treturn $this->get();\t\n\t}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "public function getContents() {}", "function page_content( $path )\n\t{\n\t\tif($this->not_authorized($path))\n\t\t\treturn $this->page_content('403');\n\n\t\t// page exists\n\t\t$page = $this->page($path);\n\t\tif( $page )\n\t\t{\n\t\t\t// in memory\n\t\t\tif( $page['content'] ) return $page['content'];\n\n\t\t\t// or parse & memorize\n\t\t\t$content = $this->parse($page['raw_content'], true, true, 'page \"' . $path . '\"');\n\t\t\t$this->pages[$path]['content'] = $content;\n\t\t\treturn $content;\n\t\t}\n\n\t\t// 403\n\t\tif( $path == '403' ) {\n\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\treturn '<h1>403</h1>';\n\t\t}\n\t\t// 404\n\t\tif( $path != '404' ) {\n\t\t\treturn $this->page_content('404');\n\t\t}\n\t\t// 404 of 404\n\t\theader('HTTP/1.0 404 Not Found');\n\t\treturn '<h1>404</h1>';\n\t}", "public function getContenido()\n {\n return $this->c_contenido;\n }", "abstract function getContent();", "function getContent(){\n\t\t\n\t\t$nombreSeccion=Moe::$myRoute;\n\t\t//printVar($idSeccion);\n\t\t$seccion = model(\"LallamaradaSeccion\");\n\t\t$newContent = model('LallamaradaContenido');\n\t\t$newUrl = model('LallamaradaUrl');\n\t\t$newMutlXUrl = model('LallamaradaMultXUrl');\n\t\t$newSexXContent = model('LallamaradaSeccionXContenido');\n\t\t$seccions = $seccion->getData();\n\t\tforeach ($seccions as $seccionGet) {\n\t\t\t// Cuando el nombre de la ruta es distinta a \"/\" agrega un / al final\n\t\t\t$ruta=($seccionGet['nombre']==\"/\") ? $seccionGet['nombre'] : $seccionGet['nombre'].\"/\";\n\t\t\tif (isset($seccionGet['idPadre']) && $seccionGet['idPadre']!=0) {\n\t\t\t\t$idPadre=$seccionGet['idPadre'];\n\t\t\t\tdo{\n\t\t\t\t\t$padre = $seccion->getData(array(\n\t\t\t\t\t\t\"fields\" => array(\"id\",\"nombre\",\"idPadre\"),\n\t\t\t\t\t\t'conditions'=>array(\"id\"=>$idPadre),\n\t\t\t\t\t\t));\n\t\t\t\t\t//$ruta= $padre[0]['nombre'].\"/\".$ruta;\n\t\t\t\t\t$ruta = (substr($ruta, 0, 1)==\"/\" && strlen($ruta)>1) ? substr($ruta,2) : $ruta ;\t\t\n\t\t\t\t\t$idPadre=$padre[0]['idPadre'];\n\n\t\t\t\t}while($idPadre > 0);\n\t\t\t}\n\t\t\tif ($ruta==$nombreSeccion) {\n\t\t\t\t$mySeccionId=$seccionGet['id'];\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t\n\n\t\t/*Se pasan los parametros de busqueda*/\n\t\t$conf=array(\n\t\t\t\"conditions\" => 'idSeccion = '.$mySeccionId,\n\t\t\t\"fields\" => array('idContenido','idMultXUrl','posicion'),\n\t\t\t'order' => 'posicion ASC'\n\t\t\t);\n\t\t/*Se Obtiene los datos del contenido en la seccion*/\n\t\t$traeContenido=$newSexXContent->getData($conf);\n\t\t//printVar($mySeccionId);\n\t\t//printVar($traeContenido,\"este do\");\n\t\t\n\t\t/*Recorre contenidos por posicion*/\n\t\tforeach ($traeContenido as $contenidoOrd) {\n\t\t\t# code...\n\t\t\t//printVar($contenidoOrd['idMultXUrl']);\n\t\t\tif(isset($contenidoOrd['idContenido']) && $contenidoOrd['idContenido']!=''){\n\n\t\t\t\t//printVar($contenidoOrd);\n\t\t\t\t$cont=array(\n\t\t\t\t\t'conditions'=> 'id ='.$contenidoOrd['idContenido'].' AND visible=\"S\"',\n\t\t\t\t\t'fields' => array('titulo','contenido')\n\t\t\t\t\t);\n\t\t\t\t$buscaContenido=$newContent->getData($cont);\n\t\t\t\t//printVar($buscaContenido[0]);\n\t\t\t\tview()->assign(\"titulo\",$buscaContenido[0]['titulo']);\n\t\t\t\tview()->assign(\"contenido\",$buscaContenido[0]['contenido']);\n\t\t\t\t$internaD=\"interna.html\"; \n\t\t\t}else if(isset($contenidoOrd['idMultXUrl'])){\n\n\n\t\t\t\t\n\t\t\t\t# code...\n\t\t\t\t$getIdUrl=array(\n\t\t\t\t\t'conditions'=> 'idMultimedia ='.$contenidoOrd['idMultXUrl'],\n\t\t\t\t\t'fields' => array('idUrl')\n\t\t\t\t\t);\n\t\t\t\t$buscaUrl=$newMutlXUrl->getData($getIdUrl);\n\t\t\t\t//printVar(count($buscaUrl));\n\t\t\t\t$pasaString=array();\n\t\t\t\t$string = '';\n\t\t\t\tfor ($j=0; $j < count($buscaUrl) ; $j++) { \n\t\t\t\t\t//printVar($buscaUrl[$j]['idUrl']);\n\t\t\t\t\t$string.=\",\".$buscaUrl[$j]['idUrl'];\n\t\t\t\t}\t\n\n\t\t\t\t$string = substr($string, 1); // remove leading \",\"\n\t\t\t\t//printVar($string);\n\t\t\t\t\n\t\t\t\t//debug(1);\n\t\t\t\t$getUrlC=array(\n\t\t\t\t\t'conditions'=> 'id IN ('.$string.')',\n\t\t\t\t\t'fields' => array('id','orden','url','descipcion'),\n\t\t\t\t\t'order' => 'orden ASC'\n\t\t\t\t\t);\n\t\t\t\t$numC=$contenidoOrd['posicion'];\n\t\t\t\t$traeDatosUrl=$newUrl->getData($getUrlC);\n\t\t\t\t$buscaContenidoUrl[$numC]=(count($traeDatosUrl)>0) ? $traeDatosUrl : array() ;\t\t\n\t\t\t\t//view()->assign(\"contenido\",$buscaContenido[0]['contenido']);*/\n\t\t\t\t\n\t\t\t\t//$internaD=\"indexNew.html\";\n\n\t\t\t}\n\n\t\t}\n\n\n\t\t/*Trae datos de la tabla contenido*/\n\t\t\n\t\tview()->assign(\"multimedia\",$buscaContenidoUrl);\n\n\t\tview()->assign(\"idSeccion\",$mySeccionId);\n\t\t//printVar($internaD);\n\t\tview()->display(\"youth/indexNew.html\");\n\t}", "public abstract function getContent();", "public function readerGetContent();", "public function getContent(){ }", "public function getContent(){ }", "function getContents();", "function load_page($page){\r\n\t\treturn file_get_contents($page);\r\n\t}", "function getContentOfPage($slug) {\n global $TRANS;\n \n // load file\n $file = @file_get_contents('data/pages/'.$slug.'.xml');\n $data = simplexml_load_string($file);\n \n // check for language and additional content\n if ($TRANS) {\n $return = '<div class=\"get1 '.$data->url.'\">'.$data->translationContent.'</div>';\n \n // show additional content on any language until it is translatable\n if( $data->addContent1L ) $return.= '<div class=\"get2 '.$data->url.'\">'.$data->addContent1L.'</div>';\n if( $data->addContent2L ) $return.= '<div class=\"get3 '.$data->url.'\">'.$data->addContent2L.'</div>';\n if( $data->addContent3L ) $return.= '<div class=\"get4 '.$data->url.'\">'.$data->addContent3L.'</div>';\n \n return stripslashes(htmlspecialchars_decode($return,ENT_QUOTES));\n }\n else {\n $return = '<div class=\"get1 '.$data->url.'\">'.$data->content.'</div>';\n if( $data->addContent1 ) $return.= '<div class=\"get2 '.$data->url.'\">'.$data->addContent1.'</div>';\n if( $data->addContent2 ) $return.= '<div class=\"get3 '.$data->url.'\">'.$data->addContent2.'</div>';\n if( $data->addContent3 ) $return.= '<div class=\"get4 '.$data->url.'\">'.$data->addContent3.'</div>';\n \n return stripslashes(htmlspecialchars_decode($return,ENT_QUOTES));\n }\n}", "public function get_output_content();", "public function silo_contents()\n\t{\n\t}", "public function getPages();", "public function contents() {\n\t\tif(isset($this->uri))\n\t\t\treturn $this->handler->contents($this->uri);\n\t\treturn null;\n\t}", "function get_internacionalizacion_page_content($idioma,$id_page) {\n\t\t$query = \"SELECT * FROM internacionalizacion\n\t\tWHERE id_page='$id_page' OR id_page=1\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\n\t\t$result = mysql_query($query);\n\t\t$numrows = mysql_num_rows($result);\n\t\t\n\t\t\n\t\tif ($numrows == 0) {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\twhile ($data=mysql_fetch_array($result)) {\n\t\t\t\t\n\t\t\t\t$key=$data['key'];\n\t\t\t\t\n\t\t\t\tif ($data[''.$idioma.''] == '' || $data[''.$idioma.'']==NULL) { \n\t\t\t\t\t$lang[$key]=$data['es'];\n\t\t\t\t} else {\n\t\t\t\t\t$lang[$key]=$data[''.$idioma.''];\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\tmysql_close($connection);\n\t\t\treturn $lang;\n\t\t}\n\t}", "function generate_page_content ( $titre, $res_segments ){\n\t\t\n\t\t// For each segment in page\n\t\twhile ( $row = getLine ( $res_segments ) ){\n\t\t\t\n\t\t\t// Save segment parameters as JSON\n\t\t\t$segments_parmson[$row['id']] = $row['parmson'];\n\t\t\t$segments_element[$row['id']] = $row['element'];\n\t\t\t\n\t\t\t// List all elements involved in page\n\t\t\t$tab_elm[$row['element']] = 1;\n\t\t}\n\t\t\t\n\t\t// Generate page elements\n\t\t$html .= \"\n\t\t\t\t<content>\n\t\t\t\t\t<!--<h3>\".$titre.\"</h3>-->\";\n\t\tforeach ( $segments_parmson as $id=>$parmson ){\n\t\t\tif ( $segments_element[$id] ){\n\t\t\t\t//echo \"<br>SEGMENT id:[$id] ; name:[\".$segments_element[$id].\"]\";\n\t\t\t\t$html .= \"\n\t\t\t\t\t<div id='seg_$id' class='segment'>\";\n\t\t\t\t$fname = $segments_element[$id].\"_start\";\n\t\t\t\t$html .= $fname ( $parmson );\n\t\t\t\t$html .= \"\n\t\t\t\t\t</div>\";\n\t\t\t}\n\t\t}\n\t\t$html .= \"\n\t\t\t\t</content>\";\n\t\t\t\n\t\t// Generate site's footer section\n\t\t$html .= \"\n\t\t\t\t\".generate_site_footer();\n\t\t\n\t\t// Call client side code\n\t\t$html .= \"\n\t\t\t\t<script src='lib/jquery.js'></script>\n\t\t\t\t<script src='lib/site.js'></script>\";\n\t\t// Call each element js file at the end of html\n\t\tforeach ( $tab_elm as $elm=>$v )\t$html .= \"\n\t\t\t\t<script src='lib/$elm/$elm.js'></script>\";\n\t\t// Call _start function for all elements\n\t\t$html .=\"\n\t\t\t\t<script language='javascript'>\";\n\t\tforeach ( $tab_elm as $elm=>$v )\t$html .= \"\n\t\".$elm.\"_start();\";\n\t\t$html .=\"\n\t\t\t\t</script>\";\n\t\t\t\n\t\t// End html code by closing all opened tags\n\t\t$html .= \"\n\t\t\t</div></center>\n\t\t</div>\n\t</body>\n</html>\";\n\n\t\treturn $html;\n\t}", "public function getContents(): string;", "public function getContents(): string;", "function content(){\n\t\t$navigation = new navigation();\n\t\t$subnavigation = new subnavigation();\n\t\t$content = '\n\t\t\t<html>\n\t\t\t\t<header>\n\t\t\t\t\t<title>'.$this->seitenname.'</title>\n\t\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\">\n\t\t\t\t</header>\n\t\t\t\t\n\t\t\t\t<body>\n\t\t\t\t\t'.$navigation->getContent($this->seitenname).'\n\t\t\t\t\t'.$subnavigation->getContent(\"auswertung\").'\n\t\t\t\t\t'.$this->getForm().'\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t\t';\n\t\treturn $content;\n\t}", "public function getContent(): string;", "public function getContent(): string;", "function getPages() {\r\n\tglobal $S;\r\n\tif (!is_array($S->arbo)) {\r\n\t\trequire_once('../lib/class/class_arbo.php');\r\n\t\t$S =& new ARBO();\r\n\t\t$S->fields = array('id', 'pid', 'type_id', 'titre_fr');\r\n\t\t$S->buildArbo();\r\n\t}\r\n\t$options = array();\r\n\tforeach($S->arbo as $rid=>$tmp) {\r\n\t\t$options[urlencode($S->arbo[$rid]['url'])] = $S->arbo[$rid]['titre_fr'].' (#'.$rid.')';\r\n\t}\r\n\treturn $options;\r\n}", "function getSubMenuPageContent() {\n \tif(isSet($_GET['page'])) {\n \t\tswitch($_GET['page']) {\n \t\t\tcase 'lepress':\n \t\t\tcase 'lepress-student-roster':\n \t\t\t\trequire_once('teacher_include/subscriptions.php');\n \t\t\t\tbreak;\n \t\t\tcase 'lepress-classbook':\n \t\t\t\trequire_once('teacher_include/classbook.php');\n \t\t\t\tbreak;\n \t\t\tcase 'lepress-import-export':\n \t\t\t\trequire_once('teacher_include/import_export.php');\n \t\t\t\tbreak;\n \t\t}\n \t}\n }", "public function indexTypo3PageContent() {}", "abstract protected function getPage() ;", "static public function page($contenu, $title=\"\") {\n\t\t$resultat = '';\n\t\t$resultat .= static::page_avant($title);\n\t\t$resultat .= $contenu;\n\t\t$resultat .= static::page_apres();\n\t\treturn $resultat;\n\t}", "function pagina($modulo) {\n\t\t\t$rs_menu =$this->usuarios->menu_usuario();\n\t\t\t$data_menu=\"\";\n\n\t\t\t$nombrefuncion=\"\";\n\t\t\tforeach ($rs_menu->result_array() as $fila)\n\t\t\t{\n\t\t\t\t$activo='';\n\t\t\t\tif($fila['archivo']==$modulo)\n\t\t\t\t{\n\t\t\t\t\t$activo='class=\"current-page\"';\n\t\t\t\t\t$nombrefuncion=$fila['descripcion'];\n\t\t\t\t}\n\t\t\t\tif($fila['visible']==1)\n\t\t\t\t{\n\t\t\t\t\t$data_menu=$data_menu.\n\t\t\t\t\t'<li '.$activo.'>\n\t\t\t\t\t\t<a href=\"'. site_url(array('user',$fila['archivo'])).'\"> <i class=\"'.$fila['icono'].'\"></i> '.$fila['descripcion'].' </a>\n\t\t\t\t\t</li>';\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$nombre=$this->session->userdata['nombre'];\n\t\t\t$miniatura=$this->session->userdata['miniatura'];\n\n\t\t\t$rs_mensajes = $this->mensajes->registros(5);\n\t\t\t$datamensaje = array();\n\t\t\tforeach ($rs_mensajes->result_array() as $mensaje) {\n\t\t\t\t$datamensaje[] = array(\n\t\t\t\t\t\t\t'miniatura'\t=> $mensaje['miniatura'],\n\t\t\t\t\t\t\t'mensaje'\t=> $mensaje['mensaje'],\n\t\t\t\t\t\t\t'asunto'\t=> $mensaje['asunto'],\n\t\t\t\t\t\t\t'usuario'\t=> $mensaje['usuario'],\n\t\t\t\t\t\t\t'fechahora'\t=> nice_date($mensaje['fechahora'],'d-m-Y h:m:i: a')\n\t\t\t\t\t\t\t);\n\t\t\t}\n\n\n\t\t\treturn array('menu'=>$data_menu,'titulo'=>'Módulos','nombre'=>$nombre,'miniatura'=>$miniatura,'nombrefuncion'=>$nombrefuncion,'datamensaje'=>$datamensaje);\n\t\t}", "public function getPage()\n\t{\n\t $url = URL::segment(1);\n\t\treturn $this->crud->_where(\"url = $url\")\n\t\t\t\t\t->read('row')\n\t\t;\n\t}", "public function get() {\n $temp = $this->page;\n $this->addFooter();\n //Restore $page for the next call to get\n $page = $this->page;\n $this->page = $temp;\n return $page;\n //if not needed, use $this->addFooter(); return $this->page;\n }", "public function get_request_content();", "public function realPageCacheContent() {}", "function get_content($page)\n {\n #global $settings, $db_settings, $pdo;\n $content_query = \"SELECT id, page, author, type, type_addition, time, last_modified, display_time, page_title, title, keywords, description, category, page_info, language, breadcrumbs, teaser_headline, teaser, content, sidebar_1, sidebar_2, sidebar_3, sections, menu_1, menu_2, menu_3, gcb_1, gcb_2, gcb_3, include_news, template, content_type, charset, edit_permission, edit_permission_general, tv, status FROM \".Database::$db_settings['pages_table'].\" WHERE lower(page)=lower(:page) AND status!=0 LIMIT 1\";\n $dbr = Database::$content->prepare($content_query);\n $dbr->bindParam(':page', $page, PDO::PARAM_STR);\n $dbr->execute();\n $data = $dbr->fetch();\n if(isset($data['id'])) return $data;\n return false;\n }" ]
[ "0.7014478", "0.67272127", "0.67093396", "0.67029035", "0.66110665", "0.65743744", "0.65445083", "0.653453", "0.64839286", "0.6385815", "0.63592994", "0.6335847", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.6335135", "0.63132685", "0.63055855", "0.6278569", "0.6276042", "0.6266662", "0.62340933", "0.62340933", "0.62321186", "0.62321186", "0.621694", "0.619161", "0.6190882", "0.61613196", "0.61437845", "0.6142005", "0.61117864", "0.61117864", "0.61117864", "0.61117864", "0.61117864", "0.61025476", "0.6101723", "0.6101723", "0.6097925", "0.6093727", "0.6086027", "0.6079766", "0.607799", "0.6064266", "0.606363", "0.60636044", "0.6059474", "0.605787", "0.6057806", "0.6057806", "0.6057806", "0.6057806", "0.6052138", "0.6047974", "0.60357076", "0.6032238", "0.60245246", "0.60221153", "0.6015206", "0.6015206", "0.60090405", "0.60047525", "0.599709", "0.5988812", "0.5983333", "0.5981252", "0.5977892", "0.5975864", "0.59578246", "0.59557", "0.59557", "0.5940461", "0.59304154", "0.59304154", "0.5914507", "0.59141356", "0.5913793", "0.59093934", "0.5907357", "0.59022915", "0.5887512", "0.58812535", "0.58782923", "0.5874135", "0.5872203" ]
0.614567
43
/ editor de contenidos
function editor($selector='textarea'){ if(!defined('__editor_script')){ echo '<script src="/frontend/tinymce/tinymce.min.js"></script>'; define('__editor_script', 'true'); } ?> <script type="text/javascript"> $('document').ready(function(){ tinymce.init({ selector: "<? echo $selector; ?>", language : "es", theme: "modern", plugins: [ "advlist noneditable autolink lists link image charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen", "insertdatetime media nonbreaking save table contextmenu directionality", "emoticons template paste textcolor colorpicker textpattern imagetools fontawesome example " ], toolbar1: "insertfile undo redo | styleselect | bold italic fontsizeselect | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", toolbar2: "print preview media | forecolor backcolor emoticons fontawesome code", image_advtab: true, content_style : '.mceNonEditable{background-color:red;}', height : "480", relative_urls: false, filemanager_title:"Administrador de enlaces", external_plugins: {"filemanager":"/fm/filemanager.js"}, paste_enable_default_filters: false, extended_valid_elements : "script[inmovil|language|src|async]", content_css: '//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', fontsize_formats: "6px 8px 10px 12px 14px 16px 18px 20px 22px 24px 26px 28px 30px 33px 36px 39px 42px 45px 48px 50px", templates : [ {title:'Anuncio de Adsense',url:'/sites/IMCMS/anuncio.html'} ], setup : function(ed) { ed.on('change', function(e) { //alert("Cambio"); }); } }); }); </script> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editorAction() {\n \n }", "public function __viewEdit()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $filepath = EXTENSIONS . '/workspace_manager_b/assets/highlighters/';\n $entries = scandir($filepath);\n foreach ($entries as $entry) {\n if (is_file($filepath . $entry)) {\n $info = pathinfo($filepath . $entry);\n if ($info['extension'] == 'css' and $info['filename'] != '') {\n $this->addStylesheetToHead(self::$assets_base_url . 'highlighters/' . $info['basename'], 'screen');\n } elseif ($info['extension'] == 'js' and $info['filename'] != '') {\n Administration::instance()->Page->addScriptToHead(self::$assets_base_url . 'highlighters/' . $info['basename']);\n }\n }\t\t\n }\n\n $path = $this->_context[1];\n if ($path) {\n $path_abs = WORKSPACE . '/' . $path;\n if (is_file($path_abs)) {\n $filename = basename($path);\n $this->_existing_file = $filename;\n $title = $filename;\n if (dirname($path_abs) !== WORKSPACE) {\n $path_obj = new PathObject(dirname($path));\n }\n } else {\n $path_obj = new PathObject($path);\n }\t\t\n } else {\n $path_abs = WORKSPACE;\n }\n\n if (!$filename) {\n $title = 'Untitled';\n }\n\n $this->setTitle(__(('%1$s &ndash; %2$s &ndash; %3$s'), array($title, __('Workspace'), __('Symphony'))));\n\n //$this->setPageType('table');\n $this->Body->setAttribute('spellcheck', 'false');\n $this->appendSubheading($title);\n\n $workspace_url = SYMPHONY_URL . '/workspace/manager/';\n $editor_url = SYMPHONY_URL . '/workspace/editor/';\n\n $path_string = SYMPHONY_URL . '/workspace/manager/';\n $breadcrumbs = array(Widget::Anchor(__('Workspace'), $path_string));\n if (isset($path_obj)) {\n $dir_path = $path_obj->getPath() . '/';\n $dir_path_encoded = $path_obj->getPathEncoded() . '/';\n $workspace_url .= $dir_path_encoded;\n $editor_url .= $dir_path_encoded;\n $path_parts = $path_obj->getPathParts();\n $parts_encoded = $path_obj->getPathPartsEncoded();\n foreach ($path_parts as $path_part) {\n $path_string .= current($parts_encoded) . '/';\n array_push($breadcrumbs, Widget::Anchor(__(Helpers::capitalizeWords($path_part)), $path_string));\n next($parts_encoded);\n }\n }\n $this->insertBreadcrumbs($breadcrumbs);\n\n $this->Form->setAttribute('class', 'two columns');\n $this->Form->setAttribute('action', $editor_url . $path_encoded . (isset($filename) ? rawurlencode($filename) . '/' : ''));\n\n $fieldset = new XMLElement('fieldset');\n //$fieldset->setAttribute('class', 'primary column');\n $fieldset->appendChild(\n Widget::Input('fields[existing_file]', $filename, 'hidden', array('id' => 'existing_file'))\n );\n $fieldset->appendChild(\n Widget::Input('fields[dir_path]', $dir_path, 'hidden', array('id' => 'dir_path'))\n );\n $fieldset->appendChild(\n Widget::Input('fields[dir_path_encoded]', $dir_path_encoded, 'hidden', array('id' => 'dir_path_encoded'))\n );\n\n $label = Widget::Label(__('Name'));\n $label->appendChild(Widget::Input('fields[name]', $filename));\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 //$this->_existing_file ? @file_get_contents($path_abs, ENT_COMPAT, 'UTF-8') : '',\n $filename ? htmlentities(file_get_contents($path_abs), ENT_COMPAT, 'UTF-8') : '',\n array('id' => 'text-area', 'class' => 'code hidden')\n )\n );\n //$label->appendChild();\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 if (!$this->_existing_file) {\n $actions = new XMLElement('div', NULL, array('class' => 'actions'));\n // Add 'create' button\n $actions->appendChild(\n Widget::Input(\n 'action[save]',\n __('Create File'),\n 'submit',\n array('class' =>'button', 'accesskey' => 's')\n )\n );\n $this->Form->appendChild($actions);\n }\n\n $actions = new XMLElement('div', NULL, array('class' => 'actions'));\n if (!$this->_existing_file) {\n $actions->setAttribute('data-replacement-actions', '1');\n }\n\n $actions->appendChild(\n Widget::Input(\n 'action[save]',\n __('Save Changes'),\n 'submit',\n array('class' => 'button', 'accesskey' => 's')\n )\n );\n $actions->appendChild(\n new XMLELement(\n 'button',\n __('Delete'),\n array(\n 'name' => 'action[delete]',\n 'type' => 'submit',\n 'class' => 'button confirm delete',\n 'title' => 'Delete this file',\n 'accesskey' => 'd',\n 'data-message' => 'Are you sure you want to delete this file?'\n )\n )\n );\n\n $this->Form->appendChild($actions);\n\n $text = new XMLElement('p', __('Saving'));\n $this->Form->appendChild(new XMLElement('div', $text, array('id' => 'saving-popup')));\n }", "public function getEditor();", "function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = \\true, $tab_index = 2, $extended = \\true)\n {\n }", "public function code_editor()\n\t{\n\t\tif($this->isLoggedIn())\n\t\t{\n\t\t\t$group = $this->session->userdata['role'];\n\t\t\t$data['menu'] = $this->Menu_model->getMenuItems($group);\n\t\t\t$data['company_info'] = $this->Settings_model->get_company_info();\n\t\t\t$data['title'] = $data['company_info']['name'].\" | Code Editor\";\n\t\t\t$this->load->view('backend/code_editor', $data);\n\t\t}\n\t\telse {\n\t\t\tredirect(base_url('login'));\n\t\t}\n\t}", "function ckeditPanel()\r\n{\r\n\t$formats = \"\";\r\n\t$hfile = fopen('formats.txt', 'r');\r\n\r\n\tif ($hfile)\r\n\t{\r\n\t\t$formats = fread($hfile, filesize(\"formats.txt\"));\r\n\t\tfclose($hfile);\r\n\t}\r\n // Tbis html connects a <textarea> called ed to CKEditor \r\n // In doing so, moves the formats into the edit\r\n // $formats is a parameter for the view, as is $ckreplace\r\n\t$ckreplace = \"<script>\\n\"\r\n\t\t. \" CKEDITOR.replace( 'ed', { $formats } ) \\n\"\r\n\t\t. \"</script>\\n\";\r\n\r\n\treturn $ckreplace;\r\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 index()\n {\n return view('editor');\n }", "function editting()\n\t{\n\t\tglobal $template, $mod_loader, $security, $errors, $lang_loader;\n\t\t\n\t\t// which is chosen\n\t\t$b = ( isset( $_GET[ 'pag' ] ) ) ? str_replace( '%20', ' ', strval( $_GET[ 'pag' ] ) ) : '';\n\t\t\n\t\t// create the list\n\t\t$list = '<select onchange=\"window.location.href = this.value\">';\n\t\t$list .= ( empty( $b ) ) ? '<option selected value=\"\"> </option>' : '<option value=\"\"> </option>';\n\t\tif ( is_array( $this->pages_array ) )\n\t\t{\n\t\t\tforeach ( $this->pages_array as $lang => $pags )\n\t\t\t{\n\t\t\t\tforeach ( $pags as $name => $pag )\n\t\t\t\t{\n\t\t\t\t\t$list .= ( $b == $lang . '-' . $name ) ? '<option selected ' : '<option ';\n\t\t\t\t\t$list .= 'value=\"' . $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_pages&s=edit&pag=' . $lang . '-' . $name ) . '\">' . $lang . ' :: ' . $name . '</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$list .= '</select>';\n\t\t\n\t\t// determine the content of the editee\n\t\tif ( !empty( $b ) )\n\t\t{\n\t\t\t// get the content\n\t\t\t$content = explode( '-', $b );\n\t\t\t$title = $content[ 1 ];\n\t\t\t$language = $content[ 0 ];\n\t\t\t$auth = $this->pages_array[ $content[ 0 ] ][ $content[ 1 ] ][ 'auth' ];\n\t\t\t$content = $this->pages_array[ $content[ 0 ] ][ $content[ 1 ] ][ 'content' ];\n\t\t}else\n\t\t{\n\t\t\t$content = '';\n\t\t\t$title = '';\n\t\t\t$language = '';\n\t\t\t$auth = '';\n\t\t}\n\t\t\n\t\t// get the editor\n\t\t$mods = $mod_loader->getmodule( 'editor', MOD_FETCH_NAME, NOT_ESSENTIAL );\n\t\t$mod_loader->port_vars( array( 'name' => 'editor1', 'quickpost' => FALSE, 'def_text' => stripslashes( $content ) ) );\n\t\t$mod_loader->execute_modules( 0, 'show_editor' );\n\t\t$page = $mod_loader->get_vars( array( 'editor_HTML', 'editor_WYSIWYG' ) );\n\t\t\n\t\tif ( !$page[ 'editor_WYSIWYG' ] )\n\t\t{ // make it so that newlines are actually newlines in the textarea\n\t\t\t$htm = $page[ 'editor_HTML' ];\n\t\t\t$htm = str_replace( '<textarea name=\"editor1\" id=\"editor1\" style=\"width: 100%; height: 78%\">' . htmlspecialchars( $content ) . '</textarea>', '<textarea name=\"editor1\" id=\"editor1\" style=\"width: 100%; height: 78%\">' . htmlspecialchars( str_replace( '<br />', \"\\r\\n\", $content ) ) . '</textarea>', $htm );\n\t\t\t$page[ 'editor_HTML' ] = $htm;\n\t\t}\n\t\t\n\t\t// construct the language selection list\n\t\t$langl = $lang_loader->get_langlist();\n\t\t$langs = '<select name=\"language\">';\n\t\tfor ( $i = 0; $i < count( $langl ); $i++ )\n\t\t{\n\t\t\t$langs .= ( $langl[ $i ] == $language ) ? '<option selected>' . $langl[ $i ] . '</option>' : '<option>' . $langl[ $i ] . '</option>';\n\t\t}\n\t\t$langs .= '</select>';\n\t\t\n\t\t// construct the auth selection list :)\n\t\t$auth2 = '<select name=\"auth\">';\n\t\t$s[ 0 ] = ( $auth == GUEST ) ? 'selected' : '';\n\t\t$s[ 1 ] = ( $auth == INACTIVE ) ? 'selected' : '';\n\t\t$s[ 2 ] = ( $auth == ADMIN ) ? 'selected' : '';\n\t\t$s[ 3 ] = ( $auth == SUPER_MOD ) ? 'selected' : '';\n\t\t$s[ 4 ] = ( $auth == MOD ) ? 'selected' : '';\n\t\t$s[ 5 ] = ( $auth == USER ) ? 'selected' : '';\n\t\t$auth2 .= '<option value=\"' . GUEST . '\" ' . $s[ 0 ] . '>' . $this->lang[ 'Guest' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . INACTIVE . '\" ' . $s[ 1 ] . '>' . $this->lang[ 'Inactive' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . ADMIN . '\" ' . $s[ 2 ] . '>' . $this->lang[ 'Admin' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . SUPER_MOD . '\" ' . $s[ 3 ] . '>' . $this->lang[ 'Super_mod' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . MOD . '\" ' . $s[ 4 ] . '>' . $this->lang[ 'Mod' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . USER . '\" ' . $s[ 5 ] . '>' . $this->lang[ 'User' ] . '</option>';\n\t\t$auth2 .= '</select>';\n\t\t\n\t\t// the template stuff eh\n\t\t$template->assign_block_vars( 'edit', '', array(\n\t\t\t'S_FORM_ACTION' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_pages&s=add_bar' ),\n\t\t\t'S_PAGE' => $page[ 'editor_HTML' ],\n\t\t\t'S_TITLE' => $title,\n\t\t\t'S_CONTENT' => htmlentities( $content ),\n\t\t\t'S_SELECT' => $list,\n\t\t\t'S_LANGS' => $langs,\n\t\t\t'S_MODE' => 'edit',\n\t\t\t'S_AUTH' => $auth,\n\t\t\t'S_AUTH2' => $auth2,\n\t\t\t\n\t\t\t'L_TITLE' => $this->lang[ 'Edit_title' ],\n\t\t\t'L_EXPLAIN' => $this->lang[ 'Edit_explain' ],\n\t\t\t'L_TITLE2' => $this->lang[ 'Edit_title2' ],\n\t\t\t'L_LANGUAGE' => $this->lang[ 'Edit_language' ],\n\t\t\t'L_SELECT' => $this->lang[ 'Edit_select' ],\n\t\t\t'L_AUTH' => $this->lang[ 'Edit_auth' ],\n\t\t\t'L_REMOVE' => $this->lang[ 'Edit_remove' ],\n\t\t) );\n\t\t\n\t\t// woot visible\n\t\t$template->assign_switch( 'edit', TRUE );\n\t}", "function editor($id=\"\"){\n\t\tglobal $config;\n\t\t$st=\"add\";\n\t\tif ($id<>\"\"){\n\t\t\t$post=get_posts($id,\"\",\"\",$_SESSION['uid']);\n\t\t\t$date=$post[0][\"date\"];\n\t\t\t$st=\"update\";\n\t\t\tif ($post[0][\"status\"]) $durum=\"- Yazı yayında ..\"; else $durum=\"- Yazı geçici olarak kaydedilmiş .. Sayfada gözükmez !!\";\n\t\t}\n\t\telse $date=date('YmdHi');\n\t\t?>\n\n\t\t<form action=\"?act=<?=$st?>\" method=\"post\" onsubmit=\"syncTextarea();\">\n\t\t\t<p class=\"sari\">Başlık : <input type=\"text\" name=\"title\" size=\"60\" value=\"<?=$post[0][\"title\"]?>\"><i><?=$durum?></i></p>\n\t\t\t<br>\n\t\t\t<textarea name=\"text\" style=\"width:99%; height:280px\" id=\"richtext\"><?=$post[0][\"entry\"]?></textarea>\n\t\t\t<script type=\"text/javascript\">makeWhizzyWig(\"richtext\", \"all\");</script>\n\t\t\t<input type=\"hidden\" name=\"date\" value=\"<?=$date?>\">\n\t\t\t<input type=\"hidden\" name=\"id\" value=\"<?=$post[0][\"id\"]?>\">\n\t\t\t<p class=\"sari\">Kategori : \n\t\t<?\n\t\t\t$archives=get_categories();\n\t\t\t$checked =get_cat($id,1);\n\t\t\tfor ($i=0; $i<count($archives); $i++){\n\t\t\tif ($checked) foreach ($checked as $chok) if ($chok==$archives[$i][id]) $selected=\"CHECKED\"; \n\t\t\techo \"<input class=\\\"check\\\" \".$selected.\" type=\\\"checkbox\\\" value=\\\"\".$archives[$i][id].\"\\\" name=\\\"category[]\\\">\".$archives[$i][name];\n\t\t\t$selected=\"\";\n\t\t\t}\n\t\t?>\t</p><br>\n\n\t\t\t<div class=\"right\"><input class=\"buton\" type=\"submit\" name=\"publish\" value=\"Yayınla\"><input class=\"buton\" type=\"submit\" name=\"save\" value=\"Kaydet\"></div>\n\t\t</form>\n\t\t<? if ($id) { ?>\n\t\t<p><a href=\"#\" onclick=\"toggleVisibility(document.getElementById('details'), this); return false\">Ayrıntılar <img src=\"images/down.png\"></a></p>\n\t\t<p id=\"details\" style=\"display: none;\"><?\n\t\techo \"Yazar :\".get_author_name($_SESSION[\"uid\"]).\" , Tarih : \".$date['day'].\"-\".$date['month'].\"-\".$date[\"year\"].\" @ \".$date['hour'].\":\".$date[\"minute\"].\"</p>\";\n\t\t}\n\t}", "function onGetContent( $editor ) {\n\t\treturn \"document.getElementById( '$editor' ).value;\\n\";\n\t}", "public function editView() {\n $this->template()->addTplFile('edit.phtml');\n $this->setTinyMCE($this->formEdit->text, 'advanced');\n $this->setTinyMCE($this->formEdit->textPanel, 'advanced', array('height' => 300));\n if(isset($this->formEdit->textFooter)){\n $this->setTinyMCE($this->formEdit->textFooter, 'advanced', array('height' => 300));\n }\n Template_Module::setEdit(true);\n }", "function wysiwyg($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<div class='postarea'>\";\r\n\t\t\tthe_editor($args['value'] , $args['formname']);\r\n\t\t\techo \"</div>\";\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "function editor($div)\n {\n $editorLocation=base_url().'assets/plugins/niceEdit';\n\n $js = \"<script type='text/javascript' src='{$editorLocation}/nicEdit.js'>\n </script>\n <script type='text/javascript'>\n //<![CDATA[\n bkLib.onDomLoaded(function() {\n new nicEditor({iconsPath : '{$editorLocation}/nicEditorIcons.gif'\n }).panelInstance($div);\n });\n //]]>\n </script>\";\n\n return $js;\n }", "function media_send_to_editor($html)\n {\n }", "function tlspi_make_text_area() { ?>\n\t<div class=\"wrap\"> \n\t\t<h1>The La Source Newspaper Post Importer</h1> \n \n\t\t<form method=\"post\" action=\"\"> \n\t\t\t<label>copy and paste document here... <br />\n\t\t\t<textarea rows=\"60\" cols=\"100\" name=\"preview\" id=\"code\" ></textarea> </label>\n\t\t\t\n\t\t\t<br> \n\t\t\t<input type =\"submit\" value=\"Preview\" name=\"submit\" class=\"button-primary\"> \n\t\t\t<br>\n\t\t</form> <br> \n\t\t<script>\n\t\t\tvar editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n\t\t\t\tmode: { name: \"xml\", alignCDATA: true},\n\t\t\t\tlineNumbers: true\n\t\t\t});\n\t\t</script>\n\t</div>\n<?php\n}", "function render()\r\n {\r\n $ret = $this->editor->render();\r\n $ret .= parent::render();\r\n\r\n return $ret;\r\n }", "public function getEditora()\n {\n return $this->editora;\n }", "public function after_editor() {\n echo '</div>';\n $this->render_builder();\n }", "public static function editor_js()\n {\n }", "public function outputBlockEditModeEditor($key, $content);", "function content_for_editor($html_content)\n{\n?>\n<script language=\"javascript\">\nvar win = window.dialogArguments || opener || parent || top;\nwin.send_to_editor('<?php echo addslashes($html_content); ?>');\n</script>\n<?php\n}", "protected function editar()\n {\n }", "abstract protected function renderEdit();", "public static function add_editor() {\n\t\t\twp_enqueue_script( 'tiny_mce' );\n\n\t\t\techo '<div id=\"kirki_editor_pane\" class=\"hide\">';\n\t\t\twp_editor( '', 'kirki-editor', array(\n\t\t\t\t'_content_editor_dfw' => false,\n\t\t\t\t'drag_drop_upload' => true,\n\t\t\t\t'tabfocus_elements' => 'content-html,save-post',\n\t\t\t\t'editor_height' => 200,\n\t\t\t\t'default_editor' => 'tinymce',\n\t\t\t\t'teeny' => true,\n\t\t\t\t'tinymce' => array(\n\t\t\t\t\t'resize' => false,\n\t\t\t\t\t'wp_autoresize_on' => false,\n\t\t\t\t\t'add_unload_trigger' => false,\n\t\t\t\t),\n\t\t\t) );\n\t\t\techo '</div>';\n\t\t\tdo_action( 'admin_footer' );\n\t\t\tdo_action( 'admin_print_footer_scripts' );\n\t\t}", "function onSetContent( $editor, $html ) {\n\t\treturn \"document.getElementById( '$editor' ).value = $html;\\n\";\n\t}", "function createSqlEditor() {\n\t\tprint \"<script type=\\\"text/javascript\\\" language=\\\"javascript\\\" src=\\\"cache.php?script=texteditor\\\"></script><script type=\\\"text/javascript\\\" language=\\\"javascript\\\">\n\t\t\tfunction editorHotkey(code, fn) {\n\t\t\t\t$('#commandEditor').bind('keydown', code, fn);\n\t\t\t\t$('#commandEditor2').bind('keydown', code, fn);\n\t\t\t\t$('#commandEditor3').bind('keydown', code, fn);\n\t\t\t}\n\t\t\t$(function() {\n\t\t\t\tcommandEditor = new textEditor(\\\"#commandEditor\\\");\n\t\t\t\tcommandEditor2 = new textEditor(\\\"#commandEditor2\\\");\n\t\t\t\tcommandEditor3 = new textEditor(\\\"#commandEditor3\\\");\n\t\t\t\tinitStart();\n\t\t\t}); </script>\";\n\t}", "function add_wysiwyg() {\n\t\techo '\n<script type=\"text/javascript\">\n\tjQuery(function($) {\n\t\t';\n\t\tforeach($this->wysiwyg_items as $item) {\n\t\t\techo '\n\t\t\t\tCKEDITOR.replace( \"'.$item.'\",{\n\t\t\t\t\tcustomConfig : \"/index.php?cf_meta_action=ckeditor_toolbar_config\"\n\t\t\t\t});\n\t\t\t';\n\t\t}\n\t\techo '\n\t});\n</script>\n\t\t\t';\n\t\treturn;\n\t}", "private function addEditFormBeforeContent() {\n\t\t$out = $this->buildConflictPageChangesCol();\n\n\t\t$editorClass = '';\n\t\tif ( $this->wikiEditorIsEnabled() ) {\n\t\t\t$editorClass = ' mw-twocolconflict-wikieditor';\n\t\t}\n\t\t$out .= '<div class=\"mw-twocolconflict-editor-col' . $editorClass . '\">';\n\t\t$out .= $this->buildConflictPageEditorCol();\n\n\t\treturn $out;\n\t}", "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 }", "function beaver_extender_fe_style_editor() {\n\t\n?>\n\t<div id=\"beaver-extender-fe-style-editor\" style=\"display:none;\">\n\t\t\n\t\t<h3>\n\t\t\t<span class=\"dashicons dashicons-move\" style=\"padding-top:3px;\"></span>\n\t\t</h3>\n\t\t\n\t\t<?php do_action( 'beaver_extender_fe_style_editor_form' ); ?>\n\t\t\n\t</div><!-- END #beaver-extender-fe-style-editor -->\n<?php\n\n}", "function editor() {\n\t\tswitch($this->EditPageNr) {\n\t\t\tcase WE_EDITPAGE_THUMBNAILS:\n\t\t\t\treturn \"we_templates/we_editor_thumbnails.inc.php\";\n\n\t\t\tcase WE_EDITPAGE_WEBUSER:\n\t\t\t\treturn \"we_modules/customer/editor_weDocumentCustomerFilter.inc.php\";\n\t\t\tdefault:\n\t\t\t\treturn parent::editor();\n\n\t\t}\n\t}", "function page_menueeditor() {\r\n\t\tglobal $_GET,$_POST, $admin_language;\r\n\t\r\n\t\t$menue_id = 0;\r\n\t\t$out = \"\\t\\t\\t<h3>Menueeditor</h3><hr />\t\r\n\t\t\t<ul>\\r\\n\";\r\n\t\r\n\t\tif(isset($_GET['menue_id']) || isset($_POST['menue_id'])) {\r\n\t\t\tif(isset($_GET['menue_id']))\r\n\t\t\t\t$menue_id = $_GET['menue_id'];\r\n\t\t\telse\r\n\t\t\t\t$menue_id = $_POST['menue_id'];\r\n\t\t}\r\n\t\t//\r\n\t\t// write the 'coose menue' to make it able to switch betwen both possible menues\r\n\t\t//\r\n\t\tif($menue_id == \"2\")\r\n\t\t\t$out .= \"\\t\\t\\t\\t<li><a href=\\\"admin.php?page=menueeditor&amp;menue_id=1\\\">Menü 1</a></li>\r\n\t\t\t\t<li><u>Menü 2</u></li>\\r\\n\";\r\n\t\telse {\r\n\t\t\t$out .= \"\\t\\t\\t\\t<li><u>Menü 1</u></li>\r\n\t\t\t\t<li><a href=\\\"admin.php?page=menueeditor&amp;menue_id=2\\\">Menü 2</a></li>\\r\\n\";\r\n\t\t\t$menue_id = 1;\r\n\t\t}\r\n\t\t$out .= \"\\t\\t\\t</ul>\\r\\n\";\r\n\t\r\n\t\tif(isset($_GET['action']) || isset($_POST['action'])) {\r\n\t\t\tif(isset($_GET['action']))\r\n\t\t\t\t$action = $_GET['action'];\r\n\t\t\telse\r\n\t\t\t\t$action = $_POST['action'];\r\n\t\t\r\n\t\t\tif(isset($_GET['id']))\r\n\t\t\t\t$id = $_GET['id'];\r\n\t\t\telseif(isset($_POST['id']))\r\n\t\t\t\t$id = $_POST['id'];\r\n\t\t\telse\r\n\t\t\t\t$id = 0;\r\n\t\t\t//\r\n\t\t\t// put the item one position higher\r\n\t\t\t//\r\n\t\t\tif($action == \"up\") {\r\n\t\t\t\t$_result = db_result(\"SELECT * FROM \".DB_PREFIX.\"menue WHERE id=\".$id.\"\");\r\n\t\t\t\t$_data = mysql_fetch_object($_result);\r\n\t\t\t\t$id1 = $_data->id;\r\n\t\t\t\t//\r\n\t\t\t\t// get the orderid to find the follownig menue item\r\n\t\t\t\t//\r\n\t\t\t\t$orderid1 = $_data->orderid;\r\n\t\t\t\r\n\t\t\t\t$_result2 = db_result(\"SELECT * FROM \".DB_PREFIX.\"menue WHERE orderid <\".$orderid1.\" AND menue_id=\".$menue_id.\" ORDER BY orderid DESC\");\r\n\t\t\t\t$_data2 = mysql_fetch_object($_result2);\r\n\t\t\t\t\r\n\t\t\t\t//\r\n\t\t\t\t// switch the orderids to cange the order of this two menue items\r\n\t\t\t\t//\r\n\t\t\t\tif($_data2 != null) {\r\n\t\t\t\t\t$id2 = $_data2->id;\r\n\t\t\t\t\t$orderid2 = $_data2->orderid;\r\n\t\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"menue SET orderid= \".$orderid2.\" WHERE id=\".$id1);\r\n\t\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"menue SET orderid= \".$orderid1.\" WHERE id=\".$id2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// put the item one position lower\r\n\t\t\t//\r\n\t\t\telseif($action == \"down\") {\r\n\t\t\t\t$_result = db_result(\"SELECT * FROM \".DB_PREFIX.\"menue WHERE id=\".$id.\"\");\r\n\t\t\t\t$_data = mysql_fetch_object($_result);\r\n\t\t\t\t$id1 = $_data->id;\r\n\t\t\t\t$orderid1 = $_data->orderid;\r\n\t\t\t\r\n\t\t\t\t$_result2 = db_result(\"SELECT * FROM \".DB_PREFIX.\"menue WHERE orderid >\".$orderid1.\" AND menue_id=\".$menue_id.\" ORDER BY orderid ASC\");\r\n\t\t\t\t$_data2 = mysql_fetch_object($_result2);\r\n\t\t\t\r\n\t\t\t\tif($_data2 != null) {\r\n\t\t\t\t\t$id2 = $_data2->id;\r\n\t\t\t\t\t$orderid2 = $_data2->orderid;\r\n\t\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"menue SET orderid= \".$orderid2.\" WHERE id=\".$id1);\r\n\t\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"menue SET orderid= \".$orderid1.\" WHERE id=\".$id2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// remove the selected item\r\n\t\t\t//\r\n\t\t\telseif($action == \"delete\") {\r\n\t\t\t\tif(isset($_GET['sure']) || isset($_POST['sure'])) {\r\n\t\t\t\t\tif(isset($_GET['sure']))\r\n\t\t\t\t\t\t$sure = $_GET['sure'];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$sure = $_POST['sure'];\r\n\t\t\t\t\tif($sure == 1)\r\n\t\t\t\t\t\tdb_result(\"DELETE FROM \".DB_PREFIX.\"menue WHERE id=\".$id.\"\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$_result = db_result(\"SELECT * FROM \".DB_PREFIX.\"menue WHERE id=\".$id.\"\");\r\n\t\t\t\t\t$_data = mysql_fetch_object($_result);\r\n\t\t\t\t\t$out .= \"\\t\\t\\t<div class=\\\"error\\\">Soll der Link \".$_data->text.\"(\".$_data->link.\") wirklich gelöscht werden?<br />\r\n\t\t\t<a href=\\\"admin.php?page=menueeditor&amp;action=delete&amp;menue_id=\".$menue_id.\"&amp;id=\".$id.\"&amp;sure=1\\\" title=\\\"Wirklich Löschen?\\\">Ja</a> &nbsp;&nbsp;&nbsp; <a href=\\\"admin.php?page=menueeditor&amp;menue_id=\".$menue_id.\"\\\" title=\\\"Nein! nicht löschen\\\">Nein</a></div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn $out;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// add a new item\r\n\t\t\t//\r\n\t\t\telseif($action == \"add\") {\r\n\t\t\t\tif(isset($_GET['intern_link']))\r\n\t\t\t\t\t$intern_link = $_GET['intern_link'];\r\n\t\t\t\telse\r\n\t\t\t\t\t$intern_link = $_POST['intern_link'];\r\n\t\t\t\r\n\t\t\t\tif(isset($_GET['extern_link']))\r\n\t\t\t\t\t$extern_link = $_GET['extern_link'];\r\n\t\t\t\telse\r\n\t\t\t\t\t$extern_link = $_POST['extern_link'];\r\n\t\t\t\r\n\t\t\t\tif(isset($_GET['caption']))\r\n\t\t\t\t\t$caption = $_GET['caption'];\r\n\t\t\t\telse\r\n\t\t\t\t\t$caption = $_POST['caption'];\r\n\t\t\t\t$new_window = \"\";\r\n\t\t\t\tif(isset($_GET['new_window']))\r\n\t\t\t\t\t$new_window = $_GET['new_window'];\r\n\t\t\t\telseif(isset($_POST['new_winow']))\r\n\t\t\t\t\t$new_window = $_POST['new_window'];\t\r\n\t\t\t\t\r\n\t\t\t\tif($intern_link == \"\")\r\n\t\t\t\t\t$link = $extern_link;\r\n\t\t\t\telse\r\n\t\t\t\t\t$link = \"l:\".$intern_link;\r\n\t\t\t\tif($link != \"\" && $caption != \"\") {\r\n\t\t\t\t\tif($new_window == \"on\")\r\n\t\t\t\t\t\t$new = \"yes\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$new = \"no\";\r\n\t\t\t\t\t$menue_result = db_result(\"SELECT orderid FROM \".DB_PREFIX.\"menue WHERE menue_id = \".$menue_id.\" ORDER BY orderid DESC\");\r\n\t\t\t\t\t$menue_data = mysql_fetch_object($menue_result);\r\n\t\t\t\t\tif($menue_data != null)\r\n\t\t\t\t\t\t$ordid = $menue_data->orderid + 1;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$ordid = 0;\r\n\t\t\t\t\r\n\t\t\t\t\tdb_result(\"INSERT INTO \".DB_PREFIX.\"menue (text, link, new, orderid,menue_id) VALUES ('\".$caption.\"', '\".$link.\"', '\".$new.\"', \".$ordid.\",$menue_id)\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$out .= \"\\t\\t\\t<table class=\\\"linktable\\\">\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Text</td>\r\n\t\t\t\t\t\t<td>Link</td>\r\n\t\t\t\t\t\t<td>Aktionen</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t<tbody>\\r\\n\";\r\n\t\t//\r\n\t\t// add the menueedit part where you can select\r\n\t\t//\r\n\t\t$out .= menue_edit_view($menue_id);\r\n\t\t$out .= \"\\t\\t\\t\\t</tbody>\r\n\t\t\t</table><br />\\r\\n\";\r\n\t\t$out .= \"\\t\\t\\t<form method=\\\"get\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"menueeditor\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"add\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"menue_id\\\" value=\\\"\".$menue_id.\"\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Bezeichnung:</td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"caption\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Interner Link:</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select name=\\\"intern_link\\\">\r\n\t\t\t\t\t\t\t\t<option value=\\\"\\\">externer Link</option>\\r\\n\";\r\n\t\t//\r\n\t\t// list all available pages \r\n\t\t//\r\n\t\t$site_result = db_result(\"SELECT * FROM \".DB_PREFIX.\"pages_content WHERE page_visible!='deleted' ORDER BY page_name ASC\");\r\n\t\twhile($site_data = mysql_fetch_object($site_result))\r\n\t\t\t$out.= \"\\t\\t\\t\\t\\t\\t\\t\\t<option value=\\\"\".$site_data->page_name.\"\\\">\".$site_data->page_title.\"(\".$site_data->page_name.\")</option>\\r\\n\";\r\n\t\t\t\r\n\t\t$out .=\"\\t\\t\\t\\t\\t\\t\\t</select>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Externer Link:</td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"extern_link\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Neue Fenster:</td>\r\n\t\t\t\t\t\t<td><input type=\\\"checkbox\\\" name=\\\"new_window\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\\\"2\\\"><input type=\\\"submit\\\" value=\\\"Hinzufügen\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t</form>\";\r\n\t\r\n\t\treturn $out;\r\n\t}", "public function callback_wysiwyg( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : '500px';\n\n echo '<div style=\"max-width: ' . $size . ';\">';\n\n $editor_settings = array(\n 'teeny' => true,\n 'textarea_name' => $name_id,\n 'textarea_rows' => 10\n );\n\n if ( isset( $args['options'] ) && is_array( $args['options'] ) ) {\n $editor_settings = array_merge( $editor_settings, $args['options'] );\n }\n\n wp_editor( $value, $args['section'] . '-' . $args['id'], $editor_settings );\n\n echo '</div>';\n\n echo $this->get_field_description( $args );\n }", "public function editar()\n {\n }", "function editor(){\n\t\tswitch($this->EditPageNr){\n\t\t\tcase we_base_constants::WE_EDITPAGE_THUMBNAILS:\n\t\t\t\treturn 'we_editors/we_editor_thumbnails.inc.php';\n\n\t\t\tdefault:\n\t\t\t\treturn parent::editor();\n\t\t}\n\t}", "function _EDIT( $cur_template, $publish ) {\n\t\tglobal $id;\n\n\t\tmosMenuBar::startTable();\n\t\t?>\n\t\t\t<td>\n\t\t\t\t<a class=\"toolbar\" href=\"#\" onClick=\"if (typeof document.adminForm.content == 'undefined') { alert('Вы можете просмотреть только -Новый- модуль.'); } else { var content = document.adminForm.content.value; content = content.replace('#', ''); var title = document.adminForm.title.value; title = title.replace('#', ''); window.open('popups/modulewindow.php?title=' + title + '&content=' + content + '&t=<?php echo $cur_template; ?>', 'win1', 'status=no,toolbar=no,scrollbars=auto,titlebar=no,menubar=no,resizable=yes,width=200,height=400,directories=no,location=no'); }\" >\n\t\t\t\t\t<img src=\"images/preview_f2.png\" alt=\"Просмотр\" border=\"0\" name=\"preview\" align=\"middle\">\n\t\t\t\t\tПросмотр</a>\n\t\t\t</td>\n\t\t<?php\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::save();\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::apply();\n\t\tmosMenuBar::spacer();\n\t\tif ( $id ) {\n\t\t\t// for existing content items the button is renamed `close`\n\t\t\tmosMenuBar::cancel( 'cancel', 'Закрыть' );\n\t\t} else {\n\t\t\tmosMenuBar::cancel();\n\t\t}\n\t\tmosMenuBar::spacer();\n\t\tmosMenuBar::help( 'screen.modules.edit' );\n\t\tmosMenuBar::endTable();\n\t}", "static function dt_edit_text($title,$name,$value,$default = '',$size = 60,$rows = 1,$editor = 0,$comment='',$sub_item = '',$class_col1='col-md-2',$class_col2='col-md-10'){\n\t\tif(!isset($value))\n\t\t\t$value = $default;\n\t\t$value = html_entity_decode(stripslashes($value),ENT_COMPAT,'UTF-8');\n $html = '';\n\t\techo '<div class=\"form-group\">\n <label class=\"'.$class_col1.' col-xs-12 control-label\">'.$title.'</label>\n <div class=\"'.$class_col2.' col-xs-12\">\n ';\n\t\tif($rows > 1){\n\t\t\tif(!$editor){\n\t\t\t\techo '<textarea class=\"form-control\" rows=\"'.$rows.'\" cols=\"'.$size.'\" name=\"'.$name.'\" id=\"'.$name.'\" >'.$value.'</textarea>';\n\t\t\t} else {\n//\t\t\t\techo '<textarea rows=\"10\" cols=\"10\" name=\"'.$name.'\" id=\"'.$name.'\" >'.$value.'</textarea>';\n//\t\t\t\techo \"<script>CKEDITOR.replace( '\".$name.\"');</script>\";\n\t\t\t\t$k = 'oFCKeditor_'.$name;\n\t\t\t\t$oFCKeditor[$k] = new FCKeditor($name) ;\n\t\t\t\t$oFCKeditor[$k]->BasePath\t= '../libraries/wysiwyg_editor/' ;\n\t\t\t\t$oFCKeditor[$k]->Value\t\t= stripslashes(@$value);\n\t\t\t\t$oFCKeditor[$k]->Width = $size;\n\t\t\t\t$oFCKeditor[$k]->Height = $rows;\n\t\t\t\t$oFCKeditor[$k]->Create() ;\n\t\t\t}\n\t\t}else{\n\t\t\tif($name == 'price' || $name=='price_old'|| $name=='discount'){\n\t\t\t\tif($value)\n\t\t\t\t echo'<input type=\"text\" class=\"form-control\" name=\"'.$name.'\" id=\"'.$name.'\" value=\"'.format_money($value,'').'\" size=\"'.$size.'\"/>';\n\t\t\t\telse\n\t\t\t\t\t echo '<input type=\"text\" class=\"form-control\" name=\"'.$name.'\" id=\"'.$name.'\" value=\"'.htmlspecialchars($value).'\" size=\"'.$size.'\"/>';\n\t\t\t}else{\n\t\t\t\t\techo '<input type=\"text\" class=\"form-control\" name=\"'.$name.'\" id=\"'.$name.'\" value=\"'.htmlspecialchars($value).'\" size=\"'.$size.'\"/>'; \t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif($sub_item)\n\t\t\techo $sub_item;\n\t\tif($comment)\n\t\t\techo '<p class=\"help-block\">'.$comment.'</p>';\n\t\techo '</div></div>';\n //echo $html;\n\t}", "public function edit(Conta $conta)\n {\n //\n }", "function setTextEditor(&$t, $auto_editor, $form_field='', $full_page=false)\r\n\t{\r\n\r\n\t\t global $CONFIG, $general_strings;\r\n\r\n\t\t $browser=browser_get_agent();\r\n\t\t if (($browser['agent']=='IE' && $browser['version']>=5.5 && $browser['platform']=='Win') || $browser['gecko_version']>='20030210' \r\n//Safari still too useless... and it hangs when you try to drag an image around.. test again after build 420 is out.\r\n//\t\t|| ($browser['agent']=='SAFARI' && $browser['version']>=420)\r\n\t\t){\r\n\r\n\t\t\t$init_ed=\"init_editor('\".$form_field.\"','Editor2', {});\";\r\n\r\n\t\t\tif(strpos($t->get_var('SCRIPT_EDITOR'),'dojo_ed.js')===false) {\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/dojo/dojo_ed.js?v2\"></script>',true);\r\n\t\t\t}\r\n\r\n\t\t\tif ($auto_editor && $form_field) {\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\">',true);\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR',\r\n\t\t\t\t\t'dojo.addOnLoad(function() {'.$init_ed.'});',true);\r\n\t\t\t\t$t->set_var('SCRIPT_EDITOR','</script>',true);\r\n\r\n\t\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'');\r\n\t\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,''); //hidden?\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,'');\r\n\t\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<span class=\"ed_button\" id=\"button_for_'.$form_field.'\"><input type=\"button\" name=\"Button\" value=\"'.$general_strings['easy_edit'].'\" class=\"small\" onClick=\"'.$init_ed.'\"></span>');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$t->set_var('EDITOR_STYLE_'.$form_field,'');\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<div class=\"ed_button\"><input type=\"button\" name=\"link\" value=\"'.$general_strings['insert_link'].'\" class=\"small\" onClick=\"make_link(\\''.$form_field.'\\')\"/>\r\n<input type=\"button\" name=\"elink\" value=\"'.$general_strings['email_link'].'\" class=\"small\" onClick=\"make_email_link(\\''.$form_field.'\\')\" /> \r\n<input type=\"button\" value=\"'.$general_strings['preview'].'\" name=\"preview\" class=\"small\" onClick=\"display_html(\\''.$form_field.'\\')\"/> \r\n<input type=\"button\" name=\"Italics\" value=\"'.$general_strings['italic_abb'].'\" class=\"small\" style=\"font-style:italic\" onClick=\"make_italics(\\''.$form_field.'\\')\" /> \r\n<input type=\"button\" name=\"Bols\" value=\"'.$general_strings['bold_abb'].'\" class=\"small\" style=\"font-weight:bold\" onClick=\"make_bold(\\''.$form_field.'\\')\"/> ');\r\n\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'<input type=\"button\" name=\"image\" value=\"'.$general_strings['add_image'].'\" class=\"small\" onClick=\"get_image(\\''.$CONFIG['PATH'].'\\',\\''.$form_field.'\\');\" />',true);\r\n\r\n\t\t\tif (!($t->get_var('SCRIPT_EDITOR'))) {\r\n// \t\t\t\t$t->set_var('SCRIPT_EDITOR','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/popups/popup.js\" ></script>\r\n// \t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/use_dialogs.js\" ></script>', true);\r\n\r\n\t\t\t\t$t->set_var('SCRIPT_INCLUDES','<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/popups/popup.js\" ></script>\r\n\t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/dialogs.js\" ></script>\r\n\t\t\t\t<script type=\"text/javascript\" language=\"javascript\" src=\"'.$CONFIG['PATH'].'/includes/editor/use_dialogs.js\" ></script>\r\n\t\t\t\t', true);\r\n\t\t\t}\r\n\t\t\t$t->set_var('EDITOR_BUTTONS_'.$form_field,'</div>',true);\r\n\t\t}\r\n\t\treturn true;\r\n\t\r\n\t}", "function drum_beat_add_editor_styles() {\n add_editor_style( 'assets/stylesheets/wysiwyg-style.css' );\n}", "function callback_wysiwyg(array $args)\n {\n }", "public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }", "public function editRegularContentFromId() {}", "public function edit(){\n $carros = array();\n\n $nomes[] = 'Astra';\n $nomes[] = 'Caravan';\n $nomes[] = 'Ipanema';\n $nomes[] = 'Kadett';\n $nomes[] = 'Monza';\n $nomes[] = 'Opala';\n $nomes[] = 'Veraneio';\n\n $this->set('carros',$nomes);\n }", "function create_editor($id,$value='',$config=array()){\n include_once \"Public/Admin/Ckeditor/ckeditor.php\";\n // Create a class instance.\n $CKEditor = new CKEditor( 'http://' . $_SERVER['HTTP_HOST'] . PROJECT_RELATIVE_PATH . '/Public/Admin/Ckeditor/');\n // Path to the CKEditor directory, ideally use an absolute path instead of a relative dir.\n // $CKEditor->basePath = '/ckeditor/'\n // If not set, CKEditor will try to detect the correct path.\n\n // Replace a textarea element with an id (or name) of \"editor1\".\n\n $_config['filebrowserBrowseUrl'] = PROJECT_RELATIVE_PATH . '/Public/Admin/Ckfinder/ckfinder.html';\n $_config['filebrowserImageBrowseUrl'] = PROJECT_RELATIVE_PATH . '/Public/Admin/Ckfinder/ckfinder.html?Type=Images';\n //$_config['filebrowserUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';\n //$_config['filebrowserImageUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';\n if(!empty($config)){\n $_config = array_merge($_config,$config);\n }\n $CKEditor->editor(\"describe\",$value,$_config);\n //$CKEditor->replace(\"describe\");\n }", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit() {\n\t\t\t\n\t\t}", "public function edit()\n\t{\n\t\t\n\t}", "function uultra_get_me_wphtml_editor($meta, $content)\r\n\t{\r\n\t\tob_start();\r\n\t\t\r\n\t\t$editor_id = $meta;\t\t\t\t\r\n\t\t$editor_settings = array('media_buttons' => false , 'textarea_rows' => 40 , 'teeny' =>true, 'tinymce' => array( 'height' => 300 )); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\twp_editor( $content, $editor_id , $editor_settings);\r\n\t\t\r\n\t\t// Store the contents of the buffer in a variable\r\n\t\t$editor_contents = ob_get_clean();\r\n\t\t\r\n\t\t// Return the content you want to the calling function\r\n\t\treturn $editor_contents;\r\n\t\t\t\r\n\t}", "function form_editor($setting = '')\r\n{\r\n $t = isset($setting['type']) ? $setting['type'] : 1;\r\n $w = isset($setting['width']) ? $setting['width'] : '100';\r\n $h = isset($setting['height']) ? $setting['height'] : '300';\r\n return '\r\n <table width=\"98%\" cellspacing=\"1\" cellpadding=\"2\">\r\n <tbody>\r\n\t<tr> \r\n <td width=\"100\">宽度 :</td>\r\n <td><input type=\"text\" class=\"input-text\" size=\"10\" value=\"' . $w . '\" name=\"setting[width]\">\r\n <font color=\"gray\">%</font>\r\n </td>\r\n </tr>\r\n <tr> \r\n <td>高度 :</td>\r\n <td><input type=\"text\" class=\"input-text\" size=\"10\" value=\"' . $h . '\" name=\"setting[height]\">\r\n <font color=\"gray\">px</font>\r\n </td>\r\n </tr>\r\n <tr> \r\n <td>类型 :</td> \r\n <td>\r\n <input type=\"radio\" value=2 name=\"setting[type]\"' . ($t == 2 ? 'checked' : '') . '> CKEditor&nbsp;&nbsp;&nbsp;&nbsp;\r\n <input type=\"radio\" value=1 name=\"setting[type]\" ' . ($t == 1 ? 'checked' : '') . '> 完整模式&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t <input type=\"radio\" value=0 name=\"setting[type]\"' . ($t == 0 ? 'checked' : '') . '> 精简模式\t \r\n </td>\r\n </tr>\r\n\t<tr> \r\n <td>默认值 :</td>\r\n <td><textarea name=\"setting[default]\" rows=\"2\" cols=\"30\" class=\"text\">' . (isset($setting['default']) ? $setting['default'] : '') . '</textarea></td>\r\n </tr>\r\n </tbody>\r\n\t</table>';\r\n}", "function load_asset_form ()\n {\n $this->load->helper('url'); //You should autoload this one ;)\n $this->load->helper('ckeditor');\n \n \n //Ckeditor's configuration\n $this->ck_data['ckeditor'] = array(\n \n //ID of the textarea that will be replaced\n 'id' => 'ck_content',\n 'path' => 'ckeditor/ckeditor.js',\n \n //Optionnal values\n 'config' => array(\n 'toolbar' => \"Full\", //Using the Full toolbar\n 'width' => \"550px\", //Setting a custom width\n 'height' => '100px', //Setting a custom height\n \n ),\n \n //Replacing styles from the \"Styles tool\"\n 'styles' => array(\n \n //Creating a new style named \"style 1\"\n 'style 1' => array (\n 'name' => 'Blue Title',\n 'element' => 'h2',\n 'styles' => array(\n 'color' => 'Blue',\n 'font-weight' => 'bold'\n )\n ),\n \n //Creating a new style named \"style 2\"\n 'style 2' => array (\n 'name' => 'Red Title',\n 'element' => 'h2',\n 'styles' => array(\n 'color' => 'Red',\n 'font-weight' => 'bold',\n 'text-decoration' => 'underline'\n )\n ) \n )\n );\n \n $this->ck_data['ckeditor_2'] = array(\n \n //ID of the textarea that will be replaced\n 'id' => 'ck_content_2',\n 'path' => 'ckeditor/ckeditor.js',\n \n //Optionnal values\n 'config' => array(\n 'toolbar' => \"Full\", //Using the Full toolbar\n 'width' => \"550px\", //Setting a custom width\n 'height' => '100px', //Setting a custom height\n \n ),\n \n //Replacing styles from the \"Styles tool\"\n 'styles' => array(\n \n //Creating a new style named \"style 1\"\n 'style 1' => array (\n 'name' => 'Blue Title',\n 'element' => 'h2',\n 'styles' => array(\n 'color' => 'Blue',\n 'font-weight' => 'bold'\n )\n ),\n \n //Creating a new style named \"style 2\"\n 'style 2' => array (\n 'name' => 'Red Title',\n 'element' => 'h2',\n 'styles' => array(\n 'color' => 'Red',\n 'font-weight' => 'bold',\n 'text-decoration' => 'underline'\n )\n ) \n )\n );\n \n }", "public function contato() {\n $this->load_template('contato');\n }", "function adding()\n\t{\n\t\tglobal $template, $mod_loader, $security, $lang_loader;\n\t\t\n\t\t// get the editor\n\t\t$mods = $mod_loader->getmodule( 'editor', MOD_FETCH_NAME, NOT_ESSENTIAL );\n\t\t$mod_loader->port_vars( array( 'name' => 'editor1', 'quickpost' => FALSE ) );\n\t\t$mod_loader->execute_modules( 0, 'show_editor' );\n\t\t$page = $mod_loader->get_vars( array( 'editor_HTML', 'editor_WYSIWYG' ) );\n\t\t\n\t\t// construct the language selection list\n\t\t$langl = $lang_loader->get_langlist();\n\t\t$langs = '<select name=\"language\">';\n\t\tfor ( $i = 0; $i < count( $langl ); $langs .= '<option>' . $langl[ $i ] . '</option>',$i++ );\n\t\t$langs .= '</select>';\n\t\t\n\t\t// construct the auth selection list :)\n\t\t$auth2 = '<select name=\"auth\">';\n\t\t$s[ 0 ] = ( $auth == GUEST ) ? 'selected' : '';\n\t\t$s[ 1 ] = ( $auth == INACTIVE ) ? 'selected' : '';\n\t\t$s[ 2 ] = ( $auth == ADMIN ) ? 'selected' : '';\n\t\t$s[ 3 ] = ( $auth == SUPER_MOD ) ? 'selected' : '';\n\t\t$s[ 4 ] = ( $auth == MOD ) ? 'selected' : '';\n\t\t$s[ 5 ] = ( $auth == USER ) ? 'selected' : '';\n\t\t$auth2 .= '<option value=\"' . GUEST . '\" ' . $s[ 0 ] . '>' . $this->lang[ 'Guest' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . INACTIVE . '\" ' . $s[ 1 ] . '>' . $this->lang[ 'Inactive' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . ADMIN . '\" ' . $s[ 2 ] . '>' . $this->lang[ 'Admin' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . SUPER_MOD . '\" ' . $s[ 3 ] . '>' . $this->lang[ 'Super_mod' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . MOD . '\" ' . $s[ 4 ] . '>' . $this->lang[ 'Mod' ] . '</option>';\n\t\t$auth2 .= '<option value=\"' . USER . '\" ' . $s[ 5 ] . '>' . $this->lang[ 'User' ] . '</option>';\n\t\t$auth2 .= '</select>';\n\t\t\n\t\t$template->assign_block_vars( 'add', '', array(\n\t\t\t'L_TITLE' => $this->lang[ 'Add_title' ],\n\t\t\t'L_EXPLAIN' => $this->lang[ 'Add_explain' ],\n\t\t\t'L_TITLE2' => $this->lang[ 'Add_title' ],\n\t\t\t'L_LANGUAGE' => $this->lang[ 'Add_language' ],\n\t\t\t'L_AUTH' => $this->lang[ 'Add_auth' ],\n\t\t\t\n\t\t\t'S_FORM_ACTION' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_pages&s=add_bar' ),\n\t\t\t'S_PAGE' => $page[ 'editor_HTML' ],\n\t\t\t'S_WYSIWYG' => $page[ 'editor_WYSIWYG' ],\n\t\t\t'S_MODE' => 'create',\n\t\t\t'S_LANGS' => $langs,\n\t\t\t'S_AUTH' => $auth2,\n\t\t) );\n\t\t\n\t\t$template->assign_switch( 'add', TRUE );\n\t}", "public function create()\n\t{\n\t\treturn view('editor')->with('action', 'save');\n\t}", "public function buscar(){\t\t\n\t\treturn view('emitente.editar');\n\t}", "private function addEditFormAfterContent() {\n\t\t// this div is opened when encapsulating the default editor in addEditFormBeforeContent.\n\t\treturn '</div><div style=\"clear: both\"></div>';\n\t}", "public function create()\n {\n $data = $this->model;\n\n return view('cms.editor', compact('data'));\n }", "public function edit_toko(){\n\t}", "function getContent() ;", "function botSpawEditorArea($name, $content, $hiddenField, $width, $height, $col, $row) {\n\trequire_once(dirname(__FILE__) . \"/spaw/spaw.inc.php\");\n\t$sw = new SpawEditor($hiddenField, html_entity_decode($content, ENT_QUOTES));\n\t$sw->show();\n}", "protected function EditorInit()\r\n\t{\r\n\t\t$editor = \t'<script type=\"text/javascript\" src=\"application/controls/tinymce/jscripts/tiny_mce/tiny_mce.js\"></script>'.NEW_LINE.\r\n\t\t\t\t\t'<script type=\"text/javascript\"> '.NEW_LINE.\r\n\t\t\t\t\t'\ttinyMCE.init({'.NEW_LINE.\r\n\t\t\t\t\t'\t\t// General options'.NEW_LINE.\r\n\t\t\t\t\t'\t\tmode : \"textareas\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme : \"advanced\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\tplugins : \"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups\",'.NEW_LINE.\r\n\t\t\t\t\t\r\n\t\t\t\t\t'\t\t// Theme options'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons1 : \"save,newdocument,|,cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,cleanup,code,iespell,|,preview,template,fullscreen\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons2 : \"bold,italic,underline,strikethrough,sub,sup,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,forecolor,backcolor,|,removeformat,visualaid\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons3 : \"tablecontrols,|,insertdate,inserttime,|,charmap,media,image,advhr,|,link,unlink,anchor\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_buttons4 : \"formatselect,|,fontselect,|,fontsizeselect,|,del,ins,|,ltr,rtl,visualchars,nonbreaking,pagebreak\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_toolbar_location : \"top\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_toolbar_align : \"left\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_statusbar_location : \"bottom\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttheme_advanced_resizing : true,'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Example word content CSS (should be your site CSS) this one removes paragraph margins'.NEW_LINE.\r\n\t\t\t\t\t'\t\tcontent_css : \"/includes/word.css\",'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Drop lists for link/image/media/template dialogs'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttemplate_external_list_url : \"lists/template_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\texternal_link_list_url : \"lists/link_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\texternal_image_list_url : \"lists/image_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\tmedia_external_list_url : \"lists/media_list.js\",'.NEW_LINE.\r\n\t\t\t\t\t \r\n\t\t\t\t\t'\t\t// Replace values for the template plugin'.NEW_LINE.\r\n\t\t\t\t\t'\t\ttemplate_replace_values : {'.NEW_LINE.\r\n\t\t\t\t\t'\t\t\tusername : \"Some User\",'.NEW_LINE.\r\n\t\t\t\t\t'\t\t\tstaffid : \"991234\"'.NEW_LINE.\r\n\t\t\t\t\t'\t\t}'.NEW_LINE.\r\n\t\t\t\t\t'\t});'.NEW_LINE.\r\n\t\t\t\t\t'</script>'.NEW_LINE;\r\n\t\t\r\n\t\treturn $editor;\r\n\t}", "function _setContent()\r\n {\r\n global $_FRONTEND_LANGID;\r\n\r\n $this->_objTpl->addBlockfile('FILEBROWSER_CONTENT', 'fileBrowser_content', 'module_fileBrowser_content.html');\r\n\r\n $ckEditorFuncNum = isset($_GET['CKEditorFuncNum']) ? '&amp;CKEditorFuncNum='.contrexx_raw2xhtml($_GET['CKEditorFuncNum']) : '';\r\n $ckEditor = isset($_GET['CKEditor']) ? '&amp;CKEditor='.contrexx_raw2xhtml($_GET['CKEditor']) : '';\r\n $rowNr = 0;\r\n\r\n switch ($this->_mediaType) {\r\n case 'webpages':\r\n $jd = new \\Cx\\Core\\Json\\JsonData();\r\n $data = $jd->data('node', 'getTree', array('get' => array('recursive' => 'true')));\r\n $pageStack = array();\r\n $ref = 0;\r\n $data['data']['tree'] = array_reverse($data['data']['tree']);\r\n foreach ($data['data']['tree'] as &$entry) {\r\n $entry['attr']['level'] = 0;\r\n array_push($pageStack, $entry);\r\n }\r\n while (count($pageStack)) {\r\n $entry = array_pop($pageStack);\r\n $page = $entry['data'][0];\r\n $arrPage['level'] = $entry['attr']['level'];\r\n $arrPage['node_id'] = $entry['attr']['rel_id'];\r\n $children = $entry['children'];\r\n $children = array_reverse($children);\r\n foreach ($children as &$entry) {\r\n $entry['attr']['level'] = $arrPage['level'] + 1;\r\n array_push($pageStack, $entry);\r\n }\r\n $arrPage['catname'] = $page['title'];\r\n $arrPage['catid'] = $page['attr']['id'];\r\n $arrPage['lang'] = BACKEND_LANG_ID;\r\n $arrPage['protected'] = $page['attr']['protected'];\r\n $arrPage['type'] = \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_CONTENT;\r\n $arrPage['alias'] = $page['title'];\r\n $arrPage['frontend_access_id'] = $page['attr']['frontend_access_id'];\r\n $arrPage['backend_access_id'] = $page['attr']['backend_access_id'];\r\n \r\n // JsonNode does not provide those\r\n //$arrPage['level'] = ;\r\n //$arrPage['type'] = ;\r\n //$arrPage['parcat'] = ;\r\n //$arrPage['displaystatus'] = ;\r\n //$arrPage['moduleid'] = ;\r\n //$arrPage['startdate'] = ;\r\n //$arrPage['enddate'] = ;\r\n \r\n // But we can simulate level and type for our purposes: (level above)\r\n $jsondata = json_decode($page['attr']['data-href']);\r\n $path = $jsondata->path;\r\n if (trim($jsondata->module) != '') {\r\n $arrPage['type'] = \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_APPLICATION;\r\n $module = explode(' ', $jsondata->module, 2);\r\n $arrPage['modulename'] = $module[0];\r\n if (count($module) > 1) {\r\n $arrPage['cmd'] = $module[1];\r\n }\r\n }\r\n \r\n $url = \"'\" . '[[' . \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::PLACEHOLDER_PREFIX;\r\n \r\n// TODO: This only works for regular application pages. Pages of type fallback that are linked to an application\r\n// will be parsed using their node-id ({NODE_<ID>})\r\n if (($arrPage['type'] == \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_APPLICATION) && ($this->_mediaMode !== 'alias')) {\r\n $url .= $arrPage['modulename'];\r\n if (!empty($arrPage['cmd'])) {\r\n $url .= '_' . $arrPage['cmd'];\r\n }\r\n \r\n $url = strtoupper($url);\r\n } else {\r\n $url .= $arrPage['node_id'];\r\n }\r\n \r\n // if language != current language or $alwaysReturnLanguage\r\n if ($this->_frontendLanguageId != $_FRONTEND_LANGID ||\r\n (isset($_GET['alwaysReturnLanguage']) &&\r\n $_GET['alwaysReturnLanguage'] == 'true')) {\r\n $url .= '_' . $this->_frontendLanguageId;\r\n }\r\n $url .= \"]]'\";\r\n \r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"javascript:{setUrl($url,null,null,'\".\\FWLanguage::getLanguageCodeById($this->_frontendLanguageId).$path.\"','page')}\",\r\n 'FILEBROWSER_FILE_NAME' => $arrPage['catname'],\r\n 'FILEBROWSER_FILESIZE' => '&nbsp;',\r\n 'FILEBROWSER_FILE_ICON' => $this->_iconPath.'htm.png',\r\n 'FILEBROWSER_FILE_DIMENSION' => '&nbsp;',\r\n 'FILEBROWSER_SPACING_STYLE' => 'style=\"margin-left: '.($arrPage['level'] * 15).'px;\"',\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n \r\n $rowNr++;\r\n }\r\n break;\r\n case 'Media1':\r\n case 'Media2':\r\n case 'Media3':\r\n case 'Media4':\r\n \\Permission::checkAccess(7, 'static'); //Access Media-Archive\r\n \\Permission::checkAccess(38, 'static'); //Edit Media-Files\r\n \\Permission::checkAccess(39, 'static'); //Upload Media-Files\r\n\r\n //Hier soll wirklich kein break stehen! Beabsichtig!\r\n \r\n \r\n default:\r\n if (count($this->_arrDirectories) > 0) {\r\n foreach ($this->_arrDirectories as $arrDirectory) {\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"index.php?cmd=FileBrowser&amp;standalone=true&amp;langId={$this->_frontendLanguageId}&amp;type={$this->_mediaType}&amp;path={$arrDirectory['path']}\". $ckEditor . $ckEditorFuncNum,\r\n 'FILEBROWSER_FILE_NAME' => $arrDirectory['name'],\r\n 'FILEBROWSER_FILESIZE' => '&nbsp;',\r\n 'FILEBROWSER_FILE_ICON' => $arrDirectory['icon'],\r\n 'FILEBROWSER_FILE_DIMENSION' => '&nbsp;',\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n $rowNr++;\r\n }\r\n }\r\n \r\n if (count($this->_arrFiles) > 0) {\r\n $arrEscapedPaths = array();\r\n foreach ($this->_arrFiles as $arrFile) {\r\n $arrEscapedPaths[] = contrexx_raw2encodedUrl($arrFile['path']);\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_ROW_STYLE'\t\t\t\t=> in_array($arrFile['name'], $this->highlightedFiles) ? ' style=\"background: '.$this->highlightColor.';\"' : '',\r\n 'FILEBROWSER_FILE_PATH_DBLCLICK' => \"setUrl('\".contrexx_raw2xhtml($arrFile['path']).\"',\".$arrFile['width'].\",\".$arrFile['height'].\",'')\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"javascript:{showPreview(\".(count($arrEscapedPaths)-1).\",\".$arrFile['width'].\",\".$arrFile['height'].\")}\",\r\n 'FILEBROWSER_FILE_NAME' => contrexx_stripslashes($arrFile['name']),\r\n 'FILEBROWSER_FILESIZE' => $arrFile['size'].' KB',\r\n 'FILEBROWSER_FILE_ICON' => $arrFile['icon'],\r\n 'FILEBROWSER_FILE_DIMENSION' => (empty($arrFile['width']) && empty($arrFile['height'])) ? '' : intval($arrFile['width']).'x'.intval($arrFile['height'])\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n $rowNr++;\r\n }\r\n \r\n $this->_objTpl->setVariable('FILEBROWSER_FILES_JS', \"'\".implode(\"','\",$arrEscapedPaths).\"'\");\r\n }\r\n if (array_key_exists($this->_mediaType, $this->mediaTypePaths)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_IMAGE_PATH', $this->mediaTypePaths[$this->_mediaType][1]);\r\n } else {\r\n $this->_objTpl->setVariable('FILEBROWSER_IMAGE_PATH', ASCMS_CONTENT_IMAGE_WEB_PATH);\r\n }\r\n break;\r\n }\r\n $this->_objTpl->parse('fileBrowser_content');\r\n }", "public function visualizar(){\n\t\n\t\tset_tema('titulo', 'Visualizar de Coment&aacute;rio');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'visualizar'));\n\t\tload_template();\n\t}", "public function Documentos()\r\n\t\t{\r\n\t\t\t\r\n\t\t}", "function editor($path,$width) {\r\n $this->load->library('ckeditor');\r\n $this->load->library('ckFinder');\r\n //configure base path of ckeditor folder \r\n $this->ckeditor->basePath = base_url().'public/admin/js/ckeditor/';\r\n $this->ckeditor-> config['toolbar'] = 'Full';\r\n $this->ckeditor->config['language'] = 'en';\r\n $this->ckeditor-> config['width'] = $width;\r\n //configure ckfinder with ckeditor config \r\n $this->ckfinder->SetupCKEditor($this->ckeditor,$path); \r\n }", "public function add_content() {\n $data['title'] = translate('add') . \" \" . translate('content_management');\n $this->load->view('admin/master/add_update_content', $data);\n }", "function ffw_port_rich_editor_callback( $args ) {\n global $ffw_port_settings, $wp_version;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n if ( $wp_version >= 3.3 && function_exists( 'wp_editor' ) ) {\n $html = wp_editor( stripslashes( $value ), 'ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']', array( 'textarea_name' => 'ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']' ) );\n } else {\n $html = '<textarea class=\"large-text\" rows=\"10\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';\n }\n\n $html .= '<br/><label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "public function renderQuickEdit() {}", "public function getEditorName();", "public function run()\n {\n //\n $editorList = config('editors');\n\n foreach ($editorList as $editor) {\n $neweditor = new Editor();\n $neweditor->name = $editor['name'];\n $neweditor->lastName = $editor['lastName'];\n $neweditor->save();\n }\n }", "public function editAction()\n {\n $traineedocId = $this->getRequest()->getParam('id');\n $traineedoc = $this->_initTraineedoc();\n if ($traineedocId && !$traineedoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_traineedoc')->__('This trainee document no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getTraineedocData(true);\n if (!empty($data)) {\n $traineedoc->setData($data);\n }\n Mage::register('traineedoc_data', $traineedoc);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_traineedoc')->__('Trainee Document'))\n ->_title(Mage::helper('bs_traineedoc')->__('Trainee Document'));\n if ($traineedoc->getId()) {\n $this->_title($traineedoc->getTraineeDocName());\n } else {\n $this->_title(Mage::helper('bs_traineedoc')->__('Add trainee document'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "function editor_element($params)\n {\n $params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n $params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n $params['content'] \t = NULL; //remove to allow content elements\n\n return $params;\n }", "function uultra_get_addlink_html_form($meta, $content)\r\n\t{\r\n\t\tob_start();\r\n\t\t\r\n\t\t$editor_id = $meta;\t\t\t\t\r\n\t\t$editor_settings = array('media_buttons' => false , 'textarea_rows' => 40 , 'teeny' =>true, 'tinymce' => array( 'height' => 300 ), 'quicktags' => false); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\twp_editor( $content, $editor_id , $editor_settings);\r\n\t\t\r\n\t\t// Store the contents of the buffer in a variable\r\n\t\t$editor_contents = ob_get_clean();\r\n\t\t\r\n\t\t// Return the content you want to the calling function\r\n\t\treturn $editor_contents;\r\n\t\t\t\r\n\t}", "public function outputPageComposerEditor($key, $content);", "public function edit()\n {\n return \"Ini Halaman Edit\";\n }", "function editor_styles() {\n\n\tadd_editor_style( 'assets/css/editor-style.css' );\n\n}", "function dokuwysiwyg_edit_meta(&$event)\n {\n global $ACT;\n\n // we only change the edit behaviour\n if (!in_array($ACT, array('recover', 'edit', 'preview'))){\n return;\n }\n\n global $lang;\n global $ID;\n \n $this->init();\n $event->data['script'][] = \n array( \n 'type' =>'text/javascript', \n 'charset' =>'utf-8', \n '_data' =>'',\n 'src' => $this->fck_location. '/fckeditor.js?rev='.self::getSCID()\n );\n\n $event->data['script'][] = \n array( \n 'type'=>'text/javascript', \n 'charset'=>'utf-8', \n '_data'=>'',\n 'src'=> $this->fck_location. '/../jquery-1.3.2.min.js'\n );\n\n $event->data['script'][] = \n array( \n 'type'=>'text/javascript', \n 'charset'=>'utf-8', \n '_data'=>'',\n 'src'=> $this->fck_location. '/../edit.js?rev='.self::getSCID()\n );\n\n $toolbar = 'Default';\n $snippets = @plugin_load('helper', 'snippets');\n if ($snippets && !plugin_isdisabled('snippets')) {\n $toolbar = 'WithSnippets';\n }\n\n $event->data['script'][] = \n // the $lang['plugin']['js'] is not used on purpose\n array( \n 'type'=>'text/javascript', \n 'charset'=>'utf-8', \n '_data'=>\"\n\n jQuery.noConflict();\n\n var dokuwysiwyg_lang = \n {\n btn_save:'{$lang['btn_save']}',\n btn_cancel:'{$lang['btn_cancel']}',\n btn_wikisyntax: 'Wikisyntax',\n summary:'{$lang['summary']}',\n label_discussion:'\".$this->getLang('discussion').\"',\n label_nocache:'\".$this->getLang('nocache').\"',\n label_notoc:'\".$this->getLang('notoc').\"'\n };\n var ID = '$ID';\n var dokuwysiwyg_link_protocols = '\".$this->getConf('link_protocols').\"';\n var dokuwysiwyg_dicussion_plugin_active = \".((@plugin_load('action','discussion') && !plugin_isdisabled('discussion'))?'true':'false').\";\n var separate_page_title = \". ($this->getConf('separate_page_title')?'true':'false') .\";\n var dokuwysiwyg_default_wysiwyg = \". ($this->getConf('default_wysiwyg')?'true':'false') .\";\n var dokuwysiwyg_toolbar = '$toolbar';\n var DOKU_REL = '\".DOKU_REL.\"';\n \"\n );\n return;\n }", "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}", "function affiche_form_edition($content,$idCom,$idPost)\r\n{\r\n\tif(isset($_SESSION['id']))\r\n\t{\r\n\t\tif(isadmin($_SESSION['id']))\r\n\t\t{\r\n\t\t\techo \"<form name='edit_com' action='controller/actions.php' method='post'>\";\r\n\t\t\t\techo \"<textarea name='commentaire' cols='50' row='30'>\".$content.\"</textarea></br>\";\r\n\t\t\t\techo \"<input name='id_com' type='hidden' value='\".$idCom.\"'/>\";\r\n\t\t\t\techo \"<input name='action' value='Editer com' type='submit'/>\";\r\n\t\t\t\techo \"<input type='hidden' name='url' value='?page=article&POST_ID=\".$idPost.\"'/>\";\r\n\t\t\techo \"</form>\";\r\n\t\t}\r\n\t}\r\n}", "public function modifier() {\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->update($abonnement);\n $this->handleStatus('Abonnement modifié avec succès.');\n }\n $url = explode('/', $_GET['url']);\n $id = $url[2];\n $this->loadView('modifier', 'content');\n $abonnement = $this->em->selectById('abonnement', $id); //var_dump($abonnement); exit;\n $this->dom->getElementById('id')->value = $abonnement->getId();\n $this->dom->getElementById('numero')->value = $abonnement->getNumero();\n $this->dom->getElementById('date')->value = $abonnement->getDate();\n $this->dom->getElementById('description')->innertext = $abonnement->getDescription();\n \n \n $arrClient = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arrClient as $entity) {\n if($entity->getId()==$abonnement->getIdClient()){\n $selected = 'selected';\n }\n else{\n $selected = '';\n }\n $optionsClient .= '<option value=\"' . $entity->getId() . '\" ' . $selected . '>' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n \n $arrCompteur = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arrCompteur as $entity) {\n if($entity->getId()==$abonnement->getIdCompteur()){\n $selected = 'selected';\n }\n else{\n $selected = '';\n }\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\" ' . $selected . '>' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n }", "abstract public function get_editor_options();", "function editor($path, $width) {\n\n $this->load->library('ckeditor');\n\n $this->load->library('ckfinder');\n\n //configure base path of ckeditor folder \n\n $this->ckeditor->basePath = base_url('assets/plugins/ckeditor/');\n\n $this->ckeditor->config['toolbar'] = 'Full';\n\n $this->ckeditor->config['language'] = 'es';\n\n $this->ckeditor->config['width'] = $width;\n\n //configure ckfinder with ckeditor config \n\n $this->ckfinder->SetupCKEditor($this->ckeditor, $path);\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 render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t</label>\n\t\t\t<div class=\"wds-customize-text-editor\">\n\t\t\t\t<?php\n\t\t\t\t// Setttings for the editor.\n\t\t\t\t$settings = array(\n\t\t\t\t\t'textarea_name' => $this->id,\n\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t'media_buttons' => true,\n\t\t\t\t);\n\n\t\t\t\t// Add the editor.\n\t\t\t\twp_editor( $this->value(), $this->id, $settings );\n\n\t\t\t\t// Only enqueue scripts once.\n\t\t\t\tif ( 0 === self::$count ) {\n\t\t\t\t\t$this->enqueue_scripts();\n\t\t\t\t}\n\n\t\t\t\t// add the footer scripts.\n\t\t\t\t$this->add_footer_scripts();\n\n\t\t\t\t// Increment count.\n\t\t\t\t++self::$count;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function silo_contents()\n\t{\n\t}", "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 }", "function markdown_editor_page() {\n$plugin_dir = plugin_dir_url( __FILE__ );\n\n\t?>\n\n<style>\n\n.editormd-preview-close-btn {\n display: none;\n}\n\n#right ul {\n list-style: initial !important;\n}\n\n#left ul {\n list-style: none !important;\n}\n\n.editormd-form label {\n float: left !important;\n display: block !important;\n width: 65px !important;\n text-align: left !important;\n padding: 7px 0 15px 5px !important;\n margin: 0 0 2px !important;\n font-weight: normal !important;\n}\n\n#left {\n float: left;\n width: 10%;\n}\n\n#right {\n overflow: hidden;\n}\n</style>\n<div class=\"wrap\">\n \n<h1>Markdown Files <span style=\"color:#026440; cursor: pointer;\" onclick=\"location.reload();\"><i class=\"fas fa-plus-circle\"></i></span></h1>\n\n<?php\n\n$WP_PATH = implode(\"/\", (explode(\"/\", $_SERVER[\"PHP_SELF\"], -4)));\n\n//Temporary addition of web for dev environment\n$path = $_SERVER['DOCUMENT_ROOT'].$WP_PATH.'/app/helptext/content/pages/';\n\n$files = scandir($path);\n?>\n<a href=\"<?php echo $plugin_dir ?>scripts/zip.php\">Download Zip of Markdown Files</a> | <a href=\"<?php echo $plugin_dir ?>scripts/json.php\">File Listing</a> \n<br /><br />\n <div id=\"left\">\n<ul>\n<li><i class='fas fa-folder'></i> <a href='#' id='edit-folder-index' class='edit_page'><strong>index.md</strong></a></li>\n</ul>\n<ul style=\"padding-left: 15px;\">\n<?php\n$i = 0;\nforeach ($files as &$value) {\n$i++;\nif(strpos($value, '.md') !== false){\n if($value == 'index.md'){\n echo \"<li><i class='fas fa-folder-open'></i> <a href='#' id='edit-\".$i.\"' class='edit_page'>\".$value.\"</a></li>\";\n } else {\n echo \"<li><i class='fas fa-folder-open'></i> <a href='#' id='edit-\".$i.\"' class='edit_page'>\".$value.\"</a> <span style='color:#d63638; cursor: pointer;' id='delete-\".$i.\"' class='delete_page' title='\".$value.\"'><i class='fas fa-trash-alt'></i></span></li>\";\n }\n}\n\n}\n?>\n</ul>\n </div>\n <div id=\"right\">\n\n<form id=\"create_form\">\n <input type=\"submit\" value=\"Create New\" style=\"float:right;\">\n <label for=\"fname\">Filename:</label>\n <input type=\"text\" id=\"fname\" name=\"fname\"><br /><br />\n \n<div id=\"create_new\">\n <textarea style=\"display:none;\" id=\"mdeditor\"></textarea>\n</div>\n\n</form>\n\n </div>\n\n</div>\n\n<script src=\"<?php echo $plugin_dir; ?>/asset/editormd.min.js\"></script>\n<script src=\"<?php echo $plugin_dir; ?>/asset/languages/en.js\"></script>\n\n<script type=\"text/javascript\">\n jQuery(function() {\n\njQuery('selectorForYourElement').css('display', 'none');\n \n var editor = editormd(\"create_new\", {\n width : \"100%\",\n height : \"500px\",\n //emoji : true, \n path : \"<?php echo $plugin_dir; ?>/asset/lib/\"\n });\n \njQuery(\".edit_page\").click(function() {\n\nvar id = jQuery(this).attr('id');\n\nif(id == 'edit-folder-index') {\njQuery(\"#right\").load(\"<?php echo $plugin_dir; ?>scripts/editor.php?type=folderindex&page=index.md\"); \n} else {\nvar n = id.replace(\"edit\",'');\nvar edit_page_val = jQuery('#edit'+n).text();\njQuery(\"#right\").load(\"<?php echo $plugin_dir; ?>scripts/editor.php?page=\"+edit_page_val);\n}\n\n});\n\njQuery(\".delete_page\").click(function() {\n\nvar id = jQuery(this).attr('id');\nvar n = id.replace(\"delete\",'');\n\nvar delete_page_val = jQuery('#edit'+n).text();\n\n\njQuery.post(\n '<?php echo $plugin_dir; ?>/scripts/update_content.php',{\npostvarsaction : 'delete',\npostvarspage : delete_page_val\n}, \n function (response) {\n //if(!alert(response)){\n alert(response);\n location.reload();\n //}\n });\n \n});\n\n\njQuery(\"#create_form\").submit(function( event ) {\n event.preventDefault();\n //alert( editor.getMarkdown() );\n\nvar fname = jQuery('#fname').val();\nif( fname == '' || fname.includes('.md') || fname == 'index' ) {\n alert('Filename cannot be empty, contain the extension \".md\", or use the name \"index\"');\n}\nelse{\n jQuery.post(\n '<?php echo $plugin_dir; ?>/scripts/update_content.php',{\npostvarsaction : 'create',\npostvarsfname : fname,\npostvarscontent : editor.getMarkdown()\n}, \n function (response) {\n //if(!alert(response)){\n alert(response);\n location.reload();\n //}\n });\n}\n \n});\n });\n\n</script>\n\n<?php\n}", "function procEdit($ar=NULL){\n $this->getComposedFullnam($ar);\n return parent::procEdit($ar);\n }", "public function create_visual_editor( $params ) {\n\n\t\t\t$innerHtml = '<div class=\"oxo_iconbox textblock_element textblock_element_style\">';\n\t\t\t$innerHtml .= '<div class=\"bilder_icon_container\"><span class=\"oxo_iconbox_icon\"><i class=\"oxoa-tag\"></i><sub class=\"sub\">' . __( 'Events', 'oxo-core' ) . '</sub></span></div>';\n\t\t\t$innerHtml .= '</div>';\n\t\t\t$this->config['innerHtml'] = $innerHtml;\n\t\t}", "public function index()\n {\n $cta = new ContentTextArea;\n $fcta = array();\n //dd($cta->all());\n $hashmap = array();\n $v = 1;\n while($v < 264) {\n if (array_key_exists(($v-1), $cta->all())) {\n $s = 'title'.(string)$v;\n $hashmap[$s] = $cta->all()[($v-1)]->text; \n }else {\n $s = 'title'.(string)$v;\n $hashmap[$s] = ' '; \n }\n \n $v++;\n }\n\n\n\n return view('admin.text_management', ['hashmap'=>$hashmap]);\n\n\n }", "function printTableMenus($tipo)\n\t\t{\n\t\t\t\t\tif ($tipo=='1') {\t\t\n\t\t$query = \"SELECT * FROM t_contacto ORDER BY id_contacto DESC\";\n\t\t$this->db->doQuery($query,SELECT_QUERY);\n\t\t$results = $this->db->results;\n\t\t$numOfResults = $this->db->getNumResults();\n\t}\n\t\t\n\t\t\n\t\t$html = '\n\t\t\n\t\t\t\t<script>function confirmar ( mensaje ) {return confirm( mensaje );}</script>\n<script type=\"text/javascript\" src=\"../../includes/ckeditor/ckeditor.js\"></script>\n<script src=\"../../includes/ckeditor/sample.js\" type=\"text/javascript\"></script>\n<link href=\"../../includes/ckeditor/sample.css\" rel=\"stylesheet\" type=\"text/css\" />\n<script type=\"text/javascript\" src=\"../../includes/ckfinder/ckfinder.js\"></script>\n <script type=\"text/javascript\">\n\nfunction BrowseServer()\n{\n\t// You can use the \"CKFinder\" class to render CKFinder in a page:\n\tvar finder = new CKFinder();\n\tfinder.basePath = \"../../\";\t// The path for the installation of CKFinder (default = \"/ckfinder/\").\n\tfinder.selectActionFunction = SetFileField;\n\tfinder.popup();\n\n\t// It can also be done in a single line, calling the \"static\"\n\t// Popup( basePath, width, height, selectFunction ) function:\n\t// CKFinder.Popup( \"../../\", null, null, SetFileField ) ;\n\t//\n\t// The \"Popup\" function can also accept an object as the only argument.\n\t// CKFinder.Popup( { BasePath : \"../../\", selectActionFunction : SetFileField } ) ;\n}\n\n// This is a sample function which is called when a file is selected in CKFinder.\nfunction SetFileField( fileUrl )\n{\n\tdocument.getElementById( \"img\" ).value = fileUrl;\n\t\n}\n\n\t</script>';\n\tif ($tipo=='1') {\t\n\n\n\t\t\t\t $html.='\n\t\t\t\t\t\n\t\n\t\t<br><br />\n<br />\n<script type=\"text/javascript\">\nfunction popup(url,ancho,alto) {\nvar posicion_x; \nvar posicion_y; \nposicion_x=(screen.width/2)-(ancho/2); \nposicion_y=(screen.height/2)-(alto/2); \nwindow.open(url, \"leonpurpura.com\", \"width=\"+ancho+\",height=\"+alto+\",menubar=0,toolbar=0,directories=0,scrollbars=no,resizable=no,left=\"+posicion_x+\",top=\"+posicion_y+\"\");\n}\n</script>\n<a href=\"excel.php\" target=\"_blank\">Descargar excel <img src=\"../../../images/EXCEL.png\" width=\"30\" style=\"margin-bottom: -9px;\"></a>\n\t<div class=\"tableName toolbar\">\n\t<table class=\"display data_table2\" >\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th><div class=\"th_wrapp\">Nombre</div></th>\n\t\t\t\t<th><div class=\"th_wrapp\">E-mail</div></th>\n\t\t\t\t<th><div class=\"th_wrapp\">Asunto</div></th>\n\t\t\t\t<th><div class=\"th_wrapp\">Acciones</div></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t';\n\t\n\tif($numOfResults>0)\n\t{\n\t\tforeach($results as $result)\n\t\t{\n\t$pop=\"popup('pop_up.php?id_contacto=\".$result[id_contacto].\"',700,500)\";\n\t\t$html .= '\n\t\t\t<tr class=\"odd gradeX\">\n\t\t\t<td class=\"center\">'.$result[nombre].'</td>\n\t\t\t<td class=\"center\">'.$result[email].'</td>\n\t\t\t<td class=\"center\">'.$result[asunto].'</td>\n\t\t\t<td class=\"center\">\n\t\t\t<a href=\"#\" onclick=\"'.$pop.'\" class=\"uibutton\">Ver mensaje</a>\n\t\t\t<a id=\"'.$result[id_contacto].'\" class=\"Delete uibutton special\" tableToDelete=\"t_contacto\" nameField=\"id_contacto\">Eliminar</a>\n\n\t\t\t</td>\n\t\t\t</tr>';\n\t\t}\n\t}\n\t\t\t\n$html .= '\n</tbody>\n</table>\n</div>\n';\n\t\t\t\t \t\n\n\n\t\t\t}\n\t\n\t\treturn $html;\n\n\t\t\t\n\t\t}", "public function outputStandardEditor($key, $content = null);", "public function modifiercontenu() {\n $idPage = $this->input->post('idPage');\n $contenu = ($this->input->post('contenu'));\n $this->admin_model->updatePage($contenu, $idPage, \"contenu\");\n }", "public function wc_tab_manager_get_editor() {\n\t\tob_start();\n\n\t\tcheck_ajax_referer( 'get-editor', 'security' );\n\n\t\t$size = esc_attr( $_POST['size'] );\n\n\t\t// Call `wp_editor` twice to get rid of `$editor_buttons_css`.\n\t\tob_start();\n\n\t\twp_editor( '', 'producttabcontent' . $size, array( 'textarea_name' => 'product_tab_content[' . $size . ']', 'tinymce' => false, 'textarea_rows' => 10 ) );\n\n\t\tob_clean();\n\n\t\twp_editor( '', 'producttabcontent' . $size, array( 'textarea_name' => 'product_tab_content[' . $size . ']', 'tinymce' => false, 'textarea_rows' => 10 ) );\n\n\t\t$content = ob_get_contents();\n\n\t\tob_end_clean();\n\n\t\techo $content;\n\n\t\t// Quit out.\n\t\texit();\n\t}", "function doEditorLine(&$o) {\n\tglobal $isEditor,$isOwner;\n\t$class = get_class($o);\n\t$bgColor = getBgColor($class,\"normal\");\n\t$bgColorL = getBgColor($class,\"locked\");\n\t$bgColorV = getBgColor($class,\"view\");\n\t$indent = getIndent($class);\n\t$textSize = getTextSize($class);\n\tif ($class == \"story\") {\n/* \t\tif ($o->getField(\"title\") !=\"\") $extra = $o->getField(\"title\"); */\n/* \t\telse $extra = $o->getFirst(25);\t\t */\n\t\tif ($o->getField(\"title\") == \"\") $extra = $o->getFirst(25);\n\t\telse $extra = '';\n\t} else $extra = \"\";\n\n\tprint \"\\n\\t\\t<tr>\";\n\tprint \"\\n\\t\\t\\t<td style='background-color: $bgColor; padding-left: \".$indent.\"px; font-size: $textSize'>\".$o->getField(\"title\").$extra.\"</td>\";\n\t// reference $args = \"'scope',site,section,page,story\";\n\tif ($class == 'site') \n\t\t$args = \"'$class','\".$o->name.\"',0,0,0\";\n\tif ($class == 'section')\n\t\t$args = \"'$class','\".$o->owning_site.\"',\".$o->id.\",0,0\";\n\tif ($class == 'page')\n\t\t$args = \"'$class','\".$o->owning_site.\"',\".$o->owning_section.\",\".$o->id.\",0\";\n\tif ($class == 'story')\n\t\t$args = \"'$class','\".$o->owning_site.\"',\".$o->owning_section.\",\".$o->owning_page.\",\".$o->id;\n\tprint \"\\n\\t\\t\\t<td align='center' class='lockedcol' style='background-color: $bgColorL' width='18'>\".(($class!='site')?\"<input type='checkbox'\".(($o->getField(\"locked\"))?\" checked='checked'\":\"\").\" onclick=\\\"doFieldChange('',$args,'locked',\".(($o->getField(\"locked\"))?\"0\":\"1\").\");\\\" \".((!$isOwner)?\"disabled='disabled'\":\"\").\" />\":\"&nbsp;\").\"</td>\";\n\t\n\t$type = $o->getField(\"type\");\n\t\n\t$o->buildPermissionsArray();\n\t$p = $o->getPermissions();\n\t\n\t$_a = array(\"view\"=>3,\"add\"=>0,\"edit\"=>1,\"delete\"=>2);\n\tforeach ($_SESSION[editors] as $e) {\n\t\t$args1 = \"'$e',\".$args;\n\t\tforeach ($_a as $v=>$i) {\n//\t\t\tprint \"l-$e$v\";\n\t\t\t$skip = 0;\n\t\t\tif (($e == 'everyone' || $e == 'institute') && $i<3) $skip = 1;\n\t\t\tif ($class=='story' && $v == 'add') $skip = 1;\n\t\t\tif ($type != 'story' && $type != 'page' && $type != 'section' && $class != 'site' && $v == 'add') $skip=1;\n\t\t\tif ($skip) {\n\t\t\t\tprint \"\\n\\t\\t\\t<td width='18' align='center'\".(($i==3)?\" class='viewcol' style='background-color: $bgColorV'\":\" style='background-color: $bgColor'\").\">&nbsp;</td>\";\n\t\t\t} else {\n\t\t\t\tprint \"\\n\\t\\t\\t<td width='18' align='center'\".(($i==3)?\" class='viewcol' style='background-color: $bgColorV'\":\" style='background-color: $bgColor'\").\"><input type='checkbox'\".(($p[$e][$i])?\" checked='checked'\":\"\").\" onclick=\\\"doFieldChange($args1,'perms-$v',\".(($p[$e][$i])?\"0\":\"1\").\");\\\" \".(($o->getField(\"l%$e%$v\") || !$isOwner)?\"disabled='disabled'\":\"\").\" /></td>\";\n\t\t\t}\n\t\t}\n\t}\n\tprint \"\\n\\t\\t</tr>\";\n}", "public function getEditRaw();", "function uultra_get_user_links_html_editor($meta, $content)\r\n\t{\r\n\t\tob_start();\r\n\t\t\r\n\t\t$editor_id = $meta;\t\t\t\t\r\n\t\t$editor_settings = array('media_buttons' => false , 'textarea_rows' => 40 , 'teeny' =>true, 'tinymce' => array( 'height' => 300 , 'quicktags' => false)); \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\twp_editor( $content, $editor_id , $editor_settings);\r\n\t\t\r\n\t\t// Store the contents of the buffer in a variable\r\n\t\t$editor_contents = ob_get_clean();\r\n\t\t\r\n\t\t// Return the content you want to the calling function\r\n\t\treturn $editor_contents;\r\n\t\t\t\r\n\t}", "function OnAfterEdit(){\n }", "public function edit(Compras $compras)\n {\n //\n }" ]
[ "0.6857355", "0.6809973", "0.6790261", "0.6633102", "0.6555018", "0.6429233", "0.63850117", "0.6362742", "0.6360705", "0.63591206", "0.63570243", "0.62725323", "0.62690294", "0.62652475", "0.6248976", "0.6237461", "0.6204494", "0.618674", "0.61763644", "0.61552966", "0.61506593", "0.613483", "0.6122233", "0.6105731", "0.6083529", "0.6083367", "0.6078213", "0.6077469", "0.60429496", "0.6042235", "0.6039057", "0.603289", "0.60098934", "0.600322", "0.59946376", "0.59944", "0.59879345", "0.5962593", "0.59564054", "0.5935316", "0.59210193", "0.58940583", "0.58889854", "0.58852893", "0.58799976", "0.58798635", "0.5862596", "0.58605", "0.58532524", "0.5852289", "0.58329225", "0.5822271", "0.5815742", "0.5814162", "0.5811502", "0.5808533", "0.5803044", "0.58009857", "0.5794165", "0.5791595", "0.5790313", "0.57820064", "0.57757324", "0.5775486", "0.57745236", "0.57686913", "0.5760554", "0.5751104", "0.5745806", "0.57394266", "0.57310766", "0.57255465", "0.57202595", "0.57161057", "0.57146", "0.5712959", "0.57100767", "0.57047045", "0.57017535", "0.5701673", "0.57009006", "0.56949425", "0.569207", "0.568835", "0.568706", "0.56870407", "0.5686818", "0.5686433", "0.56825197", "0.5679182", "0.5678404", "0.56761986", "0.56719315", "0.5662764", "0.56607896", "0.56553644", "0.56553376", "0.56540686", "0.5651076", "0.56501645" ]
0.6182594
18
/ Permite copiar un directorio completo de forma recursiva
function copiar ($desde, $hasta){ mkdir($hasta, 0777); $this_path = getcwd(); if(is_dir($desde)) { chdir($desde); $handle=opendir('.'); while(($file = readdir($handle))!==false){ if(($file != ".") && ($file != "..")){ if(is_dir($file)){ copiar($desde.$file."/", $hasta.$file."/"); chdir($desde); } if(is_file($file)){ copy($desde.$file, $hasta.$file); } } } closedir($handle); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recursive_copy($src, $dst): void\n{\n $dir = opendir($src);\n if (!@mkdir($dst) && !is_dir($dst)) {\n throw new RuntimeException(sprintf('Directory \"%s\" was not created', $dst));\n }\n while (($file = readdir($dir))) {\n if (($file !== '.') && ($file !== '..')) {\n if (is_dir($src . '/' . $file)) {\n recursive_copy($src . '/' . $file, $dst . '/' . $file);\n } else {\n copy($src . '/' . $file, $dst . '/' . $file);\n }\n }\n }\n closedir($dir);\n}", "function recurse_copy($src,$dst) { \n $dir = opendir($src);\n @mkdir($dst); \n while(false !== ( $file = readdir($dir)) ) {\n if (( $file != '.' ) && ( $file != '..') && !strstr($file,'.DS_Store')) {\n if ( is_dir($src . '/' . $file) ) { \n recurse_copy($src . '/' . $file,$dst . '/' . $file); \n } \n else { \n if(!copy($src . '/' . $file,$dst . '/' . $file)) {\n echo (\"Failed to copy\");\n } \n } \n } \n } \n closedir($dir); \n }", "function recurse_copy(string $src, string $dst) : void {\n\t$dir = opendir($src);\n\t@mkdir($dst);\n\twhile(false !== ( $file = readdir($dir)) ) {\n\t\tif (( $file != '.' ) && ( $file != '..' )) {\n\t\t\tif ( is_dir($src . '/' . $file) ) {\n\t\t\t\trecurse_copy($src . '/' . $file,$dst . '/' . $file);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcopy($src . '/' . $file,$dst . '/' . $file);\n\t\t\t}\n\t\t}\n\t}\n\tclosedir($dir);\n}", "function recurse_copy_dir($src,$dst) { \n\t$dir = opendir($src); \n\t$resp=mkdir($dst);\n\tLOG_MSG(\"INFO\",\"creating directory $resp -> [$dst] \");\n\twhile($dir && false !== ( $file = readdir($dir)) ) { \n\t\tif (( $file != '.' ) && ( $file != '..' )) { \n\t\t\tif ( is_dir($src . '/' . $file) ) { \n\t\t\t\trecurse_copy_dir($src . '/' . $file,$dst . '/' . $file); \n\t\t\t} \n\t\t\telse { \n\t\t\t\tcopy($src . '/' . $file,$dst . '/' . $file); \n\t\t\t} \n\t\t} \n\t} \n\tclosedir($dir); \n}", "function recursive_copy($src,$dst) { \r\n\t $dir = opendir($src); \r\n\t @mkdir($dst); \r\n\t while(false !== ( $file = readdir($dir)) ) { \r\n\t if (( $file != '.' ) && ( $file != '..' )) { \r\n\t if ( is_dir($src . '/' . $file) ) { \r\n\t recursive_copy($src . '/' . $file,$dst . '/' . $file); \r\n\t } \r\n\t else { \r\n\t copy($src . '/' . $file,$dst . '/' . $file); \r\n\t } \r\n\t } \r\n\t } \r\n\t closedir($dir); \r\n\t}", "function copydir($src, $dst) {\n // open the source directory\n $dir = opendir($src);\n // Make the destination directory if not exist\n @mkdir($dst);\n // Loop through the files in source directory\n foreach (scandir($src) as $file) {\n if (( $file != '.' ) && ( $file != '..' )) {\n if ( is_dir($src . '/' . $file) )\n {\n // Recursively calling custom copy function\n // for sub directory\n copydir($src . '/' . $file, $dst . '/' . $file);\n }\n else {\n copy($src . '/' . $file, $dst . '/' . $file);\n }\n }\n }\n closedir($dir);\n}", "abstract public function copyLocalDir($from, $to);", "public function recurseCopy($src,$dst) { \n $dir = opendir($src); \n @mkdir($dst); \n while(false !== ( $file = readdir($dir)) ) { \n if (( $file != '.' ) && ( $file != '..' )) { \n if ( is_dir($src . '/' . $file) ) { \n recurseCopy($src . '/' . $file,$dst . '/' . $file); \n } \n else { \n copy($src . '/' . $file,$dst . '/' . $file); \n } \n } \n } \n closedir($dir); \n }", "function cp_r ($from, $to, $skip = array())\n{\n\t$fromFile = basename($from);\n\tif (in_array($fromFile,$skip))\n\t\treturn false;\n\t\n\tif (!is_dir($from))\n\t\tcopy($from, $to . '/' . $fromFile);\n\telse\n\t{\n\t\tmkdir($to . '/' . $fromFile);\n\t\t$dir = array_diff(getTreeStructure($from, GTS_ALL),$skip);\n\t\tsort($dir);\n\t\t\n\t\tfor($i=0; $i<count($dir); $i++)\n\t\t{\n\t\t\tif (!is_dir($from . '/' . $dir[$i]))\n\t\t\t\tcopy($from . '/' . $dir[$i], $to . $fromFile . '/' . $dir[$i]);\n\t\t\telse\n\t\t\t\tmkdir($to . $fromFile . '/' . $dir[$i]);\n\t\t}\n\t\treturn true;\n\t}\n}", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "static public function copy($src, $dst) \n {\n if (is_file($src)) {\n if (!file_exists($f = dirname($dst))) {\n mkdir($f, 0775, true);\n @chmod($f, 0775); // let @, if www-data is not owner but allowed to write\n }\n copy($src, $dst);\n return;\n }\n if (is_dir($src)) {\n $src = rtrim($src, '/');\n $dst = rtrim($dst, '/');\n if (!file_exists($dst)) {\n mkdir($dst, 0775, true);\n @chmod($dst, 0775); // let @, if www-data is not owner but allowed to write\n }\n $handle = opendir($src);\n while (false !== ($entry = readdir($handle))) {\n if ($entry[0] == '.') continue;\n self::copy($src . '/' . $entry, $dst . '/' . $entry);\n }\n closedir($handle);\n }\n }", "public static function rcopy($src,$dst) { //dd($src);\n $dir = opendir($src); \n @mkdir($dst); \n while(false !== ( $file = readdir($dir)) ) { \n if (( $file != '.' ) && ( $file != '..' )) { \n if ( is_dir($src . '/' . $file) ) { \n self::rcopy($src . '/' . $file,$dst . '/' . $file); \n } \n else { \n copy($src . '/' . $file,$dst . '/' . $file); \n } \n } \n } \n closedir($dir); \n }", "function recurse_copy($src,$dst) {\n\t\t$dir = opendir($src);\n\t\t@mkdir($dst);\n\t\twhile(false !== ( $file = readdir($dir)) ) {\n\t\t\tif (( $file != '.' ) && ( $file != '..' )) {\n\t\t\t\tif ( is_dir($src . '/' . $file) ) {\n\t\t\t\t\t$this->recurse_copy($src . '/' . $file,$dst . '/' . $file);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcopy($src . '/' . $file,$dst . '/' . $file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($dir);\n\t}", "function smartCopy($source, $dest, $options=array('folderPermission'=>0755, 'filePermission'=>0755)) \r\n{ \r\n\t$result=false; \r\n\t \r\n\tif (is_file($source)) \r\n\t{ \r\n\t\tif ($dest[strlen($dest)-1]=='/') \r\n\t\t{ \r\n\t\t\tif (!file_exists($dest)) \r\n\t\t\t{ \r\n\t\t\t\t cmfcDirectory::makeAll($dest,$options['folderPermission'],true); \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t$__dest = $dest . \"/\" . basename($source); \r\n\t\t}\r\n\t\telse \r\n\t\t{ \r\n\t\t\t$__dest=$dest; \r\n\t\t}\r\n\t\t\r\n\t\t$result=copy($source, $__dest); \r\n\t\t\r\n\t\tchmod($__dest,$options['filePermission']); \r\n\t\t \r\n\t } elseif(is_dir($source)) { \r\n\t\tif ($dest[strlen($dest)-1]=='/') { \r\n\t\t\tif ($source[strlen($source)-1]=='/') { \r\n\t\t\t\t//Copy only contents \r\n\t\t\t} else { \r\n\t\t\t\t//Change parent itself and its contents \r\n\t\t\t\t$dest=$dest.basename($source); \r\n\t\t\t\t@mkdir($dest); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} \r\n\t\t} else { \r\n\t\t\tif ($source[strlen($source)-1]=='/') { \r\n\t\t\t\t//Copy parent directory with new name and all its content \r\n\t\t\t\t@mkdir($dest,$options['folderPermission']); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} else { \r\n\t\t\t\t//Copy parent directory with new name and all its content \r\n\t\t\t\t@mkdir($dest,$options['folderPermission']); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} \r\n\t\t}\r\n\r\n\t\t$dirHandle=opendir($source); \r\n\t\twhile($file=readdir($dirHandle)) \r\n\t\t{ \r\n\t\t\tif($file!=\".\" && $file!=\"..\") \r\n\t\t\t{ \r\n\t\t\t\tif(!is_dir($source.\"/\".$file)) { \r\n\t\t\t\t\t$__dest=$dest.\"/\".$file; \r\n\t\t\t\t} else { \r\n\t\t\t\t\t$__dest=$dest.\"/\".$file; \r\n\t\t\t\t} \r\n\t\t\t\t//echo \"$source/$file ||| $__dest<br />\"; \r\n\t\t\t\t$result=smartCopy($source.\"/\".$file, $__dest, $options); \r\n\t\t\t} \r\n\t\t} \r\n\t\tclosedir($dirHandle); \r\n\t\t \r\n\t} else { \r\n\t\t$result=false; \r\n\t} \r\n\treturn $result; \r\n}", "function copy_directory( $src, $dst ) {\r\n $dir = opendir( $src );\r\n @mkdir( $dst );\r\n while ( false !== ( $file = readdir( $dir )) ) {\r\n if ( ( $file != '.' ) && ( $file != '..' ) ) {\r\n if ( is_dir( $src . '/' . $file ) ) {\r\n recurse_copy( $src . '/' . $file, $dst . '/' . $file );\r\n } else {\r\n copy( $src . '/' . $file, $dst . '/' . $file );\r\n }\r\n }\r\n }\r\n closedir( $dir );\r\n }", "function custom_copy($src, $dst) {\n $dir = opendir($src); \n \n // Make the destination directory if not exist \n @mkdir($dst); \n \n // Loop through the files in source directory \n while( $file = readdir($dir) ) { \n \n if (( $file != '.' ) && ( $file != '..' )) { \n if ( is_dir($src . '/' . $file) ) \n { \n \n // Recursively calling custom copy function \n // for sub directory \n custom_copy($src . '/' . $file, $dst . '/' . $file); \n \n } \n else { \n copy($src . '/' . $file, $dst . '/' . $file); \n } \n } \n } \n \n closedir($dir); \n }", "public function copyOtherFiles(): void;", "function smartCopy($source, $dest, $options=array('folderPermission'=>0777,'filePermission'=>0777)) \n{ \n $result=false; \n \n if (is_file($source)) { \n if ($dest[strlen($dest)-1]=='/') { \n if (!file_exists($dest)) { \n cmfcDirectory::makeAll($dest,$options['folderPermission'],true); \n } \n $__dest=$dest.\"/\".basename($source); \n } else { \n $__dest=$dest; \n } \n $result=copy($source, $__dest); \n chmod($__dest,$options['filePermission']); \n \n } elseif(is_dir($source)) { \n if ($dest[strlen($dest)-1]=='/') { \n if ($source[strlen($source)-1]=='/') { \n //Copy only contents \n } else { \n //Change parent itself and its contents \n $dest=$dest.basename($source); \n @mkdir($dest); \n chmod($dest,$options['filePermission']); \n } \n } else { \n if ($source[strlen($source)-1]=='/') { \n //Copy parent directory with new name and all its content \n @mkdir($dest,$options['folderPermission']); \n chmod($dest,$options['filePermission']); \n } else { \n //Copy parent directory with new name and all its content \n @mkdir($dest,$options['folderPermission']); \n /*\n * modify by Zoe\n * dunno why this will generate warning message\n * tune this warning temporally \n */\n @chmod($dest,$options['filePermission']); \n } \n } \n\n $dirHandle=opendir($source); \n while($file=readdir($dirHandle)) \n { \n if($file!=\".\" && $file!=\"..\") \n { \n if(!is_dir($source.\"/\".$file)) { \n $__dest=$dest.\"/\".$file; \n } else { \n $__dest=$dest.\"/\".$file; \n } \n //echo \"$source/$file ||| $__dest<br />\"; \n $result=smartCopy($source.\"/\".$file, $__dest, $options); \n } \n } \n closedir($dirHandle); \n \n } else { \n $result=false; \n } \n return $result; \n}", "function folder_recurse($src,$dst, $action = 'copy') {\n $dir = opendir($src);\n @mkdir($dst);\n while(false !== ( $file = readdir($dir)) ) {\n if (( $file != '.' ) && ( $file != '..' )) {\n if ( is_dir($src . '/' . $file) ) {\n folder_recurse($src . '/' . $file,$dst . '/' . $file, $action);\n }\n else {\n\n $action($src . '/' . $file,$dst . '/' . $file);\n }\n }\n }\n closedir($dir);\n }", "function copy_directory($source, $destination) {\n if ($source == '.' || $source == '..') {\n return;\n }\n if (is_dir($source)) {\n @mkdir($destination);\n $directory = dir($source);\n while (false !== ($read_directory = $directory->read())) {\n if ($read_directory == '.' || $read_directory == '..') {\n continue;\n }\n $path_dir = $source . '/' . $read_directory;\n if (is_dir($path_dir)) {\n copy_directory($path_dir, $destination . '/' . $read_directory);\n continue;\n }\n copy($path_dir, $destination . '/' . $read_directory);\n }\n \n $directory->close();\n } else {\n copy($source, $destination);\n }\n}", "function copy($source, $dest, $options=array('folderPermission'=>0755,'filePermission'=>0755))\n\t{\n\t\t$result=false;\n\t\t\n\t\tif (is_file($source)) {\n\t\t\tif ($dest[strlen($dest)-1]=='/') {\n\t\t\t\tif (!file_exists($dest)) {\n\t\t\t\t\tcmfcDirectory::makeAll($dest,$options['folderPermission'],true);\n\t\t\t\t}\n\t\t\t\t$__dest=$dest.\"/\".basename($source);\n\t\t\t} else {\n\t\t\t\t$__dest=$dest;\n\t\t\t}\n\t\t\t$result=copy($source, $__dest);\n\t\t\tchmod($__dest,$options['filePermission']);\n\t\t\t\n\t\t} elseif(is_dir($source)) {\n\t\t\tif ($dest[strlen($dest)-1]=='/') {\n\t\t\t\tif ($source[strlen($source)-1]=='/') {\n\t\t\t\t\t//Copy only contents\n\t\t\t\t} else {\n\t\t\t\t\t//Change parent itself and its contents\n\t\t\t\t\t$dest=$dest.basename($source);\n\t\t\t\t\t@mkdir($dest);\n\t\t\t\t\tchmod($dest,$options['filePermission']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($source[strlen($source)-1]=='/') {\n\t\t\t\t\t//Copy parent directory with new name and all its content\n\t\t\t\t\t@mkdir($dest,$options['folderPermission']);\n\t\t\t\t\tchmod($dest,$options['filePermission']);\n\t\t\t\t} else {\n\t\t\t\t\t//Copy parent directory with new name and all its content\n\t\t\t\t\t@mkdir($dest,$options['folderPermission']);\n\t\t\t\t\tchmod($dest,$options['filePermission']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$dirHandle=opendir($source);\n\t\t\twhile($file=readdir($dirHandle))\n\t\t\t{\n\t\t\t\tif($file!=\".\" && $file!=\"..\")\n\t\t\t\t{\n\t\t\t\t\tif(!is_dir($source.\"/\".$file)) {\n\t\t\t\t\t\t$__dest=$dest.\"/\".$file;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$__dest=$dest.\"/\".$file;\n\t\t\t\t\t}\n\t\t\t\t\t//echo \"$source/$file ||| $__dest<br />\";\n\t\t\t\t\t$result=cmfcDirectory::copy($source.\"/\".$file, $__dest, $options);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dirHandle);\n\t\t\t\n\t\t} else {\n\t\t\t$result=false;\n\t\t}\n\t\treturn $result;\n\t}", "public static function recurse_copy($src,$dst)\n {\n $dir = opendir($src);\n @mkdir($dst);\n while(false !== ( $file = readdir($dir)) ) {\n if (( $file != '.' ) && ( $file != '..' )) {\n if ( is_dir($src . '/' . $file) ) {\n self::recurse_copy($src . '/' . $file,$dst . '/' . $file);\n }\n else {\n copy($src . '/' . $file,$dst . '/' . $file);\n }\n }\n }\n closedir($dir);\n }", "function rcopy($src, $dst)\n{\n ini_set('max_execution_time', 0);\n set_time_limit(0);\n if (is_dir($src)) {\n if (!file_exists($dst)) : mkdir($dst);\n endif;\n $files = scandir($src);\n foreach ($files as $file) {\n if ($file != \".\" && $file != \"..\") {\n rcopy(\"$src/$file\", \"$dst/$file\");\n }\n }\n } elseif (file_exists($src)) {\n copy($src, $dst);\n }\n return true;\n}", "function copyFolder($old_dir,$new_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "function copyDirRecursive($source, $dest, $dirname='', $privileges=0777)\n {\n static $orgdest = null;\n\n if (is_null($orgdest))\n $orgdest = $dest;\n\n atkdebug(\"Checking write permission for \".$orgdest);\n\n if (!atkFileUtils::is_writable($orgdest))\n {\n atkdebug(\"Error no write permission!\");\n return false;\n }\n\n atkdebug(\"Permission granted to write.\");\n\n if ($dest == $orgdest && $dirname != '')\n {\n mkdir($orgdest . \"/\" . $dirname,$privileges);\n return atkFileUtils::copyDirRecursive($source,$orgdest.\"/\".$dirname,'',$privileges);\n }\n\n // Simple copy for a file\n if (is_file($source))\n {\n $c = copy($source, $dest);\n\n chmod($dest, $privileges);\n\n return $c;\n }\n\n // Make destination directory\n if (!is_dir($dest))\n {\n if ($dest != $orgdest && !is_dir($orgdest.'/'.$dirname) && $dirname != '')\n $dest = $orgdest.'/'.$dirname;\n\n $oldumask = umask(0);\n\n mkdir($dest, $privileges);\n\n umask($oldumask);\n }\n\n // Loop through the folder\n $dir = dir($source);\n\n while (false !== $entry = $dir->read())\n {\n // Skip pointers\n if ($entry == '.' || $entry == '..')\n continue;\n\n // Deep copy directories\n if ($dest !== \"$source/$entry\")\n atkFileUtils::copyDirRecursive(\"$source/$entry\", \"$dest/$entry\", $dirname, $privileges);\n }\n\n // Clean up\n $dir->close();\n\n return true;\n }", "function publisher_copyr($source, $dest)\r\n{\r\n // Simple copy for a file\r\n if (is_file($source)) {\r\n return copy($source, $dest);\r\n }\r\n\r\n // Make destination directory\r\n if (!is_dir($dest)) {\r\n mkdir($dest);\r\n }\r\n\r\n // Loop through the folder\r\n $dir = dir($source);\r\n while (false !== $entry = $dir->read()) {\r\n // Skip pointers\r\n if ($entry == '.' || $entry == '..') {\r\n continue;\r\n }\r\n\r\n // Deep copy directories\r\n if (is_dir(\"$source/$entry\") && ($dest !== \"$source/$entry\")) {\r\n copyr(\"$source/$entry\", \"$dest/$entry\");\r\n } else {\r\n copy(\"$source/$entry\", \"$dest/$entry\");\r\n }\r\n }\r\n\r\n // Clean up\r\n $dir->close();\r\n return true;\r\n}", "public function copy($name){\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $oldPath);\n\t\tarray_pop($path_array);\n\t\t$_newPath = implode(self::DS, $path_array);\n\t\t$newPath = $_newPath . self::DS . $name;\n\t\tcopy($this->path, $newPath);\n\t}", "function copy_dir_with_files($src, $dst)\n{\n $dir = opendir($src);\n\n // Make the destination directory if not exist\n @mkdir($dst);\n\n // Loop through the files in source directory\n while ($file = readdir($dir)) {\n\n if (($file != '.') && ($file != '..')) {\n if (is_dir($src . '/' . $file)) {\n\n // Recursively calling custom copy function\n // for sub directory\n custom_copy($src . '/' . $file, $dst . '/' . $file);\n\n } else {\n copy($src . '/' . $file, $dst . '/' . $file);\n }\n }\n }\n\n closedir($dir);\n}", "function recursive_copy($source,$destination) {\n\t $counter = 0;\n\t if (substr($source,strlen($source),1)!=\"/\") $source .= \"/\";\n\t if (substr($destination,strlen($destination),1)!=\"/\") $destination .= \"/\";\n\t if (!is_dir($destination)) makeDirs($destination);\n\t $itens = listFiles($source);\n\t foreach($itens as $id => $name) {\n\t if ($name[0] == \"/\") $name = substr($name,1);\n\t if (is_file($source.$name)) { // file\n\t \tif ($name != \"Thumbs.db\") {\n\t\t $counter ++;\n\t\t if (!copy ($source.$name,$destination.$name))\n\t\t echo \"Error: \".$source.$name.\" -> \".$destination.$name.\"<br/>\";\n\t\t else\n\t\t safe_chmod($destination.$name,0775);\n\t \t} else\n\t \t\t@unlink($source.$name);\n\t } else if(is_dir($source.$name)) { // dir\n\t if (!is_dir($destination.$name))\n\t safe_mkdir($destination.$name);\n\t $counter += recursive_copy($source.$name,$destination.$name);\n\t }\n\t }\n\t return $counter;\n\t}", "function smartCopy($source, $dest, $folderPermission=0755,$filePermission=0644){\r\n# source=file & dest=file / not there yet => copy file from source-dir to dest and overwrite a file there, if present\r\n\r\n# source=dir & dest=dir => copy all content from source to dir\r\n# source=dir & dest not there yet => copy all content from source to a, yet to be created, dest-dir\r\n $result=false;\r\n \r\n if (is_file($source)) { # $source is file\r\n if(hb_is_dir($dest)) { # $dest is folder\r\n if ($dest[strlen($dest)-1]!='/') # add '/' if necessary\r\n $__dest=$dest.\"/\";\r\n $__dest .= basename($source);\r\n }\r\n else { # $dest is (new) filename\r\n $__dest=$dest;\r\n }\r\n $result=copy($source, $__dest);\r\n chmod($__dest,$filePermission);\r\n }\r\n elseif(hb_is_dir($source)) { # $source is dir\r\n if(!hb_is_dir($dest)) { # dest-dir not there yet, create it\r\n @mkdir($dest,$folderPermission);\r\n chmod($dest,$folderPermission);\r\n }\r\n if ($source[strlen($source)-1]!='/') # add '/' if necessary\r\n $source=$source.\"/\";\r\n if ($dest[strlen($dest)-1]!='/') # add '/' if necessary\r\n $dest=$dest.\"/\";\r\n\r\n # find all elements in $source\r\n $result = true; # in case this dir is empty it would otherwise return false\r\n $dirHandle=opendir($source);\r\n while($file=readdir($dirHandle)) { # note that $file can also be a folder\r\n if($file!=\".\" && $file!=\"..\") { # filter starting elements and pass the rest to this function again\r\n# echo \"$source$file ||| $dest$file<br />\\n\";\r\n $result=smartCopy($source.$file, $dest.$file, $folderPermission, $filePermission);\r\n }\r\n }\r\n closedir($dirHandle);\r\n }\r\n else {\r\n $result=false;\r\n }\r\n return $result;\r\n }", "function copyDirectory($src, $dest){\n if(!is_dir($src)) return false;\n\n // If the destination directory does not exist create it\n if(!is_dir($dest)) {\n if(!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach($i as $f) {\n if($f->isFile()) {\n copy($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else if(!$f->isDot() && $f->isDir()) {\n copyDirectory($f->getRealPath(), \"$dest/$f\");\n }\n }\n\n}", "function copy_dirs($wf, $wto) {\n\tif (!file_exists($wto)) {\n\t\tmkdir($wto, 0777);\n\t}\n\t$arr=ls_a($wf);\n\tforeach ($arr as $fn) {\n\t\tif($fn) {\n\t\t\t$fl=$wf.\"/\".$fn;\n\t\t\t$flto=$wto.\"/\".$fn;\n\t\t\tif(is_dir($fl)) copy_dirs($fl, $flto);\n\t\t\telse // begin 2nd improvement\n\t\t\t{\n\t\t\t\t@copy($fl, $flto);\n\t\t\t\tchmod($flto, 0666);\n\t\t\t} // end 2nd improvement\n\t\t}\n\t}\n}", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public function copy($from, $to)\n\t{\n\t\tif(is_dir($from))\n\t\t\t$this->recurse_copy($from, $this->base_location . \"/\" . $to);\n\t\telse\n\t\t\tcopy($from, $this->base_location . \"/\" . $to);\t\t\n\t}", "function copy_directory($source, $destination)\n{\n\tmkdir($destination);\n\t$directory = dir($source);\n\twhile ( FALSE !== ( $readdirectory = $directory->read() ) )\n\t{\n\t\tif ( $readdirectory == '.' || $readdirectory == '..' )\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\t$pathDir = $source . '/' . $readdirectory; \n\t\tif (is_dir($pathDir)) // recursively copies subdirectories\n\t\t{\n\t\t\tcopy_directory($pathDir, $destination . '/' . $readdirectory );\n\t\t\tcontinue;\n\t\t}\n\t\tif (copy( $pathDir, $destination . '/' . $readdirectory ))\n\t\t{\n\t\t\techo \"Successfully copied $pathDir.\\n\";\n\t\t}\n\t}\n\t$directory->close();\n}", "function copyDirToDir( $sDirFrom, $sDirTo ){\n if( is_dir( $sDirFrom ) && is_dir( $sDirTo ) ){\n foreach( new DirectoryIterator( $sDirFrom ) as $oFileDir ){\n if( $oFileDir->isFile( ) && !is_file( $sDirTo.$oFileDir->getFilename( ) ) ){\n copy( $sDirFrom.$oFileDir->getFilename( ), $sDirTo.$oFileDir->getFilename( ) );\n }\n } // end foreach\n }\n}", "private function copyFolderRecursively($from, $to) { \n\t\t\t$dir = opendir($from); \n\t\t\t@mkdir($to);\n\t\t \n\t\t while (false !== ($item = readdir($dir))) { \n\t\t if (($item == '.') or ($item == '..')) continue;\n\t\t \n\t\t $source = $from.DIRECTORY_SEPARATOR.$item;\n\t\t $target = $to.DIRECTORY_SEPARATOR.$item;\n\t\t \n\t\t\t\tif (is_dir($source))\n\t\t\t\t\t$this->copyFolderRecursively($source, $target);\n\t\t\t\telse\n\t\t\t\t\tcopy($source, $target);\n\t\t } \n\t\t closedir($dir);\n\t\t return TRUE; \n\t\t}", "function rcopy($src, $dest) {\n // If source is not a directory stop processing\n if (!is_dir($src)) {\n return FALSE;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return FALSE;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n copy($f->getRealPath(), \"$dest/\" . $f->getFilename());\n }\n else {\n if (!$f->isDot() && $f->isDir()) {\n rcopy($f->getRealPath(), \"$dest/$f\");\n }\n }\n }\n\n return TRUE;\n}", "public function testCopy() {\n $sourceDirName = self::TEST_DIR . '/testCopyDirectorySource';\n $targetDirName = self::TEST_DIR . '/testCopyDirectoryTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->copy(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryExists($sourceDirName);\n }", "function copyDirectory($srcDir, $dstDir)\n{\n $dir = opendir($srcDir);\n if (!$dir)\n return false;\n\n while (($entry = readdir($dir)) !== false) {\n if (strcmp($entry, \".\") == 0 || strcmp($entry, \"..\") == 0) {\n continue;\n }\n $src = joinPathComponents($srcDir, $entry);\n $dst = joinPathComponents($dstDir, $entry);\n\n if (is_dir($src)) {\n if (!file_exists($dst))\n mkdir($dst);\n if (!copyDirectory($src, $dst))\n return false;\n } else {\n if (!is_file($dst)) {\n if (!copy($src, $dst))\n return false;\n }\n }\n }\n return true;\n}", "function copy_recursively($src, $dest) {\n global $exc;\n\n $trace = '';\n $trace .= \"Copy Recursive: $src $dest<br/>\";\n\n $excludeDirsNames = isset($exc[\"folders\"]) ? $exc[\"folders\"] : array();\n $excludeFileNames =isset($exc[\"files\"]) ? $exc[\"files\"] : array();\n\n if (is_dir(''.$src)){\n @mkdir($dest);\n $files = scandir($src);\n\n foreach ($files as $file){\n if (!in_array(getRootName($dest), $excludeDirsNames)){\n if ($file != \".\" && $file != \"..\"){\n $trace.= copy_recursively(\"$src/$file\", \"$dest/$file\");\n } \n }\n }\n }\n else if (file_exists($src)){\n $filename = pathinfo($src, PATHINFO_FILENAME);\n //$filename = $filename[count( $filename)-2];\n if (!in_array( $filename, $excludeFileNames)){\n copy($src, $dest);\n }\n }\n\n return $trace;\n}", "function copyFiles( $src, $dest, $sep='/' )\r\n{\r\n\tif ( substr($dest,-1) != $sep )\r\n\t\t$dest .= $sep;\r\n\t\t\r\n\t$srcdir = dirname($src);\r\n\t$files = array( basename($src) );\r\n\t//echo \"Copying $files from $srcdir to $dest\\n\";\r\n\tif ( $files[0] == '*' )\r\n\t\t$files = scandir( $srcdir );\r\n\r\n\tforeach ($files as $file)\r\n\t{\r\n\t\t$srcfile = $srcdir.$sep.$file;\r\n\t\tif ( $file != '.' && $file != '..' && is_file($srcfile) )\r\n\t\t{\r\n\t\t\t$destfile = $dest.$file;\r\n\t\t\tif ( !copy( $srcfile, $destfile ) )\r\n\t\t\t\tdie( \"Failed to copy $srcfile to $destfile\\n\" );\r\n\t\t}\r\n\t}\r\n}", "public function copy($path, $target)\n {\n \n }", "public static function deepCopy($source, $destination)\n\t{\n\t\t$dir = opendir($source);\n\t\t@mkdir($destination);\n\n\t\twhile (false !== ($file = readdir($dir))) {\n\t\t\tif (($file != '.') && ($file != '..')) {\n\t\t\t\tif (is_dir(\"$source/$file\")) {\n\t\t\t\t\tstatic::deepCopy(\"$source/$file\", \"$destination/$file\");\n\t\t\t\t} else {\n\t\t\t\t\tstatic::copyFile(\"$source/$file\", \"$destination/$file\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tclosedir($dir);\n\t}", "function copyr($source, $dest, $overwrite = false)\n{\n // Simple copy for a file\n if (is_file($source)) {\n return copy($source, $dest);\n }\n\n // Make destination directory\n if (!is_dir($dest)) {\n mkdir($dest);\n }\n\n // If the source is a symlink\n if (is_link($source)) {\n $link_dest = readlink($source);\n return symlink($link_dest, $dest);\n }\n\n // Loop through the folder\n $dir = dir($source);\n while (false !== $entry = $dir->read()) {\n // Skip pointers\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n\n // Deep copy directories\n if ($dest !== \"$source/$entry\") {\n if ($overwrite || !is_file(\"$dest/$entry\")) {\n copyr(\"$source/$entry\", \"$dest/$entry\");\n } else {\n return false;\n }\n }\n }\n\n // Clean up\n $dir->close();\n return true;\n}", "public function copy($path, $newpath)\n {\n }", "function copiant($nombreArchivo,$Destino){\n if(!copy($nombreArchivo,$Destino))\n print(\"\\n<br>Ocurrio un error mientras se intentaba copiar el archivo $nombreArchivo !!\");\n else \n print(\"\\n<br>El archivo $nombreArchivo Se Copio Correctamente\");\n}", "public static function copy(string $from, string $to): void\n {\n if (! File::exists(\\dirname($to))) {\n try {\n File::makeDirectory(\\dirname($to), 0755, true, true);\n } catch (\\Exception $e) {\n dd('Caught exception: ', $e->getMessage(), '\\n['.__LINE__.']['.__FILE__.']');\n }\n }\n\n if (! File::exists($to) && ! app()->runningInConsole()) {// not rewite\n try {\n File::copy($from, $to);\n } catch (\\Exception $e) {\n throw new \\Exception('Unable to copy\n from ['.$from.']\n to ['.$to.']\n message ['.$e->getMessage().']');\n }\n }\n }", "function is_writable($orgdest)\n {\n if ($orgdest{0} == '/')\n {\n if (count($orgdest) == 1)\n $testdest = $orgdest;\n else\n $testdest= substr($orgdest, 0, strpos($orgdest, '/', 1));\n }\n else\n {\n if ($orgdest{strlen($orgdest)-1} != '/' && !is_file($orgdest))\n $orgdest .= '/';\n\n $testdest = $orgdest;\n\n if (!is_dir($orgdest))\n {\n $orgdestArray = explode('/', $orgdest);\n\n $testdest = $orgdestArray[0].'/';\n }\n }\n\n atkdebug(\"Checking with: \".$testdest);\n\n return is_writable($testdest);\n }\n\n /**\n * This function creates recursively a destination. This fuction accepts\n * a full path ../dir/subdir/subdir2/subdir3 etc. It checks if the path is writeable\n * and replace mis typed slashes with forward slashes.\n *\n * @static\n * @param string $dir the fullpath\n * @param octal $privileges octal number for the rights of the written\n * @param bool $recursive \n * @return bool returns true if the destination is written.\n */\n function mkdirRecursive($dir, $privileges=0777, $recursive=true)\n {\n $dir = preg_replace('/(\\/){2,}|(\\\\\\){1,}/','/',$dir); //only forward-slash\n\n if (!atkFileUtils::is_writable($dir))\n {\n atkdebug(\"Error no write permission!\");\n return false;\n }\n\n atkdebug(\"Permission granted to write.\");\n\n if( is_null($dir) || $dir === \"\" ){\n return FALSE;\n }\n if( is_dir($dir) || $dir === \"/\" ){\n return TRUE;\n }\n if( atkFileUtils::mkdirRecursive(dirname($dir), $privileges, $recursive) ){\n return mkdir($dir, $privileges);\n }\n return FALSE;\n }\n\n /**\n * This function parse a templatestring with the data and returns\n * a string with the data parsed in the template.\n *\n * @static\n * @param string $template the template to parse\n * @param array $data array which contains the data for the template\n * @return string returns the parsed string\n */\n function parseDirectoryName($template, $data)\n {\n atkimport(\"atk.utils.atkstringparser\");\n $stringparser = new atkStringParser($template);\n return $stringparser->parse($data);\n }\n\n\n /**\n * Returns mimetype for the given filename, based on fileextension.\n * This function is different from mime_content_type because it\n * does not access the file but just looks at the fileextension and\n * returns the right mimetype.\n *\n * @static\n * @param string $filename Filename (or just the extention) we want\n * to know the mime type for.\n * @return string The mimetype for this file extension.\n */\n function atkGetMimeTypeFromFileExtension($filename)\n {\n $ext = strtolower(end(explode('.',$filename )));\n\n $mimetypes = array(\n 'ai' =>'application/postscript',\n 'aif' =>'audio/x-aiff',\n 'aifc' =>'audio/x-aiff',\n 'aiff' =>'audio/x-aiff',\n 'asc' =>'text/plain',\n 'atom' =>'application/atom+xml',\n 'avi' =>'video/x-msvideo',\n 'bcpio' =>'application/x-bcpio',\n 'bmp' =>'image/bmp',\n 'cdf' =>'application/x-netcdf',\n 'cgm' =>'image/cgm',\n 'cpio' =>'application/x-cpio',\n 'cpt' =>'application/mac-compactpro',\n 'crl' =>'application/x-pkcs7-crl',\n 'crt' =>'application/x-x509-ca-cert',\n 'csh' =>'application/x-csh',\n 'css' =>'text/css',\n 'dcr' =>'application/x-director',\n 'dir' =>'application/x-director',\n 'djv' =>'image/vnd.djvu',\n 'djvu' =>'image/vnd.djvu',\n 'doc' =>'application/msword',\n 'dtd' =>'application/xml-dtd',\n 'dvi' =>'application/x-dvi',\n 'dxr' =>'application/x-director',\n 'eps' =>'application/postscript',\n 'etx' =>'text/x-setext',\n 'ez' =>'application/andrew-inset',\n 'gif' =>'image/gif',\n 'gram' =>'application/srgs',\n 'grxml' =>'application/srgs+xml',\n 'gtar' =>'application/x-gtar',\n 'hdf' =>'application/x-hdf',\n 'hqx' =>'application/mac-binhex40',\n 'html' =>'text/html',\n 'html' =>'text/html',\n 'ice' =>'x-conference/x-cooltalk',\n 'ico' =>'image/x-icon',\n 'ics' =>'text/calendar',\n 'ief' =>'image/ief',\n 'ifb' =>'text/calendar',\n 'iges' =>'model/iges',\n 'igs' =>'model/iges',\n 'jpe' =>'image/jpeg',\n 'jpeg' =>'image/jpeg',\n 'jpg' =>'image/jpeg',\n 'js' =>'application/x-javascript',\n 'kar' =>'audio/midi',\n 'latex' =>'application/x-latex',\n 'm3u' =>'audio/x-mpegurl',\n 'man' =>'application/x-troff-man',\n 'mathml' =>'application/mathml+xml',\n 'me' =>'application/x-troff-me',\n 'mesh' =>'model/mesh',\n 'mid' =>'audio/midi',\n 'midi' =>'audio/midi',\n 'mif' =>'application/vnd.mif',\n 'mov' =>'video/quicktime',\n 'movie' =>'video/x-sgi-movie',\n 'mp2' =>'audio/mpeg',\n 'mp3' =>'audio/mpeg',\n 'mpe' =>'video/mpeg',\n 'mpeg' =>'video/mpeg',\n 'mpg' =>'video/mpeg',\n 'mpga' =>'audio/mpeg',\n 'ms' =>'application/x-troff-ms',\n 'msh' =>'model/mesh',\n 'mxu m4u' =>'video/vnd.mpegurl',\n 'nc' =>'application/x-netcdf',\n 'oda' =>'application/oda',\n 'ogg' =>'application/ogg',\n 'pbm' =>'image/x-portable-bitmap',\n 'pdb' =>'chemical/x-pdb',\n 'pdf' =>'application/pdf',\n 'pgm' =>'image/x-portable-graymap',\n 'pgn' =>'application/x-chess-pgn',\n 'php' =>'application/x-httpd-php',\n 'php4' =>'application/x-httpd-php',\n 'php3' =>'application/x-httpd-php',\n 'phtml' =>'application/x-httpd-php',\n 'phps' =>'application/x-httpd-php-source',\n 'png' =>'image/png',\n 'pnm' =>'image/x-portable-anymap',\n 'ppm' =>'image/x-portable-pixmap',\n 'ppt' =>'application/vnd.ms-powerpoint',\n 'ps' =>'application/postscript',\n 'qt' =>'video/quicktime',\n 'ra' =>'audio/x-pn-realaudio',\n 'ram' =>'audio/x-pn-realaudio',\n 'ras' =>'image/x-cmu-raster',\n 'rdf' =>'application/rdf+xml',\n 'rgb' =>'image/x-rgb',\n 'rm' =>'application/vnd.rn-realmedia',\n 'roff' =>'application/x-troff',\n 'rtf' =>'text/rtf',\n 'rtx' =>'text/richtext',\n 'sgm' =>'text/sgml',\n 'sgml' =>'text/sgml',\n 'sh' =>'application/x-sh',\n 'shar' =>'application/x-shar',\n 'shtml' =>'text/html',\n 'silo' =>'model/mesh',\n 'sit' =>'application/x-stuffit',\n 'skd' =>'application/x-koan',\n 'skm' =>'application/x-koan',\n 'skp' =>'application/x-koan',\n 'skt' =>'application/x-koan',\n 'smi' =>'application/smil',\n 'smil' =>'application/smil',\n 'snd' =>'audio/basic',\n 'spl' =>'application/x-futuresplash',\n 'src' =>'application/x-wais-source',\n 'sv4cpio' =>'application/x-sv4cpio',\n 'sv4crc' =>'application/x-sv4crc',\n 'svg' =>'image/svg+xml',\n 'swf' =>'application/x-shockwave-flash',\n 't' =>'application/x-troff',\n 'tar' =>'application/x-tar',\n 'tcl' =>'application/x-tcl',\n 'tex' =>'application/x-tex',\n 'texi' =>'application/x-texinfo',\n 'texinfo' =>'application/x-texinfo',\n 'tgz' =>'application/x-tar',\n 'tif' =>'image/tiff',\n 'tiff' =>'image/tiff',\n 'tr' =>'application/x-troff',\n 'tsv' =>'text/tab-separated-values',\n 'txt' =>'text/plain',\n 'ustar' =>'application/x-ustar',\n 'vcd' =>'application/x-cdlink',\n 'vrml' =>'model/vrml',\n 'vxml' =>'application/voicexml+xml',\n 'wav' =>'audio/x-wav',\n 'wbmp' =>'image/vnd.wap.wbmp',\n 'wbxml' =>'application/vnd.wap.wbxml',\n 'wml' =>'text/vnd.wap.wml',\n 'wmlc' =>'application/vnd.wap.wmlc',\n 'wmlc' =>'application/vnd.wap.wmlc',\n 'wmls' =>'text/vnd.wap.wmlscript',\n 'wmlsc' =>'application/vnd.wap.wmlscriptc',\n 'wmlsc' =>'application/vnd.wap.wmlscriptc',\n 'wrl' =>'model/vrml',\n 'xbm' =>'image/x-xbitmap',\n 'xht' =>'application/xhtml+xml',\n 'xhtml' =>'application/xhtml+xml',\n 'xls' =>'application/vnd.ms-excel',\n 'xml xsl' =>'application/xml',\n 'xpm' =>'image/x-xpixmap',\n 'xslt' =>'application/xslt+xml',\n 'xul' =>'application/vnd.mozilla.xul+xml',\n 'xwd' =>'image/x-xwindowdump',\n 'xyz' =>'chemical/x-xyz',\n 'zip' =>'application/zip'\n );\n\n $ext = trim(strtolower($ext));\n if (array_key_exists($ext,$mimetypes))\n {\n atkdebug(\"Filetype for $filename is {$mimetypes[$ext]}\");\n return $mimetypes[$ext];\n }\n else\n {\n atkdebug(\"Filetype for $filename could not be found. Returning application/octet-stream.\");\n return \"application/octet-stream\";\n }\n }\n\n /**\n * Get the Mimetype for a file the proper way.\n *\n * @link http://en.wikipedia.org/wiki/MIME_type\n *\n * @param string $file_path Path to the file\n * @return string Mimetype\n */\n public static function getFileMimetype($file_path)\n {\n // First try with fileinfo functions\n if (function_exists('finfo_open'))\n {\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $type = finfo_file($finfo, $file_path);\n finfo_close($finfo);\n }\n elseif (function_exists('mime_content_type'))\n {\n $type = mime_content_type($file);\n }\n else\n {\n // Unable to get the file mimetype!\n $type = '';\n }\n return $type;\n }\n\n /**\n * Delete complete directory and all of its contents.\n *\n * @todo If one of the subdirs/files cannot be removed, you end up with\n * a half deleted directory structure.\n * @param string $dir The directory to remove\n * @return True if succesful, false if not\n */\n function rmdirRecursive( $dir )\n {\n if ( !is_writable( $dir ) )\n {\n if ( !@chmod( $dir, 0777 ) )\n {\n return FALSE;\n }\n }\n\n $d = dir( $dir );\n while ( FALSE !== ( $entry = $d->read() ) )\n {\n if ( $entry == '.' || $entry == '..' )\n {\n continue;\n }\n $entry = $dir . '/' . $entry;\n if ( is_dir( $entry ) )\n {\n if ( !atkFileUtils::rmdirRecursive( $entry ) )\n {\n return FALSE;\n }\n continue;\n }\n if ( !@unlink( $entry ) )\n {\n $d->close();\n return FALSE;\n }\n }\n\n $d->close();\n\n rmdir( $dir );\n\n return TRUE;\n }\n}", "function fn_copy($source, $dest, $silent = true, $exclude_files = array())\n{\n /**\n * Ability to forbid file copy or change parameters\n *\n * @param string $source source file/directory\n * @param string $dest destination file/directory\n * @param boolean $silent silent flag\n * @param array $exclude files to exclude\n */\n fn_set_hook('copy_file', $source, $dest, $silent, $exclude_files);\n\n if (empty($source)) {\n return false;\n }\n\n // Simple copy for a file\n if (is_file($source)) {\n $source_file_name = fn_basename($source);\n if (in_array($source_file_name, $exclude_files)) {\n return true;\n }\n if (@is_dir($dest)) {\n $dest .= '/' . $source_file_name;\n }\n if (filesize($source) == 0) {\n $fd = fopen($dest, 'w');\n fclose($fd);\n $res = true;\n } else {\n $res = @copy($source, $dest);\n }\n @chmod($dest, DEFAULT_FILE_PERMISSIONS);\n clearstatcache(true, $dest);\n\n return $res;\n }\n\n // Make destination directory\n if ($silent == false) {\n $_dir = strpos($dest, Registry::get('config.dir.root')) === 0 ? str_replace(Registry::get('config.dir.root') . '/', '', $dest) : $dest;\n fn_set_progress('echo', $_dir . '<br/>');\n }\n\n // Loop through the folder\n if (@is_dir($source)) {\n\n if (!fn_mkdir($dest)) {\n return false;\n }\n \n $dir = dir($source);\n while (false !== $entry = $dir->read()) {\n // Skip pointers\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n\n // Deep copy directories\n if ($dest !== $source . '/' . $entry) {\n if (fn_copy($source . '/' . $entry, $dest . '/' . $entry, $silent, $exclude_files) == false) {\n return false;\n }\n }\n }\n\n // Clean up\n $dir->close();\n\n return true;\n } else {\n return false;\n }\n}", "function copiar_archivo($tipo,$id_file,$origen,$destino,$id_usuario) {\n\t\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$data=$this->datos_archivo_repositorio($id_file);\n\t\t$dir=$this->datos_directorio($destino,$id_usuario);\n\t\t\n\t\t$ssql = \"INSERT INTO repositorio_archivos\n\t\t(file_name,id_directorio,id_palabra,id_imagen,id_simbolo,id_tipo_imagen,fecha_creacion,ruta_file,id_usuario) \n\t\tVALUES ('\".$data['file_name'].\"','$destino','\".$data['id_palabra'].\"','\".$data['id_imagen'].\"','\".$data['id_simbolo'].\"','\".$data['id_tipo_imagen'].\"','\".$data['fecha_creacion'].\"','\".$data['ruta_file'].\"','$id_usuario')\";\n\t\t\t\n\t\t\t//lo inserto en la base de datos\n\t\t\tif (mysql_query($ssql,$connection)){\n\t\t\t\t//recibo el último id\n\t\t\t\t$ultimo_id = mysql_insert_id($connection);\n\t\t\t\t$extension = strtolower(substr(strrchr($data['file_name'], \".\"), 1));\n\t\t\t\t\n\t\t\t\tif ($tipo==1) {\t\t\n\t\t\t\t\tcopy ('../../../usuarios/'.$data['ruta_file'].'/'.$data['file_name'],'../../../usuarios/'.$dir['ruta_dir'].'/'.$ultimo_id.'.'.$extension.'');\n\t\t\t\t\t\n\t\t\t\t\t$nombre_archivo=$ultimo_id.'.'.$extension;\n\t\t\t\t\t$directorio=$dir['ruta_dir'];\n\t\t\t\t\t\n\t\t\t\t\t$UpdateRecords = \"UPDATE repositorio_archivos SET file_name='$nombre_archivo', ruta_file='$directorio' WHERE file_id='$ultimo_id'\";\n\t\t\t\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\t\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\t\t\t$result = mysql_query($UpdateRecords); \t\n\t\t\t\t}\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn $ultimo_id;\n\t\t\t}else{\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn false;\n\t\t\t} \t\t\n\t}", "private function copiarExistenciaDir($directorio = null, $nombre = null) {\n\t\t\tif(is_dir($directorio) == true):\n\t\t\t\t$nombre = (is_string($nombre) == true) ? $nombre : $this->raw['nombre'];\n\t\t\t\treturn move_uploaded_file($this->raw['temporal'], implode(DIRECTORY_SEPARATOR, array($directorio, $nombre)));\n\t\t\telse:\n\t\t\t\treturn null;\n\t\t\tendif;\n\t\t}", "private function appCopy()\n {\n global $boot;\n\n $boot->eol(1);\n $boot->echo('Adding Project: ' . $this->newName);\n\n foreach ($this->data as $n => $data) {\n $path = $this->rootDir . $data->generatePath;\n $boot->mkdir($path);\n $file = $this->rootDir . $data->generate;\n $content = '';\n\n if (!empty($data->templatePath)) {\n $content = file_get_contents($this->rootDir . $data->templatePath . $data->template);\n\n if (!empty($data->replace)) {\n $content = strtr($content, $data->replace);\n }\n file_put_contents($file, $content);\n }\n\n// $t = 1;\n\n if ($data->dirOnly && $data->sourceDir) {\n ZFileHelper::copyDirectory($this->rootDir . $data->sourceDir, $path);\n\n $source_path = ZFileHelper::findFiles($path);\n if (!empty($data->replace)) {\n foreach ($source_path as $inner_path) {\n $content = file_get_contents($inner_path);\n $content = strtr($content, $data->replace);\n file_put_contents($inner_path, $content);\n }\n }\n\n /*if (!$data->affectFileToo)\n continue;*/\n\n\n }\n\n }\n }", "function drush_cmi_config_copy($src, $dest) {\n drush_delete_dir(config_get_config_directory($dest));\n drush_copy_dir(config_get_config_directory($src), config_get_config_directory($dest));\n}", "function DNUI_copy($source, $dest) {\r\n if (file_exists($source)) {\r\n return copy($source, $dest);\r\n }else{\r\n return false;\r\n }\r\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}", "private static function recursiveCopy($path, $destination) {\n\t\tif (is_dir($path)) {\n\t\t\tif (!file_exists($destination)) {\n\t\t\t\tmkdir($destination);\n\t\t\t}\n\n\t\t\t$handle = opendir($path);\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != '..' && $file[0] != '.') {\n\t\t\t\t\tself::recursiveCopy($path.'/'.$file, $destination.'/'.$file);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tclosedir($handle);\n\t\t} else {\n\t\t\tcopy($path, $destination);\n\t\t}\n\t}", "function copyr($source, $dest) {\n\t// Check for symlinks\n\tif (is_link($source)) {\n\t\treturn symlink(readlink($source), $dest);\n\t}\n\t\n\t// Simple copy for a file\n\tif (is_file($source)) {\n\t\treturn copy($source, $dest);\n\t}\n\n\t// Make destination directory\n\tif (!is_dir($dest)) {\n\t\tmkdir($dest);\n\t}\n\n\t// Loop through the folder\n\t$dir = dir($source);\n\twhile (false !== $entry = $dir->read()) {\n\t\t// Skip pointers\n\t\tif ($entry == '.' || $entry == '..') {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Deep copy directories\n\t\tcopyr(\"$source/$entry\", \"$dest/$entry\");\n\t}\n\n\t// Clean up\n\t$dir->close();\n\treturn true;\n}", "public function dir_rewinddir() {}", "public static function copyDir(string $src, string $dst)\n {\n $dir = opendir($src);\n @mkdir($dst);\n while (false !== ($file = readdir($dir))) {\n if (($file != '.') && ($file != '..')) {\n if (is_dir($src . '/' . $file)) {\n static::copyDir($src . '/' . $file, $dst . '/' . $file);\n } else {\n copy($src . '/' . $file, $dst . '/' . $file);\n }\n }\n }\n closedir($dir);\n }", "public function copyDir($originDir, $targetDir);", "function makedir($dir)\n{\n\tglobal $config_vars;\n\t$ret = ForceDirectories($dir,$config_vars['dir_mask']);\n\ttouch ($dir . '/index.html');\n\treturn $ret;\n}", "public function testCopyDirectoryReturnsFalseIfSourceIsntDirectory()\n {\n $origin = self::$temp.DS.'breeze'.DS.'boom'.DS.'foo'.DS.'bar'.DS.'baz';\n $this->assertFalse(Storage::cpdir($origin, self::$temp));\n }", "function copy_dir($source_dir, $destination_dir, $skip = null, $create_destination = false) {\n if(is_dir($source_dir)) {\n if(!is_dir($destination_dir)) {\n if(!$create_destination || !mkdir($destination_dir, 0777, true)) {\n return false;\n } // if\n } // if\n \n $result = true;\n \n $d = dir($source_dir);\n if($d) {\n while(false !== ($entry = $d->read())) {\n if($entry == '.' || $entry == '..') {\n continue;\n } // if\n \n if($skip && in_array($entry, $skip)) {\n continue;\n } // if\n \n if(is_dir(\"$source_dir/$entry\")) {\n $result = $result && copy_dir(\"$source_dir/$entry\", \"$destination_dir/$entry\", $skip, true);\n } elseif(is_file(\"$source_dir/$entry\")) {\n if(copy(\"$source_dir/$entry\", \"$destination_dir/$entry\")) {\n chmod(\"$destination_dir/$entry\", 0777);\n } else {\n $result = false;\n } // if\n } // if\n } // while\n } // if\n \n $d->close();\n return $result;\n } // if\n \n return false;\n }", "function copy_fichier($file, $path) {\n\t\t if (!$id_erreur=copy(\"vide.htm\", $path . $file . \".htm\")) echo(\"Erreur d'ouverture du fichier\");\n\t\t else return(1);\n}", "function copyr($source, $dest) {\n\tif (is_link($source)) {\n\t\treturn symlink(readlink($source), $dest);\n\t}\n\n\tif (is_file($source)) {\n\t\treturn copy($source, $dest);\n\t}\n\n\tif (!is_dir($dest)) {\n\t\tmkdir($dest);\n\t}\n\n\t$dir = dir($source);\n\twhile (false !== $entry = $dir->read()) {\n\t\tif ($entry == '.' || $entry == '..') {\n\t\t\tcontinue;\n\t\t}\n\t\tcopyr(\"$source/$entry\", \"$dest/$entry\");\n\t}\n\n\t// Clean up\n\t$dir->close();\n\treturn true;\n}", "static public function rcopy ( $src, $dst ) {\n\n\t\tif ( file_exists( $dst ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( is_dir( $src ) ) {\n\t\t\tmkdir( $dst );\n\t\t\t$files = scandir( $src );\n\t\t\tforeach ( $files as $file ) {\n\t\t\t\tif ( $file != \".\" && $file != \"..\" ) {\n\t\t\t\t\tself::rcopy( \"$src/$file\", \"$dst/$file\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if ( file_exists( $src ) ) {\n\t\t\tcopy( $src, $dst );\n\t\t}\n\n\t\treturn true;\n\t}", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "function eliminarDirectorio($directorio){\n foreach(glob($directorio . \"/*\") as $archivos_carpeta){\n if (is_dir($archivos_carpeta)){\n eliminarDirectorio($archivos_carpeta);\n }\n else{\n unlink($archivos_carpeta);\n }\n }\n rmdir($directorio);\n}", "function dest_path_and_file()\r\n{ \r\n global $xoopsDB, $xoopsUser;\r\n \r\n // Initialize magic_number. This number is used to create unique file names in order to guarantee that 2 file names\r\n // will not be identical if 2 users upload a file at the exact same time. 100000 will allow almost 100000 users to use\r\n // this system. Ok, the odds of this happening are slim; but, I want the odds to be zero.\r\n $magic_number = 100000; \r\n \r\n // Get the location of the document repository\r\n $query = \"SELECT data from \".$xoopsDB->prefix(\"dms_config\").\" WHERE name='doc_path'\";\r\n $file_sys_root = mysql_result(mysql_query($query),'data');\r\n \r\n // Get the current value of max_file_sys_counter\r\n $query = \"SELECT data from \".$xoopsDB->prefix(\"dms_config\").\" WHERE name='max_file_sys_counter'\";\r\n $max_file_sys_counter = (integer) mysql_result(mysql_query($query),'data');\r\n \r\n // Determine the path and filename of the new file\r\n $query = \"SELECT * from \".$xoopsDB->prefix(\"dms_file_sys_counters\");\r\n $dms_file_sys_counters = mysql_fetch_array(mysql_query($query));\r\n \r\n $file_sys_dir_1 = $dms_file_sys_counters['layer_1'];\r\n $file_sys_dir_2 = $dms_file_sys_counters['layer_2'];\r\n $file_sys_dir_3 = $dms_file_sys_counters['layer_3'];\r\n $file_sys_file = $dms_file_sys_counters['file'];\r\n $file_sys_file_name = ($file_sys_file * $magic_number) + $xoopsUser->getVar('uid');\r\n \r\n $dir_path_1 = $file_sys_root.\"/\".$file_sys_dir_1;\r\n $dir_path_2 = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2;\r\n $dir_path_3 = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3;\r\n \r\n //$doc_path = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3;\r\n $path_and_file = $file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3.\"/\".$file_sys_file_name;\r\n //$dest_path_and_file = $doc_path.\"/\".$file_sys_file_name;\r\n \r\n //print $path_and_file;\r\n //exit(0);\r\n \r\n // Determine the next file system counter values and save them for future use.\r\n $file_sys_file++;\r\n if ($file_sys_file > $max_file_sys_counter) \r\n {\r\n\t$file_sys_file = 1;\r\n\t$file_sys_dir_3++;\r\n\t} \r\n \r\n if ($file_sys_dir_3 > $max_file_sys_counter)\r\n {\r\n\t$file_sys_dir_3 = 1;\r\n\t$file_sys_dir_2++;\r\n\t}\r\n\t\r\n if ($file_sys_dir_2 > $max_file_sys_counter)\r\n {\r\n\t$file_sys_dir_2 = 1;\r\n\t$file_sys_dir_1++;\r\n\t}\r\n\t\r\n $query = \"UPDATE \".$xoopsDB->prefix(\"dms_file_sys_counters\").\" SET \";\r\n $query .= \"layer_1 = '\".(integer) $file_sys_dir_1.\"', \";\r\n $query .= \"layer_2 = '\".(integer) $file_sys_dir_2.\"', \";\r\n $query .= \"layer_3 = '\".(integer) $file_sys_dir_3.\"', \";\r\n $query .= \"file = '\".(integer) $file_sys_file. \"' \";\r\n \r\n mysql_query($query); \r\n\r\n // Ensure that the final destination directories exist...if not, then create the directory or directories.\r\n if (!is_dir($dir_path_1)) \r\n {\r\n\tmkdir($dir_path_1,0775);\r\n chmod($dir_path_1,0777);\r\n\t}\r\n \r\n if (!is_dir($dir_path_2))\r\n {\r\n\tmkdir($dir_path_2,0775); \r\n chmod($dir_path_2,0777);\r\n }\r\n\t\r\n if (!is_dir($dir_path_3)) \r\n {\r\n\tmkdir($dir_path_3,0775);\r\n chmod($dir_path_3,0777);\r\n\t}\r\n\t\r\n return($path_and_file);\r\n}", "function borrarCarpeta($carpeta) {\r\n foreach(glob($carpeta . \"/*\") as $archivos_carpeta){ \r\n if (is_dir($archivos_carpeta)){\r\n if($archivos_carpeta != \".\" && $archivos_carpeta != \"..\") {\r\n borrarCarpeta($archivos_carpeta);\r\n }\r\n } else {\r\n unlink($archivos_carpeta);\r\n }\r\n }\r\n rmdir($carpeta);\r\n}", "function borrarDirecctorio($dir) {\r\n\t\tarray_map('unlink', glob($dir.\"/*.*\"));\t\r\n\t\r\n\t}", "protected function cloneUploadsDirectory($from, $to)\n {\n if (file_exists($from) === false) {\n return false;\n } else {\n mkdir($to, 0755);\n\n foreach (\n $iterator = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($from, \\RecursiveDirectoryIterator::SKIP_DOTS),\n \\RecursiveIteratorIterator::SELF_FIRST) as $item\n ) {\n if ($item->isDir()) {\n mkdir($to . DIRECTORY_SEPARATOR . $iterator->getSubPathName());\n } else {\n copy($item, $to . DIRECTORY_SEPARATOR . $iterator->getSubPathName());\n }\n }\n }\n }", "public static function copyFolder($from, $to)\n\t{\n\t\t$dir = opendir($from);\n\t\t\n\t\tself::mkdir($to);\n\t\t\n\t\twhile (false !== ($file = readdir($dir))) {\n\t\t\tif ($file != '.' && $file != '..') {\n\t\t\t\tif (is_dir($from.'/'.$file)) {\n\t\t\t\t\tself::copyFolder($from.'/'.$file, $to.'/'.$file);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!copy($from.'/'.$file, $to.'/'.$file)) {\n\t\t\t\t\t\tthrow new Exception('Error recur. copying file to: ' . $to . '/' . $file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tclosedir($dir);\n\t}", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "function fn_te_chmod($source, $perms = DEFAULT_DIR_PERMISSIONS, $recursive = false)\n{\n // Simple copy for a file\n if (is_file($source) || $recursive == false) {\n $res = @chmod($source, $perms);\n\n return $res;\n }\n\n // Loop through the folder\n if (is_dir($source)) {\n $dir = dir($source);\n while (false !== $entry = $dir->read()) {\n // Skip pointers\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n if (fn_te_chmod($source . '/' . $entry, $perms, true) == false) {\n return false;\n }\n }\n // Clean up\n $dir->close();\n\n return @chmod($source, $perms);\n } else {\n return false;\n }\n}", "public static function copy($_path, $_target)\r\n {\r\n return copy($_path, $_target);\r\n }", "private function insertCloneFolder()\n {\n global $boot;\n $coreIP = $boot->env('coreIP');\n\n if (file_exists($this->rootDir . \"/inserts/$this->oldName\")) ZFileHelper::copyDirectory($this->rootDir . \"/inserts/$this->oldName\", $this->rootDir . \"/inserts/$this->newName\");\n\n $sub_dirs = glob($this->rootDir . \"/inserts/$this->newName/*\");\n\n foreach ($sub_dirs as $dir) {\n if ($dir !== null && is_file($dir)) {\n $content = file_get_contents($dir);\n $replace = [\n $this->oldName => $this->newName\n ];\n $content = strtr($content, $replace);\n file_put_contents($dir, $content);\n }\n }\n\n $newdb = $this->dbname;\n $data = require $this->rootDir . '/configs/data/' . $this->oldName . '.php';\n $source = $data['components']['db']['dbName'];\n\n $file = $this->rootDir . '/configs/data/' . $this->newName . '.php';\n $file_content = file_get_contents($file);\n $replace = [\n $source => $newdb\n ];\n\n $content = strtr($file_content, $replace);\n file_put_contents($file, $content);\n\n }", "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 static function copyr($src, $dst)\n {\n $dir = opendir($src);\n GeneratorHelper::createDir($dst);\n while (false !== ($file = readdir($dir))) {\n if (($file != '.') && ($file != '..')) {\n if (is_dir($src . '/' . $file)) {\n self::copyr($src . '/' . $file, $dst . '/' . $file);\n } elseif (@copy($src . '/' . $file, $dst . '/' . $file) === false) {\n throw new ConfigException(\"Can't copy \" . $src . \" to \" . $dst);\n }\n }\n }\n closedir($dir);\n }", "protected function copyDir($src, $dst)\n {\n $dir = @opendir($src);\n if (false === $dir) {\n throw new TaskException($this, \"Cannot open source directory '\" . $src . \"'\");\n }\n if (!is_dir($dst)) {\n mkdir($dst, $this->chmod, true);\n }\n while (false !== ($file = readdir($dir))) {\n if (in_array($file, $this->exclude)) {\n continue;\n }\n if (($file !== '.') && ($file !== '..')) {\n $srcFile = $src . '/' . $file;\n $destFile = $dst . '/' . $file;\n if (is_dir($srcFile)) {\n $this->copyDir($srcFile, $destFile);\n } else {\n $this->fs->copy($srcFile, $destFile, $this->overwrite);\n }\n }\n }\n closedir($dir);\n }", "function tep_copy_uploaded_file($filename, $target) {\n if (substr($target, -1) != '/') $target .= '/';\n\n $target .= $filename['name'];\n //if (!file_exists($target)) {\n //@mkdir($target);\n //@chmod($target, 0777);\n //}\n move_uploaded_file($filename['tmp_name'], $target);\n chmod($target, 0666);\n}", "function copy($src, $dest, $path = '', $force = false, $sourceSystem = null) \n {\n // Initialize variables\n\n if ($path) {\n $src = $this->_fs->path()->clean($path . DS . $src);\n $dest = $this->_fs->path()->clean($path . DS . $dest);\n }\n\n // Eliminate trailing directory separators, if any\n $src = rtrim($src, DS);\n $dest = rtrim($dest, DS);\n\n if (!$this->exists($src)) {\n return VWP::raiseError(VText::_('Cannot find source folder'),get_class($this).\":copy\",-1,false);\n }\n\n if ($this->exists($dest) && !$force) {\n return VWP::raiseError(VText::_('Folder already exists'),get_class($this).\":copy\",-1,false);\n }\n\n // Make sure the destination exists\n \n $r = $this->create($dest);\n if (VWP::isWarning($r)) {\n return VWP::raiseError(VText::_('Unable to create target folder'),get_class($this).\":copy\",-1,false);\n }\n \n if (!($dh = @opendir($src))) {\n return VWP::raiseError(VText::_('Unable to open source folder'),get_class($this).\":copy\",-1,false);\n }\n\n // Walk through the directory copying files and recursing into folders.\n while (($file = readdir($dh)) !== false) {\n $sfid = $src . DS . $file;\n $dfid = $dest . DS . $file;\n switch (filetype($sfid)) {\n case 'dir':\n if ($file != '.' && $file != '..') {\n $ret = $this->copy($sfid, $dfid, null, $force);\n if ($ret !== true) {\n return $ret;\n }\n }\n break;\n case 'file':\n if (!@copy($sfid, $dfid)) {\n return VWP::raiseError(VText::_('Copy failed'),get_class($this).\":copy\",-1,false);\n }\n break;\n }\n }\n return true;\n }", "function make_move_build($build_path) {\n $tmp_path = make_tmp();\n $ret = TRUE;\n if ($build_path == '.') {\n $info = drush_scan_directory($tmp_path . DIRECTORY_SEPARATOR . '__build__', '/./', array('.', '..'), 0, FALSE, 'filename', 0, TRUE);\n foreach ($info as $file) {\n $destination = $build_path . DIRECTORY_SEPARATOR . $file->basename;\n if (file_exists($destination)) {\n // To prevent the removal of top-level directories such as 'modules' or\n // 'themes', descend in a level if the file exists.\n // TODO: This only protects one level of directories from being removed.\n $files = drush_scan_directory($file->filename, '/./', array('.', '..'), 0, FALSE);\n foreach ($files as $file) {\n $ret = $ret && drush_copy_dir($file->filename, $destination . DIRECTORY_SEPARATOR . $file->basename, FILE_EXISTS_MERGE);\n }\n }\n else {\n $ret = $ret && drush_copy_dir($file->filename, $destination);\n }\n }\n }\n else {\n drush_mkdir(dirname($build_path));\n $ret = drush_move_dir($tmp_path . DIRECTORY_SEPARATOR . '__build__', $tmp_path . DIRECTORY_SEPARATOR . basename($build_path), TRUE);\n $ret = $ret && drush_copy_dir($tmp_path . DIRECTORY_SEPARATOR . basename($build_path), $build_path);\n }\n\n // Copying to final destination resets write permissions. Re-apply.\n if (drush_get_option('prepare-install')) {\n $default = $build_path . '/sites/default';\n chmod($default . '/settings.php', 0666);\n chmod($default . '/files', 0777);\n }\n\n if (!$ret) {\n drush_set_error('MAKE_CANNOT_MOVE_BUILD', dt(\"Cannot move build into place.\"));\n }\n return $ret;\n}", "function mover_archivo($tipo,$id_file,$origen,$destino,$id_usuario) {\n\t\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$data=$this->datos_archivo_repositorio($id_file);\n\t\t$dir=$this->datos_directorio($destino,$id_usuario);\n\t\t\t\t\n\t\t\t\tif ($tipo==1) {\t\t\n\t\t\t\t\tcopy ('../../../usuarios/'.$data['ruta_file'].'/'.$data['file_name'],'../../../usuarios/'.$dir['ruta_dir'].'/'.$data['file_name']);\n\t\t\t\t\tunlink('../../../usuarios/'.$data['ruta_file'].'/'.$data['file_name']);\n\t\t\t\t\t\n\t\t\t\t\t/*$nombre_archivo=$ultimo_id.'.'.$extension;*/\n\t\t\t\t\t$directorio=$dir['ruta_dir'];\n\t\t\t\t\t$id_directorio=$dir['id'];\n\t\t\t\t\t\n\t\t\t\t\t$UpdateRecords = \"UPDATE repositorio_archivos SET ruta_file='$directorio', id_directorio='$id_directorio' WHERE file_id='$id_file'\";\n\t\t\t\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\t\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\t\t\t$result = mysql_query($UpdateRecords); \t\n\t\t\t\t}\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn true;\n\t}", "public function copyPath($filePath, $newPath);", "public static function copyDirectory($src,$dst,$options=array())\n\t{\n\t\t$fileTypes=array();\n\t\t$exclude=array();\n\t\t$level=-1;\n\t\textract($options);\n\t\tif(!is_dir($dst))\n\t\t\tself::createDirectory($dst,isset($options['newDirMode'])?$options['newDirMode']:null,true);\n\n\t\tself::copyDirectoryRecursive($src,$dst,'',$fileTypes,$exclude,$level,$options);\n\t}", "function rex_com_mediaccess_copyfile($file, $source, $target)\n{\n global $REX;\n\n if(!rex_is_writable($target))\n {\n echo rex_warning('Keine Schreibrechte für das Verzeichnis \"'.$target.'\" !');\n return false;\n }\n\n if(!is_file($source.$file))\n {\n echo rex_warning('Datei \"'.$source.$file.'\" ist nicht vorhanden und kann nicht kopiert werden!');\n return false;\n }\n\n if(is_file($target.$file))\n {\n if(!rename($target.$file,$target.date(\"d.m.y_H.i.s_\").$file))\n {\n echo rex_warning('Datei \"'.$target.$file.'\" konnte nicht umbenannt werden!');\n return false;\n }\n }\n\n if(!copy($source.$file,$target.$file))\n {\n echo rex_warning('Datei \"'.$target.$file.'\" konnte nicht geschrieben werden!');\n return false;\n }\n\n if(!chmod($target.$file,$REX['FILEPERM']))\n {\n echo rex_warning('Rechte für \"'.$target.$file.'\" konnten nicht gesetzt werden!');\n return false;\n }\n\n echo rex_info('Datei \"'.$target.$file.'\" wurde erfolgreich angelegt.');\n return true;\n}", "function copyr($source, $dest) {\n\n // Check for symlinks\n if (is_link($source)) {\n return symlink(readlink($source), $dest);\n }\n\n // Simple copy for a file\n if (is_file($source)) {\n return copy($source, $dest);\n }\n\n if (!is_dir($dest)) {\n mkdir($dest, 0755);\n }\n\n // Loop through the folder\n $dir = dir($source);\n while (false !== $entry = $dir->read()) {\n // Skip pointers\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n\n // Deep copy directories\n $this->copyr(\"$source/$entry\", \"$dest/$entry\");\n }\n\n // Clean up\n $dir->close();\n return true;\n }", "public function salvarArquivo()\n {\n $caminho = dirname($this->arquivo);\n if (!is_dir($caminho)) {\n mkdir($caminho, '0775', true);\n }\n // grava o arquivo\n file_put_contents($this->arquivo, $this->conteudo);\n }", "protected function rcopy($src, $dest){\n\n // If source is not a directory stop processing\n if(!is_dir($src)) return false;\n\n // If the destination directory does not exist create it\n if(!is_dir($dest)) {\n if(!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new \\DirectoryIterator($src);\n foreach($i as $f) {\n if($f->isFile()) {\n copy($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else if(!$f->isDot() && $f->isDir()) {\n $this->rcopy($f->getRealPath(), \"$dest/$f\");\n }\n }\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "public static function crear_directorio_y_copiar_templates($ruta_base, $id_session){\r\n\t\t$nuevo_directorio = $ruta_base.$id_session;\r\n\t\tmkdir($nuevo_directorio);\r\n\t\t// Abrimos la carpeta templates\r\n\t $dir = opendir($ruta_base.\"templates/\");\r\n\t // Copio todos los ficheros de la carpeta templates al nuevo directorio\r\n\t while ($template = readdir($dir)){\r\n\t if( $template != \".\" && $template != \"..\"){\r\n\t copy($ruta_base.\"templates/\".$template, $nuevo_directorio.\"/\".$template);\r\n\t }\r\n\t }\r\n\t closedir($dir);\r\n\t}", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "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 static function copy($src,$dst) {\n\t if (self::has_directory($src)) {\n\t\t\tif(!self::has_directory($dst)) {\n\t\t\t\tself::create_directory($dst);\n\t\t\t}\n\t $files = scandir($src);\n\t foreach ($files as $file) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tself::copy(\"$src/$file\", \"$dst/$file\");\n\t\t\t\t}\n\t\t\t}\n\t } else if (self::has_file($src)) { \n\t\t\t\treturn copy($src,$dst);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "function duplicateFile( $src, $dst, $replaceFileTarget=false , &$result)\n\t{\n\t if( strpos( $dst, $src ) === 0 ){\n\t \t// if the copy is not into the same folder\n\t \tif($src != $dst )\n\t \t{\n\t\t \t$result['state'] = 'ERROR';\n\t\t \t$result['message'] = 'Non puoi copiare una cartella dentro se stessa o una cartella figlia!';\n\t\t \treturn;\n\t \t}\n\t } \n\t \n\t if ( file_exists($dst) )\n\t {\n\t \t// if we want replace the target\n\t \tif($replaceFileTarget)\n\t \t{\n\t \t\tif($src == $dst ) return; // cna't replace self\n\t \t\t$this->removeFile($dst); // remove file or folder\n\t \t}\n\t \telse\n\t \t{\n\t \t\t// if the copy is made into the same folder\n\t \t\tif($src == $dst )\n\t \t\t{\n\t \t\t\t$path_parts = pathinfo($dst);\n\t \t\t\t$fileExtension = '';\n\t \t\t\tif( isset( $path_parts['extension'] )) $fileExtension = '.'.$path_parts['extension'];\n\t\t\t\t \n\t \t\t\t// append 'copy' at the end of the filename\n\t \t\t\tif( is_file($dst) )\n\t \t\t\t{\n\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy'.$fileExtension;\n\t\t\t\t\t$num = 1;\n\t\t\t\t\twhile( file_exists( $dst ) ) { \t\t\t\n\t\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy '.$num.$fileExtension;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t\telse if( is_dir($dst) )\n\t \t\t\t{\n\t \t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy';\n\t\t\t\t\t$num = 1;\n\t\t\t\t\twhile( file_exists( $dst ) ) { \t\t\t\n\t\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy '.$num;\n\t\t\t\t\t\t$num++;\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// add the paths to the list of existents files ( to send to the client for replacing request )\n\t \t\t\t$result['state'] = 'EXISTENT_FILES';\n\t\t\t \t$fileToReplace = array();\n\t\t\t \t$fileToReplace['sourcePath'] = $src;\n\t\t\t \t$fileToReplace['targetPath'] = $dst;\n\t\t\t \tarray_push( $result['existentFiles'] , $fileToReplace );\n\t\t\t \treturn;\n\t \t\t}\n\n\t \t}\n\t } \n\t \n\t if (file_exists($src))\n\t {\n\t\t if (is_dir($src))\n\t\t {\n\t\t if( ! mkdir($dst)) exit;\n\t\t $files = scandir($src);\n\t\t foreach ($files as $file)\n\t\t {\n\t\t \tif ($file != \".\" && $file != \"..\") $this->duplicateFile(\"$src/$file\", \"$dst/$file\", $replaceFileTarget , $result);\n\t\t }\n\t\t \n\t\t }\n\t\t else if (is_file($src))\n\t\t {\n\t\t \tif( ! copy($src, $dst) ) exit;\n\t\t }\n\t } \n\t \n\n}", "abstract function changedir($path = '', $supress_debug = FALSE);", "abstract public function copyLocalFile($from, $to);" ]
[ "0.6919138", "0.6891525", "0.684044", "0.6804076", "0.6776408", "0.6764926", "0.66789585", "0.6662889", "0.66518027", "0.66457427", "0.6632279", "0.6572202", "0.6561335", "0.6530037", "0.6505243", "0.64843374", "0.64732915", "0.6471976", "0.6463541", "0.6450435", "0.64069027", "0.63656133", "0.6364114", "0.62684953", "0.62332535", "0.62283117", "0.62103003", "0.6176198", "0.6171818", "0.6171131", "0.61294514", "0.6113011", "0.61104184", "0.60956013", "0.6068013", "0.60299504", "0.5987087", "0.5985641", "0.5971078", "0.5936614", "0.58901185", "0.58872634", "0.58388084", "0.58342946", "0.5822746", "0.5790108", "0.5780012", "0.576473", "0.57590204", "0.5758743", "0.5715166", "0.5704686", "0.5699776", "0.5691847", "0.56862396", "0.56842494", "0.56824535", "0.5677422", "0.56761354", "0.56737226", "0.566362", "0.5636118", "0.5612927", "0.5591662", "0.5586536", "0.55853987", "0.55832344", "0.5577351", "0.556249", "0.55582947", "0.555722", "0.55531687", "0.55500335", "0.55477524", "0.5543157", "0.554115", "0.55308044", "0.55207705", "0.55188537", "0.55168664", "0.55141395", "0.5504025", "0.5501342", "0.54893863", "0.54887706", "0.547994", "0.5477644", "0.54656225", "0.54646266", "0.54623055", "0.54583204", "0.5456606", "0.54455334", "0.5431337", "0.5429436", "0.5427862", "0.54267657", "0.5419062", "0.5404751", "0.53907037" ]
0.76319045
0
/ Permite eliminar un directorio completo
function eliminarDirectorio($directorio){ foreach(glob($directorio . "/*") as $archivos_carpeta){ if (is_dir($archivos_carpeta)){ eliminarDirectorio($archivos_carpeta); } else{ unlink($archivos_carpeta); } } rmdir($directorio); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarDirectorio($directorio,$rutaActual){\n\t$carpeta = @scandir($rutaActual.\"/\".$directorio);\n\tif (count($carpeta) > 2){\n\t echo \"El directorio contiene Archivos, verifique la informacion\";\n\t}else{\n\t if(rmdir($rutaActual.\"/\".$directorio)){\n\t\techo \"<script type='text/javascript'> abrirDirectorio('\".$rutaActual.\"'); </script>\";\n\t }else{\n\t\techo \"<script type='text/javascript'> alert('Error al ejecutar la operacion'); </script>\";\n\t }\n\t}\n }", "public function remove_dir() {\n\n $path = $this->get_upload_pres_path();\n\n //append_debug_msg($path);\n\n if(!$path || !file_exists($path)){ return; }\n delete_dir($path);\n }", "function borrarCarpeta($carpeta) {\r\n foreach(glob($carpeta . \"/*\") as $archivos_carpeta){ \r\n if (is_dir($archivos_carpeta)){\r\n if($archivos_carpeta != \".\" && $archivos_carpeta != \"..\") {\r\n borrarCarpeta($archivos_carpeta);\r\n }\r\n } else {\r\n unlink($archivos_carpeta);\r\n }\r\n }\r\n rmdir($carpeta);\r\n}", "function remdir()\r\n {\r\n if(is_writable($_REQUEST['file']))\r\n {\r\n $dir=$_GET['file'];\r\n $this->deleteDirectory($dir); \r\n }\r\n else{echo \"Permission Denied !\";}\r\n }", "function eliminaRecursivo($dir) {\r\n\t\t$error=0;\r\n\t\tif (is_dir($dir)) {\r\n\t\t\t$cont=scandir($dir); //Recojemos todo el contenido del directorio\r\n\t\t\tforeach ($cont as $elem) {\r\n\t\t\t\t//Por cada elemento del contenido, si no es el . o los ..\r\n\t\t\t\tif ($elem != \".\" && $elem != \"..\") {\r\n\t\t\t\t\t//generamos la nueva ruta\r\n\t\t\t\t\t$ruta=$dir.\"/\".$elem;\r\n\t\t\t\t\tif (is_dir($ruta)){\r\n\t\t\t\t\t\t//si es un directorio volvemos a llamar a la funcion\r\n\t\t\t\t\t\t$error=$error+eliminaRecursivo($ruta); \r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t//si no lo es, intentamos eliminar el archivo (o lo que sea)\r\n\t\t\t\t\t\tif(!unlink($ruta)){\r\n\t\t\t\t\t\t\t$error=$error+1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tunset($cont);//reseteamos la array de contenidos e intentamos eliminar el directorio\r\n\t\t\tif(!rmdir($dir)){\r\n\t\t\t\t$error=$error+1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $error;\r\n\t}", "function eliminar_archivos($dir)\n{\n\tif (is_dir($dir)) {\n\t\t$directorio = opendir($dir);\n\t\twhile ($archivo = readdir($directorio)) {\n\t\t\tif ($archivo != '.' and $archivo != '..') {\n\t\t\t\t@unlink($dir . $archivo);\n\t\t\t}\n\t\t}\n\t\tclosedir($directorio);\n\t\t@rmdir($dir);\n\t}\n}", "public function destroyFolder()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'];\n if (!file_exists($file)) die('File not found '.$file);\n if (!is_dir($file)) die('Not a folder '.$file);\n $h=opendir($file);\n while($f=readdir($h)) {\n if ($f!='.' && $f!='..') die('Folder is not empty');\n }\n closedir($h);\n rmdir($file);\n }", "public function eliminar(){\n //si el archivo existe\n if(is_file($this->ruta)){\n //doy permisos para eliminar archivos\n chmod($this->ruta, 0777);\n //elimino el archivo y devuelvo el resultado\n return unlink($this->ruta);\n }\n }", "public function delete()\n {\n $filesystem = $this->localFilesystem(dirname($this->path));\n\n method_exists($filesystem, 'deleteDir')\n ? $filesystem->deleteDir(basename($this->path))\n : $filesystem->deleteDirectory(basename($this->path));\n }", "final public static function clearDir($directorio){\n\t\tif (!is_dir($directorio)) {\n\t\t\treturn new \\RuntimeException('El direcotrio especificado no es un directorio.');\n\t\t}\n\t\tif (!is_link($directorio)) {\n\t\t\tforeach (glob($directorio . '*') as $files) {\n\t\t\t\tif (file_exists($files)) {\n\t\t\t\t\tunlink($files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function deleteFolder();", "function remove_client_dir(){\n\t\t$cmd=\"rm -rf $this->client_dir\";\n\t\t`$cmd`;\n\t}", "function borrar_directorio($id_dir,$id_usuario,$parent,$ruta) {\n\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\t\t\n\t\t$query2 = \"SELECT * FROM repositorio_directorios\n\t\tWHERE ruta_dir LIKE '$ruta%' AND id_usuario='$id_usuario'\";\n\t\t$result2 = mysql_query($query2); \n\t\t\n\t\twhile ($row2=mysql_fetch_array($result2)) {\n\t\t\n\t\t\t$id_directorio=$row2['id'];\n\t\t\t$qDelete4 = \"DELETE FROM repositorio_archivos WHERE id_directorio='$id_directorio' AND id_usuario='$id_usuario'\";\n\t\t\t$result4 = mysql_query($qDelete4);\n\t\t\t$qDelete = \"DELETE FROM repositorio_directorios WHERE id='$id_directorio' AND id_usuario='$id_usuario'\";\n\t\t\t$result = mysql_query($qDelete);\n\t\t\n\t\t}\n\t\t\n\t\tmysql_close($connection);\n\t\t \t\n\t}", "function rrmdir($path)\n{\n exec(\"rm -rf {$path}\");\n}", "function remove_dir_rec($dirtodelete)\n{\n if ( strpos($dirtodelete,\"../\") !== false )\n die(_NONPUOI);\n if ( false !== ($objs = glob($dirtodelete . \"/*\")) )\n {\n foreach ( $objs as $obj )\n {\n is_dir($obj) ? remove_dir_rec($obj) : unlink($obj);\n }\n }\n rmdir($dirtodelete);\n}", "function remove_dir($path) {\n\t\tif (file_exists($path) && is_dir($path))\n\t\t\trmdir($path);\n\t}", "public function destroy($nom)\n {\n \t//si se quiere organizar mejor creando una carpeta dentro de public/\n \t//indicar esa carpeta en un path\n \t// $path = \"foldername\".$nom;\n \t//\\Storage::disk('public')->delete($path);\n \\Storage::disk('public')->delete($nom);\n echo \"Archivo $nom eliminado\";\n }", "function borrarDirecctorio($dir) {\r\n\t\tarray_map('unlink', glob($dir.\"/*.*\"));\t\r\n\t\r\n\t}", "function remover($arquivo,$local){\n if($arquivo == ''){\n return;\n }\n $deletar = $local.$arquivo;\n unlink($deletar);\n }", "function delete_folder($main_folder)\r\n{\r\n \r\n\t$dir = $main_folder;\r\n \tchmod($dir, 0755);\r\n \t$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\r\n \t$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);\r\n \tforeach ( $ri as $file ) \r\n \t{\r\n \t $file->isDir() ? rmdir($file) : unlink($file);\r\n \t}\r\n \trmdir($dir);\r\n\r\n}", "function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }", "public function on_delete() {\n $this->remove_dir();\n }", "function remove_directory($src)\n{\n $dir = opendir($src);\n while(false !== ( $file = readdir($dir)) )\n\t{\n if (( $file != '.' ) && ( $file != '..' ))\n\t\t{\n $full = $src . '/' . $file;\n\t\t\t\n if ( is_dir($full) )\n\t\t\t{\n remove_directory($full);\n }\n else\n\t\t\t{\n unlink($full);\n }\n }\n }\n closedir($dir);\n rmdir($src);\n}", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "function wpdev_rm_dir($dir) {\r\n\r\n if (DIRECTORY_SEPARATOR == '/')\r\n $dir=str_replace('\\\\','/',$dir);\r\n else\r\n $dir=str_replace('/','\\\\',$dir);\r\n\r\n $files = glob( $dir . '*', GLOB_MARK );\r\n debuge($files);\r\n foreach( $files as $file ){\r\n if( is_dir( $file ) )\r\n $this->wpdev_rm_dir( $file );\r\n else\r\n unlink( $file );\r\n }\r\n rmdir( $dir );\r\n }", "function delete_dir($path)\n{\n $file_scan = scandir($path);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n if ($filecheck != '.' && $filecheck != '..')\n {\n if ($file_extension == '')\n {\n delete_dir($path . $filecheck . '/');\n }\n else\n {\n unlink($path . $filecheck);\n }\n }\n }\n rmdir($path);\n}", "function clear_local($dir){\n \n$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);\nforeach ( $ri as $file ) {\n $file->isDir() ? rmdir($file) : unlink($file);\n}\n\n\n\n}", "function delete_directory($dirname) {\n if (is_dir($dirname))\n $dir_handle = opendir($dirname);\nif (!$dir_handle)\n return false;\nwhile($myfile = readdir($dir_handle)) {\n if ($myfile != \".\" && $myfile != \"..\") {\n if (!is_dir($dirname.\"/\".$myfile))\n unlink($dirname.\"/\".$myfile);\n else\n delete_directory($dirname.'/'.$myfile);\n }\n}\nclosedir($dir_handle);\nrmdir($dirname);\nreturn true;\n}", "function deletedirectory($path)\n{\n $files = glob($path . '*', GLOB_MARK);\n foreach ($files as $file)\n {\n unlink($file);\n }\n rmdir($path);\n}", "function delete_tmp_folder_content()\n{\n\t$baseDir = '../backups/tmp/';\n\t$files = scandir($baseDir);\n\tforeach ($files as $file) \n\t{\n\t\tif ( ($file != '.') && ($file != '..') && ($file != '.htaccess') ) \n\t\t{\n\t\t\tif ( is_dir($baseDir . $file) ) recursive_deletion($baseDir.$file.'/');\n\t\t\telse unlink('../backups/tmp/' . $file);\n\t\t}\n\t}\n}", "public function delete_with_dir() {\n if(!empty($this->username && $this->id)) {\n if($this->delete()) {\n $target = SITE_PATH . DS . 'admin' . DS . $this->image_path . DS . $this->username;\n if(is_dir($target)){\n $this->delete_files_in_dir($target);\n return rmdir($target) ? true : false;\n echo \"yes\";\n }\n }else{\n return true;\n }\n }else{\n return false;\n }\n }", "function delTree($dir) { \n\t $files = array_diff(scandir($dir), array('.','..')); \n\t foreach ($files as $file) { \n\t (is_dir(\"$dir/$file\")) ? delTree(\"$dir/$file\") : unlink(\"$dir/$file\"); \n\t } \n\t return rmdir($dir); \n\t}", "public function validarDir(){\n\t\t\t$dir = './assets/uploads/alumnos/1.png';\n\t\t\tif (file_exists($dir)) {\n\t\t\t\tunlink($dir);\n\t \techo \"Borrado\";\n\t }\n\t else{\n\t \techo \"FALSE\";\n\t }\n\t\t}", "function rrmdir($dir) {\nif (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != \".\" && $object != \"..\") {\n if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n }\n }\n reset($objects);\n rmdir($dir);\n}\n}", "function remove_dir($dir = null) {\n if (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != \".\" && $object != \"..\") {\n if (filetype($dir.\"/\".$object) == \"dir\") remove_dir($dir.\"/\".$object);\n else unlink($dir.\"/\".$object);\n }\n }\n reset($objects);\n rmdir($dir);\n }\n}", "function directoryRemove($option){\n\tglobal $mainframe, $jlistConfig;\n\n $marked_dir = JArrayHelper::getValue($_REQUEST, 'del_dir', array());\n\n // is value = root dir or false value - do nothing\n if ($marked_dir == '/'.$jlistConfig['files.uploaddir'].'/' || !stristr($marked_dir, '/'.$jlistConfig['files.uploaddir'].'/')) {\n $message = $del_dir.' '.JText::_('COM_JDOWNLOADS_BACKEND_DIRSEDIT_DELETE_DIR_ROOT_ERROR');\n \t$mainframe->redirect('index.php?option='.$option.'&task=directories.edit',$message);\n } else {\n // del marked dir complete\n $res = delete_dir_and_allfiles (JPATH_SITE.$marked_dir);\n\n switch ($res) {\n case 0:\n $message = $marked_dir.'<br />'.JText::_('COM_JDOWNLOADS_BACKEND_DIRSEDIT_DELETE_DIR_MESSAGE_OK');\n break;\n case -2:\n $message = $marked_dir.'<br />'.JText::_('COM_JDOWNLOADS_BACKEND_DIRSEDIT_DELETE_DIR_MESSAGE_ERROR');\n break;\n default:\n $message = $marked_dir.'<br />'.JText::_('COM_JDOWNLOADS_BACKEND_DIRSEDIT_DELETE_DIR_MESSAGE_ERROR_X');\n break;\n } \n\t $mainframe->redirect('index.php?option='.$option.'&task=directories.edit',$message);\n\t}\n}", "function delFolder($dir) {\n\t\tforeach (scandir($dir) as $item) {\n\t\t\tif ($item == '.' || $item == '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n \t\t\tunlink($dir.DIRECTORY_SEPARATOR.$item);\n\n\t\t\t}\n\t\tLogger(\"INFO\", \"Removed directory $dir\");\n\t\trmdir($dir);\n\t}", "protected function removeFilesAndDirectories()\n {\n parent::removeFilesAndDirectories();\n $this->laravel['files']->delete(base_path('routes/admin.php'));\n }", "function rmdirr($dirname){ \r\n\t// Simple delete for a file \r\n\tif (is_file($dirname)) \r\n\t{ \r\n\t\treturn unlink($dirname); \r\n\t} \r\n\t// Loop through the folder \r\n\t$dir = dir($dirname); \r\n\twhile (false !== $entry = $dir->read()) { \r\n\t\t// Skip pointers \r\n\t\tif ($entry == '.' || $entry == '..') \r\n\t\t{ continue; } \r\n\t\t// Deep delete directories \r\n\t\tif (is_dir(\"$dirname/$entry\")) { \r\n\t\t\trmdirr(\"$dirname/$entry\"); \r\n\t\t} else { \r\n\t\t\tunlink(\"$dirname/$entry\"); \r\n\t\t} \r\n\t} \r\n\t// Clean up \r\n\t$dir->close(); \r\n\treturn rmdir($dirname);\r\n}", "private function _do_delete() {\n\t\tif (g($_POST, 'delete')) {\n\t\t\tif (g($this->conf, 'disable.delete')) die('Forbidden');\n\t\t\t\n $path = g($this->conf, 'path');\n if (g($_POST, 'path'))\n $path = \\Crypt::decrypt(g($_POST, 'path'));\n \n $this->_validPath($path);\n \n\t\t\t$parent = dirname($path);\n\t\t\t\n\t\t\tif ($path == g($this->conf, 'type')) {\n\t\t\t\t$this->_msg('Cannot delete root folder', 'error');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ($this->_delete($this->_path($path))) {\n\t\t\t\t$this->_msg('Success delete ['.$path.']');\n\t\t\t\theader('location:'.$this->_url(['path' => $parent]));\n\t\t\t\tdie();\n\t\t\t} else {\n\t\t\t\t$this->_msg('Failed delete ['.$path.'] : please call your administator', 'error');\n\t\t\t}\n\t\t}\n\t}", "protected function removeBackupFolder() {}", "final public function borrar() {\n global $config;\n # Verificar que no se borre a sí mismo.\n if ($this->id != $this->id_user) {\n \n # Se borra al usuario\n $this->db->delete('users',\"id_user='$this->id'\", 'LIMIT 1');\n\n # Directorio real\n $dir = str_replace('{{id_user}}',$this->id,\n str_replace('../', '', self::AVATARS_DIR));\n\n # Si tiene archivos, los borramos\n if (is_dir($dir)) {\n Files::rm_dir($dir);\n }\n }\n\n # Volvemos a la vista\n $this->functions->redir($config['site']['url'].'admins/?success=true');\n\n }", "function delTree($dir) \r\n{\r\n $files = glob( $dir . '*', GLOB_MARK );\r\n foreach( $files as $file )\r\n {\r\n if( substr( $file, -1 ) == '/' )\r\n delTree( $file );\r\n else\r\n unlink( $file );\r\n }\r\n \r\n if( is_dir($dir) ) \r\n rmdir( $dir );\r\n \r\n}", "abstract function delete_dir($filepath);", "static public function ctrBorrarUsuario(){\n\t\tif (isset($_POST['idUsuario'])) {\n\t\t\tif ($_POST['fotoUsuario'] != \"\") {\n\t\t\t\tunlink($_POST[\"fotoUsuario\"]);\n\t\t\t\trmdir('Views/img/usuarios/'.$_POST['usuario']);\n\t\t\t}\n\t\t$answer=adminph\\User::find($_POST['idUsuario']);\n\t\t$answer->delete();\n\t\t}\n\t}", "private function deltree($path) {\n if (!is_link($path) && is_dir($path)) {\n $entries = scandir($path);\n foreach ($entries as $entry) {\n if ($entry != '.' && $entry != '..') {\n $this->deltree($path . DIRECTORY_SEPARATOR . $entry);\n }\n }\n rmdir($path);\n } else {\n unlink($path);\n }\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }", "function RemoveDirectory($dir)\n{\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( is_file(\"$dir/$file\") )\n unlink(\"$dir/$file\");\n elseif( $file != '.' && $file != '..' )\n RemoveDirectory(\"$dir/$file\");\n }\n unset($f);\n \n rmdir($dir);\n}", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public function removeDir($p){\n //remove / from last character\n if( substr($p, strlen($p)-1, 1) == '/' ) $p = substr($p, 0, strlen($p)-1);\n\n //check is dir\n if( is_dir($p) ){\n $files = scandir($p);\n\n foreach($files as $file){\n if( $file != '..' && $file != '.' ){\n if( !is_dir($p . '/' . $file) ) unlink($p . '/' . $file); else $this->removeDir($p . '/' . $file);\n }\n }//end foreach\n\n rmdir( $p );//remove empty folder\n }//end if\n\n return true;\n }", "function delTree($directory)\n{\n\t$files = array_diff(scandir($directory), array('.','..'));\n \tforeach($files as $file)\n\t{\n\t\t//echo(\"$directory/$file<br />\");\n \t\t(is_dir(\"$directory/$file\")) ? delTree(\"$directory/$file\") : unlink(\"$directory/$file\"); \n \t}\n \treturn rmdir($directory);\n}", "function delete_user_dir($userId) {\n\t$userDir=get_user_dir($userId);\t\n\tif($userDir) {\t\t\n\t\t//File destination\n\t\t$userPath=FS_PATH.$userDir;\"some/dir/*.txt\";\n\t\tarray_map('unlink', glob(FS_PATH.$userDir.\"/*.*\"));\n\t\tif(rmdir($userPath)) { \n\t\t\treturn true;\n\t\t} else return false;\t\t\n\t} else {\n\t\terror_log(\"delete_user_dir: user_dir could not be found.\",0);\n\t\treturn false;\n\t}\n}", "public function removeAppDirectory() {\n $dir = app_path() . '/EasyApi';\n\n $it = new \\RecursiveDirectoryIterator($dir, \\RecursiveDirectoryIterator::SKIP_DOTS);\n $files = new \\RecursiveIteratorIterator($it,\n \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach($files as $file) {\n if ($file->isDir()){\n rmdir($file->getRealPath());\n } else {\n unlink($file->getRealPath());\n }\n }\n rmdir($dir);\n }", "function delete_dir_with_file($target)\n{\n if (is_dir($target)) {\n $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned\n\n foreach ($files as $file) {\n delete_dir_with_file($file);\n }\n\n if (file_exists($target)) {\n rmdir($target);\n }\n } elseif (is_file($target)) {\n unlink($target);\n }\n}", "function rrmdir($dir) {\n if (is_dir($dir)) { \n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != \".\" && $object != \"..\") { \n if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object); \n } \n } \n reset($objects);\n rmdir($dir); \n } \n }", "function deleteFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'.$user_dir; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "function rm_r ($what)\n{\n\tif (!is_dir($what))\n\t\tunlink($what);\n\telse\n\t{\n\t\t$dir = getTreeStructure($what, GTS_ALL, GTS_SHALLOW);\n\t\t\n\t\tfor($i=0; $i<count($dir); $i++)\n\t\t\trm_r($what . '/' . $dir[$i]);\n\t\t\n\t\trmdir($what);\n\t}\n}", "function rrmdir($src) {\n $dir = opendir($src);\n while(false !== ( $file = readdir($dir)) ) {\n if (( $file != '.' ) && ( $file != '..' )) {\n\n $full = $src . '/' . $file;\n if ( is_dir($full) ) {\n rrmdir($full);\n }\n else {\n unlink($full);\n }\n }\n }\n closedir($dir);\n rmdir($src);\n}", "function fud_rmdir($dir, $deleteRootToo=false)\n{\n\tif(!$dh = @opendir($dir)) {\n\t\treturn;\n\t}\n\twhile (false !== ($obj = readdir($dh))) {\n\t\tif($obj == '.' || $obj == '..') {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!@unlink($dir .'/'. $obj)) {\n\t\t\tfud_rmdir($dir .'/'. $obj, true);\n\t\t}\n\t}\n\tclosedir($dh);\n\tif ($deleteRootToo) {\n\t\t@rmdir($dir);\n\t}\n\treturn;\n}", "private function remove_dir($path) {\n\t $item = new DirectoryIterator($path);\n\t foreach($item as $folder) {\n\t if($folder->isFile()) {\n\t unlink($folder->getRealPath());\n\t } else if(!$folder->isDot() && $folder->isDir()) {\n\t $this->remove_dir($folder->getRealPath());\n\t }\n\t }\n\t rmdir($path);\n\t}", "function eliminarpermiso()\n {\n $oconexion = new conectar();\n //se establece conexión con la base de datos\n $conexion = $oconexion->conexion();\n //consulta para eliminar el registro\n $sql = \"UPDATE permiso SET eliminado=1 WHERE id_permiso=$this->id_permiso\";\n // $sql=\"DELETE FROM estudiante WHERE id=$this->id\";\n //se ejecuta la consulta\n $result = mysqli_query($conexion, $sql);\n return $result;\n }", "function recursive_deletion($baseDir)\n{\n\t$files = scandir($baseDir);\n\tforeach ($files as $file) \n\t{\n\t\tif ( ($file != '.') && ($file != '..') ) \n\t\t{\n\t\t\tif ( is_dir($baseDir . $file) ) recursive_deletion($baseDir.$file.'/');\n\t\t\telse unlink($baseDir . $file);\n\t\t}\n\t}\n\trmdir($baseDir);\n}", "function deleteFromServer ($fileName) {\n\n\t// Save the current directory\n\t$old = getcwd(); \n // Changing to correct dir\n chdir(\"../../uploads\"); \n // Removing file\n unlink($fileName);\n // Restore the old working directory \n chdir($old); \n}", "function _removeDir($dir) {\r\n\t\tif(file_exists($dir)) {\r\n\t\t\tif($objs = glob($dir.\"/*\"))\r\n\t\t\t\tforeach($objs as $obj) {\r\n\t\t\t\t\tis_dir($obj) ? rmdir($obj) : unlink($obj);\r\n\t\t\t\t}\r\n\t\t\trmdir($dir);\r\n\t\t}\r\n\t}", "public function 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 removePageFolder($path);", "function rrmdir($dir) {\n if (is_dir($dir)) { \n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != \".\" && $object != \"..\") { \n if (filetype($dir.\"/\".$object) == \"dir\") rmdir($dir.\"/\".$object); else \\\nunlink($dir.\"/\".$object); \n } \n } \n reset($objects); \n rmdir($dir); \n } \n}", "public function delete_file(){\n unlink('/opt/lampp/htdocs/specijalisticki_rad/uploaded_images/'.$this->name);\n\n }", "function scorm_delete_files($directory) {\n if (is_dir($directory)) {\n $files=scorm_scandir($directory);\n set_time_limit(0);\n foreach($files as $file) {\n if (($file != '.') && ($file != '..')) {\n if (!is_dir($directory.'/'.$file)) {\n unlink($directory.'/'.$file);\n } else {\n scorm_delete_files($directory.'/'.$file);\n }\n }\n }\n rmdir($directory);\n return true;\n }\n return false;\n}", "function rrmdir($path) {\n // Open the source directory to read in files\n $i = new DirectoryIterator($path);\n foreach($i as $f) {\n if($f->isFile()) {\n unlink($f->getRealPath());\n } else if(!$f->isDot() && $f->isDir()) {\n rrmdir($f->getRealPath());\n }\n }\n rmdir($path);\n}", "function delete_dir($dir) {\n foreach (array_keys(scan_dir($dir)) as $file) {\n if (is_dir($file)) {\n delete_dir($file);\n } else {\n rm($file);\n }\n }\n\n rmdir($dir);\n}", "function deleteArticleTree() {\n\t\tparent::rmtree($this->filesDir);\n\t}", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function eliminararchivoAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloArchivo->eliminar($id, $this->_usuario);\n\t\t\t\t\t\n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n\t\t\t\t\n\t\t\t\t} catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "public function delete()\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file->delete();\n\t\t}\n\t\t\n\t\t// Allow filesystem transactions\n\t\tif (fFilesystem::isInsideTransaction()) {\n\t\t\treturn fFilesystem::delete($this);\n\t\t}\n\t\t\n\t\trmdir($this->directory);\n\t\t\n\t\t$exception = new fProgrammerException(\n\t\t\t'The action requested can not be performed because the directory has been deleted'\n\t\t);\n\t\tfFilesystem::updateExceptionMap($this->directory, $exception);\n\t}", "function removeDirectory($path) {\n $files = glob($path . '/*');\n foreach ($files as $file) {\n is_dir($file) ? removeDirectory($file) : unlink($file);\n }\n rmdir($path);\n return;\n}", "function cleanDir($path) {\n if(file_exists($path) && is_dir($path)){\n\t\t$dirHandle = opendir($path);\n\t\twhile(false!==($file = readdir($dirHandle))){\n\t\t\tif($file!='.' && $file!='..' && $file!='db_upload.php'){\n\t\t\t\t$tmpPath = $path.'/'.$file;\n\t\t\t\tchmod($tmpPath, 0777);\n\t\t\t\tif(is_dir($tmpPath)){\n\t\t\t\t\tcleanDir($tmpPath);\n\t\t\t\t} else {\n\t\t\t\t\tif(!unlink($tmpPath)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($dirHandle);\n \n\t} else {\n\t\treturn false;\n\t}\n}", "private function remove_directory($path) {\n $files = glob($path . '/*');\n foreach ($files as $file) {\n is_dir($file) ? remove_directory($file) : unlink($file);\n }\n rmdir($path);\n return;\n }", "public static function deleteDirectory ($path) {\n\t\t\\rmdir($path);\n\t}", "function del_compte()\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire;\r\n\r\n\t\tif($user[1] >= \"1\")\r\n\t\t{\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\r\n\t\t\tif ($rep = @opendir($repertoire.$user[0]))\r\n\t\t\t{\r\n\t\t\t\twhile ($file = readdir($rep)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \"..\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($file != \".\") \r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t@unlink($repertoire.$user[0].\"/\".$file);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@rmdir($repertoire.$user[0]);\r\n\t\t\techo\"<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._COMTPEDELETE.\"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\",3);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "function delFile($path)\n {\n unlink($this->dir . DIRECTORY_SEPARATOR . $path);\n }", "public function delete(): void\n {\n unlink($this->getPath());\n }", "function delete_files($target) { \n if(is_dir($target)){\n $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned\n \n foreach( $files as $file )\n {\n delete_files( $file ); \n }\n \n rmdir( $target );\n } elseif(is_file($target)) {\n unlink( $target ); \n }\n}", "function rm_recursive($dir) {\n\t$dir = rtrim($dir, '\\\\/');\n\tif (is_dir($dir)) { \n\t\t$objects = scandir($dir); \n\t\tforeach ($objects as $object) { \n\t\t\tif ($object != \".\" && $object != \"..\") { \n\t\t\t\tif (filetype($dir.\"/\".$object) == \"dir\") rm_recursive($dir.\"/\".$object); else unlink($dir.\"/\".$object); \n\t\t\t} \n\t\t} \n\t\treset($objects); \n\t\trmdir($dir); \n\t} \t\n}", "function clearDirUpload($dossier) {\r\n\t\t$ouverture=@opendir($dossier);\r\n\t\tif (!$ouverture) return false;\r\n\t\twhile($fichier=readdir($ouverture)) {\r\n\t\t\tif ($fichier == '.' || $fichier == '..' || $fichier == \".htaccess\") continue;\r\n\t\t\t\tif (is_dir($dossier.\"/\".$fichier)) {\r\n\t\t\t\t\t$r=clearDirUpload($dossier.\"/\".$fichier);\r\n\t\t\t\t\tif (!$r) return false;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$r=@unlink($dossier.\"/\".$fichier);\r\n\t\t\t\t\tif (!$r) return false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tclosedir($ouverture);\r\n\t\t$r=@rmdir($dossier);\r\n\t\tif (!$r) return false;\r\n\t\treturn true;\r\n\t}", "public function delete_output_dir($modeloutputdir, $uniqueid);", "function borrarImagen($idImagen, $ruta){\n $conn=connexioBD();\n $sql=\"DELETE FROM imatges WHERE id='$idImagen'\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n unlink($ruta);\n $conn->close();\n}", "public function deleteDir($dirname)\n {\n }", "function eliminaBot($nickBot)\n\t{\n\t\tforeach ( scandir(XDCCDIR) as $item )\n\t\t{\n\t\t\tif ( $item == '.' || $item == '..' )\n\t\t\t\tcontinue;\n\t\t\t$full_path = XDCCDIR.\"/$item\";\n\t\t\tif ( is_dir($full_path) )\n\t\t\t{\n\t\t\t\teliminaBot($full_path, $nickBot);\n\t\t\t}\n\t\t\telse if( ($nickname = getNickName($full_path)) )\n\t\t\t{\n\t\t\t\tif( $nickname == $nickBot )\n\t\t\t\t{\n\t\t\t\t\tunlink($full_path);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function gttn_tpps_rmdir($dir) {\n if (is_dir($dir)) {\n $children = scandir($dir);\n foreach ($children as $child) {\n if ($child != '.' and $child != '..') {\n if (is_dir($dir . '/' . $child) and !is_link($dir . '/' . $child)) {\n gttn_tpps_rmdir($dir . '/' . $child);\n }\n else {\n unlink($dir . '/' . $child);\n }\n }\n }\n rmdir($dir);\n }\n}", "public function delete()\n {\n\n if (is_dir($this->path)) {\n try {\n $directory = new RecursiveDirectoryIterator($this->path, RecursiveDirectoryIterator::CURRENT_AS_SELF);\n $iterator = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::CHILD_FIRST);\n } catch (\\Exception $e) {\n return false;\n }\n\n foreach ($iterator as $item) {\n $filePath = $item->getPathname();\n if ($item->isFile() || $item->isLink()) {\n //@codingStandardsIgnoreStart\n if (@unlink($filePath)) {\n //@codingStandardsIgnoreEnd\n $this->messages[] = sprintf('%s removido.', $filePath);\n } else {\n $this->errors[] = sprintf('%s não removido.', $filePath);\n }\n } elseif ($item->isDir() && !$item->isDot()) {\n //@codingStandardsIgnoreStart\n if (@rmdir($filePath)) {\n //@codingStandardsIgnoreEnd\n $this->messages[] = sprintf('%s removido.', $filePath);\n } else {\n $this->errors[] = sprintf('%s não removido', $filePath);\n return false;\n }\n }\n }\n\n $this->path = rtrim($this->path, DIRECTORY_SEPARATOR);\n //@codingStandardsIgnoreStart\n if (@rmdir($this->path)) {\n //@codingStandardsIgnoreEnd\n $this->messages[] = sprintf('%s removido', $this->path);\n } else {\n $this->errors[] = sprintf('%s não removido', $this->path);\n return false;\n }\n }\n\n return true;\n }", "function rrmdir($dir) {\n\tif (is_dir($dir)) {\n\t $objects = scandir($dir);\n\n\t //debug($objects);\n\n\t foreach ($objects as $object) {\n\t\tif ($object != \".\" && $object != \"..\") {\n\t\t\t//echo $dir.\"/\".$object . '<br>';\n\n\t\t if (filetype($dir.\"/\".$object) == \"dir\") rmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n\t\t}\n\t }\n\t reset($objects);\n\t rmdir($dir);\n\t}\n }", "function rmdir_recursive($dir) {\n\n\t\t$basicPath = ROOT.DS.\"app\".DS.\"webroot\".DS.\"contents\".DS;\n\t\tif(is_dir($basicPath.$dir)){\n\t\t$files = scandir($basicPath.$dir);\n\t\tarray_shift($files); // remove '.' from array\n\t\tarray_shift($files); // remove '..' from array\n\n\t\tforeach ($files as $file) {\n\t\t$file = $basicPath.$dir .DS. $file;\n\t\tif (is_dir($file)) {\n\t\trmdir_recursive($file);\n\t\trmdir($file);\n\t\t} else {\n\n\t\tunlink($file);\n\t\t }\n\t\t}\n\t\trmdir($basicPath.$dir);\n\t\t}\n\t}", "function delete($path)\n{\n if (is_dir($path) === true) {\n $files = array_diff(scandir($path), array('.', '..'));\n\n foreach ($files as $file) {\n delete(realpath($path) . '/' . $file);\n }\n\n return rmdir($path);\n } else if (is_file($path) === true) {\n return unlink($path);\n }\n\n return false;\n}", "function delete($path)\n{\n if (is_dir($path) === true) {\n $files = array_diff(scandir($path), array('.', '..'));\n\n foreach ($files as $file) {\n delete(realpath($path) . '/' . $file);\n }\n\n return rmdir($path);\n } else if (is_file($path) === true) {\n return unlink($path);\n }\n\n return false;\n}", "public function prune()\r\n\t{\r\n\t\tif (file_exists($this->migrationFiles)) {\r\n\t\t\t$this->rmdir_recursive($this->migrationFiles);\r\n\t\t}\r\n\t}", "function deleteDocument($userSpace){\n unlink(\"$userSpace/friends.txt\");\n if ( $handle = opendir( \"$userSpace/files\" ) ) {\n while ( false !== ( $item = readdir( $handle ) ) ) {\n if ( $item != \".\" && $item != \"..\" ) {\n if( unlink( \"$userSpace/files/$item\" ) ) echo \"delete the file successfully:$userSpace/$item \\n\"; \n }\n }\n closedir( $handle );\n rmdir(\"$userSpace/files\");\n if( rmdir( $userSpace ) ) echo \"delete Directory successfully: $userSpace \\n\";\n }\n }", "function remove_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$objects=scandir($dir);\n\tforeach($objects as $object){\n\t\tif($object!='.'&&$object!='..'){\n\t\t\tif(filetype($dir.'/'.$object)=='dir')\n\t\t\t\tremove_dir($dir.'/'.$object);\n\t\t\telse\n\t\t\t\tunlink($dir.'/'.$object);\n\t\t}\n\t}\n\treset($objects);\n\treturn rmdir($dir);\n}", "private function deleteDirectory($path)\n {\n $files = glob('../' . $path . '/*');\n\n //Supprime les fichiers\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n //suppression du dossier vide\n if (is_dir('../' . $path)) {\n rmdir('../' . $path);\n }\n }" ]
[ "0.726087", "0.7205929", "0.71847975", "0.70745915", "0.6993625", "0.6987787", "0.6937795", "0.67718405", "0.6760282", "0.6746342", "0.6740512", "0.6701986", "0.6687171", "0.66768277", "0.6674728", "0.66515046", "0.6611792", "0.6610989", "0.66024506", "0.6590333", "0.6589668", "0.65565926", "0.65411365", "0.651897", "0.65069073", "0.6502917", "0.6502645", "0.6467367", "0.6466724", "0.64564615", "0.6447322", "0.6380516", "0.63720626", "0.6355925", "0.635073", "0.634914", "0.63353384", "0.62980586", "0.62955886", "0.62821615", "0.6279331", "0.6278387", "0.62692046", "0.62601113", "0.6239024", "0.6231705", "0.6229517", "0.6228689", "0.6227753", "0.6214655", "0.62063175", "0.6192102", "0.6186313", "0.6181788", "0.6176267", "0.61724055", "0.6166055", "0.6161806", "0.6153836", "0.6150643", "0.61492306", "0.6133832", "0.6131571", "0.61298555", "0.6120078", "0.6116503", "0.61033577", "0.60957026", "0.60925126", "0.60894835", "0.60874546", "0.60830414", "0.6081312", "0.6077345", "0.60714006", "0.6063786", "0.605743", "0.6057228", "0.60566974", "0.60498136", "0.6048034", "0.6047753", "0.6041613", "0.60375243", "0.6036007", "0.6033461", "0.60312766", "0.6017772", "0.6009269", "0.60070413", "0.5990749", "0.5982555", "0.5981147", "0.5975302", "0.59735054", "0.59735054", "0.5969465", "0.59689695", "0.59655064", "0.59639764" ]
0.7954474
0
/ genera el listado de categorias
function listarCategoriasComponente($componente){ $sql = sprintf("SELECT * FROM `categorias` WHERE `componente` = %s AND `nivel` = 0",varSQL($componente)); $c = consulta($sql,true); if($c!=false){ $c = $c['resultado'][0]['id']; $listado = array(); lcc($c,$listado); return $listado; }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getList()\n {\n $categories = array();\n\n $q = $this->_db->query('SELECT * FROM categorie ORDER BY idCategorie');\n\n while ($donnees = $q->fetch(PDO::FETCH_ASSOC))\n {\n $categories[] = ($donnees);\n \n }\n }", "public function getCategories();", "public function getCategories();", "public static function getCategoriaLista() {\n $dni=Yii::$app->user->identity->id;\n $droptions = Categoria::find()->where(['id_profesor_titular'=>$dni])->orWhere(['id_profesor_titular'=>$dni])->asArray()->all();\n return ArrayHelper::map($droptions, 'id_categoria', 'nombre_categoria');\n }", "public function ListarCategorias()\n{\n\tself::SetNames();\n\t$sql = \" select * from categorias\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "function getCategorias(){\r\n $conector = new Conector();\r\n $banco = new BancoCategoria();\r\n return $banco->getCategorias($conector->getConexao());\r\n }", "public function getAllCategories();", "function getCategories() {\r\n\t\t$categories = $this->find('all');\r\n\t\t$result = array();\r\n\t\tforeach ($categories as $category) {\r\n\t\t\t$result[$category['NbCategory']['id']] = array(\r\n\t\t\t\t'probability' => $category['NbCategory']['probability'],\r\n\t\t\t\t'word_count' => $category['NbCategory']['word_count']\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "public function findCategories();", "public function getCategorias(){\n\t\t$sql = \"SELECT * FROM tipo_producto ORDER BY nombre_tipo_prod\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "public function categorie()\n {\n $data[\"categories\"]=$this->categories->list();\n $this->template_admin->displayad('categories' , $data);\n }", "public function getCategoriesForListView(): Collection;", "public function listCategorias()\n\t{\n\t\t$em = $this->getEntityManager();\n\t\t\n\t\ttry{\n\t\t\t$dql = 'SELECT cat, sin FROM MbpPersonalBundle:Categorias cat JOIN cat.idSindicato sin\n\t\t\t\t\tWHERE cat.inactivo = 0';\n\t\t\t$query = $em->createQuery($dql);\n\t\t\t$res = $query->getArrayResult();\n\t\t\t\n\t\t\t$rec = array();\n\t\t\t$i=0;\n\t\t\tforeach($res as $reg){\n\t\t\t\t$rec[$i] = $reg;\n\t\t\t\t$rec[$i]['sindicato'] = $reg['idSindicato']['sindicato'];\n\t\t\t\t$rec[$i]['idCategoria'] = $reg['id'];\n\t\t\t\t$rec[$i]['idSindicato'] = $reg['idSindicato']['id'];\n\t\t\t\tunset($rec[$i]['id']);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$jsonRes = json_encode(array(\n\t\t\t\t'items' => $rec\n\t\t\t));\n\t\t\t\n\t\t\techo $jsonRes;\t\n\t\t}catch(\\Doctrine\\ORM\\ORMException $e){\n\t\t\t$this->get('logger')->error($e->getMessage());\n\t\t}\n\t\t\n\t}", "function getCategories(){\n\t$storeId = Mage::app()->getStore()->getId(); \n\n\t$collection = Mage::getModel('catalog/category')->getCollection()\n\t\t->setStoreId($storeId)\n\t\t->addAttributeToSelect(\"name\");\n\t$catIds = $collection->getAllIds();\n\n\t$cat = Mage::getModel('catalog/category');\n\n\t$max_level = 0;\n\n\tforeach ($catIds as $catId) {\n\t\t$cat_single = $cat->load($catId);\n\t\t$level = $cat_single->getLevel();\n\t\tif ($level > $max_level) {\n\t\t\t$max_level = $level;\n\t\t}\n\n\t\t$CAT_TMP[$level][$catId]['name'] = $cat_single->getName();\n\t\t$CAT_TMP[$level][$catId]['childrens'] = $cat_single->getChildren();\n\t}\n\n\t$CAT = array();\n\t\n\tfor ($k = 0; $k <= $max_level; $k++) {\n\t\tif (is_array($CAT_TMP[$k])) {\n\t\t\tforeach ($CAT_TMP[$k] as $i=>$v) {\n\t\t\t\tif (isset($CAT[$i]['name']) && ($CAT[$i]['name'] != \"\")) {\t\t\t\t\t\n\t\t\t\t\t/////Berry add/////\n\t\t\t\t\tif($k == 2)\n\t\t\t\t\t\t$CAT[$i]['name'] .= $v['name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$CAT[$i]['name'] .= \"\";\n\t\t\t\t\t\t\n\t\t\t\t\t//$CAT[$i]['name'] .= \" > \" . $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$CAT[$i]['name'] = $v['name'];\n\t\t\t\t\t$CAT[$i]['level'] = $k;\n\t\t\t\t}\n\n\t\t\t\tif (($v['name'] != \"\") && ($v['childrens'] != \"\")) {\n\t\t\t\t\tif (strpos($v['childrens'], \",\")) {\n\t\t\t\t\t\t$children_ids = explode(\",\", $v['childrens']);\n\t\t\t\t\t\tforeach ($children_ids as $children) {\n\t\t\t\t\t\t\tif (isset($CAT[$children]['name']) && ($CAT[$children]['name'] != \"\")) {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$CAT[$children]['name'] = $CAT[$i]['name'];\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\telse {\n\t\t\t\t\t\tif (isset($CAT[$v['childrens']]['name']) && ($CAT[$v['childrens']]['name'] != \"\")) {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$CAT[$v['childrens']]['name'] = $CAT[$i]['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tunset($collection);\n\tunset($CAT_TMP);\n\treturn $CAT;\n}", "public function getCategories() : array;", "public function listaCategoria(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * from tbcategorias order by idcategoria\";\n $sql = $this->conexao->query($sql);\n\n while ($row = $sql->fetch_assoc()) {\n $data[] = $row;\n }\n \n \n return $data;\n\n }", "public function getAll(){\n\n \t$categorias = $this->db->query(\"SELECT * FROM categorias ORDER BY id_categoria DESC\");\n\n \treturn $categorias;\n }", "public function get_categories()\n {\n $param = array(\n 'delete_flg' => $this->config->item('not_deleted','common_config')\n );\n $groups = $this->get_tag_group();\n\n if (empty($groups)) return array();\n\n $group_id = array_column($groups, 'tag_group_id');\n $param = array_merge($param, array('group_id' => $group_id));\n\n $tags = $this->Logic_tag->get_list($param);\n\n return $this->_generate_categories_param($groups, $tags);\n }", "public function get_categories() {\n\t\treturn [ 'kodeforest' ];\n\t}", "public function get_categories() {\n\t\treturn [ 'kodeforest' ];\n\t}", "public function getListaCategorias()\n {\n $response = \\DB::table('peliculas')\n ->join('peliculas_categorias', 'peliculas_categorias.id_pelicula', '=', 'peliculas.id_pelicula')\n ->join('categorias', 'categorias.id_categoria', '=', 'peliculas_categorias.id_categoria')\n ->select('peliculas.pel_titulo', 'categorias.cat_nombre')\n ->orderby('categorias.cat_nombre')\n ->get();\n return response()->json($response);\n }", "public function getCategoriesGroup() {\n\t\t$imageTypes = $this->getImagesTypes();\n\t\t$categories = $this->getCollection()\n\t\t\t\t->addFieldToFilter('status',1);\n\t\t$arrayOptions = array();\n\t\t$i = 1;\n\t\tforeach($imageTypes as $key => $imageType)\n\t\t{\n\t\t\tif($key == 'uncategorized')\n\t\t\t{\n\t\t\t\t$arrayOptions[0] = 'Uncategorized';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$arrayValue = array();\n\t\t\tforeach($categories as $category)\n\t\t\t{\n\t\t\t\tif($category->getImageTypes() == $key)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$arrayValue[] = array('value'=>$category->getId(),'label'=>$category->getTitle());\n\t\t\t\t}\n\t\t\t}\n\t\t\t$arrayOptions[$i]['value'] = $arrayValue;\n\t\t\t$arrayOptions[$i]['label'] = $imageType;\n\t\t\t$i++;\n\t\t}\n\t\treturn $arrayOptions;\n\t}", "public function get_categories() {\n\t\treturn array( 'listeo' );\n\t}", "public static function categories() {\n $db = Db::getInstance();\n $req = $db->query('SELECT * FROM category');\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getCategorys()\r\n {\r\n $groupData = $this->getGroupById();\r\n $html = null;\r\n if ($groupData) {\r\n foreach (explode(',', $groupData['categorys']) as $categoryId) {\r\n if ($categoryId) {\r\n $itemCategorys = $this->itemCollectionFactory->create()\r\n ->addFieldToFilter('category_id', array('eq' => $categoryId))\r\n ->addFieldToFilter('status', array('eq' => 1))\r\n ->addFieldToFilter('menu_type', array('eq' => 1));\r\n if ($itemCategorys->getData()) {\r\n foreach ($itemCategorys as $item) {\r\n $html .= $this->getMegamenuHtml($item);\r\n continue;\r\n }\r\n } else {\r\n $category = $this->getCategoryById($categoryId);\r\n if ($category) {\r\n $parentClass = ($this->hasSubcategory($category->getId())) ? 'parent' : null;\r\n $html .= '<li class=\"' . $this->checkCurrentCategory($category->getId()) . ' ui-menu-item level0 ' . $this->getMenuTypeGroup($groupData['menu_type']) . ' ' . $parentClass . ' \">';\r\n $html .= '<a href=\"' . $category->getUrl() . '\" class=\"level-top\"><span>' . $category->getName() . '</span></a>';\r\n if ($this->hasSubcategory($category->getId())) {\r\n $html .= '<div class=\"open-children-toggle\"></div>';\r\n }\r\n //get html of category\r\n $html .= $this->getHtmlCategory($category,\r\n $this->getMenuTypeGroup($groupData['menu_type']));\r\n $html .= '</li>';\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return $html;\r\n }", "public function get_categories() {\n\t\treturn [ 'happyden' ];\n\t}", "public function getCategorias() {\n $categorias=$this->db->query('SELECT * FROM categorias ORDER BY id DESC;');\n return $categorias;\n }", "public function listarCategorias() {\n $sql = \"SELECT *\n FROM categorias\n ORDER BY id DESC\";\n\n return $sql;\n }", "public static function lista_categorias($conexion) {\n //utilizado en el select tipo en registrar activo\n $lista_categorias = array();\n\n if (isset($conexion)) {\n try {\n $sql = \"select * from categoria\";\n $sentencia = $conexion->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll();\n\n if (count($resultado)) {\n foreach ($resultado as $fila) {\n $categoria = new Categoria();\n $categoria->setCodigo_tipo($fila['codigo_tipo']);\n $categoria->setNombre($fila['nombre']);\n\n $lista_categorias[] = $categoria;\n }\n }\n } catch (PDOException $exc) {\n print('ERROR' . $exc->getMessage());\n }\n }\n\n return $lista_categorias;//eviamos la lista de tipos\n }", "public function getStrategys()\n {\n return [\n\n ];\n }", "public function getCategories()\n {\n return [ 'categories' => self::CATEGORIES ];\n }", "public function get_categories() {\n return [ 'Alita-elements' ];\n }", "public function get_categories() {\n return [ 'Alita-elements' ];\n }", "public function getAllWithCategory();", "public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}", "public static function getCategoriesList(){\n\n //Подключаемся к БД:\n $db = DB::getConnection();\n\n $categoruList = array();\n\n $sql = 'SELECT id, name FROM category '\n . ' WHERE status = \"1\" '\n . 'ORDER BY sort_order ASC';\n\n //dd($sql);\n\n $result = $db->query($sql);\n\n\n $i = 0;\n\n while($row = $result->fetch()){\n $categoruList[$i]['id'] = $row['id'];\n $categoruList[$i]['name'] = $row['name'];\n $i++;\n }\n\n return $categoruList;\n\n }", "public function getCategoryList() {\n $categories = $this->couponServices_model->fetchCategories();\n\n $category_options = array();\n $category_options[\"\"] = \"-- Select category --\";\n foreach ($categories as $item) {\n $category_options[$item['categoryId']] = $item['categoryName'];\n }\n return $category_options;\n }", "public function get_categories()\n {\n return ['general'];\n }", "public function get_categories()\n {\n return ['general'];\n }", "public function findAllCategories(): iterable;", "function showCategoryNames(){\n $this->load->model('pagesortingmodel');\n $data['groups'] = $this->pagesortingmodel->getAllCategories();\n $this->load->view('admin/create_categories',$data);\n }", "public function getCategories()\n {\n $request = \"SELECT * FROM category\";\n $request = $this->connexion->query($request);\n $categories = $request->fetchAll(PDO::FETCH_ASSOC);\n return $categories;\n }", "private static function _getSelectCategories()\n {\n $categories = Blog::category()->orderBy('name')->all();\n $sortedCategories = array();\n\n foreach($categories as $c)\n $sortedCategories[$c->id] = $c->name;\n\n return $sortedCategories;\n }", "public function getCategoriesList() {\n return $this->_get(16);\n }", "public function getCategorizedTables() {}", "public function listadoCategorias(){\n $resultado = array();\n try {\n $sql = new Sql($this->dbAdapter);\n $select = $sql->select();\n $select->columns(array(\"value\"=>\"idCategoria\",\"text\"=>\"nombreCategoria\"));\n $select->from(array('c'=>'categorias'));\n $select->order('nombreCategoria ASC');\n $sqlString = $select->getSqlString($this->dbAdapter->getPlatform()); \n $result = $this->dbAdapter->query($sqlString,Adapter::QUERY_MODE_EXECUTE);\n $resultado = $result->toArray(); \n } catch (\\Exception $e) {\n $code = $e->getCode();\n $msg = $e->getMessage();\n $file = $e->getFile();\n $line = $e->getFile();\n $resultado = array(\"ErrorInterno\" => \"$line ERROR #: $code ERROR: $msg\");\n }\n \n $this->dbAdapter->getDriver()->getConnection()->disconnect();\n return $resultado;\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 }", "function categoria($productos) {\r\n $opciones = array(); \r\n foreach($productos->producto as $producto) {\r\n $opciones[] = $producto->categoria;\r\n }\r\n //eliminar los duplicados para mostrar el select con las opciones\r\n $opciones = array_unique($opciones);\r\n\r\n //crear las opciones del select sin repetidos\r\n for ($i=0; $i < count($opciones); $i++) { \r\n echo \"<option value='\" . $opciones[$i] . \"'>\" . ucwords($opciones[$i]) . \"</option>\";\r\n }\r\n }", "function getAllCategories()\n {\n // Get list of categories using solr\n $metadataDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"category\");\n $enabledDao = MidasLoader::loadModel('Metadata')->getMetadata(MIDAS_METADATA_TEXT, \"mrbextrator\", \"slicerdatastore\");\n $terms = array(); \n if($metadataDao)\n {\n $db = Zend_Registry::get('dbAdapter');\n $results = $db->query(\"SELECT value, itemrevision_id FROM metadatavalue WHERE metadata_id='\".$metadataDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n foreach($results as $result)\n {\n $arrayTerms = explode(\" --- \", $result['value']);\n foreach($arrayTerms as $term)\n { \n if(strpos($term, \"zzz\") === false) continue;\n $tmpResults = $db->query(\"SELECT value FROM metadatavalue WHERE itemrevision_id='\".$result['itemrevision_id'].\"' AND metadata_id='\".$enabledDao->getKey().\"' order by value ASC\")\n ->fetchAll();\n if(empty($tmpResults))continue;\n $term = trim(str_replace('zzz', '', $term));\n if(!isset($terms[$term]))\n {\n $terms[$term] = 0;\n }\n $terms[$term]++;\n }\n } \n }\n ksort($terms);\n return $terms;\n }", "function categories() {\n\n foreach ($this->loadCategoryAssoc() as $id=>$title) {\n $options[] = array(\n 'id' => intval($id),\n 'title' => $title,\n );\n }\n\n return $options;\n }", "public function getAll()\n {\n return CategorieResource::collection(Categorie::paginate());\n }", "function read_Categories() {\n\n\t\tglobal $myCategories;\n\t\tglobal $gesamt;\n\t\t\n\t\t$i = 0;\n\t\t\n\t\tforeach ($myCategories as $catInfo):\n\t\t\n\t\t$test=$myCategories->category[$i]['typ'];\n\t\t\n\t\tarray_push($gesamt, $test);\n\t\t\n\t\t$i++;\n\t\tendforeach;\t\n\t\t\n\t}", "public function get(){\n\n $tabla = \"categorias\";\n \n $respuesta = ModeloCategorias::get($tabla);\n \n return $respuesta; \n }", "public static function getCategories() {\n return Catalog::category()->orderBy('weight')->orderBy('name')->all();\n }", "public function get_Categorias() {\n $this->db->order_by(\"orden\", \"ASC\");\n $query = $this->db->get( $this->table );\n \n $result = $query->result_array();\n \n return $result;\n }", "public function mostrar_categorias(){\n $conexion = Conexion();\n $sql=\"SELECT * from tbl_categoria\"; \n foreach ($conexion->query($sql) as $row){\n echo \"<option value='{$row ['id_categoria']}'>{$row ['nombre']}</option>\"; \n }\n }", "public function consultarCategoria(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * from tbcategorias order by idcategoria; \";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) { \n $dado = array();\n $dado['idcategoria'] = $row[\"idcategoria\"];\n $dado['nome'] = $row[\"nome\"];\n $dado['habilitado'] = $row[\"habilitado\"];\n $dados[] = $dado;\n }\n\n return $dados;\n\n \n }", "function categories(){\n return $this->db->get($this->categorie)->result();\n }", "function category_list() {\n $query = $this->db->get(\"categories\");\n return $query->result_array();\n }", "public static function groupList()\n {\n $category = Category::all();\n $array = [];\n foreach ($category->where('category_id', 0) as $parent){\n\n $array[$parent->title] = array();\n\n foreach($parent->children as $attribute) {\n $array[$parent->title][$attribute->id] = $attribute->title;\n }\n }\n\n return $array;\n }", "public function categories(){\n /* \n id_categoria_producto int NOT NULL AUTO_INCREMENT,\n\ttipo_producto varchar(20) NOT NULL ,\n\tcaracteristicas_producto varchar(100) ,\n CONSTRAINT pk_categoria_producto PRIMARY KEY ( id_categoria_producto )\n\n\n id_producto int NOT NULL AUTO_INCREMENT,\n\tt_cat_producto int NOT NULL ,\n\tnombre_producto varchar(50) NOT NULL ,\n\tfecha varchar(10) NOT NULL ,\n\tpeso varchar(10) NOT NULL ,\n\tCONSTRAINT pk_producto PRIMARY KEY ( id_producto )\n */ \n $sql = 'SELECT c.name_categoria,\n c.id,\n p.id,\n p.id_categoria,\n p.nombre_producto,\n p.peso\n FROM categoria AS c, producto AS p\n WHERE c.id = p.id_categoria';\n $categories = $this->db->query($sql)->fetchAll(PDO::FETCH_CLASS, 'Category');\n return $categories;\n }", "public function getAllCategoryNames();", "public function listCategories(){\n\t\t$lab = new lelabDB();\n\t\t$query = \"select * from $this->tableName order by id\";\n\t\t$result = $lab->getArray($query);\n\t\treturn $result;\n\t}", "function tc_category_list() {\r\n $post_terms = apply_filters( 'tc_cat_meta_list', $this -> _get_terms_of_tax_type( $hierarchical = true ) );\r\n $html = false;\r\n if ( false != $post_terms) {\r\n foreach( $post_terms as $term_id => $term ) {\r\n $html .= sprintf('<a class=\"%1$s\" href=\"%2$s\" title=\"%3$s\"> %4$s </a>',\r\n apply_filters( 'tc_category_list_class', 'btn btn-mini' ),\r\n get_term_link( $term_id , $term -> taxonomy ),\r\n esc_attr( sprintf( __( \"View all posts in %s\", 'customizr' ), $term -> name ) ),\r\n $term -> name\r\n );\r\n }//end foreach\r\n }//end if $postcats\r\n return apply_filters( 'tc_category_list', $html );\r\n }", "public function get_categories() {\n return array ( 'general' );\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 getCategoryList(){\n\t\t$recordLimit = Input::get('limit');\n\t\t$recordLimit = (!empty($recordLimit) && in_array($recordLimit, parent::$pagination_limits)) ? \n\t\t\t$recordLimit : parent::recordLimit;\n\t\t\t\n\t\t$colors = $this->shift->getCategoryColors();\n\t\t$categories = $this->shift->getCategories(null, $recordLimit == 'all' ? null : $recordLimit);\n\t\t\n\t\treturn View::make('admin.shifts.list_category')\n\t\t\t->withColors($colors)\n\t\t\t->withCategories($categories)\n\t\t\t//->withRecordlimit(parent::recordLimit);\n\t\t\t->withRecordlimit($recordLimit);\n\t}", "public function makeCategory() {\n $categories = NewsCategory::orderBy('sort', 'asc')->where('parent_id', 0)->get();\n $categories->map(function($d){\n $d['sub_category'] = $d->child;\n return $d;\n });\n return $categories;\n }", "public function selectAll(){\n $sql = SELECT. TABELA_CATEGORIA;\n\n //Abrindo conexão com o BD\n $PDO_conex = $this->conex->connectDataBase();\n\n //executa o script de select no bd\n $select = $PDO_conex->query($sql);\n $cont = 0;\n \n /* $select->fetch no formado pdo retorna os dados do BD\n também retorna com característica do PDO como o fetch\n é necessário especificar o modelo de conversão.\n EX: PDO::FETCH_ASSOC, PDO::FETCH_ARRAY etc. */\n while($rsCategorias=$select->fetch(PDO::FETCH_ASSOC)){\n $listCategorias[] = new Categoria();\n $listCategorias[$cont]->setIdCategoria_Veiculo($rsCategorias[\"idCategoria_Veiculo\"]);\n $listCategorias[$cont]->setIdTipo_Veiculo($rsCategorias[\"idTipo_Veiculo\"]);\n $listCategorias[$cont]->setNomeCategoria($rsCategorias[\"nomeCategoria\"]);\n $listCategorias[$cont]->setPorcentagemGanho($rsCategorias[\"porcentagemGanhoEmpresa\"]);\n\n $cont++;\n }\n\n $this->conex->closeDataBase();\n\n return($listCategorias);\n\n }", "protected function getCategoriesToRegenerate()\n {\n $sets = $this->getItemSets()['image-sets'];\n $childCategories = $this->getChildK2Categories();\n $categories = array();\n foreach ($sets as $set) {\n foreach ($set['k2categories'] as $catId) {\n if (! in_array($catId, $categories)) {\n $categories[] = $catId;\n }\n if ($set['k2selectsubcategories'] == '1') {\n foreach ($childCategories as $child) {\n if ((! in_array($child->id, $categories)) && ($child->parent == $catId)) {\n $categories[] = $child->id;\n }\n }\n }\n }\n }\n return $categories;\n }", "public function get_categories() {\n return [ 'electro-elements' ];\n }", "public function getCategory(){\n\t\t$stmt = $this->bdd->prepare('SELECT * FROM categorie');\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t}", "static function categories()\n {\n $category = \\SOE\\DB\\Category::where('parent_id', '0')\n ->orderBy('category_order')\n ->get();\n $return = array();\n foreach($categories as $cat)\n {\n $return[$cat->id] = $cat->slug;\n }\n return $return;\n }", "public function get_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"main_category_id\"=>0))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "public function get_categories() {\n return [ 'yx-super-cat' ];\n }", "public function get_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")\n\t\t->where(array(\"category_status\" => 1,\"main_category_id\"=>0))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "public function get_categories()\n {\n return ['basic'];\n }", "function get_categoriaslist(){\r\n $args = array(\r\n 'orderby' => 'name',\r\n 'order' => 'ASC'\r\n );\r\n $categories = get_categories($args);\r\n ?><ul><?php \r\n foreach($categories as $category) { \r\n ?><li><a href=\"<?php echo get_category_link( $category->term_id ); ?>\"><?php echo $category->name;?></a></li><?php \r\n }\r\n ?></ul><?php \r\n}", "public function list_kategori()\n\t{\n\t\t$data = $this->kategori(0);\n\n\t\tfor ($i=0; $i<count($data); $i++)\n\t\t{\n\t\t\t$data[$i]['submenu'] = $this->kategori($data[$i]['id']);\n\t\t}\n\n\t\t$data[] = [\n\t\t\t'id' => '0',\n\t\t\t'kategori' => '[Tidak Berkategori]'\n\t\t];\n\n\t\treturn $data;\n\t}", "public static function dropDownListCategories()\n {\n $array=CategoriesLevelOne::find()->with('relationParentCategory')->all();\n foreach($array as $key=>$value)\n {\n $array_temp[$key][\"id\"]=$value->id;\n $array_temp[$key][\"name\"]=Yii::t('app', $value->name);\n $array_temp[$key][\"class\"]=Yii::t('app', $value->relationParentCategory->name);\n }\n return ArrayHelper::map($array_temp, 'id', 'name', 'class');\n }", "public function getAllCategory()\n {\n $sql = \"SELECT * FROM categories\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $id = '';\n $items = $result;\n return $items;\n }", "public function pegarCategoria(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * from tbcategorias order by idcategoria\";\n $result3 = $this->conexao->query($sql);\n $arr = [];\n while ($rows_rscat = $result3->fetch_assoc()) { \n $option = '<option value=\"'.$rows_rscat['idcategoria'].'\">'.$rows_rscat['nome'].'</option>';\n $arr[] = $option;\n } \n\n return $arr;\n }", "public function get_categories()\n {\n return ['super-cat'];\n }", "public static function getCategoryData()\n\t{\n\n\t\tstatic $cats;\n\n\t\t$app = Factory::getApplication();\n\n\t\tif (!isset($cats))\n\t\t{\n\t\t\t$db = Factory::getDbo();\n\n\t\t\t$sql = \"SELECT c.* FROM #__categories as c WHERE extension='\" . JEV_COM_COMPONENT . \"' order by c.lft asc\";\n\t\t\t$db->setQuery($sql);\n\t\t\t$cats = $db->loadObjectList('id');\n\t\t\tforeach ($cats as &$cat)\n\t\t\t{\n\t\t\t\t$cat->name = $cat->title;\n\t\t\t\t$params = new JevRegistry($cat->params);\n\t\t\t\t$cat->color = $params->get(\"catcolour\", \"\");\n\t\t\t\t$cat->overlaps = $params->get(\"overlaps\", 0);\n\t\t\t}\n\t\t\tunset ($cat);\n\n\t\t\t$app->triggerEvent('onGetCategoryData', array(& $cats));\n\n\t\t}\n\n\t\t$app->triggerEvent('onGetAccessibleCategories', array(& $cats, false));\n\n\n\t\treturn $cats;\n\t}", "public function get_categories()\n\t{\n\t\treturn array('general');\n\t}", "public function getCategoryList()\n {\n $this->db->select(\"tc_category\");\n $this->db->from(\"ims_hris.training_category\");\n $this->db->where(\"COALESCE(tc_status,'N') = 'Y'\");\n $this->db->order_by(\"1\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "public function get_categories () {\n\t\treturn Category::all();\n\t}", "public function listattr_cat()\n {\n $this->db->where('descripcion_atributo', 'Catalogo');\n $resultados = $this->db->get('atributos_b');\n\n return $resultados->result();\n }", "public function getCategoryList()\n {\n// return $this->categoryList = DB::table('categories')->get();\n return $this->categoryList = Categories::all();\n }", "public function get_categories() {\n\t\treturn [ 'basic' ];\n\t}", "public function getCategory();", "public function getCategory();", "public function categorias(){\n $categorias = Categoria::all();\n return response()->json($categorias);\n }", "public function getCategories()\n {\n return Category::all();\n }", "private function getCategories() {\r\n $data['categories'] = array();\r\n\r\n $this->load->model('catalog/category');\r\n\r\n $categories_1 = $this->model_catalog_category->getCategories(0);\r\n\r\n foreach ($categories_1 as $category_1) {\r\n $level_2_data = array();\r\n\r\n $categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);\r\n\r\n foreach ($categories_2 as $category_2) {\r\n $level_3_data = array();\r\n\r\n $categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']);\r\n\r\n foreach ($categories_3 as $category_3) {\r\n $level_3_data[] = array(\r\n 'category_id' => $category_3['category_id'],\r\n 'name' => $category_3['name'],\r\n );\r\n }\r\n\r\n $level_2_data[] = array(\r\n 'category_id' => $category_2['category_id'],\r\n 'name' => $category_2['name'],\r\n 'children' => $level_3_data\r\n );\r\n }\r\n\r\n $data['categories'][] = array(\r\n 'category_id' => $category_1['category_id'],\r\n 'name' => $category_1['name'],\r\n 'children' => $level_2_data\r\n );\r\n }\r\n return $data['categories'];\r\n }", "public function getCategory() {}", "function GetCategories(){\n\t\t\tglobal $wpdb;\n\n\t\t\t$categories = get_all_category_ids();\n\t\t\t$separator = '|';\n\t\t\t$output = array();\n\t\t\tif($categories){\n\t\t\t\tforeach($categories as $category) {\n\t\t\t\t\t$temp_catname = get_cat_name($category);\n\t\t\t\t\tif ($temp_catname !== \"Uncategorized\"){\n\t\t\t\t\t\t$output[$category] = $temp_catname;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$output = 'test';\n\t\t\t}\n\t\t\treturn $output;\n\t\t}", "function afficherCategories()\n\t{\n\t\t$sql=\"SElECT * From categorie\";\n\t\t$db = config::getConnexion();\n\t\ttry\n\t\t{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e)\n {\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function getCategorias()\n {\n $cagetgorias = Categorias::get();\n return response()->json($cagetgorias);\n }" ]
[ "0.7335028", "0.732332", "0.732332", "0.7064533", "0.7062532", "0.69344646", "0.69012886", "0.68743414", "0.6856543", "0.68463296", "0.67614883", "0.6745046", "0.67320484", "0.6685929", "0.6683568", "0.6676232", "0.6660882", "0.6653027", "0.6639007", "0.6639007", "0.6602982", "0.66001916", "0.65923274", "0.6587664", "0.6578179", "0.65643746", "0.6562344", "0.65610904", "0.6558912", "0.65469897", "0.6544368", "0.65438575", "0.65438575", "0.65224236", "0.65189123", "0.6517579", "0.6499728", "0.6466401", "0.6466401", "0.64661366", "0.6460479", "0.6438536", "0.6437212", "0.64361954", "0.64344907", "0.6433403", "0.64314497", "0.6429274", "0.6415897", "0.6409432", "0.63948536", "0.63907915", "0.6389956", "0.63886845", "0.63869894", "0.6386403", "0.63862145", "0.6379736", "0.63730824", "0.63592196", "0.63586414", "0.6352808", "0.6346926", "0.6345659", "0.63424146", "0.63384724", "0.63384724", "0.63384724", "0.6333789", "0.6324961", "0.63249415", "0.6324725", "0.63176996", "0.63061714", "0.6298657", "0.62983096", "0.62882435", "0.6281917", "0.6281332", "0.6262439", "0.6261525", "0.62551165", "0.62528825", "0.62507236", "0.6249698", "0.62495035", "0.6244121", "0.623419", "0.62287605", "0.62281495", "0.6222962", "0.6222827", "0.6221243", "0.6221243", "0.6214231", "0.62119275", "0.6205143", "0.62047815", "0.6202108", "0.62007827", "0.61987174" ]
0.0
-1
/ Genera repeticiones de caracteres
function repetir($caracteres,$repeticiones=1){ for ($i=0; $i < $repeticiones; $i++) { echo $caracteres; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function buildControlCharacters()\n {\n for ($i = 0; $i <= 31; ++$i) {\n if ($i != 9 && $i != 10 && $i != 13) {\n $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';\n $replace = chr($i);\n self::$controlCharacters[$find] = $replace;\n }\n }\n }", "function obtener_pimienta()\n{\n\t$todo = str_split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()');\n\n\t$caracteres = array_rand($todo, 2);\n\n\treturn $todo[$caracteres[0]] . $todo[$caracteres[1]];\n}", "private static function buildControlCharacters()\n {\n for ($i = 0; $i <= 19; ++$i) {\n if ($i != 9 && $i != 10 && $i != 13) {\n $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';\n $replace = chr($i);\n self::$controlCharacters[$find] = $replace;\n }\n }\n }", "private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}", "function random_charo( $panjang ) { \n $karakter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $string = ''; \n for ( $i = 0; $i < $panjang; $i++ ) { \n $pos = rand( 0, strlen( $karakter ) - 1 ); \n $string .= $karakter{$pos}; \n } \nreturn \"OPERA\";\n}", "function slRandomChar()\n{\n\t$char = '';\n\tfor ($i = 0; $i < 20; $i++)\n\t\t$char .= rand(0, 9);\n\treturn ($char);\n}", "function GenerateWord() {\n $nb = rand(3, 10);\n $w = '';\n for ($i = 1; $i <= $nb; $i++)\n $w .= chr(rand(ord('a'), ord('z')));\n return $w;\n }", "private function generate()\n {\n $output = '';\n $length = strlen($this->str);\n\n\n for ($i = 1; $i < 5; $i++) {\n // get random char\n $char = $this->str[rand(0, $length - 1)];\n $output .= $char;\n\n // get font size\n $fontSize = ($this->level > 1) ? rand(20, 48) : 28;\n imagettftext($this->imageResource, $fontSize, rand(-35, 35), 35 * $i, 55, imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)), $this->font, $char);\n }\n\n $this->code = ($this->caseSensitive) ? $output : strtolower($output);\n }", "function generateSerials ($numberOfChars,$lengthOfSerial) {\n\n\n$tokens = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWZY\";\n$serial = \"\";\n\nfor ($i = 0; $i < $lengthOfSerial; $i++) { \n \n for ($j = 0; $j < $numberOfChars; $j++) { \n \n $serial .= $tokens[rand(0,10)];\n \n }\n\n// append dash\n if ($i < $lengthOfSerial - 1) { \n $serial .= \"-\"; \n }\n \n}\n\n//let's return the value\n return $serial;\n\n}", "public function getRegisteredChars() {}", "function getCharacters();", "function generateCode($characters) {\n\t$possible = '23456789bcdfghjkmnpqrstvwxyz';\n\t$code = '';\n\t$i = 0;\n\twhile ($i < $characters) { \n\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t$i++;\n\t}\n\treturn $code;\n}", "function php02($n_caracteres_crypt,$coord,$dato_crypt){\n\t$n_caracteres = strlen($dato_crypt);\n\t$texto_crypt = php01($n_caracteres_crypt);\n\t$texto_n = '';\n\tfor($i = 0; $i < strlen($texto_crypt); $i++){\n\t\twhile ( $i == $coord){\n\t\t\tfor($j = 0; $j < strlen($dato_crypt); $j++){\n\t\t\t\t$texto_n = $texto_n . $dato_crypt[$j];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t$texto_n = $texto_n . $texto_crypt[$i];\n\t}\n\treturn $texto_n;\n}", "function GenerateWord()\n{\n $nb=rand(3,10);\n $w='';\n for($i=1;$i<=$nb;$i++)\n $w.=chr(rand(ord('a'),ord('z')));\n return $w;\n}", "function createPwd($characters) {\n $possible = '23456789bcdfghjkmnpqrstvwxyz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n return $code;\n}", "private function _generar_clave(){\n\n $letras = \"abcdefghijklmnopqrstuvwxyz\";\n $clave = \"\";\n\n for ($i=0;$i<4;$i++) {\n $clave .= substr($letras,rand(1,strlen($letras)),1);\n }\n for ($i=0;$i<4;$i++) {\n $numero = rand(0,9);\n $clave .= $numero;\n }\n\n return $clave;\n }", "public function genaratepassword() {\r\r\n $length = 10;\r\r\n $alphabets = range('A', 'Z');\r\r\n $numbers = range('0', '9');\r\r\n $additional_characters = array('1', '3');\r\r\n $final_array = array_merge($alphabets, $numbers, $additional_characters);\r\r\n $password = '';\r\r\n while ($length--) {\r\r\n $key = array_rand($final_array);\r\r\n $password .= $final_array[$key];\r\r\n }\r\r\n return $password;\r\r\n }", "public function generate_code()\n {\n $code = \"\";\n $count = 0;\n while ($count < $this->num_characters) {\n $code .= substr($this->captcha_characters, mt_rand(0, strlen($this->captcha_characters)-1), 1);\n $count++;\n }\n return $code;\n }", "static function getCharacters()\n {\n return '\\x{00E5}\\x{00E4}\\x{00F6}';\n }", "function generate ()\n {\n $chars = static::getChars();\n\n while (count(static::$numbers) < $chars)\n {\n $number = static::number();\n\n array_push(static::$numbers, $number);\n if (! static::$repeating)\n static::remove($number);\n }\n\n return static::combined();\n }", "private function generateAlphabet(){\n $letters = array();\n $letter = 'A';\n while ($letter !== 'AAA') {\n $letters[] = $letter++;\n }\n return $letters;\n }", "public static function aleat($chars) {\n $res = '';\n for ($i=0; $i<$chars; $i+=4) {\t\t\t\n\t $res = sprintf(\"%s%04x\", $res, mt_rand(0, 0xffff));\n }\n return substr($res, 0, $chars);\n }", "public static function alphanumerics()\n {\n $alphanumeric = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\n while (true) {\n $index = mt_rand(0, 61);\n yield $alphanumeric[$index];\n }\n }", "function stringa_casuale($length) {\n $caratterivalidi = \"abcdefghijklmnopqrstuxyvwzABCDEFGHIJKLMNOPQRSTUXYVWZ0123456789\";\n $num_car_validi = strlen($caratterivalidi);\n $risultato = \"\";\n for ($i = 0; $i < $length; $i++) {\n $index = mt_rand(0, $num_car_validi - 1);\n $risultato .= $caratterivalidi[$index];\n }\n return $risultato;\n}", "protected function getRandomCharsString()\n {\n return 'bcdfghjklmnpqrstvwxzBCDFGHJKLMNPQRSTVWXZ0123456789!@#$%^&*()-_=+[]{}|;:,.<>/?';\n }", "function generarPassword() {\n\t\t$str = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$cad = \"\";\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$cad .= substr($str, rand(0, 62), 1);\n\t\t}\n\t\treturn $cad;\n\t}", "function tach_chu_hien_thi($content){\r\n $mang = explode(\" \", $content);\r\n $str = \"\";\r\n $sochu = sizeof($mang);\r\n if($sochu < 10){\r\n for($j = 0; $j < sizeof($mang); $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }else{\r\n for($j = 0; $j < 15; $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }\r\n return $str;\r\n}", "function new_word($newword, $number){\n\t\n\t$symbols = '!@#$%^&*?';\n\t$newstring = \"\";\t\n\t$char = \"\";\n\t$use_numbers = isset($_POST['numbers']);\n\t$use_characters = isset($_POST['symbols']);\n\t\n\t\n\tif($use_numbers == 1 && $use_characters != 1) { // functoin for this\n\t\tforeach (range(0,$number) as $i){\n\t\t$char = rand(0,9);\n\t\t}\n\t}\n\telseif($use_numbers == 1 && $use_characters == 1) {\n\t\t$char = $symbols[rand(0, strlen($symbols)-1)] . rand(0,9);\n\t}\n\telseif($use_numbers != 1 && $use_characters == 1) {\n\t\t$char = $symbols[rand(0, strlen($symbols)-1)];\n\t}\n\telse {\n\t\t$char = \"\";\n\t}\n\t\n\t\n\tforeach (range(0,$number) as $i){\n\t\t$index = array_rand($newword);\t\n\t\t$newstring .= $newword[$index] . \"-\";\n\t\t\n\t}\n\t\n\treturn rtrim($newstring,'-') . $char;\n\t\n}", "public function setCharacters(){\r\n\t\t$chars = array('upper' => $this->upper, 'lower' => $this->lower, 'numbers' => $this->numbers, 'symbols' => $this->symbols);\r\n\t\t//The $char_table may be edited to your liking for more complex password pattern/encryption\r\n\t\t$char_table = array(\r\n\t\t\t'lower' => array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'),\r\n\t\t\t'upper' => array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'),\r\n\t\t\t'numbers' => array('0','1','2','3','4','5','6','7','8','9'),\r\n\t\t\t'symbols' => array(\"!\",\"@\",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"(\",\")\",\"_\",\"-\",\"+\",\"=\")\r\n\t\t);\r\n\t\t$characters = array();\r\n\t\tforeach ($chars as $key => $value) {\r\n\t\t\tif($value){\r\n\t\t\t\t$characters = array_merge($characters, $char_table[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $characters;\r\n\t}", "function generateCode($characters) {\n\t\t/* list all possible characters, similar looking characters and vowels have been removed */\n\t\t$possible = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\t\t$code = '';\n\t\t$i = 0;\n\t\twhile ($i < $characters) { \n\t\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t\t$i++;\n\t\t}\n\t\treturn $code;\n}", "function capya_string($len){\n $str='';\n for($i=1; $i<=$len; $i++) {\n $ord=rand(50, 90);\n if((($ord >= 50) && ($ord <= 57)) || (($ord >= 65) && ($ord<= 90))) $str.=chr($ord);\n else $str.=capya_string(1);\n }\n return $str;\n}", "function myGen() {\n yield 'アイウエオ';\n yield 'かきくけこ';\n yield 'さしすせそ';\n}", "public function addLetters() {\n\n for ($i=0; $i <$this->letterPorsion ; $i++) {\n $this->password = $this->password.substr($this->str, rand(0, strlen($this->str) - 1), 1);\n }\n }", "function getToken($length) {\n \t\t $key = '';\n \t\t $keys = array_merge(range(0, 9), range('a', 'z'));\n \t\t for ($i = 0; $i < $length; $i++) {\n \t\t $key .= $keys[array_rand($keys)];\n \t\t }\n\n \t\t return $key;\n \t\t}", "public static function chars($extended = false)\n {\n while (true) {\n yield chr(mt_rand(0, 128 * (1 + $extended) - 1));\n }\n }", "function cvf_td_generate_random_code_foreditbuis($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function generateRandomCharacter($type) {\n switch($type) {\n case 'symbol': return generateRandomSymbol(); break;\n case 'number': return generateRandomNumber(); break;\n }\n }", "public function createToken() {\r\n\t\t$characters = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\r\n\t\t\t'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\r\n\t\t$counter = 0;\r\n\t\t$resultString = \"\";\r\n\t\t\r\n\t\twhile ($counter < Page::TOKEN_LENGTH) {\r\n\t\t\t$nextRand = mt_rand(0, (count($characters) - 1));\r\n\t\t\t\r\n\t\t\tif (!Strings::contains($resultString, sprintf('%1$s', $characters[$nextRand]))) {\r\n\t\t\t\t$resultString .= $characters[$nextRand];\r\n\t\t\t\t\r\n\t\t\t\t$counter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $resultString;\r\n\t}", "public function get_character_patterns_menu() {\n $patterns = array(\n '9' => 'tab',\n '10' => 'new line'\n );\n\n return $patterns;\n }", "function genera_password($num=8,$randnum=0){ // By Kernellover \n $voc = 'aeiou'; \n $con = 'bcdfgjklmnpqrstwxyz';\n\t$nvoc = strlen($voc)-1;\n\t$ncon = strlen($con)-1;\n\t$psw =mt_rand(0,1)?$con[mt_rand(0,$ncon)]:''; // defineix si comença per vocal o consonant\n\n\t\n for ($n=0; $n<=ceil($num/2); $n++){ \n $psw .= $voc[mt_rand(0,$nvoc)]; \n $psw .= $con[mt_rand(0,$ncon)]; \n }\n\n\t$cua=$randnum?mt_rand(1,$randnum):'';\n\t$psw = str_replace (array('q','quu','yi','iy'),array('qu','que','ya','ya'),$psw);\n $psw = substr($psw,0,$num-strlen($cua)).$cua; \n\n\n return $psw; \n}", "public function testManySpecialCharacter ()\n {\n // Function parameters\n $length = 10;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 6,\n 'digit' => 1,\n 'upper' => 1,\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){1})(?=(?:[^A-Z]*[A-Z]){1})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){6})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "function generateToken($length){\r\n $token = \"\";\r\n $possible = \"0123456789bcdfghjkmnpqrstvwxyz\";\r\n $i = 0;\r\n while ($i < $length) {\r\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n if (!strstr($token, $char)) {\r\n $token .= $char;\r\n $i++;\r\n }\r\n }\r\n return $token;\r\n }", "private function generateRowsCharacters()\n {\n $this->rowsCharacters->add([\"+\"]);\n $rowIndex = 1;\n while ($this->shapeIsNotComplete($rowIndex)) {\n $row = $this->getRow($rowIndex);\n $this->rowsCharacters->add($row);\n $rowIndex++;\n }\n }", "function multiclean(array $pattern, $characters = false) {\n \n //enlève les personnages absents\n\n \n //TODO : deux conf successices identiques\n\n \n //TODO : entracte\n\n $array = array();\n foreach ($pattern as $kconfiguration => $configuration) {\n foreach ($configuration as $id => $character) {\n \n if ($character) {\n $array[$kconfiguration][] = $characters ? $characters[$id] : $id;\n }\n }\n }\n return $array;\n}", "function randomcode ($len=\"10\"){\n\t\t\t\tglobal $pass;\n\t\t\t\tglobal $lchar;\n\t\t\t\t$code = NULL;\n\t\t\n\t\t\t\tfor ($i=0;$i<$len;$i++){\n\t\t\t\t\t$char = chr(rand(48,122));\n\t\t\t\t\twhile(!ereg(\"[a-zA-Z0-9]\", $char)){\n\t\t\t\t\t\tif($char == $lchar) { continue; }\n\t\t\t\t\t\t\t$char = chr(rand(48,90));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pass .= $char;\n\t\t\t\t\t\t$lchar = $char;\n\t\t\t\t\t}\n\t\t\t\treturn $pass;\n\t\t\t}", "function retiraCaracteresEspeciais($string)\r\n\t{\r\n\t $caracteresEspeciais = array( \t'ä','ã','à','á','â','ê','ë','è','é','ï','ì','í','ö','õ','ò','ó','ô','ü','ù','ú','û','À','Á','É','Í','Ó','Ú',\r\n\t \t\t\t\t\t \t\t\t'ñ','Ñ','ç','Ç',' ','-','(',')',',',';',':','|','!','\"','#','$','%','&','/','=','?','~','^','>','<','ª','º' );\r\n\r\n $caracteresSubstituicao = array( 'a','a','a','a','a','e','e','e','e','i','i','i','o','o','o','o','o','u','u','u','u','A','A','E','I','O','U','n','n','c','C'\t\t\t\t\t\t\t ,'_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_' );\r\n\r\n\t\treturn str_replace($caracteresEspeciais, $caracteresSubstituicao, $string);\r\n\t}", "function randStrGen($len)\n{\n $result = \"\";\n $chars = \"abcdefghijklmnopqrstuvwxyz0123456789$%&**@##)(!^***%%%%%%%%%%%####\";\n $charArray = str_split($chars);\n for($i = 0; $i < $len; $i++)\n {\n\t $randItem = array_rand($charArray);\n\t $result .= \"\".$charArray[$randItem];\n }\n return $result;\n}", "public static function numericChars()\n {\n $numeric = '0123456789';\n while (true) {\n $index = mt_rand(0, 9);\n yield $numeric[$index];\n }\n }", "function cvf_td_generate_random_code($length=10) {\n\n $string = '';\n $characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters)-1)];\n }\n\n return $string;\n\n}", "public function generate()\n {\n return [\n 'tony stark', \n 'hulk', \n 'thor', \n 'mark zuckerberg', \n 'bill gates', \n 'larry page', \n 'loki',\n 'wonder woman', \n 'thanos', \n 'bilbo baggin', \n 'gal gadot', \n 'superman',\n ];\n }", "function createRandomToken(){\n\t\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0;\n\t\t\t$pass = '' ;\n\t\t\twhile ($i <= 7){\n\t\t\t\t$num = rand() % 33;\n\n\t\t\t\t\t\t\t$tmp = substr($chars, $num, 1);\n\n\t\t\t\t\t\t\t$pass = $pass . $tmp;\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $pass;\n\t\t\t\t\t\t}", "function gen_pass($mask) {\n $extended_chars = \"!@#$%^&*()\";\n $length = strlen($mask);\n $pwd = '';\n for ($c=0;$c<$length;$c++) {\n $ch = $mask[$c];\n switch ($ch) {\n case '#':\n $p_char = rand(0,9);\n break;\n case 'C':\n $p_char = chr(rand(65,90));\n break;\n case 'c':\n $p_char = chr(rand(97,122));\n break;\n case 'X':\n do {\n $p_char = rand(65,122);\n } while ($p_char > 90 && $p_char < 97);\n $p_char = chr($p_char);\n break;\n case '!':\n $p_char = $extended_chars[rand(0,strlen($extended_chars)-1)];\n break;\n }\n $pwd .= $p_char;\n }\n return $pwd; \n}", "public static function generatePassword() {\n\t\t$consonants = array (\n\t\t\t\t\"b\",\n\t\t\t\t\"c\",\n\t\t\t\t\"d\",\n\t\t\t\t\"f\",\n\t\t\t\t\"g\",\n\t\t\t\t\"h\",\n\t\t\t\t\"j\",\n\t\t\t\t\"k\",\n\t\t\t\t\"l\",\n\t\t\t\t\"m\",\n\t\t\t\t\"n\",\n\t\t\t\t\"p\",\n\t\t\t\t\"r\",\n\t\t\t\t\"s\",\n\t\t\t\t\"t\",\n\t\t\t\t\"v\",\n\t\t\t\t\"w\",\n\t\t\t\t\"x\",\n\t\t\t\t\"y\",\n\t\t\t\t\"z\" \n\t\t);\n\t\t$vocals = array (\n\t\t\t\t\"a\",\n\t\t\t\t\"e\",\n\t\t\t\t\"i\",\n\t\t\t\t\"o\",\n\t\t\t\t\"u\" \n\t\t);\n\t\t\n\t\t$password = '';\n\t\t\n\t\tsrand ( ( double ) microtime () * 1000000 );\n\t\tfor($i = 1; $i <= 4; $i ++) {\n\t\t\t$password .= $consonants [rand ( 0, 19 )];\n\t\t\t$password .= $vocals [rand ( 0, 4 )];\n\t\t}\n\t\t$password .= rand ( 0, 9 );\n\t\t\n\t\treturn $password;\n\t}", "static function createFilterChar() {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n return $characters[rand(0, strlen($characters) - 1)];\r\n }", "public static function letters()\n {\n $letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\n while (true) {\n $index = mt_rand(0, 51);\n yield $letters[$index];\n }\n }", "function add_char($in_array) {\n $special_chars = [\"!\", \"@\", \"#\", \"$\", \"%\", \"^\", \"&\", \"*\"];\n $random_char = $special_chars[rand(0, count($special_chars) - 1)];\n $random_idx = rand(0, count($in_array) - 1);\n\n $in_array[$random_idx] = $in_array[$random_idx] . $random_char;\n\n return $in_array;\n}", "function randomChars($lenghts=null) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyz';\n $string = null;\n for ($p = 0; $p < $lenghts; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters)-1)];\n }\n return $string;\n\n }", "public function autoCode(){\n $length=8;\n $randstr = \"\";\n srand((double)microtime() * 1000000);\n //our array add all letters and numbers if you wish\n $chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\n for ($rand = 1; $rand <= $length; $rand++) {\n $random = rand(0, count($chars) - 1);\n $randstr .= $chars[$random];\n }\n return ($randstr.'/'.date('y'));\n }", "function passgen() {\r\n\t$pw = '';\r\n\t$pw_lenght = 8;\r\n $zeichen = \"0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\";\r\n $array_b = explode(\",\",$zeichen);\r\n for($i=0;$i<$pw_lenght;$i++) {\r\n \tsrand((double)microtime()*1000000);\r\n $z = rand(0,25);\r\n $pw .= \"\".$array_b[$z].\"\";\r\n }\r\n\treturn $pw;\r\n}", "function str_generate($length, $chars)\n {\n return substr(str_shuffle(str_repeat($chars, $length)), 0, $length);\n }", "public function chars()\n {\n // init\n $chars = array();\n $l = $this->length();\n\n for ($i = 0; $i < $l; $i++) {\n $chars[] = $this->at($i)->str;\n }\n\n return $chars;\n }", "function randLetter(){\n \t\t$alphabets = array_merge(range('A','Z'));\n \t\t$chars = '';\n \t\tfor($i = 0; $i<2; $i++){\n \t\t\t$rand = rand(0,10);\n \t\t\t$chars .= $alphabets[$rand];\n \t\t}\n \t\treturn strtoupper($chars);\n\t}", "function mPN_CHARS(){\n try {\n // Tokenizer11.g:557:3: ( PN_CHARS_U | MINUS | ( '0' .. '9' ) | '\\\\u00B7' | '\\\\u0300' .. '\\\\u036F' | '\\\\u203F' .. '\\\\u2040' ) \n $alt29=6;\n $LA29_0 = $this->input->LA(1);\n\n if ( ($LA29_0==$this->getToken('95')||($LA29_0>=$this->getToken('97') && $LA29_0<=$this->getToken('122'))||($LA29_0>=$this->getToken('192') && $LA29_0<=$this->getToken('214'))||($LA29_0>=$this->getToken('216') && $LA29_0<=$this->getToken('246'))||($LA29_0>=$this->getToken('248') && $LA29_0<=$this->getToken('767'))||($LA29_0>=$this->getToken('880') && $LA29_0<=$this->getToken('893'))||($LA29_0>=$this->getToken('895') && $LA29_0<=$this->getToken('8191'))||($LA29_0>=$this->getToken('8204') && $LA29_0<=$this->getToken('8205'))||($LA29_0>=$this->getToken('8304') && $LA29_0<=$this->getToken('8591'))||($LA29_0>=$this->getToken('11264') && $LA29_0<=$this->getToken('12271'))||($LA29_0>=$this->getToken('12289') && $LA29_0<=$this->getToken('55295'))||($LA29_0>=$this->getToken('63744') && $LA29_0<=$this->getToken('64975'))||($LA29_0>=$this->getToken('65008') && $LA29_0<=$this->getToken('65533'))) ) {\n $alt29=1;\n }\n else if ( ($LA29_0==$this->getToken('45')) ) {\n $alt29=2;\n }\n else if ( (($LA29_0>=$this->getToken('48') && $LA29_0<=$this->getToken('57'))) ) {\n $alt29=3;\n }\n else if ( ($LA29_0==$this->getToken('183')) ) {\n $alt29=4;\n }\n else if ( (($LA29_0>=$this->getToken('768') && $LA29_0<=$this->getToken('879'))) ) {\n $alt29=5;\n }\n else if ( (($LA29_0>=$this->getToken('8255') && $LA29_0<=$this->getToken('8256'))) ) {\n $alt29=6;\n }\n else {\n $nvae = new NoViableAltException(\"\", 29, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt29) {\n case 1 :\n // Tokenizer11.g:558:3: PN_CHARS_U \n {\n $this->mPN_CHARS_U(); \n\n }\n break;\n case 2 :\n // Tokenizer11.g:559:5: MINUS \n {\n $this->mMINUS(); \n\n }\n break;\n case 3 :\n // Tokenizer11.g:560:5: ( '0' .. '9' ) \n {\n // Tokenizer11.g:560:5: ( '0' .. '9' ) \n // Tokenizer11.g:560:6: '0' .. '9' \n {\n $this->matchRange(48,57); \n\n }\n\n\n }\n break;\n case 4 :\n // Tokenizer11.g:561:5: '\\\\u00B7' \n {\n $this->matchChar(183); \n\n }\n break;\n case 5 :\n // Tokenizer11.g:562:5: '\\\\u0300' .. '\\\\u036F' \n {\n $this->matchRange(768,879); \n\n }\n break;\n case 6 :\n // Tokenizer11.g:563:5: '\\\\u203F' .. '\\\\u2040' \n {\n $this->matchRange(8255,8256); \n\n }\n break;\n\n }\n }\n catch(Exception $e){\n throw $e;\n }\n }", "private function generarPassword() {\r\n $minusculas = \"abcdefghijklmnopqrstuvwxyz\";\r\n $mayusculas = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n $numeros = \"1234567890\";\r\n $may = \"\";\r\n $min = \"\";\r\n $num = \"\";\r\n for ($i = 0; $i < 11; $i++) {\r\n $min .= substr($minusculas, rand(0, 26), 1);\r\n $may .= substr($mayusculas, rand(0, 26), 1);\r\n $num .= substr($numeros, rand(0, 10), 1);\r\n }\r\n $password = substr($may, 0, 2) . substr($min, 0, 5) . '-' . substr($num, 0, 3);\r\n return $password;\r\n }", "function generatePassword() {\n // 57 prefixes\n $aPrefix = array('aero', 'anti', 'ante', 'ande', 'auto', \n 'ba', 'be', 'bi', 'bio', 'bo', 'bu', 'by', \n 'ca', 'ce', 'ci', 'cou', 'co', 'cu', 'cy', \n 'da', 'de', 'di', 'duo', 'dy', \n 'eco', 'ergo', 'exa', \n 'geo', 'gyno', \n 'he', 'hy', 'ki',\n 'intra', \n 'ma', 'mi', 'me', 'mo', 'my', \n 'na', 'ni', 'ne', 'no', 'ny', \n 'omni', \n 'pre', 'pro', 'per', \n 'sa', 'se', 'si', 'su', 'so', 'sy', \n 'ta', 'te', 'tri',\n 'uni');\n\n // 30 suffices\n $aSuffix = array('acy', 'al', 'ance', 'ate', 'able', 'an', \n 'dom', \n 'ence', 'er', 'en',\n 'fy', 'ful', \n 'ment', 'ness',\n 'ist', 'ity', 'ify', 'ize', 'ise', 'ible', 'ic', 'ical', 'ous', 'ish', 'ive', \n 'less', \n 'sion',\n 'tion', 'ty', \n 'or');\n\n // 8 vowel sounds \n $aVowels = array('a', 'o', 'e', 'i', 'y', 'u', 'ou', 'oo'); \n\n // 20 random consonants \n $aConsonants = array('w', 'r', 't', 'p', 's', 'd', 'f', 'g', 'h', 'j', \n 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm', 'qu');\n\n // Some consonants can be doubled\n $aDoubles = array('n', 'm', 't', 's');\n\n // \"Salt\"\n $aSalt = array('!', '#', '%', '?');\n\n $pwd = $aPrefix[array_rand($aPrefix)];\n\n // add random consonant(s)\n $c = $aConsonants[array_rand($aConsonants)];\n if ( in_array( $c, $aDoubles ) ) {\n // 33% chance of doubling it\n if (rand(0, 2) == 1) { \n $c .= $c;\n }\n }\n $pwd .= $c;\n\n // add random vowel\n $pwd .= $aVowels[array_rand($aVowels)];\n\n $pwdSuffix = $aSuffix[array_rand($aSuffix)];\n // If the suffix begins with a vovel, add one or more consonants\n if ( in_array( $pwdSuffix[0], $aVowels ) ) {\n $pwd .= $aConsonants[array_rand($aConsonants)];\n }\n $pwd .= $pwdSuffix;\n\n $pwd .= rand(2, 999);\n # $pwd .= $aSalt[array_rand($aSalt)];\n\n // 50% chance of capitalizing the first letter\n if (rand(0, 1) == 1) {\n $pwd = ucfirst($pwd);\n }\n return $pwd;\n }", "public static function generatePassword()\n\t{\n\t\t$consonants = array(\"b\", \"c\", \"d\", \"f\", \"g\", \"h\", \"j\", \"k\", \"l\", \"m\", \"n\", \"p\", \"r\", \"s\", \"t\", \"v\", \"w\", \"x\", \"y\", \"z\");\n\t\t$vocals = array(\"a\", \"e\", \"i\", \"o\", \"u\");\n\n\t\t$password = '';\n\n\t\tsrand((double)microtime() * 1000000);\n\t\tfor ($i = 1; $i <= 4; $i++) {\n\t\t\t$password .= $consonants[rand(0, 19)];\n\t\t\t$password .= $vocals[rand(0, 4)];\n\t\t}\n\t\t$password .= rand(0, 9);\n\n\t\treturn $password;\n\t}", "function mot($chaine){\r\n $retourFinal = \"faux\";\r\n for($i=0;$i<laTaille($chaine);$i++){\r\n if(testAlphabet($chaine[$i])==\"vrai\"){\r\n $retour[$i]=\"vrai\";\r\n }\r\n else{\r\n $retour[$i]=\"faux\";\r\n }\r\n }\r\n $j=0;\r\n while($j<laTaille($chaine) && $retour[$j]==\"vrai\"){\r\n $j++;\r\n }\r\n if($j==laTaille($chaine)){\r\n $retourFinal = \"vrai\";\r\n }\r\n return $retourFinal;\r\n }", "function genString($len) {\n global $alphabet;\n\n $finale = \"\";\n \n for ($curChar = 0; $curChar < $len; $curChar++)\n $finale .= $alphabet[rand(0, (strlen($alphabet) - 1))];\n\n return $finale;\n}", "private function generate_code()\n\t\t{\n\t\t\t$code = \"\";\n\t\t\tfor ($i = 0; $i < 5; ++$i) \n\t\t\t{\n\t\t\t\tif (mt_rand() % 2 == 0) \n\t\t\t\t{\n\t\t\t\t\t$code .= mt_rand(0,9);\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\t$code .= chr(mt_rand(65, 90));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $code; \n\n\t\t}", "private function _generatePattren() {\n $answer = $this->_getAnswer();\n $pattren = '';\n\n // Convert the answer from Ascii to Arabic Unicode (in HEX)\n for($i = 0, $len = strlen($answer); $i < $len; ++$i) {\n\n // Arabic zero in unicode is 0x0660 and Zero in Ascii is 0x0048\n // Our base to convert: 660 - 48 = 612\n $pattren .= sprintf('\\x{%d}', ord($answer[$i]) + 612);\n }\n\n $this->_pattren = '/^' . $pattren . '$/u';\n\n return $this;\n }", "function getmixedno($totalchar)\n{\n\t$abc= array(\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\");\n\t$mixedno = \"\";\n\tfor($i=1; $i<=$totalchar; $i++)\n\t{\n\t\t$mixedno .= $abc[rand(0,33)];\n\t}\n\treturn $mixedno;\n}", "public function gen_random_string(){\n\t\t$chars =\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$final_rand='';\t\t\n\t\tfor($i=0;$i<4; $i++) {\t\t \n\t\t$final_rand .= $chars[ rand(0,strlen($chars)-1)];\n\t\t}\t\t\n\t\treturn $final_rand;\t\n\t}", "protected function generatePhrase()\n {\n $phrase = '';\n $length = $this->length ? : mt_rand(5, 7);\n $chars = str_split($this->alphabet);\n\n for ($i = 0; $i < $length; $i++) {\n $phrase .= $chars[array_rand($chars)];\n }\n\n return $phrase;\n }", "function randColor() {\n $chars = 'ABCDEF0123456789';\n $color = '#';\n \n //this will loop through the characters 6 times, creating a 6 character length variable\n for ( $i = 0; $i < 6; $i++ ) {\n $color .= $chars[rand(0, strlen($chars) - 1)];\n }\n //variable that returns a hex color code\n return $color;\n }", "function generate_word($num_consonants)\r\n\t{\r\n\t\t$output = \"\"; // Return variable\r\n\t\t$vowels = array('a', 'e', 'i', 'o', 'u');\r\n\t\t\r\n\t\tfor($i = 0; $i < $num_consonants; $i++)\r\n\t\t{\r\n\t\t\t// Pick a random character and a vowel\r\n\t\t\t$char = 98;\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\t$char = rand(98, 122); // b - z\r\n\t\t\t}\r\n\t\t\twhile($char == 101 || $char == 105 || $char == 111 || $char == 117);\r\n\t\t\t$vowel_selector = rand(0, 4);\r\n\t\t\t\r\n\t\t\t// At this point, we've got char and a vowel\r\n\t\t\t// Now we decide which one goes first\r\n\t\t\t$toss = rand(0, 1);\r\n\t\t\tif ($toss == 1)\r\n\t\t\t{\r\n\t\t\t\t$output = $output . chr($char) . $vowels[$vowel_selector];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$output = $output . $vowels[$vowel_selector] . chr($char);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "public static function makePassword()\n {\n $pass = \"\";\n $chars = array(\n \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\",\n \"a\", \"A\", \"b\", \"B\", \"c\", \"C\", \"d\", \"D\", \"e\", \"E\", \"f\", \"F\", \"g\", \"G\", \"h\", \"H\", \"i\", \"I\", \"j\", \"J\",\n \"k\", \"K\", \"l\", \"L\", \"m\", \"M\", \"n\", \"N\", \"o\", \"O\", \"p\", \"P\", \"q\", \"Q\", \"r\", \"R\", \"s\", \"S\", \"t\", \"T\",\n \"u\", \"U\", \"v\", \"V\", \"w\", \"W\", \"x\", \"X\", \"y\", \"Y\", \"z\", \"Z\");\n\n $count = count($chars) - 1;\n\n srand((double) microtime() * 1000000);\n\n for ($i = 0; $i < 8; $i++) {\n $pass .= $chars[rand(0, $count)];\n }\n\n return ($pass);\n }", "function DrawCharacters() {\n// $log = new LOG();\n// $log->err(strlen($this->sCode));\n for ($i = 0; $i < $this->iNumChars; $i++) {\n // select random font\n $sCurrentFont = $this->aFonts[array_rand($this->aFonts)];\n\n // select random colour\n if ($this->bUseColour) {\n $iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n } else {\n $iRandColour = rand(0, 100);\n $iTextColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n }\n\n // select random font size\n $iFontSize = rand($this->iMinFontSize, $this->iMaxFontSize);\n\n // select random angle\n $iAngle = rand(-30, 30);\n if ($this->chinese) {\n $code = $this->sCode[$i * 3] . $this->sCode[$i * 3 + 1] . $this->sCode[$i * 3 + 2];\n } else\n $code = $this->sCode[$i];\n\n\n // get dimensions of character in selected font and text size\n $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $code, array());\n\n // calculate character starting cochrinates\n $iX = $this->iSpacing / 8 + $i * $this->iSpacing;\n $iCharHeight = $aCharDetails[2] - $aCharDetails[5];\n $iY = $this->iHeight / 2 + $iCharHeight / 4;\n\n // write text to image\n imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $code, array());\n }\n }", "function shortcode()\n{\n\t//$uuid = substr($chars,0,3) . rand(100,999);\n\t$uuid = rand(100,999) . rand(100,999) . rand(100,999);\n\treturn strtoupper($uuid);\n}", "function gerasenha($tamanho = 6, $maiusculas = true, $numeros = true, $simbolos = false){\r\n\t$lmin = 'abcdefghijklmnopqrstuvwxyz';\r\n\t$lmai = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\t$num = '1234567890';\r\n\t$simb = '!@#$%*-';\r\n\t\r\n\t// Variáveis internas\r\n\t$retorno = '';\r\n\t$caracteres = '';\r\n\t\r\n\t// Agrupamos todos os caracteres que poderão ser utilizados\r\n\t$caracteres .= $lmin;\r\n\tif ($maiusculas) $caracteres .= $lmai;\r\n\tif ($numeros) $caracteres .= $num;\r\n\tif ($simbolos) $caracteres .= $simb;\r\n\t\r\n\t// Calculamos o total de caracteres possíveis\r\n\t$len = strlen($caracteres);\r\n\t\r\n\tfor ($n = 1; $n <= $tamanho; $n++) {\r\n\t// Criamos um número aleatório de 1 até $len para pegar um dos caracteres\r\n\t$rand = mt_rand(1, $len);\r\n\t// Concatenamos um dos caracteres na variável $retorno\r\n\t$retorno .= $caracteres[$rand-1];\r\n\t}\r\n\t\r\n\treturn $retorno;\r\n\t}", "function checkParanoia(){\necho date(\"d M Y H:i:s\",time()).\"<br>Checking paranoia chars...<br><br>\";\n while(list($d,$r)=each($this->para)){\n echo $d.\".&nbsp;&nbsp; <b>\".$r.\"</b> = <b>\".ord($r).\"</b><br>\";\n }\n\n}", "private function createRandomString() {\n\t\t$characters = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$res = '';\n\t\tfor ($i = 0; $i < 20; $i++) {\n\t\t\t$res .= $characters[mt_rand(0, strlen($characters) - 1)];\n\t\t}\n\t\treturn $res;\n\t}", "function string_repeat_char( $p_character, $p_repeats ) {\r\n\treturn str_pad( '', $p_repeats, $p_character );\r\n}", "function r(){\n\t\t\n\t\t$chars = '0123456789';\n\t\t$s = substr(str_shuffle(str_repeat($chars, 5)), 0, 5);\n\t\treturn $s;\t\t\t\n\t\t}", "function gen_pwd($chars) \n\t{\n\t\t$data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';\n\t\treturn substr(str_shuffle($data), 0, $chars);\n\t}", "function getChaine($long = 8){\n $chaine = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n $str = '';\n for($u = 1; $u <= $long; $u++) {\n $nb = strlen($chaine);\n $nb = mt_rand(0,($nb-1));\n $str .= $chaine[$nb];\n }\n return $str;\n}", "function generateRandom($length) {\n\t$generated = '';\n\tfor ($i=0;$i<=$length;$i++) {\n\t\t$chr = '';\n\t\tswitch (mt_rand(1,3)) {\n\t\t\tcase 1:\n\t\t\t\t$chr = chr(mt_rand(48,57));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\t$chr = chr(mt_rand(65,90));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 3:\n\t\t\t$chr = chr(mt_rand(97,122));\n\t\t}\n\t $generated.=$chr;\n\t}\t\n\n return $generated;\n}", "function generateCode($length, $abc = 'abcdefghjkmnpqrstuvwxyABCDEFGHJKLMNPQRSTUVWYX2345678') \n {\n for ($code = '', $cl = strlen($abc)-1, $i = 0; $i < $length; $code .= $abc[mt_rand(0, $cl)], ++$i);\n return $code;\n }", "function Genera_Password($cadena){\r\n $cadena_1 = \"1234567890\";\r\n\t$cadena_2 = \"&%$/.@*_-#\";\r\n //Obtenemos la longitud de la cadena de caracteres\r\n $longitudCadena_1=strlen($cadena_1);\r\n\t$longitudCadena_2=strlen($cadena_2);\r\n\r\n //Se define la variable que va a contener la contrase�a\r\n $pass = \"\";\r\n //Se define la longitud de la contrase�a, en mi caso 10, pero puedes poner la longitud que quieras\r\n $longitudPass=4;\r\n\r\n\t$pass = $cadena.substr($cadena_1,rand(0,$longitudCadena_1-1),1).substr($cadena_1,rand(0,$longitudCadena_1-1),1).substr($cadena_2,rand(0,$longitudCadena_2-1),1).substr($cadena_2,rand(0,$longitudCadena_2-1),1);\r\n\r\n return $pass;\r\n}", "protected function getRandomCharsFromToken()\n\t{\n\t\t$theTokenTokens = explode( ':', $this->myNewToken ) ;\n\t\treturn $theTokenTokens[1] ;\n\t}", "function generateRandomSymbol() {\n $r = mt_rand(0, 3);\n switch($r) {\n case 0: $i = mt_rand(33, 47); break;\n case 1: $i = mt_rand(58, 64); break;\n case 2: $i = mt_rand(91, 96); break;\n case 3: $i = mt_rand(123, 126); break;\n }\n return chr($i);\n }", "function gen_pwd($chars) \n\t{\n\t\t$ci = get_instance()->load->helper('myencrypt');\n\t\treturn random_str($chars);\n\t}", "function darLetras($solucion){ \r\n $azar = rand(0,strlen($solucion)-1);\r\n $dLetra = $solucion[$azar];\r\n $posicionLetra = $azar.strtoupper($dLetra);\r\n return $posicionLetra;\r\n }", "function preparaCaracter($string)\n{\n $temp = explode(\" \", $string);\n $id = \"\";\n for($x=0;$x<count($temp);$x++)\n {\n if($x != 1)\n {\n $id .= $temp[$x].\"_\";\n }\n }\n $string = substr($id,0,-1);\n return strtolower(retiraAcentos($string));\n}", "function chMajuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\"){\r\n $codeValeur = ord($valeur[$i]) - 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "private function genCode()\r\n\t{\r\n\t\t$digits = 10;\r\n\t\treturn rand(pow(10, $digits-1), pow(10, $digits)-1);\r\n\t}", "function ae_gen_password($syllables = 3, $use_prefix = false)\n{\n if (!function_exists('ae_arr')) {\n\n // This function returns random array element\n function ae_arr(&$arr)\n {\n return $arr[rand(0, sizeof($arr) - 1)];\n }\n\n }\n\n // 20 prefixes\n $prefix = array('aero', 'anti', 'auto', 'bi', 'bio',\n 'cine', 'deca', 'demo', 'dyna', 'eco',\n 'ergo', 'geo', 'gyno', 'hypo', 'kilo',\n 'mega', 'tera', 'mini', 'nano', 'duo');\n\n // 10 random suffixes\n $suffix = array('dom', 'ity', 'ment', 'sion', 'ness',\n 'ence', 'er', 'ist', 'tion', 'or');\n\n // 8 vowel sounds\n $vowels = array('a', 'o', 'e', 'i', 'y', 'u', 'ou', 'oo');\n\n // 20 random consonants\n $consonants = array('w', 'r', 't', 'p', 's', 'd', 'f', 'g', 'h', 'j',\n 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm', 'qu');\n\n $password = $use_prefix ? ae_arr($prefix) : '';\n $password_suffix = ae_arr($suffix);\n\n for ($i = 0; $i < $syllables; $i++) {\n // selecting random consonant\n $doubles = array('n', 'm', 't', 's');\n $c = ae_arr($consonants);\n if (in_array($c, $doubles) && ($i != 0)) {\n // maybe double it\n if (rand(0, 2) == 1) // 33% probability\n {\n $c .= $c;\n }\n\n }\n $password .= $c;\n //\n // selecting random vowel\n $password .= ae_arr($vowels);\n\n if ($i == $syllables - 1) // if suffix begin with vovel\n {\n if (in_array($password_suffix[0], $vowels)) // add one more consonant\n {\n $password .= ae_arr($consonants);\n }\n }\n\n }\n\n // selecting random suffix\n $password .= $password_suffix;\n\n return $password;\n}", "function genererStr($longueur) {\n // initialiser la variable $mdp\n $mdp = \"\";\n\n // Définir tout les caractères possibles dans le mot de passe, \n // Il est possible de rajouter des voyelles ou bien des caractères spéciaux\n $possible = \"2346789bcdfghjkmnpqrtvwxyzBCDFGHJKLMNPQRTVWXYZ\";\n\n // obtenir le nombre de caractères dans la chaîne précédente\n // cette valeur sera utilisé plus tard\n $longueurMax = strlen($possible);\n\n if ($longueur > $longueurMax) {\n $longueur = $longueurMax;\n }\n\n // initialiser le compteur\n $i = 0;\n\n // ajouter un caractère aléatoire à $mdp jusqu'à ce que $longueur soit atteint\n while ($i < $longueur) {\n // prendre un caractère aléatoire\n $caractere = substr($possible, mt_rand(0, $longueurMax - 1), 1);\n\n // vérifier si le caractère est déjà utilisé dans $mdp\n if (!strstr($mdp, $caractere)) {\n // Si non, ajouter le caractère à $mdp et augmenter le compteur\n $mdp .= $caractere;\n $i++;\n }\n }\n\n // retourner le résultat final\n return $mdp;\n}", "function DrawCharacters() {\n for ($i = 0; $i < strlen($this->sCode); $i++) {\n // select random font\n $sCurrentFont = $this->aFonts[array_rand($this->aFonts)];\n \n // select random colour\n if ($this->bUseColour) {\n //$iTextColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n //hardcoding red color for easier identification, random colors resulted in difficult to read chars\n $iTextColour = imagecolorallocate($this->oImage, 255,0,0);\n \n if ($this->bCharShadow) {\n // shadow colour\n $iShadowColour = imagecolorallocate($this->oImage, rand(0, 100), rand(0, 100), rand(0, 100));\n }\n } else {\n $iRandColour = rand(0, 100);\n $iTextColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n \n if ($this->bCharShadow) {\n // shadow colour\n $iRandColour = rand(0, 100);\n $iShadowColour = imagecolorallocate($this->oImage, $iRandColour, $iRandColour, $iRandColour);\n }\n }\n \n // select random font size\n $iFontSize = rand($this->iMinFontSize, $this->iMaxFontSize);\n \n // select random angle\n $iAngle = rand(-30, 30);\n \n // get dimensions of character in selected font and text size\n $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $this->sCode[$i], array());\n \n // calculate character starting coordinates\n $iX = $this->iSpacing / 4 + $i * $this->iSpacing;\n $iCharHeight = $aCharDetails[2] - $aCharDetails[5];\n $iY = $this->iHeight / 2 + $iCharHeight / 4; \n \n // write text to image\n imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $this->sCode[$i], array());\n \n if ($this->bCharShadow) {\n $iOffsetAngle = rand(-30, 30);\n \n $iRandOffsetX = rand(-5, 5);\n $iRandOffsetY = rand(-5, 5);\n \n imagefttext($this->oImage, $iFontSize, $iOffsetAngle, $iX + $iRandOffsetX, $iY + $iRandOffsetY, $iShadowColour, $sCurrentFont, $this->sCode[$i], array());\n }\n }\n }", "function cvf_td_generate_random_code($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "public static function chars()\n {\n return self::choose(0, 255)->fmap('chr');\n }" ]
[ "0.6607641", "0.65943", "0.6568492", "0.6522997", "0.63863266", "0.6251588", "0.62383705", "0.6223935", "0.61954516", "0.6177217", "0.6149367", "0.6140704", "0.6140348", "0.6132072", "0.6027043", "0.6023939", "0.600699", "0.6002173", "0.5979539", "0.5963263", "0.5958525", "0.5956225", "0.5935842", "0.59087825", "0.5885299", "0.58711034", "0.5852782", "0.58477634", "0.57844377", "0.57814634", "0.57631713", "0.57627785", "0.5755454", "0.57486004", "0.5733689", "0.5728022", "0.57265913", "0.57265043", "0.5724775", "0.57212037", "0.57108593", "0.570653", "0.5690966", "0.5683913", "0.5675235", "0.5665596", "0.56604695", "0.5656858", "0.5654853", "0.565353", "0.5651922", "0.5640814", "0.56385875", "0.56374115", "0.5635407", "0.5632785", "0.55941725", "0.5593421", "0.55924875", "0.55905354", "0.55867904", "0.5577014", "0.5565889", "0.555609", "0.55469334", "0.5546097", "0.55406743", "0.5539297", "0.5534595", "0.55329466", "0.55305153", "0.552828", "0.5527181", "0.5525883", "0.5525419", "0.55187225", "0.5508875", "0.55087775", "0.55032843", "0.55012316", "0.5499552", "0.54974455", "0.5496596", "0.5493833", "0.54844207", "0.5466927", "0.54648584", "0.54632723", "0.54629093", "0.5452286", "0.5449727", "0.54474646", "0.54386234", "0.5438498", "0.5435209", "0.54287", "0.54246056", "0.5422902", "0.5420702", "0.5416683" ]
0.6840336
0
/ Trae las ciudades en zona de riesgo
public function TraerCiudadRiesgo(){ $sentencia = $this->db->prepare("SELECT *FROM ciudad WHERE zona_riesgo=1 " ); $sentencia->execute(); // ejecuta - $query= $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChapeau();", "public function obtenerViajesplusAbonados();", "private function __getRupiah()\r\n\t{\r\n\t\t$request = Requests::get('http://www.bca.co.id/id/biaya-limit/kurs_counter_bca/kurs_counter_bca_landing.jsp');\r\n\t\t\r\n\t\tpreg_match('(\\d\\d\\40\\w+\\40\\d\\d\\d\\d\\40/\\40\\d\\d:\\d\\d\\40\\w+)', $request->body, $data['date']);\r\n\t\tpreg_match_all('/\\<td style=\"text-align:right;\"\\>(\\d+.\\d+)\\<\\/td\\>/', $request->body, $data['curr']);\r\n\r\n\t\t$return['date'] = $data['date'][0];\r\n\t\t$return['usd']['sell'] = $data['curr'][1][0];\r\n\t\t$return['usd']['buy'] = $data['curr'][1][1];\r\n\r\n\t\treturn $return;\r\n\t}", "public function traerCualquiera()\n {\n }", "function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}", "public function AggiornaPrezzi(){\n\t}", "public function getDirectriz()\n {\n $dir = false;\n if (self::getCod() === '110000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '120000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '210000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '220000') $dir='Ciencias Experimentales';\n if (self::getCod() === '230000') $dir='Ciencias Experimentales';\n if (self::getCod() === '240000') $dir='Ciencias de la Salud';\n if (self::getCod() === '250000') $dir='Ciencias Experimentales';\n if (self::getCod() === '310000') $dir='Ciencias Experimentales';\n if (self::getCod() === '320000') $dir='Ciencias de la Salud';\n if (self::getCod() === '330000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '510000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '520000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '530000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '540000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '550000') $dir='Humanidades';\n if (self::getCod() === '560000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '570000') $dir='Humanidades';\n if (self::getCod() === '580000') $dir='Humanidades';\n if (self::getCod() === '590000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '610000') $dir='Ciencias de la Salud';\n if (self::getCod() === '620000') $dir='Humanidades';\n if (self::getCod() === '630000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '710000') $dir='Humanidades';\n if (self::getCod() === '720000') $dir='Humanidades';\n return $dir;\n }", "public function getBanyakSoal();", "public function cortesia()\n {\n $this->costo = 0;\n }", "function obter_todas_noticias_ativas() {\n $this->db->where(array(\"status_noticia\"=>1));\n $this->db->order_by(\"data_noticia\", \"desc\");\n return $this->db->get('noticia');\n }", "public function ruta_critica()\n {\n $this->tpi_mas_dij();\n $this->tp_j();\n $this->ttj_menos_dij();\n $this->tt_i();\n\n // Identificaión de las actividades de la ruta crítica\n $this->identificacion();\n // TT¡ (2) = TP¡ (0)\n // TTj (3) = TPj (1)\n // TTj (3) - TT¡ (2) = TPj (1) - TP¡ (0) = d¡j\n $ruta_critica = [[]];\n $num_act = -1;\n $this->tablero->imprimir(false);\n for ($m = 0; $m < $this->d->_m; $m++) {\n for ($n = 0; $n < $this->d->_n; $n++) {\n if ($this->d->_datos[$m][$n] >= 0 && $n < $this->d->_n) {\n $num_act++;\n $ruta_critica[$num_act][0] = 0;\n if ($this->tablero->_datos[$num_act][3] !== $this->tablero->_datos[$num_act][1]) continue;\n if ($this->tablero->_datos[$num_act][4] !== $this->tablero->_datos[$num_act][2]) continue;\n if ($this->tablero->_datos[$num_act][4] - $this->tablero->_datos[$num_act][3] !== $this->d->_datos[$m][$n]) continue;\n if ($this->tablero->_datos[$num_act][2] - $this->tablero->_datos[$num_act][1] !== $this->d->_datos[$m][$n]) continue;\n //echo \"num: $num_act: \" . $this->tablero->_datos[$num_act][0] . ' ' . $this->tablero->_datos[$num_act][1] . ' '. $this->tablero->_datos[$num_act][2] . ' ' . $this->tablero->_datos[$num_act][3] . '<br>';\n //echo \"num: $num_act<br>\" ;\n $ruta_critica[$num_act][0] = 1;\n }\n }\n }\n $tablero_index = new Matriz([\n ['ACT','TPi', 'TPj', 'TTi', 'TTj', 'dij', 'ITij', 'FPij', 'HTij', 'HLij']\n ]);\n $RC = new Matriz($ruta_critica);\n $RC->imprimir(true);\n $tablero_index->imprimir(true);\n\n }", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}", "public function cercaP() {\r\n $operatore = $_SESSION[\"op\"];\r\n $ruolo = $operatore->getFunzione();\r\n\r\n $ricerca = array();\r\n $ricerca[\"numeroPratica\"] = isset($_REQUEST[\"numeroPratica\"]) ? $_REQUEST[\"numeroPratica\"] : null;\r\n $ricerca[\"statoPratica\"] = isset($_REQUEST[\"statoPratica\"]) ? $_REQUEST[\"statoPratica\"] : null;\r\n $ricerca[\"tipoPratica\"] = isset($_REQUEST[\"tipoPratica\"]) ? $_REQUEST[\"tipoPratica\"] : null;\r\n $ricerca[\"incaricato\"] = isset($_REQUEST[\"incaricato\"]) ? $_REQUEST[\"incaricato\"] : null;\r\n $ricerca[\"flagAllaFirma\"] = isset($_REQUEST[\"flagAllaFirma\"]) ? $_REQUEST[\"flagAllaFirma\"] : null;\r\n $ricerca[\"flagFirmata\"] = isset($_REQUEST[\"flagFirmata\"]) ? $_REQUEST[\"flagFirmata\"] : null;\r\n $ricerca[\"flagInAttesa\"] = isset($_REQUEST[\"flagInAttesa\"]) ? $_REQUEST[\"flagInAttesa\"] : null;\r\n $ricerca[\"flagSoprintendenza\"] = isset($_REQUEST[\"flagSoprintendenza\"]) ? $_REQUEST[\"flagSoprintendenza\"] : null;\r\n $offset = isset($_REQUEST[\"offset\"]) ? $_REQUEST[\"offset\"] : 0;\r\n $numero = isset($_REQUEST[\"numero\"]) ? $_REQUEST[\"numero\"] : 15;\r\n $richiestaFirmate = isset($_REQUEST[\"richiestaFirmate\"]) ? $_REQUEST[\"richiestaFirmate\"] : 0;\r\n\r\n if ($ruolo < 2) {\r\n $ricerca[\"incaricato\"] = $operatore->getId();\r\n }\r\n\r\n //$numeroPratiche = PraticaFactory::numeroTotalePratiche();\r\n $numeroPratiche= PraticaFactory::elencoNumeroP($ricerca);\r\n \r\n if ($offset >= $numeroPratiche) {\r\n $offset = 0;\r\n }\r\n if ($offset < 1) {\r\n $offset = 0;\r\n }\r\n\r\n if ($richiestaFirmate === 0) {\r\n $href = '<a href=\"index.php?page=operatore&cmd=aggiornaP&numeroP=';\r\n } elseif ($ruolo > 2) {\r\n $href = '<a href=\"index.php?page=responsabile&cmd=firmaP&numeroP=';\r\n }\r\n\r\n $pratiche = PraticaFactory::elencoP($ricerca, $offset, $numero);\r\n \r\n $x = count($pratiche);\r\n $data = \"\";\r\n for ($i = 0; $i < $x; $i++) {\r\n $data.= \"<tr class=\\\"\" . ($i % 2 == 1 ? \"a\" : \"b\") . \"\\\"><td>\" . $href\r\n . $pratiche[$i]->getNumeroPratica() . \"\\\">\" . $pratiche[$i]->getNumeroPratica() . \"</a></td>\"\r\n . \"<td>\" . $pratiche[$i]->getDataCaricamento(true) . \"</td>\"\r\n . \"<td>\" . $pratiche[$i]->getRichiedente() . \"</td>\"\r\n . \"<td>\" . PraticaFactory::tipoPratica($pratiche[$i]->getTipoPratica()) . \"</td>\"\r\n . \"<td>\" . PraticaFactory::statoPratica($pratiche[$i]->getStatoPratica()) . \"</td>\"\r\n . \"<td>\" . OperatoreFactory::getOperatore($pratiche[$i]->getIncaricato())->getNominativo() . \"</td>\"\r\n . \"</tr>\";\r\n }\r\n\r\n header('Cache-Control: no-cache, must-revalidate');\r\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\r\n header('Content-type: application/json');\r\n $json = array();\r\n $json[\"testo\"] = $data;\r\n $json[\"numeroPratiche\"] = $numeroPratiche;\r\n $json[\"numRow\"] = $x;\r\n echo json_encode($json);\r\n }", "public function zones()\n {\n $administrador = $this->session->userdata('is_admin');\n\n if (($administrador == 't')) {\n $fecha = date('Y-m-d');\n }\n\n $cuentaEstado = $this->newAcountModel->getUsuarioEstado();\n $estado = $cuentaEstado[\"estado\"]; //estado bd\n\n $data = array();\n $data['dias_licencia'] = null;\n\n //SI ES TOTALMENTE NUEVO EL USUARIO, SE REDIRECCIONAREMOS A ZOHO Y A GRACIAS\n if ($estado == \"4\") {\n //\n } else {\n\n $data['estado'] = $estado;\n\n //RESTA DE FECHAS PARA VALIDAR QUE YA SE LE ACABO EL TIEMPO AL USUARIO\n date_default_timezone_set(\"America/Lima\");\n $fecha = date('Y-m-d');\n $data['diasCuenta'] = $this->restarFechas($fecha, date('Y-m-d'));\n $data['diasCuentaDisponibles'] = 7 - $data['diasCuenta'];\n $data['offline'] = $this->input->get(\"offline\");\n\n // Si no ha completado la configuracion se envia a Wizard\n if ($estado == 3) {\n $this->wizard();\n } else {\n\n ////verifico los dias para mostrar alerta de vencimiento\n\n $data_empresa = $this->mi_empresa->get_data_empresa();\n $data[\"tipo_negocio\"] = $data_empresa['data']['tipo_negocio'];\n if ($data[\"tipo_negocio\"] == \"restaurante\") {\n $almacenActual = $this->dashboardModel->getAlmacenActual();\n $data[\"zonas\"] = $this->secciones_almacen->get_secciones_almacen('b.nombre != \"\" and a.activo=1 AND id_almacen=' . $almacenActual . ' AND a.id != -1');\n $data[\"mesas_secciones\"] = $this->secciones_almacen->get_mesas_secciones();\n\n $pedidos = 0;\n foreach ($data[\"mesas_secciones\"] as $key) {\n $pedidos = $this->ordenes->verificaEstado($key->id_seccion, $key->id);\n $key->pedidos = $pedidos;\n\n $fechaCreacion = $this->ordenes->getFechaOrdenMesa($key->id_seccion, $key->id);\n\n $key->fecha_creacion = !empty($fechaCreacion['created_at']) ? $fechaCreacion['created_at'] : '';\n }\n\n }\n\n $data_empresa = $this->mi_empresa->get_data_empresa();\n $data['permitir_formas_pago_pendiente'] = $data_empresa['data']['permitir_formas_pago_pendiente'];\n\n //formas de pagos\n $data['forma_pago'] = $this->forma_pago->getActiva();\n $data['impuesto'] = $this->impuestos->getFisrt();\n $data['sobrecosto'] = $data_empresa['data']['sobrecosto'];\n $data['simbolo'] = $data_empresa['data']['simbolo'];\n $data['multiples_formas_pago'] = $data_empresa['data']['multiples_formas_pago'];\n $data['type_licence'] = $this->dashboardModel->get_type_licence();\n $data['stores_avaibles'] = $this->dashboardModel->get_stores_avaibles();\n $data['steps_complete'] = $this->dashboardModel->get_complete_steps();\n //print_r($data['tipo_negocio_especializado']); die();\n\n $this->layout->template('dashboard')->show('frontend/dashboard/zones.php', array('data' => $data));\n }\n }\n }", "public static function getReceta(){\n return array(\"LENTEJA\"=>200, \"LONGANIZA VEGANA\"=>1);\n }", "function faireCours ()\n {\n // ECHAUFFEMENT\n echo \"(echauffez-vous d'abord)\";\n\n parent::faireCours();\n\n // RANGER LES SKIS\n echo \"(e)tirez-vous...\";\n }", "public function obtenerViajesplus();", "function arreglasecuord(){\n\t\t$mSQL='SELECT codigo,precio1,precio2,precio3,precio4 FROM sinv WHERE precio2>precio1 OR precio3>precio2 OR precio3>precio1 OR precio4>precio3 OR precio4>precio2 OR precio4>precio1';\n\t\t$query = $this->db->query($mSQL);\n\t\tforeach ($query->result() as $row){\n\t\t\t$dbcodigo= $this->db->escape($row->codigo);\n\t\t\t$precios = array($row->precio1,$row->precio2,$row->precio3,$row->precio4);\n\t\t\tsort($precios);\n\t\t\t$precios=array_reverse($precios);\n\n\t\t\t$data=array();\n\t\t\tforeach($precios as $i=>$prec){\n\t\t\t\t$o=$i+1;\n\t\t\t\t$ind='precio'.$o;\n\t\t\t\t$data[$ind] = $prec;\n\t\t\t}\n\n\t\t\t$where = \"codigo = ${dbcodigo}\";\n\t\t\t$sql = $this->db->update_string('sinv', $data, $where);\n\t\t\t$this->db->query($sql);\n\t\t}\n\t\t$this->arreglamarbases();\n\t}", "function grafico_1_3( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_partido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t// . \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t//echo $query;\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t//var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, actor, partido, cantidad de menciones\n\t$i = -1;\n\t$partidos = [];\n\t\n\t$children_partidos = [];\n\t$i_actor = 0;\n\tforeach($main as $k=>$v){\n\t\t// obtengo el/los partidos\n\t\t$partidos_array = json_decode( $v['id_partido'], true);\n\t\tif( ! is_array($partidos_array) ) continue;\n\t\t\n\t\tforeach($partidos_array as $p){\n\t\t\t$partido_nombre = R::findOne('attr_partido','id LIKE ?',[$p])['nombre'];\n\t\t\t$tabla[ ++$i ] = [\n\t\t\t\t'ua' => $ua_nombre,\n\t\t\t\t'actor' => $v['nombre'] . ' ' . $v['apellido'],\n\t\t\t\t'partido' => $partido_nombre,\n\t\t\t\t'cantidad' => $v['cantidad']\n\t\t\t\t];\n\t\t\t\t// agrego el partido y el grafico\n\t\t\t\tif(! in_array($partido_nombre,$partidos)){\n\t\t\t\t\t$partidos[] = $partido_nombre;\n\t\t\t\t\t$x = new StdClass(); // objeto vacio\n\t\t\t\t\t$x->name = $partido_nombre;\n\t\t\t\t\t$x->rank = 0;\n\t\t\t\t\t$x->weight = count($partidos); //'Yellow'; cargar desde JS\n\t\t\t\t\t$x->id = 1;\n\t\t\t\t\t$x->children = [];\n\t\t\t\t\t$children_partidos[] = $x;\n\t\t\t\t}\n\t\t\t\t// obtengo el indice del partido y lo inserto\n\t\t\t\t$index = array_search($partido_nombre,$partidos);\n\t\t\t\t$t = new StdClass(); // objeto vacio\n\t\t\t\t$t->name = $v['nombre'] . ' ' . $v['apellido'] . \" (\" . $v['cantidad'] . \")\";\n\t\t\t\t$t->rank = $v['cantidad'];\n\t\t\t\t$t->weight = $i_actor; //'Yellow'; cargar desde JS\n\t\t\t\t$t->id = 1;\n\t\t\t\t$t->children = [];\n\t\t\t\t// lo agrego al padre correspondiente\n\t\t\t\t$children_partidos[ $index ]->children[] = $t;\n\t\t\t\t$children_partidos[ $index ]->rank += 1;\n\t\t\t}\n\t\t\t++$i_actor;\n\t}\n\t// grafico\n\t/*$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];*/\n\t\n\t// creo los objetos partidos\n\t\n\t/*foreach($partidos as $p){\n\t\t$x = new StdClass(); // objeto vacio\n\t\t$x->name = $p;\n\t\t$x->rank = 0;\n\t\t$x->weight = 0; //'Yellow'; cargar desde JS\n\t\t$x->id = 1;\n\t\t$x->children = [];\n\t}*/\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Partidos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = $children_partidos;\n\t\n\t\n\t/*foreach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}*/\n\t\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n}", "public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }", "function Resumen() {\r\n\t\t/*RGB begin*/\r\n\t\tglobal $variables;\r\n\t\tif (!$variables)\r\n\t\t{\r\n\t\t\tchangeVariables();\r\n\t\t\t$variables = 1;\r\n\t\t}\r\n\t\t/*RGB end*/\r\n\t\r\n\t\tglobal $mis_puntos, $wcag1, $lst_A, $lst_AA, $lst_AAA, $resultados, $lang;\r\n\t\t$resultados = array();\r\n\t\t$letras = array('A' => 'lst_A', 'AA' => 'lst_AA', 'AAA' => 'lst_AAA');\r\n\r\n\t\tforeach ($letras as $p => $arr) {\r\n\t\t\tforeach ($$arr as $k => $v) {\r\n\t\t\t\tif (array_key_exists($v, $wcag1)) {\r\n\t\t\t\t\t$x = $p.$mis_puntos[$v];\r\n\t\t\t\t}\r\n\t\t\t\t/*RGB begin*/\r\n\t\t\t\tif($_SESSION['emag'] == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($v != 53 && $v != 56 && $v != 92 && $v != 72)\r\n\t\t\t\t\t\t$resultados[$x]++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t$resultados[$x]++;\r\n\t\t\t\t/*RGB end*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->t_duda = $resultados['Aduda'] + $resultados['AAduda'] + $resultados['AAAduda'];\r\n\t\t$this->t_mal = $resultados['Amal'] + $resultados['AAmal'] + $resultados['AAAmal'];\r\n\t\t$this->t_parcial = $resultados['Aparcial'] + $resultados['AAparcial'] + $resultados['AAAparcial'];\r\n\t\t$this->t_nose = $resultados['Anose'] + $resultados['AAnose'] + $resultados['AAAnose'];\r\n\r\n\t\tif ($resultados['Aduda'] + $resultados['Anose'] + $resultados['Aparcial'] + $resultados['Amal'] == 0) {\r\n\t\t\tif ($resultados['AAduda'] + $resultados['AAnose'] + $resultados['AAparcial'] + $resultados['AAmal'] == 0) {\r\n\t\t\t\tif ($resultados['AAAduda'] + $resultados['AAAnose'] + $resultados['AAAparcial'] + $resultados['AAAmal'] == 0) {\r\n\t\t\t\t\t$ico_acc = 'AAA';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ico_acc = 'AA';\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$ico_acc = 'A';\r\n\t\t\t}\r\n\t\t\t$this->accesibilidad = ' <img src=\"img/her_'.$ico_acc.'.gif\" alt=\"'.sprintf($lang['ico_hera_acc'], $ico_acc).'\" width=\"90\" height=\"30\" style=\"float:right\" />';\r\n\t\t}\r\n\t\t\r\n\t\t$this->myresults = $resultados;\r\n\r\n\t}", "function arrayColaEstudiantes (){\n\t\t\t$host = \"localhost\";\n\t\t\t$usuario = \"root\";\n\t\t\t$password = \"\";\n\t\t\t$BaseDatos = \"pide_turno\";\n\n\t $link=mysql_connect($host,$usuario,$password);\n\n\t\t\tmysql_select_db($BaseDatos,$link);\n\t\t\t$retorno = array();\n\t\t\t$consultaSQL = \"SELECT turnos.codigo, turnos.nombre, turnos.carrera FROM turnos WHERE turnos.estado='No atendido' ORDER BY guia;\";\n\t\t\tmysql_query(\"SET NAMES utf8\");\n\t\t\t$result = mysql_query($consultaSQL);\n\t\t\tfor($i=0;$fila= mysql_fetch_assoc($result); $i++) {\n\t\t\t\tfor($a= 0;$a<mysql_num_fields($result);$a++){\n\t\t\t\t\t$campo = mysql_field_name($result,$a);\n\t\t\t\t\t$retorno[$i][$campo] = $fila[$campo];\n\t\t\t\t}\n\t\t\t};\n\t\t\tmysql_close($link);\n\n\t\t\treturn $retorno;\n\t\t}", "abstract public function getPasiekimai();", "public function getAceite();", "public function accueil()\n {\n }", "function cuentabancos(){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,c.description,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=2 \n\t\t\tand c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3 and m.TipoMovto not like '%M.E%'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 group by m.Cuenta\n\t\t\t\");\n\t\t\treturn $sql;\n\t\t}", "function getRelaciones() {\n //arreglo relacion de tablas\n //---------------------------->DEPARTAMENTO(OPERADOR)\n $relacion_tablas['departamento']['ope_id']['tabla'] = 'operador';\n $relacion_tablas['departamento']['ope_id']['campo'] = 'ope_id';\n $relacion_tablas['departamento']['ope_id']['remplazo'] = 'ope_nombre';\n //---------------------------->DEPARTAMENTO(OPERADOR)\n //---------------------------->DEPARTAMENTO(REGION)\n $relacion_tablas['departamento']['der_id']['tabla'] = 'departamento_region';\n $relacion_tablas['departamento']['der_id']['campo'] = 'der_id';\n $relacion_tablas['departamento']['der_id']['remplazo'] = 'der_nombre';\n //---------------------------->DEPARTAMENTO(REGION)\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\n $relacion_tablas['municipio']['dep_id']['tabla'] = 'departamento';\n $relacion_tablas['municipio']['dep_id']['campo'] = 'dep_id';\n $relacion_tablas['municipio']['dep_id']['remplazo'] = 'dep_nombre';\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\n //---------------------------->CIUDAD\n $relacion_tablas['ciudad']['Id_Pais']['tabla'] = 'pais';\n $relacion_tablas['ciudad']['Id_Pais']['campo'] = 'Id_Pais';\n $relacion_tablas['ciudad']['Id_Pais']['remplazo'] = 'Nombre_Pais';\n //---------------------------->CIUDAD\n //---------------------------->CUENTAS\n $relacion_tablas['cuentas_financiero']['cft_id']['tabla'] = 'cuentas_financiero_tipo';\n $relacion_tablas['cuentas_financiero']['cft_id']['campo'] = 'cft_id';\n $relacion_tablas['cuentas_financiero']['cft_id']['remplazo'] = 'cft_nombre';\n //---------------------------->CUENTAS\n //---------------------------->CUENTAS UT\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['tabla'] = 'cuentas_financiero_tipo';\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['campo'] = 'cft_id';\n $relacion_tablas['cuentas_financiero_ut']['cft_id']['remplazo'] = 'cft_nombre';\n //---------------------------->CUENTAS UT\n //---------------------------->MOVIMIENTOS\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['tabla'] = 'extractos_movimiento_tipo';\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['campo'] = 'mov_tipo_id';\n $relacion_tablas['extracto_movimiento']['mov_tipo_id']['remplazo'] = 'mov_tipo_desc';\n //---------------------------->MOVIMIENTOS\n //---------------------------->CENTROS POBLADOS\n $relacion_tablas['centropoblado']['mun_id']['tabla'] = 'municipio';\n $relacion_tablas['centropoblado']['mun_id']['campo'] = 'mun_id';\n $relacion_tablas['centropoblado']['mun_id']['remplazo'] = 'mun_nombre';\n //---------------------------->CENTROS POBLADOS\n //---------------------------->TIPO HALLAZGO\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['tabla'] = 'areashallazgospendientes';\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['campo'] = 'idAreaHallazgo';\n $relacion_tablas['tipohallazgo']['idAreaHallazgo']['remplazo'] = 'descripcion';\n //---------------------------->TIPO HALLAZGO\n\n return $relacion_tablas;\n }", "function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\t$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}", "public function valorpasaje();", "public function getDados() {\n\n $oDadosMatricula = new stdClass();\n $iCodigoMatricula = $this->oMatricula->getCodigo();\n $iCodigoAluno = $this->oMatricula->getAluno()->getCodigoAluno();\n $iCodigoTurma = $this->oMatricula->getTurma()->getCodigo();\n $iCodigoEnsino = $this->oMatricula->getTurma()->getBaseCurricular()->getCurso()\n ->getEnsino()->getCodigo();\n $oDadosMatricula->codigo_matricula = $this->oMatricula->getMatricula();\n $oDadosMatricula->data_matricula = $this->oMatricula->getDataMatricula()->convertTo(DBDate::DATA_EN);\n $oDadosMatricula->situacao_matricula = utf8_encode($this->oMatricula->getSituacao());\n if ($this->oMatricula->getTipo() == 'R' && $this->oMatricula->getSituacao() == 'MATRICULADO') {\n $oDadosMatricula->situacao_matricula = utf8_encode(\"REMATRICULADO\");\n }\n if ($this->oMatricula->isConcluida()) {\n $oDadosMatricula->situacao_matricula .= \" (\".utf8_encode(\"CONCLUÍDA\").\")\";\n }\n $oDadosMatricula->etapa_matricula = utf8_encode($this->oMatricula->getEtapaDeOrigem()->getNome());\n $oDadosMatricula->turma_matricula = utf8_encode($this->oMatricula->getTurma()->getDescricao());\n $oDadosMatricula->turma_turno = utf8_encode($this->oMatricula->getTurma()->getTurno()->getDescricao());\n $oDadosMatricula->turma_calendario = utf8_encode($this->oMatricula->getTurma()->getCalendario()->getDescricao());\n $oDadosMatricula->turma_escola = utf8_encode($this->oMatricula->getTurma()->getEscola()->getNome());\n $oDadosMatricula->data_saida = '';\n if ($this->oMatricula->getDataEncerramento() != \"\") {\n $oDadosMatricula->data_saida = $this->oMatricula->getDataEncerramento()->convertTo(DBDate::DATA_EN);\n }\n\n\n $oDadosMatricula->periodos_etapa = $this->getPeridosEtapa();\n $oDadosMatricula->grade_aproveitamento = $this->getGradeAproveitamento();\n $oDadosMatricula->resultado_final_etapa = utf8_encode(ResultadoFinal($iCodigoMatricula,\n $iCodigoAluno,\n $iCodigoTurma,\n $this->oMatricula->getSituacao(),\n $this->oMatricula->isConcluida()?'S':'N',\n $iCodigoEnsino\n ));\n $oDadosMatricula->atividades_complementares = $this->getAtividadesComplementares();\n return $oDadosMatricula;\n }", "public function baseCjenovnik()\n\t{\n\t\t\n\t\t$p = array();\n\t\t$this->red = Cjenovnik::model()->findAll(\"id>0\");\n $this->red1 = TekstCjenovnik::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]));\n\t/*\t$this->period_od = $konj->period_od;\n\t\t$this->period_do = $row->period_do;\n\t\t$this->tip = $row->tip;\n\t\t$this->cjena_km = $row->cjena_km;\n\t\t$this->cjena_eur = $row->cjena_eur;*/\n\t}", "public function getCalculos() {\n\n if (count($this->aCalculos) == 0 && !empty($this->iPlanilha)) {\n\n $oDaoBensCalculo = new cl_benshistoricocalculobem();\n $sWhereCalculos = \"t58_benshistoricocalculo = {$this->iPlanilha}\";\n $sSqlBensCalculo = $oDaoBensCalculo->sql_query(null, \"benshistoricocalculobem.*, bens.*, bensdepreciacao.*\", \"t58_sequencial\", $sWhereCalculos);\n $rsBensCaculo = $oDaoBensCalculo->sql_record($sSqlBensCalculo);\n\n if ($oDaoBensCalculo->numrows > 0) {\n\n for ($iCalculo = 0; $iCalculo < $oDaoBensCalculo->numrows; $iCalculo++) {\n\n $oDadosCalculo = db_utils::fieldsMemory($rsBensCaculo, $iCalculo);\n\n $oCalculo = new CalculoBem();\n $oCalculo->setHistoricoCalculo($oDadosCalculo->t58_benshistoricocalculo);\n $oCalculo->setPercentualDepreciado($oDadosCalculo->t58_percentualdepreciado);\n $oCalculo->setSequencial($oDadosCalculo->t58_sequencial);\n $oCalculo->setTipoDepreciacao($oDadosCalculo->t58_benstipodepreciacao);\n $oCalculo->setValorAnterior($oDadosCalculo->t58_valoranterior);\n $oCalculo->setValorAtual($oDadosCalculo->t58_valoratual);\n $oCalculo->setValorCalculado($oDadosCalculo->t58_valorcalculado);\n $oCalculo->setValorResidual($oDadosCalculo->t58_valorresidual);\n $oCalculo->setValorResidualAnterior($oDadosCalculo->t58_valorresidualanterior);\n\n $oBem = new Bem();\n $oBem->setCodigoBem($oDadosCalculo->t52_bem);\n $oBem->setCodigoBemDepreciacao($oDadosCalculo->t44_sequencial);\n $oBem->setTipoDepreciacao( BemTipoDepreciacaoRepository::getPorCodigo($oDadosCalculo->t44_benstipodepreciacao) );\n $oBem->setTipoAquisicao( BemTipoAquisicaoRepository::getPorCodigo($oDadosCalculo->t44_benstipoaquisicao) );\n $oBem->setClassificacao(BemClassificacaoRepository::getPorCodigo($oDadosCalculo->t52_codcla));\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setValorAquisicao($oDadosCalculo->t52_valaqu);\n $oBem->setValorResidual($oDadosCalculo->t44_valorresidual);\n $oBem->setValorDepreciavel($oDadosCalculo->t44_valoratual);\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setDescricao($oDadosCalculo->t52_descr);\n\n $oCalculo->setBem($oBem);\n\n array_push($this->aCalculos, $oCalculo);\n }\n }\n\n unset($oDaoBensCalculo);\n unset($rsBensCaculo);\n }\n return $this->aCalculos;\n }", "private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }", "function get_apoderado_by_run(){\n $run_apoderado = $_POST[\"run_apoderado\"];\n\n $apoderado = new Apoderado();\n $apoderado->set_run($run_apoderado);\n\n if($apoderado->db_get_apoderado_by_run() == \"0\"){\n $result = array(\n \"result\" => false\n );\n\n print_r(json_encode($result, JSON_UNESCAPED_UNICODE));\n return null;\n }\n\n $direccion = new Direccion();\n $direccion->set_id_direccion($apoderado->get_id_direccion());\n $direccion->db_get_direccion_by_id();\n\n $comuna = new Comuna();\n $comuna->set_id_comuna($direccion->get_id_comuna());\n $comuna->db_get_comuna_by_id();\n\n $provincia = new Provincia();\n $provincia->set_id_provincia($comuna->get_id_provincia());\n $provincia->db_get_provincia_by_id();\n\n $matriz_apoderado = $apoderado->to_matriz();\n $matriz_apoderado[\"calle\"] = $direccion->get_calle();\n $matriz_apoderado[\"numero\"] = $direccion->get_numero();\n $matriz_apoderado[\"depto\"] = $direccion->get_depto();\n $matriz_apoderado[\"sector\"] = $direccion->get_sector();\n $matriz_apoderado[\"id_comuna\"] = $direccion->get_id_comuna();\n $matriz_apoderado[\"nombre_comuna\"] = $comuna->get_nombre();\n $matriz_apoderado[\"id_provincia\"] = $comuna->get_id_provincia();\n $matriz_apoderado[\"nombre_provincia\"] = $provincia->get_nombre();\n $matriz_apoderado[\"id_region\"] = $provincia->get_id_region();\n $matriz_apoderado[\"result\"] = true;\n\n print_r(json_encode($matriz_apoderado, JSON_UNESCAPED_UNICODE));\n\n return null;\n}", "public function run()\n {\n \n $provinces = array(\n array('01','01', 'Chachapoyas'),\n array('01','02', 'Bagua'),\n array('01','03', 'Bongará'),\n array('01','04', 'Condorcanqui'),\n array('01','05', 'Luya'),\n array('01','06', 'Rodríguez de Mendoza'),\n array('01','07', 'Utcubamba'),\n array('02','01', 'Huaraz'),\n array('02','02', 'Aija'),\n array('02','03', 'Antonio Raymondi'),\n array('02','04', 'Asunción'),\n array('02','05', 'Bolognesi'),\n array('02','06', 'Carhuaz'),\n array('02','07', 'Carlos Fermín Fitzcarrald'),\n array('02','08', 'Casma'),\n array('02','09', 'Corongo'),\n array('02','10', 'Huari'),\n array('02','11', 'Huarmey'),\n array('02','12', 'Huaylas'),\n array('02','13', 'Mariscal Luzuriaga'),\n array('02','14', 'Ocros'),\n array('02','15', 'Pallasca'),\n array('02','16', 'Pomabamba'),\n array('02','17', 'Recuay'),\n array('02','18', 'Santa'),\n array('02','19', 'Sihuas'),\n array('02','20', 'Yungay'),\n array('03','01', 'Abancay'),\n array('03','02', 'Andahuaylas'),\n array('03','03', 'Antabamba'),\n array('03','04', 'Aymaraes'),\n array('03','05', 'Cotabambas'),\n array('03','06', 'Chincheros'),\n array('03','07', 'Grau'),\n array('04','01', 'Arequipa'),\n array('04','02', 'Camaná'),\n array('04','03', 'Caravelí'),\n array('04','04', 'Castilla'),\n array('04','05', 'Caylloma'),\n array('04','06', 'Condesuyos'),\n array('04','07', 'Islay'),\n array('04','08', 'La Uniòn'),\n array('05','01', 'Huamanga'),\n array('05','02', 'Cangallo'),\n array('05','03', 'Huanca Sancos'),\n array('05','04', 'Huanta'),\n array('05','05', 'La Mar'),\n array('05','06', 'Lucanas'),\n array('05','07', 'Parinacochas'),\n array('05','08', 'Pàucar del Sara Sara'),\n array('05','09', 'Sucre'),\n array('05','10', 'Víctor Fajardo'),\n array('05','11', 'Vilcas Huamán'),\n array('06','01', 'Cajamarca'),\n array('06','02', 'Cajabamba'),\n array('06','03', 'Celendín'),\n array('06','04', 'Chota'),\n array('06','05', 'Contumazá'),\n array('06','06', 'Cutervo'),\n array('06','07', 'Hualgayoc'),\n array('06','08', 'Jaén'),\n array('06','09', 'San Ignacio'),\n array('06','10', 'San Marcos'),\n array('06','11', 'San Miguel'),\n array('06','12', 'San Pablo'),\n array('06','13', 'Santa Cruz'),\n array('07','01', 'Prov. Const. del Callao'),\n array('08','01', 'Cusco'),\n array('08','02', 'Acomayo'),\n array('08','03', 'Anta'),\n array('08','04', 'Calca'),\n array('08','05', 'Canas'),\n array('08','06', 'Canchis'),\n array('08','07', 'Chumbivilcas'),\n array('08','08', 'Espinar'),\n array('08','09', 'La Convención'),\n array('08','10', 'Paruro'),\n array('08','11', 'Paucartambo'),\n array('08','12', 'Quispicanchi'),\n array('08','13', 'Urubamba'),\n array('09','01', 'Huancavelica'),\n array('09','02', 'Acobamba'),\n array('09','03', 'Angaraes'),\n array('09','04', 'Castrovirreyna'),\n array('09','05', 'Churcampa'),\n array('09','06', 'Huaytará'),\n array('09','07', 'Tayacaja'),\n array('10','01', 'Huánuco'),\n array('10','02', 'Ambo'),\n array('10','03', 'Dos de Mayo'),\n array('10','04', 'Huacaybamba'),\n array('10','05', 'Huamalíes'),\n array('10','06', 'Leoncio Prado'),\n array('10','07', 'Marañón'),\n array('10','08', 'Pachitea'),\n array('10','09', 'Puerto Inca'),\n array('10','10', 'Lauricocha '),\n array('10','11', 'Yarowilca '),\n array('11','01', 'Ica '),\n array('11','02', 'Chincha '),\n array('11','03', 'Nasca '),\n array('11','04', 'Palpa '),\n array('11','05', 'Pisco '),\n array('12','01', 'Huancayo '),\n array('12','02', 'Concepción '),\n array('12','03', 'Chanchamayo '),\n array('12','04', 'Jauja '),\n array('12','05', 'Junín '),\n array('12','06', 'Satipo '),\n array('12','07', 'Tarma '),\n array('12','08', 'Yauli '),\n array('12','09', 'Chupaca '),\n array('13','01', 'Trujillo '),\n array('13','02', 'Ascope '),\n array('13','03', 'Bolívar '),\n array('13','04', 'Chepén '),\n array('13','05', 'Julcán '),\n array('13','06', 'Otuzco '),\n array('13','07', 'Pacasmayo '),\n array('13','08', 'Pataz '),\n array('13','09', 'Sánchez Carrión '),\n array('13','10', 'Santiago de Chuco '),\n array('13','11', 'Gran Chimú '),\n array('13','12', 'Virú '),\n array('14','01', 'Chiclayo '),\n array('14','02', 'Ferreñafe '),\n array('14','03', 'Lambayeque '),\n array('15','01', 'Lima '),\n array('15','02', 'Barranca '),\n array('15','03', 'Cajatambo '),\n array('15','04', 'Canta '),\n array('15','05', 'Cañete '),\n array('15','06', 'Huaral '),\n array('15','07', 'Huarochirí '),\n array('15','08', 'Huaura '),\n array('15','09', 'Oyón '),\n array('15','10', 'Yauyos '),\n array('16','01', 'Maynas '),\n array('16','02', 'Alto Amazonas '),\n array('16','03', 'Loreto '),\n array('16','04', 'Mariscal Ramón Castilla '),\n array('16','05', 'Requena '),\n array('16','06', 'Ucayali '),\n array('16','07', 'Datem del Marañón '),\n array('16','08', 'Putumayo'),\n array('17','01', 'Tambopata '),\n array('17','02', 'Manu '),\n array('17','03', 'Tahuamanu '),\n array('18','01', 'Mariscal Nieto '),\n array('18','02', 'General Sánchez Cerro '),\n array('18','03', 'Ilo '),\n array('19','01', 'Pasco '),\n array('19','02', 'Daniel Alcides Carrión '),\n array('19','03', 'Oxapampa '),\n array('20','01', 'Piura '),\n array('20','02', 'Ayabaca '),\n array('20','03', 'Huancabamba '),\n array('20','04', 'Morropón '),\n array('20','05', 'Paita '),\n array('20','06', 'Sullana '),\n array('20','07', 'Talara '),\n array('20','08', 'Sechura '),\n array('21','01', 'Puno '),\n array('21','02', 'Azángaro '),\n array('21','03', 'Carabaya '),\n array('21','04', 'Chucuito '),\n array('21','05', 'El Collao '),\n array('21','06', 'Huancané '),\n array('21','07', 'Lampa '),\n array('21','08', 'Melgar '),\n array('21','09', 'Moho '),\n array('21','10', 'San Antonio de Putina '),\n array('21','11', 'San Román '),\n array('21','12', 'Sandia '),\n array('21','13', 'Yunguyo '),\n array('22','01', 'Moyobamba '),\n array('22','02', 'Bellavista '),\n array('22','03', 'El Dorado '),\n array('22','04', 'Huallaga '),\n array('22','05', 'Lamas '),\n array('22','06', 'Mariscal Cáceres '),\n array('22','07', 'Picota '),\n array('22','08', 'Rioja '),\n array('22','09', 'San Martín '),\n array('22','10', 'Tocache '),\n array('23','01', 'Tacna '),\n array('23','02', 'Candarave '),\n array('23','03', 'Jorge Basadre '),\n array('23','04', 'Tarata '),\n array('24','01', 'Tumbes '),\n array('24','02', 'Contralmirante Villar '),\n array('24','03', 'Zarumilla '),\n array('25','01', 'Coronel Portillo '),\n array('25','02', 'Atalaya '),\n array('25','03', 'Padre Abad '),\n array('25','04', 'Purús'), \n );\n \n \n for ($i=0; $i < count($provinces) ; $i++) { \n DB::table('provinces')->insert([\n 'region' =>$provinces[$i][0],\n 'code' => $provinces[$i][1],\n 'name' => $provinces[$i][2]\n ]); \n }\n\n\n }", "public function recalculer_les_ca_styl()\n {\n \n // On reccuperere tous les mandataires \n\n $mandataires = User::where('role','mandataire')->get();\n $deb_annee = date(\"Y\").\"-01-01\";\n\n // pour chaque mandataire on calcul le ca styl et on le met à jour dans la table des mandataires \n foreach ($mandataires as $mandataire ) {\n // CA encaissé non partagé\n\n $compro_encaisse_partage_pas_n = Compromis::where([['user_id',$mandataire->id],['est_partage_agent',false],['demande_facture',2],['archive',false]])->get();\n $ca_encaisse_partage_pas_n = 0;\n if($compro_encaisse_partage_pas_n != null){ \n foreach ($compro_encaisse_partage_pas_n as $compros_encaisse) {\n if($compros_encaisse->getFactureStylimmo()->a_voir = false && $compros_encaisse->getFactureStylimmo()->encaissee == 1 && $compros_encaisse->getFactureStylimmo()->date_encaissement->format(\"Y-m-d\") >= $deb_annee){\n $ca_encaisse_partage_pas_n += $compros_encaisse->getFactureStylimmo()->montant_ttc;\n // echo $mandataire->id == 12 ? \"<br/>\".$compros_encaisse->numero_mandat.\" np\".$compros_encaisse->getFactureStylimmo()->montant_ttc : null ;\n }\n }\n \n }\n \n // CA encaissé partagé et porte affaire\n $compro_encaisse_porte_n = Compromis::where([['user_id',$mandataire->id],['est_partage_agent',true],['demande_facture',2],['archive',false]])->get();\n $ca_encaisse_porte_n = 0;\n\n if($compro_encaisse_porte_n != null){\n foreach ($compro_encaisse_porte_n as $compros_encaisse) {\n if($compros_encaisse->getFactureStylimmo()->a_voir = false && $compros_encaisse->getFactureStylimmo()->encaissee == 1 && $compros_encaisse->getFactureStylimmo()->date_encaissement->format(\"Y-m-d\") >= $deb_annee){\n $ca_encaisse_porte_n += $compros_encaisse->frais_agence * $compros_encaisse->pourcentage_agent/100;\n // echo $mandataire->id == 12 ? '<br/> pp '.$compros_encaisse->numero_mandat.'--'.$compros_encaisse->getFactureStylimmo()->montant_ttc * $compros_encaisse->pourcentage_agent/100: null ;\n }\n }\n }\n\n\n // CA encaissé partagé et ne porte pas affaire\n \n $compro_encaisse_porte_pas_n = Compromis::where([['agent_id',$mandataire->id],['est_partage_agent',true],['demande_facture',2],['archive',false]])->get();\n $ca_encaisse_porte_pas_n = 0;\n\n if($compro_encaisse_porte_pas_n != null){\n foreach ($compro_encaisse_porte_pas_n as $compros_encaisse) {\n if($compros_encaisse->getFactureStylimmo()->a_voir = false && $compros_encaisse->getFactureStylimmo()->encaissee == 1 && $compros_encaisse->getFactureStylimmo()->date_encaissement->format(\"Y-m-d\") >= $deb_annee){\n $ca_encaisse_porte_pas_n += $compros_encaisse->frais_agence * (100-$compros_encaisse->pourcentage_agent)/100;\n // echo $mandataire->id == 12 ? '<br/>ppp '.$compros_encaisse->numero_mandat.'--'.$compros_encaisse->getFactureStylimmo()->montant_ttc* (100-$compros_encaisse->pourcentage_agent)/100 : null ;\n }\n }\n }\n\n \n \n $ca_encaisse_N = round(($ca_encaisse_partage_pas_n+$ca_encaisse_porte_n+$ca_encaisse_porte_pas_n)/Tva::coefficient_tva(),2);\n\n $mandataire->chiffre_affaire_sty = $ca_encaisse_N ;\n $mandataire->update();\n \n // $mandataire->id == 12 ? dd($ca_encaisse_N) : null;\n \n }\n\n return \"OK\";\n }", "function historial(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='tomado'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "function Cuerpo($acceso,$where)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t$this->SetFont('Arial','',8);\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$cad=\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\deff0\\\\deflang11274{\\\\fonttbl{\\\\f0\\\\fswiss\\\\fcharset0 Arial;}}\n{\\\\*\\\\generator Msftedit 5.41.15.1512;}\\\\viewkind4\\\\uc1\\\\pard\\\\tx1988\\\\f0\\\\fs32 hola\\\\par\n\";\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"1\",0,\"C\",$fill);\n\t\t\t$nro_contrato=trim($dato[$i][\"nro_contrato\"]);\n\t\t\t$cedula=trim($dato[$i][\"cedula\"]);\n\t\t\t$nombre=utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"]));\n\t\t\t$etiqueta=utf8_decode(trim($dato[$i][\"etiqueta\"]));\n\t\t\t$telefono=utf8_decode(trim($dato[$i][\"telefono\"]));\n\t\t\t$deuda=number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.');\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"zona\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,5,utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$nombre_zona=utf8_decode(trim($dato[$i][\"nombre_zona\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(14,5,strtoupper(_(\"sector\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"calle\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_calle=utf8_decode(trim($dato[$i][\"nombre_calle\"]));\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(17,5,strtoupper(_(\"nro casa\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$num_casa=utf8_decode(trim($dato[$i][\"numero_casa\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"edif\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$edificio=utf8_decode(trim($dato[$i][\"edificio\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"piso\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$n_p=utf8_decode(trim($dato[$i][\"numero_piso\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(8,5,strtoupper(_(\"ref\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$direc_adicional=utf8_decode(trim($dato[$i][\"direc_adicional\"]));\n\t\t\t//$this->MultiCell(81,5,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',2);\n\t\t\t$this->Ln();\n\t\t\t$this->SetX(114);\n\t\t//\t$this->Cell(89,3,'',\"LR\",0,\"C\",$fill);\n\t\t\t//$this->Cell(array_sum($w),3,'',\"RL\",0,\"C\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==11 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t$cad.=\"$nro_contrato \\\\tab $nro_contrato \\\\tab\n\";\n\t\t$cont++;\n\t\t}\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"}\n\";\n\t\treturn $cad;\n\t}", "function hitungDenda(){\n\n return 0;\n }", "function cunsultas()\n {\n \t $data['categoria']=categoria::get();\n \t\t$data['unidad']=unidad::get();\n\n \t\treturn $data;\n }", "public function index()\n {\n\n //consome API cotação\n\n function get_page($url) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, True);\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl,CURLOPT_USERAGENT,'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20100101 Firefox/7.0.1');\n $return = curl_exec($curl);\n curl_close($curl);\n return $return;\n }\n\n $contents = json_decode(get_page('http://api.promasters.net.br/cotacao/v1/valores?moedas=USD&alt=json'), true);\n\n $cotacoes = $contents['valores'];\n\n $existePerfil = Perfil::select(\"valorRenda\")->where('idUser', Auth::user()->id)->get();\n\n if (count($existePerfil) > 0) {\n $valorRenda = Perfil::select(\"valorRenda\")->where('idUser', Auth::user()->id)->first()->valorRenda;\n } else {\n $valorRenda = 0;\n }\n\n $existePoupanca = Poupanca::where('idUser', Auth::user()->id)->get();\n if (count($existePoupanca) > 0) {\n $poupancas = Poupanca::where('idUser', Auth::user()->id)->get();\n } else {\n $poupancas = \"\";\n }\n \n //movimentação\n $existeEntradaSaida = EntradaSaida::where('idUser', Auth::user()->id)->get();\n \n $date = date('Y-m');\n $dateStart = date($date.'-01');\n $dateEnd = date($date.'-t');\n\n if(count($existeEntradaSaida) > 0) {\n $movimentacoes = EntradaSaida::where('idUser', Auth::user()->id)\n ->where('data', '>=', $dateStart)\n ->where('data', '<=', $dateEnd)->get();\n \n $entradas = 0;\n $saidas = 0;\n \n foreach ($movimentacoes as $value) {\n if ($value['tipo'] == 1) {\n $entradas = $value['valor']+$entradas;\n $entradas++;\n } else {\n $saidas = $value['valor'];\n $saidas++;\n }\n }\n \n } else {\n $movimentacoes = \"\";\n $entradas = 0;\n $saidas = 0;\n $sobra = 0;\n }\n\n \n\n $totalEntrada = $valorRenda + $entradas;\n $sobra = $totalEntrada - $saidas;\n \n return view('home', ['cotacoes' => $cotacoes, \n 'valorRenda' => $valorRenda, \n 'poupancas'=> $poupancas,\n 'totalEntrada' => $totalEntrada,\n 'saidas' => $saidas,\n 'sobra' => $sobra,\n 'movimentacoes' => $movimentacoes]);\n }", "function cicleinscription_get_vacancies_remaning(){\n\t\n}", "public function calcula13o()\n {\n }", "public function calcula13o()\n {\n }", "public function getAtividadesComplementares() {\n\n $oDaoMatriculaAc = new cl_turmaacmatricula();\n $iCodigoAluno = $this->oMatricula->getAluno()->getCodigoAluno();\n $iAnoCalendario = $this->oMatricula->getTurma()->getCalendario()->getAnoExecucao();\n $iEscola = $this->oMatricula->getTurma()->getEscola()->getCodigo();\n $sWhere = \"ed269_aluno = {$iCodigoAluno}\";\n $sWhere .= \" and ed52_i_ano = {$iAnoCalendario}\";\n\n $aAtividadesComplementares = array();\n\n $sSqlMatriculaAluno = $oDaoMatriculaAc->sql_query_turma(null, \"*\", null, $sWhere);\n $rsMatriculaAluno = $oDaoMatriculaAc->sql_record($sSqlMatriculaAluno);\n\n if ($rsMatriculaAluno && $oDaoMatriculaAc->numrows > 0) {\n\n $iTurmasAc = $oDaoMatriculaAc->numrows;\n for ($i = 0; $i < $iTurmasAc; $i++) {\n\n $oDadosTurmaComplementar = db_utils::fieldsMemory($rsMatriculaAluno, $i);\n $oEscola = EscolaRepository::getEscolaByCodigo($oDadosTurmaComplementar->ed268_i_escola);\n\n $iCodigoTurma = $oDadosTurmaComplementar->ed268_i_codigo;\n $iTipoTurma = $oDadosTurmaComplementar->ed268_i_tipoatend;\n $oDadosAtendimento = $oDadosTurmaComplementar->ed268_c_aee;\n $oTurmaComplementar = new stdclass();\n $oTurmaComplementar->nome_turma = utf8_encode($oDadosTurmaComplementar->ed268_c_descr);\n $oTurmaComplementar->codigo_turma = utf8_encode($oDadosTurmaComplementar->ed268_i_codigo);\n $oTurmaComplementar->turno_turma = utf8_encode($oDadosTurmaComplementar->ed15_c_nome);\n $oTurmaComplementar->escola = utf8_encode($oEscola->getNome());\n $oTurmaComplementar->tipo_turma = $iTipoTurma;\n $oTurmaComplementar->atividades = $this->getAtividades($iCodigoTurma, $iTipoTurma, $oDadosAtendimento);\n $oTurmaComplementar->aProfissionais = $this->getProfessoresVinculadosTurmaAtividadeComplementar($oDadosTurmaComplementar->ed268_i_codigo);\n $aAtividadesComplementares[] = $oTurmaComplementar;\n }\n }\n return $aAtividadesComplementares;\n }", "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "public function index()\n {\n //\n $sunatruc = new \\Tecactus\\Sunat\\RUC('eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjgyZjlmOTczMjM1ZDUzZDZlZDJhZGE4ZDEyZmNhN2Q2ZDRjZGI5YzlmOWQwZjA2ZjU3YjBkY2JjYzcyYmQ0ZjkwMDM3Y2MzMzdjYjFmOGMw'\n . 'In0.eyJhdWQiOiIxIiwianRpIjoiODJmOWY5NzMyMzVkNTNkNmVkMmFkYThkMTJmY2E3ZDZkNGNkYjljOWY5ZD'\n . 'BmMDZmNTdiMGRjYmNjNzJiZDRmOTAwMzdjYzMzN2NiMWY4YzAiLCJpYXQiOjE0OTQxNjI1MzUsIm5iZiI6MTQ5'\n . 'NDE2MjUzNSwiZXhwIjoxODA5Njk1MzM1LCJzdWIiOiIyNDciLCJzY29wZXMiOlsidXNlLXN1bmF0IiwidXNlLX'\n . 'JlbmllYyJdfQ.N2eRSiJWKj8NfuKpvi6AjLBl5cpxaNyeB2W5qF1AQkYg40ve9v9USZpvfUUoEw1TQ9YEWkl0N'\n . 'DK2Mhg5uoZkW6_D0DR5sPO_Vm1Ai3ffhX51VhDMi41VSyfWgGnBm36qAySj7DaIx_AYv0XDmZkz08406L31G_lb'\n . 'zCpVVLU-0a-63N0R44uJEdhile1cGbsrELdeKF4vlL6NLdqAYiWP0_ieZNbw6MBxVTlhgB-HtlRdVJjk7BoSKi4'\n . 'OEWZuca5iDjbP4cZR6F4IGkFRVFZLRmzwAYigmsX7FfH0ikkgw4cdD8QmDlTP8BQLvcr1cl-v2YrFCDlaOIBr-cd'\n . 'xEotYQXjlzjrjSZdzXYsE3OcVzMaBQBWImQZQBLoH0BBl5zwjHxgV7w6QmEoq2Xk0B5wAVxVO1s812zcXs9EXKJX'\n . 'BhcjVUagio05Jx368ZJgw8VhsBlnIYAInwLAJmwySU9see0pc8_9QK25qqvuftEdrIal9XcQ2HwBmTl2PxBUu5-Uj'\n . 'kXmTHk9A9DUSd3ShTmMzDHrBTny3ttRZWbx189RBHYHUC7trgitvGs-wFeIHaXPKgqUowB97DPmQ6t-VVAOM9XVjgG'\n . '1kdDiW0DjY8s8EyKOeVl-yywgjY8e2U4CryKKw92h-u37fJrY3M2vc1WVzMFrZpo_mwydtM1zmiBcqy9Y');\n// $resul = $sunatruc->getByRuc('10456510626');\n// $resul=$sunatruc->getByRuc('10456510626', true);\n// dd($sunatruc);\n return view('Acopio.taras',['sunat'=>$sunatruc]);\n }", "public function changeToOrdine()\n {\n\n //crea la tabella degli ordini verso i fornitori\n //Rielabora\n $preventivatore = $this->getPreventivatore();\n $result = $preventivatore->elabora();\n $imponibile = $result['prezzo_cliente_senza_iva'];\n $iva = $result['prezzo_cliente_con_iva'] - $result['prezzo_cliente_senza_iva'];\n $importo_trasportatore = $result['costo_trazione'];\n $importo_depositario = $result['deposito'];\n $importo_traslocatore_partenza = $result['costo_scarico_totale'] ;\n $importo_traslocatore_destinazione = $result['costo_salita_piano_totale'] + $result['costo_montaggio_totale'] + $result['costo_scarico_ricarico_hub_totale'];\n\n $totali = array();\n $totali[$this->id_trasportatore] = 0;\n $totali[$this->id_depositario] = 0;\n $totali[$this->id_traslocatore_destinazione] = 0;\n $totali[$this->id_traslocatore_partenza] = 0;\n\n $totaliMC = array();\n $totaliMC[$this->id_trasportatore] = 0;\n $totaliMC[$this->id_depositario] = 0;\n $totaliMC[$this->id_traslocatore_destinazione] = 0;\n $totaliMC[$this->id_traslocatore_partenza] = 0;\n\n\n $totali[$this->id_trasportatore] = $totali[$this->id_trasportatore] + $importo_trasportatore;\n $totali[$this->id_depositario] = $totali[$this->id_depositario] + $importo_depositario;\n $totali[$this->id_traslocatore_partenza] = $totali[$this->id_traslocatore_partenza] + $importo_traslocatore_partenza;\n $totali[$this->id_traslocatore_destinazione] = $totali[$this->id_traslocatore_destinazione] + $importo_traslocatore_destinazione;\n\n\n $mc = $preventivatore->getMC();\n\n $totaliMC[$this->id_trasportatore] = $totaliMC[$this->id_trasportatore] + $mc;\n $totaliMC[$this->id_depositario] = $totaliMC[$this->id_depositario] + $mc;\n $totaliMC[$this->id_traslocatore_destinazione] = $totaliMC[$this->id_traslocatore_destinazione] + $mc;\n $totaliMC[$this->id_traslocatore_partenza] = $totaliMC[$this->id_traslocatore_partenza] + $mc;\n\n $imponibile = round($totali[$this->id_trasportatore]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_trasportatore] - $imponibile,2);\n\n $ordine_trasportatore = new OrdineFornitore($this->id_preventivo, $this->id_trasportatore, $totali[$this->id_trasportatore], $imponibile, $iva, $totaliMC[$this->id_trasportatore], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASPORTO);\n $ordine_trasportatore->save();\n\n $imponibile = round($totali[$this->id_traslocatore_partenza]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_partenza] - $imponibile,2);\n\n $ordine_traslocatore_partenza = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_partenza, $totali[$this->id_traslocatore_partenza], $imponibile, $iva, $totaliMC[$this->id_traslocatore_destinazione], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_PARTENZA);\n $ordine_traslocatore_partenza->save();\n\n $imponibile = round($totali[$this->id_traslocatore_destinazione]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_destinazione] - $imponibile,2);\n $ordine_traslocatore_destinazione = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_destinazione, $totali[$this->id_traslocatore_destinazione], $imponibile, $iva, $totaliMC[$this->id_traslocatore_partenza], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_DESTINAZIONE);\n $ordine_traslocatore_destinazione->save();\n\n if ($this->giorni_deposito>10) {\n $imponibile = round($totali[$this->id_depositario]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_depositario] - $imponibile,2);\n\n $ordine_depositario = new OrdineFornitore($this->id_preventivo, $this->id_depositario, $totali[$this->id_depositario], $imponibile, $iva, $totaliMC[$this->id_depositario], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_DEPOSITO);\n $ordine_depositario->save();\n }\n\n\n\n $data_ordine = date('Y-m-d');\n $con = DBUtils::getConnection();\n $sql =\"UPDATE preventivi SET tipo=\".OrdineBusiness::TIPO_ORDINE.\" , data='\".$data_ordine.\"' ,\n importo_commessa_trasportatore ='\".$totali[$this->id_trasportatore].\"',\n importo_commessa_traslocatore_partenza ='\".$totali[$this->id_traslocatore_partenza].\"',\n importo_commessa_traslocatore_destinazione ='\".$totali[$this->id_traslocatore_destinazione].\"',\n importo_commessa_depositario ='\".$totali[$this->id_depositario].\"',\n imponibile ='\".$imponibile.\"',\n iva ='\".$iva.\"'\n WHERE id_preventivo=\".$this->id_preventivo;\n\n $res = mysql_query($sql);\n //echo \"\\nSQL: \".$sql;\n DBUtils::closeConnection($con);\n\n return new OrdineCliente($this->id_preventivo);\n }", "function Cuerpo($acceso,$id_contrato)\n\t{\n\t\t//echo \"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT tarifa_ser FROM vista_tarifa where id_serv='BM00001'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$costo_inst=utf8_decode(trim($row['tarifa_ser']));\n\t\t}\n\t\t//echo \"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\");\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\");\n\t\tif($row=row($acceso)){\n\t\t\n\t\t\t$observacion=utf8_decode(trim($row['observacion']));\n\t\t\t$costo_contrato=utf8_decode(trim($row['costo_contrato']));\n\t\t\t$tipo_cliente=utf8_decode(trim($row['tipo_cliente']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombrecli']));\n\t\t\t$apellidocli=utf8_decode(trim($row['apellido']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombre']));\n\t\t\t$etiqueta=utf8_decode(trim($row['etiqueta']));\n\t\t\t$cedulacli=utf8_decode(trim($row['cedula']));\n\t\t\t\n\t\t\t$fecha=formatofecha(trim($row[\"fecha_contrato\"]));\n\t\t\t$fecha_nac=formatofecha(trim($row[\"fecha_nac\"]));\n\t\t\t\n\t\t\t\n\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t$id_contrato=trim($row['id_contrato']);\n\t\t\n\t\t\n\t\t\t$puntos=utf8_decode(trim($row['puntos']));\n\t\t\t$deuda=utf8_decode(trim($row['deuda']));\n\t\t\tif($deuda==\"\"){\n\t\t\t\t$deuda=0;\n\t\t\t}\n\t\t\t\n\t\t\t$deuda=number_format($deuda, 2, ',', '.');\n\t\t\t$nombre_zona=utf8_decode(trim($row['nombre_zona']));\n\t\t\t$nombre_sector=utf8_decode(trim($row['nombre_sector']));\n\t\t\t$nombre_calle=utf8_decode(trim($row['nombre_calle']));\n\t\t\t$numero_casa=utf8_decode(trim($row['numero_casa']));\n\t\t\t$telefono=utf8_decode(trim($row['telefono']));\n\t\t\t$telf_casa=utf8_decode(trim($row['telf_casa']));\n\t\t\t$telf_adic=utf8_decode(trim($row['telf_adic']));\n\t\t\t$email=utf8_decode(trim($row['email']));\n\t\t\t$direc_adicional=utf8_decode(trim($row['direc_adicional']));\n\t\t\t$id_persona=utf8_decode(trim($row['id_persona']));\n\t\t\t$postel=utf8_decode(trim($row['postel']));\n\t\t\t$taps=utf8_decode(trim($row['taps']));\n\t\t\t$pto=utf8_decode(trim($row['pto']));\n\t\t\t$edificio=utf8_decode(trim($row['edificio']));\n\t\t\t$numero_piso=utf8_decode(trim($row['numero_piso']));\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre,apellido FROM persona where id_persona='$id_persona' LIMIT 1 offset 0 \");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$vendedor=utf8_decode(trim($row['nombre'])).\" \".utf8_decode(trim($row['apellido']));\n\t\t\t\n\t\t}\n\n\t\tif($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}\n\t\t\n\t\t\n\t\t$this->Ln();\t\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetXY(10,35);\t\t\n\t\t$this->Cell(195,10,\"Abonado: $nro_contrato\",\"0\",0,\"R\");\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->SetXY(40,50);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA JURIDICA.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Razón Social.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Actividad.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Telef.\",\"1\",0,\"J\");\n\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Representante Legal\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cargo en la Empresa.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA NATURAL.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: $nombrecli $apellidocli\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: $fecha_nac\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ingreso Mensual: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Deposito en Garantia: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Tipo Vivienda: Propia ___ Alquilado ___ Canon Mensual: ____\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(65,6,\"Vencimiento del Contrato: / / \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DATOS DEL CONYUGUE.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Ingreso Mensual.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DOMICILIO DEL SERVICIO\",\"1\",0,\"C\");\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Apellidos: $apellidocli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Vendedor: $vendedor\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Suscriptor Nº: $nro_contrato\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha: $fecha\",\"1\",0,\"J\");*/\n\t\t\t\t\n\t\n\t\t/*if($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}*/\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I. $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Ocupación: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Grupo Familiar Nº:\",\"1\",0,\"J\");\n\t\tif($fecha_nac=='11/11/1111'){\n\t\t\t$fecha_nac='';\n\t\t}\n\t\t$this->Cell(65,6,\"Fecha de Nacimiento : $fecha_nac\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"DOMICILIO DE SERVICIO\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb o Sector: $nombre_sector\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Calle n°: \",\"1\",0,\"J\");\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Avenida o Calle: $nombre_calle\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Vereda : \",\"1\",0,\"J\");\t\t\n\t\t\n\t\tif($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Piso:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"N° de Casa o Apto: $numero_casa $apto\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Referencia o Zona: $nombre_zona N°Poste:$postel\",\"1\",0,\"J\");\n\t\t//$this->Cell(65,6,\"N° de Poste: $postel\",\"0\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ruta Cuenta: \",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Zona: $nombre_zona\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Manzana: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb.: $nombre_sector\",\"1\",0,\"J\");*/\n\t\t\n\t\t/*if($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Cell(97,6,\"Apto.: $apto\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cod. Postal: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t//Rect( float x, float y, float w, float h [, string style])\n\t\t$this->Cell(98,6,\"Vivienda Alquilada: SI ____ NO ____\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha de Vencimineto de Alquiler: \",\"1\",0,\"J\");\n\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Proveedor de Internet: \",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\");\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"SERVICIOS \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,6,\"CANT.\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"P. UNITARIO \",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"P. TOTAL \",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Instalación Principal\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"1\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Tomas Adicionales\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Cable Coaxial\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Conectores\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Espliter\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\" \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(60,5,\"TOTAL A PAGAR BS\",\"1\",0,\"R\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"FECHA ESTIMADA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"HORA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"TOTAL A\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"$costo_contrato\",\"LRT\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"DE INSTALACION\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"SUGERIDA\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"PAGAR Bs.\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"\",\"LRB\",0,\"C\");*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PROGRAMACIÓN\",\"1\",0,\"C\");\t\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Descripción.\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Descripción\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Familiar Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Extendido Bs \",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Adulto Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Comercial I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Monto de Contrato: Bs. $costo_inst\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Firma del Abonado:_________________________ \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Puntos Adicionales:_________________________\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Costo Punto Adicional:_______________________\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Tiempo de Instalación:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Total a Cancelar Mensual:\",\"1\",0,\"J\");\n\t\t$this->Cell(30,6,\"Total:\",\"1\",0,\"J\");\n\t\t$this->Cell(35,6,\"Contrato:\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Observaciones.\",\"1\",0,\"J\");\n\t\t\t\t\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"$observacion\",\"1\",0,\"J\");*/\n\t\t\n\t/*\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"RECIBO DE PAGO\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"*EL PRECIO INCLUYE EL IMPUESTO DE LEY\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Efectivo\",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"Cheque\",\"1\",0,\"C\");\n\t\t$this->Cell(65,6,\"Cargo Cta. Cte.\",\"1\",0,\"C\");\n\t\t$this->Cell(60,6,\"Tarjeta de Credito:\",\"1\",0,\"C\");\n\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Bs. $costo_contrato\",\"1\",0,\"L\");\n\t\t$this->Cell(35,6,\"Nº.\",\"1\",0,\"L\");\n\t\t$this->Cell(65,6,\"Cta. Nº Bco.\",\"1\",0,\"L\");\n\t\t$this->Cell(60,6,\"Nombre:\",\"1\",0,\"L\");\n\t\t\n\t\n\t\t\n\t\t\n\t\t$this->Ln(15);\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Nota:\",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"En caso de que el televisor no acepte la señal de todos los canales del cable, es posible que amerite la instalación de un amplificador de sintonia, el cual deberá ser adquirido por el SUSCRIPTOR\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Atención: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"La Empresa. No autoriza el retiro de televisores y/o VHS por el personal de la empresa. El SUSCRIPTOR conoce y acepta las condiciones del contrato del servicio que apacen al dorso del presente\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Aviso: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"Se le informa a todos los suscriptores y publico en general de acuerdo a la Ley Orgánica de Telecomunicaciones, en el Artículo 189, Literal 2: será penado con prisión de uno (1) a cuatro (4) años, el que utilizando equipos o tecnologías de cualquier tipo, proporciones a un tercero el acceso o disfrute en forma fraudulenta o indebida de un serbicio o facilidad de telecomunicaciones \",\"0\",\"J\");\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,5,\"________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"_________________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"__________________________\",\"0\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Firma del Vendedor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Nombre y Apellido del Suscriptor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Firma del Suscriptor\",\"0\",0,\"C\");*/\n\t\t\n\t\t/*$this->Ln(4);\n\t\t\n\t\t$this->SetDrawColor(76,136,206);\n\t\t$this->SetLineWidth(.4);\n\t\t$this->SetFont('times','I',12);\n\t\t$this->SetX(10);\n\t\t$this->MultiCell(195,5,'Av. Perimetral, Centro Comercial Residencial Central. P.B. Local Nº 07. Cúa, Edo. Miranda.\[email protected] / [email protected]',\"TB\",\"C\");*/\n\t\t\n\t\t//$this->clausulas();\n\t\t\n\t\treturn $cad;\n\t}", "public function get_cite_comunicacion_interna(){\r\n //Tomamos los datos de la persona logueada\r\n $usuario_logueado = $this->datos_persona_logueada();\r\n foreach ($usuario_logueado as $usuario) {\r\n $persona_origen = $usuario->nombres.\" \".$usuario->paterno.\" \".$usuario->materno;\r\n $id_cargo_origen = $usuario->id_cargo;\r\n $cargo_origen = $usuario->descripcion_del_cargo;\r\n $sigla_origen = $usuario->sigla_del_area;\r\n $id_nivel_jerarquico_origen = $usuario->id_nivel_jerarquico;\r\n $id_area_origen = $usuario->id_area;\r\n $unidad_origen = $usuario->unidad;\r\n $id_direccion_origen = $usuario->id_direccion;\r\n $id_entidad_origen = $usuario->id_entidad;\r\n $id_servidor_publico_origen = $usuario->id_servidor_publico;\r\n }\r\n\r\n //Tomamos el año en curso\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Tomamos el correlativo para el cite\r\n $correlativo_cite = \\DB::table('chasqui_correlativos')\r\n ->where('id_area', $id_area_origen)\r\n ->where('id_tipo_documento', 1)\r\n ->where('gestion', $año)\r\n ->value('correlativo');\r\n\r\n //Si no existe el registro para el correlativo, lo creamos\r\n if ($correlativo_cite < 1) {\r\n //Tomamos el año (nuevamente por que se pierde)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Creamos el registro\r\n \\DB::table('chasqui_correlativos')->insert([\r\n ['id_area' => $id_area_origen,\r\n 'id_tipo_documento' => 1,\r\n 'correlativo' => 1,\r\n 'gestion' => $año]\r\n ]);\r\n //Establecemos el $correlativo_cite en 1\r\n $correlativo_cite = 1;\r\n }\r\n\r\n //Tomamos las siglas de unidad, direccion y ministerio para formar el cite segun sus dependencias\r\n $sigla_entidad = \\DB::table('areas')\r\n ->where('id_entidad', $id_entidad_origen)\r\n ->where('id_direccion', 0)\r\n ->where('unidad', 0)\r\n ->value('sigla');\r\n\r\n //Verificamos si tiene direccion, si es 0, signigica que depende de despacho\r\n if ($id_direccion_origen == 0) {\r\n //Tomamos el año (nuevamente por que se pierde y genera conflicto)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Verificamos si es una unidad dependiente de despacho\r\n if ($unidad_origen != 0) {\r\n // Si es una unidad dependiente de despacho, tomamos la sigla de la unidad\r\n $sigla_unidad = \\DB::table('areas')\r\n ->where('id_area', $id_area_origen)\r\n ->value('sigla');\r\n //Aramamos el cite como una unidad dependiente de despacho\r\n $cite = $sigla_entidad.\"-\".$sigla_unidad.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n else {\r\n //Aramamos el cite como un cargo dependiente de despacho\r\n $cite = $sigla_entidad.\"-DESP-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n }\r\n else {\r\n //Tomamos el año (nuevamente por que se pierde y genera conflicto)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //En caso que tenga direccion, tomamos la sigla\r\n $sigla_direccion = \\DB::table('areas')\r\n ->where('id_entidad', $id_entidad_origen)\r\n ->where('id_direccion', $id_direccion_origen)\r\n ->where('unidad', 0)\r\n ->value('sigla');\r\n //Verificamos si tiene unidad, si es 0 significa que depende de la direccion\r\n if ($unidad_origen == 0) {\r\n //Aramamos el cite como direccion\r\n $cite = $sigla_entidad.\"-\".$sigla_direccion.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n else {\r\n //En caso que si tenga unidad, tomamos la sigla\r\n $sigla_unidad = \\DB::table('areas')\r\n ->where('id_area', $id_area_origen)\r\n ->value('sigla');\r\n //Aramamos el cite como unidad\r\n $cite = $sigla_entidad.\"-\".$sigla_direccion.\"-\".$sigla_unidad.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n }\r\n\r\n //Devolvemos el cite generado\r\n return $cite;\r\n }", "function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}", "protected function armaColeccionObligatorios() {\n $dao = new PGDAO();\n $result = array();\n $where = $this->strZpTprop();\n if ($where != '') {\n $colec = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARACOBLIG . \" and tipoprop in (\" . $where . \")\"));\n } else {\n $colec = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARACOBLIG));\n }\n foreach ($colec as $carac) {\n $result[$carac['id_zpcarac']] = 0;\n }\n return $result;\n }", "function datos_censales($alumno)\n\t{\n $formulario_habilitado = $this->s__datos_config_reporte['formulario_habilitado'];\n\t\t//$habilitacion = $this->s__datos_config_reporte['habilitacion'];\n \n\t\t$formulario_terminado = toba::consulta_php('consultas_relevamiento_ingenierias')->get_formulario_terminado($formulario_habilitado, $alumno['encuestado']);\n\t\t\n\t\tif (!empty($formulario_terminado)) {\n\t\t\t$formulario_habilitado = $formulario_terminado[0]['formulario_habilitado'];\n\t\t\t$this->respuestas = toba::consulta_php('consultas_relevamiento_ingenierias')->get_respuestas_completas_formulario_habilitado_encuestado($formulario_habilitado, $alumno['encuestado']);\n\t\t\t\n\t\t\t//Respuestas Datos Censales Principales\n\t\t\t$rta_estado_civil \t= $this->get_respuestas(247);\n\t\t\t$rta_cant_hijos \t= $this->get_respuestas(248);\n\t\t\t$rta_cant_fliares \t= $this->get_respuestas(249);\n\t\t\t$rta_calle\t\t\t= $this->get_respuestas(251);\n\t\t\t$rta_numero\t\t\t= $this->get_respuestas(252);\n\t\t\t$rta_piso\t\t\t= $this->get_respuestas(253);\n\t\t\t$rta_depto\t\t\t= $this->get_respuestas(254);\n\t\t\t$rta_unidad\t\t\t= $this->get_respuestas(255);\n\t\t\t$rta_localidad\t\t= $this->get_respuestas(256);\n\t\t\t$rta_calle_proc\t\t= $this->get_respuestas(258);\n\t\t\t$rta_numero_proc\t= $this->get_respuestas(259);\n\t\t\t$rta_piso_proc\t\t= $this->get_respuestas(260);\n\t\t\t$rta_depto_proc\t\t= $this->get_respuestas(261);\n\t\t\t$rta_unidad_proc\t= $this->get_respuestas(262);\n\t\t\t$rta_localidad_proc\t= $this->get_respuestas(263);\n\t\t\t\n\t\t\t//Respuestas Datos Económicos - Financiamiento estudios\n\t\t\t$rtas_fuente = $this->get_respuestas(265, true);\n\t\t\t$rtas_beca\t = $this->get_respuestas(266, true);\n\t\t\t\n\t\t\t//Situación laboral\n\t\t\t$rta_cond_activ\t\t = $this->get_respuestas(268);\n\t\t\t$rta_es_usted\t\t = $this->get_respuestas(269);\n\t\t\t$rta_ocupacion_es\t = $this->get_respuestas(270);\n\t\t\t$rta_horas_semanales = $this->get_respuestas(271);\n\t\t\t$rta_rel_trab_carrera = $this->get_respuestas(272);\n\t\t\t\n\t\t\t//Situación del padre\n\t\t\t$rta_nivel_est_padre\t = $this->get_respuestas(274);\n\t\t\t$rta_vive_padre\t\t\t = $this->get_respuestas(275);\n\t\t\t$rta_cond_activ_padre\t = $this->get_respuestas(276);\n\t\t\t$rta_es_usted_padre\t\t = $this->get_respuestas(277);\n\t\t\t$rta_ocupacion_es_padre\t = $this->get_respuestas(278);\n\t\t\t$rta_si_no_trabaja_padre = $this->get_respuestas(279);\n\t\t\t\n\t\t\t//Situación de la madre\n\t\t\t$rta_nivel_est_madre\t = $this->get_respuestas(281);\n\t\t\t$rta_vive_madre\t\t\t = $this->get_respuestas(282);\n\t\t\t$rta_cond_activ_madre\t = $this->get_respuestas(283);\n\t\t\t$rta_es_usted_madre\t\t = $this->get_respuestas(284);\n\t\t\t$rta_ocupacion_es_madre\t = $this->get_respuestas(285);\n\t\t\t$rta_si_no_trabaja_madre = $this->get_respuestas(286);\n\t\t\t\n\t\t\t//Se arma la linea con las respuestas - Datos Censales Principales\n\t\t\t$linea = '|'.$rta_estado_civil['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_cant_hijos['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_cant_fliares['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_calle['respuesta_valor'].'|'.$rta_numero['respuesta_valor'].'|'.$rta_piso['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_depto['respuesta_valor'].'|'.$rta_unidad['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_localidad) ? '' : $rta_localidad['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_calle_proc['respuesta_valor'].'|'.$rta_numero_proc['respuesta_valor'].'|'.$rta_piso_proc['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_depto_proc['respuesta_valor'].'|'.$rta_unidad_proc['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_localidad_proc) ? '' : $rta_localidad_proc['respuesta_valor'];\n\t\t\t\n\t\t\t//Respuestas Datos Económicos - Financiamiento estudios\n\t\t\t$linea .= '|'.$this->get_lista_array_fuente($rtas_fuente).'|'.$this->get_lista_array_beca($rtas_beca);\n\t\t\t\n\t\t\t//Situación laboral\n\t\t\t$linea .= '|'.$rta_cond_activ['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted) \t\t ? '' : $rta_es_usted['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es) \t ? '' : $rta_ocupacion_es['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_horas_semanales) ? '' : $rta_horas_semanales['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_rel_trab_carrera) ? '' : $rta_rel_trab_carrera['respuesta_valor'];\n\t\t\t\n\t\t\t//Situación del padre\n\t\t\t$linea .= '|'.$rta_nivel_est_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_vive_padre) \t\t ? '' : $rta_vive_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_cond_activ_padre) \t ? '' : $rta_cond_activ_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted_padre) \t ? '' : $rta_es_usted_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es_padre) ? '' : $rta_ocupacion_es_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_si_no_trabaja_padre) ? '' : $rta_si_no_trabaja_padre['respuesta_valor'];\n\t\t\t\n\t\t\t//Situación de la madre\n\t\t\t$linea .= '|'.$rta_nivel_est_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_vive_madre) \t\t ? '' : $rta_vive_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_cond_activ_madre)\t ? '' : $rta_cond_activ_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted_madre) \t ? '' : $rta_es_usted_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es_madre) ? '' : $rta_ocupacion_es_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_si_no_trabaja_madre) ? '' : $rta_si_no_trabaja_madre['respuesta_valor'];\n\t\t\t\n\t\t\t//Fecha de terminación del formulario\n\t\t\t$linea .= '|'.$formulario_terminado[0]['fecha_terminado'];\n\t\t} else {\n\t\t\t$linea = '|||||||||||||||||||||||||||||||';\n\t\t}\n\t\t\n\t\t//Se retornan las respuestas del alumno\n\t\treturn $linea;\n\t}", "public static function vratiSve($db){\n \n \n // $result = $db->query('SELECT *,((i.datumDo - i.datumOd)*i.cenaPoDanu) as ukupnaCena FROM iznajmljivanje i join korisnik k on i.korisnik=k.korisnikID join vozilo v on i.vozilo=v.voziloID');\n $result = $db->query('SELECT * FROM iznajmljivanje i join korisnik k on i.korisnik=k.korisnikID join vozilo v on i.vozilo=v.voziloID');\n \n\n\n $iznajmljivanja = array();\n\n while($row = $result->fetch_assoc()) { \n // $tip = new TipVozila();\n // $tip->tipID= $row['tipID'];\n // $tip->nazivTipa= $row['nazivTipa'];\n\n\n $vozilo = new Vozilo();\n $vozilo->voziloID= $row['voziloID'];\n $vozilo->model= $row['model'];\n $vozilo->marka= $row['marka'];\n $vozilo->regBr= $row['regBr'];\n // $voziloPom->tipVozila = $tip;\n\n $korisnik= new Korisnik();\n $korisnik->korisnikID= $row['korisnikID'];\n $korisnik->ime = $row['ime'];\n $korisnik->prezime = $row['prezime'];\n\n $iznajmljivanje = new Iznajmljivanje();\n $iznajmljivanje->iznajmljivanjeID = $row['iznajmljivanjeID'];\n $iznajmljivanje->vozilo = $vozilo;\n $iznajmljivanje->korisnik = $korisnik;\n $iznajmljivanje->datumOd = $row['datumOd'];\n $iznajmljivanje->datumDo = $row['datumDo'];\n $iznajmljivanje->cenaPoDanu = $row['cenaPoDanu'];\n // $ukupnaCena = $row['ukupnaCena'];\n\n array_push($iznajmljivanja, $iznajmljivanje); \n }\n\n return $iznajmljivanja;\n}", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "static function listaClanaka(){\n\t\trequire_once(MODEL_ABS.'DB_DAO/Broker_baze.php');\n\t\trequire_once(MODEL_ABS.'DB_DAO/Clanak.php');\n\t\t\n\t\t$broker=new Broker();\n\t\t$clanak=new Clanak($broker);\n\t\t(isset($_GET['pag'])) ? $pag=$_GET['pag'] : $pag=0;\n\t\t(isset($_GET['korak'])) ? $korak=$_GET['korak'] : $korak=5;\n\t\t\n\t\t$rezultat['clanci']=$clanak->limitClanci($pag,$korak);\n\t\t$br_clanaka=$clanak->brojanjeClanaka();\n\t\t$rezultat['pags']=ceil($br_clanaka/$korak);\n\t\t$rezultat['pag']=$pag;\n\t\t\n\t\treturn $rezultat;\n\t}", "function fantacalcio_calcola_totali($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n\n// $vote_round = get_last_votes();\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $matches = array();\n foreach ($competitions as $c_id => $competition) {\n $competition_round = get_last_competition_round($c_id);\n $matches_competitions = get_round_matches($competition_round, '', $c_id);\n\n $matches = array_merge($matches, $matches_competitions);\n }\n\n $out = '';\n\n $header = array(\"Comp\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"W\");\n\n foreach ($matches as $m_id => $match) {\n $t1_id = $match->t1_id;\n $t2_id = $match->t2_id;\n $competition_round = $match->round;\n $c_id = get_cid_by_gid($match->g_id);\n\n $mod_por_1 = $match->mod_por_1;\n $mod_por_2 = $match->mod_por_2;\n $mod_dif_1 = $match->mod_dif_1;\n $mod_dif_2 = $match->mod_dif_2;\n $mod_centr_1 = $match->mod_centr_1;\n $mod_centr_2 = $match->mod_centr_2;\n $mod_att_1 = $match->mod_att_1;\n $mod_att_2 = $match->mod_att_2;\n \n $bonus_t1 = $match->bonus_t1;\n $bonus_t2 = $match->bonus_t2;\n\n $tot_voti_1 = get_totale($t1_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n $tot_voti_2 = get_totale($t2_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n\n $tot_1 = $tot_voti_1 + $mod_por_1 + $mod_dif_2 + $mod_centr_1 + $mod_att_1 + $bonus_t1;\n $tot_2 = $tot_voti_2 + $mod_por_2 + $mod_dif_1 + $mod_centr_2 + $mod_att_2 + $bonus_t2;\n\n $goals_1 = floor(($tot_1 -60) / 6);\n $goals_2 = floor(($tot_2 -60) / 6);\n $goals_1 = ($goals_1 >= 0) ? $goals_1 : 0;\n $goals_2 = ($goals_2 >= 0) ? $goals_2 : 0;\n \n //vittoria con scarto\n if (variable_get('fantacalcio_scarto', '0') && variable_get('fantacalcio_scarto_punti', '0') > 0) {\n if ( ($goals_1 == $goals_2) && ($tot_1 - $tot_2) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_1++;\n if ( ($goals_1 == $goals_2) && ($tot_2 - $tot_1) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_2++;\n }\n\n $winner_id = ($goals_1 > $goals_2) ? $t1_id : $t2_id;\n $winner_id = ($goals_1 == $goals_2) ? -1 : $winner_id;\n\n //aggiorno partite\n $sql = \"UPDATE {fanta_matches} SET \n pt_1 = '%f', \n pt_2 = '%f', \n tot_1 = '%f', \n tot_2 = '%f', \n goals_1 = '%d', \n goals_2 = '%d', \n played = 1, \n winner_id = '%d' \n WHERE m_id = '%d'\";\n $result = db_query($sql, $tot_voti_1, $tot_voti_2, $tot_1, $tot_2, $goals_1, $goals_2, $winner_id, $match->m_id);\n \n }\n\n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($rowx = db_fetch_array($resultx)) {\n $c_id = $rowx['c_id'];\n $competition_round = $rowx['competition_round'];\n\n $sql = \"SELECT * FROM {fanta_matches} \" .\n \"WHERE g_id IN (SELECT g_id FROM {fanta_groups} WHERE c_id = '%d') \" .\n \"AND round = '%d' \";\n $result = db_query($sql, $c_id, $competition_round);\n $out .= \"<h3>\" . check_plain($competitions[$c_id]->name) . \"</h3>\";\n\n $header = array(\"Squadra\", \"Punti\", \"Totale\", \"Goal\", \"Vincitore\");\n $rows = array();\n\n while ($row = db_fetch_array($result)) {\n $rows[$row['m_id'] . \"_1\"][] = $teams[$row['t1_id']]->name;\n $rows[$row['m_id'] . \"_1\"][] = $row['pt_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['tot_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['goals_1'];\n //$rows[$row['m_id'] . \"_1\"][] = $row['mod_att_1'];\n $rows[$row['m_id'] . \"_2\"][] = $teams[$row['t2_id']]->name;//squadra 2\n $rows[$row['m_id'] . \"_2\"][] = $row['pt_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['tot_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['goals_2'];\n $rows[$row['m_id'] . \"_2\"][] = ($row['winner_id'] == -1) ? \" - \" : $teams[$row['winner_id']]->name;\n \n $rows[$row['m_id'] . \"_3\"][] = array(\"data\" => \"<hr>\", \"colspan\" => 5);//separatore\n }\n $out .= theme_table($header, $rows);\n\n }\n\n return $out;\n}", "public function getInstrucoes();", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "public function plazo_restante_derivaciones(){\r\n //Tomamos los datos de la persona logueada\r\n $usuario_logueado = $this->datos_persona_logueada();\r\n foreach ($usuario_logueado as $usuario) {\r\n $id_cargo_logueado = $usuario->id_cargo;\r\n }\r\n\r\n //Tomamos las derivaciones recibidas del usuario logueado\r\n $derivaciones = $this->derivaciones_recibidas();\r\n\r\n //Tomamos la fecha actual\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n\r\n $array_plazo = array();\r\n\r\n //Obtenemos el plazo para obtener el tiempo restante de cada derivacion, armamos un array y lo mandamos\r\n foreach ($derivaciones as $derivacion) {\r\n $plazo = $derivacion->plazo;\r\n $fecha_creacion = $derivacion->fecha_creacion;\r\n\r\n //Ponemos en el formato correcto\r\n $fecha_creacion = Carbon::parse($fecha_creacion);\r\n\r\n //Restamos la fecha actual menos la de envio\r\n $dif_fechas = $fecha_creacion->diffInDays($hoy);\r\n\r\n //Verificamos el plazo restante\r\n $plazo_restante = $plazo - $dif_fechas;\r\n\r\n //Agregamos al array\r\n $array_plazo[] = $plazo_restante;\r\n }\r\n\r\n return $array_plazo;\r\n }", "public function historico()\n {\n $pasientes = (new \\App\\Models\\Pasientes())->getAll(['pasientes.*, null AS ciudad']);\n\n # Busqueda de ciuidad\n foreach ($pasientes as $key => $pasiente){\n $ciudad = (new Ciudades())->getById($pasiente['id_ciudad']);\n $pasientes[$key]['ciudad'] = $ciudad['ciudad'];\n }\n\n View::set('pasientes', $pasientes);\n echo View::render('pasientes');\n }", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "public function getZ() {}", "public function masodik()\n {\n }", "static function getTesoreriaPrevision() {\n\n // Albaranes confirmados o expedidos sin facturar\n $alb = new AlbaranesCab();\n $rows = $alb->cargaCondicion(\"sum(TotalBases) as total\", \"(IDEstado='1' or IDEstado='2')\");\n $previstoCobro = $rows[0]['total'];\n unset($alb);\n\n // Pedidos confirmados o recepcionados sin facturar\n $ped = new PedidosCab();\n $rows = $ped->cargaCondicion(\"sum(TotalBases) as total\", \"(IDEstado='1' or IDEstado='2')\");\n $previstoPago = $rows[0]['total'];\n unset($ped);\n\n return array(\n 'cobro' => $previstoCobro,\n 'pago' => $previstoPago\n );\n }", "function actualizarZona($casilla){\n global $db;\n $id = $_SESSION['loggedIn'];\n \n switch($casilla){\n case 1:\n $nuevoBarrio = 1;\n $nuevaZona = 1;\n break;\n \n case 2:\n $nuevoBarrio = 1;\n $nuevaZona = 2;\n break;\n \n case 3:\n $nuevoBarrio = 2;\n $nuevaZona = 1;\n break;\n \n case 4:\n $nuevoBarrio = 2;\n $nuevaZona = 2;\n break;\n \n case 5:\n $nuevoBarrio = 2;\n $nuevaZona = 3;\n break;\n \n case 6:\n $nuevoBarrio = 3;\n $nuevaZona = 1;\n break;\n \n case 7:\n $nuevoBarrio = 4;\n $nuevaZona = 1;\n break;\n \n case 8:\n $nuevoBarrio = 5;\n $nuevaZona = 1;\n break;\n \n case 9:\n $nuevoBarrio = 5;\n $nuevaZona = 2;\n break;\n \n case 10:\n $nuevoBarrio = 5;\n $nuevaZona = 3;\n break;\n \n case 11:\n $nuevoBarrio = 6;\n $nuevaZona = 1;\n break;\n \n case 12:\n $nuevoBarrio = 6;\n $nuevaZona = 2;\n break;\n \n case 13:\n $nuevoBarrio = 6;\n $nuevaZona = 3;\n break;\n \n case 14:\n $nuevoBarrio = 7;\n $nuevaZona = 1;\n break;\n \n case 15:\n $nuevoBarrio = 8;\n $nuevaZona = 1;\n break;\n \n case 16:\n $nuevoBarrio = 9;\n $nuevaZona = 1;\n break;\n \n case 17:\n $nuevoBarrio = 9;\n $nuevaZona = 2;\n break;\n \n case 18:\n $nuevoBarrio = 9;\n $nuevaZona = 3;\n break;\n \n case 19:\n $nuevoBarrio = 10;\n $nuevaZona = 1;\n break;\n \n \n }\n \n $sql = \"UPDATE personajes SET barrio='$nuevoBarrio', zona='$nuevaZona' WHERE id='$id'\";\n $stmt = $db->query($sql);\n header(\"location: ?page=zona&message=Exito\");\n \n}", "public function RicercaAvanzata(){\n $view = new VRicerca();\n $view->mostraFiltri();\n }", "public function nuevap5()\n {\n \t$sitios=request('pois');\n $mod=session('mod');\n $consult=DB::select('select poi.id_poi,poi.tiempoestancia,poi.nombre as pn,poi.coordenaday as cy,poi.coordenadax as cx\n from poi where poi.id_poi in('.$sitios.')');\n $poi=explode(\",\",$sitios);\n $cd=[];\n $pois=array();\n $ban=9999999;\n $vmin=[];\n for ($i=0; $i <count($poi); $i++) { \n foreach ($consult as $key) {\n if ($poi[$i]==$key->id_poi) {\n $cd[]=$key->cy.','.$key->cx;\n $this->pn[$key->id_poi]=$key->pn.\" \";\n }\n }\n }\n for($a=0;$a<count($cd);$a++){\n for ($b=0;$b<count($cd);$b++) { \n if ($a==$b) {\n $pois[$a][$b]=-1;\n }else{\n // se arma la tabla de distancias con todos los puntos de interes que pasaron los filtros anteriores\n $data = file_get_contents('https://api.mapbox.com/optimized-trips/v1/mapbox/'.$mod.'/'.$cd[$a].';'.$cd[$b].'?access_token=pk.eyJ1IjoidHVyaXN0cm91dGUiLCJhIjoiY2tuYjY3N2t4MDR5MjJ2cGhyYjFibGc1YSJ9.VhhVvZdDGKvZG75AhvHWsw', null, stream_context_create([\n 'http' => [\n 'header' => [\n 'Connection: close',],],]));\n $data=json_decode($data);\n \n $pois[$a][$b]=$data->trips[0]->distance; \n }\n }\n \n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($i!=$j) {\n if (bccomp($pois[$i][$j],$ban,10)==-1) {\n $min=($pois[$i][$j]);\n $ban=($pois[$i][$j]);\n }\n }\n }\n \n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) {\n if ($i!=$j) {\n $pois[$i][$j]=($pois[$i][$j])-$vmin[$i];\n }\n\n }}\n $vmin=[];\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n if (bccomp($pois[$j][$i],$ban,10)==-1) {\n $min=($pois[$j][$i]);\n $ban=($pois[$j][$i]);\n }\n }\n }\n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n $pois[$j][$i]=($pois[$j][$i])-$vmin[$i];\n }\n }\n } \n\n $a=0;\n // Luego de eliminar de la tabla de distancias los caminos mas largos,se envia la matriz al metodo formar_posi\n $this->lista_rutas[] = new route();\n $this->n_poi=count($poi);\n $this->poi=$poi;\n $this->matriz=$pois; \n $this->poi_conectados[] = new Conexion(); \n for($i = 0; $i < count($this->matriz); $i++) {\n $poi_c = new Conexion();\n for ($j = 0; $j < count($this->matriz); $j++) {\n if ($this->matriz[$i][$j]!=\"-1\") { \n $poi_c->setConexiones($j);\n $poi_c->setValor($this->matriz[$i][$j]);\n \n }\n }\n $this->poi_conectados[]=($poi_c);\n \n }\n \n $this->formar_posi($x=Array(),$y=Array(), 0, \"0\");\n //Finalmente envia al recorrido a la siguiente vista\n $result=$this->rutas_aptas();\n return view('guardarr')->with('rt',$result)->with('p',$this->pn);\n\n }", "public function run()\n {\n \t//DB::table('cn_cifras_nacionales')->delete();\n\n // Añadimos una entrada a esta tabla\n /*PIB por Provincias (Contribucion Variacion Anual)*/\n /*2007 NO Tiene Registros*/\n /*2008*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2008,'valor' => -1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n /*2009*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => -3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => -2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2009,'valor' => 2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n\n /*2010*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2010,'valor' => -1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n\n /*2011*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 5,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => -1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2011,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n\n /*2012*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => -1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2012,'valor' => 2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n /*2013*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2013,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n /*2014*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 3,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2014,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n /*2015*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => -1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => -5,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => -1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2015,'valor' => 2,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n /*2016*/\n\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 19,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 10,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 14,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 1,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 13,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 7,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 8,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => -1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 17,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 23,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 5,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 21,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 11,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 12,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 6,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 22,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 20,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 3,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 4,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 2,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 18,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 15,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 16,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 24,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => 0,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 9,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n CnCifrasNacionales::create(array('nombre_cifra_nacional' => 'PIB por provincias','año' => 2016,'valor' => -1,'tipo_impuesto_id' => 16,'tipo_cifra_nacional_id' => 4,'tipo_empresa_id' => 7,'provincia_id' => 28,'ciiu_id' => 188,'tipo_fuente_id' => 1,'zona_id' => 13,'subsector_id' => 23));\n\n }", "public function index(){\n\n $zonas = $this->database->select('Zona',['id','zona']);\n\n for ($i=0; $i <count($zonas); $i++) {\n\n $zonas[$i]['id']=intval($zonas[$i]['id']);\n\n }\n\n return $zonas;\n\n }", "public function run()\n {\n\n //croix sur blue par lucien\n DB::table('crosses')->insert([\n 'route_id' => 1,\n 'user_id' => 1,\n 'status_id' => 1, //en projet\n 'mode_id' => 2, //en moulinette\n 'hardness_id' => 2, //juste bien côté\n 'release_at' => date('Y-m-d H:m:s'),\n 'created_at' => date('Y-m-d H:m:s'),\n ]);\n\n //croix sur blue par léna\n DB::table('crosses')->insert([\n 'route_id' => 1,\n 'user_id' => 3,\n 'status_id' => 5, //à vue\n 'mode_id' => 1, //en tête\n 'hardness_id' => 1, //facile bien côté\n 'release_at' => date('Y-m-d H:m:s'),\n 'created_at' => date('Y-m-d H:m:s'),\n ]);\n\n //croix sur la lavandière (voie de 2 longueur)\n DB::table('crosses')->insert([\n 'route_id' => 6,\n 'user_id' => 1,\n 'status_id' => 3, //après travail\n 'mode_id' => 3, //en leader\n 'hardness_id' => 3, //dur pour la cotation\n 'release_at' => date('Y-m-d H:m:s'),\n 'created_at' => date('Y-m-d H:m:s'),\n ]);\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "public function nuevap6()\n {\n $sitios=request('indice');\n $consult=DB::select('select poi.id_poi,poi.tiempoestancia,poi.nombre as pn,poi.coordenaday as cy,poi.coordenadax as cx,imagen as img,costo\n from poi where poi.id_poi in('.$sitios.')'\n );\n $mod=session('mod');\n $poi=explode(\",\",$sitios);\n $sum=0;\n $time=0;\n $poi_anterior;\n $poi_actual;\n $cd;\n $tiempo;\n $nombres;\n $costo=0;\n foreach ($consult as $key) {\n $cd[$key->id_poi]=$key->cy.','.$key->cx;\n $tiempo[$key->id_poi]=$key->tiempoestancia;\n $nombres[$key->id_poi]=array('nombre'=>$key->pn,'img'=>$key->img);\n $costo=$costo+(int)$key->costo;\n }\n $band=0;\n foreach ($poi as $key => $value) {\n\n if ($band==0) {\n $poi_anterior=$cd[$value];\n $band=1;\n }else{\n \n $poi_actual=$cd[$value];\n //El tiempo y las distancias son obtenidos enviando las coordenadas a la api de mapbos\n $data = file_get_contents('https://api.mapbox.com/optimized-trips/v1/mapbox/'.$mod.'/'.$poi_anterior.';'.$poi_actual.'?access_token=pk.eyJ1IjoidHVyaXN0cm91dGUiLCJhIjoiY2tuYjY3N2t4MDR5MjJ2cGhyYjFibGc1YSJ9.VhhVvZdDGKvZG75AhvHWsw', null, stream_context_create([\n 'http' => [\n 'header' => [\n 'Connection: close',],],]));\n $data=json_decode($data);\n \n $sum=$sum+(($data->trips[0]->distance)/1000); \n $time=$time+$tiempo[$value]+(round(($data->trips[0]->duration)/60));\n $poi_anterior=$cd[$value];\n\n } \n }\n // Se envian los datos de la ruta a la siguiente vista\n return view('guardarrp2')->with('time',$time)->with('total',$sum)->with('poi',$poi)->with('nombres',$nombres)->with('costo',$costo);\n\n }", "function agrega_emergencia_ctraslado (\n $_fecha,$_telefono,\n $_plan,$_horallam,\n $_socio,$_nombre,\n $_tiposocio,$_edad,$_sexo,\n $_identificacion,$_documento,\n $_calle,$_numero,\n $_piso,$_depto,\n $_casa,$_monoblok,\n $_barrio,$_entre1,\n $_entre2,$_localidad,\n $_referencia,$_zona,\n $_motivo1,\n $_color,\n $_observa1,$_observa2,\n $_opedesp ,\n\t\t\t\t\t\t\t$_nosocio1 , $_noedad1 , $_nosexo1, $_noiden1 , $_nodocum1 ,\n\t\t\t\t\t\t\t$_nosocio2 , $_noedad2 , $_nosexo2, $_noiden2 , $_nodocum2 ,\n\t\t\t\t\t\t\t$_nosocio3 , $_noedad3 , $_nosexo3, $_noiden3 , $_nodocum3 ,\n\t\t\t\t\t\t\t$_nosocio4 , $_noedad4 , $_nosexo4, $_noiden4 , $_nodocum4 ,\n\t\t\t\t\t\t\t$_nosocio5 , $_noedad5 , $_nosexo5, $_noiden5 , $_nodocum5 ,\n $_bandera_nosocio1 ,$_bandera_nosocio2 ,$_bandera_nosocio3 ,$_bandera_nosocio4 ,\n\t\t\t\t\t\t\t$_bandera_nosocio5 \n )\n{\n $moti_explode ['0'] = substr($_motivo1, 0, 1);\n $moti_explode ['1'] = substr($_motivo1, 1, 2);\n\n // CALCULO DE FECHA Y DIA EN QUE SE MUESTRA EL TRASLADO EN PANTALLA\n $fecha_aux = explode (\".\" ,$_fecha );\n $hora_aux = explode (\":\" ,$_horallam);\n\n $_dia_tr =$fecha_aux[2];\n $_mes_tr =$fecha_aux[1];\n $_anio_tr =$fecha_aux[0];\n $_hora_tr =$hora_aux[0];\n $_min_tr =$hora_aux[1];\n $_param_tr =12; // parametro para mostrar en pantalla\n \n $traslado_aux = restaTimestamp ($_dia_tr , $_mes_tr, $_anio_tr , $_hora_tr , $_min_tr , $_param_tr);\n //***********************************************************\n $_plan = $_plan + 0;\n $insert_atencion = '\n insert into atenciones_temp\n (fecha,telefono,plan,\n horallam,socio,\n nombre,tiposocio,\n edad,sexo,\n identificacion,documento,\n calle,numero,\n piso,depto,casa,\n monoblok,barrio,\n entre1,entre2,\n localidad,referencia,\n zona,motivo1,\n motivo2,\n color,observa1,\n observa2,operec,traslado_aux ,fechallam)\n\n values\n\n (\n \"'.$_fecha.'\" , \"'.$_telefono.'\" , \"'.$_plan.'\" ,\n \"'.$_horallam.'\",\"'.$_socio.'\",\n \"'.utf8_decode($_nombre).'\",\"'.$_tiposocio.'\",\n \"'.$_edad.'\",\"'.$_sexo.'\",\n \"'.utf8_decode($_identificacion).'\",\"'.$_documento.'\",\n \"'.utf8_decode($_calle).'\",\"'.utf8_decode($_numero).'\",\n \"'.utf8_decode($_piso).'\",\"'.utf8_decode($_depto).'\",\n \"'.utf8_decode($_casa).'\",\"'.utf8_decode($_monoblok).'\",\n \"'.utf8_decode($_barrio).'\",\"'.utf8_decode($_entre1).'\",\n \"'.utf8_decode($_entre2).'\",\"'.utf8_decode($_localidad).'\",\n \"'.utf8_decode($_referencia).'\",\"'.$_zona.'\",\n '.$moti_explode[0].',\n '.$moti_explode[1].','.$_color.',\n \"'.utf8_decode($_observa1).'\",\"'.utf8_decode($_observa2).'\",\n \"'.utf8_decode($_opedesp).'\", \"'.$traslado_aux.'\" , \"'.$_fecha.'\"\n )\n ';\n\n // insert de la emergencia en atenciones temp\n global $G_legajo , $parametros_js;\n $result = mysql_query($insert_atencion);\n if (!$result) {\n $boton = '<input type=\"button\" value=\"Error! modificar y presionar nuevamente\"\n\t\t\t onclick=\" check_emergencia(\n\t\t\t document.formulario.muestra_fecha.value,document.formulario.telefono.value,\n\t\t\t document.formulario.i_busca_plan.value,document.formulario.hora.value,\n\t\t\t document.formulario.td_padron_idpadron.value,document.formulario.td_padron_nombre.value,\n\t\t\t document.formulario.td_padron_tiposocio.value,document.formulario.td_padron_edad.value,\n\t\t\t document.formulario.td_padron_sexo.value,document.formulario.td_padron_identi.value,\n\t\t\t document.formulario.td_padron_docum.value,document.formulario.td_padron_calle.value,\n\t\t\t document.formulario.td_padron_nro.value,document.formulario.td_padron_piso.value,\n\t\t\t document.formulario.td_padron_depto.value,document.formulario.td_padron_casa.value,\n\t\t\t document.formulario.td_padron_mon.value,document.formulario.td_padron_barrio.value,\n\t\t\t document.formulario.td_padron_entre1.value,document.formulario.td_padron_entre2.value,\n\t\t\t document.formulario.td_padron_localidad.value,document.formulario.referencia.value,\n\t\t\t document.formulario.s_lista_zonas.value,document.formulario.i_busca_motivos.value,\n\t\t\t document.formulario.s_lista_colores.value,document.formulario.obs1.value,\n\t\t\t document.formulario.obs2.value,'.$G_legajo.' ,\n\t\t\t document.formulario.check_traslado.value , document.formulario.dia_traslado.value ,\n\t\t\t document.formulario.mes_traslado.value , document.formulario.anio_traslado.value ,\n\t\t\t document.formulario.hora_traslado.value , document.formulario.minuto_traslado.value ,\n\t\t\t\t\t '.$parametros_js.' \n \t );\"/> ';\n \n }else \n {\n $boton = '<input type=\"button\" value=\"CERRAR CON EXITO\" onclick=\"window.close();\"/>';\n \n\n\n\t // recupero id para hacer altas de clientes no apadronados\n\t $consulta_id = mysql_query ('select id from atenciones_temp\n\t where fecha = \"'.$_fecha.'\" and plan = \"'.$_plan.'\"\n\t and horallam = \"'.$_horallam.'\" and nombre = \"'.$_nombre.'\"\n\t and tiposocio = \"'.$_tiposocio.'\" and motivo1 = '.$moti_explode[0].'\n\t and motivo2 = '.$moti_explode[1]);\n\n\n\t $fetch_idatencion=mysql_fetch_array($consulta_id);\n\n\n\t\tif ($_bandera_nosocio1 == 1) { $insert_nosocio1 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio1.'\" , \"'.$_noedad1.'\" , \"'.$_nosexo1.'\" , \"'.$_noiden1.'\" , \"'.$_nodocum1.'\" ) '); }\n\t\tif ($_bandera_nosocio2 == 1) { $insert_nosocio2 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio2.'\" , \"'.$_noedad2.'\" , \"'.$_nosexo2.'\" , \"'.$_noiden2.'\" , \"'.$_nodocum2.'\" ) '); }\n\t\tif ($_bandera_nosocio3 == 1) { $insert_nosocio3 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio3.'\" , \"'.$_noedad3.'\" , \"'.$_nosexo3.'\" , \"'.$_noiden3.'\" , \"'.$_nodocum3.'\" ) '); }\n\t\tif ($_bandera_nosocio4 == 1) { $insert_nosocio4 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio4.'\" , \"'.$_noedad4.'\" , \"'.$_nosexo4.'\" , \"'.$_noiden4.'\" , \"'.$_nodocum4.'\" ) '); }\n\t\tif ($_bandera_nosocio5 == 1) { $insert_nosocio5 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio5.'\" , \"'.$_noedad5.'\" , \"'.$_nosexo5.'\" , \"'.$_noiden5.'\" , \"'.$_nodocum5.'\" ) '); }\n }\n // mysql_query($insert_atencion);\n $insert_atencion='';\n //$insert_atencion='';\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n //escribimos en la capa con id=\"respuesta\" el texto que aparece en $salida\n $respuesta->addAssign(\"mensaje_agrega\",\"innerHTML\",$boton);\n\n //tenemos que devolver la instanciaci�n del objeto xajaxResponse\n return $respuesta;\n}", "public function run()\n {\n\n\n $kierunki=[\n 'Ekonomiczno-prawny',\n 'Informatyka w biznesie',\n 'Finanse i rachunkowość',\n 'Zarządzanie',\n 'informatyka i ekonometria',\n 'Gospodarka nieruchomościami',\n 'Przedsiębiorczość i inwestycje'\n ];\n\n $jezyki=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski'\n ];\n\n $ekonomiczno_prawny=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej','poprawna polszczyzna w praktyce','technologie informacyjne','wychowanie fizyczne',\n 'historia prawa','metody ilościowe w ekonomii','podstawy ekonomii','prawo cywilne cześć ogólna i rzeczowa','wstęp do prawoznawstwa',\n 'analiza i interpretacja informacji gospodarczych','etyka w biznesie','finanse przedsiębiorstw','inwestycje i wycena przedsiębiorstw',\n 'narzędzia informatyczne w ekonomii','nauka o przedsiębiorstwie',\n 'postępowanie administracyjne','prawo administracyjne','prawo cywilne – zobowiązania','prawo finansowe prawo','gospodarcze publiczne',\n 'prawo karne skarbowe','prawo podatkowe','prawo Unii Europejskiej','rynki finansowe','rynki towarowe','seminarium dyplomowe','szkolenie BHP',\n 'szkolenie biblioteczne','bankowość','ekonomia menadżerska','planowanie finansowe w przedsiębiorstwie','podstawy sprawozdawczości finansowej w przedsiębiorstwie',\n 'prawne aspekty gospodarki nieruchomościami',\n 'prawo bankowe','prawo obrotu instrumentami finansowymi','prawo ubezpieczeń gospodarczych','prawo uczciwej konkurencji',\n 'prawo upadłościowe i naprawcze','ubezpieczenia','finanse publiczne i samorządowe','makroekonomia','partnerstwo publiczno-prywatne','planowanie finansowe',\n 'podstawy sprawozdawczości finansowej w jednostkach samorządu terytorialnego','prawo gospodarki komunalnej','prawo ochrony konkurencji','prawo ochrony środowiska',\n 'prawo pomocy publicznej prawo samorządu terytorialnego prawo zamówień publicznych'\n ];\n $informatyka_w_biznesie=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej',\n 'socjologia',\n 'technologie informacyjne w biznesie',\n 'wychowanie fizyczne',\n 'logika',\n 'matematyka ',\n 'podstawy finansów ',\n 'podstawy makroekonomii ',\n 'podstawy marketingu ',\n 'podstawy mikroekonomii ',\n 'podstawy rachunkowości ',\n 'podstawy zarządzania ',\n 'prawo w działalności gospodarczej ',\n 'przedsiębiorczość ',\n 'statystyka ',\n 'wstęp do informatyki w biznesie ',\n 'algorytmy i struktury danych ',\n 'analiza i projektowanie systemów informatycznych ',\n 'bazy danych',\n 'e-biznes ',\n 'grafika komputerowa dla biznesu ',\n 'komputerowe wspomaganie decyzji ',\n 'modelowanie i symulacja procesów biznesowych ',\n 'programowanie komputerów ',\n 'systemy operacyjne i technologie sieciowe w biznesie',\n 'technologie webowe w biznesie ',\n 'zarządzanie bezpieczeństwem informacji',\n 'zarządzanie projektami informatycznymi',\n 'analityka internetowa ',\n 'marketing w mediach społecznościowych ',\n 'narzędzia content marketingu',\n 'planowanie przedsięwzięć internetowych ',\n 'platformy i narzędzia social media ',\n 'pozycjonowanie i optymalizacja stron internetowych ',\n 'systemy i platformy handlu elektronicznego ',\n 'systemy zarządzania treścią ',\n 'techniki neuronauki poznawczej w biznesie ',\n 'zespołowy projekt informatyczny ',\n 'programowanie aplikacji chmurowych dla biznesu ',\n 'programowanie aplikacji mobilnych ',\n 'programowanie obiektowe ',\n 'programowanie serwisów internetowych ',\n 'projektowanie interfejsów aplikacji biznesowych ',\n 'techniki twórczego rozwiązywania problemów gospodarczych ',\n 'testowanie oprogramowania ',\n 'zespołowy projekt informatyczny'\n ];\n $finanse_i_rachunkowosc=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ekonometria','makroekonomia','matematyka','mikroekonomia',\n 'podstawy finansów','podstawy prawa','podstawy rachunkowości',\n 'statystyka','analiza finansowa','arkusz kalkulacyjny w finansach i rachunkowości',\n 'bankowość','etyka w biznesie','ewidencje podatkowe przedsiębiorstw','finanse osobiste',\n 'finanse przedsiębiorstwa','finanse publiczne','finanse samorządowe','geografia ekonomiczna',\n 'marketing usług finansowoksięgowych','matematyka w finansach i rachunkowości',\n 'międzynarodowe stosunki gospodarcze','planowanie finansowe','podatki',\n 'podstawy zarządzania','polityka społeczna','prawo gospodarcze','rachunek kosztów',\n 'rachunkowość finansowa',\n 'rynek finansowy','ryzyko w finansach i rachunkowości','seminarium dyplomowe',\n 'sprawozdawczość finansowa','systemy finansowo-księgowe','ubezpieczenia',\n 'International Accouting','kadry i płace','organizacja rachunkowości','podstawy auditingu',\n 'rachunkowość budżetowa','rachunkowość instrumentów finansowych',\n 'rachunkowość instytucji finansowych','rachunkowość NGOs',\n 'rozliczenia publicznoprawne przedsiębiorstw','systemy finansowo-księgowe II',\n 'bankowość zaawansowana','Basic Terms in Finance and Banking',\n 'bezpieczeństwo finansów osobistych','doradztwo bankowoubezpieczeniowe',\n 'doradztwo finansowe dla biznesu','doradztwo inwestycyjne i zarządzanie aktywami',\n 'planowanie ubezpieczeniowe i emerytalne','Corporate Finance and Taxation',\n 'decyzje i kalkulacje finansowe','finanse sektora MSP',\n 'obciążenia podatkowe i pozapodatkowe przedsiębiorstwa',\n 'ordynacja podatkowa i księgi podatkowe',\n 'podatki a źródła i formy finansowania przedsiębiorstwa',\n 'relacje przedsiębiorstwa z organami podatkowymi','systemy rozliczeń podatkowych'\n ];\n $zarzadzanie=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'psychologia zarządzania','socjologia','technologie informacyjne','wychowanie fizyczne','marketing','matematyka','nauka o przedsiębiorstwie','podstawy ekonomii','podstawy finansów','podstawy prawa',\n 'podstawy rachunkowości','podstawy zarządzania','statystyka','analiza ekonomiczna','badania marketingowe','przywództwo - studia przypadków zarządzanie pracą zespołową','projektowanie organizacji','komunikacja w biznesie',\n 'gry decyzyjne','analiza danych marketingowych komunikacja marketingowa','zarządzanie sprzedażą','obsługa klienta','social media','Blok: Tworzenie i rozwój kapitału ludzkiego w organizacji [moduł]','motywowanie pracowników',\n 'rozwój pracowników','zarządzanie relacjami z pracownikami','planowanie i pozyskiwanie pracowników zarządzanie różnorodnością','ocenianie pracowników','zarządzanie zasobami niematerialnymi',\n 'metody i techniki doskonalenia jakości','kreatywność i współczesne koncepcje tworzenia innowacji','nowoczesne formy przedsiębiorstw transfer technologii','kształtowanie konkurencyjności przedsiębiorstw e-marketing',\n 'ergonomia i zarządzanie bezpieczeństwem pracy w organizacji','etyka biznesu','gospodarowanie kapitałem ludzkim','informatyka w zarządzaniu','innowacje w przedsiębiorstwie','logistyka','marketing międzynarodowy','media w zarządzaniu',\n 'metody i techniki heurystyczne','negocjacje','przedsiębiorczość','rachunkowość zarządcza','seminarium dyplomowe','tworzenie i rozwój małej firmy','zachowania konsumentów','zachowania organizacyjne','zarządzanie jakością','zarządzanie kapitałem trwałym',\n 'zarządzanie produkcją','zarządzanie projektami','zarządzanie relacjami z klientem','zarządzanie usługami','zarządzanie własnym rozwojem','zarządzanie zasobami ludzkimi','zarządzanie zmianą'\n ];\n $informatyka_i_ekonometria=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'historia filozofii','ochrona własności intelektualnej','analiza ekonomiczna','dylematy społeczeństwa informacyjnego','kompleksowe zarządzanie jakością','makroekonomia','mikroekonomia','podstawy finansów','podstawy prawa','podstawy rachunkowości',\n 'podstawy zarządzania','technologie informacyjne','algebra liniowa','algorytmy i struktury danych','analiza i projektowanie systemów informatycznych','analiza matematyczna','badania operacyjne','bazy danych','ekonometria','ekonomika informacji','informatyka ekonomiczna',\n 'IT tools in marketing (narzędzia IT w marketingu)','komunikacja biznesowa i organizacje wirtualne','matematyka finansowa','planowanie finansowe','podstawy demografii','podstawy e-biznesu','podstawy programowania','programowanie stron WWW','rachunek prawdopodobieństwa i statystyka matematyczna',\n 'regionalna polityka gospodarcza','seminarium licencjackie','sieci komputerowe - podstawy','statystyka opisowa i ekonomiczna','symulacja komputerowa systemów','technologie multimedialne','zakładanie i prowadzenie działalności gospodarczej','zastosowanie pakietów statystycznych',\n 'zintegrowane systemy zarządzania przedsiębiorstwem','informacja naukowa','szkolenie BHP','szkolenie biblioteczne','hurtownie danych','inżynieria wymagań użytkownika','metody analityki biznesowej','metody eksploracji danych','metody sztucznej inteligencji w analizie biznesowej',\n 'metody uczenia maszynowego','modelowanie procesów w analizie biznesowej','systemy business intelligence','systemy IT w ewidencji gospodarczej','systemy wspomagania decyzji biznesowych','systemy zarządzania bazami danych','zaawansowane metody analizy danych','zarządzanie bezpieczeństwem IT',\n 'zasoby wiedzy w systemach IT','analiza szeregów czasowych','ilościowa analiza skłonności','konstrukcja produktów ubezpieczeniowych','matematyka w biznesie','metody analizy trwania','metody ilościowe na rynku nieruchomości','metody inwestowania na giełdzie','metody klasyfikacji',\n 'metody wyceny nieruchomości','modelowanie rynków finansowych','pomiar zasobów ludzkich','statystyczna kontrola jakości','statystyka publiczna','symulacje obliczeniowe w biznesie','systemy pozyskiwania danych','wnioskowanie statystyczne'\n ];\n $gospodarka_niercuhomosciami=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'ochrona własności intelektualnej','sztuka wystąpień publicznych','warsztaty budowania zespołów','wychowanie fizyczne','algebra liniowa','analiza matematyczna','analiza szeregów czasowych','bazy danych','demografia','ekonometria',\n 'informatyka ekonomiczna','inwestycje na rynku finansowym','makroekonomia','matematyka finansowa','mikroekonomia','podstawy finansów publicznych','podstawy organizacji i zarządzania','podstawy rachunkowości','produkty ubezpieczeniowe w gospodarce nieruchomościami',\n 'statystyka matematyczna','statystyka opisowa','technologie CRM','zastosowania pakietów obliczeniowych','ekonomika rynku nieruchomości','gospodarka mieszkaniowa','gospodarka nieruchomościami','Metody ilościowe w wycenie firm i farm [moduł]','metody ilościowe w wycenie przedsiębiorstw',\n 'wycena farm i gospodarstw rolnych','podstawy ekonomiki przedsiębiorstw ochrona danych osobowych','podstawy prawa administracji i zobowiązań',\n 'Pośrednictwo w obrocie nieruchomościami [moduł]','ekonomiczne zagadnienia pośrednictwa na rynku nieruchomości','marketing na rynku nieruchomości','wstęp do pośrednictwa w obrocie nieruchomościami projekt grupowy operat szacunkowy',\n 'seminarium','technika nieruchomości','Teoria optymalizacji w gospodarowaniu nieruchomościami [moduł]','statystyczna kontrola jakości w gospodarce nieruchomościami','metody reprezentacyjne na rynku nieruchomości',\n 'badania operacyjne w gospodarowaniu nieruchomościami wstęp do gospodarki nieruchomościami','wstęp do wyceny nieruchomości','Wycena nieruchomości','metodyka wyceny nieruchomości','wycena nieruchomości niezurbanizowanych',\n 'wycena nieruchomości zurbanizowanych wycena podmiotów gospodarczych Zarządzanie nieruchomościami [moduł]','zarządzanie nieruchomościami inwestycyjnymi','zarządzanie nieruchomościami mieszkalnymi',\n 'podstawy planowania i zarządzania nieruchomościami zastosowania informacji przestrzennej w gospodarce nieruchomościami'\n ];\n $przedsiebiorczosc_i_inwestycje=[\n 'Język Angielski',\n 'Język Niemiecki',\n 'Język Rosyjski',\n 'Język Hiszpański',\n 'Język Francuski',\n 'etyka w biznesie','innowacje w przedsiębiorstwie','ochrona własności intelektualnej','podstawy ekonomiki przedsiębiorstw','podstawy makroekonomii','podstawy prawa dla ekonomistów','przedsiębiorczość','sztuka wystąpień publicznych',\n 'tworzenie i funkcjonowanie małej firmy','funkcjonowanie klastrów','gra decyzyjna','marketing w małej firmie','metody ilościowe w zarządzaniu przedsiębiorstwem','metody twórczego rozwiązywania problemów','narzędzia informatyczne w małej firmie',\n 'negocjacje','ocena efektywności inwestycji','opodatkowanie małych firm','podstawy rachunkowości w małych firmach','problemy biznesu w praktyce','przywództwo i kierowanie zespołem','psychologia w zarządzaniu','seminarium dyplomowe',\n 'społeczna odpowiedzialność biznesu','sprawozdawczość i analiza ekonomiczno-finansowa','wyszukiwanie, ocena wiarygodności informacji i bazy danych','zarządzanie jakością w małej firmie','zarządzanie kapitałem trwałym',\n 'zarządzanie procesami w małym przedsiębiorstwie','zarządzanie strategiczne małą firmą','zarządzanie zasobami ludzkimi','informacja naukowa','finansowanie małych firm','MSP w Unii Europejskiej','risk management','strategie innowacyjne','technologie ICT w małej firmie',\n 'transfer technologii','tworzenie biznesplanu przedsięwzięcia','wycena własności intelektualnej','zarządzanie projektami innowacyjnymi','e-biznes','internacjonalizacja małej firmy','planowanie w małym przedsiębiorstwie','social media in management and marketing of SMEs',\n 'system wspierania małych firm','wycena przedsiębiorstw','zarządzanie kreatywnością','zarządzanie projektami w małym przedsiębiorstwie','zarządzanie technologią'\n ];\n\n\n\n sort($ekonomiczno_prawny);\n sort($informatyka_w_biznesie);\n sort($finanse_i_rachunkowosc);\n sort($zarzadzanie);\n sort($informatyka_i_ekonometria);\n sort($gospodarka_niercuhomosciami);\n sort($przedsiebiorczosc_i_inwestycje);\n\n\n $kierunki_przedmioty=[\n $ekonomiczno_prawny,\n $informatyka_w_biznesie,\n $finanse_i_rachunkowosc,\n $zarzadzanie,\n $informatyka_i_ekonometria,\n $gospodarka_niercuhomosciami,\n $przedsiebiorczosc_i_inwestycje\n ];\n\n\n for ($i=0; $i < count($kierunki) ; $i++) {\n App\\Dom::create([\n 'uczelnia' => \"Wydział nauk ekonomicznych i zarządzania\",\n 'kierunek' => $kierunki[$i]\n ]);\n\n for($j=0;$j<count($kierunki_przedmioty[$i]);$j++){\n\n App\\Subject::create([\n 'dom_id' => $i+1,\n 'name' => $kierunki_przedmioty[$i][$j]\n ]);\n\n }\n }\n\n }", "function getTitulos() {\n //arreglo para remplazar los titulos de las columnas \n $titulos_campos['dep_id'] = COD_DEPARTAMENTO;\n $titulos_campos['dep_nombre'] = NOMBRE_DEPARTAMENTO;\n\n $titulos_campos['der_id'] = COD_DEPARTAMENTO_REGION;\n $titulos_campos['der_nombre'] = NOMBRE_DEPARTAMENTO_REGION;\n\n $titulos_campos['mun_id'] = COD_MUNICIPIO;\n $titulos_campos['mun_nombre'] = NOMBRE_MUNICIPIO;\n $titulos_campos['mun_poblacion'] = POB_MUNICIPIO;\n\n $titulos_campos['ope_id'] = OPERADOR;\n $titulos_campos['ope_nombre'] = OPERADOR_NOMBRE;\n $titulos_campos['ope_sigla'] = OPERADOR_SIGLA;\n $titulos_campos['ope_contrato_no'] = OPERADOR_CONTRATO_NRO;\n $titulos_campos['ope_contrato_valor'] = OPERADOR_CONTRATO_VALOR;\n\n $titulos_campos['Id_Ciudad'] = TITULO_CIUDAD;\n $titulos_campos['Id_Pais'] = NOMBRE_PAIS;\n $titulos_campos['Nombre_Ciudad'] = NOMBRE_CIUDAD;\n\n $titulos_campos['Nombre_Pais'] = NOMBRE_PAIS;\n\n $titulos_campos['Id_Familia'] = TITULO_FAMILIAS;\n $titulos_campos['Descripcion_Familia'] = DESCRIPCION_FAMILIA;\n\n $titulos_campos['Id_Moneda'] = TITULO_MONEDA;\n $titulos_campos['Descripcion_Moneda'] = DESCRIPCION_MONEDA;\n\n $titulos_campos['cfi_numero'] = CUENTA_NUMERO;\n $titulos_campos['cfi_nombre'] = CUENTA_NOMBRE;\n\n $titulos_campos['cft_id'] = CUENTA_TIPO;\n $titulos_campos['cft_nombre'] = CUENTA_TIPO;\n\n $titulos_campos['mov_descripcion'] = MOVIMIENTO_DESCRIPCION;\n $titulos_campos['mov_tipo'] = MOVIMIENTO_TIPO;\n\n $titulos_campos['idCentroPoblado'] = TITULO_CENTRO_POBLADO;\n $titulos_campos['codigoDane'] = CODIGO_DANE_CENTRO_POBLADO;\n $titulos_campos['nombre'] = NOMBRE_CENTRO_POBLADO;\n $titulos_campos['mun_id'] = MUNICIPIO_CENTRO_POBLADO;\n\n $titulos_campos['enc_tipo_nombre'] = TIPO_INSTRUMENTO;\n $titulos_campos['enc_tipo_desc'] = DESCRIPCION_ACTIVIDAD;\n\n $titulos_campos['Descripcion_Tipo'] = \"Plan\";\n \n $titulos_campos['descripcionTipoHallazgo'] = DESCRIPCION_TIPO_HALLAZGO;\n $titulos_campos['descripcion'] = AREA_TIPO_HALLAZGO;\n\n return $titulos_campos;\n }", "function getDiasCorridos($data){\n\t\t\n\t\t\t$data_inicial = $data;\n\t\t\t$data_final = getDateCurrent();\n\t\t\t\n\t\t\t// Usa a função strtotime() e pega o timestamp das duas datas:\n\t\t\t$time_inicial = strtotime($data_inicial);\n\t\t\t$time_final = strtotime($data_final);\n\t\t\t\n\t\t\t// Calcula a diferença de segundos entre as duas datas:\n\t\t\t$diferenca = $time_final - $time_inicial; // 19522800 segundos\n\t\t\t\n\t\t\t// Calcula a diferença de dias\n\t\t\t$dias = (int)floor( $diferenca / (60 * 60 * 24)); // 225 dias\n\t\t\t\n\t\t\t// Exibe uma mensagem de resultado:\n\t\t\treturn $dias;\n\t\t\t\t\n\t\t}", "public function index() {\n $_SESSION['kviz_end'] = 0;\n $this->prikaz(\"igrac\", []);\n }", "public function istorijaRezultata() {\n $rModel = new RezultatModel();\n $igrac = $this->session->get('igrac');\n $rezultati = $rModel->nadji_rezultateigraca($igrac['idKI']);\n $this->prikaz(\"mod_istorijarezultata\", ['rezultati' => $rezultati]);\n }", "function pegaEstados()\n {\n $lista_estados = array(\n 'ac' => 'Acre',\n 'al' => 'Alagoas',\n 'ap' => 'Amapá',\n 'am' => 'Amazonas',\n 'ba' => 'Bahia',\n 'ce' => 'Ceará',\n 'df' => 'Distrito Federal',\n 'es' => 'Espirito Santo',\n 'go' => 'Goiás',\n 'ma' => 'Maranhão',\n 'ms' => 'Mato Grosso do Sul',\n 'mt' => 'Mato Grosso',\n 'mg' => 'Minas Gerais',\n 'pa' => 'Pará',\n 'pb' => 'Paraíba',\n 'pr' => 'Paraná',\n 'pe' => 'Pernanbuco',\n 'pi' => 'Piauí',\n 'rj' => 'Rio de Janeiro',\n 'rn' => 'Rio Grande do Norte',\n 'rs' => 'Rio Grande do Sul',\n 'ro' => 'Rondônia',\n 'rr' => 'Roraima',\n 'sc' => 'Santa Catarina',\n 'sp' => 'São Paulo',\n 'se' => 'Sergipe',\n 'to' => 'Tocantis'\n );\n\n\n return $lista_estados;\n }", "function cl_cemiteriorural() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cemiteriorural\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function getAllCargos(){\n\t\t\tDB_DataObject::debugLevel(0);\n\t\t\t$obj = DB_DataObject::Factory('VenCargo');\n\t\t\t$data=false;\n\t\t\t$obj->find();\n\t\t\t$i=0;\n\t\t\twhile($obj->fetch()){\n\t\t\t\t$data[$i]['idCargo']=$obj->idCargo;\n\t\t\t\t$data[$i]['nombre']=utf8_encode($obj->nombre);\n\t\t\t\t$data[$i]['estado']=$obj->estado;\n\t\t\t\t$data[$i]['fechaMod']=$obj->fechaMod;\n\t\t\t\t$data[$i]['fecha']=$obj->fecha;\t\n\t\t\t\t$i++;\t\t\n\t\t\t}\n\t\t\t$obj->free();\n\t\t\t//printVar($data,'getAllCargos');\n\t\t\treturn $data;\n\t\t}", "public function nahrajUzivatele(){\t\t\t\n\t\t\t$dotaz = \"SELECT uzivatelID,uzivatelJmeno,uzivatelHeslo FROM `tabUzivatele` WHERE 1 \";\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t$vysledek = mysqli_query($this -> pripojeni,$dotaz);\n\t\t\t$vratit = array();\n\t\t\t\n\t\t\tif($vysledek == false){\n\t\t\t\techo(\"Pri nahravani dat nastala chyba!\" . mysqli_error($this->pripojeni) );\n\t\t\t}\n\t\telse{\n\t\t\t//case result is mysqli_result\n\t\t\t$pole = $vysledek->fetch_all(MYSQLI_ASSOC);\n\t\t\tforeach($pole as $radek ){\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tforeach($radek as $x => $x_value) {\n\t\t\t\t\techo \"Key=\" . $x . \", Value=\" . $x_value;\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t$jmeno = $radek[\"uzivatelJmeno\"];\n\t\t\t\t$heslo = $radek[\"uzivatelHeslo\"];\n\t\t\t\t\n\t\t\t\t$uzivatel = new uzivatelObjekt($jmeno,$heslo);\n\t\t\t\t\n\t\t\t\t$uzivatel->uzivatelID = $radek[\"uzivatelID\"];\n\t\t\t\t\n\t\t\t\tarray_push($vratit,$uzivatel); \n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\treturn\t$vratit;\t\t\n\t\t\n\t}", "function getIndicesCouverture($list_agence) {\n\n global $dbHandler;\n global $global_monnaie,$global_id_agence;\n\n $db = $dbHandler->openConnection();\n $DATA['nombre_credits'] = 0;\n $DATA['encours_brut'] = 0;\n $DATA['nombre_epargne'] = 0;\n $DATA['total_epargne'] = 0;\n $DATA['taux_renouvellement_credits'] = 0;\n $DATA['first_credit_moyen'] = 0;\n $DATA['first_credit_median'] = 0;\n $DATA['credit_moyen'] = 0;\n $DATA['credit_median'] = 0;\n $DATA['epargne_moyen_cpte'] = 0;\n $DATA['epargne_median_cpte'] = 0;\n $DATA['epargne_moyen_client'] = 0;\n $DATA['epargne_median_client'] = 0;\n foreach($list_agence as $key_id_ag =>$value) {\n //Parcours des agences\n setGlobalIdAgence($key_id_ag);\n // Nombre de crédits actifs\n $sql = \"SELECT COUNT(*) FROM ad_dcr WHERE id_ag=$global_id_agence AND etat = 5 OR etat = 7 OR etat = 13 OR etat = 14 OR etat = 15\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $row = $result->fetchrow();\n $nombre_credits = $row[0];\n\n // Encours brut\n $sql = \"SELECT SUM(calculeCV(solde_cap, devise, '$global_monnaie')) FROM ad_etr, ad_dcr, adsys_produit_credit WHERE ad_etr.id_ag=$global_id_agence AND ad_etr.id_ag=ad_dcr.id_ag AND ad_dcr.id_ag=adsys_produit_credit.id_ag AND ad_etr.id_doss = ad_dcr.id_doss AND ad_dcr.id_prod = adsys_produit_credit.id AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15)\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $row = $result->fetchrow();\n $encours_brut = $row[0];\n\n // Nombre de comptes d'épargne\n $sql = \"SELECT COUNT(*) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 \";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $row = $result->fetchrow();\n $nombre_epargne = $row[0];\n\n // Volume total d'épargne\n $sql = \"SELECT SUM(calculeCV(solde, devise, '$global_monnaie')) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 AND solde <> 0\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $row = $result->fetchrow();\n $total_epargne = $row[0];\n\n // Nombre de crédits relais consentis\n $sql = \"SELECT count(id_doss) FROM ad_dcr a WHERE (a.id_ag=$global_id_agence) AND (a.etat = 5 OR a.etat = 7 OR a.etat = 13 OR a.etat = 14 OR a.etat = 15) AND a.date_etat BETWEEN date_trunc('year', current_date) AND current_date AND EXISTS (SELECT id_doss FROM ad_dcr b WHERE b.id_ag=$global_id_agence AND b.etat = 6 and b.date_etat < a.date_etat AND a.id_client = b.id_client)\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $credits_relais = $row[0];\n\n // Crédits remboursés\n $sql = \"SELECT count(id_doss) FROM ad_dcr WHERE id_ag=$global_id_agence AND etat = 6 AND date_etat BETWEEN date_trunc('year', current_date) AND current_date\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $credits_rembourses = $row[0];\n\n // Calcul du taux\n if ($credits_rembourses > 0) {\n $taux_renouvellement_credits = $credits_relais / $credits_rembourses;\n } else {\n $taux_renouvellement_credits = NULL;\n }\n\n // Moyenne premiers crédits\n $sql = \"SELECT AVG(calculeCV(cre_mnt_octr, devise, '$global_monnaie')) FROM ad_dcr a, adsys_produit_credit b WHERE a.id_ag=$global_id_agence AND a.id_ag=b.id_ag AND a.id_prod = b.id AND (a.etat = 5 OR a.etat = 7 OR a.etat = 13 OR a.etat = 14 OR a.etat = 15) AND cre_date_debloc BETWEEN date_trunc('year', current_date) AND current_date AND NOT EXISTS (SELECT id_doss FROM ad_dcr b WHERE b.id_ag=$global_id_agence AND b.etat = 6 AND b.date_etat < a.cre_date_debloc AND a.id_client = b.id_client)\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $first_credit_moyen = $row[0];\n\n // Médiane premiers crédits\n $sql = \"SELECT calculeCV(cre_mnt_octr, devise, '$global_monnaie') FROM ad_dcr a, adsys_produit_credit b WHERE a.id_ag=$global_id_agence AND a.id_ag=b.id_ag AND a.id_prod = b.id AND (a.etat = 5 OR a.etat = 7 OR a.etat = 13 OR a.etat = 14 OR a.etat = 15) AND cre_date_debloc BETWEEN date_trunc('year', current_date) AND current_date AND NOT EXISTS (SELECT id_doss FROM ad_dcr b WHERE b.id_ag=$global_id_agence AND b.etat = 6 AND b.date_etat < a.cre_date_debloc AND a.id_client = b.id_client) ORDER BY calculeCV(cre_mnt_octr, devise, '$global_monnaie')\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $tableauCredit = array();\n while ($row = $result->fetchrow()) {\n array_push($tableauCredit, $row[0]);\n }\n\n $taille = sizeof($tableauCredit);\n if ($taille == 0) {\n $first_credit_median = NULL;\n }\n elseif ($taille % 2 == 1) {\n $first_credit_median = $tableauCredit[($taille -1) / 2];\n }\n else {\n $first_credit_median = ($tableauCredit[($taille) / 2] + $tableauCredit[($taille / 2) - 1]) / 2;\n }\n\n // Moyenne crédit\n $sql = \"SELECT AVG(calculeCV(cre_mnt_octr, devise, '$global_monnaie')) FROM ad_dcr a, adsys_produit_credit b WHERE a.id_ag=$global_id_agence AND a.id_ag=b.id_ag AND a.id_prod = b.id AND (a.etat = 5 OR a.etat = 7 OR a.etat = 13 OR a.etat = 14 OR a.etat = 15) AND cre_date_debloc BETWEEN date_trunc('year', current_date) AND current_date\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $credit_moyen = $row[0];\n\n // Médiane crédit\n $sql = \"SELECT calculeCV(cre_mnt_octr, devise, '$global_monnaie') FROM ad_dcr a, adsys_produit_credit b WHERE a.id_ag=$global_id_agence AND a.id_ag=b.id_ag AND a.id_prod = b.id AND (etat = 5 OR etat = 7 OR etat = 13 OR etat = 14 OR etat = 15)\n ORDER BY calculeCV(cre_mnt_octr, devise, '$global_monnaie')\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $tableauCredit = array();\n while ($row = $result->fetchrow()) {\n array_push($tableauCredit, $row[0]);\n }\n\n $taille = sizeof($tableauCredit);\n if ($taille == 0) {\n $credit_median = NULL;\n }\n elseif ($taille % 2 == 1) {\n $credit_median = $tableauCredit[($taille -1) / 2];\n }\n else {\n $credit_median = ($tableauCredit[($taille) / 2] + $tableauCredit[($taille / 2) - 1]) / 2;\n }\n\n // Moyenne épargne par compte\n $sql = \"SELECT AVG(calculeCV(solde, devise, '$global_monnaie')) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 AND solde <> 0\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $epargne_moyen_cpte = $row[0];\n\n // Médiane épargne par compte\n $sql = \"SELECT calculeCV(solde, devise, '$global_monnaie') FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 AND solde <> 0 ORDER BY calculeCV(solde, devise, '$global_monnaie')\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $tableauCredits = array ();\n while ($row = $result->fetchrow()) {\n array_push($tableauCredits, $row[0]);\n }\n\n $taille = sizeof($tableauCredits);\n if ($taille == 0) {\n $epargne_median_cpte = NULL;\n }\n elseif ($taille % 2 == 1) {\n $epargne_median_cpte = $tableauCredits[($taille -1) / 2];\n }\n else {\n $epargne_median_cpte = ($tableauCredits[($taille) / 2] + $tableauCredits[($taille / 2) - 1]) / 2;\n }\n\n // Moyenne épargne par client\n $sql = \"SELECT AVG(t.sum) FROM (SELECT SUM(calculeCV(solde, devise, '$global_monnaie')) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND etat_cpte <> 2 AND solde <> 0 GROUP BY id_titulaire) AS t\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $epargne_moyen_client = $row[0];\n\n // Médiane épargne par client\n $sql = \"SELECT SUM(calculeCV(solde, devise, '$global_monnaie')) AS solde, id_titulaire FROM ad_cpt WHERE id_ag=$global_id_agence AND id_prod <> 2 AND id_prod <> 3 AND solde <> 0 GROUP BY id_titulaire ORDER BY solde\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n $tableauEpargne = array();\n while ($row = $result->fetchrow()) {\n array_push($tableauEpargne, $row[0]);\n }\n\n $taille = sizeof($tableauEpargne);\n if ($taille == 0) {\n $epargne_median_client = NULL;\n }\n elseif ($taille % 2 == 1) {\n $epargne_median_client = $tableauEpargne[($taille -1) / 2];\n }\n else {\n $epargne_median_client = ($tableauEpargne[($taille) / 2] + $tableauEpargne[($taille / 2) - 1]) / 2;\n }\n\n // Tableau de données\n $DATA['nombre_credits'] += $nombre_credits;\n $DATA['encours_brut'] += $encours_brut;\n $DATA['nombre_epargne'] += $nombre_epargne;\n $DATA['total_epargne'] += $total_epargne;\n $DATA['taux_renouvellement_credits'] += $taux_renouvellement_credits;\n $DATA['first_credit_moyen'] += $first_credit_moyen;\n $DATA['first_credit_median'] += $first_credit_median;\n $DATA['credit_moyen'] += $credit_moyen;\n $DATA['credit_median'] += $credit_median;\n $DATA['epargne_moyen_cpte'] += $epargne_moyen_cpte;\n $DATA['epargne_median_cpte'] += $epargne_median_cpte;\n $DATA['epargne_moyen_client'] += $epargne_moyen_client;\n $DATA['epargne_median_client'] += $epargne_median_client;\n }\n $dbHandler->closeConnection(true);\n\n return $DATA;\n}", "function crags(){\n\n $user = User::where('id', Auth::id())->with('settings')->first();\n $crosses = Cross::getCrossWithFilter($user);\n\n $cragsData = [];\n $cragsLabel = [];\n\n foreach ($crosses as $cross){\n $cragsLabel[$cross->route->crag->id] = $cross->route->crag->label;\n if(isset($cragsData[$cross->route->crag->id])){\n $cragsData[$cross->route->crag->id]++;\n }else{\n $cragsData[$cross->route->crag->id] = 1;\n }\n }\n\n //réindex à partir de zéro\n $cragsLabel = array_values($cragsLabel);\n $cragsData = array_values($cragsData);\n\n $data = [\n 'type'=>'bar',\n 'data'=> [\n 'labels' => $cragsLabel,\n 'datasets' => [\n [\n 'label' => '',\n 'data' => $cragsData,\n 'borderColor' => '#2196F3',\n 'backgroundColor' => '#2196F3'\n ]\n ]\n ],\n 'options' => [\n 'maintainAspectRatio' => false,\n 'scales' => [\n 'display' => false,\n 'yAxes' => [\n [\n 'ticks' => [\n 'suggestedMin'=> 0,\n 'stepSize' => 1\n ],\n 'display' => false\n ]\n ]\n ],\n 'legend' => [\n 'display' => false\n ]\n ]\n ];\n\n return response()->json(json_encode($data));\n }", "function noticias_cabe(){\n \n $html=site('http://www.jornalnoticias.co.mz/');\n\t\n\tforeach($html->find('.items-row')as $elms){\n\t\t\n\t\tforeach($elms->find ('.jn-postheader') as $elms2){\n\t\t\n\t $j[]=mb_convert_encoding( $elms2->plaintext, \"HTML-ENTITIES\", \"UTF-8\");\n\t\n\t\n\t\t\n\t\t}\n\t}\n\t\n\treturn $j;\n\t\n\t}", "public function getNiveles(){\n\t\t//Se debe realizar conexion en BD. Ver propiedad de config/Autoload.php para eliminar\n\t\t//esta instruccion de carga de los controladores y modelos.\n\t\t$this->load->database();\n\t\t$this->load->model(\"Criticidad\");\n\t\t$listaNiveles = $this->Criticidad->obtenerNivelesDeCriticidad();\n\t\tforeach ($listaNiveles as $row){\n\t\t\t$nivel = array('id'=>$row[\"id\"],'nombre' => $row[\"nombre\"], 'descripcion'=>$row[\"descripcion\"]);\n\t\t\techo json_encode($nivel);\n\t\t\techo \"/\";\n\t\t}\n\t}", "public function cargarbodegas()\n {\n \treturn Cont_Bodega::all();\n }", "private function calculeResult()\n {\n\n if ($this->nClouds <= 0) {\n $this->result['status'] = 'warning';\n $this->result['msg'] = 'Nemhuma nuvem informada!';\n } elseif ($this->nAirports <= 0) {\n $this->result['status'] = 'warning';\n $this->result['msg'] = 'Nemhum aeroporto informado!';\n } else {\n while (sizeof($this->airports) < $this->nAirports) {\n $this->today = array_values($this->scene); // copia scena\n foreach ($this->scene as $rowKey => $row) {\n foreach ($row as $colKey => $col) {\n if ($col == '*') {\n $this->expandCloud($rowKey, $colKey);\n }\n }\n }\n $this->scene = $this->today; // atualiza scena\n $this->nDays++;\n //debug\n //$this->debug();\n }\n $this->result['status'] = 'success';\n $this->result['msg'] = 'Primeiro aeroporto atingido em: ' . $this->airports[0][2] . ' dias.';\n $this->result['msg'] .= ' / linha: ' . ($this->airports[0][0] + 1) . ', coluna: ' . ($this->airports[0][1] + 1) . '<br>';\n $this->result['msg'] .= 'Todos os aeroporto atingido em: ' . $this->airports[sizeof($this->airports) - 1][2] . ' dias.';\n }\n\n }", "private function buildZadachkiAndUsloviq()\n {\n $this->zadachki = array(\n 'Изберете си задачка ' . PHP_EOL,\n 'Задачка 2: HR Application Insert Employee' . PHP_EOL,\n 'Задачка 3: Insert Email' . PHP_EOL,\n 'Задачка 4: Insert Phones 3=)' . PHP_EOL,\n 'Задачка 5: Get Employee Information' . PHP_EOL,\n );\n $this->usloviq = array(\n '[ first_name ], [ middle_name ], [ last_name ], [ department ], [ position ], [ passport_id ], [ country_info ]?' . PHP_EOL,\n '[ employee_id ]? [ first_name ], [ middle_name ], [ last_name ], emails, [ email_info ]+' . PHP_EOL,\n '[ employee_id ]? [ first_name ], [ middle_name ], [ last_name ], phones, [ phone_info ]+' . PHP_EOL,\n 'Info, [ first_name ], [ last_name ]' . PHP_EOL\n );\n }", "public function getCIRUGIAS()\r\n {\r\n return $this->CIRUGIAS;\r\n }", "public function catalogos() \n\t{\n\t}", "function get_fakultas(){\n\t}", "public function getUtilisateurs();", "function __construct(){\n $this->valorBruto = 0;\n $this->valorImpostos = 0;\n\n $this->itens = array(); // gera um array pra guardar os itens\n $this->acoesAoGerar = array();\n }", "public function run()\n {\n $uno = new Carro();\n $uno->idMarca = 1;\n $uno->modelo = 'Uno Mille';\n $uno->ano = 1999;\n $uno->img = 'https://img1.icarros.com/dbimg/galeriaimgmodelo/2/1812_1.png';\n $uno->save();\n\n $fusca = new Carro();\n $fusca->idMarca = 2;\n $fusca->modelo = 'Fusca';\n $fusca->ano = 1996;\n $fusca->img = 'https://img0.icarros.com/dbimg/imgmodelo/4/479_12.png';\n $fusca->save();\n\n $brasilia = new Carro();\n $brasilia->idMarca = 2;\n $brasilia->modelo = 'Brasilia';\n $brasilia->ano = 1989;\n $brasilia->img = 'https://img0.icarros.com/dbimg/imgmodelo/4/793_9.png';\n $brasilia->save();\n\n $corsa = new Carro();\n $corsa->idMarca = 3;\n $corsa->modelo = 'Corsa';\n $corsa->ano = 1996;\n $corsa->img = 'https://img0.icarros.com/dbimg/imgmodelo/4/134_4.png';\n $corsa->save();\n\n $chevette = new Carro();\n $chevette->idMarca = 4;\n $chevette->modelo = 'Chevette';\n $chevette->ano = 1997;\n $chevette->img = 'https://www.webclassicos.com.br/wp-content/uploads/2018/01/Sem-t%C3%ADtulo-3-1024x645.png';\n $chevette->save();\n\n }", "function getAlc(){\r\n return array(\"saki\", \"vodka\", \"rum\", \"whiskey\", \"tequila\", \"gin\");\r\n }", "function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function getAllFromProizvod(){\n\t\treturn $this->ime . \"&nbsp\" . $this->imeProizvođača . \"&nbsp\" \n\t\t. $this->prezimeProizvođača . \"&nbsp\" . $this->cijena;\n\t}" ]
[ "0.62288296", "0.62096786", "0.60756165", "0.59804267", "0.5945923", "0.5900716", "0.5899298", "0.58700716", "0.5869683", "0.58557475", "0.58062994", "0.5781538", "0.57766837", "0.5745159", "0.5702248", "0.5701149", "0.56982017", "0.5678287", "0.56605196", "0.56279904", "0.5624393", "0.56128436", "0.55951566", "0.55925447", "0.5577553", "0.55757684", "0.55745023", "0.5557679", "0.5548907", "0.55404526", "0.55370694", "0.5524343", "0.55223805", "0.5517269", "0.5506266", "0.550275", "0.5502629", "0.54980487", "0.54905313", "0.5480287", "0.54780126", "0.5468426", "0.5463652", "0.54605716", "0.54605716", "0.54571575", "0.5456281", "0.5453097", "0.54434156", "0.54403985", "0.5436421", "0.5436242", "0.543533", "0.5433886", "0.54311305", "0.54278535", "0.5424769", "0.5423249", "0.54209286", "0.54151034", "0.5410941", "0.54042804", "0.5394257", "0.5394143", "0.53920954", "0.5390241", "0.53885335", "0.5385123", "0.53842705", "0.53787273", "0.53753823", "0.5375198", "0.5371161", "0.5363293", "0.5362231", "0.53615284", "0.53577995", "0.53472644", "0.534562", "0.53429085", "0.5341255", "0.53351915", "0.53254795", "0.53233844", "0.531748", "0.5316953", "0.5314027", "0.5311647", "0.53109574", "0.53106594", "0.5310452", "0.53036207", "0.530186", "0.5298132", "0.52971226", "0.5296396", "0.5296042", "0.52934426", "0.52930194", "0.5292794" ]
0.58526725
10
Resizes a given image (if required) and renders the respective img tag.
public function render(): string { $src = (string)$this->arguments['src']; if (($src === '' && $this->arguments['image'] === null) || ($src !== '' && $this->arguments['image'] !== null)) { throw new Exception('You must either specify a string src or a File object.', 1382284106); } if ((string)$this->arguments['fileExtension'] && !GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], (string)$this->arguments['fileExtension'])) { throw new Exception( 'The extension ' . $this->arguments['fileExtension'] . ' is not specified in $GLOBALS[\'TYPO3_CONF_VARS\'][\'GFX\'][\'imagefile_ext\']' . ' as a valid image file extension and can not be processed.', 1618989190 ); } try { $image = $this->imageService->getImage($src, $this->arguments['image'], (bool)$this->arguments['treatIdAsReference']); $cropString = $this->arguments['crop']; if ($cropString === null && $image->hasProperty('crop') && $image->getProperty('crop')) { $cropString = $image->getProperty('crop'); } $cropVariantCollection = CropVariantCollection::create((string)$cropString); $cropVariant = $this->arguments['cropVariant'] ?: 'default'; $cropArea = $cropVariantCollection->getCropArea($cropVariant); $processingInstructions = [ 'width' => $this->arguments['width'], 'height' => $this->arguments['height'], 'minWidth' => $this->arguments['minWidth'], 'minHeight' => $this->arguments['minHeight'], 'maxWidth' => $this->arguments['maxWidth'], 'maxHeight' => $this->arguments['maxHeight'], 'crop' => $cropArea->isEmpty() ? null : $cropArea->makeAbsoluteBasedOnFile($image), ]; if (!empty($this->arguments['fileExtension'] ?? '')) { $processingInstructions['fileExtension'] = $this->arguments['fileExtension']; } $processedImage = $this->imageService->applyProcessingInstructions($image, $processingInstructions); $imageUri = $this->imageService->getImageUri($processedImage, $this->arguments['absolute']); if (!$this->tag->hasAttribute('data-focus-area')) { $focusArea = $cropVariantCollection->getFocusArea($cropVariant); if (!$focusArea->isEmpty()) { $this->tag->addAttribute('data-focus-area', $focusArea->makeAbsoluteBasedOnFile($image)); } } $this->tag->addAttribute('data-lazy', $imageUri); // $this->tag->addAttribute('src', $imageUri); $this->tag->addAttribute('width', $processedImage->getProperty('width')); $this->tag->addAttribute('height', $processedImage->getProperty('height')); // The alt-attribute is mandatory to have valid html-code, therefore add it even if it is empty if (empty($this->arguments['alt'])) { $this->tag->addAttribute('alt', $image->hasProperty('alternative') ? $image->getProperty('alternative') : ''); } // Add title-attribute from property if not already set and the property is not an empty string $title = (string)($image->hasProperty('title') ? $image->getProperty('title') : ''); if (empty($this->arguments['title']) && $title !== '') { $this->tag->addAttribute('title', $title); } } catch (ResourceDoesNotExistException $e) { // thrown if file does not exist throw new Exception($e->getMessage(), 1509741911, $e); } catch (\UnexpectedValueException $e) { // thrown if a file has been replaced with a folder throw new Exception($e->getMessage(), 1509741912, $e); } catch (\RuntimeException $e) { // RuntimeException thrown if a file is outside of a storage throw new Exception($e->getMessage(), 1509741913, $e); } catch (\InvalidArgumentException $e) { // thrown if file storage does not exist throw new Exception($e->getMessage(), 1509741914, $e); } return $this->tag->render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function image_render()\r\n {\r\n // Send the correct HTTP header\r\n \\header(\"Cache-Control:no-cache,must-revalidate\");\r\n \\header(\"Pragma:no-cache\");\r\n \\header('Content-Type: image/'.static::$image_type);\r\n \\header(\"Connection:close\");\r\n\r\n // Pick the correct output function\r\n $function = '\\\\image'.static::$image_type;\r\n $function(static::$image);\r\n\r\n // Free up resources\r\n \\imagedestroy(static::$image);\r\n }", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "public function show_image() {\n\t $options = Request::get(\"params\");\n\t $img_id = Request::get(\"id\");\n\t $img_size = $options[0];\n \t$this->use_view=false;\n\t\t$this->use_layout=false;\n \tif(!$size = $img_size) $size=110;\n \telse{\n\t\t\tif(strrpos($size, \".\")>0) $size = substr($size, 0, strrpos($size, \".\"));\n\t\t}\n \t$img = new WildfireFile($img_id);\n $img->show($size);\n }", "public function image()\n {\n $user_id = $this->request->getIntegerParam('user_id');\n $size = $this->request->getStringParam('size', 48);\n $hash = $this->request->getStringParam('hash');\n\n if ($size > 100) {\n $this->response->status(400);\n return;\n }\n\n $filename = $this->avatarFileModel->getFilename($user_id);\n $etag = md5($filename.$size);\n\n if ($hash !== $etag) {\n $this->response->status(404);\n return;\n }\n\n $this->response->withCache(365 * 86400, $etag);\n $this->response->withContentType('image/png');\n\n if ($this->request->getHeader('If-None-Match') !== '\"'.$etag.'\"') {\n $this->response->send();\n $this->render($filename, $size);\n } else {\n $this->response->status(304);\n }\n }", "public function displayImage($params) { \n /// first make sure all params are valid\n $this->imgPath = realpath($this->imgDirPath . $params['src']);\n $this->validateParameters($params);\n $image = $this->getOriginalImg();\n if (isset($params['verbose'])) {\n $this->createVerboseLog();\n }\n if(isset($params['crop_to_fit']) || isset($params['height']) || isset($params['width'])) {\n $image = $this->resizeImage($params['height'], $params['width'], $params['crop_to_fit'], $image);\n }\n if (isset($params['sharpen'])) {\n $image = $this->sharpenImage($image);\n }\n $cacheFileName = $this->createCacheFileName($params);\n $this->checkCachePath($cacheFileName, $params['no_cache']);\n \n $this->saveImg($image, $cacheFileName, $params['quality']);\n $this->outputImage($cacheFileName, $this->verbose);\n }", "static function img($filename, $arguments=false) {\n\t\t$arguments = self::arguments($arguments);\n\n\t\t//compute size\n\t\tif (empty($arguments['width']) || empty($arguments['height'])) {\n\n\t\t}\n\n\t\t$arguments['src'] = $filename;\n\t\tunset($arguments['maxwidth'], $arguments['maxheight']);\n\t\treturn self::tag('img', $arguments);\n\t}", "function show_image($image, $width, $height) { //$image_content = read_file($image); We does not want to use this as output.\n //resize image \n $image = imagecreatefromjpeg($image);\n $thumbImage = imagecreatetruecolor(50, 50);\n imagecopyresized($thumbImage, $image, 0, 0, 0, 0, 50, 50, $width, $height);\n imagedestroy($image);\n //imagedestroy($thumbImage); do not destroy before display :)\n // ob_end_clean(); // clean the output buffer ... if turned on.\n header('Content-Type: image/jpeg');\n imagejpeg($thumbImage); //you does not want to save.. just display\n }", "private function updateImgThumbnail(): void\n {\n //====================================================================//\n // Load Object Images List\n $allImages = Image::getImages(\n SLM::getDefaultLangId(),\n $this->ProductId,\n null,\n Shop::getContextShopID(true)\n );\n //====================================================================//\n // Walk on Object Images List\n foreach ($allImages as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "function do_scaled() {\n $this->layout = FALSE;\n\n $status = $this->show_scaled_image(IMAGE_RESOLUTION, 'photos');\n if (TRUE !== $status) {\n $this->message($status);\n $this->redirect('/photo/index');\n }\n }", "function ShowImage($spr = NULL, $lang_id = NULL, $img = NULL, $size = NULL, $quality = 85, $wtm = NULL, $parameters = NULL, $return_src=null)\n {\n\n $size_auto = NULL;\n $size_width = NULL;\n $size_height = NULL;\n $alt = NULL;\n $title = NULL;\n $str = NULL;\n\n $img_with_path = $this->GetImgPath($img, $spr, $lang_id);\n// echo '<br/>$img_with_path='.$img_with_path;\n $imgSmall = ImageK::getResizedImg($img_with_path, $size, $quality, null);\n //echo '<br/>$imgSmall='.$imgSmall;\n if($return_src){\n return $imgSmall;\n }else{\n return '<img src=\"'.$imgSmall.'\" '.$parameters.' />';\n }\n }", "function showImage()\n\t{\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\timagegif($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\timagejpeg($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\timagepng($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\t\t}\n\t}", "protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }", "function show_image ($mime_type, $image_resized, $quality, $cache_dir, $zoom_crop) {\n $is_writable = 0;\n $cache_file_name = $cache_dir . '/' . get_cache_file($quality, $zoom_crop);\n\n if( touch( $cache_file_name ) ) {\n // give 666 permissions so that the developer\n // can overwrite web server user\n chmod( $cache_file_name, 0666 );\n $is_writable = 1;\n } else {\n $cache_file_name = NULL;\n header('Content-type: ' . $mime_type);\n }\n\n if(stristr( $mime_type, 'gif' ) ) {\n imagegif( $image_resized, $cache_file_name );\n } elseif( stristr( $mime_type, 'jpeg' ) ) {\n imagejpeg( $image_resized, $cache_file_name, $quality );\n } elseif( stristr( $mime_type, 'png' ) ) {\n imagepng( $image_resized, $cache_file_name, ceil( $quality / 10 ) );\n }\n\n if( $is_writable ) { show_cache_file( $cache_dir, $quality, $zoom_crop ); }\n\n exit;\n\n}", "public function build()\n {\n if ($this->_inline) {\n $encoded_image = base64_encode(file_get_contents($this->_attributes['src']));\n $mime_type = image_type_to_mime_type($this->_image_type);\n $this->_attributes['src'] = \"data:{$mime_type};base64,{$encoded_image}\";\n\n if (isset($this->_attributes['async'])) {\n unset($this->_attributes['async']);\n }\n }\n\n $attributes = join(' ', $this->_makeAttributesArr());\n if (!empty($attributes)) {\n $attributes = ' ' . $attributes;\n }\n return \"<img{$attributes}>\";\n }", "public function render()\n {\n header('Content-Type: image/png');\n\n imagepng($this->imageResource);\n imagedestroy($this->imageResource);\n }", "public function img($dir, $image, $type = 'thumb', $options = array(), $noimages = \"no-image.gif\", $tag = true) {\n if (file_exists('files' . \"/\" . $dir . \"/\" . $image) && is_file('files' . \"/\" . $dir . \"/\" . $image)) {\n $image = ($type) ? $type . '_' . $image : $image;\n $resized = Router::url('/', true) . 'files' . \"/\" . $dir . \"/\" . $image;\n } elseif(!empty($image)) {\n $resized = $image;\n } \n else {\n $resized = Router::url('/', true) . 'img/' . $noimages;\n }\n if ($tag) {\n $resized = $this->Html->image($resized, $options);\n }\n return $resized;\n }", "public function resize(IImageInformation $src, $width, $height);", "public function display() { ImageLib::serve($this->source_image, $this->source_image_mimetype); }", "function wp_img_tag_add_width_and_height_attr($image, $context, $attachment_id)\n {\n }", "function jigoshop_custom_image($args=array()) {\n\trequire_once (ABSPATH . '/wp-admin/includes/image.php');\n\n\t$defaults = array('image'=>null, 'echo'=>true, 'width'=>60, 'height'=>60);\n\t$args = wp_parse_args($args, $defaults);\n\n\textract($args);\n\n\tif (isset($_POST['image']) && defined('DOING_AJAX') && DOING_AJAX){\n\t\t$image = isset($_POST['image']) ? $_POST['image'] : null;\n\t\t$width = isset($_POST['width']) ? $_POST['width'] : $width;\n\t\t$height = isset($_POST['height']) ? $_POST['height'] : $height;\n\t}\n\n\t$src = jigoshop_custom_image_src($image, $width, $height);\n\n\tif ($echo){\n\t\techo '<img src=\"' . $src . '\" width=\"' . $width . '\" height=\"' . $height . '\" class=\"jigoshop-media-preview\"/>';\n\t}\n\n\tif (defined('DOING_AJAX') && DOING_AJAX){\n\t\texit();\n\t} else {\n\t\treturn $src;\n\t}\n}", "public function ProductImage($productid, $maxWidth = 100, $maxHeight = 100, $showall=false) {\n\t\t$NS = new Zend_Session_Namespace ( 'Default' );\n\t\t$this->view->width = $maxWidth;\n\t\t$this->view->height = $maxHeight;\n\t\t$this->view->showall = $showall;\n\t\t$this->view->resources = ProductsMedia::getMediabyProductId ( $productid, \"*\", $NS->langid );\n\t\t$this->view->productdata = Products::getAllInfo($productid, $NS->langid );\n\t\treturn $this->view->render ( 'partials/media.phtml' );\n\t}", "public function resize ($image, $width, $height, $options = array (), $quality = 100) {\n\t\t$options['width'] = $width;\n\t\t$options['height'] = $height;\n\n\t\treturn $this->Html->image ($this->resizedUrl ($image, $width, $height, $quality), $options);\n\t}", "public function display_question_image($question_id){\n\n $image = $this->challenge_question_model->get_question_image($question_id);\n $this->output->set_header('Content-type: image/png');\n $this->output->set_output(base64_decode($image['image']));\n }", "public function renderTagImage($result) {\n\n\t\t// Variable $result corresponds to an URL in this case.\n\t\t// Analyse the URL and compute the adequate separator between arguments.\n\t\t$parameterSeparator = strpos($result, '?') === FALSE ? '?' : '&';\n\n\t\treturn sprintf('<img src=\"%s%s\" title=\"%s\" alt=\"%s\" %s/>',\n\t\t\t$result,\n\t\t\t$this->thumbnailService->getAppendTimeStamp() ? $parameterSeparator . $this->getTimeStamp() : '',\n\t\t\t$this->getTitle(),\n\t\t\t$this->getTitle(),\n\t\t\t$this->renderAttributes()\n\t\t);\n\t}", "private function updateImgThumbnail()\n {\n //====================================================================//\n // Load Object Images List\n foreach (Image::getImages(SLM::getDefaultLangId(), $this->ProductId) as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "function update_image($image_id, $new_image)\n\t{\n\t\t// TODO: Write me.\n\t}", "public function image_display_gd($resource)\n\t{\n\t\theader('Content-Disposition: filename='.$this->source_image.';');\n\t\theader('Content-Type: '.$this->mime_type);\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT');\n\n\t\tswitch ($this->image_type)\n\t\t{\n\t\t\tcase 1\t:\timagegif($resource);\n\t\t\t\tbreak;\n\t\t\tcase 2\t:\timagejpeg($resource, NULL, $this->quality);\n\t\t\t\tbreak;\n\t\t\tcase 3\t:\timagepng($resource);\n\t\t\t\tbreak;\n\t\t\tdefault:\techo 'Unable to display the image';\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected function renderImageSrcset(FileInterface $image, $width, $height)\r\n\t{\r\n\t\t// Get crop variants\r\n\t\t$cropString = $image instanceof FileReference ? $image->getProperty('crop') : '';\r\n\r\n\t\tif ( $this->arguments['ratio'] ) {\r\n\t\t\t$cropString = self::getCropString($image);\r\n\t\t}\r\n\r\n\t\t$cropVariantCollection = CropVariantCollection::create((string) $cropString);\r\n\r\n\t\t$cropVariant = $this->arguments['cropVariant'] ?: 'default';\r\n\t\t$cropArea = $cropVariantCollection->getCropArea($cropVariant);\r\n\t\t$focusArea = $cropVariantCollection->getFocusArea($cropVariant);\r\n\r\n\t\t// Generate fallback image\r\n\t\t$fallbackImage = $this->generateFallbackImage($image, $width, $cropArea);\r\n\r\n\t\tif ( $GLOBALS['_GET']['type'] == '98' ) {\r\n\t\t\t$lazyload = 0;\r\n\t\t} else {\r\n\t\t\tif ($this->arguments['lazyload']) {\r\n\t\t\t\tif ($this->arguments['lazyload'] == 1) {\r\n\t\t\t\t\t$lazyload = $this->arguments['lazyload'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ($this->arguments['lazyload'] == 2 && $image->getProperty('tx_t3sbootstrap_lazy_load')) {\r\n\t\t\t\t\t\t$lazyload = $this->arguments['lazyload'];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$lazyload = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$lazyload = 0;\r\n\t\t\t}\r\n\t\t}\r\n$placeholderSize = 0;\r\n$placeholderInline = 0;\r\nif ($lazyload) {\r\n$placeholderSize = $this->arguments['placeholderSize'] ? $this->arguments['placeholderSize'] : 60;\r\n$placeholderInline = $this->arguments['placeholderInline'] ? $this->arguments['placeholderInline'] : 1;\r\n}\r\n\t\t// Generate image tag\r\n\t\t$this->tag = $this->responsiveImagesUtility->createImageTagWithSrcset(\r\n\t\t\t$image,\r\n\t\t\t$fallbackImage,\r\n\t\t\t$this->arguments['srcset'],\r\n\t\t\t$cropArea,\r\n\t\t\t$focusArea,\r\n\t\t\t$this->arguments['sizes'],\r\n\t\t\t$this->tag,\r\n\t\t\t$this->arguments['picturefill'],\r\n\t\t\tfalse,\r\n\t\t\t$lazyload,\r\n\t\t\t$this->arguments['ignoreFileExtensions'],\r\n\t\t\t$placeholderSize,\r\n\t\t\t$placeholderInline\r\n\t\t);\r\n\r\n\t\treturn $this->tag->render();\r\n\t}", "public function display($image, $version = null, $options = array()) {\n\t\t$url = $this->imageUrl($image, $version, $options);\n\t\tif ($url !== false) {\n\t\t\treturn $this->Html->image($url, $options);\n\t\t}\n\t\treturn $this->fallbackImage($options, $image, $version);\n\t}", "public function imageResize($imageUrl, $imageSize) {\n if (! file_exists ( Mage::getBaseDir ( static::MEDIA ) . DS . static::MOBILEAPP . DS . static::RESIZED )) {\n mkdir ( Mage::getBaseDir ( static::MEDIA ) . DS . static::MOBILEAPP . DS . static::RESIZED, 0777 );\n }\n \n $imageName = substr ( strrchr ( $imageUrl, \"/\" ), 1 );\n // get file extension\n $extension = end ( explode ( \".\", $imageName ) );\n $imageName = uniqid () . '.' . $extension;\n $imageResized = Mage::getBaseDir ( static::MEDIA ) . DS . static::MOBILEAPP . DS . static::RESIZED . DS . $imageName;\n $dirImg = Mage::getBaseDir () . str_replace ( \"/\", DS, strstr ( $imageUrl, '/' . static::MEDIA ) );\n if (! file_exists ( $imageResized ) && file_exists ( $dirImg )) :\n $imageObj = new Varien_Image ( $dirImg );\n $imageObj->constrainOnly ( true );\n $imageObj->keepAspectRatio ( true );\n $imageObj->keepFrame ( false );\n $imageObj->resize ( $imageSize, null );\n $imageObj->save ( $imageResized );\n \n \n \n \n \n \n endif;\n return Mage::getBaseUrl ( static::MEDIA ) . static::MOBILEAPP . \"/\" . static::RESIZED . \"/\" . $imageName;\n }", "function zen_image_OLD($src, $alt = '', $width = '', $height = '', $parameters = '') {\n global $template_dir;\n\n//auto replace with defined missing image\n if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {\n $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;\n }\n\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n // if not in current template switch to template_default\n if (!file_exists($src)) {\n $src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);\n }\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n//EDITED FOR LAZY LOAD\n $image = '<img src=\"' . zen_output_string($src) . '\" alt=\"' . zen_output_string($alt) . '\"';\n\n if (zen_not_null($alt)) {\n $image .= ' title=\" ' . zen_output_string($alt) . ' \"';\n }\n\n if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && zen_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (zen_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n if (zen_not_null($width) && zen_not_null($height)) {\n $image .= ' width=\"' . zen_output_string($width) . '\" height=\"' . zen_output_string($height) . '\"';\n }\n\n if (zen_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }", "public static function img($width = 640, $height = 480, $grayscale = null)\n {\n if ($grayscale === null) {\n $grayscale = (rand(0, 1) === 0);\n }\n\n $src = 'https://picsum.photos/';\n if ($grayscale) {\n $src .= 'g/';\n }\n $src .= $width . '/' . $height . '/?image=' . rand(0, 1084);\n\n return Html::img(['src' => $src])->setAttribute('alt', Ipsum::str(rand(6, 10)));\n }", "public function imgTag($src = NULL, $options = NULL, $html_potions = NULL)\n {\n $mode = isset($options['mode']) ? $options['mode'] : '';\n\n /* Generate html options */\n $html_options = $this->options2str($html_potions);\n\n if ($mode == \"imagemanager\" || $mode == \"filemanager\") {\n //$filemanager_path = App::Helper('Config')->get('filemanager_base_dir');\n\n return '<img src=\"' . App::Helper('Config')->filemanagerurl(\"/{$src}\") . '\"' . $html_options . ' />';\n }\n else {\n return '<img src=\"' . $src . '\"' . $html_options . ' />';\n }\n }", "function resize_image($src, $width, $height){\n // initializing\n $save_path = Wordless::theme_temp_path();\n $img_filename = Wordless::join_paths($save_path, md5($width . 'x' . $height . '_' . basename($src)) . '.jpg');\n\n // if file doesn't exists, create it\n if (!file_exists($img_filename)) {\n $to_scale = 0;\n $to_crop = 0;\n\n // Get orig dimensions\n list ($width_orig, $height_orig, $type_orig) = getimagesize($src);\n\n // get original image ... to improve!\n switch($type_orig){\n case IMAGETYPE_JPEG: $image = imagecreatefromjpeg($src);\n break;\n case IMAGETYPE_PNG: $image = imagecreatefrompng($src);\n break;\n case IMAGETYPE_GIF: $image = imagecreatefromgif($src);\n break;\n default:\n return;\n }\n\n // which is the new smallest?\n if ($width < $height)\n $min_dim = $width;\n else\n $min_dim = $height;\n\n // which is the orig smallest?\n if ($width_orig < $height_orig)\n $min_orig = $width_orig;\n else\n $min_orig = $height_orig;\n\n // image of the right size\n if ($height_orig == $height && $width_orig == $width) ; // nothing to do\n // if something smaller => scale\n else if ($width_orig < $width) {\n $to_scale = 1;\n $ratio = $width / $width_orig;\n }\n else if ($height_orig < $height) {\n $to_scale = 1;\n $ratio = $height / $height_orig;\n }\n // if both bigger => scale\n else if ($height_orig > $height && $width_orig > $width) {\n $to_scale = 1;\n $ratio_dest = $width / $height;\n $ratio_orig = $width_orig / $height_orig;\n if ($ratio_dest > $ratio_orig)\n $ratio = $width / $width_orig;\n else\n $ratio = $height / $height_orig;\n }\n // one equal one bigger\n else if ( ($width == $width_orig && $height_orig > $height) || ($height == $height_orig && $width_orig > $width) )\n $to_crop = 1;\n // some problem...\n else\n echo \"ALARM\";\n\n // we need to zoom to get the right size\n if ($to_scale == 1) {\n $new_width = $width_orig * $ratio;\n $new_height = $height_orig * $ratio;\n $image_scaled = imagecreatetruecolor($new_width, $new_height);\n // scaling!\n imagecopyresampled($image_scaled, $image, 0, 0, 0, 0, $new_width, $new_height, $width_orig, $height_orig);\n $image = $image_scaled;\n\n if($new_width > $width || $new_height > $height)\n $to_crop = 1;\n }\n else {\n $new_width = $width_orig;\n $new_height = $height_orig;\n }\n\n // we need to crop the image\n if ($to_crop == 1) {\n $image_cropped = imagecreatetruecolor($width, $height);\n\n // find margins for images\n $margin_x = ($new_width - $width) / 2;\n $margin_y = ($new_height - $height) / 2;\n\n // cropping!\n imagecopy($image_cropped, $image, 0, 0, $margin_x, $margin_y, $width, $height);\n $image = $image_cropped;\n }\n\n // Save image\n imagejpeg($image, $img_filename, 95);\n }\n\n // Return image URL\n return Wordless::join_paths(Wordless::theme_temp_path(), basename($img_filename));\n }", "public function actionImage($id) {\n return $this->render('image', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function action_image()\n\t{\n\t\t//Image::load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')->preset('mypreset', DOCROOT.'/files/04_2021/ea7e8ed4bc9d6f7c03f5f374e30b183b.png');\n\t\t$image = Image::forge();\n\n\t\t// Or with optional config\n\t\t$image = Image::forge(array(\n\t\t\t\t'quality' => 80\n\t\t));\n\t\t$image->load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->rounded(100)\n\t\t\t\t\t->output();\n\t\t// Upload an image and pass it directly into the Image::load method.\n\t\tUpload::process(array(\n\t\t\t'path' => DOCROOT.DS.'files'\n\t\t));\n\n\t\tif (Upload::is_valid())\n\t\t{\n\t\t\t$data = Upload::get_files(0);\n\n\t\t\t// Using the file upload data, we can force the image's extension\n\t\t\t// via $force_extension\n\t\t\tImage::load($data['file'], false, $data['extension'])\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->save('image');\n\t\t} \n\t}", "function IMG($img, $extra = '')\n{\n /**\n * An Image tag.\n *\n * Args:\n * $img (str): the image source\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n echo \"<img src='\" . $img . \"'\" ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n}", "public function getImageResized()\n {\n return $this->performImageResize($this->Image());\n }", "public function image_resize($width = 0, $height = 0, $image_url, $filename, $upload_url)\n {\n $source_path = realpath($image_url);\n list($source_width, $source_height, $source_type) = getimagesize($source_path);\n switch ($source_type)\n {\n case IMAGETYPE_GIF:\n $source_gdim = imagecreatefromgif($source_path);\n break;\n case IMAGETYPE_JPEG:\n $source_gdim = imagecreatefromjpeg($source_path);\n break;\n case IMAGETYPE_PNG:\n $source_gdim = imagecreatefrompng($source_path);\n break;\n }\n\n $source_aspect_ratio = $source_width / $source_height;\n $desired_aspect_ratio = $width / $height;\n\n if ($source_aspect_ratio > $desired_aspect_ratio)\n {\n /*\n * Triggered when source image is wider\n */\n $temp_height = $height;\n $temp_width = (int)($height * $source_aspect_ratio);\n }\n else\n {\n /*\n * Triggered otherwise (i.e. source image is similar or taller)\n */\n $temp_width = $width;\n $temp_height = (int)($width / $source_aspect_ratio);\n }\n\n /*\n * Resize the image into a temporary GD image\n */\n\n $temp_gdim = imagecreatetruecolor($temp_width, $temp_height);\n imagecopyresampled($temp_gdim, $source_gdim, 0, 0, 0, 0, $temp_width, $temp_height, $source_width, $source_height);\n\n /*\n * Copy cropped region from temporary image into the desired GD image\n */\n\n $x0 = ($temp_width - $width) / 2;\n $y0 = ($temp_height - $height) / 2;\n $desired_gdim = imagecreatetruecolor($width, $height);\n imagecopy($desired_gdim, $temp_gdim, 0, 0, $x0, $y0, $width, $height);\n\n /*\n * Render the image\n * Alternatively, you can save the image in file-system or database\n */\n\n $image_url = $upload_url . $filename;\n\n imagepng($desired_gdim, $image_url);\n\n return $image_url;\n\n /*\n * Add clean-up code here\n */\n }", "function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}", "function image_resize($filename){\n\t\t$width = 1000;\n\t\t$height = 500;\n\t\t$save_file_location = $filename;\n\t\t// File type\n\t\t//header('Content-Type: image/jpg');\n\t\t$source_properties = getimagesize($filename);\n\t\t$image_type = $source_properties[2];\n\n\t\t// Get new dimensions\n\t\tlist($width_orig, $height_orig) = getimagesize($filename);\n\n\t\t$ratio_orig = $width_orig/$height_orig;\n\t\tif ($width/$height > $ratio_orig) {\n\t\t\t$width = $height*$ratio_orig;\n\t\t} else {\n\t\t\t$height = $width/$ratio_orig;\n\t\t}\n\t\t// Resampling the image \n\t\t$image_p = imagecreatetruecolor($width, $height);\n\t\tif( $image_type == IMAGETYPE_JPEG ) {\n\t\t\t$image = imagecreatefromjpeg($filename);\n\t\t}else if($image_type == IMAGETYPE_GIF){\n\t\t\t$image = imagecreatefromgif($filename);\n\t\t}else if($image_type == IMAGETYPE_PNG){\n\t\t\t$image = imagecreatefrompng($filename);\n\t\t}\n\t\t$finalIMG = imagecopyresampled($image_p, $image, 0, 0, 0, 0,\n\t\t$width, $height, $width_orig, $height_orig);\n\t\t// Display of output image\n\n\t\tif( $image_type == IMAGETYPE_JPEG ) {\n\t\t\timagejpeg($image_p, $save_file_location);\n\t\t}else if($image_type == IMAGETYPE_GIF){\n\t\t\timagegif($image_p, $save_file_location);\n\t\t}else if($image_type == IMAGETYPE_PNG){\n\t\t\t$imagepng = imagepng($image_p, $save_file_location);\n\t\t}\n\t}", "public function renderTagImage($result) {\n\t\treturn sprintf('<img src=\"%s%s\" title=\"%s\" alt=\"%s\" %s/>',\n\t\t\t$result,\n\t\t\t$this->getAppendTimeStamp() ? '?' . $this->file->getProperty('tstamp') : '',\n\t\t\t$this->getTitle(),\n\t\t\t$this->getTitle(),\n\t\t\t$this->renderAttributes()\n\t\t);\n\t}", "public function createImgTag() {\n\t\t$this->imgNeko = '<img src=\"';\n\t\t$this->imgNeko .= $this->imgUri;\n\t\t$this->imgNeko .= '\" width=\"';\n\t\t$this->imgNeko .= $this->imgSize[0];\n\t\t$this->imgNeko .= '\" height=\"';\n\t\t$this->imgNeko .= $this->imgSize[1];\n\t\t$this->imgNeko .= '\" alt=\"';\n\t\t$this->imgNeko .= $this->creditInfo;\n\t\t$this->imgNeko .= '\">';\n\t}", "public function do_profile_resize_image($data){\n\t\t//Your Image\n\t\t$imgSrc = 'public/upload/img/profile/' . $data['file'];\n\n\t\t//getting the image dimensions\n\t\tlist($width, $height) = getimagesize($imgSrc);\n\n\t\t//saving the image into memory (for manipulation with GD Library)\n\t\tif ($data['type'] == \"jpeg\" || $data['type'] == \"jpg\")\n\t\t\t$myImage = imagecreatefromjpeg($imgSrc);\n\t\telse if ($data['type'] == \"png\")\n\t\t\t$myImage = imagecreatefrompng($imgSrc);\n\t\telse if ($data['type'] == \"gij\")\n\t\t\t$myImage = imagecreatefromgif($imgSrc);\n\n\t\t// calculating the part of the image to use for thumbnail\n\t\tif ($width > $height) {\n\t\t $y = 0;\n\t\t $x = ($width - $height) / 2;\n\t\t $smallestSide = $height;\n\t\t} else {\n\t\t $x = 0;\n\t\t $y = ($height - $width) / 2;\n\t\t $smallestSide = $width;\n\t\t}\n\n\t\t// copying the part into thumbnail\n\t\t$thumbSize = 300;\n\t\t$thumb = imagecreatetruecolor($thumbSize, $thumbSize);\n\t\timagecopyresampled($thumb, $myImage, 0, 0, $x, $y, $thumbSize, $thumbSize, $smallestSide, $smallestSide);\n\n\t\t//final output\n\t\t$thumbnail_path = 'public/upload/img/profile/thumbnail_' . $data['file'];\n\t\tif ($data['type'] == \"jpeg\" || $data['type'] == \"jpg\") {\n\t\t\timagejpeg($thumb, $thumbnail_path);\n\t\t}\n\t\telse if ($data['type'] == \"png\") {\n\t\t\timagepng($thumb, $thumbnail_path);\n\t\t}\n\t\telse if ($data['type'] == \"gif\") {\n\t\t\timagegif($thumb, $thumbnail_path);\n\t\t}\n\n\t}", "public function resizeImage()\n {\n \treturn view('resizeImage');\n }", "function output($image_type=IMAGETYPE_JPEG)\n {\n //JPEG\n if( $image_type == IMAGETYPE_JPEG )\n {\n imagejpeg($this->image);\n } \n //GIF\n elseif( $image_type == IMAGETYPE_GIF ) \n {\n imagegif($this->image); \n } \n //PNG\n elseif( $image_type == IMAGETYPE_PNG ) \n {\n imagepng($this->image);\n } \n }", "protected function scaleImages() {}", "public function actionImg(){\n if (!isset($_GET['f'])) exit;\n $size = 200;\n if (isset($_GET['s'])) $size = $_GET['s'];\n $filename = Yii::app()->basePath . DIRECTORY_SEPARATOR . \"..\" . DIRECTORY_SEPARATOR . Yii::app()->params['coverPhotos'].substr($_GET['f'], 0, 2). DIRECTORY_SEPARATOR.$_GET['f'];\n if (!file_exists($filename)) exit;\n \n $type = exif_imagetype($filename);\n \n Yii::app()->clientScript->reset();\n $this->layout = 'none'; // template blank\n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: header(\"Content-Type: image/jpg\"); break;\n\t\t\tcase IMAGETYPE_PNG: header(\"Content-Type: image/png\"); break;\n\t\t\tcase IMAGETYPE_GIF: header(\"Content-Type: image/gif\"); break;\n\t\t}\n\t\t\n header(\"Content-Description: Remote Image\");\n \n list($width, $height) = getimagesize($filename);\n $r = $width / $height;\n \n $oldMin = ($width > $height ? $height : $width);\n if ($oldMin > $size) {\n // don't do enything\n print file_get_contents($filename);\n exit;\n }\n \n if ($width > $height) {\n $newwidth = $size*$r;\n $newheight = $size;\n } else {\n $newheight = $size/$r;\n $newwidth = $size;\n }\n\t\t\n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: $src = imagecreatefromjpeg($filename); break;\n\t\t\tcase IMAGETYPE_PNG: $src = imagecreatefrompng($filename); break;\n\t\t\tcase IMAGETYPE_GIF: $src = imagecreatefromgif($filename); break;\n\t\t}\n\t\t\n $dst = imagecreatetruecolor($newwidth, $newheight);\n fastimagecopyresampled($dst, $src, 0, 0, 0, 0, $newwidth, $newheight, $width, $height, 2);\n \n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: @imagejpeg($dst); break;\n\t\t\tcase IMAGETYPE_PNG: @imagepng($dst); break;\n\t\t\tcase IMAGETYPE_GIF: @imagegif($dst); break;\n\t\t}\n\t\t\n imagedestroy($dst);\n exit;\n }", "protected function createImageCache(HGImage $image, $size = null)\n {\n $file = $image->getHGFile();\n $type = $image->getImgType();\n $source = $this->getFileManager()->getFilePath($file);\n $dest = $this->getCachePath($image, $size);\n\n if (!is_dir(dirname($dest)))\n {\n mkdir(dirname($dest), 0777, true);\n }\n\n copy($source, $dest);\n\n // original size\n\n $img = $this->imageCreator->createImageFromFile($dest, $image->getHGFile()->getFilMimeType());\n\n if (is_null($size))\n {\n $size = $this->defaultSize;\n }\n\n if ($size != $this->defaultSize)\n {\n //$img->setQuality(85);\n\n $dimensions = $this->getDimensions($type, $size);\n\n $typeCf = $this->getTypeConfig($type);\n $sizeCf = $typeCf['sizes'][$size];\n\n $method = $this->getMethod($type, $size);\n if ($method == 'rotate')\n {\n $img->rotate($sizeCf['angle']);\n $method = $sizeCf['subMethod'];\n }\n switch ($method)\n {\n case 'as_is':\n return;\n case 'crop':\n $cMethod = isset($sizeCf['cropMethod']) ? $sizeCf['cropMethod'] : 'center';\n $cBackground = isset($sizeCf['cropBackground']) ? $sizeCf['cropBackground'] : null;\n\n $img->thumbnail($dimensions[0], $dimensions[1], $cMethod, $cBackground);\n break;\n\n case 'resize':\n $rInflate = isset($sizeCf['resizeInflate']) ? $sizeCf['resizeInflate'] : true;\n $rProp = isset($sizeCf['resizeProportional']) ? $sizeCf['resizeProportional'] : true;\n\n $img->resize($dimensions[0], $dimensions[1], $rInflate, $rProp);\n break;\n\n case 'fit':\n $origWidth = $img->getWidth();\n $origHeight = $img->getHeight();\n\n $imgWidth = $dimensions[0];\n $imgHeight = $dimensions[1];\n if ($origWidth == $imgWidth && $imgHeight == $origHeight)\n {\n break;\n }\n $cBackground = isset($sizeCf['background']) ? $sizeCf['background'] : null;\n\n $this->fitResize($img, $dimensions);\n $image = clone $img;\n\n $img->create($dimensions[0], $dimensions[1]);\n\n if(!is_null($cBackground) && $cBackground != '')\n {\n $img->fill(0,0, $cBackground);\n }\n\n $position = isset($sizeCf['position']) ? $sizeCf['position'] : 'center';\n \n $img->overlay($image, $position);\n\n break;\n\n case 'transparent-fit':\n $imgWidth = $dimensions[0];\n $imgHeight = $dimensions[1];\n $this->fitResize($img, $dimensions);\n\n $im = imagecreatetruecolor($imgWidth, $imgHeight);\n $transparent = imagecolorallocatealpha($im, 255, 255, 255, 127);\n imagealphablending($im, false);\n imagefill($im, 0, 0, $transparent);\n\n $position = isset($sizeCf['position']) ? $sizeCf['position'] : 'center';\n\n if (strpos($position, 'left') !== false)\n {\n $x = 0;\n }\n elseif (strpos($position, 'right') !== false)\n {\n $x = $imgWidth - $img->getWidth();\n }\n else\n {\n $x = ($imgWidth - $img->getWidth())/2;\n }\n\n if (strpos($position, 'top') !== false)\n {\n $y = 0;\n }\n elseif (strpos($position, 'bottom') !== false)\n {\n $y = $imgHeight - $img->getHeight();\n }\n else\n {\n $y = ($imgHeight - $img->getHeight())/2;\n }\n imagecopymerge($im, $img->getAdapter()->getHolder(),$x, $y, 0, 0, $img->getWidth(), $img->getHeight(), 100);\n\n imagedestroy($img->getAdapter()->getHolder());\n imagesavealpha($im, true);\n imagealphablending($im, true);\n\n $img->getAdapter()->setMimeType(isset($sizeCf['mime']) ? $sizeCf['mime'] : 'image/png');\n $img->getAdapter()->setHolder($im);\n break;\n\n case 'fill':\n $origWidth = $img->getWidth();\n $origHeight = $img->getHeight();\n\n $imgWidth = $dimensions[0];\n $imgHeight = $dimensions[1];\n if ($origWidth == $imgWidth && $imgHeight == $origHeight)\n {\n break;\n }\n if ($imgWidth/$origWidth > $imgHeight/$origHeight)\n {\n $newWidth = $imgWidth;\n $newHeight = round($origHeight * ($newWidth/$origWidth));\n }\n else\n {\n $newHeight = $imgHeight;\n $newWidth = round($origWidth * ($newHeight/$origHeight));\n }\n\n $position = isset($sizeCf['position']) ? $sizeCf['position'] : 'center';\n\n $rInflate = isset($sizeCf['resizeInflate']) ? $sizeCf['resizeInflate'] : true;\n $rProp = isset($sizeCf['resizeProportional']) ? $sizeCf['resizeProportional'] : true;\n\n $img->resize($newWidth, $newHeight, $rInflate, $rProp);\n $imgHeight = $img->getHeight();\n $imgWidth = $img->getWidth();\n\n if(false !== strstr($position, 'top'))\n {\n $top = 0;\n }\n else if(false !== strstr($position, 'bottom'))\n {\n $top = $imgHeight - $dimensions[1];\n }\n else\n {\n $top = (int)round(($imgHeight - $dimensions[1]) / 2);\n }\n\n if(false !== strstr($position, 'left'))\n {\n $left = 0;\n }\n else if(false !== strstr($position, 'right'))\n {\n $left = $imgWidth - $dimensions[0];\n }\n else\n {\n $left = (int)round(($imgWidth - $dimensions[0]) / 2);\n }\n\n $img->crop($left, $top, $dimensions[0], $dimensions[1]);\n\n break;\n\n case 'exact':\n $noWidth = is_null($dimensions[0]) || $dimensions[0] <= 0;\n $noHeight = is_null($dimensions[1]) || $dimensions[1] <= 0;\n\n if (!$noWidth || !$noHeight)\n {\n $origWidth = $img->getWidth();\n $origHeight = $img->getHeight();\n\n if (!$noWidth && !$noHeight)\n {\n $newWidth = $dimensions[0];\n $newHeight = $dimensions[1];\n $img->resize($newWidth, $newHeight, false, false);\n }\n elseif ($noHeight)\n {\n $newWidth = $dimensions[0];\n $newHeight = round($origHeight * ($newWidth/$origWidth));\n $img->resize($newWidth, $newHeight, false, true);\n }\n elseif ($noWidth)\n {\n $newHeight = $dimensions[1];\n $newWidth = round($origWidth * ($newHeight/$origHeight));\n $img->resize($newWidth, $newHeight, false, true);\n }\n }\n break;\n\n default:\n $img->$method($sizeCf);\n\n break;\n\n }\n }\n\n if (isset($sizeCf['quality']))\n {\n $img->setQuality($sizeCf['quality']);\n } \n\n // watermarking\n if ($watermark = $this->getWatermarkPath($type, $size))\n {\n $img->overlay($this->imageCreator->createImageFromFile($watermark), $this->settings['watermark_position']);\n }\n\n $img->saveAs($dest, isset($sizeCf['mime']) ? $sizeCf['mime'] : (isset($method) && strpos($method, 'transparent') !== false ? 'image/png' : ''));\n }", "public static function fluid_img($size = 'thumbnail', $max_w = 100, $class = \"\") {\r\n global $post;\r\n $id = $post->ID;\r\n if (isset($ID))\r\n $id = $ID;\r\n $img_id = get_post_thumbnail_id($id);\r\n $imgs = wp_get_attachment_image_src($img_id, $size);\r\n if ($imgs):\r\n $src = '<img class=\"' . $class . '\" src=\"' . $imgs[0] . '\" alt=\"\" style=\"display:block; max-width:' . $max_w . '%\" />';\r\n else :\r\n $src = '<img src=\"noimage.jpg\" alt=\"no image found\" />';\r\n endif;\r\n echo $src;\r\n }", "static public function image($url, $alt = null, $classes = null,\n\t\t\t $id = null, $w = 0, $h = 0 )\n {\n $class = (!empty($classes)) ? 'class=\"'.$classes.'\"' : null;\n \n $size = (!empty($h)) ? 'height=\"'.$h.'\" ' : null;\n $size .= (!empty($w)) ? 'width=\"'.$w.'\" ' : $size;\n \n $alt = (empty($alt)) ? _('Image') : $alt;\n $title = 'title=\"'.$alt.'\"';\n $alt = 'alt=\"'.$alt.'\"';\n\n $url = String::substr($url, 0, 4) === 'http' ? $url : self::validURL($url);\n\n return \"<img $id $class $title $alt $size src=\\\"$url\\\" />\";\n }", "function awesome_acf_responsive_image($image_id, $image_size, $max_width)\n{\n\n\t// check the image ID is not blank\n\tif ($image_id != '') {\n\n\t\t// set the default src image size\n\t\t$image_src = wp_get_attachment_image_url($image_id, $image_size);\n\n\t\t// set the srcset with various image sizes\n\t\t$image_srcset = wp_get_attachment_image_srcset($image_id, $image_size);\n\n\t\t// generate the markup for the responsive image\n\t\techo 'src=\"' . $image_src . '\" srcset=\"' . $image_srcset . '\" sizes=\"(max-width: ' . $max_width . ') 100vw, ' . $max_width . '\"';\n\t}\n}", "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\t\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t\t$imageType = image_type_to_mime_type($imageType);\n\t\t\n\t\t$newImageWidth = ceil($width * $scale);\n\t\t$newImageHeight = ceil($height * $scale);\n\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\tswitch($imageType) {\n\t\t\tcase \"image/gif\":\n\t\t\t\t$source=imagecreatefromgif($image); \n\t\t\t\tbreak;\n\t\t\tcase \"image/pjpeg\":\n\t\t\tcase \"image/jpeg\":\n\t\t\tcase \"image/jpg\":\n\t\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\t\tbreak;\n\t\t\tcase \"image/png\":\n\t\t\tcase \"image/x-png\":\n\t\t\t\t$source=imagecreatefrompng($image); \n\t\t\t\tbreak;\n\t\t}\n\t\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\t\tswitch($imageType) {\n\t\t\tcase \"image/gif\":\n\t\t\t\timagegif($newImage,$thumb_image_name); \n\t\t\t\tbreak;\n\t\t\tcase \"image/pjpeg\":\n\t\t\tcase \"image/jpeg\":\n\t\t\tcase \"image/jpg\":\n\t\t\t\timagejpeg($newImage,$thumb_image_name,90); \n\t\t\t\tbreak;\n\t\t\tcase \"image/png\":\n\t\t\tcase \"image/x-png\":\n\t\t\t\timagepng($newImage,$thumb_image_name); \n\t\t\t\tbreak;\n\t\t}\n\t\tchmod($thumb_image_name, 0777);\n\t\treturn $thumb_image_name;\n\t}", "public function setImage($image, $type = 'image', $size = array(800, 600)) \n { \n if (file_exists($image) && is_readable($image)) {\n $info = $this->_getImageInfo($image);\n \n switch ($info['mime']) {\n case 'image/png':\n $img = imagecreatefrompng($image);\n break;\n case 'image/jpeg':\n $img = imagecreatefromjpeg($image);\n break;\n case 'image/gif':\n $old = imagecreatefromgif($image);\n $img = imagecreatetruecolor($info[0], $info[1]);\n imagecopy($image, $old, 0, 0, 0, 0, $info[0], $info[1]);\n break;\n default:\n break;\n }\n }\n\n switch ($type) {\n case 'image':\n if ($img) $this->images[] = $img;\n break;\n case 'layout':\n if ($img) {\n $this->layout = $img;\n $this->layoutInfo = $info;\n } else {\n $this->layout = imagecreatetruecolor($size[0], $size[1]);\n $gray = imagecolorallocate($this->layout, 128, 128, 128);\n imagefilledrectangle($this->layout, 0, 0, $size[0], $size[1], $gray);\n $this->layoutInfo = $this->_getImageInfo($this->layout);\n }\n break;\n default:\n break;\n }\n }", "function displayImage($image) {\n header(\"Content-type: image/jpg\");\n imagejpeg($image);\n imagedestroy($image);\n}", "protected function show()\n {\n switch ($this->image_info['mime']) {\n \n case 'image/gif':\n $this->sendHeader('gif');\n imagegif($this->image, '');\n break;\n \n case 'image/jpeg':\n $this->sendHeader('jpg');\n imagejpeg($this->image, '', $this->quality);\n break;\n \n case 'image/jpg':\n $this->sendHeader('jpg');\n imagejpeg($this->image, '', $this->quality);\n break;\n \n case 'image/png':\n $this->sendHeader('png');\n imagepng($this->image, '', 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 }", "protected function handleAvatar() : void // image\n {\n // something happened in the last years: those textures do not include tiny icons\n $sizes = [/* 'tiny' => 15, */'small' => 18, 'medium' => 36, 'large' => 56];\n $aPath = 'uploads/avatars/%d.jpg';\n $s = $this->_get['size'] ?: 'medium';\n\n if (!$this->_get['id'] || !preg_match('/^([0-9]+)\\.(jpg|gif)$/', $this->_get['id'][0], $matches) || !in_array($s, array_keys($sizes)))\n {\n trigger_error('AjaxProfile::handleAvatar - malformed request received', E_USER_ERROR);\n return;\n }\n\n $this->contentType = $matches[2] == 'png' ? MIME_TYPE_PNG : MIME_TYPE_JPEG;\n\n $id = $matches[1];\n $dest = imageCreateTruecolor($sizes[$s], $sizes[$s]);\n\n if (file_exists(sprintf($aPath, $id)))\n {\n $offsetX = $offsetY = 0;\n\n switch ($s)\n {\n case 'tiny':\n $offsetX += $sizes['small'];\n case 'small':\n $offsetY += $sizes['medium'];\n case 'medium':\n $offsetX += $sizes['large'];\n }\n\n $src = imageCreateFromJpeg(printf($aPath, $id));\n imagecopymerge($dest, $src, 0, 0, $offsetX, $offsetY, $sizes[$s], $sizes[$s], 100);\n }\n else\n trigger_error('AjaxProfile::handleAvatar - avatar file #'.$id.' not found', E_USER_ERROR);\n\n if ($matches[2] == 'gif')\n imageGif($dest);\n else\n imageJpeg($dest);\n }", "function resizeImage($image,$width,$height,$scale) {\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);\n\t\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$image); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$image,90); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$image); \n\t\t\tbreak;\n }\n\t\n\tchmod($image, 0777);\n\treturn $image;\n}", "public function resizeImage($filepath) {\n if (is_file($filepath)) {\n \n $dir_name = $this->destinationDirectory;\n\n $drawable_dpi = array();\n $drawable_dpi['drawable-ldpi'] = 0.1875;\n $drawable_dpi['drawable-mdpi'] = 0.25;\n $drawable_dpi['drawable-hdpi'] = 0.375;\n $drawable_dpi['drawable-xhdpi'] = 0.5;\n $drawable_dpi['drawable-xxhdpi'] = 0.75;\n $drawable_dpi['drawable-xxxhdpi'] = 1.0;\n\n $mipmap_dpi = array();\n $mipmap_dpi['mipmap-ldpi'] = 0.1875;\n $mipmap_dpi['mipmap-mdpi'] = 0.25;\n $mipmap_dpi['mipmap-hdpi'] = 0.375;\n $mipmap_dpi['mipmap-xhdpi'] = 0.5;\n $mipmap_dpi['mipmap-xxhdpi'] = 0.75;\n $mipmap_dpi['mipmap-xxxhdpi'] = 1.0;\n\n $selected_dpi = array();\n if($this->folderCode == 0) {\n $selected_dpi = $drawable_dpi; \n }\n if($this->folderCode == 1) {\n $selected_dpi = $mipmap_dpi; \n }\n if($this->folderCode == 2) {\n $selected_dpi = array_merge($drawable_dpi, $mipmap_dpi); \n }\n\n\n // Content type\n $image_ext = \"png\";\n header('\"Content-Type: image/\"'.$image_ext);\n\n // Get new sizes\n $dir_path = $this->dirHelper($dir_name);\n $imageFileName = $this->extract_file_name($filepath);\n $final_dir_path = $dir_path.\"res/\"; \n if (!is_dir($final_dir_path)) {\n mkdir($final_dir_path);\n }\n foreach ($selected_dpi as $key => $value) {\n if (!is_dir($final_dir_path.$key)) {\n mkdir($final_dir_path.$key);\n }\n list($width, $height) = getimagesize($filepath);\n $newwidth = $width * $value;\n $newheight = $height * $value;\n\n // Load\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n $source = imagecreatefrompng($filepath);\n\n // Resize\n imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n imagepng($thumb, $final_dir_path.$key.\"/\".$imageFileName);\n }\n echo \"<h1>$filepath has been resized into different sizes</h1>\";\n }\n elseif(!file_exists($filepath)) {\n echo \"<h1>Invalid File path</h1>\";\n }\n else {\n echo \"<h1>This is not a file</h1>\";\n }\n\n }", "function image_display_gd($resource)\n\t{\n\t\theader(\"Content-Disposition: filename={$this->file_name};\");\n\t\theader(\"Content-Type: {$this->mime_type}\");\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Last-Modified: '.gmdate('D, d M Y H:i:s', $this->EE->localize->now).' GMT'); \n\t\n\t\tswitch ($this->image_type)\n\t\t{\n\t\t\tcase 1 \t\t:\timagegif($resource);\n\t\t\t\tbreak;\n\t\t\tcase 2\t\t:\timagejpeg($resource, '', $this->quality);\n\t\t\t\tbreak;\n\t\t\tcase 3\t\t:\timagepng($resource);\n\t\t\t\tbreak;\n\t\t\tdefault\t\t:\techo 'Unable to display the image';\n\t\t\t\tbreak;\t\t\n\t\t}\t\t\t\n\t}", "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\t\t\t\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t\t\t\t$imageType = image_type_to_mime_type($imageType);\n\t\t\t\n\t\t\t\t$newImageWidth = ceil($width * $scale);\n\t\t\t\t$newImageHeight = ceil($height * $scale);\n\t\t\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\t\t\tswitch($imageType) {\n\t\t\t\t\tcase \"image/gif\":\n\t\t\t\t\t\t$source=imagecreatefromgif($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/pjpeg\":\n\t\t\t\t\tcase \"image/jpeg\":\n\t\t\t\t\tcase \"image/jpg\":\n\t\t\t\t\t\t$source=imagecreatefromjpeg($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/png\":\n\t\t\t\t\tcase \"image/x-png\":\n\t\t\t\t\t\t$source=imagecreatefrompng($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\t\t\t\tswitch($imageType) {\n\t\t\t\t\tcase \"image/gif\":\n\t\t\t\t\t\timagegif($newImage,$thumb_image_name);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/pjpeg\":\n\t\t\t\t\tcase \"image/jpeg\":\n\t\t\t\t\tcase \"image/jpg\":\n\t\t\t\t\t\timagejpeg($newImage,$thumb_image_name,90);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/png\":\n\t\t\t\t\tcase \"image/x-png\":\n\t\t\t\t\t\timagepng($newImage,$thumb_image_name);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tchmod($thumb_image_name, 0777);\n\t\t\t\treturn $thumb_image_name;\n\t\t\t}", "public function place_responsive_image($image, $image_style) {\n $file = $image->entity;\n\n if ($file) {\n $variables = [\n 'responsive_image_style_id' => $image_style,\n 'uri' => $file->getFileUri(),\n ];\n\n // The image.factory service will check if our image is valid.\n $image = \\Drupal::service('image.factory')->get($file->getFileUri());\n if ($image->isValid()) {\n $variables['width'] = $image->getWidth();\n $variables['height'] = $image->getHeight();\n }\n else {\n $variables['width'] = $variables['height'] = NULL;\n }\n $logo_build = [\n '#theme' => 'responsive_image',\n '#width' => $variables['width'],\n '#height' => $variables['height'],\n '#responsive_image_style_id' => $variables['responsive_image_style_id'],\n '#uri' => $variables['uri'],\n ];\n // Add the file entity to the cache dependencies.\n // This will clear our cache when this entity updates.\n $renderer = \\Drupal::service('renderer');\n $renderer->addCacheableDependency($logo_build, $file);\n // Return the render array as block content.\n return $logo_build;\n }\n\n return NULL;\n }", "function resizeImage($image,$width,$height,$scale) {\n\t\t\t\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t\t\t\t$imageType = image_type_to_mime_type($imageType);\n\t\t\t\t$newImageWidth = ceil($width * $scale);\n\t\t\t\t$newImageHeight = ceil($height * $scale);\n\t\t\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\t\t\tswitch($imageType) {\n\t\t\t\t\tcase \"image/gif\":\n\t\t\t\t\t\t$source=imagecreatefromgif($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/pjpeg\":\n\t\t\t\t\tcase \"image/jpeg\":\n\t\t\t\t\tcase \"image/jpg\":\n\t\t\t\t\t\t$source=imagecreatefromjpeg($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/png\":\n\t\t\t\t\tcase \"image/x-png\":\n\t\t\t\t\t\t$source=imagecreatefrompng($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\timagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);\n\t\t\t\n\t\t\t\tswitch($imageType) {\n\t\t\t\t\tcase \"image/gif\":\n\t\t\t\t\t\timagegif($newImage,$image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/pjpeg\":\n\t\t\t\t\tcase \"image/jpeg\":\n\t\t\t\t\tcase \"image/jpg\":\n\t\t\t\t\t\timagejpeg($newImage,$image,90);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/png\":\n\t\t\t\t\tcase \"image/x-png\":\n\t\t\t\t\t\timagepng($newImage,$image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tchmod($image, 0777);\n\t\t\t\treturn $image;\n\t\t\t}", "function showimage($img_name,$img_width,$img_height,$cropratio=NULL,$imgtitle=NULL,$round) {\r\n\r\n\tglobal $sitepath;\r\n\r\n\t$theimg.=\"<img src='$sitepath\". \"includes/image.php/$img_name[$i]?width=$img_width&amp;height=$img_height\";\r\n\r\n\tif ($cropratio) { $theimg.= \"&amp;cropratio=$cropratio\"; }\r\n\r\n\t$theimg.=\"&amp;quality=85&amp;image=$sitepath\" . \"$img_name' alt='$imgtitle' \";\r\n\r\n\t$theimg.=\" class='avatar\";\r\n\r\n\tif ($round==1) { $theimg.=\" round_1px \"; }\r\n\r\n\tif ($round==2) { $theimg.=\" round_2px \"; }\r\n\r\n\tif ($round==3) { $theimg.=\" round_3px \"; }\r\n\r\n\tif ($round==5) { $theimg.=\" round_5px \"; }\r\n\r\n\tif ($round==10) { $theimg.=\" round_10px \"; }\r\n\r\n\t$theimg.=\"' />\";\r\n\r\n\treturn $theimg;\r\n\r\n}", "function imgResize($filename, $newWidth, $newHeight, $dir_out){\n\t\n\t// изменение размера изображения\n\n\t// 1 создадим новое изображение из файла\n\t$scr = imagecreatefromjpeg($filename); // или $imagePath\n\t\n\t// 2 создадим новое полноцветное изображение нужного размера\n\t$newImg = imagecreatetruecolor($newWidth, $newHeight);\n\n\t// 3 определим размер исходного изображения для 4 пункта\n\t$size = getimagesize($filename);\n\n\t// 4 копирует прямоугольную часть одного изображения на другое изображение, интерполируя значения пикселов таким образом, чтобы уменьшение размера изображения не уменьшало его чёткости\n\timagecopyresampled($newImg, $scr, 0, 0, 0, 0, $newWidth, $newHeight, $size[0], $size[1]);\n\n\t// 5 запишем изображение в файл по нужному пути\n\timagejpeg($newImg, $dir_out);\n\n\timagedestroy($scr);\n\timagedestroy($newImg);\t\t\n\t\n}", "private function _resizeThumbnailImage($thumb_image_name, $image, $width, $height, $src_width, $src_height, $scale){\n\t\t$newImageWidth = ceil($width * $scale);\n\t\t$newImageHeight = ceil($height * $scale);\n\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\t$source = imagecreatefromjpeg($image);\n\t\timagecopyresampled($newImage,$source,0,0,0,0,$width,$height,$src_width,$src_height);\n\t\timagejpeg($newImage,$thumb_image_name,90);\n\t\tchmod($thumb_image_name, 0777);\n\t\t//return $thumb_image_name;\n\t}", "public function image($img) {\n\t\tif (strpos($img, 'http') === false) {\t\t\n\t\t} else {\n\t\t\techo \"<img src='img/{$img}'>\";\n\t\t}\n\t}", "function refreshImageSize() {\n\t\tif($this->intTableKeyValue != \"\") {\n\t\t\tif ( $this->arrObjInfo['imageurl'] ) {\n\t\t\t\tif($this->arrObjInfo['imagewidth'] == 0) {\n\t\t\t\t\t$imageURL = $this->getLocalImageURL();\n\t\t\t\t\t\n\t\t\t\t\t$imageSize = getimagesize($imageURL);\n\t\t\t\t\t$this->arrObjInfo['imagewidth'] = $imageSize[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->arrObjInfo['imageheight'] == 0) {\n\t\t\t\t\t$imageURL = $this->getLocalImageURL();\n\t\t\t\t\n\t\t\t\t\t$imageSize = getimagesize($imageURL);\n\t\t\t\t\t$this->arrObjInfo['imageheight'] = $imageSize[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function image($img,$attribute = array()){\r\n\t\t$tmp = '';\r\n\t\t$attribute = $this->convertStringAtt($attribute);\r\n\r\n\t\t$default = ''; $width = 0;\r\n\t\t$folder = ''; $height = 0;\r\n\r\n\t\t$att = array();\r\n\t\tif(isset($attribute['default'])){\r\n\t\t\t$att['default'] = $attribute['default'];\r\n\t\t\tunset($attribute['default']);\r\n\t\t}\r\n\t\tif(isset($attribute['folder'])){\r\n\t\t\t$att['folder'] = $attribute['folder'];\r\n\t\t\tunset($attribute['folder']);\r\n\t\t}\r\n\t\tif(isset($attribute['fixed'])){\r\n\t\t\t$att['fixed'] = $attribute['fixed'];\r\n\t\t\tunset($attribute['fixed']);\r\n\t\t}\r\n\t\tif(isset($attribute['absolute'])){\r\n\t\t\t$att['absolute'] = $attribute['absolute'];\r\n\t\t\tunset($attribute['absolute']);\r\n\t\t}\r\n\t\tif(isset($attribute['fullpath'])){\r\n\t\t\t$att['fullpath'] = $attribute['fullpath'];\r\n\t\t\tunset($attribute['fullpath']);\r\n\t\t}else{\r\n\t\t\t$att['fullpath'] = 'true';\r\n\t\t}\r\n\r\n\t\tBASIC::init()->imported('media.mod');\r\n\t\t$media = new BASIC_MEDIA($img, $att);\r\n\r\n\t\tif(isset($attribute['width'])) $width = $attribute['width'];\r\n\t\tif(isset($attribute['height'])) $height = $attribute['height'];\r\n\r\n\t\tif($media->info['type'] == 13 || $media->info['type'] == 4){\r\n\t\t\t$this->headSpecial('<!--[if IE]><script type=\"text/javascript\" src=\"'.BASIC::init()->ini_get('root_virtual').BASIC::init()->ini_get('basic_path').'scripts/flash/flash.js\" defer=\"defer\"></script><![endif]-->','Flash');\r\n\t\t}\r\n\t\treturn $media->view($width,$height,$attribute) . $tmp;\r\n\t}", "protected function processImage() {}", "public function render() {\n if (!$this->layout) return false;\n \n $mime = $this->layoutInfo['mime'] ? $this->layoutInfo['mime'] : 'image/png';\n \n header('Content-Type: ' . $mime);\n switch ($mime) {\n case 'image/jpeg':\n imagejpeg($this->layout);\n break;\n case 'image/gif':\n imagegif($this->layout);\n case 'image/png':\n default:\n imagepng($this->layout);\n break;\n }\n }", "public function outputAvatarImage()\n\t{\n\t\techo $this->app->html->img($this->avatar_url, $this->avatar_width, $this->avatar_height, $this->username);\n\t}", "function printImage($imageUrl = '', $class = '') {\n global $app;\n\n $asset_path = $app->make('Config')->get('app.asset_path');\n $size = getimagesize($asset_path . '/' . $imageUrl);\n\n $width = $size[0];\n $height = $size[1];\n\n return \"<img src='$imageUrl' width='$width' height='$height' class='$class' />\";\n }", "function zen_image($src, $alt = '', $width = '', $height = '', $parameters = '') {\n global $template_dir, $zco_notifier;\n\n // soft clean the alt tag\n $alt = zen_clean_html($alt);\n\n // use old method on template images\n if (strstr($src, 'includes/templates') or strstr($src, 'includes/languages') or PROPORTIONAL_IMAGES_STATUS == '0') {\n return zen_image_OLD($src, $alt, $width, $height, $parameters);\n }\n\n//auto replace with defined missing image\n if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {\n $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;\n }\n\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n // if not in current template switch to template_default\n if (!file_exists($src)) {\n $src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);\n }\n\n // hook for handle_image() function such as Image Handler etc\n if (function_exists('handle_image')) {\n $newimg = handle_image($src, $alt, $width, $height, $parameters);\n list($src, $alt, $width, $height, $parameters) = $newimg;\n $zco_notifier->notify('NOTIFY_HANDLE_IMAGE', array($newimg));\n }\n\n // Convert width/height to int for proper validation.\n // intval() used to support compatibility with plugins like image-handler\n $width = empty($width) ? $width : intval($width);\n $height = empty($height) ? $height : intval($height);\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n//EDITED FOR LAZY LOAD\n $image = '<img src=\"' . zen_output_string($src) . '\" alt=\"' . zen_output_string($alt) . '\"';\n\n if (zen_not_null($alt)) {\n $image .= ' title=\" ' . zen_output_string($alt) . ' \"';\n }\n\n if ( ((CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height))) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && zen_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (zen_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n\n if (zen_not_null($width) && zen_not_null($height) and file_exists($src)) {\n// $image .= ' width=\"' . zen_output_string($width) . '\" height=\"' . zen_output_string($height) . '\"';\n// proportional images\n $image_size = @getimagesize($src);\n // fix division by zero error\n $ratio = ($image_size[0] != 0 ? $width / $image_size[0] : 1);\n if ($image_size[1]*$ratio > $height) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } else {\n $height = $image_size[1] * $ratio;\n }\n// only use proportional image when image is larger than proportional size\n if ($image_size[0] < $width and $image_size[1] < $height) {\n $image .= ' width=\"' . $image_size[0] . '\" height=\"' . intval($image_size[1]) . '\"';\n } else {\n $image .= ' width=\"' . round($width) . '\" height=\"' . round($height) . '\"';\n }\n } else {\n // override on missing image to allow for proportional and required/not required\n if (IMAGE_REQUIRED == 'false') {\n return false;\n } else if (substr($src, 0, 4) != 'http') {\n $image .= ' width=\"' . intval(SMALL_IMAGE_WIDTH) . '\" height=\"' . intval(SMALL_IMAGE_HEIGHT) . '\"';\n }\n }\n\n // inject rollover class if one is defined. NOTE: This could end up with 2 \"class\" elements if $parameters contains \"class\" already.\n if (defined('IMAGE_ROLLOVER_CLASS') && IMAGE_ROLLOVER_CLASS != '') {\n $parameters .= (zen_not_null($parameters) ? ' ' : '') . 'class=\"rollover\"';\n }\n // add $parameters to the tag output\n if (zen_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }", "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$thumb_image_name); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$thumb_image_name,90); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$thumb_image_name); \n\t\t\tbreak;\n }\n\tchmod($thumb_image_name, 0777);\n\treturn $thumb_image_name;\n}", "function themify_make_image_size( $attachment_id, $width, $height, $meta, $img_url ) {\r\n\t\tsetlocale( LC_CTYPE, get_locale() . '.UTF-8' );\r\n\t\t$attached_file = get_attached_file( $attachment_id );\r\n\r\n\t\t$source_size = apply_filters( 'themify_image_script_source_size', 'large' );\r\n\t\tif ( $source_size !== 'full' && isset( $meta['sizes'][ $source_size ]['file'] ) )\r\n\t\t\t$attached_file = str_replace( $meta['file'], trailingslashit( dirname( $meta['file'] ) ) . $meta['sizes'][ $source_size ]['file'], $attached_file );\r\n\r\n\t\t$resized = image_make_intermediate_size( $attached_file, $width, $height, true );\r\n\t\tif ( $resized && ! is_wp_error( $resized ) ) {\r\n\r\n\t\t\t// Save the new size in meta data\r\n\t\t\t$key = sprintf( 'resized-%dx%d', $width, $height );\r\n\t\t\t$meta['sizes'][$key] = $resized;\r\n\t\t\t$img_url = str_replace( basename( $img_url ), $resized['file'], $img_url );\r\n\r\n\t\t\twp_update_attachment_metadata( $attachment_id, $meta );\r\n\r\n\t\t\t// Save size in backup sizes so it's deleted when original attachment is deleted.\r\n\t\t\t$backup_sizes = get_post_meta( $attachment_id, '_wp_attachment_backup_sizes', true );\r\n\t\t\tif ( ! is_array( $backup_sizes ) ) $backup_sizes = array();\r\n\t\t\t$backup_sizes[$key] = $resized;\r\n\t\t\tupdate_post_meta( $attachment_id, '_wp_attachment_backup_sizes', $backup_sizes );\r\n\r\n\t\t\t// Return resized image url, width and height.\r\n\t\t\treturn array(\r\n\t\t\t\t'url' => esc_url( $img_url ),\r\n\t\t\t\t'width' => $width,\r\n\t\t\t\t'height' => $height,\r\n\t\t\t);\r\n\t\t}\r\n\t\t// Return original image url, width and height.\r\n\t\treturn array(\r\n\t\t\t'url' => $img_url,\r\n\t\t\t'width' => $width,\r\n\t\t\t'height' => $height,\r\n\t\t);\r\n\t}", "public function add_image_sizes() {\n add_image_size( 'label_thumbnail', 100, 100, true );\n }", "public function setStrategy(Polycast_Filter_ImageSize_Strategy_Interface $strategy);", "public function doImages( $xml )\n {\n $xml = $this->getReplacer()->element( $xml, 'iz:image:resize' );\n $xml = $this->getReplacer()->element( $xml, 'iz:image:layout', true );\n \n return $xml;\n }", "function image_scale($src_abspath, $dest_abspath, $aspect, $width, $strategy)\n{\n $im = new \\Imagick($src_abspath);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_write($im, $dest_abspath);\n}", "function shoestrap_image( $img ) {\n\n if ( empty( $img ) || ( empty( $img['id'] ) && empty( $img['url'] ) ) )\n return; // Nothing here to do!\n\n // We don't have an attachment id\n $img['id'] = ( empty( $img['id'] ) ) ? shoestrap_get_attachment_id_from_src( $img['url'] ) : $img['id'];\n\n // Get the full size attachment\n $image = wp_get_attachment_image_src( $img['id'], 'full' );\n\n $img['url'] = $image[0];\n \n $img['width'] = $image[1];\n $img['height'] = $image[2];\n\n return shoestrap_image_resize( $img );\n}", "public function output_image()\n {\n if (empty($this->tmp_img)) {\n if ( ! $this->SILENT_MODE) {\n trigger_error('No temporary image for resizing!', E_USER_WARNING);\n }\n return false;\n }\n header('Content-Type: image/' . $this->output_type);\n $this->_set_new_size_auto();\n if ($this->output_width != $this->source_width || $this->output_height != $this->source_height || $this->output_type != $this->source_type) {\n $this->tmp_resampled = imagecreatetruecolor($this->output_width, $this->output_height);\n imagecopyresampled($this->tmp_resampled, $this->tmp_img, 0, 0, 0, 0, $this->output_width, $this->output_height, $this->source_width, $this->source_height);\n }\n $func_name = 'image' . $this->output_type;\n strlen($this->output_type) ? $func_name($this->tmp_resampled) : null;\n return true;\n }", "function wp_img_tag_add_srcset_and_sizes_attr($image, $context, $attachment_id)\n {\n }", "private function doImageResize($img){\n\t\t//Determine the new dimensions\n\t\t$d=$this->getNewDims($img);\n\t\t\n\t\t//Determine which function to use\n\t\t$funcs=$this->getImageFunctions($img);\n\t\t\n\t\t//Determine the image type\n\t\t$src_img=$funcs[0]($img);\n\t\t\n\t\t//Determine the new image size\n\t\t$new_img=imagecreatetruecolor($d[0], $d[1]);\n\t\t\n\t\tif(imagecopyresampled\n\t\t\t\t($new_img, $src_img, 0, 0, 0, 0, $d[0],$d[1] , $d[2], $d[3])){\n\t\t\timagedestroy($src_img);\n\t\t\t//check if the new image has the same file type as the original one\n\t\t\tif($new_img && $funcs[1]($new_img,$img)){\n\t\t\t\timagedestroy($new_img);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthrow new Exception('Failed to save the new image!');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tthrow new Exception(\"Could not resample the image!\");\n\t\t}\n\t\t\n\t}", "protected function buildImage()\n\t{\n\t\t$this->buildFileName = $this->buildFileName();\n\t\t$this->buildCachedFileNamePath = $this->cachePath . '/' . $this->buildFileName;\n\t\t$this->buildCachedFileNameUrl = $this->cacheUrl . '/' . $this->buildFileName;\n\n\t\tif(!file_exists($this->buildCachedFileNamePath)) {\n\t\t\t$this->image = iImage::make($this->mediaFilePath);\n\n\t\t\t$this->image->{$this->method}($this->width, $this->height, $this->closure);\n\n\t\t\t$this->image->save($this->buildCachedFileNamePath, $this->quality);\n\t\t}\n\t}", "function getImageInfo ( $imagesize, $item_result = null )\n\t{\n\t\t$imageurl = $this->info['graphics_url'];\n\t\t$imageset = null;\n\t\tif ( null != $item_result ) {\n\t\t\tif ( is_array( $item_result['Items']['Item']['ImageSets']['ImageSet'] ) ) {\n\t\t\t\tif ( isset( $item_result['Items']['Item']['ImageSets']['ImageSet'][0] ) && is_array( $item_result['Items']['Item']['ImageSets']['ImageSet'][0] ) ) {\n\t\t\t\t\t$imageset = $item_result['Items']['Item']['ImageSets']['ImageSet'][0];\n\t\t\t\t} else {\n\t\t\t\t\t$imageset = $item_result['Items']['Item']['ImageSets']['ImageSet'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$imageset = $item_result['Items']['Item'];\n\t\t\t}\n\t\t}\n\n\t\tswitch ( strtolower( $imagesize ) )\n\t\t{\n\t\t\tcase 'medium' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['MediumImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['MediumImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['MediumImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-160.gif';\n\t\t\t\t\t$img['h'] = 160;\n\t\t\t\t\t$img['w'] = 160;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'small' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['SmallImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['SmallImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['SmallImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-75.gif';\n\t\t\t\t\t$img['h'] = 75;\n\t\t\t\t\t$img['w'] = 75;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'large' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['LargeImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['LargeImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['LargeImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-500.gif';\n\t\t\t\t\t$img['h'] = 500;\n\t\t\t\t\t$img['w'] = 500;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'swatch' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['SwatchImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['SwatchImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['SwatchImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = '';\n\t\t\t\t\t$img['h'] = 0;\n\t\t\t\t\t$img['w'] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['MediumImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['MediumImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['MediumImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-160.gif';\n\t\t\t\t\t$img['h'] = 160;\n\t\t\t\t\t$img['w'] = 160;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn ($img);\n\t}", "function resize($imagePath,$opts=null){\n\t# start configuration\n\t$cacheFolder = 'assets/StudentPhotos/'; # path to your cache folder, must be writeable by web server\n\t$remoteFolder = $cacheFolder; # path to the folder you wish to download remote images into\n\t$quality = 90; # image quality to use for ImageMagick (0 - 100)\n\t\n\t$cache_http_minutes = 20; \t# cache downloaded http images 20 minutes\n\n\t$path_to_convert = 'assets/'; # this could be something like /usr/bin/convert or /opt/local/share/bin/convert\n\t\n\t## you shouldn't need to configure anything else beyond this point\n\t$purl = parse_url($imagePath);\n\t$finfo = pathinfo($imagePath);\n\t$ext = $finfo['extension'];\n\n\t# check for remote image..\n\tif(isset($purl['scheme']) && $purl['scheme'] == 'http'):\n\t\t# grab the image, and cache it so we have something to work with..\n\t\tlist($filename) = explode('?',$finfo['basename']);\n\t\t$local_filepath = $remoteFolder.$filename;\n\t\t$download_image = true;\n\t\tif(file_exists($local_filepath)):\n\t\t\tif(filemtime($local_filepath) < strtotime('+'.$cache_http_minutes.' minutes')):\n\t\t\t\t$download_image = false;\n\t\t\tendif;\n\t\tendif;\n\t\tif($download_image == true):\n\t\t\t$img = file_get_contents($imagePath);\n\t\t\tfile_put_contents($local_filepath,$img);\n\t\tendif;\n\t\t$imagePath = $local_filepath;\n\tendif;\n\n\tif(file_exists($imagePath) == false):\n\t\t$imagePath = $_SERVER['DOCUMENT_ROOT'].$imagePath;\n\t\tif(file_exists($imagePath) == false):\n\t\t\treturn 'image not found';\n\t\tendif;\n\tendif;\n\n\tif(isset($opts['w'])): $w = $opts['w']; endif;\n\tif(isset($opts['h'])): $h = $opts['h']; endif;\n\n\t$filename = md5_file($imagePath);\n\n\tif(!empty($w) and !empty($h)):\n\t\t$newPath = $cacheFolder.$filename.'_w'.$w.'_h'.$h.(isset($opts['crop']) && $opts['crop'] == true ? \"_cp\" : \"\").(isset($opts['scale']) && $opts['scale'] == true ? \"_sc\" : \"\").'.'.$ext;\n\telseif(!empty($w)):\n\t\t$newPath = $cacheFolder.$filename.'_w'.$w.'.'.$ext;\t\n\telseif(!empty($h)):\n\t\t$newPath = $cacheFolder.$filename.'_h'.$h.'.'.$ext;\n\telse:\n\t\treturn false;\n\tendif;\n\n\t$create = true;\n\n\tif(file_exists($newPath) == true):\n\t\t$create = false;\n\t\t$origFileTime = date(\"YmdHis\",filemtime($imagePath));\n\t\t$newFileTime = date(\"YmdHis\",filemtime($newPath));\n\t\tif($newFileTime < $origFileTime):\n\t\t\t$create = true;\n\t\tendif;\n\tendif;\n\n\tif($create == true):\n\t\tif(!empty($w) and !empty($h)):\n\n\t\t\tlist($width,$height) = getimagesize($imagePath);\n\t\t\t$resize = $w;\n\t\t\n\t\t\tif($width > $height):\n\t\t\t\t$resize = $w;\n\t\t\t\tif(isset($opts['crop']) && $opts['crop'] == true):\n\t\t\t\t\t$resize = \"x\".$h;\t\t\t\t\n\t\t\t\tendif;\n\t\t\telse:\n\t\t\t\t$resize = \"x\".$h;\n\t\t\t\tif(isset($opts['crop']) && $opts['crop'] == true):\n\t\t\t\t\t$resize = $w;\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\t\tif(isset($opts['scale']) && $opts['scale'] == true):\n\t\t\t\t$cmd = $path_to_convert.\" \".$imagePath.\" -resize \".$resize.\" -quality \".$quality.\" \".$newPath;\n\t\t\telse:\n\t\t\t\t$cmd = $path_to_convert.\" \".$imagePath.\" -resize \".$resize.\" -size \".$w.\"x\".$h.\" xc:\".(isset($opts['canvas-color'])?$opts['canvas-color']:\"transparent\").\" +swap -gravity center -composite -quality \".$quality.\" \".$newPath;\n\t\t\tendif;\n\t\t\t\t\t\t\n\t\telse:\n\t\t\t$cmd = $path_to_convert.\" \".$imagePath.\" -thumbnail \".(!empty($h) ? 'x':'').$w.\"\".(isset($opts['maxOnly']) && $opts['maxOnly'] == true ? \"\\>\" : \"\").\" -quality \".$quality.\" \".$newPath;\n\t\tendif;\n\n\t\t$c = exec($cmd);\n\t\t\n\tendif;\n\n\t# return cache file path\n\treturn str_replace($_SERVER['DOCUMENT_ROOT'],'',$newPath);\n}", "function resizeImage($old_image_path, $new_image_path, $max_width, $max_height) {\r\n \r\n // Get image type\r\n $image_info = getimagesize($old_image_path);\r\n $image_type = $image_info[2];\r\n \r\n // Set up the function names\r\n switch ($image_type) {\r\n case IMAGETYPE_JPEG:\r\n $image_from_file = 'imagecreatefromjpeg';\r\n $image_to_file = 'imagejpeg';\r\n break;\r\n case IMAGETYPE_GIF:\r\n $image_from_file = 'imagecreatefromgif';\r\n $image_to_file = 'imagegif';\r\n break;\r\n case IMAGETYPE_PNG:\r\n $image_from_file = 'imagecreatefrompng';\r\n $image_to_file = 'imagepng';\r\n break;\r\n default:\r\n return;\r\n } // ends the swith\r\n \r\n // Get the old image and its height and width\r\n $old_image = $image_from_file($old_image_path);\r\n $old_width = imagesx($old_image);\r\n $old_height = imagesy($old_image);\r\n \r\n // Calculate height and width ratios\r\n $width_ratio = $old_width / $max_width;\r\n $height_ratio = $old_height / $max_height;\r\n \r\n // If image is larger than specified ratio, create the new image\r\n if ($width_ratio > 1 || $height_ratio > 1) {\r\n \r\n // Calculate height and width for the new image\r\n $ratio = max($width_ratio, $height_ratio);\r\n $new_height = round($old_height / $ratio);\r\n $new_width = round($old_width / $ratio);\r\n \r\n // Create the new image\r\n $new_image = imagecreatetruecolor($new_width, $new_height);\r\n \r\n // Set transparency according to image type\r\n if ($image_type == IMAGETYPE_GIF) {\r\n $alpha = imagecolorallocatealpha($new_image, 0, 0, 0, 127);\r\n imagecolortransparent($new_image, $alpha);\r\n }\r\n \r\n if ($image_type == IMAGETYPE_PNG || $image_type == IMAGETYPE_GIF) {\r\n imagealphablending($new_image, false);\r\n imagesavealpha($new_image, true);\r\n }\r\n \r\n // Copy old image to new image - this resizes the image\r\n $new_x = 0;\r\n $new_y = 0;\r\n $old_x = 0;\r\n $old_y = 0;\r\n imagecopyresampled($new_image, $old_image, $new_x, $new_y, $old_x, $old_y, $new_width, $new_height, $old_width, $old_height);\r\n \r\n // Write the new image to a new file\r\n $image_to_file($new_image, $new_image_path);\r\n // Free any memory associated with the new image\r\n imagedestroy($new_image);\r\n } else {\r\n // Write the old image to a new file\r\n $image_to_file($old_image, $new_image_path);\r\n }\r\n // Free any memory associated with the old image\r\n imagedestroy($old_image);\r\n }", "public function resize($resized_image_width, $save_to_file=NULL, $output_mimetype=NULL, $scale_up=FALSE, $offset=\"center\") {\n\t\t// set the resized image display size\n\t\t$this->setDisplaySize($resized_image_width, $scale_up);\n\t\t// create a resized image resource from the source image\n\t\t$resized_image = ImageLib::thumbnail(\n\t\t\t\t\t\t\t\t\t$this->source_image, \n\t\t\t\t\t\t\t\t\t$this->resized_image_width, \n\t\t\t\t\t\t\t\t\t$this->resized_image_height, \n\t\t\t\t\t\t\t\t\t$this->source_image_width, \n\t\t\t\t\t\t\t\t\t$this->source_image_height,\n\t\t\t\t\t\t\t\t\t$resized_image_width,\n\t\t\t\t\t\t\t\t\t$offset\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\tif(!is_null($save_to_file)) {\n\t\t// save the resized image to file\n\t\t\t$output_image_mimetype = $output_mimetype ? $output_mimetype : $this->source_image_mimetype;\n\t\t\tImageLib::save($resized_image, $save_to_file, $output_image_mimetype);\n\t\t}\n\t\treturn $resized_image;\n\t}", "public function autoScale($img, $size) {\n\t// NOT YET IMPLEMENTED.\n}", "function imageResize($width, $height, $target){\n //formula accordingly...this is so this script will work\n //dynamically with any size image\n\n if ($width > $height) {\n $percentage = ($target / $width);\n } else {\n $percentage = ($target / $height);\n }\n\n //gets the new value and applies the percentage, then rounds the value\n $width = round($width * $percentage);\n $height = round($height * $percentage);\n\n //returns the new sizes in html image tag format...this is so you\n //\tcan plug this function inside an image tag and just get the\n\n return \"width=\".$width.\" height=\".$height.\"\";\n\n }", "function resizeImage($fileName, $newWidth = 100 , $newHeight = 100, $cropType = 0, $outputFileName = \"\", $quality = 75){\r\n $imgCreateFun=array(1 => \"imagecreatefromgif\", 2 => \"imagecreatefromjpeg\", 3 => \"imagecreatefrompng\");\r\n $imgOutputFun=array(1 => \"imagegif\", 2 => \"imagejpeg\", 3 => \"imagepng\");\r\n \r\n if(file_exists($fileName)){\r\n $myFileInfo = getimagesize($fileName);\r\n $imgWidth = $myFileInfo[0];\r\n $imgHeight = $myFileInfo[1];\r\n \r\n $resCords = getPropSizes($imgWidth, $imgHeight, $newWidth, $newHeight, $cropType);\r\n \r\n $imgType = $myFileInfo[2];\r\n if(in_array($imgType,array_keys($imgCreateFun))){\r\n $image_p = imagecreatetruecolor($newWidth, $newHeight);\r\n $image = $imgCreateFun[$imgType]($fileName);\r\n imagecopyresampled($image_p, $image, 0, 0, $resCords[\"srcX\"], $resCords[\"srcY\"], $newWidth, $newHeight, $resCords[\"srcW\"], $resCords[\"srcH\"]); \r\n if(!file_exists($outputFileName)){\r\n if(!$outputFileName){\r\n header(\"Content-type: \".$myFileInfo[\"mime\"]);\r\n }\r\n $imgOutputFun[$imgType]($image_p, $outputFileName, $quality);\r\n imagedestroy($image_p);\r\n imagedestroy($image); \r\n }\r\n else{\r\n imagedestroy($image_p);\r\n imagedestroy($image);\r\n die(\"Cannot write output image - Filename already exists\");\r\n }\r\n \r\n }\r\n else{\r\n die(\"Image Type not supported\");\r\n }\r\n }\r\n else{\r\n die(\"Source file not found\");\r\n }\r\n}", "function _image(&$img,$data){\n global $ID;\n\n // calculate thumbnail size\n if(!$data['crop']){\n $w = (int) $this->_meta($img,'width');\n $h = (int) $this->_meta($img,'height');\n if($w && $h){\n $dim = array();\n if($w > $data['tw'] || $h > $data['th']){\n $ratio = $this->_ratio($img,$data['tw'],$data['th']);\n $w = floor($w * $ratio);\n $h = floor($h * $ratio);\n $dim = array('w'=>$w,'h'=>$h);\n }\n }else{\n $data['crop'] = true; // no size info -> always crop\n }\n }\n if($data['crop']){\n $w = $data['tw'];\n $h = $data['th'];\n $dim = array('w'=>$w,'h'=>$h);\n }\n\n //prepare img attributes\n $i = array();\n $i['width'] = $w;\n $i['height'] = $h;\n $i['border'] = 0;\n $i['alt'] = $this->_meta($img,'title');\n $i['class'] = 'tn';\n $iatt = buildAttributes($i);\n $src = ml($img['id'],$dim);\n\n // prepare lightbox dimensions\n $w_lightbox = (int) $this->_meta($img,'width');\n $h_lightbox = (int) $this->_meta($img,'height');\n $dim_lightbox = array();\n if($w_lightbox > $data['iw'] || $h_lightbox > $data['ih']){\n $ratio = $this->_ratio($img,$data['iw'],$data['ih']);\n $w_lightbox = floor($w_lightbox * $ratio);\n $h_lightbox = floor($h_lightbox * $ratio);\n $dim_lightbox = array('w'=>$w_lightbox,'h'=>$h_lightbox);\n }\n\n //prepare link attributes\n $a = array();\n $a['title'] = $this->_meta($img,'title');\n $a['data-caption'] = trim(str_replace(\"\\n\",' ',$this->_meta($img,'desc')));\n if(!$a['data-caption']) unset($a['data-caption']);\n if($data['lightbox']){\n $href = ml($img['id'],$dim_lightbox);\n $a['class'] = \"lightbox JSnocheck\";\n $a['rel'] = 'lightbox[gal-'.substr(md5($ID),4).']'; //unique ID for the gallery\n }elseif($img['detail'] && !$data['direct']){\n $href = $img['detail'];\n }else{\n $href = ml($img['id'],array('id'=>$ID),$data['direct']);\n }\n $aatt = buildAttributes($a);\n\n // prepare output\n $ret = '';\n $ret .= '<a href=\"'.$href.'\" '.$aatt.'>';\n $ret .= '<img src=\"'.$src.'\" '.$iatt.' />';\n $ret .= '</a>';\n return $ret;\n }", "public function imageUrl(Image $image, $width, $height = false, $mode = false, $format = false, $quality = false, $options = array()){\n try {\n return $this->imageUrlGenerate($image, $width, $height, $mode, $format, $quality, $options);\n }\n catch( \\Exception $e){\n return $this->container['twig.runtime.bolt_image']->thumbnail('unknown', $width, $height, 'c');\n }\n }", "public function resizeImg($imagePath, $dimensions = '120x90', $cutToFit = false, $data = array())\n\t{\n\t\t$alt = isset($data['alt']) ? $data['alt'] : null;\n\t\t$title = isset($data['title']) ? $data['title'] : null;\n\t\t$class = isset($data['class']) ? $data['class'] : null;\n $setHeight = isset($data['setHeight']) ? $data['setHeight'] : true;\n $setWidth = isset($data['setWidth']) ? $data['setWidth'] : true;\n\n\t\t$info = pathinfo($imagePath);\n\t\t//$this->tempDir = $info['dirname'].'/';\n\t\t$title = !is_null($alt) && is_null($title) ? $alt : $title;\n\t\t$alt = is_null($alt) ? basename($imagePath, '.' . $info['extension']) : $alt;\n\n\t\tlist($src, $width, $height) = $this->resizeAndSaveImage($imagePath, $dimensions, $cutToFit);\n\n $element = Html::el('img')->src($src)->alt($alt)->title($title)->class($class);\n\n if ($setHeight == true) {\n $element->height($height);\n }\n if ($setWidth == true) {\n $element->width($width);\n }\n\t\treturn $element;\n\t}", "function getImageResize($image, $width, $height = 0, $adds)\r\n {\r\n $imageinfo = getimagesize($image);\r\n if (!$imageinfo[0] and !$imageinfo[1]) {\r\n // TO DO***** copy file to server, get size, than delete...\r\n }\r\n $out['w'] = $imageinfo[0];\r\n $out['h'] = $imageinfo[1]; \r\n if ($height == 0) {\r\n $input_ratio = $imageinfo[0] / $imageinfo[1];\r\n $height = $width / $input_ratio;\r\n if ($imageinfo[0] < $width) {\r\n $width = $imageinfo[0];\r\n $height = $imageinfo[1];\r\n }\r\n }\r\n else {\r\n $input_ratio = $imageinfo[0] / $imageinfo[1];\r\n $ratio = $width / $height;\r\n if ($ratio < $input_ratio) {\r\n $height = $width / $input_ratio;\r\n }\r\n else {\r\n $width = $height * $input_ratio;\r\n }\r\n if (($imageinfo[0] < $width) && ($imageinfo[1] < $height)) {\r\n $width = $imageinfo[0];\r\n $height = $imageinfo[1];\r\n }\r\n }\r\n $attr = ' height=\"' . floor($height) . '\" width=\"' . floor($width) . '\"';\r\n return $this->imageHtmlCode($image, $adds, $attr);\r\n }", "function processImage($dir, $filename)\n{\n // Set up the variables\n $dir = $dir . '/';\n\n // Set up the image path\n $image_path = $dir . $filename;\n\n // Set up the thumbnail image path\n $image_path_tn = $dir . makeThumbnailName($filename);\n\n // Create a thumbnail image that's a maximum of 200 pixels square\n resizeImage($image_path, $image_path_tn, 200, 200);\n\n // Resize original to a maximum of 500 pixels square\n resizeImage($image_path, $image_path, 500, 500);\n}", "public static function theme_img($src, $attributes = '')\n {\n $src = URL::site_url(\n CI::$APP->config->item('theme_location') \n . CI::$APP->template->theme . '/' \n . self::$img_folder \n . $src\n );\n \n return Tag::image($src, $attributes);\n }", "public function resize_fit(IImageInformation $src, $width, $height);", "public function display_choice_image($choice_id){\n\n $image = $this->challenge_question_model->display_question_choice_image($choice_id);\n $this->output->set_header('Content-type: image/png');\n $this->output->set_output(base64_decode($image['image']));\n\n }", "function tac_acf_responsive_image( $image_id, $image_size, $max_width ) {\n\n\t// Check the image ID is not blank.\n\tif ( '' !== $image_id ) {\n\n\t\t// Set the default src image size.\n\t\t$image_src = wp_get_attachment_image_url( $image_id, $image_size );\n\n\t\t// Set the srcset with various image sizes.\n\t\t$image_srcset = wp_get_attachment_image_srcset( $image_id, $image_size );\n\n\t\t// Generate the markup for the responsive image.\n\t\techo 'src=\"' . $image_src . '\" srcset=\"' . $image_srcset . '\" sizes=\"(max-width: ' . $max_width . ') 100vw, ' . $max_width . '\"';\n\t}\n}" ]
[ "0.63067955", "0.622595", "0.61529046", "0.6054009", "0.6025174", "0.5974393", "0.5925865", "0.59153134", "0.59094566", "0.5893909", "0.58926284", "0.58719856", "0.5862669", "0.5835045", "0.5833018", "0.58267534", "0.5794286", "0.57547796", "0.5753699", "0.57504445", "0.574448", "0.5721157", "0.5719896", "0.570523", "0.5703719", "0.56968397", "0.56691563", "0.565247", "0.5623577", "0.5578766", "0.55597425", "0.55575347", "0.55531394", "0.5544964", "0.5539282", "0.5537896", "0.5533578", "0.55288804", "0.5527524", "0.55247563", "0.552101", "0.5518992", "0.5518736", "0.5512927", "0.5512922", "0.55048466", "0.54967886", "0.54804355", "0.5472184", "0.54716045", "0.5462158", "0.54607004", "0.54538566", "0.54536223", "0.54453915", "0.54426605", "0.5441743", "0.5427113", "0.54253495", "0.54213643", "0.54212034", "0.54106873", "0.54098225", "0.540753", "0.54056615", "0.54050153", "0.5402487", "0.5402135", "0.53917116", "0.53880364", "0.5387742", "0.53876686", "0.53853804", "0.5378802", "0.5365456", "0.5364105", "0.53459", "0.5344376", "0.5343223", "0.5339175", "0.5335535", "0.5331095", "0.5316082", "0.53151727", "0.53143436", "0.5313591", "0.53122973", "0.53103316", "0.5309969", "0.5308136", "0.5299737", "0.5296363", "0.5295676", "0.52920645", "0.527656", "0.5272624", "0.5270348", "0.5270096", "0.52692235", "0.5261933", "0.52587074" ]
0.0
-1
Get the breaches request.
public function getRequest(): ?BreachesRequest { return parent::getRequest(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReferringRequest() {}", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function get_request()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "public function getRequest()\n {\n return $this->get('request');\n }", "protected function obtainRequest() {\n return Request::createFromGlobals();\n }", "public function request()\n {\n return $this->request;\n }", "public function request()\n {\n return $this->request;\n }", "public function request()\r\n {\r\n return $this->request;\r\n }", "public function request()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRmaRequest() {\n if (!$this->_rmaRequest) {\n $this->_rmaRequest = Mage::registry('awrma-request');\n }\n return $this->_rmaRequest;\n }", "protected function getRequest()\n {\n return $this->req;\n }", "public function getRequest()\n {\n return $this->riak->getLastRequest();\n }", "public function getRequest()\n {\n return $this->riak->getLastRequest();\n }", "public function & GetRequest ();", "public function getRequest()\n {\n return $this->data->request;\n }", "public function getRequest()\n {\n return $this->req;\n }", "protected function getRequest() {\n\t\treturn $this->request;\n\t}", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->_request;\n }", "public function getRequest()\n {\n return $this->_request;\n }", "protected function getRequest()\n {\n return $this->request;\n }", "protected function getRequest()\n {\n return $this->request;\n }", "protected function getRequest()\n {\n return $this->request;\n }", "public function getReq()\n\t{\n\t\treturn $this->_request;\n\t}", "public function getRequest() {\n return $this->request;\n }", "protected function getRequest() {\n return $this->request;\n }", "public function getRequest() {\n return $this->_request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->request;\n }", "public function getRequest(){\n \n return $this->request;\n \n }", "public function getRequest()\n {\n return $this->get(self::_REQUEST);\n }", "public function getRequest() {\n\t\treturn $this->request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}", "protected function obtainGetRequest() {\n $request = Request::createFromGlobals();\n return $request->query;\n }", "public function getRequest(): ?AccountBalanceRequest {\n return parent::getRequest();\n }", "function getRequest() {\n\t\treturn $this->m_request;\n\t}", "public function getWebhookInfo(): Request\n {\n return $this->request('getWebhookInfo');\n }", "public function getRequest() {\n return $this->request;\n }", "function getRequest() {\n return $this->request;\n }", "public function getRequest() {\n return $this->Request;\n }", "public function getRequest()\n {\n return isset($this->request) ? $this->request : null;\n }", "public function getRequest()\r\n {\r\n return http_build_query($this->_params);\r\n }", "function getRequest() {\n\t\treturn $this->Request;\n\t}", "public function getRequest()\n\t{\n\t\treturn $this->getComponent('request');\n\t}", "function getRequest()\n {\n if ( !$this->_request )\n {\n if ( method_exists( $this, '_getRequest' ) )\n {\n $object = $this->_getRequest();\n if ( $object instanceof \\Hotlink\\Framework\\Model\\Api\\Request )\n {\n $this->setRequest( $object );\n }\n }\n if ( !$this->_request )\n {\n //$request = Mage::getModel('hotlink_framework/api_request');\n $request = $this->interactionApiRequestFactory->create();\n $this->setRequest( $request );\n }\n }\n return $this->_request;\n }", "public function getRequest()\n {\n return $this->getComponent('request');\n }", "public function getRequest()\n {\n assert(null != $this->request, 'Request must not be null');\n\n return $this->request;\n }", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest();", "public function getRequest() {}", "public function getRequest() {}", "protected function _request() {\n\t\treturn $this->_container->request;\n\t}", "public function getRequest(): Request\n {\n return $this->request;\n }", "public function getRequest(): Request\n {\n return $this->request;\n }", "public function getRequest() {\r\n\t\treturn $this->context->getState('request');\r\n\t}", "public function &request() : \\Amvisie\\Core\\HttpRequest\n {\n return $this->request;\n }", "public function getRequest()\n {\n return $this->getService('request');\n }", "public function getRequest(): string\n {\n return $this->request;\n }", "public function getRequests()\n {\n return $this->requests;\n }", "public function getRawRequest()\n {\n return $this->request;\n }", "public function getRequest() {\n return $this->client->getLastRequest();\n }", "function request()\n {\n return Request::get();\n }", "public function getRequests()\n {\n return $this->data['requests'];\n }", "public function getGetRequest(): ParameterBag { return $this->get; }", "public function getRequest(): ParameterBag\n {\n return $this->request;\n }", "public static function getRequester()\n {\n $url = URL::current();\n $urls = explode('/', $url);\n $requester = $urls[count($urls) -1];\n return $requester;\n }", "public function getMe(): Request\n {\n return $this->request('getMe');\n }", "public function getRequest()\n\t{\n\t\treturn $this->compose('Request', 'Http\\Requests');\n\t}", "public function getWorshipReq()\n {\n return $this->get(self::_WORSHIP_REQ);\n }" ]
[ "0.6688049", "0.6590395", "0.6590395", "0.6431904", "0.6431904", "0.6431904", "0.6431904", "0.63992965", "0.6397963", "0.6397963", "0.63911855", "0.6377279", "0.6375402", "0.63612074", "0.63598", "0.63598", "0.6357312", "0.63419515", "0.63117474", "0.6308457", "0.63021797", "0.63021797", "0.6285023", "0.6285023", "0.62809885", "0.62809885", "0.62809885", "0.62664986", "0.6259006", "0.62574637", "0.6246319", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.6235715", "0.623039", "0.6226496", "0.6216629", "0.62137836", "0.62137836", "0.62137836", "0.6209421", "0.62060434", "0.62057984", "0.62005323", "0.6198439", "0.6124172", "0.608252", "0.60510266", "0.604381", "0.6016343", "0.6010684", "0.60071635", "0.5997344", "0.5966566", "0.5922332", "0.5922332", "0.5922332", "0.5922332", "0.5922332", "0.5922332", "0.5922332", "0.5922332", "0.5912536", "0.5912536", "0.59021467", "0.589808", "0.589808", "0.58919364", "0.5881435", "0.58761233", "0.58692527", "0.5863723", "0.5862658", "0.5858121", "0.58360875", "0.5830738", "0.5824528", "0.58174014", "0.58102757", "0.57999754", "0.5798006", "0.577951" ]
0.7318399
0
Get the breaches response.
public function getResponse(): ?BreachesResponse { return parent::getResponse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "function get_response() {\n return $this->response;\n }", "public function get_response()\n {\n return $this->response; \n }", "public function getResponse()\n {\n return $this->get('response');\n }", "public function getResponse()\n {\n return $this->get('response');\n }", "protected function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "protected function getResponse()\n {\n return $this->response;\n }", "public function getResponse ()\n {\n return $this->response;\n }", "public function getResponse()\r\n {\r\n return $this->response;\r\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function getResponse()\n {\n return $this->response;\n }", "public function response()\r\n {\r\n return $this->response;\r\n }", "public function response()\r\n {\r\n return $this->response;\r\n }", "public function response()\n {\n return $this->response;\n }", "public function response()\n {\n return $this->response;\n }", "public function getResponse(){\n \n return $this->response;\n \n }", "public function getResponse() {\n\t\treturn $this->data->getResponse();\n\t}", "public function getResponse() {\n\t\treturn $this->response;\n\t}", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n return $this->response;\n }", "public function getResponse() {\n if($this->response) {\n $response = explode($this->responseDelimeter, $this->response);\n if(is_array($response)) {\n return $response;\n }\n else {\n return '';\n } \n }\n else {\n return '';\n }\n }", "public function getResponse()\n\t{\n\t\treturn $this->response;\n\t}", "public function response()\n\t\t{\n\t\t\treturn $this->response;\n\t\t}", "public function getResponse()\n {\n return self::$acceptedResponse;\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }", "public function getResponse()\n {\n return $this->get('Response');\n }" ]
[ "0.6645051", "0.6645051", "0.6571819", "0.6557799", "0.6464147", "0.6464147", "0.6414569", "0.6350447", "0.63103235", "0.63103235", "0.63103235", "0.6302234", "0.62934583", "0.62546796", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.6244344", "0.62335795", "0.62335795", "0.62271714", "0.62271714", "0.62205464", "0.62086743", "0.6207954", "0.620238", "0.620238", "0.620238", "0.620238", "0.62001926", "0.6195036", "0.61807394", "0.6178832", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.6140769", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447", "0.61407447" ]
0.7667638
0
function to generate a random character of the specified type ("symbol" or "number") calls the following functions: generateRandomNumber generateRandomSymbol
function generateRandomCharacter($type) { switch($type) { case 'symbol': return generateRandomSymbol(); break; case 'number': return generateRandomNumber(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateRandomSymbol() {\n $r = mt_rand(0, 3);\n switch($r) {\n case 0: $i = mt_rand(33, 47); break;\n case 1: $i = mt_rand(58, 64); break;\n case 2: $i = mt_rand(91, 96); break;\n case 3: $i = mt_rand(123, 126); break;\n }\n return chr($i);\n }", "function random_char($length = 16, $symbol = false)\n{\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n if($symbol) {\n \t$chars .= '~!@#$%^&*()-_+?{}[]<|>?,.';\n }\n return substr(str_shuffle(str_repeat($chars, ceil($length/strlen($chars)) )), 0, $length);\n}", "function generateRandomNumber() {\n return chr(mt_rand(48, 57));\n }", "function slRandomChar()\n{\n\t$char = '';\n\tfor ($i = 0; $i < 20; $i++)\n\t\t$char .= rand(0, 9);\n\treturn ($char);\n}", "function make_rand_number($length = 8){\r\n // thanks to [email protected] for this code\r\n mt_srand((double) microtime() * 1000000);\r\n for ($i=0; $i < $length; $i++) {\r\n //$which = rand(1, 3);\r\n // character will be a digit 2-9\r\n //if ( $which == 1 )\r\n $password .= mt_rand(0,9);\r\n // character will be a lowercase letter\r\n //elseif ( $which == 2 ) $password .= chr(mt_rand(65, 90));\r\n // character will be an uppercase letter\r\n //elseif ( $which == 3 ) $password .= chr(mt_rand(97, 122));\r\n }\r\n return $password;\r\n}", "public static function randomCharacter($num) {\n $seed = str_split('abcdefghijklmnopqrstuvwxyz'\n .'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n //.'0123456789!@#$%^&*()'\n ); // and any other characters\n shuffle($seed); // probably optional since array_is randomized; this may be redundant\n $rand = '';\n foreach (array_rand($seed, $num) as $k) {\n $rand .= $seed[$k];\n }\n\n return $rand;\n }", "function create_random_value($length, $type = 'mixed') {\n\tif(($type != 'mixed') && ($type != 'chars') && ($type != 'digits'))\n\t\treturn false;\n\n\t$rand_value = '';\n\twhile(strlen($rand_value) < $length) {\n\t\tif ($type == 'digits')\n\t\t\t$char = rand(0,9);\n\t\telse\n\t\t\t$char = chr(rand(0,255));\n\t\t\n\t\tif ($type == 'mixed') {\n\t\t\tif (preg_match('/^[a-z0-9]$/i', $char)) \n\t\t\t\t$rand_value .= $char;\n\t\t\t\t\n\t\t} elseif ($type == 'chars') {\n\t\t\tif (preg_match('/^[a-z]$/i', $char))\n\t\t\t\t$rand_value .= $char;\n\t\t\t\t\n\t\t} elseif ($type == 'digits') {\n\t\t\tif (preg_match('/^[0-9]$/', $char))\n\t\t\t\t$rand_value .= $char;\n\t\t}\n\t}\n\n\treturn $rand_value;\n}", "function cvf_td_generate_random_code($length=10) {\n\n $string = '';\n $characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters)-1)];\n }\n\n return $string;\n\n}", "private function genCode()\r\n\t{\r\n\t\t$digits = 10;\r\n\t\treturn rand(pow(10, $digits-1), pow(10, $digits)-1);\r\n\t}", "public static function random($type = 'alnum', $length = 16)\n {\n switch($type)\n {\n case 'basic':\n return mt_rand();\n break;\n\n default:\n case 'alnum':\n case 'numeric':\n case 'nozero':\n case 'alpha':\n case 'distinct':\n case 'hexdec':\n switch ($type)\n {\n case 'alpha':\n $pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n break;\n\n default:\n case 'alnum':\n $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n break;\n\n case 'numeric':\n $pool = '0123456789';\n break;\n\n case 'nozero':\n $pool = '123456789';\n break;\n\n case 'distinct':\n $pool = '2345679ACDEFHJKLMNPRSTUVWXYZ';\n break;\n\n case 'hexdec':\n $pool = '0123456789abcdef';\n break;\n }\n\n $str = '';\n for ($i=0; $i < $length; $i++)\n {\n $str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);\n }\n return $str;\n break;\n\n case 'unique':\n //会产生大量的重复数据\n //$str = uniqid();\n //生成的唯一标识重复量明显减少\n //$str = uniqid('',true);\n //$str = md5(uniqid(mt_rand()));\n //生成的唯一标识中没有重复\n //$str = version_compare(PHP_VERSION,'7.1.0','ge') ? md5(getmypid().session_create_id()) : md5(getmypid().uniqid(microtime(true),true));\n $str = md5(getmypid().uniqid(microtime(true),true));\n if ( $length == 32 ) \n {\n return $str;\n }\n else \n {\n return substr($str, 8, 16);\n }\n break;\n\n case 'sha1' :\n return sha1(getmypid().uniqid(mt_rand(), true));\n break;\n\n case 'uuid':\n $pool = array('8', '9', 'a', 'b');\n return sprintf('%s-%s-4%s-%s%s-%s',\n static::random('hexdec', 8),\n static::random('hexdec', 4),\n static::random('hexdec', 3),\n $pool[array_rand($pool)],\n static::random('hexdec', 3),\n static::random('hexdec', 12));\n break;\n\n case 'web':\n // 即使同一个IP,同一款浏览器,要在微妙内生成一样的随机数,也是不可能的\n // 进程ID保证了并发,微妙保证了一个进程每次生成都会不同,IP跟AGENT保证了一个网段\n $str = md5(getmypid().uniqid(md5(microtime(true)),true).$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT']);\n if ( $length == 32 ) \n {\n return $str;\n }\n else \n {\n return substr($str, 8, 16);\n }\n break;\n }\n }", "function gen_rand_string($num_chars = 8)\n{\n\t$rand_str = unique_id();\n\t$rand_str = str_replace('0', 'Z', strtoupper(base_convert($rand_str, 16, 35)));\n\n\treturn substr($rand_str, 0, $num_chars);\n}", "function cvf_td_generate_random_code($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function generateRandom($length) {\n\t$generated = '';\n\tfor ($i=0;$i<=$length;$i++) {\n\t\t$chr = '';\n\t\tswitch (mt_rand(1,3)) {\n\t\t\tcase 1:\n\t\t\t\t$chr = chr(mt_rand(48,57));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\t$chr = chr(mt_rand(65,90));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 3:\n\t\t\t$chr = chr(mt_rand(97,122));\n\t\t}\n\t $generated.=$chr;\n\t}\t\n\n return $generated;\n}", "function random_charo( $panjang ) { \n $karakter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $string = ''; \n for ( $i = 0; $i < $panjang; $i++ ) { \n $pos = rand( 0, strlen( $karakter ) - 1 ); \n $string .= $karakter{$pos}; \n } \nreturn \"OPERA\";\n}", "static function random( $len, $useSymbols = false )\n {\n $chars = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n if ($useSymbols ) {\n $chars .= \"°!#$%&/()=?¡*][{}-.,;:_\";\n } // end if use symbols\n\n $charsLen = strlen($chars);\n $charsLen--;\n\n $random = '';\n $count = 0;\n while ( $count < $len ) {\n $rand = rand(0, $charsLen);\n $random .= $chars[$rand];\n $count++;\n } // end while\n\n return $random;\n }", "function getRandChar($length){\n $str = null;\n $strPol = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz\";\n $max = strlen($strPol)-1;\n for($i=0;$i<$length;$i++){\n $str.=$strPol[rand(0,$max)];\n }\n return $str;\n}", "function random_generator($digits){\r\n\r\n\tsrand ((double) microtime() * 10000000);\r\n\r\n\t//Array of alphabets\r\n\r\n\t$input = array (\"A\", \"B\", \"C\", \"D\", \"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\r\n\r\n\t\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\", \"b\", \"c\", \"d\", \"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\r\n\r\n\t\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\");\r\n\r\n\t\r\n\r\n\t$random_generator=\"\";// Initialize the string to store random numbers\r\n\r\n\t\tfor($i=1;$i<$digits+1;$i++){ // Loop the number of times of required digits\r\n\r\n\t\t\r\n\r\n\t\t\tif(rand(1,2) == 1){// to decide the digit should be numeric or alphabet\r\n\r\n\t\t\t// Add one random alphabet \r\n\r\n\t\t\t$rand_index = array_rand($input);\r\n\r\n\t\t\t$random_generator .=$input[$rand_index]; // One char is added\r\n\r\n\t\t\t\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\r\n\r\n\t\t\t// Add one numeric digit between 1 and 10\r\n\r\n\t\t\t$random_generator .=rand(1,10); // one number is added\r\n\r\n\t\t\t} // end of if else\r\n\r\n\t\t\r\n\r\n\t\t} // end of for loop \r\n\r\n\t\r\n\r\n\treturn $random_generator;\r\n\r\n}", "public static function generateCode()\n {\n return Str::random(10);\n }", "function random_char($string)\r\n{\r\n\t$length = strlen($string);\r\n\t$position = mt_rand(0, $length - 1);\r\n\t return $string[$position];\r\n}", "function getRandomToken($length, $typeInt = false)\n{\n if ($typeInt) {\n $token = Str::substr(rand(1000000000, 9999999999), 0, $length);\n } else {\n $token = \"\";\n $codeAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $codeAlphabet .= \"abcdefghijklmnopqrstuvwxyz\";\n $codeAlphabet .= \"0123456789\";\n $max = strlen($codeAlphabet);\n\n for ($i = 0; $i < $length; $i++) {\n $token .= $codeAlphabet[random_int(0, $max - 1)];\n }\n }\n return $token;\n}", "private function get_rand_symbol(){\n if(($this->json['tiles'][array_rand($this->json['tiles'],1)])['id'] == $this->special_simbol['id']){\n $this->get_rand_symbol();\n } else {\n $this->current_symbol_transform_to = $this->json['tiles'][array_rand($this->json['tiles'],1)];\n }\n }", "function RandomString($num) {\r\r\n mt_srand((double)microtime()*1000000);\r\r\n while (strlen($pass) < $num) {\r\r\n $i = chr(mt_rand (48,57)); \r\r\n $pass = $pass.$i; \r\r\n }\r\r\n return ($pass); \r\r\n}", "function cvf_td_generate_random_code_forfund($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function random_string($type = 'basic', $len = 8, $string = '0123456789') {\n if($type=='basic') {\n return mt_rand();\n } elseif($type=='md5') {\n return md5(uniqid(mt_rand()));\n } elseif($type=='sha1') {\n return sha1(uniqid(mt_rand(), TRUE));\n } elseif($type=='diy') {\n return substr(str_shuffle(str_repeat($string, ceil($len / strlen($string)))), 0, $len);\n }\n}", "private function genRandomKey()\n {\n return strtoupper(str_random(32));\n }", "function generateCode($characters) {\n\t$possible = '23456789bcdfghjkmnpqrstvwxyz';\n\t$code = '';\n\t$i = 0;\n\twhile ($i < $characters) { \n\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t$i++;\n\t}\n\treturn $code;\n}", "function new_word($newword, $number){\n\t\n\t$symbols = '!@#$%^&*?';\n\t$newstring = \"\";\t\n\t$char = \"\";\n\t$use_numbers = isset($_POST['numbers']);\n\t$use_characters = isset($_POST['symbols']);\n\t\n\t\n\tif($use_numbers == 1 && $use_characters != 1) { // functoin for this\n\t\tforeach (range(0,$number) as $i){\n\t\t$char = rand(0,9);\n\t\t}\n\t}\n\telseif($use_numbers == 1 && $use_characters == 1) {\n\t\t$char = $symbols[rand(0, strlen($symbols)-1)] . rand(0,9);\n\t}\n\telseif($use_numbers != 1 && $use_characters == 1) {\n\t\t$char = $symbols[rand(0, strlen($symbols)-1)];\n\t}\n\telse {\n\t\t$char = \"\";\n\t}\n\t\n\t\n\tforeach (range(0,$number) as $i){\n\t\t$index = array_rand($newword);\t\n\t\t$newstring .= $newword[$index] . \"-\";\n\t\t\n\t}\n\t\n\treturn rtrim($newstring,'-') . $char;\n\t\n}", "function generateRandStr($length){\n \t\t$randstr = \"\";\n \t\tfor($i=0; $i<$length; $i++){\n \t\t$randnum = mt_rand(0,61);\n\t\t\t\tif($randnum < 10){\n \t\t$randstr .= chr($randnum+48);\n \t\t}else if($randnum < 36){\n \t\t$randstr .= chr($randnum+55);\n \t\t}else{\n \t\t$randstr .= chr($randnum+61);\n \t\t}\n \t\t}\n \t\treturn $randstr;\n \t\t}", "function generate_random_str($no_of_chars) \n{\n return substr(md5(microtime()),rand(0,26),$no_of_chars);\n}", "function generateCode($length = 10)\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "function random_string($type = 'alnum', $len = 8)\r\n\t{\r\n\t\tswitch ($type)\r\n\t\t{\r\n\t\t\tcase 'basic':\r\n\t\t\t\treturn mt_rand();\r\n\t\t\tcase 'alnum':\r\n\t\t\tcase 'numeric':\r\n\t\t\tcase 'nozero':\r\n\t\t\tcase 'alpha':\r\n\t\t\t\tswitch ($type)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 'alpha':\r\n\t\t\t\t\t\t$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'alnum':\r\n\t\t\t\t\t\t$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'numeric':\r\n\t\t\t\t\t\t$pool = '0123456789';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'nozero':\r\n\t\t\t\t\t\t$pool = '123456789';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\treturn substr(str_shuffle(str_repeat($pool, ceil($len / strlen($pool)))), 0, $len);\r\n\t\t\tcase 'unique': // todo: remove in 3.1+\r\n\t\t\tcase 'md5':\r\n\t\t\t\treturn md5(uniqid(mt_rand()));\r\n\t\t\tcase 'encrypt': // todo: remove in 3.1+\r\n\t\t\tcase 'sha1':\r\n\t\t\t\treturn sha1(uniqid(mt_rand(), TRUE));\r\n\t\t}\r\n\t}", "public function generateRandomToken():string;", "function randLetter()\n{\n // ends at 254 to eliminate the last empty character\n // and escape character number 127; the space character\n $i = 0;\n $int = 0;\n while ($int != 127 && $i < 1) {\n $int = rand(33, 254);\n $i++;\n }\n $rand_letter = chr($int);\n // Converting to utf-8 from ASCII to avoid the \"lozange-question-mark\" issue.\n return mb_convert_encoding($rand_letter, \"UTF-8\", \"ASCII\");\n}", "function random_generator($digits){\n\t\t\tsrand ((double) microtime() * 10000000);\n\t\t\t//Array of alphabets\n\t\t\t$input = array (\"A\", \"B\", \"C\", \"D\", \"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\n\t\t\t\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\");\n\t\t\t$random_generator=\"\";// Initialize the string to store random numbers\n\t\t\tfor($i=1;$i<$digits+1;$i++){ // Loop the number of times of required digits\n\t\t\tif(rand(1,2) == 1){// to decide the digit should be numeric or alphabet\n\t\t\t// Add one random alphabet \n\t\t\t$rand_index = array_rand($input);\n\t\t\t$random_generator .=$input[$rand_index]; // One char is added\n\t\t\t}else{\n\t\t\t// Add one numeric digit between 1 and 10\n\t\t\t$random_generator .=rand(1,10); // one number is added\n\t\t\t} // end of if else\n\t\t\t} // end of for loop \n\t\t\treturn $random_generator;\n\t\t\t}", "function GenerateWord()\n{\n $nb=rand(3,10);\n $w='';\n for($i=1;$i<=$nb;$i++)\n $w.=chr(rand(ord('a'),ord('z')));\n return $w;\n}", "function random() {\n $charset = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789!@#$%^&*().,/?[]{}-=';\n $random = \"\";\n for ($i = 0; $i < 10; $i++) {\n $random .= $charset[mt_rand(0, strlen($charset) - 1)];\n }\n return $random;\n}", "private function generate_code()\n\t\t{\n\t\t\t$code = \"\";\n\t\t\tfor ($i = 0; $i < 5; ++$i) \n\t\t\t{\n\t\t\t\tif (mt_rand() % 2 == 0) \n\t\t\t\t{\n\t\t\t\t\t$code .= mt_rand(0,9);\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\t$code .= chr(mt_rand(65, 90));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $code; \n\n\t\t}", "function random_generator($digits){\n\t\t\t\tsrand ((double) microtime() * 10000000);\n\t\t\t\t//Array of alphabets\n\t\t\t\t$input = array (\"A\", \"B\", \"C\", \"D\", \"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\n\t\t\t\t\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\");\n\t\t\t\t$random_generator=\"\";// Initialize the string to store random numbers\n\t\t\t\tfor($i=1;$i<$digits+1;$i++){ // Loop the number of times of required digits\n\t\t\t\tif(rand(1,2) == 1){// to decide the digit should be numeric or alphabet\n\t\t\t\t// Add one random alphabet \n\t\t\t\t$rand_index = array_rand($input);\n\t\t\t\t$random_generator .=$input[$rand_index]; // One char is added\n\t\t\t\t}else{\n\t\t\t\t// Add one numeric digit between 1 and 10\n\t\t\t\t$random_generator .=rand(1,10); // one number is added\n\t\t\t\t} // end of if else\n\t\t\t\t} // end of for loop \n\t\t\t\treturn $random_generator;\n\t\t\t\t}", "function generateRandomKey() {\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $key = '';\n\n for ($i = 0; $i < 13; $i++) {\n $key .= $characters[rand(0, strlen($characters) - 1)];\n }\n\n return $key;\n\n}", "public function getRandomPassword()\n {\n //Random rand = new Random();\n //int type, number;\n $password = \"\";\n\n for($i = 0; $i < 7; $i++)\n {\n $type = rand(0, 21) % 3;\n $number = rand(0, 25);\n\n if($type == 1)\n {\n $password = $password . chr(48 + ($number % 10));\n }\n\n else\n {\n if($type == 2)\n {\n $password = $password . chr(65 + $number);\n }\n\n else\n {\n $password = $password . chr(97 + $number);\n }\n }\n }\n\n return $password;\n }", "function generateRandStr($length){\r\n \t\t$randstr = \"\";\r\n \t\tfor($i=0; $i<$length; $i++){\r\n \t\t$randnum = mt_rand(0,61);\r\n\t\t\t\tif($randnum < 10){\r\n \t\t$randstr .= chr($randnum+48);\r\n \t\t}else if($randnum < 36){\r\n \t\t$randstr .= chr($randnum+55);\r\n \t\t}else{\r\n \t\t$randstr .= chr($randnum+61);\r\n \t\t}\r\n \t\t}\r\n \t\treturn $randstr;\r\n \t\t}", "function getToken($length) {\n \t\t $key = '';\n \t\t $keys = array_merge(range(0, 9), range('a', 'z'));\n \t\t for ($i = 0; $i < $length; $i++) {\n \t\t $key .= $keys[array_rand($keys)];\n \t\t }\n\n \t\t return $key;\n \t\t}", "protected function generateRandomToken(): string\n {\n return Str::random(32);\n }", "public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\n }", "function generateNumericOTP() {\n // all numeric digits \n $generator = \"1357902468\"; \n \n // Iterate for n-times and pick a single character \n // from generator and append it to $result \n \n // Login for generating a random character from generator \n // ---generate a random number \n // ---take modulus of same with length of generator (say i) \n // ---append the character at place (i) from generator to result \n \n $result = \"\"; \n \n for ($i = 1; $i <= 5; $i++) { \n $result .= substr($generator, (rand()%(strlen($generator))), 1); \n } \n \n // Return result \n return $result; \n}", "public function randomFunc() {\n return \"RANDOM\";\n }", "function createRandomToken(){\n\t\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0;\n\t\t\t$pass = '' ;\n\t\t\twhile ($i <= 7){\n\t\t\t\t$num = rand() % 33;\n\n\t\t\t\t\t\t\t$tmp = substr($chars, $num, 1);\n\n\t\t\t\t\t\t\t$pass = $pass . $tmp;\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $pass;\n\t\t\t\t\t\t}", "function genrateRandCharFromString ($str) {\n\n if ($str == \"\") {\n return \"\";\n } else {\n $strArray = str_split($str);\n $randomChar = '';\n $randItem = array_rand($strArray);\n $randomChar = $strArray[$randItem];\n return $randomChar;\n }\n}", "function displaySymbol($randomValue){\n //using conditions\n //$randomValue = rand(0,4);\n echo $randomValue;\n \n /*\n if($randomValue == 0){\n $symbol =\"cherry\";\n }\n else if($randomValue == 1){\n $symbol =\"grapes\";\n }\n else if($randomValue == 2){\n $symbol =\"lemon\";\n }\n else if($randomValue == 3){\n $symbol =\"orange\";\n }\n else {\n $symbol =\"seven\";\n }\n */\n \n //trhee or more if statements\n switch ($randomValue){\n case 0 :\n $symbol =\"cherry\";\n break;\n case 1 :\n $symbol =\"grapes\";\n break;\n case 2 :\n $symbol =\"lemon\";\n break;\n case 3 :\n $symbol =\"orange\";\n break;\n case 4 :\n $symbol =\"seven\";\n break;\n }\n echo \"<img src='img/$symbol.png' alt='$symbol' title='\". ucfirst($symbol) .\"' width='70' >\";\n }", "protected function random_string()\n {\n $key = '';\n $keys = array_merge( range('a','z'), range(0,9) );\n\n for($i=0; $i<10; $i++)\n {\n $key .= $keys[array_rand($keys)];\n }\n\n return $key;\n }", "function genRandomString() {\n //credits: http://bit.ly/a9rDYd\n $length = 50;\n $characters = \"0123456789abcdef\"; \n for ($p = 0; $p < $length ; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n\n return $string;\n }", "private function generateToken(): string\n {\n return Random::alphanum(self::TOKEN_LENGTH);\n }", "public static function getRandomString($iLength = 12, $sType = 'alnum') {\n\t\tif ($sType == 'alnum') {\n\t\t\t$sPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t}\n\t\telseif ($sType == 'alpha') {\n\t\t\t$sPool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t}\n\t\telseif ($sType == 'hexdec') {\n\t\t\t$sPool = '0123456789abcdef';\n\t\t}\n\t\telseif ($sType == 'numeric') {\n\t\t\t$sPool = '0123456789';\n\t\t}\n\t\telseif ($sType == 'nozero') {\n\t\t\t$sPool = '123456789';\n\t\t}\n\t\telseif ($sType == 'distinct') {\n\t\t\t$sPool = '2345679ACDEFHJKLMNPRSTUVWXYZ';\n\t\t}\n\t\telseif ($sType == 'secure') {\n\t\t\t$sPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ*#&$^!@-=';\n\t\t}\n\t\telse {\n\t\t\tthrow new \\Exception(\"Invalid type for getRandomString function.\");\n\t\t}\n\t\t// Split the pool into an array of characters.\n\t\t$arPool = str_split($sPool, 1);\n\t\t$sResult = '';\n\t\t// Select a random character from the pool and add it to the string.\n\t\tfor ($i = 0; $i < $iLength; $i ++) {\n\t\t\tif (function_exists('random_int')) {\n\t\t\t\t$sResult .= $arPool[random_int(0, count($arPool) - 1)];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sResult .= $arPool[mt_rand(0, count($arPool) - 1)];\n\t\t\t}\n\t\t}\n\t\t// Make sure alnum strings contain at least one letter and one digit.\n\t\tif ($sType === 'alnum' && $iLength > 1) {\n\t\t\t// Add a random digit.\n\t\t\tif (ctype_alpha($sResult)) {\n\t\t\t\t$sResult[mt_rand(0, $iLength - 1)] = chr(mt_rand(48, 57));\n\t\t\t}\n\t\t\t// Add a random letter.\n\t\t\telseif (ctype_digit($sResult)) {\n\t\t\t\t$sResult[mt_rand(0, $iLength - 1)] = chr(mt_rand(65, 90));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $sResult;\n\t}", "function randomname($number) {\n\t\t$charcators = \"1234456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM\";\n\t\t$str = \"\";\n\t\tfor($i = 0 ; $i < $number ; $i++) {\n\t\t\t$random = rand(0 , strlen($charcators) - 1);\n\t\t\t$str .= $charcators[$random];\n\t\t}\n\t\treturn $str;\n\n\t}", "function random_string($length,$char_set) {\n\t//parameter of generate_password func\n\t$temp = '';\n\tfor($i=0; $i < $length ; $i++)\n\t{\n\t\t$temp .= random_char($char_set);\n\t}\n\treturn $temp;\n}", "protected static function generateToken(): string\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyz';\n $token = 'V_'; // methods can't start with numbers\n\n for ($i = 0; $i < 12; $i++) {\n $index = rand(0, strlen($characters) - 1);\n $token .= $characters[$index];\n }\n\n return $token;\n }", "function cvf_td_generate_random_code_foreditbuis($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function tck_rnd_string( $str, $length, $type, $charlist ) {\n if ( $type == 0 ) {\n if ( strpos($str, tck_get_prefix(0)) !== false || strpos($str, tck_get_prefix(1)) !== false ) {\n $charlist = str_replace(tck_get_prefix(0), '', $charlist);\n $charlist = str_replace(tck_get_prefix(1), '', $charlist);\n $str = substr(str_shuffle($charlist), 0, $length);\n }\n }\n \n return $str;\n }", "function str_generate($length, $chars)\n {\n return substr(str_shuffle(str_repeat($chars, $length)), 0, $length);\n }", "function random_num($size) {\n\t$alpha_key = '';\n\t$keys = range('A', 'Z');\n\n\tfor ($i = 0; $i < 2; $i++) {\n\t\t$alpha_key .= $keys[array_rand($keys)];\n\t}\n\n\t$length = $size - 2;\n\n\t$key = '';\n\t$keys = range(0, 9);\n\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$key .= $keys[array_rand($keys)];\n\t}\n\n\treturn $alpha_key . $key;\n}", "function generate_string($strength = 16) {\n $input = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $input_length = strlen($input);\n $random_string = '';\n for($i = 0; $i < $strength; $i++) {\n $random_character = $input[mt_rand(0, $input_length - 1)];\n $random_string .= $random_character;\n }\n \n return $random_string;\n}", "public function generate_code()\n {\n $code = \"\";\n $count = 0;\n while ($count < $this->num_characters) {\n $code .= substr($this->captcha_characters, mt_rand(0, strlen($this->captcha_characters)-1), 1);\n $count++;\n }\n return $code;\n }", "public function generateRandom(int $length = 16): string {\n $letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $allChars = \"0123456789-$letters\";\n $first = Strings::randomize($letters, 1);\n $value = $first . Strings::randomize($allChars, $length - 1);\n while (!$this->store($value)) {\n $value = $first . Strings::randomize($allChars, $length - 1);\n }\n return $value;\n }", "function RandomString(){\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randstring = '';\n for ($i = 0; $i < 10; $i++) {\n $randstring .= $characters[rand(0, strlen($characters))];\n }\n return $randstring;\n}", "function randLetter(){\n \t\t$alphabets = array_merge(range('A','Z'));\n \t\t$chars = '';\n \t\tfor($i = 0; $i<2; $i++){\n \t\t\t$rand = rand(0,10);\n \t\t\t$chars .= $alphabets[$rand];\n \t\t}\n \t\treturn strtoupper($chars);\n\t}", "public function generateNumericOTP($n) {\r\n // all numeric digits \r\n $generator = \"1357902468\"; \r\n \r\n // Iterate for n-times and pick a single character \r\n // from generator and append it to $result \r\n \r\n // Login for generating a random character from generator \r\n // ---generate a random number \r\n // ---take modulus of same with length of generator (say i) \r\n // ---append the character at place (i) from generator to result \r\n \r\n $result = \"\"; \r\n \r\n for ($i = 1; $i <= $n; $i++) { \r\n $result .= substr($generator, (rand()%(strlen($generator))), 1); \r\n } \r\n \r\n // Return result \r\n return $result; \r\n}", "function random_key($length) {\r\n\t$o = \"\";\r\n\tfor ($i=0;$i<$length;$i++) {\r\n\t\t$r = mt_rand(0,51);\r\n\t\t$o .= char_at_position($r);\r\n\t}\r\n\treturn $o;\r\n}", "abstract public function generate() : string;", "function generate_random_string($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++) :\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n endfor;\n\n return $randomString;\n}", "function random() {\n echo StringHelper::random(48);\n echo \"<br />\";\n echo StringHelper::random(16);\n echo \"<br />\";\n echo CryptHelper::generateKey(24);\n echo \"<br />\";\n echo CryptHelper::generateKey(8);\n }", "function generateCode($length=6){\r\n $chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789\";\r\n $code = \"\";\r\n $clen = strlen($chars) - 1; \r\n while (strlen($code) < $length) {\r\n $code .= $chars[mt_rand(0,$clen)]; \r\n }\r\n return $code;\r\n}", "function generateRandomString($length) {\n //$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "function getRandomString($lenght = 5, $smallLetters = true, $bigLetters = true, $numbers = true)\n{\n $material = array();\n if(true === $smallLetters) {\n $material = array_merge($material, range('a', 'z'));\n }\n if(true === $bigLetters) {\n $material = array_merge($material, range('A', 'Z'));\n } \n if(true === $numbers) {\n $material = array_merge($material, range('0', '9'));\n } \n $randomString = ''; \n for ($i = 0; $i < $lenght; $i++) { \n $randomString .= $material[mt_rand(0, count($material)-1)]; \n } \n return $randomString; \n}", "function gener_random($length){\r\n\r\n\tsrand((double)microtime()*1000000 );\r\n\t\r\n\t$random_id = \"\";\r\n\t\r\n\t$char_list = \"abcdefghijklmnopqrstuvwxyz\";\r\n\t\r\n\tfor($i = 0; $i < $length; $i++) {\r\n\t\t$random_id .= substr($char_list,(rand()%(strlen($char_list))), 1);\r\n\t}\r\n\t\r\n\treturn $random_id;\r\n}", "function GenerateWord() {\n $nb = rand(3, 10);\n $w = '';\n for ($i = 1; $i <= $nb; $i++)\n $w .= chr(rand(ord('a'), ord('z')));\n return $w;\n }", "function sloodle_random_security_token()\n {\n // Define the characters we can use in our token, and get the length of it\n $str = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $strlen = strlen($str) - 1;\n // Prepare the token variable\n $token = '';\n // Loop once for each output character\n for($length = 0; $length < 16; $length++) {\n // Shuffle the string, then pick and store a random character\n $str = str_shuffle($str);\n $char = mt_rand(0, $strlen);\n $token .= $str[$char];\n }\n \n return $token;\n }", "public function generateToken(): string\n {\n $token = bin2hex(random_bytes(16));\n $this->setTokens($this->limitTokens(\n array_merge($this->getTokens(), [$token])\n ));\n return $token;\n }", "function generateToken($length){\r\n $token = \"\";\r\n $possible = \"0123456789bcdfghjkmnpqrstvwxyz\";\r\n $i = 0;\r\n while ($i < $length) {\r\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n if (!strstr($token, $char)) {\r\n $token .= $char;\r\n $i++;\r\n }\r\n }\r\n return $token;\r\n }", "function random($characters = 1,$numbers = null) {\n\t\tif($numbers == null) {\n\t\t\t$chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\t\t} elseif($numbers){\n\t\t\t$chars = '0123456789';\n\t\t} else {\n\t\t\t$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\t\t}\n\t\t$chars = ($numbers)? '0123456789' : '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\t\t$count = strlen($chars);\n\t\t$bytes = random_bytes((int) $characters);\n\t\t$random = '';\n\t\tforeach (str_split($bytes) as $byte) {\n\t\t\t\t$random .= $chars[ord($byte) % $count];\n\t\t}\n\t\treturn $random;\n\t}", "function genrateReportCode() {\n $chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ023456789\";\n srand((double) microtime() * 1000000);\n $i = 0;\n $pass = '';\n\n while ($i <= 7) {\n $num = rand() % 33;\n $tmp = substr($chars, $num, 1);\n $pass = $pass . $tmp;\n $i++;\n }\n return $pass;\n}", "function generateRandomString($length) {\n$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-+=_';\n//$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n//$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; //Random letters only.\n//$characters = 'abcdefghijklmnopqrstuvwxyz'; //Random lowercase letters only.\n//$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; //Random uppercase letters only.\n//$characters = '0123456789'; //Random numbers only.\n$charactersLength = strlen($characters);\n$randomString = '';\nfor ($i = 0; $i < $length; $i++) {\n$randomString .= $characters[rand(0, $charactersLength - 1)];\n}\nreturn $randomString;\n}", "public function generateRandomAlphanumeric($str,GeneratorInterface $random, LocaleInterface $locale)\n {\n $letters = $locale->getLetters();\n $consonants = $locale->getConsonants();\n $vowels = $locale->getVowels();\n $hex = $locale->getHex();\n \n // loop through each character and convert all unescaped X's to 1-9 and\n // unescaped x's to 0-9.\n $new_str = SimpleString::create(\"\");\n $str = SimpleString::create($str); \n for ($i = 0; $i < $str->length(); $i++) {\n \n switch ($str->charAt($i)) {\n // Numbers\n case \"X\":\n $new_str->append(round($random->generate(1, 9)));\n break;\n case \"x\":\n $new_str->append(round($random->generate(0, 9)));\n break;\n \n // Hex\n case \"H\":\n $new_str->append($hex->charAt(round($random->generate(0, $hex->length()) - 1)));\n break;\n \n // Letters\n case \"L\":\n $new_str->append($letters->charAt(round($random->generate(0, $letters->length()) - 1)));\n break;\n case \"l\":\n $new_str->append(\\mb_strtolower($letters->charAt(round($random->generate(0, $letters->length()) - 1))));\n break;\n case \"D\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($letters->charAt(round($random->generate(0, $letters->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower($letters->charAt(round($random->generate(0, $letters->length()) - 1))));\n break;\n\n // Consonants\n case \"C\":\n $new_str->append($consonants->charAt(round($random->generate(0, $consonants->length()) - 1)));\n break;\n case \"c\":\n $new_str->append(\\mb_strtolower($consonants->charAt(round($random->generate(0,$consonants->length()) - 1))));\n break;\n case \"E\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($consonants->charAt(round($random->generate(0, $consonants->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower($consonants->charAt(round($random->generate(0, $consonants->length()) - 1))));\n break;\n\n // Vowels\n case \"V\":\n $new_str->append($vowels->charAt(round($random->generate(0,$vowels->length()) - 1)));\n break;\n case \"v\":\n $new_str->append(\\mb_strtolower($vowels->charAt(round($random->generate(0,$vowels->length()) - 1))));\n break;\n case \"F\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($vowels->charAt(round($random->generate(0,$vowels->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower( $vowels->charAt(round($random->generate(0,$vowels->length()) - 1))));\n break;\n \n //space char\n case \"S\":\n case \"s\":\n $new_str->append(\" \");\n break; \n default:\n $new_str->append($str->charAt($i));\n break;\n }\n }\n\n return (string) $new_str;\n }", "function generateRandomString($n) { \n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $randomString = ''; \n\n for ($i = 0; $i < $n; $i++) { \n $index = rand(0, strlen($characters) - 1); \n $randomString .= $characters[$index]; \n } \n\n return $randomString; \n}", "function generateNumericOTP($n) {\n // all numeric digits \n $generator = \"1357902468\"; \n \n // Iterate for n-times and pick a single character \n // from generator and append it to $result \n \n // Login for generating a random character from generator \n // ---generate a random number \n // ---take modulus of same with length of generator (say i) \n // ---append the character at place (i) from generator to result \n \n $result = \"\"; \n \n for ($i = 1; $i <= $n; $i++) { \n $result .= substr($generator, (rand()%(strlen($generator))), 1); \n } \n \n // Return result \n return $result; \n }", "public function generateString($length, $has_lower, $has_upper, $has_number, $has_special_character){\n $lower = 'abcdefghijklmnopqrstuvwxyz';\n $upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $number = '0123456789';\n $special = '~!@#$%^&*()_+-';\n $characters = '';\n if ($has_lower) {\n $characters .= $lower;\n }\n if ($has_upper) {\n $characters .= $upper;\n }\n if ($has_number) {\n $characters .= $number;\n }\n if ($has_special_character) {\n $characters .= $special;\n }\n if (!$characters) {\n $characters = $number . $lower . $upper . $special;\n }\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "public function generate_token($method = 1) \n {\n $token = '';\n if($method == 2) {\n $token = mt_rand(100000, 999999);\n\n } else {\n $token = str_random(10);\n }\n return $token;\n }", "function randomCode($length = 5){\n\t$characters = '0123456789';\n\t$charactersLength = strlen($characters);\n\t$randomString = '';\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\n\t}\n\treturn $randomString;\n}", "function genRandomMasterCode(){\n\t\t$characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";\n\t\t$string=\"\";\n\t\tfor($p=0;$p<17;$p++){\n\t\t\t$string.=$characters[mt_rand(0, strlen($characters))];\n\t\t}\n\t\treturn $string;\n\t}", "private function generate()\n {\n $output = '';\n $length = strlen($this->str);\n\n\n for ($i = 1; $i < 5; $i++) {\n // get random char\n $char = $this->str[rand(0, $length - 1)];\n $output .= $char;\n\n // get font size\n $fontSize = ($this->level > 1) ? rand(20, 48) : 28;\n imagettftext($this->imageResource, $fontSize, rand(-35, 35), 35 * $i, 55, imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)), $this->font, $char);\n }\n\n $this->code = ($this->caseSensitive) ? $output : strtolower($output);\n }", "function generateNumericOTP($n) { \n \n // Take a generator string which consist of \n // all numeric digits \n $generator = \"1357902468\"; \n \n // Iterate for n-times and pick a single character \n // from generator and append it to $result \n \n // Login for generating a random character from generator \n // ---generate a random number \n // ---take modulus of same with length of generator (say i) \n // ---append the character at place (i) from generator to result \n \n $result = \"\"; \n \n for ($i = 1; $i <= $n; $i++) { \n $result .= substr($generator, (rand()%(strlen($generator))), 1); \n } \n \n // Return result \n return $result; \n\t}", "function random_string($length) {\n $key = '';\n $keys = array_merge(range(0, 9), range('a', 'z'));\n\n for ($i = 0; $i < $length; $i++) {\n $key .= $keys[array_rand($keys)];\n }\n\n return $key;\n}", "function genRandomString($length) {\n $characters = '0123456789';\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n return $string;\n}", "private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}", "function generatePassword() {\n //Initialize the random password\n $password = '';\n\n //Initialize a random desired length\n $desired_length = rand(8, 12);\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for ($length = 0; $length < $desired_length; $length++) {\n //Append a random ASCII character (including symbols)\n $password .= $characters[mt_rand(0, strlen($characters) - 1)];\n }\n\n return $password;\n }", "public static function token($length = 32, $max = FALSE) {\n\t\tif (is_int ( $max ) && $max > $length) {\n\t\t\t$length = mt_rand ( $length, $max );\n\t\t}\n\t\t$output = '';\n\t\t\n\t\tfor($i = 0; $i < $length; $i ++) {\n\t\t\t$which = mt_rand ( 0, 2 );\n\t\t\t\n\t\t\tif ($which === 0) {\n\t\t\t\t$output .= mt_rand ( 0, 9 );\n\t\t\t} elseif ($which === 1) {\n\t\t\t\t$output .= chr ( mt_rand ( 65, 90 ) );\n\t\t\t} else {\n\t\t\t\t$output .= chr ( mt_rand ( 97, 122 ) );\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "function generateRandomString($length = 8) {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\r\n }\r\n return $randomString;\r\n}", "public function generate_token($length = 8) {\n $characters = '23456789BbCcDdFfGgHhJjKkMmNnPpQqRrSsTtVvWwXxYyZz';\n $count = mb_strlen($characters);\n\n for ($i = 0, $token = ''; $i < $length; $i++)\n {\n $index = rand(0, $count - 1);\n $token .= mb_substr($characters, $index, 1);\n }\n return $token;\n }", "protected static function _generate( $length=20, $chars=array() )\n {\n $final = array();\n $total = $length;\n shuffle( $chars );\n\n while( $length-- )\n {\n if( count( $final ) >= $total ) break;\n $final[] = $chars[ array_rand( $chars ) ];\n }\n shuffle( $final );\n return implode( \"\", $final );\n }", "function randomString($chars=10) { //generate random string\n\t$characters = '0123456789abcdef';\n\t$randstring = '';\n\tfor ($i = 0; $i < $chars; $i++) { $randstring .= $characters[rand(0, strlen($characters) -1)]; }\n\treturn $randstring;\n}", "function generateCode($length = 5, $add_dashes = false, $available_sets = 'ud')\n{\n\t$sets = array();\n\tif(strpos($available_sets, 'l') !== false)\n\t\t$sets[] = 'abcdefghjkmnpqrstuvwxyz';\n\tif(strpos($available_sets, 'u') !== false)\n\t\t$sets[] = 'ABCDEFGHJKMNPQRSTUVWXYZ';\n\tif(strpos($available_sets, 'd') !== false)\n\t\t$sets[] = '23456789';\n\tif(strpos($available_sets, 's') !== false)\n\t\t$sets[] = '!@#$%&*?';\n\t$all = '';\n\t$password = '';\n\tforeach($sets as $set)\n\t{\n\t\t$password .= $set[array_rand(str_split($set))];\n\t\t$all .= $set;\n\t}\n\t$all = str_split($all);\n\tfor($i = 0; $i < $length - count($sets); $i++)\n\t\t$password .= $all[array_rand($all)];\n\t$password = str_shuffle($password);\n\tif(!$add_dashes)\n\t\treturn $password;\n\t$dash_len = floor(sqrt($length));\n\t$dash_str = '';\n\twhile(strlen($password) > $dash_len)\n\t{\n\t\t$dash_str .= substr($password, 0, $dash_len) . '-';\n\t\t$password = substr($password, $dash_len);\n\t}\n\t$dash_str .= $password;\n\treturn $dash_str;\n}" ]
[ "0.82840157", "0.7588584", "0.7123843", "0.69153625", "0.6724275", "0.66869706", "0.66380626", "0.66359055", "0.6625801", "0.6625514", "0.6595244", "0.6593437", "0.65721387", "0.65529925", "0.65500575", "0.6503184", "0.6496332", "0.6486056", "0.6480896", "0.64700735", "0.6460324", "0.64394087", "0.64313114", "0.64037174", "0.63902366", "0.6373694", "0.63640344", "0.6352486", "0.6327255", "0.6326497", "0.63144964", "0.63061285", "0.63056797", "0.6293366", "0.629143", "0.6286908", "0.62820476", "0.62785375", "0.6268052", "0.62668985", "0.6266031", "0.6261553", "0.6252233", "0.62419504", "0.62356347", "0.62333715", "0.62313646", "0.62215257", "0.62140393", "0.62005097", "0.619799", "0.61949885", "0.6190874", "0.6187825", "0.6181751", "0.61808306", "0.61657804", "0.6165437", "0.6163994", "0.61592907", "0.6158353", "0.61564445", "0.61542714", "0.61530966", "0.61426604", "0.61415905", "0.61385995", "0.6125876", "0.6123805", "0.60951847", "0.60942763", "0.60898286", "0.60894275", "0.60828936", "0.60724807", "0.6071478", "0.606912", "0.6068099", "0.6064026", "0.6061628", "0.60611445", "0.6055533", "0.6054261", "0.6048003", "0.60478747", "0.60452837", "0.60448813", "0.60317695", "0.6023174", "0.60211915", "0.6017226", "0.6009403", "0.60071784", "0.6005517", "0.6005432", "0.6003728", "0.60024554", "0.5998486", "0.59974295", "0.5996373" ]
0.87992066
0
function to generate a random number based on ASCII code
function generateRandomNumber() { return chr(mt_rand(48, 57)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function genCode()\r\n\t{\r\n\t\t$digits = 10;\r\n\t\treturn rand(pow(10, $digits-1), pow(10, $digits)-1);\r\n\t}", "function generateRandomSymbol() {\n $r = mt_rand(0, 3);\n switch($r) {\n case 0: $i = mt_rand(33, 47); break;\n case 1: $i = mt_rand(58, 64); break;\n case 2: $i = mt_rand(91, 96); break;\n case 3: $i = mt_rand(123, 126); break;\n }\n return chr($i);\n }", "public function createRandInt(){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n return $new;\n\n }", "private function generate_code()\n\t\t{\n\t\t\t$code = \"\";\n\t\t\tfor ($i = 0; $i < 5; ++$i) \n\t\t\t{\n\t\t\t\tif (mt_rand() % 2 == 0) \n\t\t\t\t{\n\t\t\t\t\t$code .= mt_rand(0,9);\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\t$code .= chr(mt_rand(65, 90));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $code; \n\n\t\t}", "public static function generateCode()\n {\n return Str::random(10);\n }", "public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\n }", "private function generate_code(){\n $bytes = random_bytes(2);\n // var_dump(bin2hex($bytes));\n return bin2hex($bytes);\n }", "public function generate_code()\n {\n $code = \"\";\n $count = 0;\n while ($count < $this->num_characters) {\n $code .= substr($this->captcha_characters, mt_rand(0, strlen($this->captcha_characters)-1), 1);\n $count++;\n }\n return $code;\n }", "private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}", "function slRandomChar()\n{\n\t$char = '';\n\tfor ($i = 0; $i < 20; $i++)\n\t\t$char .= rand(0, 9);\n\treturn ($char);\n}", "function cvf_td_generate_random_code($length=10) {\n\n $string = '';\n $characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters)-1)];\n }\n\n return $string;\n\n}", "function RandomString($num) {\r\r\n mt_srand((double)microtime()*1000000);\r\r\n while (strlen($pass) < $num) {\r\r\n $i = chr(mt_rand (48,57)); \r\r\n $pass = $pass.$i; \r\r\n }\r\r\n return ($pass); \r\r\n}", "function generateRandomCharacter($type) {\n switch($type) {\n case 'symbol': return generateRandomSymbol(); break;\n case 'number': return generateRandomNumber(); break;\n }\n }", "protected function generateCode(): string {\n return (string)rand(100000, 999999);\n }", "function randLetter()\n{\n // ends at 254 to eliminate the last empty character\n // and escape character number 127; the space character\n $i = 0;\n $int = 0;\n while ($int != 127 && $i < 1) {\n $int = rand(33, 254);\n $i++;\n }\n $rand_letter = chr($int);\n // Converting to utf-8 from ASCII to avoid the \"lozange-question-mark\" issue.\n return mb_convert_encoding($rand_letter, \"UTF-8\", \"ASCII\");\n}", "function genRandomMasterCode(){\n\t\t$characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";\n\t\t$string=\"\";\n\t\tfor($p=0;$p<17;$p++){\n\t\t\t$string.=$characters[mt_rand(0, strlen($characters))];\n\t\t}\n\t\treturn $string;\n\t}", "function make_rand_number($length = 8){\r\n // thanks to [email protected] for this code\r\n mt_srand((double) microtime() * 1000000);\r\n for ($i=0; $i < $length; $i++) {\r\n //$which = rand(1, 3);\r\n // character will be a digit 2-9\r\n //if ( $which == 1 )\r\n $password .= mt_rand(0,9);\r\n // character will be a lowercase letter\r\n //elseif ( $which == 2 ) $password .= chr(mt_rand(65, 90));\r\n // character will be an uppercase letter\r\n //elseif ( $which == 3 ) $password .= chr(mt_rand(97, 122));\r\n }\r\n return $password;\r\n}", "function cvf_td_generate_random_code($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function generateCode($characters) {\n\t$possible = '23456789bcdfghjkmnpqrstvwxyz';\n\t$code = '';\n\t$i = 0;\n\twhile ($i < $characters) { \n\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t$i++;\n\t}\n\treturn $code;\n}", "function gen_rand_string($num_chars = 8)\n{\n\t$rand_str = unique_id();\n\t$rand_str = str_replace('0', 'Z', strtoupper(base_convert($rand_str, 16, 35)));\n\n\treturn substr($rand_str, 0, $num_chars);\n}", "public static function randomCharacter($num) {\n $seed = str_split('abcdefghijklmnopqrstuvwxyz'\n .'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n //.'0123456789!@#$%^&*()'\n ); // and any other characters\n shuffle($seed); // probably optional since array_is randomized; this may be redundant\n $rand = '';\n foreach (array_rand($seed, $num) as $k) {\n $rand .= $seed[$k];\n }\n\n return $rand;\n }", "function generate_code( $digits_needed=8 ){\n\t$random_number=''; // set up a blank string\n\t$count=0;\n\twhile ( $count < $digits_needed ) {\n\t\t$random_digit = mt_rand(0, 9);\n\t\t$random_number .= $random_digit;\n\t\t$count++;\n\t}\n\treturn $random_number;\n}", "public function generateRandomNum($str,GeneratorInterface $random)\n {\n // loop through each character and convert all unescaped X's to 1-9 and\n // unescaped x's to 0-9.\n $new_str = SimpleString::create(\"\");\n $str = SimpleString::create($str);\n $iterator = new StringIterator($str);\n \n foreach ($iterator as $index => $char) {\n \n # check if character is escaped\n if ($char == '\\\\' && ($iterator->peek() == \"X\" || $iterator->peek() == \"x\")) {\n $iterator->next();\n continue;\n } else if ($char === \"X\") {\n $new_str->append((string) round($random->generate(1, 9)));\n } else if ($char === \"x\") {\n $new_str->append((string) round($random->generate(0, 9)));\n } else {\n $new_str->append((string) $char);\n } \n }\n \n # trim remove white space\n $new_str->trim();\n \n return (string) $new_str;\n }", "function genrateReportCode() {\n $chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ023456789\";\n srand((double) microtime() * 1000000);\n $i = 0;\n $pass = '';\n\n while ($i <= 7) {\n $num = rand() % 33;\n $tmp = substr($chars, $num, 1);\n $pass = $pass . $tmp;\n $i++;\n }\n return $pass;\n}", "public function autoCode(){\n $length=8;\n $randstr = \"\";\n srand((double)microtime() * 1000000);\n //our array add all letters and numbers if you wish\n $chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\n for ($rand = 1; $rand <= $length; $rand++) {\n $random = rand(0, count($chars) - 1);\n $randstr .= $chars[$random];\n }\n return ($randstr.'/'.date('y'));\n }", "function CriaCodigo() { //Gera numero aleatorio\r\n for ($i = 0; $i < 40; $i++) {\r\n $tempid = strtoupper(uniqid(rand(), true));\r\n $finalid = substr($tempid, -12);\r\n return $finalid;\r\n }\r\n }", "function generateRandomPostcode() {\n return sprintf(\"%06d\", rand(0, 999999));\n}", "private function genRandomKey()\n {\n return strtoupper(str_random(32));\n }", "public static function generateCode() {\n $long_code = strtr(md5(uniqid(rand())), '0123456789abcdefghij', '234679QWERTYUPADFGHX');\n return substr($long_code, 0, 12);\n }", "function generateCode($length = 10)\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "private static function generateUniqueCode()\n {\n do {\n $code = str_random(7);\n } while (static::checkCode($code));\n\n return $code;\n }", "function randomCode($length = 5){\n\t$characters = '0123456789';\n\t$charactersLength = strlen($characters);\n\t$randomString = '';\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\n\t}\n\treturn $randomString;\n}", "function getmixedno($totalchar)\n{\n\t$abc= array(\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\");\n\t$mixedno = \"\";\n\tfor($i=1; $i<=$totalchar; $i++)\n\t{\n\t\t$mixedno .= $abc[rand(0,33)];\n\t}\n\treturn $mixedno;\n}", "private function randHex()\n\t{\n\t\treturn dechex(floor(rand(100,65536)));\n\t}", "function generateCode(){\n $base=\"abcdefghijklmnopkrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-\";\n $i=0;\n $c=\"\";\n while ($i<6){\n $c.=$base[rand(0,strlen($base)-1)];\n $i++;\n }\n if (validate::existCode($c))\n return generateCode();\n return $c;\n}", "function generateCode($length=6){\r\n $chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789\";\r\n $code = \"\";\r\n $clen = strlen($chars) - 1; \r\n while (strlen($code) < $length) {\r\n $code .= $chars[mt_rand(0,$clen)]; \r\n }\r\n return $code;\r\n}", "function generate_mobile_code()\n{\n $chars = \"0123456789\";\n srand((double)microtime()*1000000);\n $code = \"\";\n for ($i = 0; $i < 6; $i++)\n {\n $num = rand() % 10;\n $tmp = substr($chars, $num, 1);\n $code = $code . $tmp;\n }\n return $code;\n}", "function generate_otp_code(){\n return rand(1000,9999);\n}", "public static function create_ucode(){\n\t\treturn Str::upper(Str::random(7));\n\t}", "function random_num($size) {\n\t$alpha_key = '';\n\t$keys = range('A', 'Z');\n\n\tfor ($i = 0; $i < 2; $i++) {\n\t\t$alpha_key .= $keys[array_rand($keys)];\n\t}\n\n\t$length = $size - 2;\n\n\t$key = '';\n\t$keys = range(0, 9);\n\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$key .= $keys[array_rand($keys)];\n\t}\n\n\treturn $alpha_key . $key;\n}", "function random_charo( $panjang ) { \n $karakter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $string = ''; \n for ( $i = 0; $i < $panjang; $i++ ) { \n $pos = rand( 0, strlen( $karakter ) - 1 ); \n $string .= $karakter{$pos}; \n } \nreturn \"OPERA\";\n}", "function r(){\n\t\t\n\t\t$chars = '0123456789';\n\t\t$s = substr(str_shuffle(str_repeat($chars, 5)), 0, 5);\n\t\treturn $s;\t\t\t\n\t\t}", "function randomcode ($len=\"10\"){\n\t\t\t\tglobal $pass;\n\t\t\t\tglobal $lchar;\n\t\t\t\t$code = NULL;\n\t\t\n\t\t\t\tfor ($i=0;$i<$len;$i++){\n\t\t\t\t\t$char = chr(rand(48,122));\n\t\t\t\t\twhile(!ereg(\"[a-zA-Z0-9]\", $char)){\n\t\t\t\t\t\tif($char == $lchar) { continue; }\n\t\t\t\t\t\t\t$char = chr(rand(48,90));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pass .= $char;\n\t\t\t\t\t\t$lchar = $char;\n\t\t\t\t\t}\n\t\t\t\treturn $pass;\n\t\t\t}", "function generateCode($length) { \n\t\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789\"; \n\t\t$code = \"\"; \n\t\t$clen = strlen($chars) - 1; \n\t\twhile (strlen($code) < $length) { \n\t\t\t$code .= $chars[mt_rand(0,$clen)]; \n\t\t} \n\t\treturn $code; \n\t}", "public function generateNumericOTP($n) {\r\n // all numeric digits \r\n $generator = \"1357902468\"; \r\n \r\n // Iterate for n-times and pick a single character \r\n // from generator and append it to $result \r\n \r\n // Login for generating a random character from generator \r\n // ---generate a random number \r\n // ---take modulus of same with length of generator (say i) \r\n // ---append the character at place (i) from generator to result \r\n \r\n $result = \"\"; \r\n \r\n for ($i = 1; $i <= $n; $i++) { \r\n $result .= substr($generator, (rand()%(strlen($generator))), 1); \r\n } \r\n \r\n // Return result \r\n return $result; \r\n}", "function rand_string_gen ($n) {\n\t $output_string = '';\n\t $ascii = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t for ($i = 0; $i < $n; $i++) {\n\t $output_string .= $ascii[rand(0, strlen($ascii) - 1)];\n\t }\n\t return $output_string;\n \t}", "protected function random_string()\n {\n $key = '';\n $keys = array_merge( range('a','z'), range(0,9) );\n\n for($i=0; $i<10; $i++)\n {\n $key .= $keys[array_rand($keys)];\n }\n\n return $key;\n }", "public function gen_random_string(){\n\t\t$chars =\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$final_rand='';\t\t\n\t\tfor($i=0;$i<4; $i++) {\t\t \n\t\t$final_rand .= $chars[ rand(0,strlen($chars)-1)];\n\t\t}\t\t\n\t\treturn $final_rand;\t\n\t}", "function genrateRandCharFromString ($str) {\n\n if ($str == \"\") {\n return \"\";\n } else {\n $strArray = str_split($str);\n $randomChar = '';\n $randItem = array_rand($strArray);\n $randomChar = $strArray[$randItem];\n return $randomChar;\n }\n}", "public function make_activation_code(){\n\t\t$alphanum = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t\t return substr(str_shuffle($alphanum), 0, 7);\n\t}", "function generateRandomKey() {\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $key = '';\n\n for ($i = 0; $i < 13; $i++) {\n $key .= $characters[rand(0, strlen($characters) - 1)];\n }\n\n return $key;\n\n}", "function generateRandom($length) {\n\t$generated = '';\n\tfor ($i=0;$i<=$length;$i++) {\n\t\t$chr = '';\n\t\tswitch (mt_rand(1,3)) {\n\t\t\tcase 1:\n\t\t\t\t$chr = chr(mt_rand(48,57));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\t$chr = chr(mt_rand(65,90));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 3:\n\t\t\t$chr = chr(mt_rand(97,122));\n\t\t}\n\t $generated.=$chr;\n\t}\t\n\n return $generated;\n}", "function generateCode($length, $abc = 'abcdefghjkmnpqrstuvwxyABCDEFGHJKLMNPQRSTUVWYX2345678') \n {\n for ($code = '', $cl = strlen($abc)-1, $i = 0; $i < $length; $code .= $abc[mt_rand(0, $cl)], ++$i);\n return $code;\n }", "public function generateCodigo()\n {\n $this->codigo = random_int(1000000,9999999);\n }", "function generateNumericOTP() {\n // all numeric digits \n $generator = \"1357902468\"; \n \n // Iterate for n-times and pick a single character \n // from generator and append it to $result \n \n // Login for generating a random character from generator \n // ---generate a random number \n // ---take modulus of same with length of generator (say i) \n // ---append the character at place (i) from generator to result \n \n $result = \"\"; \n \n for ($i = 1; $i <= 5; $i++) { \n $result .= substr($generator, (rand()%(strlen($generator))), 1); \n } \n \n // Return result \n return $result; \n}", "function generateCode($characters) {\n\t\t/* list all possible characters, similar looking characters and vowels have been removed */\n\t\t$possible = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\t\t$code = '';\n\t\t$i = 0;\n\t\twhile ($i < $characters) { \n\t\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t\t$i++;\n\t\t}\n\t\treturn $code;\n}", "public static function generateKey(){\n $key = '';\n // [0-9a-z]\n for ($i=0;$i<32;$i++){\n $key .= chr(rand(48, 90));\n }\n self::$_key = $key;\n }", "private static function genNRand($q) {\n\t $i=$rac='';\n\t for ($i=0; $i<$q ;$i++) {\n\t $er=rand(0,2);\n\t switch ($er) {\n\t case 0: $rac.=rand(0,9); break;\n\t case 1: $rac.=chr(rand(65,90)); break;\n\t case 2: $rac.=chr(rand(98,122)); break;\n\t }\n\t }\n\t return ($rac);\n\t}", "function generateRandStr($length){\n \t\t$randstr = \"\";\n \t\tfor($i=0; $i<$length; $i++){\n \t\t$randnum = mt_rand(0,61);\n\t\t\t\tif($randnum < 10){\n \t\t$randstr .= chr($randnum+48);\n \t\t}else if($randnum < 36){\n \t\t$randstr .= chr($randnum+55);\n \t\t}else{\n \t\t$randstr .= chr($randnum+61);\n \t\t}\n \t\t}\n \t\treturn $randstr;\n \t\t}", "public static function random()\n {\n return '#' . str_pad(dechex(mt_rand(0, 0xFFFFFF)), 6, '0', STR_PAD_LEFT);\n }", "function random_code($limit = 8)\n\t{\n\t return substr(base_convert(sha1(uniqid(mt_rand())), 16, 36), 0, $limit);\n\t}", "function cvf_td_generate_random_code_foreditbuis($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function generateNumericOTP($n) {\n // all numeric digits \n $generator = \"1357902468\"; \n \n // Iterate for n-times and pick a single character \n // from generator and append it to $result \n \n // Login for generating a random character from generator \n // ---generate a random number \n // ---take modulus of same with length of generator (say i) \n // ---append the character at place (i) from generator to result \n \n $result = \"\"; \n \n for ($i = 1; $i <= $n; $i++) { \n $result .= substr($generator, (rand()%(strlen($generator))), 1); \n } \n \n // Return result \n return $result; \n }", "function generateNumericOTP($n) { \n \n // Take a generator string which consist of \n // all numeric digits \n $generator = \"1357902468\"; \n \n // Iterate for n-times and pick a single character \n // from generator and append it to $result \n \n // Login for generating a random character from generator \n // ---generate a random number \n // ---take modulus of same with length of generator (say i) \n // ---append the character at place (i) from generator to result \n \n $result = \"\"; \n \n for ($i = 1; $i <= $n; $i++) { \n $result .= substr($generator, (rand()%(strlen($generator))), 1); \n } \n \n // Return result \n return $result; \n\t}", "function gen_pin(){\n $rand_num = rand(6, 12);\n $permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $pin = substr(str_shuffle($permitted_chars), 0, $rand_num);\n return $pin;\n }", "function random_string($length, $base = 62) {\n\t$str = '';\n\twhile ($length--) {\n\t\t$x = mt_rand(1, min($base, 62));\n\t\t$str .= chr($x + ($x > 10 ? $x > 36 ? 28 : 86 : 47));\n\t}\n\treturn $str;\n}", "function cvf_td_generate_random_code_forfund($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function random() {\n $charset = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789!@#$%^&*().,/?[]{}-=';\n $random = \"\";\n for ($i = 0; $i < 10; $i++) {\n $random .= $charset[mt_rand(0, strlen($charset) - 1)];\n }\n return $random;\n}", "function createRandomToken(){\n\t\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0;\n\t\t\t$pass = '' ;\n\t\t\twhile ($i <= 7){\n\t\t\t\t$num = rand() % 33;\n\n\t\t\t\t\t\t\t$tmp = substr($chars, $num, 1);\n\n\t\t\t\t\t\t\t$pass = $pass . $tmp;\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $pass;\n\t\t\t\t\t\t}", "function parcelcheckout_getRandomCode($iLength = 64)\n\t{\n\t\t$aCharacters = array('a', 'b', 'c', 'd', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\n\n\t\t$sResult = '';\n\n\t\tfor($i = 0; $i < $iLength; $i++)\n\t\t{\n\t\t\t$sResult .= $aCharacters[rand(0, sizeof($aCharacters) - 1)];\n\t\t}\n\n\t\treturn $sResult;\n\t}", "function random_generator($digits){\r\n\r\n\tsrand ((double) microtime() * 10000000);\r\n\r\n\t//Array of alphabets\r\n\r\n\t$input = array (\"A\", \"B\", \"C\", \"D\", \"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\r\n\r\n\t\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"a\", \"b\", \"c\", \"d\", \"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\r\n\r\n\t\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\");\r\n\r\n\t\r\n\r\n\t$random_generator=\"\";// Initialize the string to store random numbers\r\n\r\n\t\tfor($i=1;$i<$digits+1;$i++){ // Loop the number of times of required digits\r\n\r\n\t\t\r\n\r\n\t\t\tif(rand(1,2) == 1){// to decide the digit should be numeric or alphabet\r\n\r\n\t\t\t// Add one random alphabet \r\n\r\n\t\t\t$rand_index = array_rand($input);\r\n\r\n\t\t\t$random_generator .=$input[$rand_index]; // One char is added\r\n\r\n\t\t\t\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\r\n\r\n\t\t\t// Add one numeric digit between 1 and 10\r\n\r\n\t\t\t$random_generator .=rand(1,10); // one number is added\r\n\r\n\t\t\t} // end of if else\r\n\r\n\t\t\r\n\r\n\t\t} // end of for loop \r\n\r\n\t\r\n\r\n\treturn $random_generator;\r\n\r\n}", "function generateNumber()\n {\n \t/*\n $random_number = 0;\n $digits = 0;\n \n while($digits < $digits_quantity)\n {\n $rand_max .= \"9\";\n $digits++;\n }\n \n mt_srand((double) microtime() * 1000000); \n $random_number = mt_rand($zero, intval($rand_max));\n \n if($string)\n {\n if(strlen(strval($random_number)) < $digits_quantity)\n {\n $zeros_quantity = $digits_quantity - strlen(strval($random_number));\n $digits = 0;\n while($digits < $zeros_quantity)\n {\n $str_zeros .= \"0\";\n $digits++;\n }\n $random_number = $str_zeros . $random_number;\n }\n }\n return '7'.$random_number;\n */\n \t//$random_number = intval( \"0\" . rand(1,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) );\n \t//$n=5;\n \t//$random_number = rand(0, pow(10, $n));\n \t$lenth=5;\n\t $aZ09 = array_merge(range('A', 'Z'), range('a', 'z'),range(0, 9));\n\t $random_number ='';\n\t for($c=0;$c < $lenth;$c++) {\n\t $random_number .= $aZ09[mt_rand(0,count($aZ09)-1)];\n\t }\n \n\t\treturn $random_number;\n }", "function capya_string($len){\n $str='';\n for($i=1; $i<=$len; $i++) {\n $ord=rand(50, 90);\n if((($ord >= 50) && ($ord <= 57)) || (($ord >= 65) && ($ord<= 90))) $str.=chr($ord);\n else $str.=capya_string(1);\n }\n return $str;\n}", "function generateRandStr($length){\r\n \t\t$randstr = \"\";\r\n \t\tfor($i=0; $i<$length; $i++){\r\n \t\t$randnum = mt_rand(0,61);\r\n\t\t\t\tif($randnum < 10){\r\n \t\t$randstr .= chr($randnum+48);\r\n \t\t}else if($randnum < 36){\r\n \t\t$randstr .= chr($randnum+55);\r\n \t\t}else{\r\n \t\t$randstr .= chr($randnum+61);\r\n \t\t}\r\n \t\t}\r\n \t\treturn $randstr;\r\n \t\t}", "public function crateSmsCode(){\n // generate a pin based on 2 * 7 digits + a random character\n $pin = mt_rand(100, 999)\n . mt_rand(100, 999);\n // shuffle the result\n $string = str_shuffle($pin);\n return $string;\n }", "function generateRandomString($n) { \n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $randomString = ''; \n\n for ($i = 0; $i < $n; $i++) { \n $index = rand(0, strlen($characters) - 1); \n $randomString .= $characters[$index]; \n } \n\n return $randomString; \n}", "public static function number( $length ) {\n\t$chars = \"0123456789\";\t\n $str = '';\n\t$size = strlen( $chars );\n\tfor( $i = 0; $i < $length; $i++ ) {\n\t\t$str .= $chars[ rand( 0, $size - 1 ) ];\n\t}\n\n\treturn $str;\n }", "public function generateActivationCode() : int\n {\n return mt_rand(100000, 999999);\n }", "function RandomString(){\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randstring = '';\n for ($i = 0; $i < 10; $i++) {\n $randstring .= $characters[rand(0, strlen($characters))];\n }\n return $randstring;\n}", "function random_char($string)\r\n{\r\n\t$length = strlen($string);\r\n\t$position = mt_rand(0, $length - 1);\r\n\t return $string[$position];\r\n}", "private function createAlphaNumber() {\n $alphaNumberChars = \"0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM\";\n \n $alphaNumber = \"\";\n for($i = 0; $i < 60; $i++) {\n $randomIndex = rand(0, 61);\n $alphaNumber .= substr($alphaNumberChars, $randomIndex, 1);\n }\n \n $this->alphaNumValidation = $alphaNumber;\n }", "public function generateRandomCouponCode()\n {\n $length = 12;\n $code = '';\n $chars = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ0123456789';\n $maxlength = strlen($chars);\n if ($length > $maxlength) {\n $length = $maxlength;\n }\n\n $i = 0;\n while ($i < $length) {\n $char = substr($chars, mt_rand(0, $maxlength - 1), 1);\n if (!strstr($code, $char)) {\n $code .= $char;\n $i++;\n }\n }\n\n $code = strtoupper($code);\n return $code;\n }", "public function genarateCodeinc( $num = 12 ){\n $resultat = array();\n $user =\"\";\n $username = \"abcdefghijklmnpqrstuvwxy123456789ABCDEFGHIJKLMNPQRSTUVWXY\";\n srand((double)microtime()*1000000);\n for($i=0; $i<$num; $i++) {\n $user .= $username[rand()%strlen($username)];\n }\n $resultat=$user;\n return $resultat;\n }", "private function generateRandomKey()\n {\n return substr(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36), 0, 8);\n }", "function generate_randomnumber($len)\r\n\t{\r\n\t\t$chars = \"0123456789\";\r\n\t\tfor($i=0; $i<$len; $i++) \r\n\t\t\t$r_str .= substr($chars,rand(0,strlen($chars)),1);\r\n\t\treturn $r_str;\r\n\t}", "function generate_random_str($no_of_chars) \n{\n return substr(md5(microtime()),rand(0,26),$no_of_chars);\n}", "public function assign_rand_value($num) {\n // accepts 1 - 36\n switch($num) {\n case \"1\" : $rand_value = \"a\"; break;\n case \"2\" : $rand_value = \"b\"; break;\n case \"3\" : $rand_value = \"c\"; break;\n case \"4\" : $rand_value = \"d\"; break;\n case \"5\" : $rand_value = \"e\"; break;\n case \"6\" : $rand_value = \"f\"; break;\n case \"7\" : $rand_value = \"g\"; break;\n case \"8\" : $rand_value = \"h\"; break;\n case \"9\" : $rand_value = \"i\"; break;\n case \"10\" : $rand_value = \"j\"; break;\n case \"11\" : $rand_value = \"k\"; break;\n case \"12\" : $rand_value = \"l\"; break;\n case \"13\" : $rand_value = \"m\"; break;\n case \"14\" : $rand_value = \"n\"; break;\n case \"15\" : $rand_value = \"o\"; break;\n case \"16\" : $rand_value = \"p\"; break;\n case \"17\" : $rand_value = \"q\"; break;\n case \"18\" : $rand_value = \"r\"; break;\n case \"19\" : $rand_value = \"s\"; break;\n case \"20\" : $rand_value = \"t\"; break;\n case \"21\" : $rand_value = \"u\"; break;\n case \"22\" : $rand_value = \"v\"; break;\n case \"23\" : $rand_value = \"w\"; break;\n case \"24\" : $rand_value = \"x\"; break;\n case \"25\" : $rand_value = \"y\"; break;\n case \"26\" : $rand_value = \"z\"; break;\n }\n return $rand_value;\n }", "function generateKey()\n\t{\n\t\treturn ( rand(1, 25) );\n\t}", "function GenerateWord()\n{\n $nb=rand(3,10);\n $w='';\n for($i=1;$i<=$nb;$i++)\n $w.=chr(rand(ord('a'),ord('z')));\n return $w;\n}", "function random_key($length) {\r\n\t$o = \"\";\r\n\tfor ($i=0;$i<$length;$i++) {\r\n\t\t$r = mt_rand(0,51);\r\n\t\t$o .= char_at_position($r);\r\n\t}\r\n\treturn $o;\r\n}", "function gener_random($length){\r\n\r\n\tsrand((double)microtime()*1000000 );\r\n\t\r\n\t$random_id = \"\";\r\n\t\r\n\t$char_list = \"abcdefghijklmnopqrstuvwxyz\";\r\n\t\r\n\tfor($i = 0; $i < $length; $i++) {\r\n\t\t$random_id .= substr($char_list,(rand()%(strlen($char_list))), 1);\r\n\t}\r\n\t\r\n\treturn $random_id;\r\n}", "function getRandomCode()\n\t\t{\n\t\t\tglobal $wpdb;\n\n\t\t\twhile(empty($code))\n\t\t\t{\n\n\t\t\t\t$scramble = md5(AUTH_KEY . current_time('timestamp') . SECURE_AUTH_KEY);\n\t\t\t\t$code = substr($scramble, 0, 10);\n\t\t\t\t$code = apply_filters(\"pmpro_random_code\", $code, $this);\t//filter\n\t\t\t\t$check = $wpdb->get_var(\"SELECT id FROM $wpdb->pmpro_membership_orders WHERE code = '$code' LIMIT 1\");\n\t\t\t\tif($check || is_numeric($code))\n\t\t\t\t\t$code = NULL;\n\t\t\t}\n\n\t\t\treturn strtoupper($code);\n\t\t}", "public function getRandomAlphaNumStr(): string\n {\n $string = '';\n\n while (($len = \\strlen($string)) < 20) {\n $size = 20 - $len;\n\n $bytes = \\random_bytes($size);\n\n $string .= \\substr(\n \\str_replace(['/', '+', '='], '', \\base64_encode($bytes)), 0, $size);\n }\n\n return $string;\n }", "private static function getRandomReferenceNumber()\n {\n return sprintf('%02X', mt_rand(0, 0xFF));\n }", "protected function generateArticleCode() {\r\n\t\ttx_pttools_assert::isInRange($this->rowUid, 1, 99999);\r\n\t\t\r\n\t\tlist($usec, $sec) = explode(' ', microtime());\r\n \t\t$seed = (float) $sec + ((float) $usec * 100000);\r\n \t\tsrand($seed);\r\n\t\t$rand = rand(1, 9999);\r\n\t\t\r\n\t\tif($rand < 1000) $rand += 1000;\r\n\t\t\r\n\t\treturn sprintf(\"%s%05s\", $rand, $this->rowUid);\r\n\t}", "public function generateRandomAlphanumeric($str,GeneratorInterface $random, LocaleInterface $locale)\n {\n $letters = $locale->getLetters();\n $consonants = $locale->getConsonants();\n $vowels = $locale->getVowels();\n $hex = $locale->getHex();\n \n // loop through each character and convert all unescaped X's to 1-9 and\n // unescaped x's to 0-9.\n $new_str = SimpleString::create(\"\");\n $str = SimpleString::create($str); \n for ($i = 0; $i < $str->length(); $i++) {\n \n switch ($str->charAt($i)) {\n // Numbers\n case \"X\":\n $new_str->append(round($random->generate(1, 9)));\n break;\n case \"x\":\n $new_str->append(round($random->generate(0, 9)));\n break;\n \n // Hex\n case \"H\":\n $new_str->append($hex->charAt(round($random->generate(0, $hex->length()) - 1)));\n break;\n \n // Letters\n case \"L\":\n $new_str->append($letters->charAt(round($random->generate(0, $letters->length()) - 1)));\n break;\n case \"l\":\n $new_str->append(\\mb_strtolower($letters->charAt(round($random->generate(0, $letters->length()) - 1))));\n break;\n case \"D\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($letters->charAt(round($random->generate(0, $letters->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower($letters->charAt(round($random->generate(0, $letters->length()) - 1))));\n break;\n\n // Consonants\n case \"C\":\n $new_str->append($consonants->charAt(round($random->generate(0, $consonants->length()) - 1)));\n break;\n case \"c\":\n $new_str->append(\\mb_strtolower($consonants->charAt(round($random->generate(0,$consonants->length()) - 1))));\n break;\n case \"E\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($consonants->charAt(round($random->generate(0, $consonants->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower($consonants->charAt(round($random->generate(0, $consonants->length()) - 1))));\n break;\n\n // Vowels\n case \"V\":\n $new_str->append($vowels->charAt(round($random->generate(0,$vowels->length()) - 1)));\n break;\n case \"v\":\n $new_str->append(\\mb_strtolower($vowels->charAt(round($random->generate(0,$vowels->length()) - 1))));\n break;\n case \"F\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($vowels->charAt(round($random->generate(0,$vowels->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower( $vowels->charAt(round($random->generate(0,$vowels->length()) - 1))));\n break;\n \n //space char\n case \"S\":\n case \"s\":\n $new_str->append(\" \");\n break; \n default:\n $new_str->append($str->charAt($i));\n break;\n }\n }\n\n return (string) $new_str;\n }", "function randColorCode() {\n return '#' . str_pad(dechex(mt_rand(0, 0xFFFFFF)), 6, '0', STR_PAD_LEFT);\n}", "function _generate_code_string() {\n\n $str = strval(microtime());\n return substr(md5($str),rand(0, 15) , 10);\n}", "public function createRandString(){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $char_list .= \"abcdefghijklmnopqrstuvwxyz\";\n $char_list .= \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n return $new;\n\n }", "function generateRandomString($n) { \n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n\t\t$randomString = '';\n \n\t\tfor ($i = 0; $i < $n; $i++) { \n\t\t\t$index = rand(0, strlen($characters) - 1); \n\t\t\t$randomString .= $characters[$index]; \n\t\t} \n \n \treturn $randomString; \n\t}" ]
[ "0.80122215", "0.7859618", "0.76705587", "0.7569429", "0.7539996", "0.7445171", "0.7370656", "0.7368243", "0.7332235", "0.7318972", "0.72628844", "0.72602165", "0.7256367", "0.72338855", "0.7232471", "0.72289187", "0.72104394", "0.7203421", "0.7197888", "0.7185042", "0.7169289", "0.7158122", "0.7135144", "0.7116596", "0.7088344", "0.7084481", "0.70634544", "0.7044496", "0.7023455", "0.70146024", "0.7003838", "0.70036155", "0.69989955", "0.6986596", "0.69825953", "0.69690037", "0.69510007", "0.69399035", "0.6931227", "0.6897532", "0.68751705", "0.68727356", "0.68653935", "0.6852643", "0.68505484", "0.6848259", "0.68469775", "0.68465865", "0.68369746", "0.6829749", "0.6816244", "0.6814499", "0.68104696", "0.6799324", "0.67966473", "0.6787213", "0.677729", "0.6776961", "0.67654425", "0.6763196", "0.6759598", "0.6753787", "0.675108", "0.67470706", "0.67440015", "0.67291796", "0.6729105", "0.671779", "0.6705394", "0.66908574", "0.6688881", "0.6679576", "0.6677865", "0.66679263", "0.6662599", "0.66561836", "0.66359514", "0.66333", "0.66314304", "0.6629599", "0.6624998", "0.6623348", "0.66215014", "0.66180575", "0.661681", "0.6607285", "0.66037375", "0.660245", "0.6581852", "0.65748024", "0.6574108", "0.65731955", "0.6572066", "0.6568735", "0.6549752", "0.65491074", "0.6547539", "0.6540857", "0.6539746", "0.6534913" ]
0.84985834
0
function to generate a random symbol based on ASCII code
function generateRandomSymbol() { $r = mt_rand(0, 3); switch($r) { case 0: $i = mt_rand(33, 47); break; case 1: $i = mt_rand(58, 64); break; case 2: $i = mt_rand(91, 96); break; case 3: $i = mt_rand(123, 126); break; } return chr($i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slRandomChar()\n{\n\t$char = '';\n\tfor ($i = 0; $i < 20; $i++)\n\t\t$char .= rand(0, 9);\n\treturn ($char);\n}", "function random_char($length = 16, $symbol = false)\n{\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n if($symbol) {\n \t$chars .= '~!@#$%^&*()-_+?{}[]<|>?,.';\n }\n return substr(str_shuffle(str_repeat($chars, ceil($length/strlen($chars)) )), 0, $length);\n}", "function generateRandomCharacter($type) {\n switch($type) {\n case 'symbol': return generateRandomSymbol(); break;\n case 'number': return generateRandomNumber(); break;\n }\n }", "function generateRandomNumber() {\n return chr(mt_rand(48, 57));\n }", "private function generate_code()\n\t\t{\n\t\t\t$code = \"\";\n\t\t\tfor ($i = 0; $i < 5; ++$i) \n\t\t\t{\n\t\t\t\tif (mt_rand() % 2 == 0) \n\t\t\t\t{\n\t\t\t\t\t$code .= mt_rand(0,9);\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\t$code .= chr(mt_rand(65, 90));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $code; \n\n\t\t}", "function randLetter()\n{\n // ends at 254 to eliminate the last empty character\n // and escape character number 127; the space character\n $i = 0;\n $int = 0;\n while ($int != 127 && $i < 1) {\n $int = rand(33, 254);\n $i++;\n }\n $rand_letter = chr($int);\n // Converting to utf-8 from ASCII to avoid the \"lozange-question-mark\" issue.\n return mb_convert_encoding($rand_letter, \"UTF-8\", \"ASCII\");\n}", "public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\n }", "private function generate_code(){\n $bytes = random_bytes(2);\n // var_dump(bin2hex($bytes));\n return bin2hex($bytes);\n }", "function random_charo( $panjang ) { \n $karakter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $string = ''; \n for ( $i = 0; $i < $panjang; $i++ ) { \n $pos = rand( 0, strlen( $karakter ) - 1 ); \n $string .= $karakter{$pos}; \n } \nreturn \"OPERA\";\n}", "private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}", "private function genCode()\r\n\t{\r\n\t\t$digits = 10;\r\n\t\treturn rand(pow(10, $digits-1), pow(10, $digits)-1);\r\n\t}", "public static function generateCode()\n {\n return Str::random(10);\n }", "public function generate_code()\n {\n $code = \"\";\n $count = 0;\n while ($count < $this->num_characters) {\n $code .= substr($this->captcha_characters, mt_rand(0, strlen($this->captcha_characters)-1), 1);\n $count++;\n }\n return $code;\n }", "function cvf_td_generate_random_code($length=10) {\n\n $string = '';\n $characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters)-1)];\n }\n\n return $string;\n\n}", "private function genRandomKey()\n {\n return strtoupper(str_random(32));\n }", "function cvf_td_generate_random_code($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function randomcode ($len=\"10\"){\n\t\t\t\tglobal $pass;\n\t\t\t\tglobal $lchar;\n\t\t\t\t$code = NULL;\n\t\t\n\t\t\t\tfor ($i=0;$i<$len;$i++){\n\t\t\t\t\t$char = chr(rand(48,122));\n\t\t\t\t\twhile(!ereg(\"[a-zA-Z0-9]\", $char)){\n\t\t\t\t\t\tif($char == $lchar) { continue; }\n\t\t\t\t\t\t\t$char = chr(rand(48,90));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pass .= $char;\n\t\t\t\t\t\t$lchar = $char;\n\t\t\t\t\t}\n\t\t\t\treturn $pass;\n\t\t\t}", "public static function generateKey(){\n $key = '';\n // [0-9a-z]\n for ($i=0;$i<32;$i++){\n $key .= chr(rand(48, 90));\n }\n self::$_key = $key;\n }", "public function autoCode(){\n $length=8;\n $randstr = \"\";\n srand((double)microtime() * 1000000);\n //our array add all letters and numbers if you wish\n $chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\n for ($rand = 1; $rand <= $length; $rand++) {\n $random = rand(0, count($chars) - 1);\n $randstr .= $chars[$random];\n }\n return ($randstr.'/'.date('y'));\n }", "function generateCode(){\n $base=\"abcdefghijklmnopkrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-\";\n $i=0;\n $c=\"\";\n while ($i<6){\n $c.=$base[rand(0,strlen($base)-1)];\n $i++;\n }\n if (validate::existCode($c))\n return generateCode();\n return $c;\n}", "function generateCode($characters) {\n\t$possible = '23456789bcdfghjkmnpqrstvwxyz';\n\t$code = '';\n\t$i = 0;\n\twhile ($i < $characters) { \n\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t$i++;\n\t}\n\treturn $code;\n}", "function cvf_td_generate_random_code_foreditbuis($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function RandomString($num) {\r\r\n mt_srand((double)microtime()*1000000);\r\r\n while (strlen($pass) < $num) {\r\r\n $i = chr(mt_rand (48,57)); \r\r\n $pass = $pass.$i; \r\r\n }\r\r\n return ($pass); \r\r\n}", "function generateCode($length = 10)\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "public function make_activation_code(){\n\t\t$alphanum = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t\t return substr(str_shuffle($alphanum), 0, 7);\n\t}", "function GenerateWord()\n{\n $nb=rand(3,10);\n $w='';\n for($i=1;$i<=$nb;$i++)\n $w.=chr(rand(ord('a'),ord('z')));\n return $w;\n}", "function genRandomMasterCode(){\n\t\t$characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";\n\t\t$string=\"\";\n\t\tfor($p=0;$p<17;$p++){\n\t\t\t$string.=$characters[mt_rand(0, strlen($characters))];\n\t\t}\n\t\treturn $string;\n\t}", "protected function random_string()\n {\n $key = '';\n $keys = array_merge( range('a','z'), range(0,9) );\n\n for($i=0; $i<10; $i++)\n {\n $key .= $keys[array_rand($keys)];\n }\n\n return $key;\n }", "function genrateRandCharFromString ($str) {\n\n if ($str == \"\") {\n return \"\";\n } else {\n $strArray = str_split($str);\n $randomChar = '';\n $randItem = array_rand($strArray);\n $randomChar = $strArray[$randItem];\n return $randomChar;\n }\n}", "function generateRandomKey() {\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $key = '';\n\n for ($i = 0; $i < 13; $i++) {\n $key .= $characters[rand(0, strlen($characters) - 1)];\n }\n\n return $key;\n\n}", "public static function randomCharacter($num) {\n $seed = str_split('abcdefghijklmnopqrstuvwxyz'\n .'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n //.'0123456789!@#$%^&*()'\n ); // and any other characters\n shuffle($seed); // probably optional since array_is randomized; this may be redundant\n $rand = '';\n foreach (array_rand($seed, $num) as $k) {\n $rand .= $seed[$k];\n }\n\n return $rand;\n }", "private function generate()\n {\n $output = '';\n $length = strlen($this->str);\n\n\n for ($i = 1; $i < 5; $i++) {\n // get random char\n $char = $this->str[rand(0, $length - 1)];\n $output .= $char;\n\n // get font size\n $fontSize = ($this->level > 1) ? rand(20, 48) : 28;\n imagettftext($this->imageResource, $fontSize, rand(-35, 35), 35 * $i, 55, imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)), $this->font, $char);\n }\n\n $this->code = ($this->caseSensitive) ? $output : strtolower($output);\n }", "function generateCode($length=6){\r\n $chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789\";\r\n $code = \"\";\r\n $clen = strlen($chars) - 1; \r\n while (strlen($code) < $length) {\r\n $code .= $chars[mt_rand(0,$clen)]; \r\n }\r\n return $code;\r\n}", "function cvf_td_generate_random_code_forfund($length=10) {\n\t$string = '';\n\t$characters = \"23456789ABCDEFHJKLMNPRTVWXYZabcdefghijklmnopqrstuvwxyz\";\n\tfor ($p = 0; $p < $length; $p++) {\n\t\t$string .= $characters[mt_rand(0, strlen($characters)-1)];\n\t}\n\treturn $string;\n}", "function random_key($length) {\r\n\t$o = \"\";\r\n\tfor ($i=0;$i<$length;$i++) {\r\n\t\t$r = mt_rand(0,51);\r\n\t\t$o .= char_at_position($r);\r\n\t}\r\n\treturn $o;\r\n}", "function randLetter(){\n \t\t$alphabets = array_merge(range('A','Z'));\n \t\t$chars = '';\n \t\tfor($i = 0; $i<2; $i++){\n \t\t\t$rand = rand(0,10);\n \t\t\t$chars .= $alphabets[$rand];\n \t\t}\n \t\treturn strtoupper($chars);\n\t}", "function capya_string($len){\n $str='';\n for($i=1; $i<=$len; $i++) {\n $ord=rand(50, 90);\n if((($ord >= 50) && ($ord <= 57)) || (($ord >= 65) && ($ord<= 90))) $str.=chr($ord);\n else $str.=capya_string(1);\n }\n return $str;\n}", "function random_char($string)\r\n{\r\n\t$length = strlen($string);\r\n\t$position = mt_rand(0, $length - 1);\r\n\t return $string[$position];\r\n}", "public static function create_ucode(){\n\t\treturn Str::upper(Str::random(7));\n\t}", "function random() {\n $charset = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789!@#$%^&*().,/?[]{}-=';\n $random = \"\";\n for ($i = 0; $i < 10; $i++) {\n $random .= $charset[mt_rand(0, strlen($charset) - 1)];\n }\n return $random;\n}", "public function createRandInt(){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n return $new;\n\n }", "function gen_rand_string($num_chars = 8)\n{\n\t$rand_str = unique_id();\n\t$rand_str = str_replace('0', 'Z', strtoupper(base_convert($rand_str, 16, 35)));\n\n\treturn substr($rand_str, 0, $num_chars);\n}", "function createRandomToken(){\n\t\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\tsrand((double)microtime()*1000000);\n\t\t\t$i = 0;\n\t\t\t$pass = '' ;\n\t\t\twhile ($i <= 7){\n\t\t\t\t$num = rand() % 33;\n\n\t\t\t\t\t\t\t$tmp = substr($chars, $num, 1);\n\n\t\t\t\t\t\t\t$pass = $pass . $tmp;\n\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $pass;\n\t\t\t\t\t\t}", "public function randomString(){\n $alpha = \"abcdefghijklmnopqrstuvwxyz\";\n $alpha_upper = strtoupper($alpha);\n $numeric = \"0123456789\";\n $special = \".-+=_,!@$#*%<>[]{}\";\n $chars = $alpha . $alpha_upper . $numeric; \n $pw = ''; \n $chars = str_shuffle($chars);\n $pw = substr($chars, 8,8);\n return $pw;\n }", "function generateCode($characters) {\n\t\t/* list all possible characters, similar looking characters and vowels have been removed */\n\t\t$possible = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\t\t$code = '';\n\t\t$i = 0;\n\t\twhile ($i < $characters) { \n\t\t\t$code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n\t\t\t$i++;\n\t\t}\n\t\treturn $code;\n}", "function genrateReportCode() {\n $chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ023456789\";\n srand((double) microtime() * 1000000);\n $i = 0;\n $pass = '';\n\n while ($i <= 7) {\n $num = rand() % 33;\n $tmp = substr($chars, $num, 1);\n $pass = $pass . $tmp;\n $i++;\n }\n return $pass;\n}", "function GenerateWord() {\n $nb = rand(3, 10);\n $w = '';\n for ($i = 1; $i <= $nb; $i++)\n $w .= chr(rand(ord('a'), ord('z')));\n return $w;\n }", "public function getRandomKey($allowSpecialChar = false) {\r\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\r\n if ($allowSpecialChar)\r\n $alphabet .= \"!@#$%&*\";\r\n return substr(str_shuffle($alphabet), 0, 10);\r\n }", "public function gen_random_string(){\n\t\t$chars =\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$final_rand='';\t\t\n\t\tfor($i=0;$i<4; $i++) {\t\t \n\t\t$final_rand .= $chars[ rand(0,strlen($chars)-1)];\n\t\t}\t\t\n\t\treturn $final_rand;\t\n\t}", "private function get_rand_symbol(){\n if(($this->json['tiles'][array_rand($this->json['tiles'],1)])['id'] == $this->special_simbol['id']){\n $this->get_rand_symbol();\n } else {\n $this->current_symbol_transform_to = $this->json['tiles'][array_rand($this->json['tiles'],1)];\n }\n }", "function generateCode($length) { \n\t\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789\"; \n\t\t$code = \"\"; \n\t\t$clen = strlen($chars) - 1; \n\t\twhile (strlen($code) < $length) { \n\t\t\t$code .= $chars[mt_rand(0,$clen)]; \n\t\t} \n\t\treturn $code; \n\t}", "public function generateRandomAlphanumeric($str,GeneratorInterface $random, LocaleInterface $locale)\n {\n $letters = $locale->getLetters();\n $consonants = $locale->getConsonants();\n $vowels = $locale->getVowels();\n $hex = $locale->getHex();\n \n // loop through each character and convert all unescaped X's to 1-9 and\n // unescaped x's to 0-9.\n $new_str = SimpleString::create(\"\");\n $str = SimpleString::create($str); \n for ($i = 0; $i < $str->length(); $i++) {\n \n switch ($str->charAt($i)) {\n // Numbers\n case \"X\":\n $new_str->append(round($random->generate(1, 9)));\n break;\n case \"x\":\n $new_str->append(round($random->generate(0, 9)));\n break;\n \n // Hex\n case \"H\":\n $new_str->append($hex->charAt(round($random->generate(0, $hex->length()) - 1)));\n break;\n \n // Letters\n case \"L\":\n $new_str->append($letters->charAt(round($random->generate(0, $letters->length()) - 1)));\n break;\n case \"l\":\n $new_str->append(\\mb_strtolower($letters->charAt(round($random->generate(0, $letters->length()) - 1))));\n break;\n case \"D\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($letters->charAt(round($random->generate(0, $letters->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower($letters->charAt(round($random->generate(0, $letters->length()) - 1))));\n break;\n\n // Consonants\n case \"C\":\n $new_str->append($consonants->charAt(round($random->generate(0, $consonants->length()) - 1)));\n break;\n case \"c\":\n $new_str->append(\\mb_strtolower($consonants->charAt(round($random->generate(0,$consonants->length()) - 1))));\n break;\n case \"E\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($consonants->charAt(round($random->generate(0, $consonants->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower($consonants->charAt(round($random->generate(0, $consonants->length()) - 1))));\n break;\n\n // Vowels\n case \"V\":\n $new_str->append($vowels->charAt(round($random->generate(0,$vowels->length()) - 1)));\n break;\n case \"v\":\n $new_str->append(\\mb_strtolower($vowels->charAt(round($random->generate(0,$vowels->length()) - 1))));\n break;\n case \"F\":\n $bool = round($random->generate(0,1));\n if ($bool === 0)\n $new_str->append($vowels->charAt(round($random->generate(0,$vowels->length()) - 1)));\n else\n $new_str->append(\\mb_strtolower( $vowels->charAt(round($random->generate(0,$vowels->length()) - 1))));\n break;\n \n //space char\n case \"S\":\n case \"s\":\n $new_str->append(\" \");\n break; \n default:\n $new_str->append($str->charAt($i));\n break;\n }\n }\n\n return (string) $new_str;\n }", "protected function generateCode(): string {\n return (string)rand(100000, 999999);\n }", "function randomCode($length = 5){\n\t$characters = '0123456789';\n\t$charactersLength = strlen($characters);\n\t$randomString = '';\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\n\t}\n\treturn $randomString;\n}", "public function generateRandomCouponCode()\n {\n $length = 12;\n $code = '';\n $chars = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ0123456789';\n $maxlength = strlen($chars);\n if ($length > $maxlength) {\n $length = $maxlength;\n }\n\n $i = 0;\n while ($i < $length) {\n $char = substr($chars, mt_rand(0, $maxlength - 1), 1);\n if (!strstr($code, $char)) {\n $code .= $char;\n $i++;\n }\n }\n\n $code = strtoupper($code);\n return $code;\n }", "function generateMnemonic(){\n // Generate a mnemonic\n $random = new Random();\n $entropy = $random->bytes(Bip39Mnemonic::MAX_ENTROPY_BYTE_LEN);\n $bip39 = MnemonicFactory::bip39();\nreturn $bip39->entropyToMnemonic($entropy);\n}", "private function generateRandomKey()\n {\n return substr(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36), 0, 8);\n }", "function generateRandom($length) {\n\t$generated = '';\n\tfor ($i=0;$i<=$length;$i++) {\n\t\t$chr = '';\n\t\tswitch (mt_rand(1,3)) {\n\t\t\tcase 1:\n\t\t\t\t$chr = chr(mt_rand(48,57));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\t$chr = chr(mt_rand(65,90));\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 3:\n\t\t\t$chr = chr(mt_rand(97,122));\n\t\t}\n\t $generated.=$chr;\n\t}\t\n\n return $generated;\n}", "private static function generateUniqueCode()\n {\n do {\n $code = str_random(7);\n } while (static::checkCode($code));\n\n return $code;\n }", "public static function generateCode() {\n $long_code = strtr(md5(uniqid(rand())), '0123456789abcdefghij', '234679QWERTYUPADFGHX');\n return substr($long_code, 0, 12);\n }", "function shortcode()\n{\n\t//$uuid = substr($chars,0,3) . rand(100,999);\n\t$uuid = rand(100,999) . rand(100,999) . rand(100,999);\n\treturn strtoupper($uuid);\n}", "static function createFilterChar() {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n return $characters[rand(0, strlen($characters) - 1)];\r\n }", "public function randomKey();", "static function random( $len, $useSymbols = false )\n {\n $chars = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n if ($useSymbols ) {\n $chars .= \"°!#$%&/()=?¡*][{}-.,;:_\";\n } // end if use symbols\n\n $charsLen = strlen($chars);\n $charsLen--;\n\n $random = '';\n $count = 0;\n while ( $count < $len ) {\n $rand = rand(0, $charsLen);\n $random .= $chars[$rand];\n $count++;\n } // end while\n\n return $random;\n }", "function getToken($length) {\n \t\t $key = '';\n \t\t $keys = array_merge(range(0, 9), range('a', 'z'));\n \t\t for ($i = 0; $i < $length; $i++) {\n \t\t $key .= $keys[array_rand($keys)];\n \t\t }\n\n \t\t return $key;\n \t\t}", "function random() {\n echo StringHelper::random(48);\n echo \"<br />\";\n echo StringHelper::random(16);\n echo \"<br />\";\n echo CryptHelper::generateKey(24);\n echo \"<br />\";\n echo CryptHelper::generateKey(8);\n }", "protected function generateRandomToken(): string\n {\n return Str::random(32);\n }", "function RandomString(){\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randstring = '';\n for ($i = 0; $i < 10; $i++) {\n $randstring .= $characters[rand(0, strlen($characters))];\n }\n return $randstring;\n}", "function generateKey()\n\t{\n\t\treturn ( rand(1, 25) );\n\t}", "function make_rand_number($length = 8){\r\n // thanks to [email protected] for this code\r\n mt_srand((double) microtime() * 1000000);\r\n for ($i=0; $i < $length; $i++) {\r\n //$which = rand(1, 3);\r\n // character will be a digit 2-9\r\n //if ( $which == 1 )\r\n $password .= mt_rand(0,9);\r\n // character will be a lowercase letter\r\n //elseif ( $which == 2 ) $password .= chr(mt_rand(65, 90));\r\n // character will be an uppercase letter\r\n //elseif ( $which == 3 ) $password .= chr(mt_rand(97, 122));\r\n }\r\n return $password;\r\n}", "function add_char($in_array) {\n $special_chars = [\"!\", \"@\", \"#\", \"$\", \"%\", \"^\", \"&\", \"*\"];\n $random_char = $special_chars[rand(0, count($special_chars) - 1)];\n $random_idx = rand(0, count($in_array) - 1);\n\n $in_array[$random_idx] = $in_array[$random_idx] . $random_char;\n\n return $in_array;\n}", "public function generateConfirmationCode()\n {\n return h(str_random(30));\n }", "function generateCode($length, $abc = 'abcdefghjkmnpqrstuvwxyABCDEFGHJKLMNPQRSTUVWYX2345678') \n {\n for ($code = '', $cl = strlen($abc)-1, $i = 0; $i < $length; $code .= $abc[mt_rand(0, $cl)], ++$i);\n return $code;\n }", "private function generateToken(): string\n {\n return Random::alphanum(self::TOKEN_LENGTH);\n }", "function sloodle_random_security_token()\n {\n // Define the characters we can use in our token, and get the length of it\n $str = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $strlen = strlen($str) - 1;\n // Prepare the token variable\n $token = '';\n // Loop once for each output character\n for($length = 0; $length < 16; $length++) {\n // Shuffle the string, then pick and store a random character\n $str = str_shuffle($str);\n $char = mt_rand(0, $strlen);\n $token .= $str[$char];\n }\n \n return $token;\n }", "function gen_pin(){\n $rand_num = rand(6, 12);\n $permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $pin = substr(str_shuffle($permitted_chars), 0, $rand_num);\n return $pin;\n }", "function getRandChar($length){\n $str = null;\n $strPol = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz\";\n $max = strlen($strPol)-1;\n for($i=0;$i<$length;$i++){\n $str.=$strPol[rand(0,$max)];\n }\n return $str;\n}", "function parcelcheckout_getRandomCode($iLength = 64)\n\t{\n\t\t$aCharacters = array('a', 'b', 'c', 'd', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');\n\n\t\t$sResult = '';\n\n\t\tfor($i = 0; $i < $iLength; $i++)\n\t\t{\n\t\t\t$sResult .= $aCharacters[rand(0, sizeof($aCharacters) - 1)];\n\t\t}\n\n\t\treturn $sResult;\n\t}", "function generarPassword() {\n\t\t$str = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$cad = \"\";\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$cad .= substr($str, rand(0, 62), 1);\n\t\t}\n\t\treturn $cad;\n\t}", "public static function generateResetString(){\n return base_convert(md5(mt_rand()), 16, 36);\n }", "function generate_random_str($no_of_chars) \n{\n return substr(md5(microtime()),rand(0,26),$no_of_chars);\n}", "protected function getRandomKey()\n {\n return Str::random(32);\n }", "function generateRandStr($length){\n \t\t$randstr = \"\";\n \t\tfor($i=0; $i<$length; $i++){\n \t\t$randnum = mt_rand(0,61);\n\t\t\t\tif($randnum < 10){\n \t\t$randstr .= chr($randnum+48);\n \t\t}else if($randnum < 36){\n \t\t$randstr .= chr($randnum+55);\n \t\t}else{\n \t\t$randstr .= chr($randnum+61);\n \t\t}\n \t\t}\n \t\treturn $randstr;\n \t\t}", "public function createRandString(){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $char_list .= \"abcdefghijklmnopqrstuvwxyz\";\n $char_list .= \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n return $new;\n\n }", "protected function getRandomCharsString()\n {\n return 'bcdfghjklmnpqrstvwxzBCDFGHJKLMNPQRSTVWXZ0123456789!@#$%^&*()-_=+[]{}|;:,.<>/?';\n }", "function generate_token($length){\n $token = \"\";\n $codeAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $codeAlphabet.= \"abcdefghijklmnopqrstuvwxyz\";\n $codeAlphabet.= \"0123456789\";\n $max = strlen($codeAlphabet) - 1;\n for ($i=0; $i < $length; $i++) {\n $token .= $codeAlphabet[crypto_rand_secure(0, $max)];\n }\n return $token;\n}", "private static function genNRand($q) {\n\t $i=$rac='';\n\t for ($i=0; $i<$q ;$i++) {\n\t $er=rand(0,2);\n\t switch ($er) {\n\t case 0: $rac.=rand(0,9); break;\n\t case 1: $rac.=chr(rand(65,90)); break;\n\t case 2: $rac.=chr(rand(98,122)); break;\n\t }\n\t }\n\t return ($rac);\n\t}", "function generateCode($length = 5, $add_dashes = false, $available_sets = 'ud')\n{\n\t$sets = array();\n\tif(strpos($available_sets, 'l') !== false)\n\t\t$sets[] = 'abcdefghjkmnpqrstuvwxyz';\n\tif(strpos($available_sets, 'u') !== false)\n\t\t$sets[] = 'ABCDEFGHJKMNPQRSTUVWXYZ';\n\tif(strpos($available_sets, 'd') !== false)\n\t\t$sets[] = '23456789';\n\tif(strpos($available_sets, 's') !== false)\n\t\t$sets[] = '!@#$%&*?';\n\t$all = '';\n\t$password = '';\n\tforeach($sets as $set)\n\t{\n\t\t$password .= $set[array_rand(str_split($set))];\n\t\t$all .= $set;\n\t}\n\t$all = str_split($all);\n\tfor($i = 0; $i < $length - count($sets); $i++)\n\t\t$password .= $all[array_rand($all)];\n\t$password = str_shuffle($password);\n\tif(!$add_dashes)\n\t\treturn $password;\n\t$dash_len = floor(sqrt($length));\n\t$dash_str = '';\n\twhile(strlen($password) > $dash_len)\n\t{\n\t\t$dash_str .= substr($password, 0, $dash_len) . '-';\n\t\t$password = substr($password, $dash_len);\n\t}\n\t$dash_str .= $password;\n\treturn $dash_str;\n}", "function generate_key(): string\n{\n $keyset = \"0123456789ABCDEF\";\n do {\n $key = \"\";\n for ($i = 0; $i < 16; $i++) {\n $key .= substr($keyset, rand(0, strlen($keyset)-1), 1);\n }\n } while (substr($key, 0, 1) == \"0\");\n return $key;\n}", "protected static function generateToken(): string\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyz';\n $token = 'V_'; // methods can't start with numbers\n\n for ($i = 0; $i < 12; $i++) {\n $index = rand(0, strlen($characters) - 1);\n $token .= $characters[$index];\n }\n\n return $token;\n }", "function GenerateKey() {\n // deterministic; see base.js.\n return rand();\n}", "public function generateToken(): string\n {\n $token = bin2hex(random_bytes(16));\n $this->setTokens($this->limitTokens(\n array_merge($this->getTokens(), [$token])\n ));\n return $token;\n }", "function generate_mobile_code()\n{\n $chars = \"0123456789\";\n srand((double)microtime()*1000000);\n $code = \"\";\n for ($i = 0; $i < 6; $i++)\n {\n $num = rand() % 10;\n $tmp = substr($chars, $num, 1);\n $code = $code . $tmp;\n }\n return $code;\n}", "function _gensesskey() {\n # with compliments to \"ripat at lumadis dot be\" from php.net online docs\n $acceptedChars = 'azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN0123456789';\n $max = strlen($acceptedChars)-1;\n $key = null;\n for ($i = 0; $i < 64; $i++) {\n $key .= $acceptedChars{mt_rand(0, $max)};\n }\n return $key;\n }", "function generateRandStr($length){\r\n \t\t$randstr = \"\";\r\n \t\tfor($i=0; $i<$length; $i++){\r\n \t\t$randnum = mt_rand(0,61);\r\n\t\t\t\tif($randnum < 10){\r\n \t\t$randstr .= chr($randnum+48);\r\n \t\t}else if($randnum < 36){\r\n \t\t$randstr .= chr($randnum+55);\r\n \t\t}else{\r\n \t\t$randstr .= chr($randnum+61);\r\n \t\t}\r\n \t\t}\r\n \t\treturn $randstr;\r\n \t\t}", "public function crateSmsCode(){\n // generate a pin based on 2 * 7 digits + a random character\n $pin = mt_rand(100, 999)\n . mt_rand(100, 999);\n // shuffle the result\n $string = str_shuffle($pin);\n return $string;\n }", "function generateCodeBig($length) {\n $chars = \"abcdefghijklmnopqrstuv$wxyzA&BCDEFGHIJKLMN-OPRQSTUVWXYZ0123456789_\";\n $code = \"\";\n $clen = strlen($chars) - 1; //a variable with the fixed length of chars correct for the fence post issue\n while (strlen($code) < $length) {\n $code .= $chars[mt_rand(0,$clen)]; //mt_rand's range is inclusive - this is why we need 0 to n-1\n }\n return $code;\n }", "public static function aleat($chars) {\n $res = '';\n for ($i=0; $i<$chars; $i+=4) {\t\t\t\n\t $res = sprintf(\"%s%04x\", $res, mt_rand(0, 0xffff));\n }\n return substr($res, 0, $chars);\n }", "function genString($len) {\n global $alphabet;\n\n $finale = \"\";\n \n for ($curChar = 0; $curChar < $len; $curChar++)\n $finale .= $alphabet[rand(0, (strlen($alphabet) - 1))];\n\n return $finale;\n}", "function genRandomString() {\n //credits: http://bit.ly/a9rDYd\n $length = 50;\n $characters = \"0123456789abcdef\"; \n for ($p = 0; $p < $length ; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n\n return $string;\n }" ]
[ "0.77047366", "0.76092833", "0.75886685", "0.7489973", "0.74861985", "0.7437758", "0.7412867", "0.73086303", "0.7301061", "0.7286641", "0.728562", "0.7274973", "0.72679263", "0.7236917", "0.7218145", "0.7169612", "0.711009", "0.70662624", "0.70088685", "0.69720984", "0.69579345", "0.69194824", "0.6910734", "0.68984646", "0.68949825", "0.6890918", "0.689066", "0.68890786", "0.6882692", "0.68712604", "0.6860005", "0.6856435", "0.6850162", "0.6838805", "0.6828318", "0.68237823", "0.6822655", "0.681906", "0.6792782", "0.6787674", "0.67874414", "0.6773431", "0.67718995", "0.675998", "0.6756333", "0.67412555", "0.67368263", "0.672697", "0.6726877", "0.6719604", "0.6710512", "0.66950005", "0.6686868", "0.66648656", "0.6664436", "0.66357976", "0.6632275", "0.6623732", "0.66168785", "0.66099995", "0.66036177", "0.65983504", "0.6594612", "0.65771234", "0.6575759", "0.6568462", "0.656777", "0.65639776", "0.65459687", "0.6543085", "0.6539601", "0.6539107", "0.6538966", "0.65350753", "0.65234995", "0.6523172", "0.6513049", "0.6510419", "0.65096915", "0.6504559", "0.6504256", "0.650346", "0.65006596", "0.6493629", "0.6482105", "0.6466987", "0.6463515", "0.6462777", "0.642782", "0.6419192", "0.6418281", "0.6414626", "0.64099276", "0.6409582", "0.6404665", "0.64030504", "0.6399071", "0.639582", "0.6395439", "0.6395254" ]
0.88800955
0
Builds the form. Symfony2 doesn't let us see the form data in this method, unless using an event listener hook. Which seems perfectyl logical, but we need it. So we are requiring the calling method to give us the neccessary data in the constructor...
public function buildForm(FormBuilder $builder, array $options) { $builder->add('title', 'text'); $builder->add('body', 'textarea'); if (!$this->special) { $builder->add('inMenu', 'checkbox'); $builder->add('fbbox', 'checkbox'); $parentlist = $this ->container ->get('doctrine') ->getRepository('EotvosVersenyrBundle:TextPage') ->getPossibleParentList(); $parent = array(); foreach ($parentlist as $record) { $title = $record->getTitle(); for ($i = 0; $i < $record->getLvl(); $i++) { $title = '-'.$title; } $parents[$record->getId()] = $title; } $builder->add('parent', 'entity', array( 'class' => 'Eotvos\VersenyrBundle\Entity\TextPage', 'property' => 'titleWithLevel', 'required' => true, 'choices' => $parentlist, 'multiple' => false, 'expanded' => false, )); } else { if ($this->subform!=null) { $builder->add($this->special, $this->subform); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildForm()\n {\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "private function build()\n {\n $this->form->addText(\n 'name',\n $this->teamMember === null ? null : $this->teamMember->getName(),\n null,\n 'inputText title',\n 'inputTextError title'\n );\n\n $this->form->addEditor(\n 'description',\n $this->teamMember === null ? null : $this->teamMember->getDescription()\n );\n\n $this->meta = new Meta(\n $this->form,\n $this->teamMember === null ? null : $this->teamMember->getMetaId(),\n 'name',\n true\n );\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function build() { $this->form_built = TRUE; return $this; }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "public function buildForm()\n {\n $this\n ->add('group_name', 'text')\n ->add(\n 'organizations',\n 'choice',\n [\n 'choices' => $this->getOrganizationName(),\n 'attr' => ['style' => 'height:100px'],\n 'multiple' => true\n ]\n )\n ->add(\n 'group_identifier',\n 'text',\n [\n 'attr' => [\n 'id' => 'group_identifier'\n ],\n 'help_block' => [\n 'text' => \"Your group identifier will be used as a prefix for your organisation group. We recommend that you use a short abbreviation that uniquely identifies your organisation group. If your group identifier is 'abc' the username for the group created with this registration will be 'abc_group'.\",\n 'tag' => 'p',\n 'attr' => ['class' => 'help-block']\n ],\n 'label' => 'Group Identifier'\n ]\n );\n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "function build() {\n $this->built = TRUE;\n foreach ($this->build_callbacks as $callback) {\n call_user_func($callback, $this);\n drupal_alter(\"fapitng_form_$callback\", $this);\n }\n drupal_alter('fapitng_form', $this);\n }", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "public function buildForm(array $form, FormStateInterface $form_state) {\n // Get anything we need from the base class.\n $form = parent::buildForm($form, $form_state);\n\n // Drupal provides the entity to us as a class variable. If this is an\n // existing entity, it will be populated with existing values as class\n // variables. If this is a new entity, it will be a new object with the\n // class of our entity. Drupal knows which class to call from the\n // annotation on our Robot class.\n $robot = $this->entity;\n\n// return $this->buildDialogForm($form, $form_state);\n\n // Return the form.\n return $form;\n }", "public function buildForm(FormBuilderInterface $formBuilder): void;", "function buildForm(){\n\t\t# menampilkan form\n\t}", "private function createForm()\n\t{\n\t\t$builder = $this->getService('form')->create();\n\t\t$builder->setValidatorService($this->getService('validator'));\n\t\t$builder->setFormatter(new BasicFormFormatter());\n\t\t$builder->setDesigner(new DoctrineDesigner($this->getDoctrine(), 'Entity\\User',array('location')));\n\n\t\t$builder->getField('location')->setRequired(true);\n\t\t$builder->submit($this->getRequest());\n\n\t\treturn $builder;\n\t}", "protected function build()\n\t{\n\t}", "public function buildForm()\n {\n $formBuilder = $this\n ->formFactory\n ->createNamedBuilder(null);\n\n $orderId = $this\n ->paymentBridge\n ->getOrderId();\n\n $orderCurrency = $this\n ->paymentBridge\n ->getCurrency();\n\n $this->checkCurrency($orderCurrency);\n\n /**\n * Creates the success return route, when coming back\n * from PayPal web checkout.\n */\n $successReturnUrl = $this\n ->urlFactory\n ->getSuccessReturnUrlForOrderId($orderId);\n\n /**\n * Creates the cancel payment route, when cancelling\n * the payment process from PayPal web checkout.\n */\n $cancelReturnUrl = $this\n ->urlFactory\n ->getCancelReturnUrlForOrderId($orderId);\n\n /**\n * Creates the IPN payment notification route,\n * which is triggered after PayPal processes the\n * payment and returns the validity of the transaction.\n *\n * For forther information\n *\n * https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/\n * https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/\n */\n $processUrl = $this\n ->urlFactory\n ->getProcessUrlForOrderId($orderId);\n\n $formBuilder\n ->setAction($this->urlFactory->getApiEndpoint())\n ->setMethod('POST')\n ->add('business', HiddenType::class, [\n 'data' => $this->settingsProvider->getBusiness(),\n ])\n ->add('return', HiddenType::class, [\n 'data' => $successReturnUrl,\n ])\n ->add('cancel_return', HiddenType::class, [\n 'data' => $cancelReturnUrl,\n ])\n ->add('notify_url', HiddenType::class, [\n 'data' => $processUrl,\n ])\n ->add('currency_code', HiddenType::class, [\n 'data' => $orderCurrency,\n ])\n ->add('env', HiddenType::class, [\n 'data' => '',\n ]);\n\n /**\n * Create a PayPal cart line for each order line.\n *\n * Project specific PaymentBridgeInterface::getExtraData\n * should return an array of this form\n *\n * ['items' => [\n * 0 => [ 'item_name' => 'Item 1', 'amount' => 1234, 'quantity' => 2 ],\n * 1 => [ 'item_name' => 'Item 2', 'amount' => 2345, 'quantity' => 1 ],\n * ]]\n *\n * The 'items' key consists of an array with the basic information\n * of each line of the order. Amount is the price of the product,\n * not the total of the order line\n */\n $cartData = $this->paymentBridge->getExtraData();\n $itemsData = $cartData['items'];\n $iteration = 1;\n\n foreach ($itemsData as $orderLine) {\n $formBuilder\n ->add('item_name_'.$iteration, HiddenType::class, [\n 'data' => $orderLine['item_name'],\n ])\n ->add('amount_'.$iteration, HiddenType::class, [\n 'data' => $orderLine['amount'],\n ])\n ->add('quantity_'.$iteration, HiddenType::class, [\n 'data' => $orderLine['quantity'],\n ]);\n ++$iteration;\n }\n\n if (isset($cartData['discount_amount_cart'])) {\n $formBuilder->add('discount_amount_cart', HiddenType::class, [\n 'data' => $cartData['discount_amount_cart'],\n ]);\n }\n\n return $formBuilder\n ->getForm()\n ->createView();\n }", "protected function build()\n {\n $factory = $this->getFactory();\n\n foreach ($this->filterConfig as $field => $config) {\n $this->add(\n $factory->createInput(\n $config\n )\n );\n }\n }", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "protected function _prepareForm()\n {\n /** @var DataForm $form */\n /** @noinspection PhpUnhandledExceptionInspection */\n $form = $this->_formFactory->create();\n\n // define field set\n $fieldSet = $form->addFieldset('base_fieldset', ['legend' => __('Widget')]);\n\n // retrieve widget key\n $widgetKey = $this->widgetInstance->getWidgetKey();\n\n // add new field\n $fieldSet->addField(\n 'select_widget_type_' . $widgetKey,\n 'select',\n [\n 'label' => __('Widget Type'),\n 'title' => __('Widget Type'),\n 'name' => 'widget_type',\n 'required' => true,\n 'onchange' => \"$widgetKey.validateField()\",\n 'options' => $this->_getWidgetSelectOptions(),\n 'after_element_html' => $this->_getWidgetSelectAfterHtml()\n ]\n );\n\n // set form information\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setUseContainer(true);\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setId('widget_options_form' . '_' . $widgetKey);\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setMethod('post');\n /** @noinspection PhpUndefinedMethodInspection */\n $form->setAction($this->getUrl('adminhtml/*/buildWidget'));\n $this->setForm($form);\n }", "public function buildForm(array $form, FormStateInterface $form_state);", "public function build(Form $form):Form\n {\n foreach ($this->classType->getProperties() as $property) {\n $this->add($form, $property);\n }\n \n return $form;\n }", "public function buildYourSelf(FormBuilderInterface $builder, array $options){\n\n\n // FIRSTNAME\n $builder->add(\n \"firstName\",\n \"text\",\n array(\n 'label'=>$this->translator->trans(\"yourself.firstName.label\", [], $this->domain),\n 'required'=>false,\n 'attr'=>array(\n 'class'=>'form-control',\n 'placeholder'=>$this->translator->trans(\"yourself.firstName.placeholder\", [], $this->domain)\n )\n )\n );\n\n // LASTNAME\n $builder->add(\n \"lastName\",\n \"text\",\n array(\n 'label'=>$this->translator->trans(\"yourself.lastName.label\", [], $this->domain),\n 'required'=>false,\n 'attr'=>array(\n 'class'=>'form-control',\n 'placeholder'=>$this->translator->trans(\"yourself.lastName.placeholder\", [], $this->domain)\n )\n )\n );\n\n // SEX\n $builder->add(\n \"sex\",\n \"choice\",\n array(\n 'label'=>$this->translator->trans(\"yourself.sex.label\", [], $this->domain),\n 'choices'=>array(1=>\"Male\", 0=>\"Female\"),\n 'attr'=>array(\n 'class'=>'form-control'\n )\n )\n );\n \n // BIRTHDAY\n $currentDate = new \\DateTime();\n $year = intval($currentDate->format(\"Y\"));\n $years = array();\n for($i = 0; $i < 150;$i ++){\n $years[] = $year;\n $year --;\n }\n \n $builder->add(\n \"birthday\",\n \"date\",\n array(\n 'label'=>$this->translator->trans(\"yourself.birthday.label\", [], $this->domain),\n 'widget'=>'choice',\n 'years'=>$years,\n 'required'=>false,\n 'attr'=>array(\n 'class'=>'form-control'\n )\n )\n );\n\n // BIOGRAPHY\n $builder->add(\n \"biography\",\n \"textarea\",\n array(\n 'label'=>$this->translator->trans(\"yourself.biography.label\", [], $this->domain),\n 'required'=>false,\n 'attr'=>array(\n 'class'=>'form-control'\n )\n )\n );\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n{\n // TODO: Implement buildForm() method.\n}", "function buildSettingsForm() {}", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "public function 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}", "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 }", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n }", "public function build()\n {\n $this->classMetadata->appendExtension($this->getExtensionName(), [\n 'groups' => [\n $this->fieldName,\n ],\n ]);\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix(self::HTML_ID_PREFIX);\n $integrationData = $this->_coreRegistry->registry(\n Integration::REGISTRY_KEY_CURRENT_INTEGRATION\n );\n $this->_addGeneralFieldset($form, $integrationData);\n if (isset($integrationData['integration_id'])) {\n $integrationStores = $this->integrationStoresRepository->getListByIntegration(\n $integrationData['integration_id']\n );\n $integrationData['integration_stores'] = $integrationStores;\n }\n $form->addValues($integrationData);\n $this->setForm($form);\n return $this;\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n\t{\n// \t\t$this->configureOptions($resolver);\n// \t\t$this->options = $resolver->resolve($options);\n\t\n\t\t$builder\n\t\t->add('id', 'hidden')\n\t\t->add('name', 'text')\n\t\t->add('nameFirst', 'text')\n\t\t->add('position', 'text')\r\n\t\t->add('role', 'text');\t\n\t}", "function build() {\n $this->to_usd = new view_field(\"To USD\");\n $this->to_local = new view_field(\"To local\");\n $this->timestamp = new view_field(\"Created\");\n $this->expire_date_time = new view_field(\"Expired\");\n parent::build();\n }", "public function populateForm() {}", "public function buildFormFields()\n {\n $this->addField(\n SharpFormTextField::make('title')\n ->setLabel('Title')\n )->addField(\n SharpFormUploadField::make('cover')\n ->setLabel('Cover')\n ->setFileFilterImages()\n ->setCropRatio('1:1')\n ->setStorageBasePath('data/service')\n )->addField(\n SharpFormNumberField::make('price')\n ->setLabel('Price')\n )->addField(\n SharpFormMarkdownField::make('description')->setToolbar([\n SharpFormMarkdownField::B, SharpFormMarkdownField::I,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::IMG,\n SharpFormMarkdownField::SEPARATOR,\n SharpFormMarkdownField::A,\n ])\n )->addField(\n SharpFormTagsField::make('tags',\n Tag::orderBy('label')->get()->pluck('label', 'id')->all()\n )->setLabel('Tags')\n ->setCreatable(true)\n ->setCreateAttribute('name')\n );\n }", "public function buildForm(FormBuilderInterface $builder, array $options) {\n\t\t// Usamos la propiedad 'allow_extra_fields' y 'attr' pasar las variables\n\t\t$permissionLoggedUser = $options['allow_extra_fields'];\n\t\t$medicalHistoryNumber = $options['attr']['medicalHistoryNumber'];\n\t\t$clinicNameUrl = $options['attr']['clinicNameUrl'];\n\t\t$userLoggedId = $options['attr']['userLoggedId'];\n\t\tif($medicalHistoryNumber == 'without_MedicalHistoryNumber' ){\n\t\t\t$builder\n\t\t\t\t->add('medicalHistory', EntityType::class,array(\n\t\t\t\t\t'class' => 'BackendBundle:MedicalHistory',\n\t\t\t\t\t'choice_label' => 'MedicalHistoryList',\n\t\t\t\t\t'query_builder' => function($er) use ($clinicNameUrl){\n\t\t\t\t\t\treturn $er->createQueryBuilder('mH')\n\t\t\t\t\t\t->innerJoin('mH.clinic','c', 'c.id = mH.clinic')\n\t\t\t\t\t\t->where('c.nameUrl =:clinicNameUrl')\n\t\t\t\t\t\t->setParameter('clinicNameUrl', $clinicNameUrl);\n\t\t\t\t\t},\n\t\t\t\t\t'label' => 'userName',\n\t\t\t\t\t'expanded' => false, // Muestra todas las opciones (radio buttons O checkboxes)\n\t\t\t\t\t'multiple' => false, // Multiple seleccion ( select tag\t O select tag (with multiple attribute)\t)\n\t\t\t\t\t'attr' =>array('class' => 'form-control', 'data-toggle-class' => 'btn-primary', 'style' => 'margin-bottom:13px')\n\t\t\t));\n\t\t}\n\t\t$builder\n\t\t\t->add('shoeSize', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('height', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('weight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\t\t\t\t\t\t\t\t\n\t\t\t->add('reasonConsultation', TextareaType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('class'=>'form-control', 'style' => 'margin-bottom:13px;margin-top:3px;')))\n\t\t\t->add('background', TextareaType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('class'=>'form-control', 'style' => 'margin-bottom:13px')))\n\t\t\t->add('articularExplorationRotaryPatternExternalLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 30px; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationRotaryPatternExternalRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 30px; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationRotaryPatternInternalLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 30px; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationRotaryPatternInternalRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 30px; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationHipLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationHipRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationKneeLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationKneeRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n \t->add('articularExplorationAnkleLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n \t->add('articularExplorationAnkleRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationRetroPieLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationRetroPieRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationBeforeFootLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationBeforeFootRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationFirstRadioLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationFirstRadioRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationFifthRadioLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationFifthRadioRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px;')))\n\t\t\t->add('articularExplorationCentralRadiosLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationCentralRadiosRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationFirstFingerLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationFirstFingerRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationSmallerFingersLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('articularExplorationSmallerFingersRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsFemoralLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsFemoralRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsGenusLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsGenusRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsAngleQLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsAngleQRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsTibialLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsTibialRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsHelbingLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('torsionsHelbingRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('dissimmetry', TextareaType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('class'=>'form-control', 'style' => 'margin-bottom:13px')))\n\t\t\t->add('muscularExplorationDorsalFlexionLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('muscularExplorationDorsalFlexionRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('muscularExplorationPlantarFlexionLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('muscularExplorationPlantarFlexionRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('muscularExplorationEversionLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('muscularExplorationEversionRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('muscularExplorationReversalLeft', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('muscularExplorationReversalRight', TextType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('style' => 'margin-right:6px;width: 100%; border: 0px; text-align:center;')))\n\t\t\t->add('dinamicExploration', TextareaType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('class'=>'form-control', 'style' => 'margin-bottom:13px')))\n\t\t\t->add('signsFootprint', TextareaType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('class'=>'form-control', 'style' => 'margin-bottom:13px')))\n\t\t\t->add('suplementaryTest', TextareaType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('class'=>'form-control', 'style' => 'margin-bottom:13px')))\n\t\t\t->add('diagnostic', TextareaType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('class'=>'form-control', 'style' => 'margin-bottom:13px')))\n\t\t\t->add('treatment', TextareaType::class, array(\n\t\t\t\t'required'=>false,\n\t\t\t\t'attr'=>array('class'=>'form-control', 'style' => 'margin-bottom:13px')));\n\t\tif($permissionLoggedUser->getMedicalHistoryUserRegistererEdit() == true){\n\t\t\t$builder\n\t\t\t\t->add('userRegisterer', EntityType::class,array(\n\t\t\t\t\t'class' => 'BackendBundle:User',\n\t\t\t\t\t'choice_label' => 'user',\n\t\t\t\t\t'query_builder' => function($er) use( $clinicNameUrl, $userLoggedId ) {\n\t\t\t\t\t\treturn $er->getUserDoctorListOfClinic($clinicNameUrl, $userLoggedId);\n \t},\n\t\t\t\t\t'label' => 'userName',\n\t\t\t\t\t'expanded' => false,\t\t// Muestra todas las opciones (radio buttons O checkboxes)\n\t\t\t\t\t'multiple' => false,\t\t// Multiple seleccion ( select tag\t O select tag (with multiple attribute)\t)\n\t\t\t\t\t'attr' =>array('class' => 'form-control', 'data-toggle-class' => 'btn-primary', 'style' => 'margin-bottom:13px')\n\t\t\t\t));\n\t\t\t}\n\t\tif($permissionLoggedUser->getMedicalHistoryRegistrationDateEdit() == true){\n\t\t\t$builder\n\t\t\t\t->add('registrationDate', DateType::class, array(\n\t\t\t\t\t'required'=>false,\n\t\t\t\t\t'widget' => 'single_text',\n\t\t\t\t\t'format'=>'dd/MM/yyyy',\n\t\t\t\t\t'html5' => false,\n\t\t\t\t\t'attr'=>array('class' => 'form-control')\n\t\t\t\t));\n\t\t\t}\n\t\tif($permissionLoggedUser->getMedicalHistoryUserModifierEdit() == true){\n\t\t\t$builder\n\t\t\t\t->add('userModifier', EntityType::class,array(\n\t\t\t\t\t'class' => 'BackendBundle:User',\n\t\t\t\t\t'choice_label' => 'user',\n\t\t\t\t\t'query_builder' => function($er) use( $clinicNameUrl, $userLoggedId ) {\n\t\t\t\t\t\treturn $er->getUserDoctorListOfClinic($clinicNameUrl, $userLoggedId);\n \t},\n\t\t\t\t\t'label' => 'userName',\n\t\t\t\t\t'expanded' => false, // Muestra todas las opciones (radio buttons O checkboxes)\n\t\t\t\t\t'multiple' => false, // Multiple seleccion ( select tag\t O select tag (with multiple attribute)\t)\n\t\t\t\t\t'attr' =>array('class' => 'form-control', 'data-toggle-class' => 'btn-primary', 'style' => 'margin-bottom:13px')\n\t\t\t\t));\n\t\t\t}\n\t\tif($permissionLoggedUser->getMedicalHistoryModificationDateEdit() == true){\n\t\t\t$builder\n\t\t\t\t->add('modificationDate', DateType::class, array(\n\t\t\t\t\t'required'=>false,\n\t\t\t\t\t'widget' => 'single_text',\n\t\t\t\t\t'format'=>'dd/MM/yyyy',\n\t\t\t\t\t'html5' => false,\n\t\t\t\t\t'attr'=>array('class' => 'form-control'),\n\t\t\t\t\t'data' => new \\DateTime(\"now\")\n\t\t\t\t));\n\t\t\t}\n\t\t$builder\n\t\t\t->add('submit',SubmitType::class, array(\n\t\t\t\t'attr'=>array('class'=>'form-submit btn btn-success', 'style' => 'margin-bottom:13px, display:block')));\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 createForm()\n {\n }", "public function __construct()\n {\n self::build();\n }", "abstract public function createForm();", "abstract public function createForm();", "public function __construct()\n {\n parent::__construct('ServicioForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'servicio_nombre',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Nombre',\n ),\n ));\n $this->add(array(\n 'name' => 'servicio_descripcion',\n 'type' => 'textarea',\n 'options' => array(\n 'label' => 'Descripcion',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_costo',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Costo',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_precio',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'Precio',\n ),\n ));\n \n $this->add(array(\n 'name' => 'servicio_iva',\n 'type' => 'Text',\n 'options' => array(\n 'label' => 'IVA',\n ),\n ));\n \n\n\n }", "function prepare() {\n $this->addChild(new fapitng_FormHidden('form_build_id', array(\n 'value' => $this->build_id,\n )));\n $this->addChild(new fapitng_FormHidden('form_id', array(\n 'value' => $this->id,\n )));\n if ($this->token) {\n $this->addChild(new fapitng_FormHidden('form_token', array(\n 'value' => $this->token,\n )));\n }\n }", "protected function _prepareForm()\n {\n //instantiate the form\n $_form = new Varien_Data_Form(\n array(\n 'id' => 'edit_form',\n 'action' => $this->getData('action'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n \n //the artist\n $_consumer = Mage::registry('current_consumer');\n\n if ($_consumer->getId()) {\n $_form->addField(\n 'consumer_id', \n 'hidden', \n array(\n 'name' => 'consumer_id',\n )\n );\n $_form->setValues($_consumer->getData());\n }\n\n $_form->setUseContainer(true);\n $this->setForm($_form);\n return parent::_prepareForm();\n }", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {\n $userProduct = $event->getData();\n $form = $event->getForm();\n // checks if the Product object is \"new\"\n // If no data is passed to the form, the data is \"null\".\n // This should be considered a new \"Product\"\n if (!$userProduct || null === $userProduct->getId()) {\n $form->add('product', EntityType::class, [\n 'class' => Product::class,\n 'choice_label' => 'name',\n ]);\n }\n })\n ->add('product', HiddenType::class, [\n 'mapped' => false,\n ])\n // other, constant fields of the form\n ->add('unit', EntityType::class, [\n 'class' => Unit::class,\n 'choice_label' => 'shortName',\n ])\n ->add('amount', NumberType::class)\n ->add('save', SubmitType::class)\n ;\n }", "public function __construct(FormInterface $form)\n {\n // Grab the Fields out of the form...\n $this->fields = $form->getData()['fields'];\n }", "function build() {\n\t\t$this->order_id = new view_field(\"Order ID\");\n\t\t$this->timestamp = new view_field(\"Date\");\n\t\t$this->total_amount = new view_field(\"Amount\");\n $this->view= new view_element(\"static\");\n \n $translations = new translations(\"fields\");\n $invoice_name = $translations->translate(\"fields\",\"Invoice\",true);\n $this->view->value=\"<a href=\\\"/orders/order_details.php?order_id={$this->_order_id}\\\" target=\\\"invoice\\\">\".$invoice_name.\"</a>\";\n\n\t\tif(isset($_SESSION['wizard']['complete']['process_time']))\n\t\t{\n\t\t\t$this->process_time = new view_field(\"Seconds to process\");\n\t\t\t$this->process_time->value=$_SESSION['wizard']['complete']['process_time'];\n\t\t\t$this->server = new view_field();\n\t\t\t$address_parts = explode('.',$_SERVER['SERVER_ADDR']);\n\t\t\t$this->server->value = $address_parts[count($address_parts) - 1];\n\t\t}\n\t\tparent::build();\n\t}", "public function __construct( Form $form ) {\n\t\t$this->form = $form;\n\t\t$this->phpRenderer = $this->form->getRenderer();\n\t\t$this->templatesEngine = ( Application::get() )->plugin->get( Engine::class );\n\n\t\t$this->setupFieldsAttributes();\n\t}", "public function build()\n {\n }", "protected function _Build_Form_Instance() {\r\n parse_str(base64_decode($_POST['form_data']),$output);\r\n // Retrieve the form uuid\r\n $form_uuid = vcff_get_uuid_by_form($output['post_ID']);\r\n // If there is no form type and form id\r\n if (!$output['form_type'] && $output['post_ID']) {\r\n // Get the saved vcff form type\r\n $meta_form_type = get_post_meta($output['post_ID'], 'form_type',true);\r\n } // Otherwise use the passed form type \r\n else { $meta_form_type = $output['form_type']; }\r\n // PREPARE PHASE\r\n $form_prepare_helper = new VCFF_Forms_Helper_Prepare();\r\n // Get the form instance\r\n $form_instance = $form_prepare_helper\r\n ->Get_Form(array(\r\n 'uuid' => $form_uuid,\r\n 'contents' => $output['content'],\r\n 'type' => $meta_form_type,\r\n ));\r\n // If the form instance could not be created\r\n if (!$form_instance) { die('could not create form instance'); }\r\n // POPULATE PHASE\r\n $form_populate_helper = new VCFF_Forms_Helper_Populate();\r\n // Run the populate helper\r\n $form_populate_helper\r\n ->Set_Form_Instance($form_instance)\r\n ->Populate(array(\r\n 'meta_values' => $output\r\n ));\r\n // CALCULATE PHASE\r\n $form_calculate_helper = new VCFF_Forms_Helper_Calculate();\r\n // Initiate the calculate helper\r\n $form_calculate_helper\r\n ->Set_Form_Instance($form_instance)\r\n ->Calculate(array(\r\n 'validation' => false\r\n ));\r\n // Save the form instance\r\n $this->form_instance = $form_instance;\r\n // If an action id was provided\r\n if ($_POST['action_id']) {\r\n // Retrieve the action id\r\n $action_id = $_POST['action_id'];\r\n // Get an empty action \r\n $action_instance = $form_instance\r\n ->Get_Event($action_id); \r\n // If no action instance was returned\r\n if (!$action_instance) {\r\n // Create a new instance helper\r\n $events_helper_instance = new VCFF_Events_Helper_Instance();\r\n // Create an instance instance from the posted data\r\n $this->action_instance = $events_helper_instance\r\n ->Set_Form_Instance($this->form_instance)\r\n ->Build(array());\r\n } // Otherwise load the action instance\r\n else { $this->action_instance = $action_instance; }\r\n } // Otherwise if we are creating a new instance \r\n else {\r\n // Create a new instance helper\r\n $events_helper_instance = new VCFF_Events_Helper_Instance();\r\n // Create an instance instance from the posted data\r\n $this->action_instance = $events_helper_instance\r\n ->Set_Form_Instance($this->form_instance)\r\n ->Build(array());\r\n }\r\n }", "protected function createFormFields() {\n\t}", "protected function build()\n {\n $this->request = $this->client->createRequest(RequestInterface::POST, 'actions/u2i/conversion', null, $this->getAll());\n }", "public function build() {}", "public function build() {}", "public function build() {}", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n //$builder->addModelTransformer($transfromer);\n $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {\n $data = $event->getData();\n if (null !== $data) {\n $event->setData($this->transform($data));\n } else {\n $event->setData(0);\n }\n });\n\n $builder->addEventListener(FormEvents::SUBMIT, function(FormEvent $event) use ($options) {\n $data = $event->getData();\n if (!$options['is_filter'] && (null !== $data)) {\n $event->setData($this->reverseTransform($data, $options['class']));\n }\n });\n }", "public function form_builder()\n {\n // ToDo run checks when form is being created, please.\n// if(!empty($this->check())):\n// throw new ValidationError(checks_html_output($this->check()));\n//\n// endif;\n\n return new form\\ModelForm($this, $this->_field_values());\n }", "public function build()\n {\n $fieldtype_rules = $this->getFieldtypeValidationRules($this->fieldset->fieldtypes());\n\n $field_validation_data = $this->getFieldValidationData($this->fieldset->inlinedFields());\n\n $this->rules = array_merge($fieldtype_rules, $field_validation_data['rules']);\n\n $this->attributes = $field_validation_data['attributes'];\n\n return $this;\n }", "public function buildCreateForm(FormBuilderInterface $builder, array $options);", "abstract function setupform();", "public function build_forms()\n {\n // Get list of categories to populate the category selector\n $em = EntityManagerSingleton::getInstance();\n\n $category_options = [];\n $category_listings = $em->getRepository('Library\\Model\\Category\\Category')->findAllWithHierarchy();\n\n // Get list of categories that are theme categories so that they are are not included\n $criteria = new Criteria();\n $criteria->where($criteria->expr()->eq('id', Category::THEME_CATEGORY_ID))->orWhere($criteria->expr()->eq('parent_category', $em->getReference('Library\\Model\\Category\\Category', Category::THEME_CATEGORY_ID)));\n $theme_categories = $em->getRepository('Library\\Model\\Category\\Category')->matching($criteria);\n $all_theme_category_ids = [];\n if ($theme_categories->count() > 0)\n {\n /** @var Category $theme_category */\n foreach ($theme_categories as $theme_category)\n $all_theme_category_ids[] = $theme_category->getId();\n }\n\n if (!empty($category_listings))\n {\n foreach($category_listings as $listing)\n {\n // Don't include theme categories in the list\n if (in_array($listing['id'], $all_theme_category_ids))\n continue;\n\n // Construct listing name\n $listing_name = \"\";\n if (count($listing['ancestors']) > 0)\n {\n foreach ($listing['ancestors'] as $ancestor)\n {\n $listing_name .= $ancestor['name'] . \" >> \";\n }\n }\n\n $listing_name .= $listing['name'];\n $category_options[$listing['id']] = $listing_name;\n }\n }\n\n // Get list of statuses to list for products\n $this->status_options = [];\n $status_listings = $em->getRepository('Library\\Model\\Product\\Status')->findAll();\n $this->status_options[0] = \"None\";\n\n if (count($status_listings) > 0)\n {\n foreach ($status_listings as $staus_listing)\n {\n $this->status_options[$staus_listing->getId()] = $staus_listing->getName();\n }\n }\n\n // Get list of options for skus form\n $option_list = [];\n $options = $em->getRepository('Library\\Model\\Product\\Option')->findAll();\n if (!empty($options))\n {\n foreach ($options as $option)\n {\n $option_list[$option->getId()] = $option->getName();\n }\n }\n\n // Add content to forms\n $this->create_update_form->get('category')->setAttribute('options', $category_options);\n $this->create_update_form->get('status_override')->setAttribute('options', $this->status_options);\n $this->create_update_form->get('status')->setAttribute('options', $this->status_options);\n $this->add_skus_form->get('options')->setAttribute('options', $option_list);\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: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "public function init()\n {\n // set class to identify as p4cms-ui component\n $this->setAttrib('class', 'p4cms-ui')\n ->setAttrib('dojoType', 'p4cms.ui.grid.Form');\n\n // turn off CSRF protection - its not useful here (form data are\n // used for filtering the data grid and may be exposed in the URL)\n $this->setCsrfProtection(false);\n\n // call parent to publish the form.\n parent::init();\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "public function __construct() {\n \n parent::__construct();\n $this->load->library('form_builder');\n \n }", "public function __construct() {\n \n parent::__construct();\n $this->load->library('form_builder');\n \n }", "public function __construct()\n {\n parent::__construct();\n $this->FormGenerator = new FormGenerator();\n }", "function buildForm(&$form) {\n CRM_Utils_System::setTitle(ts('Search for journalists'));\n\n $this->assignLanguageFilter($form);\n $this->assignFilter($form,\"functions\",\"function\");\n $this->assignFilter($form,\"teams\",\"team\");\n $this->assignFilter($form,\"categories\",\"Categorie\");\n $this->assignFilter($form,\"frequencies\",\"Periodicitei\");\n $this->assignFilter($form,\"types\",\"Perssoort\");\n $form->assign('elements', $this->criteria);\n }", "protected function _prepareForm()\r\n {\r\n $form = new Varien_Data_Form(array(\r\n 'id' => 'edit_form',\r\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\r\n 'method' => 'post',\r\n 'enctype' => 'multipart/form-data',\r\n )\r\n );\r\n\r\n $fieldSet = $form->addFieldset('magento_form', array('legend' => $this->helper->__('Webhook information')));\r\n\r\n $fieldSet->addField('code', 'select', array(\r\n 'label' => $this->helper->__('Code'),\r\n 'class' => 'required-entry',\r\n 'name' => 'code',\r\n 'values' => ApiExtension_Magento_Block_Adminhtml_Webhooks_Grid::getAvailableHooks()\r\n ));\r\n\r\n $fieldSet->addField('url', 'text', array(\r\n 'label' => $this->helper->__('Callback URL'),\r\n 'class' => 'required-entry',\r\n 'name' => 'url',\r\n ));\r\n\r\n $fieldSet->addField('description', 'textarea', array(\r\n 'label' => $this->helper->__('Description'),\r\n 'name' => 'description',\r\n ));\r\n\r\n $fieldSet->addField('data', 'textarea', array(\r\n 'label' => $this->helper->__('Data'),\r\n 'name' => 'data',\r\n ));\r\n\r\n $fieldSet->addField('token', 'text', array(\r\n 'label' => $this->helper->__('Token'),\r\n 'name' => 'token',\r\n ));\r\n\r\n $fieldSet->addField('active', 'select', array(\r\n 'label' => $this->helper->__('Active'),\r\n 'values' => ApiExtension_Magento_Block_Adminhtml_Webhooks_Grid::getOptionsForActive(),\r\n 'name' => 'active',\r\n ));\r\n\r\n if ($this->session->getWebhooksData()) {\r\n $form->setValues($this->session->getWebhooksData());\r\n $this->session->setWebhooksData(null);\r\n } elseif (Mage::registry('webhooks_data')) {\r\n $form->setValues(Mage::registry('webhooks_data')->getData());\r\n }\r\n\r\n $form->setUseContainer(true);\r\n $this->setForm($form);\r\n return parent::_prepareForm();\r\n }", "public function buildFields() {\n }", "public function build ()\n {\n }", "private function prepareForm()\n {\n $this->ValidateFormParameters();\n\n $sign_data = $this->GenerateSignData();\n $secure_hash = $this->GenerateSecureHash($sign_data);\n\n $this->setFormParameter('secureHash', $secure_hash);\n\n return $this;\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Select order')]);\n $fieldset->addField(\n 'direction',\n 'select',\n [\n 'name' => 'direction',\n 'label' => __('Direction'),\n 'title' => __('Direction'),\n 'required' => true,\n 'options' => ['shipment' => 'Store -> Customer', 'invert' => 'Customer -> Store', 'refund' => 'RMA (return)']\n ]\n );\n $fieldset->addField(\n 'order_id',\n 'text',\n [\n 'name' => 'order_id',\n 'label' => __('Order #'),\n 'title' => __('Order #'),\n 'required' => true\n ]\n );\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function build( $data );", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('finder_dropdown_');\n $values = [];\n foreach($this->_model->getDropdowns() as $dropdown) {\n $prefix = 'dropdown_'.$dropdown->getId();\n\n $fieldset = $form->addFieldset($prefix, ['legend' => __('Dropdown #%1',$dropdown->getPos()+1)]);\n $fieldset->addField(\n $prefix . '_name',\n 'text',\n ['name'=>$prefix . '_name', 'label' => __('Name'), 'title' => __('Name'), 'required' => true]\n );\n $values[$prefix . '_name'] = $dropdown->getName();\n $fieldset->addField(\n $prefix . '_sort',\n 'select',\n [\n 'name'=>$prefix . '_sort', 'label' => __('Sort'), 'title' => __('Sort'), 'required' => true,\n 'values' => [\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_STRING_ASC, 'label' => __('alphabetically, asc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_STRING_DESC, 'label' => __('alphabetically, desc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_NUM_ASC, 'label' => __('numerically, asc')],\n ['value' => \\Amasty\\Finder\\Helper\\Data::SORT_NUM_DESC, 'label' => __('numerically, desc')],\n ]\n ]\n );\n $values[$prefix . '_sort'] = $dropdown->getSort();\n\n $fieldset->addField(\n $prefix . '_range',\n 'select',\n [\n 'name'=>$prefix . '_range', 'label' => __('Range'), 'title' => __('Range'), 'required' => true,\n 'values' => [\n ['value' => 0, 'label' => __('No')],\n ['value' => 1, 'label' => __('Yes')],\n ]\n ]\n );\n $values[$prefix . '_range'] = $dropdown->getRange();\n }\n $form->setValues($values);\n $this->setForm($form);\n return parent::_prepareForm();\n }", "protected function build(Form $form)\n\t{\n\t\t$id = $this->getParameter('id');\n\t\t$control = $this->getParameter('control');\n\t\t$editRow = $id ? $this->templatesModel->getItem($id) : null;\n\t\t$source = null;\n\n\t\tif ($id) {\n\t\t\t$rows = $this->templatesModel->getItemsBy($editRow['magic_control'], 'magic_control = ? AND template_name IS NULL')->fetchAll();\n\t\t\t$canBeEmptyTemplateName = ( count($rows) < 1 || (count($rows) == 1 && array_key_exists($id, $rows)) );\n\t\t\t$form->addHidden('id', $id);\n\t\t\t$form->addHidden('magic_control', $editRow['magic_control']);\n\t\t} else {\n\t\t\t$rows = $this->templatesModel->getItemsBy($control, 'magic_control = ? AND template_name IS NULL')->fetchAll();\n\t\t\t$canBeEmptyTemplateName = count($rows) < 1;\n\t\t\t$form->addHidden('magic_control', $control);\n\t\t}\n\n\t\t$form->addText(\"template_name\", \"Název šablony\")\n\t\t\t->addRule(Form::MAX_LENGTH, \"Název šablony nesmí být delší, než %s znaků\", 64)\n\t\t\t->setRequired(!$canBeEmptyTemplateName)\n\t\t\t->setDefaultValue(($id && $editRow) ? $editRow['template_name'] : null);\n\n\t\tif ($id && $editRow) {\n\t\t\t$source = $editRow['source'];\n\t\t} elseif ($control) {\n\t\t\t$controls = $this->creator->getAllControls(true, true);\n\t\t\tif (array_key_exists($control, $controls)) {\n\t\t\t\t$pathToDefaultTemplate = $this->creator->createMagicControl($control)->getDefaultTemplateSource(null)->getPathName();\n\t\t\t\tif ($pathToDefaultTemplate) {\n\t\t\t\t\t$source = file_get_contents($pathToDefaultTemplate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$form->addTextArea(\"source\", \"Šablona\", null, 20)\n\t\t\t->addRule(Form::FILLED, \"Šablona nesmí být prázdná\")\n\t\t\t->setDefaultValue($source)\n ->setAttribute(\"class\", \"form-codemirror\")\n\t\t\t->setOption(\"description\", Html::el(\"span\")->addHtml(\"V šabloně komponenty můžete využívat šablonovací jazyk <a href='https://latte.nette.org' target='_blank'>Latte</a>.\"));\n//\t\t\t->setAttribute(\"help\", \"V šabloně nelze použít tyto makra: \". implode(', ', self::$UNAUTHORIZED_MACROS));\n\t}", "protected function _construct()\n {\n $this->_init(\\AddictedToMagento\\DynamicForms\\Model\\ResourceModel\\Form::class);\n }", "public function __construct(&$form_state) {\n $this->initializeStorage($form_state);\n $this->formState = &$form_state;\n $this->storage = &$this->formState['storage'][STORAGE_KEY];\n $this->collectionPid = $this->storage['collection_pid'];\n $this->collectionLabel = $this->storage['collection_label'];\n $this->contentModelPid = isset($this->storage['content_model_pid']) ? $this->storage['content_model_pid'] : NULL;\n $this->contentModelDsid = isset($this->storage['content_model_dsid']) ? $this->storage['content_model_dsid'] : NULL;\n $this->formName = isset($this->storage['form_name']) ? $this->storage['form_name'] : NULL;\n $this->page = &$this->storage['ingest_form_page'];\n }", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new JournalVoucher);\n\n $form->saved(function(Form $form){\n self::postToLedger($form->model());\n });\n\n $form->date('date', __('Date'))->default(date('Y-m-d'));\n \n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'project_id', \n __('Project'), \n 'admin/projects/create', \n '\\App\\Project')\n ->rules('required');\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'phase_id', \n __('Phase'), \n 'admin/phases/create', \n '\\App\\Phase')\n ->rules('required');\n\n $form->hasMany('journalVoucherDetails', __('Entries'), function (Form\\NestedForm $form) {\n \n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'account_head_id', \n __('Account Head'), \n 'admin/account-heads/create', \n '\\App\\AccountHead')\n ->rules('required');\n \n $form->text('description', __('Description'))->rules('required');\n\n $form->decimal('debit', __('Debit'));\n \n $form->decimal('credit', __('Credit'));\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'person_id', \n __('Person (Optional)'), \n '', \n '\\App\\Person');\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'property_file_id', \n __('Property File (Optional)'), \n '', \n '\\App\\PropertyFile');\n\n\n })->mode('table');\n\n return $form;\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n $builder\n //->add('created_at')\n ->add('modified_at')\n ->add('name')\n ;\n }", "function construct(array $form_data){\n\t\t\textract($form_data);\n\t\t\t$this->form_data = array(\n\t\t\t\t\"id_paciente\" => isset($id_paciente) ? $id_paciente : null,\n\t\t\t\t\"tipodocum_id_tipodocum\" => isset($tipodocum_id_tipodocum) ? $tipodocum_id_tipodocum : null,\n\t\t\t\t\"documento\" => isset($documento) ? strtoupper($documento) : null,\n\t\t\t\t\"nombres\" => isset($nombres) ? strtoupper($nombres) : null,\n\t\t\t\t\"apellidos\" => isset($apellidos) ? strtoupper($apellidos) : null,\n\t\t\t\t\"fecha_nacimiento\" => isset($fecha_nacimiento) ? $fecha_nacimiento : null,\n\t\t\t\t\"genero\" => isset($genero) ? strtoupper($genero) : null,\n\t\t\t\t\"telefono\" => isset($telefono) ? strtoupper($telefono) : null,\n\t\t\t\t\"celular\" => isset($celular) ? strtoupper($celular) : null,\n\t\t\t\t\"email\" => isset($email) ? $email : null,\n\t\t\t\t\"direccion\" => isset($direccion) ? strtoupper($direccion) : null,\n\t\t\t);\n\n\t\t\t$this->meditions = array(\n\t\t\t \"paciente_id_paciente\" => isset($paciente_id_paciente) ? $paciente_id_paciente : null,\n\t\t\t \"parametros_id_parametro\" => isset($parametros_id_parametro) ? $parametros_id_parametro : null,\n\t\t\t \"frecuencia_min\" => isset($frecuencia_min) ? $frecuencia_min : null,\n\t\t\t \"frecuencia_max\" => isset($frecuencia_max) ? $frecuencia_max : null,\n\t\t\t \"date_ini\" => isset($date_ini) ? $date_ini : 0,\n\t\t\t \"time_ini\" => isset($time_ini) ? $time_ini : 0,\n\n\t\t\t);\n\n\t\t\t$this->meditions[\"fecha_inicio\"] = $this->meditions[\"date_ini\"].\" \".$this->meditions[\"time_ini\"];\n\t\t\tunset($this->meditions[\"date_ini\"]);\n\t\t\tunset($this->meditions[\"time_ini\"]);\n\n\t\t\t$this->id_paciente = isset($id_paciente) ? $id_paciente : null;\n\t\t\t$this->tipodocum_id_tipodocum = isset($tipodocum_id_tipodocum) ? $tipodocum_id_tipodocum : null;\n\t\t\t$this->documento = isset($documento) ? strtoupper($documento) : null;\n\t\t}", "public function buildForm(FormBuilder $builder, array $options)\n {\n $builder\n ->add('name', 'text', array(\n 'label' => 'courseType.title',\n ))\n ->add('summary', 'textarea', array(\n 'label' => 'courseType.summary',\n ))\n ->add('startDate', 'date', array(\n 'label' => 'courseType.startDate',\n 'widget' => 'single_text',\n 'format' => 'dd-MM-yyyy',\n ))\n ->add('expirationDate', 'date', array(\n 'label' => 'courseType.expirationDate',\n 'widget' => 'single_text',\n 'required' => false,\n 'format' => 'dd-MM-yyyy',\n ))\n ->add('autoInscription', 'checkbox', array(\n 'label' => 'courseType.autoInscription',\n 'required' => false,\n 'value' => true,\n ))\n /*\n ->add('category', 'entity', array(\n 'class' => 'IMRIMLmsBundle:Category',\n 'label' => 'courseType.category',\n 'required' => true,\n 'empty_value' => 'Choisissez une catégorie',\n 'empty_data' => null,\n ))\n */\n ->add('picture', 'file', array(\n 'label' => 'courseType.file',\n 'required' => false,\n ));\n }", "public function build() {\n\t\t$this->add($this->Html->A(array('href' => 'http://cakephp.org', 'target' => '_blank', 'text' => 'CakePHP')));\n\t\t$this->add($this->Html->Abbr(array('text' => __('This is an abrreviation'))));\n\t\t$this->add($this->Html->Address(array('text' => __('This is an address'))));\n\t\t$this->add($this->Html->B(array('text' => __('This is bold text'))));\n\t\t$this->add($this->Html->Bdo(array('name' => 'value')));\n\t\t$this->add($this->Html->Blockquote(array('text' => __('This is a block quote'))));\n\t\t$this->add($this->Html->Br());\n\t\t$this->add($this->Html->Button(array('value' => __('This is a button'))));\n\t\t$this->add($this->Html->Cite(array('text' => __('This is a citation'))));\n\t\t$this->add($this->Html->Code(array('text' => __('This is a code block'))));\n\t\t$this->add($this->Html->Comment(array('text' => __('This is a comment'))));\n\t\t$this->add($this->Html->Del(array('text' => __('This is deleted text'))));\n\t\t$this->add($this->Html->Dfn(array('text' => __('This is a definition'))));\n\t\t$this->add($this->Html->Div(array('text' => __('This is a division'))));\n\t\t$dl = $this->Html->Dl(array('text' => __('This is a defined list')));\n\t\t$dl->add($this->Html->Dt(array('text' => __('This is a definition title'))));\n\t\t$dl->add($this->Html->Dd(array('text' => __('This is a definition data'))));\n\t\t$this->add($dl);\n\t\t$this->add($this->Html->Em(array('text' => __('This is text with emphasis'))));\n\t\t$form = $this->Html->Form(array('name' => 'example'));\n\t\t\t$fieldset = $this->Html->Fieldset();\n\t\t\t$fieldset->add($this->Html->Legend(array('text' => __('This is a legend of a fieldset'))));\n\t\t\t$fieldset->add($this->Html->Label(array('text' => __('This is a label'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'text', 'type' => 'text', 'value' => __('This is a text input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'password', 'type' => 'password', 'value' => __('This is a password input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'radio', 'type' => 'radio', 'value' => 'radio')));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'checkbox', 'type' => 'checkbox', 'value' => 'checkbox')));\n\t\t\t$fieldset->add($this->Html->Textarea(array('name' => 'textarea', 'text' => __('This is a textarea'))));\n\t\t\t\t$select = $this->Html->Select(array('name' => 'select'));\n\t\t\t\t\t$optgroup = $this->Html->Optgroup(array('label' => __('This is an option group')));\n\t\t\t\t\t$optgroup->add($this->Html->Option(array('value' => 123, 'text' => __('This is an option'))));\n\t\t\t\t$select->add($optgroup);\n\t\t\t$fieldset->add($select);\n\t\t$form->add($fieldset);\n\t\t$this->add($form);\n\t\t$this->add($this->Html->Hr());\n\t\t$this->add($this->Html->I(array('text' => __('This is text in italics'))));\n\t\t$this->add($this->Html->Iframe(array('name' => 'ctk', 'src' => 'https://github.com/jameswatts/cake-toolkit')));\n\t\t$this->add($this->Html->Img(array('src' => 'http://cakephp.org/img/cake-logo.png', 'alt' => 'CakePHP')));\n\t\t$this->add($this->Html->Ins(array('text' => __('This is inserted text'))));\n\t\t$this->add($this->Html->Kbd(array('text' => __('This is keyboard text'))));\n\t\t$map = $this->Html->Map();\n\t\t$map->add($this->Html->Area());\n\t\t$this->add($map);\n\t\t$this->add($this->Html->Noscript(array('text' => __('This is displayed if you do not have JavaScript enabled'))));\n\t\t$object = $this->Html->Object();\n\t\t$object->add($this->Html->Param(array('name' => 'example', 'value' => 123)));\n\t\t$this->add($object);\n\t\t$this->add($this->Html->P(array('text' => __('This is a paragraph of text'))));\n\t\t$this->add($this->Html->Pre(array('text' => __('This is preformatted text'))));\n\t\t$this->add($this->Html->Q(array('text' => __('This is a quotation'))));\n\t\t$this->add($this->Html->S(array('text' => __('This is a strike-through text'))));\n\t\t$this->add($this->Html->Samp(array('text' => __('This is a sample text'))));\n\t\t$this->add($this->Html->Small(array('text' => __('This is small text'))));\n\t\t$this->add($this->Html->Span(array('text' => __('This is a span'))));\n\t\t$this->add($this->Html->Strong(array('text' => __('This is a strong text'))));\n\t\t$this->add($this->Html->Style(array('name' => 'value')));\n\t\t$this->add($this->Html->Sub(array('text' => __('This is a sub-text'))));\n\t\t$this->add($this->Html->Sup(array('text' => __('This is a super-text'))));\n\t\t$table = $this->Html->Table(array('border' => 1));\n\t\t$table->add($this->Html->Caption(array('text' => __('This is a table caption'))));\n\t\t\t$colgroup = $this->Html->Colgroup();\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$tbody = $this->Html->Tbody();\n\t\t\t\t$tr = $this->Html->Tr();\n\t\t\t\t$tr->add($this->Html->Th(array('text' => __('This is a table header'))));\n\t\t\t\t$tr->add($this->Html->Td(array('text' => __('This is a table data'))));\n\t\t\t$tbody->add($tr);\n\t\t$table->add($colgroup);\n\t\t$table->add($tbody);\n\t\t$this->add($table);\n\t\t$ol = $this->Html->Ol();\n\t\t$ol->add($this->Html->Li(array('text' => __('This is an ordered list item'))));\n\t\t$this->add($ol);\n\t\t$ul = $this->Html->Ul();\n\t\t$ul->add($this->Html->Li(array('text' => __('This is an unordered list item'))));\n\t\t$this->add($ul);\n\t\t$this->add($this->Html->Var(array('text' => __('This is a variable'))));\n\t}", "public function init()\n {\n $this->add([\n 'name' => 'name',\n 'type' => Text::class,\n 'attributes' => [\n 'placeholder' => 'Full Name',\n 'autofocus' => true,\n ],\n 'options' => [\n 'label' => 'Name',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'email',\n 'type' => Email::class,\n 'attributes' => [\n 'placeholder' => 'Email Address',\n ],\n 'options' => [\n 'label' => 'Email',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'subject',\n 'type' => Text::class,\n 'options' => [\n 'label' => 'Subject',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n 'attributes' => [\n 'placeholder' => 'Subject',\n ],\n ]);\n\n $this->add([\n 'name' => 'transport',\n 'type' => Select::class,\n 'options' => [\n 'label' => 'Department',\n 'value_options' => $this->getTransportList(),\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n ]);\n\n $this->add([\n 'name' => 'body',\n 'type' => Textarea::class,\n 'options' => [\n 'label' => 'Message',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10',\n 'label_attributes' => [\n 'class' => 'col-sm-2',\n ],\n ],\n 'attributes' => [\n 'placeholder' => 'Your message',\n 'rows' => 10,\n ],\n ]);\n\n if (true === $this->getOption('enable_captcha')) {\n $this->add([\n 'name' => 'captcha',\n 'type' => Captcha::class,\n 'attributes' => [\n 'placeholder' => 'Type letters and number here',\n ],\n 'options' => [\n 'label' => 'Please verify you are human',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10 col-sm-offset-2',\n 'label_attributes' => [\n 'class' => 'col-sm-10 col-sm-offset-2',\n ],\n ],\n ]);\n }\n\n $this->add([\n 'name' => 'csrf',\n 'type' => Csrf::class,\n ]);\n\n $this->add([\n 'name' => 'submit',\n 'type' => Submit::class,\n 'attributes' => [\n 'id' => 'contact-submit-button',\n 'class' => 'btn btn-primary',\n ],\n 'options' => [\n 'label' => 'Send',\n 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL,\n 'column-size' => 'sm-10 col-sm-offset-2',\n ]\n ]);\n }", "public function createForm();", "public function createForm();", "public function initialize()\n {\n if (isset($this->arguments['form'])) {\n $this->arguments = array_replace(\n $this->arguments,\n $this->arguments['form']->vars\n );\n }\n parent::initialize();\n }", "public function testBuildForm(): void\n {\n $formBuilderMock = $this->createMock(FormBuilderInterface::class);\n\n // Tests number of calls to add method\n $formBuilderMock->expects($this->exactly(4))->method('add')->willReturnSelf()->withConsecutive(\n [$this->equalTo('picture'), $this->equalTo(PictureFormType::class)],\n [$this->equalTo('username'), $this->equalTo(TextType::class)],\n [$this->equalTo('email'), $this->equalTo(EmailType::class)],\n [$this->equalTo('plainPassword'), $this->equalTo(RepeatedType::class)]\n );\n\n // Passing the mock as a parameter and an empty array as options as I don't test its use\n $this->systemUnderTest->buildForm($formBuilderMock, []);\n }", "public function buildForm(FormBuilderInterface $builder, array $options)\n {\n //mc meta\n $builder->add('name');\n $builder->add('description');\n\n //mc addy\n $builder->add('address');\n $builder->add('zip');\n\n //mc op info\n $builder->add('principleFirstName');\n $builder->add('principleLastName');\n $builder->add('principleEmail');\n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "public function builder(FormInterface $form)\n {\n return $this->dispatch(new GetStandardFormBuilder($form));\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 }", "private function createBuilder()\n {\n $class = get_class($this->data->getModel());\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "public function create(DirectorFormBuilder $form)\n {\n return $form->render();\n }", "public function buildCheckoutForm() {\n\t\tLoggerRegistry::debug('CustomerModule::buildCheckoutForm()');\n\t\t$steps = $this->config('checkout.steps.current');\n\t\tif (is_string($steps)) {\n\t\t\t$steps = $this->config(sprintf('checkout.steps.built-in.%s', $steps));\n\t\t}\n\t\t$builder = new CheckoutFormBuilder($this->getEngine()->forms(), $this->config('checkout.form-key'), $this->getLoggedInUserAccount());\n\t\t$form = $builder->buildForm(array(\n\t\t\t'form-url' => $this->getRouteUrl('checkout'),\n\t\t\t'target-url' => $this->getRouteUrl('thank-you'),\n\t\t\t'cancel-url' => $this->getRouteUrl('trolley'),\n\t\t\t'fields' => $this->config('checkout.fields'),\n\t\t\t'fieldsets' => $this->config('checkout.fieldsets'),\n\t\t\t'steps' => $steps\n\t\t));\n\t\treturn $form;\n\t}", "public function __construct(RequestParameterHandler $requestParameterHandler, EntityManager $em, FormFactory $formFactory)\n {\n $this->requestParameterHandler = $requestParameterHandler;\n $this->requestParameterHandler->build();\n $this->em = $em;\n $this->formFactory = $formFactory;\n }" ]
[ "0.77342105", "0.74738115", "0.7348327", "0.72974354", "0.72965676", "0.7044055", "0.6969023", "0.6870084", "0.6853562", "0.66208476", "0.6578482", "0.65710163", "0.65534335", "0.65127456", "0.64911085", "0.6475481", "0.6454409", "0.6434787", "0.6427859", "0.642068", "0.638945", "0.63722855", "0.6319773", "0.63138807", "0.6261987", "0.62370026", "0.6230478", "0.6220724", "0.6215404", "0.6215404", "0.6191949", "0.6140251", "0.61322117", "0.61260104", "0.6119597", "0.60996085", "0.60992336", "0.60946715", "0.60911804", "0.60898274", "0.6074465", "0.6064628", "0.6064628", "0.6061314", "0.60552764", "0.6043552", "0.60375196", "0.60347605", "0.6026326", "0.5999203", "0.59990543", "0.5993196", "0.598262", "0.59798807", "0.5966884", "0.5952116", "0.5952116", "0.59507596", "0.5949347", "0.5940683", "0.59250283", "0.5907591", "0.59033865", "0.5902676", "0.589505", "0.5887176", "0.5876302", "0.58745545", "0.58689666", "0.58689666", "0.58633125", "0.5847707", "0.58357215", "0.5826232", "0.58240634", "0.58227825", "0.58192515", "0.5809863", "0.58086395", "0.58069974", "0.5785625", "0.57753336", "0.5759781", "0.5758588", "0.574756", "0.5744044", "0.5742245", "0.57413936", "0.57413745", "0.57336515", "0.57336515", "0.5722042", "0.57182777", "0.57167006", "0.57155484", "0.57062703", "0.5698748", "0.5697014", "0.5694605", "0.5693699", "0.5690489" ]
0.0
-1
Returns the name of the form type.
public function getName() { return 'textpage_form'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName()\n {\n return 'user_form_type';\n }", "public function getFormType();", "public function getTypeName()\n {\n return $this->type->getName();\n }", "public function getTypeName()\n {\n return $this->type_name;\n }", "public function getName() {\n return 'form';\n }", "public function getFormType() {\n\t\treturn $this->formType;\n\t}", "public function getName()\n {\n return 'form';\n }", "public function getFormName()\n {\n return $this->getModelSimpleName() .'Form';\n }", "public function getFormName();", "public function getFormName();", "abstract protected function getFormType(): string;", "public function getName(): string {\n\t\t\treturn $this->type;\n\t\t}", "function getFormType()\n {\n return $this->formType;\n }", "public function getFormName(){\n return $this->form_name ?? 'form';\n }", "final public function getFormName(): string\n {\n\n return str_replace('.', '__', $this->getName());\n }", "public function name() {\n\t\t\treturn $this->_name . ' ('.self::$type_name[$this->_type].')';\n\t\t}", "function get_form_type()\n {\n return is_array($this->object->context) ? $this->object->context[0] : $this->object->context;\n }", "public function getTypeName()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'typename'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'typename'];\n\t\t}\n\t}", "public function getManageFormTypeName()\n {\n return 'default';\n }", "public function getTypeName()\n {\n return $this->TypeName;\n }", "protected function _getType()\n\t{\n\t\t$class = preg_replace('/.*\\\\\\([^\\\\\\]+)$/', '$1', get_called_class());\n\t\t$class = preg_replace('/C(.*)FormElement/i', '$1', $class);\n\t\t$class = strtolower($class);\n\n\t\treturn $class;\n\t}", "public function FormName()\n {\n return $this->getTemplateHelper()->generateFormID($this);\n }", "public function getNameType()\n {\n return $this->nameType;\n }", "public function get_typename() {\n return get_string('pluginname', \"dataformview_{$this->type}\");\n }", "public function type_name(){\r\n \r\n //sends back the name of the class running\r\n return $this->type_name;\r\n \r\n }", "public function FormName()\n {\n return ($this->_widgetEditor->getForm() ? $this->_widgetEditor->getForm()->FormName() : false);\n }", "public function type()\n\t{\n\t\treturn $this->definition->name;\n\t}", "public function getFormType() : string\n {\n return 'text';\n }", "abstract protected function getFormName();", "public function getTypeName(): string;", "public function getTypeName()\n\t{\n\t\t$name = $this->handler_class;\n\t\t$name = str_replace('Application\\\\DeskPRO\\\\CustomFields\\\\Handler\\\\', '', $name);\n\t\t$name = str_replace('\\\\', '_', $name);\n\t\t$name = strtolower($name);\n\n\t\treturn $name;\n\t}", "protected function getNameFormFileIn()\n {\n $formName = str_replace(' ', '', ucwords(str_replace('-', ' ', $this->owner->id)));\n return \"Form\" . $formName . ucfirst($this->owner->action->actionMethod) . 'In';\n }", "protected function getTypeName(): string\n {\n if (isset($this->typeName)) {\n return $this->typeName;\n }\n\n return $this->getModelNameBasedOnClassName();\n }", "public function get_type_name() { \n\n\t\tswitch ($this->type) { \n\t\t\tcase 'xml-rpc': \n\t\t\tcase 'rpc':\n\t\t\t\treturn _('API/RPC');\n\t\t\tbreak;\n\t\t\tcase 'network':\n\t\t\t\treturn _('Local Network Definition');\n\t\t\tbreak;\n\t\t\tcase 'interface':\n\t\t\t\treturn _('Web Interface');\n\t\t\tbreak;\n\t\t\tcase 'stream':\n\t\t\tdefault: \n\t\t\t\treturn _('Stream Access');\n\t\t\tbreak;\n\t\t} // end switch\n\n\t}", "public function getName($type) {\n return $this->load($type)->getName();\n }", "public function getType()\n {\n return $this->i18n_singular_name();\n }", "public function getType(): string\n {\n return ucfirst($this->type);\n }", "protected function getFormObjectName() {}", "public function get_name() {\n\n\t\treturn $this->post_type_name;\n\t}", "public function getName()\r\n {\r\n return 'context_form';\r\n }", "protected function getNameFormFileOut()\n {\n return \"Form\" . ucfirst($this->owner->id) . ucfirst($this->owner->action->actionMethod) . 'Out';\n }", "abstract public function getTypeName();", "private function getFieldTypeName(FormBuilder $field)\n {\n return get_class($field->getType()->getInnerType());\n }", "public function type(): string\n {\n return $this->type;\n }", "public function type(): string\n {\n return $this->type;\n }", "public function getExtendedType()\n {\n return FormType::class;\n }", "public function getExtendedType()\n {\n return FormType::class;\n }", "function getFormJsObjectName() {\n\t\t\tif ($this->hasForm( )) {\n\t\t\t\treturn $this->getForm( )->getJsObjectName( );\n\t\t\t}\n\n\t\t}", "public function getFormClass()\n {\n if(empty($this->_formClass))\n {\n $this->_formClass = str_replace($this->_namespaceMapper,\n $this->_namespaceForm, get_class($this));\n }\n return $this->_formClass;\n }", "public function getFormTypeClass() {\n return NomenclatureType::class;\n }", "protected function getFormName(){\n return (\n (\n $this->_name!==NULL &&\n is_string($this->_name) &&\n strlen(trim($this->_name))\n )\n ?$this->_name\n :$this->setFormName()\n );\n }", "public function getName()\n {\n return 'content_form';\n }", "public function getTypeName()\n {\n return BalanceOperations::typeName($this->type_id);\n }", "public function getTypeName($type = null)\n {\n $group = $this->getGroup();\n $type = $type === null ? $this->getType() : $type;\n $path = sprintf('wrappers.%s.%s.name', $group, $type);\n\n return Bootstrap::getConfigVar($path);\n }", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n return get_class($this);\n }", "public function __getClassName($type){\n\t\t\treturn 'field' . $type;\n\t\t}", "public function getName()\n {\n return \"event_form\";\n }", "public function getName()\n {\n return ($this->_widgetEditor->getForm() ? $this->_widgetEditor->getForm()->getName() : null);\n }", "protected function getFormClass() : string\n {\n return 'XLite\\Module\\PureClarity\\Personalization\\View\\Form\\Admin\\Dashboard\\Signup';\n }", "public function getType() :string\n {\n return $this->types[$this->type];\n }", "public function getType(): string {\n return $this->fqType;\n }", "public static function __getClassName($type)\n {\n return 'field' . $type;\n }", "function getName()\n {\n return get_class($this);\n }", "public function get_type(): string {\n\t\treturn $this->type;\n\t}", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "public function getName()\n {\n return 'user_type';\n }", "public function getTypeName()\n\t{\n\t\tswitch($this->type)\n\t\t{\n\t\t\tcase User::TYPE_ADMIN:\n\t\t\t\treturn \"Admin\";\n\t\t\tcase User::TYPE_BOOKKEEPING:\n\t\t\t\treturn \"Bookkeeping\";\n\t\t\tcase User::TYPE_MAINTENANCE:\n\t\t\t\treturn \"Maintenance\";\n\t\t\tcase User::TYPE_REPRESENTATIVE:\n\t\t\t\treturn \"Representative\";\n\t\t\tcase User::TYPE_SALES:\n\t\t\t\treturn \"Sales\";\n\t\t\tdefault:\n\t\t\t\treturn \"UNKNOWN\";\n\t\t}\n\t}", "public function getName()\n {\n return 'oo_content_type_choice';\n }", "abstract public function getTypeName(): string;", "public function getName()\n {\n return 'search_form';\n }", "public function getTypeNameWithFlags(): string\n {\n if ($this->exists() && $this->Type()->exists()) {\n $type = $this->Type();\n $title = $type->Name;\n\n return $title\n . ' ('\n . ($type->SingleSelect ? 'Single' : 'Multi')\n . ($type->InternalOnly ? '; Internal only' : '; Public')\n . ')';\n }\n\n return '';\n }", "function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}", "public function viewName($type = null): string\n {\n if (Arr::isAssoc($this->getfieldsetTypes())) {\n $type = $this->getfieldsetTypes()[$type];\n }\n\n $type = $type ?? $this->getDefaultTypes()[0];\n\n return $this->handle.'.'.$type;\n }", "public function getType() {\n return $this->field['type'] ?? '';\n }", "public function getTypeNameAttribute();", "public function getName()\n {\n return 'category_form';\n }", "public function getName()\n {\n return 'formEvent';\n }", "public function get_type_label() {\n\t\t$strings = astoundify_contentimporter_get_string( $this->get_type(), 'type_labels' );\n\t\treturn esc_attr( $strings[0] );\n\t}", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType()\n {\n $explode = explode('.', $this->name);\n return $type = array_first($explode);\n }", "public function getType()\n\t{\n\t\treturn $this->get('type');\n\t}", "protected function get_form_identifier() {\n\n $formid = $this->_customdata->id.'_'.get_class($this);\n return $formid;\n }", "public function getNameWithoutType()\n {\n $explode = explode('.', $this->name);\n $type = array_shift($explode);\n return implode('.', $explode);\n }", "public function name()\n {\n return __('nova.filters.log_type');\n }", "public static function getType(): string\n {\n return self::TYPE;\n }", "public function getName()\n {\n return 'snide_extra_form';\n }", "public function getType() : string\n {\n return $this->type;\n }", "public function getType() : string\n {\n return $this->type;\n }", "public function getType() : string\n {\n return $this->type;\n }" ]
[ "0.8198043", "0.79904956", "0.77916247", "0.7766487", "0.77337635", "0.7698481", "0.7696464", "0.75959945", "0.7595872", "0.7595872", "0.7534543", "0.7506197", "0.74868584", "0.7443108", "0.7393556", "0.7327615", "0.73123956", "0.72769326", "0.7272592", "0.7239928", "0.7234007", "0.7228569", "0.7212934", "0.7206927", "0.7188341", "0.71748734", "0.71651477", "0.7137481", "0.71101046", "0.7099517", "0.7085876", "0.708557", "0.7084668", "0.7060319", "0.6976634", "0.69703865", "0.6932865", "0.6931038", "0.69294363", "0.6860936", "0.6857774", "0.6850925", "0.68455017", "0.6797763", "0.6797763", "0.67950934", "0.67950934", "0.6773572", "0.6758037", "0.675055", "0.6747969", "0.67385113", "0.67371845", "0.67370355", "0.6726647", "0.6726647", "0.6707613", "0.6693738", "0.6679393", "0.66545755", "0.66542655", "0.6636072", "0.66318977", "0.6614438", "0.66047597", "0.659546", "0.65947783", "0.6592499", "0.65867555", "0.6557785", "0.65488374", "0.6540181", "0.6538692", "0.6538036", "0.6534762", "0.6533686", "0.65061533", "0.65039486", "0.6503419", "0.6501916", "0.6501916", "0.6501916", "0.6501916", "0.6501916", "0.6501916", "0.6501916", "0.6501916", "0.6501916", "0.6501916", "0.6501916", "0.64952815", "0.64945525", "0.64938986", "0.6487876", "0.64625204", "0.64624035", "0.64605504", "0.64499897", "0.64499897", "0.64499897" ]
0.66518396
61